refactor: use i18n
This commit is contained in:
parent
0dcda98beb
commit
b1904a4d99
1 changed files with 11 additions and 6 deletions
|
|
@ -13,12 +13,17 @@ defineProps<{
|
|||
class="text-weight-bold"
|
||||
>
|
||||
{{
|
||||
calculateDaysUntilExpire(expirationDate) > 0
|
||||
? 'จะครบกำหนดในอีก'
|
||||
: calculateDaysUntilExpire(expirationDate) === 0
|
||||
? 'ครบกำหนด'
|
||||
: 'เลยกำหนด'
|
||||
$t(
|
||||
`general.${
|
||||
calculateDaysUntilExpire(expirationDate) > 0
|
||||
? 'beDue'
|
||||
: calculateDaysUntilExpire(expirationDate) === 0
|
||||
? 'due'
|
||||
: 'overDue'
|
||||
}`,
|
||||
)
|
||||
}}
|
||||
|
||||
{{
|
||||
calculateDaysUntilExpire(expirationDate) > 0
|
||||
? calculateDaysUntilExpire(expirationDate)
|
||||
|
|
@ -27,7 +32,7 @@ defineProps<{
|
|||
: calculateDaysUntilExpire(expirationDate) * -1
|
||||
}}
|
||||
<template v-if="calculateDaysUntilExpire(expirationDate) !== 0">
|
||||
วัน
|
||||
{{ $t('general.day') }}
|
||||
</template>
|
||||
</q-badge>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue