From d3e5aec842572d04e29d5a0f37dd8b8121754351 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Thu, 10 Apr 2025 18:04:37 +0700 Subject: [PATCH] refactor: rename agencyFile and agencyFileList to userFile and userFileList for clarity --- .../02_personnel-management/FormByType.vue | 188 ++++++++---------- .../02_personnel-management/MainPage.vue | 40 ++-- 2 files changed, 105 insertions(+), 123 deletions(-) diff --git a/src/components/02_personnel-management/FormByType.vue b/src/components/02_personnel-management/FormByType.vue index 1537dc07..114fd1b9 100644 --- a/src/components/02_personnel-management/FormByType.vue +++ b/src/components/02_personnel-management/FormByType.vue @@ -34,14 +34,13 @@ const importNationality = defineModel( ); const trainingPlace = defineModel('trainingPlace'); const checkpoint = defineModel('checkpoint'); -const agencyFile = defineModel('agencyFile'); -const agencyFileList = - defineModel<{ name: string; url: string }[]>('agencyFileList'); +const userFile = defineModel('userFile'); +const userFileList = + defineModel<{ name: string; url: string }[]>('userFileList'); const remark = defineModel('remark'); const agencyStatus = defineModel('agencyStatus'); const attachmentRef = ref(); -const checkpointENOption = ref([]); defineProps<{ dense?: boolean; @@ -71,18 +70,12 @@ function deleteFile(name: string) { userStore.deleteAttachment(userId.value, payload); const result = await userStore.fetchAttachment(userId.value); if (result) { - agencyFileList.value = result; + userFileList.value = result; } }, cancel: () => {}, }); } - -onMounted(async () => { - const resultOption = await fetch('/option/option.json'); - const rawOption = await resultOption.json(); - checkpointENOption.value = rawOption.eng.border; -});