fix: dataStore.typeLeave

This commit is contained in:
setthawutttty 2025-08-19 16:47:20 +07:00
parent 01dc0ad348
commit 7101a189e9
4 changed files with 5 additions and 1 deletions

View file

@ -141,7 +141,6 @@ watch(
/**Hook */
onMounted(() => {
dataStore.typeLeave = "";
});
</script>

View file

@ -316,6 +316,7 @@ export const useLeaveStore = defineStore("Leave", () => {
const data = res.data.result;
dateSendLeave.value = data.dateSendLeave;
leaveTypeName.value = data.leaveTypeName;
typeLeave.value = data.leaveTypeName;
fullName.value = data.fullName;
positionName.value = data.positionName;
positionLevelName.value = data.positionLevelName;

View file

@ -106,6 +106,8 @@ function filterOptionFn(val: string, update: Function) {
}
onMounted(async () => {
dataStore.typeLeave = "";
if (dataStore.options.length == 0) {
await fectOptionType();
}

View file

@ -320,6 +320,8 @@ async function fectOptionType() {
* เรยกใชงาน fetchData เพอดงขอม
*/
onMounted(async () => {
dataStore.typeLeave = "";
if (dataStore.options.length == 0) {
fectOptionType();
}