diff --git a/src/api/manage/api.insignia.ts b/src/api/manage/api.insignia.ts index 943b2d79a..e23bee4f9 100644 --- a/src/api/manage/api.insignia.ts +++ b/src/api/manage/api.insignia.ts @@ -45,4 +45,6 @@ export default { insigniaTypeNewIdOrg: (id: string) => `${insigniaTypeOrg}${id}`, insigniaNewIdOrg: (id: string) => `${insigniaOrg}${id}`, insigniaSortOrg: (id: string) => `${insigniaOrg}sort/${id}`, + + checkIsofficer: `${env.API_URI}/org/workflow/keycloak/isofficer/`, }; diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 84f92f462..890263059 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -255,7 +255,7 @@ const person = ref([]); /** เช็คสถานนะแสดงปุ่มเพิ่ม*/ const checkStatus = computed(() => { if ( - roleDataStore.insignia1Role && + DataStore.isStaff && (DataStore.requestStatus == "st1" || DataStore.requestStatus == "st4") ) { return true; @@ -789,8 +789,6 @@ function clearInsigniaFilters(name: string) { /** Hook*/ onMounted(async () => { - console.log(DataStore.optionsTypeOc); - filterOrganizationOP.value = await DataStore.optionsTypeOc; organization.value = DataStore.typeOc; @@ -806,6 +804,14 @@ onMounted(async () => { } } }); + +watch( + () => DataStore.typeOc, + async () => { + filterOrganizationOP.value = await DataStore.optionsTypeOc; + organization.value = await DataStore.typeOc; + } +);