mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
* fix dropdown action Estimate Dashboard and fix translating full Dasboard page * Update app.php * fix locale in app.php config * Wizard install with translation, customer portal with translation, and fixing hardcoding strings to get translation * fixes asked to review * fixes pint --------- Co-authored-by: Max <contact@agencetwogether.fr> Co-authored-by: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com>
67 lines
2.3 KiB
Vue
67 lines
2.3 KiB
Vue
<template>
|
|
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-9 xl:gap-8">
|
|
<!-- Amount Due -->
|
|
<DashboardStatsItem
|
|
:icon-component="DollarIcon"
|
|
:loading="!globalStore.getDashboardDataLoaded"
|
|
:route="{ name: 'invoices.dashboard' }"
|
|
:large="true"
|
|
:label="$t('dashboard.cards.due_amount')"
|
|
>
|
|
<BaseFormatMoney
|
|
:amount="dashboardStore.totalDueAmount"
|
|
:currency="globalStore.currency"
|
|
/>
|
|
</DashboardStatsItem>
|
|
|
|
<!-- Invoices -->
|
|
<DashboardStatsItem
|
|
:icon-component="InvoiceIcon"
|
|
:loading="!globalStore.getDashboardDataLoaded"
|
|
:route="{ name: 'invoices.dashboard' }"
|
|
:label="(dashboardStore.invoiceCount <= 1 ? $t('dashboard.cards.invoices', 1) : $t('dashboard.cards.invoices', 2))"
|
|
>
|
|
{{ dashboardStore.invoiceCount }}
|
|
</DashboardStatsItem>
|
|
|
|
<!-- Estimates -->
|
|
<DashboardStatsItem
|
|
:icon-component="EstimateIcon"
|
|
:loading="!globalStore.getDashboardDataLoaded"
|
|
:route="{ name: 'estimates.dashboard' }"
|
|
:label="(dashboardStore.estimateCount <= 1 ? $t('dashboard.cards.estimates', 1) : $t('dashboard.cards.estimates', 2))"
|
|
>
|
|
{{ dashboardStore.estimateCount }}
|
|
</DashboardStatsItem>
|
|
|
|
<!-- Payments -->
|
|
|
|
<DashboardStatsItem
|
|
:icon-component="PaymentIcon"
|
|
:loading="!globalStore.getDashboardDataLoaded"
|
|
:route="{ name: 'payments.dashboard' }"
|
|
:label="(dashboardStore.paymentCount <= 1 ? $t('dashboard.cards.payments', 1 ) : $t('dashboard.cards.payments', 2))"
|
|
>
|
|
{{ dashboardStore.paymentCount }}
|
|
</DashboardStatsItem>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { inject } from 'vue'
|
|
import DollarIcon from '@/scripts/components/icons/dashboard/DollarIcon.vue'
|
|
import InvoiceIcon from '@/scripts/components/icons/dashboard/InvoiceIcon.vue'
|
|
import PaymentIcon from '@/scripts/components/icons/dashboard/PaymentIcon.vue'
|
|
import EstimateIcon from '@/scripts/components/icons/dashboard/EstimateIcon.vue'
|
|
|
|
import { useGlobalStore } from '@/scripts/customer/stores/global'
|
|
import { useDashboardStore } from '@/scripts/customer/stores/dashboard'
|
|
import DashboardStatsItem from '@/scripts/customer/views/dashboard/DashboardStatsItem.vue'
|
|
//store
|
|
|
|
const utils = inject('utils')
|
|
const globalStore = useGlobalStore()
|
|
const dashboardStore = useDashboardStore()
|
|
dashboardStore.loadData()
|
|
</script>
|