fix moshtari code
This commit is contained in:
@@ -239,7 +239,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import { onMounted, ref, computed, watch } from 'vue'
|
||||
import {
|
||||
changeCustomerActivation,
|
||||
changeCustomerArchive,
|
||||
@@ -323,10 +323,15 @@ function rebuildColumns(metals = catalogMetals.value) {
|
||||
})
|
||||
}
|
||||
|
||||
watch(accountingProviderSetting, () => {
|
||||
rebuildColumns()
|
||||
})
|
||||
|
||||
const tblProps = ref<any>({
|
||||
columns: buildCustomerColumns([], { accountingProvider: accountingProviderSetting.value }),
|
||||
api: async (params: TableInput) => {
|
||||
await initAccountingSettingsFromApi()
|
||||
rebuildColumns(catalogMetals.value)
|
||||
const data = await getCustomerTable(params)
|
||||
const metals = data?.catalogMetals ?? []
|
||||
rebuildColumns(metals)
|
||||
@@ -341,8 +346,11 @@ const fetch = async () => {
|
||||
defineExpose({ fetch })
|
||||
|
||||
onMounted(() => {
|
||||
void initAccountingSettingsFromApi()
|
||||
void initWalletSettingsFromApi()
|
||||
void (async () => {
|
||||
await initAccountingSettingsFromApi()
|
||||
rebuildColumns()
|
||||
await initWalletSettingsFromApi()
|
||||
})()
|
||||
})
|
||||
|
||||
function openDirectSms(user: Customer) {
|
||||
|
||||
Reference in New Issue
Block a user