refactor: handle undefined stats in credit note display
This commit is contained in:
parent
7be89d1d4f
commit
453252c4be
1 changed files with 3 additions and 3 deletions
|
|
@ -157,7 +157,7 @@ watch(
|
||||||
color: hsl(var(--info-bg));
|
color: hsl(var(--info-bg));
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ pageState.total }}
|
{{ stats.Pending + stats.Success || 0 }}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
|
@ -181,13 +181,13 @@ watch(
|
||||||
:branch="[
|
:branch="[
|
||||||
{
|
{
|
||||||
icon: 'material-symbols-light:receipt-long',
|
icon: 'material-symbols-light:receipt-long',
|
||||||
count: stats[CreditNoteStatus.Pending],
|
count: stats[CreditNoteStatus.Pending] || 0,
|
||||||
label: `creditNote.stats.${CreditNoteStatus.Pending}`,
|
label: `creditNote.stats.${CreditNoteStatus.Pending}`,
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'mdi-check-decagram-outline',
|
icon: 'mdi-check-decagram-outline',
|
||||||
count: stats[CreditNoteStatus.Success],
|
count: stats[CreditNoteStatus.Success] || 0,
|
||||||
label: `creditNote.stats.${CreditNoteStatus.Success}`,
|
label: `creditNote.stats.${CreditNoteStatus.Success}`,
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue