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));
|
||||
"
|
||||
>
|
||||
{{ pageState.total }}
|
||||
{{ stats.Pending + stats.Success || 0 }}
|
||||
</q-badge>
|
||||
<q-btn
|
||||
class="q-ml-sm"
|
||||
|
|
@ -181,13 +181,13 @@ watch(
|
|||
:branch="[
|
||||
{
|
||||
icon: 'material-symbols-light:receipt-long',
|
||||
count: stats[CreditNoteStatus.Pending],
|
||||
count: stats[CreditNoteStatus.Pending] || 0,
|
||||
label: `creditNote.stats.${CreditNoteStatus.Pending}`,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
icon: 'mdi-check-decagram-outline',
|
||||
count: stats[CreditNoteStatus.Success],
|
||||
count: stats[CreditNoteStatus.Success] || 0,
|
||||
label: `creditNote.stats.${CreditNoteStatus.Success}`,
|
||||
color: 'blue',
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue