refactor: handle pay installment no
This commit is contained in:
parent
efa576b423
commit
3a63d2622c
2 changed files with 16 additions and 7 deletions
|
|
@ -3,7 +3,7 @@ import { baseUrl } from 'src/stores/utils';
|
|||
|
||||
import BadgeComponent from 'src/components/BadgeComponent.vue';
|
||||
|
||||
import { ProductRelation } from 'src/stores/quotations/types';
|
||||
import { ProductRelation, PayCondition } from 'src/stores/quotations/types';
|
||||
import { Step, RequestWorkStatus } from 'src/stores/request-list/types';
|
||||
|
||||
const workStatus = [
|
||||
|
|
@ -32,7 +32,9 @@ defineProps<{
|
|||
total: number;
|
||||
paid?: number;
|
||||
};
|
||||
installmentNo?: number;
|
||||
paySuccess: boolean;
|
||||
payCondition: PayCondition;
|
||||
}>();
|
||||
|
||||
// NOTE: Function
|
||||
|
|
@ -91,9 +93,11 @@ defineProps<{
|
|||
:label="
|
||||
$q.screen.lt.sm
|
||||
? undefined
|
||||
: $t(
|
||||
`requestList.status.work.${status?.workStatus ?? RequestWorkStatus.Pending}`,
|
||||
)
|
||||
: !paySuccess
|
||||
? $t('general.unavailable')
|
||||
: $t(
|
||||
`requestList.status.work.${status?.workStatus ?? RequestWorkStatus.Pending}`,
|
||||
)
|
||||
"
|
||||
class="text-capitalize text-weight-regular product-status rounded"
|
||||
:class="{
|
||||
|
|
@ -169,7 +173,11 @@ defineProps<{
|
|||
}"
|
||||
>
|
||||
{{
|
||||
$t(`requestList.status.work.${status?.workStatus ?? 'Pending'}`)
|
||||
!paySuccess
|
||||
? `${$t(`quotation.payCondition.${payCondition}`)} ${payCondition.includes('Split') ? `${installmentNo}/${installmentInfo?.total} ` : ''}`
|
||||
: $t(
|
||||
`requestList.status.work.${status?.workStatus ?? 'Pending'}`,
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue