fix: i18n & work name before close

This commit is contained in:
puriphatt 2024-08-28 18:05:01 +07:00
parent 17289402fd
commit 185a713ad1
7 changed files with 64 additions and 31 deletions

View file

@ -3,14 +3,13 @@ import useUserStore from 'stores/user';
import useOptionStore from 'stores/options';
import { UserAttachmentDelete } from 'stores/user/types';
import { dialog, selectFilterOptionRefMod } from 'stores/utils';
import { dateFormat, parseAndFormatDate } from 'src/utils/datetime';
import { onMounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { Icon } from '@iconify/vue';
import { QSelect } from 'quasar';
import DatePicker from '../shared/DatePicker.vue';
const { locale } = useI18n();
const { t } = useI18n();
const userStore = useUserStore();
const optionStore = useOptionStore();
@ -54,10 +53,12 @@ function deleteFile(name: string) {
dialog({
color: 'negative',
icon: 'mdi-trash-can-outline',
title: 'ยืนยันการลบเอกสารประจำตัว',
actionText: 'ตกลง',
title: t('dialog.title.confirmDelete', {
msg: t('personnel.form.attachment'),
}),
actionText: t('general.delete'),
persistent: true,
message: 'คุณต้องการลบเอกสารประจำตัว ใช่หรือไม่',
message: t('dialog.message.confirmDelete'),
action: async () => {
if (!userId.value) return;
const payload: UserAttachmentDelete = {
@ -69,6 +70,7 @@ function deleteFile(name: string) {
agencyFileList.value = result;
}
},
cancel: () => {},
});
}