From f6b1044a17a8a0ed4a3e68a3f356f0b40b537dc6 Mon Sep 17 00:00:00 2001 From: adonis Date: Sat, 12 Sep 2026 13:25:29 +0330 Subject: [PATCH] Drive the account menu from settings and show notification/permission actions. Co-authored-by: Cursor --- src/utils/superAdminMenuGates.ts | 1 + .../base/user/composables/useUserPage.ts | 14 +++ src/views/base/user/mobile/MobileUserView.vue | 108 +----------------- 3 files changed, 21 insertions(+), 102 deletions(-) diff --git a/src/utils/superAdminMenuGates.ts b/src/utils/superAdminMenuGates.ts index 5f2defc..a011a3f 100644 --- a/src/utils/superAdminMenuGates.ts +++ b/src/utils/superAdminMenuGates.ts @@ -22,6 +22,7 @@ export const MENU_ID_FEATURE_SETTING: Record = { giftCard: 'has_page_gift_card', notify: 'has_page_price_trigger', notifyTrigger: 'has_page_price_trigger', + appNotifications: 'has_page_notification', conditionalOrder: 'enable_conditional_order', permissions: 'permision__enabled', } diff --git a/src/views/base/user/composables/useUserPage.ts b/src/views/base/user/composables/useUserPage.ts index c97ab3b..c9044ea 100644 --- a/src/views/base/user/composables/useUserPage.ts +++ b/src/views/base/user/composables/useUserPage.ts @@ -126,6 +126,13 @@ export function useUserPage() { onClick: () => router.push({ name: 'notifyTrigger' }), visible: settingsStore.isSettingTruthy('has_page_price_trigger'), }, + { + id: 'appNotifications', + label: 'اعلان‌ها', + icon: 'vuesax-linear:notification', + onClick: () => router.push({ name: 'appNotifications' }), + visible: settingsStore.isSettingTruthy('has_page_notification'), + }, { id: 'piggy', label: 'قلک‌ها', @@ -178,6 +185,13 @@ export function useUserPage() { onClick: () => router.push({ name: 'rules' }), visible: true, }, + { + id: 'permissions', + label: 'مجوز ها', + icon: 'vuesax-linear:archive-book', + onClick: () => router.push({ name: 'permissions' }), + visible: settingsStore.isSettingTruthy('permision__enabled'), + }, ].filter((action) => action.visible !== false), ) diff --git a/src/views/base/user/mobile/MobileUserView.vue b/src/views/base/user/mobile/MobileUserView.vue index 4e899d1..b4962a9 100644 --- a/src/views/base/user/mobile/MobileUserView.vue +++ b/src/views/base/user/mobile/MobileUserView.vue @@ -66,112 +66,19 @@
- -
تغییر رمز عبور
+ +
{{ action.label }}
- -
- -
قیمت روز طلا
-
-
- - -
- -
تحویل فیزیکی
-
-
- -
- -
درباره ما
-
-
- -
- -
سایت‌های ری‌گیری
-
-
- -
- -
قوانین و مقررات
-
-
- - - - - - - - - - - - -