added notif 2

This commit is contained in:
2026-07-23 22:24:26 +03:30
parent d505f3b5bd
commit bd441a0e8e
31 changed files with 2105 additions and 34 deletions
@@ -73,6 +73,15 @@
<template #title><span>در ته‌حساب ثبت نشده — کلیک برای ثبت</span></template>
<Icon icon="vuesax-linear:profile-add" color="#CA8A04" />
</a-tooltip>
<a-tooltip
v-if="zarinEnabled && !isValidAccountingCode(record.moshtari_code)"
placement="bottom"
class="cursor-pointer"
@click="openZarinRegister(record)"
>
<template #title><span>در زرین ثبت نشده — کلیک برای ثبت</span></template>
<Icon icon="vuesax-linear:profile-add" color="#0284C7" />
</a-tooltip>
<a-tooltip
v-if="pargarEnabled && !isValidAccountingCode(record.pargar_account_id)"
placement="bottom"
@@ -192,6 +201,14 @@
:customer-name="tahesabCustomer?.name"
@success="fetch"
/>
<ZarinRetryModal
v-if="zarinEnabled"
v-model="zarinRegisterVisible"
mode="register-customer"
:customer-id="zarinCustomer?.id"
:customer-name="zarinCustomer?.name"
@success="fetch"
/>
<PargarRetryModal
v-if="pargarEnabled"
v-model="pargarRegisterVisible"
@@ -226,9 +243,11 @@ import type { Customer } from '@/model/customer'
import { MODAL_ABOVE_ACTION_SHEET_Z_INDEX } from '@/constants/overlayZIndex'
import { isMobile } from '@core/utils/is'
import TahesabRetryModal from '@/components/TahesabRetryModal.vue'
import ZarinRetryModal from '@/components/ZarinRetryModal.vue'
import PargarRetryModal from '@/components/PargarRetryModal.vue'
import {
tahesabEnabledSetting,
zarinEnabledSetting,
pargarEnabledSetting,
accountingProviderSetting,
customerDirectSmsEnabledSetting,
@@ -246,6 +265,9 @@ const confirmInfo = ref<Customer>()
const tahesabRegisterVisible = ref(false)
const tahesabCustomer = ref<Customer>()
const tahesabEnabled = tahesabEnabledSetting
const zarinRegisterVisible = ref(false)
const zarinCustomer = ref<Customer>()
const zarinEnabled = zarinEnabledSetting
const pargarRegisterVisible = ref(false)
const pargarCustomer = ref<Customer>()
const pargarEnabled = pargarEnabledSetting
@@ -254,13 +276,13 @@ const accountingCodeVisible = ref(false)
const accountingCodeCustomer = ref<Customer | null>(null)
const accountingEnabled = computed(() => {
const provider = accountingProviderSetting.value
return provider === 'pargar' || provider === 'tahesab'
return provider === 'pargar' || provider === 'tahesab' || provider === 'zarin'
})
function accountingCodeOf(record: Customer) {
const provider = accountingProviderSetting.value
if (provider === 'pargar') return displayAccountingCode(record.pargar_account_id)
if (provider === 'tahesab') return displayAccountingCode(record.moshtari_code)
if (provider === 'tahesab' || provider === 'zarin') return displayAccountingCode(record.moshtari_code)
return '-'
}
@@ -330,6 +352,11 @@ function openTahesabRegister(user: Customer) {
tahesabRegisterVisible.value = true
}
function openZarinRegister(user: Customer) {
zarinCustomer.value = user
zarinRegisterVisible.value = true
}
function openPargarRegister(user: Customer) {
pargarCustomer.value = user
pargarRegisterVisible.value = true