From 017e375c4d3ed4930f768f22ce1e6d903ad2d458 Mon Sep 17 00:00:00 2001
From: adonis
Date: Sat, 25 Jul 2026 16:47:12 +0330
Subject: [PATCH] fix pargar mande
---
.eslintrc-auto-import.json | 84 +++++++++++++++++++
components.d.ts | 3 +-
src/pages/dashboard/dashboardSectionCopy.ts | 4 +-
.../archive/hooks/archiveColumns.tsx | 4 +-
.../components/PargarWalletSyncAction.vue | 28 ++++++-
.../customers/base/hooks/referralColumns.tsx | 4 +-
src/pages/menuPages/customers/base/index.vue | 4 +-
.../giftCards/hooks/orderColumns.tsx | 4 +-
.../orders/components/OrderDetailModal.vue | 8 +-
.../hooks/priceTriggersColumns.tsx | 4 +-
.../components/PriceMobileDetailSheet.vue | 4 +-
.../components/PriceMobileListItem.vue | 4 +-
.../menuPages/pricing/hooks/priceColumns.tsx | 4 +-
.../pricing/hooks/storePriceColumns.tsx | 4 +-
.../TransactionMobileDetailSheet.vue | 4 +-
.../components/TransactionMobileListItem.vue | 4 +-
.../hooks/transactionsColumns.tsx | 4 +-
src/pages/menuPages/transactions/index.vue | 4 +-
.../components/WithdrawMobileListItem.vue | 4 +-
src/pages/menuPages/withdraw/factor/index.vue | 4 +-
src/pages/menuPages/withdraw/index.vue | 4 +-
21 files changed, 148 insertions(+), 43 deletions(-)
diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
index e69de29..82772e0 100644
--- a/.eslintrc-auto-import.json
+++ b/.eslintrc-auto-import.json
@@ -0,0 +1,84 @@
+{
+ "globals": {
+ "Component": true,
+ "ComponentPublicInstance": true,
+ "ComputedRef": true,
+ "EffectScope": true,
+ "ExtractDefaultPropTypes": true,
+ "ExtractPropTypes": true,
+ "ExtractPublicPropTypes": true,
+ "InjectionKey": true,
+ "PropType": true,
+ "Ref": true,
+ "VNode": true,
+ "WritableComputedRef": true,
+ "acceptHMRUpdate": true,
+ "computed": true,
+ "createApp": true,
+ "createPinia": true,
+ "customRef": true,
+ "defineAsyncComponent": true,
+ "defineComponent": true,
+ "defineStore": true,
+ "effectScope": true,
+ "getActivePinia": true,
+ "getCurrentInstance": true,
+ "getCurrentScope": true,
+ "h": true,
+ "inject": true,
+ "isProxy": true,
+ "isReactive": true,
+ "isReadonly": true,
+ "isRef": true,
+ "mapActions": true,
+ "mapGetters": true,
+ "mapState": true,
+ "mapStores": true,
+ "mapWritableState": true,
+ "markRaw": true,
+ "nextTick": true,
+ "onActivated": true,
+ "onBeforeMount": true,
+ "onBeforeRouteLeave": true,
+ "onBeforeRouteUpdate": true,
+ "onBeforeUnmount": true,
+ "onBeforeUpdate": true,
+ "onDeactivated": true,
+ "onErrorCaptured": true,
+ "onMounted": true,
+ "onRenderTracked": true,
+ "onRenderTriggered": true,
+ "onScopeDispose": true,
+ "onServerPrefetch": true,
+ "onUnmounted": true,
+ "onUpdated": true,
+ "provide": true,
+ "reactive": true,
+ "readonly": true,
+ "ref": true,
+ "resolveComponent": true,
+ "setActivePinia": true,
+ "setMapStoreSuffix": true,
+ "shallowReactive": true,
+ "shallowReadonly": true,
+ "shallowRef": true,
+ "storeToRefs": true,
+ "toRaw": true,
+ "toRef": true,
+ "toRefs": true,
+ "toValue": true,
+ "triggerRef": true,
+ "unref": true,
+ "useAttrs": true,
+ "useCssModule": true,
+ "useCssVars": true,
+ "useLink": true,
+ "useRoute": true,
+ "useRouter": true,
+ "useSlots": true,
+ "watch": true,
+ "watchEffect": true,
+ "watchPostEffect": true,
+ "watchSyncEffect": true
+ }
+}
\ No newline at end of file
diff --git a/components.d.ts b/components.d.ts
index 474c9dd..50acf2e 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -16,7 +16,6 @@ declare module '@vue/runtime-core' {
AButton: typeof import('ant-design-vue/es')['Button']
ACard: typeof import('ant-design-vue/es')['Card']
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
- ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
ACol: typeof import('ant-design-vue/es')['Col']
ACollapse: typeof import('ant-design-vue/es')['Collapse']
ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
@@ -56,9 +55,11 @@ 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']
+ 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/pages/dashboard/dashboardSectionCopy.ts b/src/pages/dashboard/dashboardSectionCopy.ts
index c22c99a..0bff160 100644
--- a/src/pages/dashboard/dashboardSectionCopy.ts
+++ b/src/pages/dashboard/dashboardSectionCopy.ts
@@ -81,8 +81,8 @@ export const dashboardDateMetrics = {
'جمع = fullPriceSood + fullPriceKarmozd'
),
gifts: help(
- 'طلایی که ادمین به مشتریان هدیه داده در همین بازه.',
- 'گرم هدیه = جمع طلای ثبتشده در تراکنشهای ادمین'
+ 'طلای پاداشی که در این بازه به مشتریان داده شده: پاداش معرفی، پاداش ثبتنام و سود زیرمجموعه. شارژ دستی طلا و معاملات اینجا شمرده نمیشوند.',
+ 'گرم هدیه = جمع طلای تراکنشهای پاداش معرفی/ثبتنام و سود زیرمجموعه'
),
} as const satisfies Record
diff --git a/src/pages/menuPages/customers/archive/hooks/archiveColumns.tsx b/src/pages/menuPages/customers/archive/hooks/archiveColumns.tsx
index 7611f06..84c9c65 100644
--- a/src/pages/menuPages/customers/archive/hooks/archiveColumns.tsx
+++ b/src/pages/menuPages/customers/archive/hooks/archiveColumns.tsx
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable'
-import { toJalaliNoTime, toTime } from '@core/utils/useDataTime'
+import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue'
/*import BudgetSelect from '@/components/BudgetSelect.vue'
import { useStaticApiListsStore } from '@/store/staticApisStore'
@@ -138,7 +138,7 @@ export const cols: BaseTableColumn[] = [
key: 'created_at',
type: 'DateTime',
customRender: (record: any) => {
- return toJalaliNoTime(record.record.created_at)
+ return toJalali(record.record.created_at)
}
},*/
{
diff --git a/src/pages/menuPages/customers/base/components/PargarWalletSyncAction.vue b/src/pages/menuPages/customers/base/components/PargarWalletSyncAction.vue
index dbb63e1..58a1c53 100644
--- a/src/pages/menuPages/customers/base/components/PargarWalletSyncAction.vue
+++ b/src/pages/menuPages/customers/base/components/PargarWalletSyncAction.vue
@@ -9,7 +9,7 @@
{{
canSync
- ? 'موجودی را با ماندهٔ پرگار یکی میکند — تاریخچهٔ اسناد روی کیف replay نمیشود'
+ ? 'ریال و طلای کیف اصلی را با ماندهٔ پرگار یکی میکند — فقط وقتی همهٔ اسناد در پرگار ثبت شده باشند'
: 'ابتدا کد حسابداری پرگار را برای این مشتری ثبت کنید'
}}
@@ -22,10 +22,28 @@
class="pargar-wallet-sync__btn"
:loading="loading"
:disabled="!canSync || loading"
- @click="$emit('sync')"
+ @click="$emit('sync', false)"
>
همگامسازی مانده از پرگار
+
+
+ اعمال اجباری مانده
+
+
@@ -38,7 +56,7 @@ defineProps<{
}>()
defineEmits<{
- (e: 'sync'): void
+ (e: 'sync', force: boolean): void
}>()
@@ -69,4 +87,8 @@ defineEmits<{
.pargar-wallet-sync__btn {
@apply font-600;
}
+
+.pargar-wallet-sync__force {
+ @apply mt-1 text-xs;
+}
diff --git a/src/pages/menuPages/customers/base/hooks/referralColumns.tsx b/src/pages/menuPages/customers/base/hooks/referralColumns.tsx
index fd2c5c1..a443129 100644
--- a/src/pages/menuPages/customers/base/hooks/referralColumns.tsx
+++ b/src/pages/menuPages/customers/base/hooks/referralColumns.tsx
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable'
-import { toJalaliNoTime, toTime } from '@core/utils/useDataTime'
+import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice'
/*import BudgetSelect from '@/components/BudgetSelect.vue'
@@ -157,7 +157,7 @@ export const cols: BaseTableColumn[] = [
key: 'created_at',
type: 'DateTime',
customRender: (record: any) => {
- return toJalaliNoTime(record.record.created_at)
+ return toJalali(record.record.created_at)
}
},*/
]
diff --git a/src/pages/menuPages/customers/base/index.vue b/src/pages/menuPages/customers/base/index.vue
index 5591ded..e00af0c 100644
--- a/src/pages/menuPages/customers/base/index.vue
+++ b/src/pages/menuPages/customers/base/index.vue
@@ -659,11 +659,11 @@ async function refreshWalletPanels() {
])
}
-async function syncPargarWallet() {
+async function syncPargarWallet(force = false) {
if (!userInfo.value?.id || !pargarWalletCanSync.value || pargarSyncLoading.value) return
pargarSyncLoading.value = true
try {
- const res = await syncCustomerWalletFromPargar(userInfo.value.id)
+ const res = await syncCustomerWalletFromPargar(userInfo.value.id, force)
const applied =
res.ok ||
(res.result?.documents?.acknowledged ?? 0) > 0 ||
diff --git a/src/pages/menuPages/giftCards/hooks/orderColumns.tsx b/src/pages/menuPages/giftCards/hooks/orderColumns.tsx
index 1a47010..4d72214 100644
--- a/src/pages/menuPages/giftCards/hooks/orderColumns.tsx
+++ b/src/pages/menuPages/giftCards/hooks/orderColumns.tsx
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable'
-import { toJalali, toJalaliNoTime, toTime } from '@core/utils/useDataTime'
+import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice'
import { metalLabel } from '@/utils/adminMetalLabels'
@@ -227,7 +227,7 @@ export function getGiftCardColumns(): BaseTableColumn[] {
key: 'created_at',
type: 'DateTime',
customRender: (record: any) => {
- return toJalaliNoTime(record.record.created_at)
+ return toJalali(record.record.created_at)
}
},*/
{
diff --git a/src/pages/menuPages/orders/components/OrderDetailModal.vue b/src/pages/menuPages/orders/components/OrderDetailModal.vue
index 41cb7be..6193061 100644
--- a/src/pages/menuPages/orders/components/OrderDetailModal.vue
+++ b/src/pages/menuPages/orders/components/OrderDetailModal.vue
@@ -25,7 +25,7 @@
·
کد {{ order.id }}
·
- {{ dateLabel }} {{ timeLabel }}
+ {{ dateLabel }}
محصول
@@ -193,7 +193,7 @@
diff --git a/src/pages/menuPages/transactions/hooks/transactionsColumns.tsx b/src/pages/menuPages/transactions/hooks/transactionsColumns.tsx
index 6f0822d..b112a74 100644
--- a/src/pages/menuPages/transactions/hooks/transactionsColumns.tsx
+++ b/src/pages/menuPages/transactions/hooks/transactionsColumns.tsx
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable'
-import { toJalaliNoTime } from '@core/utils/useDataTime'
+import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice'
import { metalLabel, transactionMetalAmountTitle } from '@/utils/adminMetalLabels'
@@ -169,7 +169,7 @@ export function buildTransactionsColumns(metals: TransactionMetalColumn[] = []):
key: 'created_at',
type: 'DateTime',
customRender: (record: any) => {
- return toJalaliNoTime(record.record.created_at)
+ return toJalali(record.record.created_at)
}
}
]
diff --git a/src/pages/menuPages/transactions/index.vue b/src/pages/menuPages/transactions/index.vue
index e20b50c..87fa10b 100644
--- a/src/pages/menuPages/transactions/index.vue
+++ b/src/pages/menuPages/transactions/index.vue
@@ -86,7 +86,7 @@ import type { FormInstance } from 'ant-design-vue'
import BasicInfoModal from '@/components/BasicInfoModal/index.vue'
import { message } from 'ant-design-vue/es'
import type { Info } from '@/components/BasicInfoModal/model/Info'
-import { toJalaliNoTime, toTime } from '@core/utils/useDataTime'
+import { toJalali, toTime } from '@core/utils/useDataTime'
import { confirmDeleteItem } from '@/utils/confirmModal'
import { cloneDeep } from 'lodash'
import type { Item } from '@/model/Item'
@@ -129,7 +129,7 @@ let infoParams = reactive({})
function info(val: Transaction) {
infoParams.name = val.customer.name
infoParams.type = val.transaction_type === '1' ? 'نقدی' : metalLabel.goldUnit()
- infoParams.date = toJalaliNoTime(val.created_at)
+ infoParams.date = toJalali(val.created_at)
infoParams.time = toTime(val.created_at)
infoParams.itemsTitle = 'اطلاعات کاربری'
infoParams.items = [
diff --git a/src/pages/menuPages/withdraw/components/WithdrawMobileListItem.vue b/src/pages/menuPages/withdraw/components/WithdrawMobileListItem.vue
index 8b634f9..13dbe7b 100644
--- a/src/pages/menuPages/withdraw/components/WithdrawMobileListItem.vue
+++ b/src/pages/menuPages/withdraw/components/WithdrawMobileListItem.vue
@@ -17,7 +17,7 @@