fix positionLevel
This commit is contained in:
parent
3eb1a053b4
commit
c404185776
1 changed files with 10 additions and 4 deletions
|
|
@ -249,10 +249,15 @@ async function fetchDataOptionExecutive() {
|
|||
* @param status แก่ไข , เพิ่ม
|
||||
*/
|
||||
async function updateSelectType(val: string, status: boolean = false) {
|
||||
console.log(val);
|
||||
console.log(dataLevel.value);
|
||||
|
||||
const listLevel = val
|
||||
? dataLevel.value.find((e: DataPosType) => e.posTypeName === val)
|
||||
: null;
|
||||
|
||||
console.log("เช็คประเภทตำแหน่งงาน", listLevel);
|
||||
// เช็คประเภทตำแหน่งงาน
|
||||
if (listLevel) {
|
||||
store.posLevelData = listLevel.posLevels.map((e: DataPosLevel) => ({
|
||||
id: e.id,
|
||||
|
|
@ -263,10 +268,11 @@ async function updateSelectType(val: string, status: boolean = false) {
|
|||
}));
|
||||
|
||||
formData.positionLevel = !status ? "" : formData.positionLevel;
|
||||
} else {
|
||||
store.posLevelData = [];
|
||||
formData.positionLevel = "";
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// store.posLevelData = [];
|
||||
// // formData.positionLevel = "";
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue