From 0e75f9383695e5730634de35f335821778721ec3 Mon Sep 17 00:00:00 2001 From: adonis Date: Mon, 29 Jun 2026 11:39:17 +0330 Subject: [PATCH] some works for admin --- src/api/price.ts | 1 + .../menuPages/configuration/ZaarboxPriceKeyField.vue | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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() })