fix moshtari code

This commit is contained in:
2026-08-27 14:37:39 +03:30
parent 52057805ff
commit da5b113406
5 changed files with 108 additions and 39 deletions
@@ -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) {