refactor: calculate days expire
This commit is contained in:
parent
d4afc09614
commit
667058cbef
1 changed files with 28 additions and 5 deletions
|
|
@ -722,11 +722,11 @@ const statusQuotationForm = ref<
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="column col-2 " style="gap: 10px;">
|
||||
<div class="column col-2" style="gap: 10px">
|
||||
<div class="row justify-end">
|
||||
<span class="rounded flex flex-center q-pa-xs badge-color">
|
||||
🞄
|
||||
{{$t('general.laborIdentified')}}
|
||||
🞄
|
||||
{{ $t('general.laborIdentified') }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
|
|
@ -744,9 +744,32 @@ const statusQuotationForm = ref<
|
|||
"
|
||||
>
|
||||
<q-icon name="mdi-calendar-range" />
|
||||
{{$t('quotation.receiptDialog.remain')}}
|
||||
{{ $t('quotation.receiptDialog.remain') }}
|
||||
</div>
|
||||
<div class="col-6 flex flex-center">
|
||||
<span
|
||||
v-if="calculateDaysUntilExpire(quotationFormData.dueDate) <= 0"
|
||||
>
|
||||
{{
|
||||
$t(
|
||||
`general.${
|
||||
calculateDaysUntilExpire(quotationFormData.dueDate) > 0
|
||||
? 'beDue'
|
||||
: calculateDaysUntilExpire(
|
||||
quotationFormData.dueDate,
|
||||
) === 0
|
||||
? 'due'
|
||||
: 'overDue'
|
||||
}`,
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
{{ calculateDaysUntilExpire(quotationFormData.dueDate) }}
|
||||
{{ $t('general.day') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-6 flex flex-center"> {{$t('general.day')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue