diff --git a/src/api/price.ts b/src/api/price.ts index a240771..98f30cd 100644 --- a/src/api/price.ts +++ b/src/api/price.ts @@ -30,6 +30,7 @@ export interface ZaarboxProductOption { id: string category: string active: boolean + price: number } export interface ZaarboxProductsResponse { diff --git a/src/pages/menuPages/configuration/ZaarboxPriceKeyField.vue b/src/pages/menuPages/configuration/ZaarboxPriceKeyField.vue index c7b45eb..3c2ab5f 100644 --- a/src/pages/menuPages/configuration/ZaarboxPriceKeyField.vue +++ b/src/pages/menuPages/configuration/ZaarboxPriceKeyField.vue @@ -17,7 +17,11 @@ :label="`${item.name} ${item.key}`" >
-
{{ item.name }}
+
+ {{ item.name }} + ({{ formatPrice(item.price) }} ریال) + (بدون قیمت) +
{{ item.key }}
@@ -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() })