diff --git a/components.d.ts b/components.d.ts index af3fb68..c5c9aa4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -21,6 +21,8 @@ declare module '@vue/runtime-core' { ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel'] AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider'] ADivider: typeof import('ant-design-vue/es')['Divider'] + AdminFieldHelp: typeof import('./src/components/AdminFieldHelp.vue')['default'] + AdminLabelWithHelp: typeof import('./src/components/AdminLabelWithHelp.vue')['default'] ADrawer: typeof import('ant-design-vue/es')['Drawer'] ADropdown: typeof import('ant-design-vue/es')['Dropdown'] AEmpty: typeof import('ant-design-vue/es')['Empty'] @@ -52,6 +54,7 @@ declare module '@vue/runtime-core' { ATable: typeof import('ant-design-vue/es')['Table'] ATabPane: typeof import('ant-design-vue/es')['TabPane'] ATabs: typeof import('ant-design-vue/es')['Tabs'] + ATag: typeof import('ant-design-vue/es')['Tag'] ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] diff --git a/src/api/priceTriggers.ts b/src/api/priceTriggers.ts index 7f5b8af..8c19556 100644 --- a/src/api/priceTriggers.ts +++ b/src/api/priceTriggers.ts @@ -1,6 +1,18 @@ -import type {TableInput} from "@core/type/baseTable"; -import useAxios from "@core/utils/useAxios"; -import type {PriceTriggers} from "@/model/priceTriggers"; +import type { TableInput } from '@core/type/baseTable' +import useAxios from '@core/utils/useAxios' +import type { PriceTriggers } from '@/model/priceTriggers' export const getPriceTriggersTable = async (params: TableInput) => - await useAxios.post>('/admin/price_triggers/table', params) \ No newline at end of file + await useAxios.post>('/admin/price_triggers/table', params) + +export const createPriceTrigger = async (payload: Partial) => + await useAxios.post('/admin/price_triggers', payload) + +export const updatePriceTrigger = async (id: number, payload: Partial) => + await useAxios.put(`/admin/price_triggers/${id}`, payload) + +export const togglePriceTriggerActive = async (id: number) => + await useAxios.put<{ is_active: boolean }>(`/admin/price_triggers/${id}/toggle`) + +export const deletePriceTrigger = async (id: number) => + await useAxios.delete(`/admin/price_triggers/${id}`) diff --git a/src/components/AdminFieldHelp.vue b/src/components/AdminFieldHelp.vue new file mode 100644 index 0000000..acc2068 --- /dev/null +++ b/src/components/AdminFieldHelp.vue @@ -0,0 +1,60 @@ + + + + + + + diff --git a/src/components/AdminLabelWithHelp.vue b/src/components/AdminLabelWithHelp.vue new file mode 100644 index 0000000..3ad5b65 --- /dev/null +++ b/src/components/AdminLabelWithHelp.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/pages/menuPages/banners/components/BannerImageUpload.vue b/src/pages/menuPages/banners/components/BannerImageUpload.vue new file mode 100644 index 0000000..a194664 --- /dev/null +++ b/src/pages/menuPages/banners/components/BannerImageUpload.vue @@ -0,0 +1,227 @@ + + + + + diff --git a/src/pages/menuPages/banners/index.vue b/src/pages/menuPages/banners/index.vue index 5ab9524..a70916e 100644 --- a/src/pages/menuPages/banners/index.vue +++ b/src/pages/menuPages/banners/index.vue @@ -1,84 +1,172 @@ - diff --git a/src/pages/menuPages/configuration/settingTypes.ts b/src/pages/menuPages/configuration/settingTypes.ts index 8282e3b..4597080 100644 --- a/src/pages/menuPages/configuration/settingTypes.ts +++ b/src/pages/menuPages/configuration/settingTypes.ts @@ -277,6 +277,8 @@ export function switchLabels(key: string | undefined): { on: string; off: string const KEY_HELP_FALLBACK: Record = { name_fa: 'نام فارسی برند که در پیامک‌ها، عنوان صفحات و بخش‌های عمومی اپ به مشتری نشان داده می‌شود.', + banner_enabled: + 'روشن: منوی «بنرها» در تنظیمات فعال می‌شود و می‌توانید اسلایدر بالای صفحهٔ اصلی اپ را مدیریت کنید. خاموش: بنرها در اپ نشان داده نمی‌شوند.', open_register: 'روشن: کاربران جدید می‌توانند ثبت‌نام کنند. خاموش: فقط ورود کاربران قبلی مجاز است.', sms_panel: @@ -360,9 +362,9 @@ const KEY_HELP_FALLBACK: Record = { node_shared_secret: 'کلید مشترک امضای درخواست‌ها به سرویس سفارش خارجی. محرمانه نگه دارید.', support_messenger: - 'پیام‌رسانی که دکمه پشتیبانی در اپ مشتری (درباره ما، قوانین، آموزش، دکمه شناور و راهنمای واریز) به آن هدایت می‌کند.', + 'پیام‌رسانی که آیکون کناری و دکمه شناور پشتیبانی در اپ مشتری (درباره ما، قوانین، آموزش و راهنمای واریز) به آن هدایت می‌کند.', support_messenger_id: - 'شناسه تماس پشتیبانی: یوزرنیم، شماره یا آیدی بسته به پیام‌رسان انتخاب‌شده. روی دکمه «تماس با پشتیبانی» و آیکون پیام‌رسان اعمال می‌شود.', + 'شناسه تماس در پیام‌رسان انتخاب‌شده: یوزرنیم، آیدی یا لینک کامل. فقط روی آیکون پیام‌رسان و دکمه شناور اعمال می‌شود؛ تماس تلفنی از فیلد «شماره پشتیبانی» خوانده می‌شود.', support_messenger_text: 'متن راهنمای پشتیبانی در مودال شارژ حساب (واریز).', deposit_sms_support_number: diff --git a/src/pages/menuPages/giftCards/components/GiftCardEditorFormBody.vue b/src/pages/menuPages/giftCards/components/GiftCardEditorFormBody.vue index 9c68014..fa64588 100644 --- a/src/pages/menuPages/giftCards/components/GiftCardEditorFormBody.vue +++ b/src/pages/menuPages/giftCards/components/GiftCardEditorFormBody.vue @@ -1,30 +1,44 @@