-
{{ title }}
+
+
+
+ {{ title }}
+
+
+ {{ subtitle }}
+
-
diff --git a/src/pages/menuPages/customers/base/components/CustomerMobileCardList.vue b/src/pages/menuPages/customers/base/components/CustomerMobileCardList.vue
index 4e5b897..5e2ae2a 100644
--- a/src/pages/menuPages/customers/base/components/CustomerMobileCardList.vue
+++ b/src/pages/menuPages/customers/base/components/CustomerMobileCardList.vue
@@ -21,13 +21,14 @@
@@ -40,7 +41,7 @@ import { useMobileTableList } from '@/components/mobile/composables/useMobileTab
import CustomerMobileListItem from './CustomerMobileListItem.vue'
import CustomerMobileDetailSheet from './CustomerMobileDetailSheet.vue'
-defineEmits<{
+const emit = defineEmits<{
(e: 'info', item: Customer): void
(e: 'edit', item: Customer): void
(e: 'archive', item: Customer): void
@@ -53,6 +54,17 @@ defineEmits<{
const { sheetVisible, selectedItem, openSheet, syncSelectedItem } = useMobileDetailSheet
()
+type SheetAction = 'info' | 'edit' | 'archive' | 'toggleActive' | 'chargeMoney' | 'chargeGold' | 'toggleTrade' | 'confirmUser'
+
+function forward(action: SheetAction, item: Customer) {
+ emit(action, item)
+}
+
+function forwardAndClose(action: SheetAction, item: Customer) {
+ sheetVisible.value = false
+ emit(action, item)
+}
+
const { loading, search, items, hasMore, reload, loadMore, fetch } = useMobileTableList({
fetchApi: getCustomerTable,
onFetched: (rows) => syncSelectedItem(rows)
diff --git a/src/pages/menuPages/customers/base/components/CustomerMobileDetailSheet.vue b/src/pages/menuPages/customers/base/components/CustomerMobileDetailSheet.vue
index a5b4d93..c407ff0 100644
--- a/src/pages/menuPages/customers/base/components/CustomerMobileDetailSheet.vue
+++ b/src/pages/menuPages/customers/base/components/CustomerMobileDetailSheet.vue
@@ -1,35 +1,84 @@
-
+
-
-
-
-
-
-
-
-
-
-
+ {{ row.name || '-' }}
+ {{ row.mobile }}
+
+
+
+ شارژ ریالی
+
+
+ شارژ طلایی
+
+
+ تایید کاربر
+
+
+ مشخصات کامل
+
+
+ ویرایش
+
+
+ بایگانی
+
+
+ {{ row.active ? 'غیرفعال کردن' : 'فعال کردن' }}
+
+
+ {{ row.trade_active === 1 ? 'ممنوعیت سفارش' : 'مجاز کردن سفارش' }}
+
+
@@ -56,9 +105,9 @@
- {{ row.trade_active ? 'مجاز' : 'غیر مجاز' }}
+ {{ row.trade_active === 1 ? 'مجاز' : 'غیر مجاز' }}
@@ -76,11 +125,8 @@ import type { Customer } from '@/model/customer'
import MobileDetailRow from '@/components/mobile/MobileDetailRow.vue'
import MobileStatCard from '@/components/mobile/MobileStatCard.vue'
import MobileDetailSheet from '@/components/mobile/MobileDetailSheet.vue'
-import MobileIconButton from '@/components/mobile/MobileIconButton.vue'
import MobileInfoGrid from '@/components/mobile/MobileInfoGrid.vue'
-import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue'
import { getCashBalance, getGoldBalance } from '@/components/mobile/utils/wallet'
-import { isMobile } from '@core/utils/is'
import { toJalali } from '@core/utils/useDataTime'
import { usePrice } from '@core/utils/usePrice'
@@ -92,6 +138,7 @@ const props = defineProps<{
const emit = defineEmits<{
(e: 'update:visible', value: boolean): void
(e: 'info', item: Customer): void
+ (e: 'edit', item: Customer): void
(e: 'archive', item: Customer): void
(e: 'toggleActive', item: Customer): void
(e: 'chargeMoney', item: Customer): void
@@ -117,3 +164,19 @@ function lastSeen(row: Customer) {
return row.last_seen_at ? toJalali(row.last_seen_at) : '-'
}
+
+
diff --git a/src/pages/menuPages/customers/base/components/CustomerMobileListItem.vue b/src/pages/menuPages/customers/base/components/CustomerMobileListItem.vue
index 08f85e8..355a9ce 100644
--- a/src/pages/menuPages/customers/base/components/CustomerMobileListItem.vue
+++ b/src/pages/menuPages/customers/base/components/CustomerMobileListItem.vue
@@ -1,25 +1,55 @@
-
-
+
+
-
-
{{ item.mobile || '-' }}
+
+
+
+
+
-
-
- {{ item.type_str || 'کاربر' }}
-
-
-
+
+ {{ item.mobile || '-' }}
+
+ {{ item.type_str || 'کاربر' }}
+
+
+
+
+
+
+ عملیات
+
+
+ ویرایش
+
@@ -28,7 +58,6 @@