mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
fix dashboard issue
This commit is contained in:
@ -2,11 +2,10 @@
|
||||
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-9 xl:gap-8">
|
||||
<!-- Amount Due -->
|
||||
<DashboardStatsItem
|
||||
v-if="userStore.hasAbilities(abilities.VIEW_INVOICE)"
|
||||
:icon-component="DollarIcon"
|
||||
:loading="!dashboardStore.isDashboardDataLoaded"
|
||||
:route="
|
||||
userStore.hasAbilities(abilities.VIEW_INVOICE) ? `/admin/invoices` : ''
|
||||
"
|
||||
route="/admin/invoices"
|
||||
:large="true"
|
||||
:label="$t('dashboard.cards.due_amount')"
|
||||
>
|
||||
@ -18,13 +17,10 @@
|
||||
|
||||
<!-- Customers -->
|
||||
<DashboardStatsItem
|
||||
v-if="userStore.hasAbilities(abilities.VIEW_CUSTOMER)"
|
||||
:icon-component="CustomerIcon"
|
||||
:loading="!dashboardStore.isDashboardDataLoaded"
|
||||
:route="
|
||||
userStore.hasAbilities(abilities.VIEW_CUSTOMER)
|
||||
? `/admin/customers`
|
||||
: ''
|
||||
"
|
||||
route="/admin/customers"
|
||||
:label="$t('dashboard.cards.customers')"
|
||||
>
|
||||
{{ dashboardStore.stats.totalCustomerCount }}
|
||||
@ -32,11 +28,10 @@
|
||||
|
||||
<!-- Invoices -->
|
||||
<DashboardStatsItem
|
||||
v-if="userStore.hasAbilities(abilities.VIEW_INVOICE)"
|
||||
:icon-component="InvoiceIcon"
|
||||
:loading="!dashboardStore.isDashboardDataLoaded"
|
||||
:route="
|
||||
userStore.hasAbilities(abilities.VIEW_INVOICE) ? `/admin/invoices` : ''
|
||||
"
|
||||
route="/admin/invoices"
|
||||
:label="$t('dashboard.cards.invoices')"
|
||||
>
|
||||
{{ dashboardStore.stats.totalInvoiceCount }}
|
||||
@ -44,13 +39,10 @@
|
||||
|
||||
<!-- Estimates -->
|
||||
<DashboardStatsItem
|
||||
v-if="userStore.hasAbilities(abilities.VIEW_ESTIMATE)"
|
||||
:icon-component="EstimateIcon"
|
||||
:loading="!dashboardStore.isDashboardDataLoaded"
|
||||
:route="
|
||||
userStore.hasAbilities(abilities.VIEW_ESTIMATE)
|
||||
? `/admin/estimates`
|
||||
: ''
|
||||
"
|
||||
route="/admin/estimates"
|
||||
:label="$t('dashboard.cards.estimates')"
|
||||
>
|
||||
{{ dashboardStore.stats.totalEstimateCount }}
|
||||
|
||||
@ -2,7 +2,10 @@
|
||||
<div>
|
||||
<div class="grid grid-cols-1 gap-6 mt-10 xl:grid-cols-2">
|
||||
<!-- Due Invoices -->
|
||||
<div class="due-invoices">
|
||||
<div
|
||||
v-if="userStore.hasAbilities(abilities.VIEW_INVOICE)"
|
||||
class="due-invoices"
|
||||
>
|
||||
<div class="relative z-10 flex items-center justify-between mb-3">
|
||||
<h6 class="mb-0 text-xl font-semibold leading-normal">
|
||||
{{ $t('dashboard.recent_invoices_card.title') }}
|
||||
@ -49,7 +52,10 @@
|
||||
</div>
|
||||
|
||||
<!-- Recent Estimates -->
|
||||
<div class="recent-estimates">
|
||||
<div
|
||||
v-if="userStore.hasAbilities(abilities.VIEW_ESTIMATE)"
|
||||
class="recent-estimates"
|
||||
>
|
||||
<div class="relative z-10 flex items-center justify-between mb-3">
|
||||
<h6 class="mb-0 text-xl font-semibold leading-normal">
|
||||
{{ $t('dashboard.recent_estimate_card.title') }}
|
||||
|
||||
Reference in New Issue
Block a user