From 01437afa842a5d9078af505b4611bf0f948e7d4b Mon Sep 17 00:00:00 2001 From: adonis Date: Wed, 8 Jul 2026 18:24:55 +0330 Subject: [PATCH] added some text handling 3 --- components.d.ts | 4 + src/api/physicalWithdraw.ts | 28 ++- src/components/AdminFieldHelp.vue | 40 ++- src/components/AdminHelpTooltipContent.vue | 70 ++++++ src/components/BasicInput.vue | 2 +- src/model/wallet.ts | 7 +- .../dashboard/components/DashboardHelpTip.vue | 34 ++- .../DashboardTradingIncomeSummary.vue | 11 - src/pages/dashboard/dashboardSectionCopy.ts | 2 +- .../menuPages/configuration/settingTypes.ts | 8 +- .../PhysicalWithdrawAdjustModal.vue | 233 ++++++++++++++++++ .../PhysicalWithdrawEditorFormBody.vue | 63 +++-- .../physicalWithdraw/components/table.vue | 175 ++++++------- .../hooks/physicalWithdrawColumns.tsx | 18 +- .../menuPages/physicalWithdraw/index.vue | 2 + .../menuPages/pricing/components/table.vue | 1 - src/utils/adminHelpCopy.ts | 36 +++ src/utils/adminHelpFormat.ts | 40 +++ src/utils/productOrderLimit.ts | 77 +++++- 19 files changed, 683 insertions(+), 168 deletions(-) create mode 100644 src/components/AdminHelpTooltipContent.vue create mode 100644 src/pages/menuPages/physicalWithdraw/components/PhysicalWithdrawAdjustModal.vue create mode 100644 src/utils/adminHelpFormat.ts diff --git a/components.d.ts b/components.d.ts index 86af292..3d0dca9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,6 +10,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { _index: typeof import('./src/core/components/_sample/_index.vue')['default'] + AAlert: typeof import('ant-design-vue/es')['Alert'] AAvatar: typeof import('ant-design-vue/es')['Avatar'] ABadge: typeof import('ant-design-vue/es')['Badge'] AButton: typeof import('ant-design-vue/es')['Button'] @@ -21,6 +22,7 @@ declare module '@vue/runtime-core' { AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider'] ADivider: typeof import('ant-design-vue/es')['Divider'] AdminFieldHelp: typeof import('./src/components/AdminFieldHelp.vue')['default'] + AdminHelpTooltipContent: typeof import('./src/components/AdminHelpTooltipContent.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'] @@ -41,6 +43,7 @@ declare module '@vue/runtime-core' { APagination: typeof import('ant-design-vue/es')['Pagination'] APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] APopover: typeof import('ant-design-vue/es')['Popover'] + ARadio: typeof import('ant-design-vue/es')['Radio'] ARadioButton: typeof import('ant-design-vue/es')['RadioButton'] ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] ARow: typeof import('ant-design-vue/es')['Row'] @@ -56,6 +59,7 @@ declare module '@vue/runtime-core' { ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] + AUpload: typeof import('ant-design-vue/es')['Upload'] BaseButton: typeof import('./src/core/components/BaseButton/index.ts')['default'] BaseCard: typeof import('./src/core/components/BaseCard/index.ts')['default'] BaseCollapse: typeof import('./src/components/BaseCollapse.vue')['default'] diff --git a/src/api/physicalWithdraw.ts b/src/api/physicalWithdraw.ts index baaa3ae..abc4203 100644 --- a/src/api/physicalWithdraw.ts +++ b/src/api/physicalWithdraw.ts @@ -46,9 +46,35 @@ export const getPhysicalWithdrawOptions = async (customerId: number) => export const createPhysicalWithdraw = async (payload: CreatePhysicalWithdrawPayload) => await useAxios.post<{ id: number }>('/admin/wallet/withdraw_physical', payload) +export interface PhysicalWithdrawAdjustLine { + transaction_id: number + title: string + current_value: number + available_add: number + max_value: number + min_value: number + allows_decimal: boolean + unit: string +} + +export interface PhysicalWithdrawAdjustInfo { + withdraw_id: number + customer_name: string + customer_mobile: string + lines: PhysicalWithdrawAdjustLine[] +} + +export interface PhysicalWithdrawAdjustItem { + transaction_id: number + value: number +} + +export const getPhysicalWithdrawAdjustInfo = async (withdrawId: number) => + await useAxios.get(`/admin/wallet/withdraw_physical/${withdrawId}/adjust-info`) + export const adjustPhysicalWithdraw = async ( withdrawId: number, - payload: { transaction_id: number; direction: 'increase' | 'decrease' } + payload: { items: PhysicalWithdrawAdjustItem[] } ) => await useAxios.post(`/admin/wallet/withdraw_physical/${withdrawId}/adjust`, payload) export const approvePhysicalWithdraw = async (withdrawId: number, sts = 51) => diff --git a/src/components/AdminFieldHelp.vue b/src/components/AdminFieldHelp.vue index acc2068..f8cd847 100644 --- a/src/components/AdminFieldHelp.vue +++ b/src/components/AdminFieldHelp.vue @@ -1,23 +1,20 @@