fix some bugs 4
This commit is contained in:
@@ -93,6 +93,15 @@
|
||||
:color="record.trade_active === 1 ? '#54AD06' : '#ad0627'"
|
||||
/>
|
||||
</a-tooltip>
|
||||
<a-tooltip
|
||||
v-if="customerDirectSmsEnabled"
|
||||
placement="bottom"
|
||||
class="cursor-pointer"
|
||||
@click="openDirectSms(record)"
|
||||
>
|
||||
<template #title><span>ارسال پیامک</span></template>
|
||||
<Icon icon="vuesax-linear:sms" color="#0ea5e9" />
|
||||
</a-tooltip>
|
||||
<a-tooltip
|
||||
v-if="!record.is_legal"
|
||||
placement="bottom"
|
||||
@@ -117,9 +126,12 @@
|
||||
@chargeWallet="emits('chargeWallet', $event)"
|
||||
@toggleTrade="(item) => changeCustomerOrderActivationFunction(item.id)"
|
||||
@confirmUser="openConfirmUser"
|
||||
@sendSms="openDirectSms"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<CustomerDirectSmsModal v-model:visible="directSmsVisible" :customer="directSmsCustomer" />
|
||||
|
||||
<BasicModal
|
||||
v-model:visible="confirmVisible"
|
||||
:width="isMobile ? '92vw' : '50vw'"
|
||||
@@ -176,6 +188,7 @@ import {
|
||||
} from '@/api/customer'
|
||||
import { buildCustomerColumns } from '@/pages/menuPages/customers/base/hooks/customerColumns'
|
||||
import CustomerMobileCardList from '@/pages/menuPages/customers/base/components/CustomerMobileCardList.vue'
|
||||
import CustomerDirectSmsModal from '@/pages/menuPages/customers/base/components/CustomerDirectSmsModal.vue'
|
||||
import Icon from '@core/components/BaseIcon/src/Icon.vue'
|
||||
import useBaseTable from '@core/components/BaseTable/hooks/useBaseTable'
|
||||
import type { TableInput } from '@core/type/baseTable'
|
||||
@@ -185,7 +198,13 @@ import { MODAL_ABOVE_ACTION_SHEET_Z_INDEX } from '@/constants/overlayZIndex'
|
||||
import { isMobile } from '@core/utils/is'
|
||||
import TahesabRetryModal from '@/components/TahesabRetryModal.vue'
|
||||
import PargarRetryModal from '@/components/PargarRetryModal.vue'
|
||||
import { tahesabEnabledSetting, pargarEnabledSetting, initAccountingSettingsFromApi } from '@/utils/config'
|
||||
import {
|
||||
tahesabEnabledSetting,
|
||||
pargarEnabledSetting,
|
||||
customerDirectSmsEnabledSetting,
|
||||
initAccountingSettingsFromApi,
|
||||
initWalletSettingsFromApi
|
||||
} from '@/utils/config'
|
||||
|
||||
const [submit, reload] = useBaseTable()
|
||||
const emits = defineEmits(['delete', 'edit', 'add', 'info', 'chargeWallet'])
|
||||
@@ -199,6 +218,9 @@ const tahesabEnabled = tahesabEnabledSetting
|
||||
const pargarRegisterVisible = ref(false)
|
||||
const pargarCustomer = ref<Customer>()
|
||||
const pargarEnabled = pargarEnabledSetting
|
||||
const customerDirectSmsEnabled = customerDirectSmsEnabledSetting
|
||||
const directSmsVisible = ref(false)
|
||||
const directSmsCustomer = ref<Customer | null>(null)
|
||||
const mobileListRef = ref<null | { fetch: () => Promise<void> }>(null)
|
||||
|
||||
const tblProps = ref<any>({
|
||||
@@ -219,8 +241,14 @@ defineExpose({ fetch })
|
||||
|
||||
onMounted(() => {
|
||||
void initAccountingSettingsFromApi()
|
||||
void initWalletSettingsFromApi()
|
||||
})
|
||||
|
||||
function openDirectSms(user: Customer) {
|
||||
directSmsCustomer.value = user
|
||||
directSmsVisible.value = true
|
||||
}
|
||||
|
||||
async function changeCustomerActivationFunction(id: number) {
|
||||
try {
|
||||
loading.value = true
|
||||
|
||||
Reference in New Issue
Block a user