From 3f1ea4a0b90191428d7dcf90b21e6e53832ddbe8 Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Mon, 28 Aug 2023 10:37:39 +0000 Subject: [PATCH] web/satellite/vuetify-poc: list invoices This change lists invoices on the vuetifypoc billing history tab. It also removes invoice filtering on the main app. Issue: https://github.com/storj/storj/issues/6099 Change-Id: Id4cc2db003a0208775ddaefc87abf26f4b05106c --- .../billing/billingTabs/BillingHistory.vue | 12 +- .../components/billing/BillingHistoryTab.vue | 140 ++++++++++++++++++ .../vuetify-poc/src/views/Billing.vue | 33 +---- 3 files changed, 147 insertions(+), 38 deletions(-) create mode 100644 web/satellite/vuetify-poc/src/components/billing/BillingHistoryTab.vue diff --git a/web/satellite/src/components/account/billing/billingTabs/BillingHistory.vue b/web/satellite/src/components/account/billing/billingTabs/BillingHistory.vue index 1100adc71..4d252a571 100644 --- a/web/satellite/src/components/account/billing/billingTabs/BillingHistory.vue +++ b/web/satellite/src/components/account/billing/billingTabs/BillingHistory.vue @@ -58,9 +58,7 @@ const historyPage = computed((): PaymentHistoryPage => { }); const historyItems = computed((): PaymentsHistoryItem[] => { - return historyPage.value.items.filter((item: PaymentsHistoryItem) => { - return item.status !== PaymentsHistoryItemStatus.Draft; - }); + return historyPage.value.items; }); async function fetchHistory(endingBefore = '', startingAfter = ''): Promise { @@ -81,18 +79,18 @@ async function sizeChanged(size: number) { } async function nextClicked(): Promise { - const length = historyPage.value.items.length; + const length = historyItems.value.length; if (!historyPage.value.hasNext || !length) { return; } - await fetchHistory('', historyPage.value.items[length - 1].id); + await fetchHistory('', historyItems.value[length - 1].id); } async function previousClicked(): Promise { - if (!historyPage.value.hasPrevious || !historyPage.value.items.length) { + if (!historyPage.value.hasPrevious || !historyItems.value.length) { return; } - await fetchHistory(historyPage.value.items[0].id, ''); + await fetchHistory(historyItems.value[0].id, ''); } onMounted(() => { diff --git a/web/satellite/vuetify-poc/src/components/billing/BillingHistoryTab.vue b/web/satellite/vuetify-poc/src/components/billing/BillingHistoryTab.vue new file mode 100644 index 000000000..fce688557 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/billing/BillingHistoryTab.vue @@ -0,0 +1,140 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + \ No newline at end of file diff --git a/web/satellite/vuetify-poc/src/views/Billing.vue b/web/satellite/vuetify-poc/src/views/Billing.vue index 0c3a44c2a..8d2e82331 100644 --- a/web/satellite/vuetify-poc/src/views/Billing.vue +++ b/web/satellite/vuetify-poc/src/views/Billing.vue @@ -173,37 +173,7 @@ - - - - - - - - + @@ -256,6 +226,7 @@ import { useProjectsStore } from '@/store/modules/projectsStore'; import CreditCardComponent from '@poc/components/CreditCardComponent.vue'; import AddCreditCardComponent from '@poc/components/AddCreditCardComponent.vue'; +import BillingHistoryTab from '@poc/components/billing/BillingHistoryTab.vue'; import UsageAndChargesComponent from '@poc/components/billing/UsageAndChargesComponent.vue'; import StorjTokenCardComponent from '@poc/components/StorjTokenCardComponent.vue';