From 4d9f9a6ddbd41bc3197cf11453e978ce96344c2f Mon Sep 17 00:00:00 2001 From: Lucas Mendes <92529166+lucasmendes21@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:15:46 -0300 Subject: [PATCH 01/24] [UXE-5512] fix: adjust loop requests waf filter (#1855) --- src/templates/empty-results-block/index.vue | 5 ++-- src/views/WafRules/ListWafRulesTuning.vue | 28 ++++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/templates/empty-results-block/index.vue b/src/templates/empty-results-block/index.vue index 885e715b5..d44d7e911 100644 --- a/src/templates/empty-results-block/index.vue +++ b/src/templates/empty-results-block/index.vue @@ -16,7 +16,8 @@ createPagePath: { type: String, required: false }, createButtonLabel: { type: String, required: false }, inTabs: { type: Boolean, required: false }, - noBorder: { type: Boolean, required: false } + noBorder: { type: Boolean, required: false }, + noShowBorderTop: { type: Boolean, required: false, default: false } }) function openDocumentation() { props.documentationService() @@ -36,7 +37,7 @@ >
ctrl
or command
keys to select multiple items.
-
- This invoice includes all consumption up to the last day of the month. Change { - return columnBuilder({ - data: columnData, - columnAppearance: 'text-full-with-clipboard', - dependencies: { - copyContentService: props.clipboardWrite - } - }) - } - }, - { - field: 'paymentMethod', - header: 'Payment Method', - filterPath: 'paymentMethod.value', - sortField: 'paymentMethod.value', - type: 'component', - component: (columnData) => - columnBuilder({ data: columnData, columnAppearance: 'credit-card-column' }) - }, - { - field: 'amount', - header: 'Amount' - }, - { - field: 'status', - header: 'Status', - type: 'component', - sortField: 'status.content', - filterPath: 'status.content', - component: (columnData) => { - return columnBuilder({ - data: columnData, - columnAppearance: 'tag' - }) - } - } - ]) - const handleLoadData = (event) => { hasContentToList.value = event } @@ -391,7 +368,9 @@ const getYourServicePlan = async () => { isYourServicePlanLoaded.value = false try { - yourServicePlan.value = await props.loadYourServicePlanService(user.disclaimer) + yourServicePlan.value = accountIsNotRegular.value + ? await props.loadYourServicePlanService(user.value.disclaimer) + : {} } finally { isYourServicePlanLoaded.value = true } @@ -399,7 +378,7 @@ const getLoadContractService = async () => { const { yourServicePlan } = await props.loadContractServicePlan({ - clientId: user.client_id + clientId: user.value.client_id }) servicePlan.value = `${yourServicePlan} Plan` } @@ -412,7 +391,7 @@ await Promise.all([getLoadContractService(), getYourServicePlan()]) } - const isTrail = computed(() => user.status === 'TRIAL') + const isTrail = computed(() => user.value.status === 'TRIAL') const reloadList = () => { if (hasContentToList.value) { @@ -422,6 +401,82 @@ hasContentToList.value = true } + const loaderPaymentHistoryColumns = computed(() => { + if (accountIsNotRegular.value) { + return [ + { + field: 'paymentDate', + header: 'Payment Date' + }, + { + field: 'invoiceNumber', + header: 'Invoice ID', + filterPath: 'invoiceNumber.content', + sortField: 'invoiceNumber.content', + type: 'component', + component: (columnData) => { + return columnBuilder({ + data: columnData, + columnAppearance: 'text-full-with-clipboard', + dependencies: { + copyContentService: props.clipboardWrite + } + }) + } + }, + { + field: 'paymentMethod', + header: 'Payment Method', + filterPath: 'paymentMethod.value', + sortField: 'paymentMethod.value', + type: 'component', + component: (columnData) => + columnBuilder({ data: columnData, columnAppearance: 'credit-card-column' }) + }, + { + field: 'amount', + header: 'Amount' + }, + { + field: 'status', + header: 'Status', + type: 'component', + sortField: 'status.content', + filterPath: 'status.content', + component: (columnData) => { + return columnBuilder({ + data: columnData, + columnAppearance: 'tag' + }) + } + } + ] + } + + return [ + { + field: 'paymentDate', + header: 'Payment Date' + }, + { + field: 'invoiceNumber', + header: 'Invoice ID', + filterPath: 'invoiceNumber.content', + sortField: 'invoiceNumber.content', + type: 'component', + component: (columnData) => { + return columnBuilder({ + data: columnData, + columnAppearance: 'text-full-with-clipboard', + dependencies: { + copyContentService: props.clipboardWrite + } + }) + } + } + ] + }) + onMounted(async () => { getAllInfos() await loaderCurrentInvoice() diff --git a/src/views/Billing/InvoiceDetailsView.vue b/src/views/Billing/InvoiceDetailsView.vue index 8e6cea087..7c89d8877 100644 --- a/src/views/Billing/InvoiceDetailsView.vue +++ b/src/views/Billing/InvoiceDetailsView.vue @@ -15,7 +15,7 @@ outlined size="small" label="Export" - :disabled="invoiceData.temporaryBill" + :disabled="invoiceData?.temporaryBill || !accountIsNotRegular" />