some works for admin

This commit is contained in:
2026-06-29 11:39:17 +03:30
parent 31ac13d308
commit 0e75f93836
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -30,6 +30,7 @@ export interface ZaarboxProductOption {
id: string
category: string
active: boolean
price: number
}
export interface ZaarboxProductsResponse {
@@ -17,7 +17,11 @@
:label="`${item.name} ${item.key}`"
>
<div class="leading-snug">
<div>{{ item.name }}</div>
<div>
{{ item.name }}
<span v-if="item.price > 0" class="text-gray-500">({{ formatPrice(item.price) }} ریال)</span>
<span v-else class="text-gray-400">(بدون قیمت)</span>
</div>
<div class="text-xs text-gray-400 direction-ltr text-right">{{ item.key }}</div>
</div>
</a-select-option>
@@ -48,11 +52,15 @@ const allOptions = computed(() => {
}
return [
{ key: current, name: current, id: '', category: '', active: true },
{ key: current, name: current, id: '', category: '', active: true, price: 0 },
...options.value,
]
})
function formatPrice(value: number): string {
return value.toLocaleString('en-US')
}
onMounted(() => {
void loadOptions()
})