fix pargar bugs
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-gray-600">
|
||||
<span>نوع: <span class="font-600 text-gray-900">{{ item.type || '-' }}</span></span>
|
||||
<span>مقدار: <span class="font-600 text-gray-900">{{ item.amount ?? '-' }}</span></span>
|
||||
<span>نوع: <span class="font-600 text-gray-900">{{ pargarTypeLabel(item.type) }}</span></span>
|
||||
<span>مقدار: <span class="font-600 text-gray-900">{{ pargarAmountLabel(item) }}</span></span>
|
||||
</div>
|
||||
<div class="text-xs text-gray-400">{{ createdAtLabel }}</div>
|
||||
</div>
|
||||
@@ -21,6 +21,11 @@ import type { PargarRecord } from '@/api/pargar'
|
||||
import MobileCard from '@/components/mobile/MobileCard.vue'
|
||||
import { toJalali } from '@core/utils/useDataTime'
|
||||
import { pargarStatusLabel } from '@/pages/menuPages/accounting/utils/pargarStatus'
|
||||
import {
|
||||
pargarAmountLabel,
|
||||
pargarCustomerLabel,
|
||||
pargarTypeLabel
|
||||
} from '@/pages/menuPages/accounting/utils/pargarDisplay'
|
||||
|
||||
const props = defineProps<{
|
||||
item: PargarRecord
|
||||
@@ -30,7 +35,7 @@ defineEmits<{
|
||||
(e: 'open', item: PargarRecord): void
|
||||
}>()
|
||||
|
||||
const customerName = computed(() => props.item.customer?.name || '-')
|
||||
const customerName = computed(() => pargarCustomerLabel(props.item))
|
||||
const createdAtLabel = computed(() =>
|
||||
props.item.created_at ? toJalali(props.item.created_at) : '-'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user