fix bug
This commit is contained in:
parent
6247dcbe60
commit
1f679bd6b4
1 changed files with 15 additions and 15 deletions
|
|
@ -383,8 +383,11 @@ const clickNext = async () => {
|
|||
*/
|
||||
const getData = () => {
|
||||
const row = rows.value[rowIndex.value];
|
||||
const checkLevelEducation = OpsFilter.value.levelOptions.find(
|
||||
(e) => e.id === row.educationLevelId
|
||||
);
|
||||
|
||||
levelId.value = row.educationLevelId;
|
||||
levelId.value = checkLevelEducation ? row.educationLevelId : "";
|
||||
isDate.value = row.isDate;
|
||||
isEducation.value = row.isEducation;
|
||||
// positionPathId.value = resultPath;
|
||||
|
|
@ -494,7 +497,7 @@ const saveData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await props.fetch('Education');
|
||||
await props.fetch("Education");
|
||||
rows.value = props.data;
|
||||
});
|
||||
};
|
||||
|
|
@ -503,12 +506,6 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
// const filter = OpsFilter.value.levelOptions.filter(
|
||||
// (r: any) => r.id == levelId.value
|
||||
// );
|
||||
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
|
||||
// (r: any) => r.id == positionPathId.value
|
||||
// );
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.placementEducationId(route.params.personalId.toString()), {
|
||||
|
|
@ -544,7 +541,7 @@ const editData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await props.fetch('Education');
|
||||
await props.fetch("Education");
|
||||
rows.value = props.data;
|
||||
});
|
||||
};
|
||||
|
|
@ -559,18 +556,16 @@ const deletePlacementEducation = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.delete(config.API.placementEducationId(id.value))
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
modal.value = false;
|
||||
await props.fetch('Education');
|
||||
await props.fetch("Education");
|
||||
rows.value = props.data;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
|
||||
});
|
||||
.finally(async () => {});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -600,12 +595,17 @@ const clickClose = async () => {
|
|||
* @param _props ค่า props ใน row ที่เลือก
|
||||
*/
|
||||
const selectData = async (_props: DataProps) => {
|
||||
const checkLevelEducation = OpsFilter.value.levelOptions.find(
|
||||
(e) => e.id === _props.row.educationLevelId
|
||||
);
|
||||
|
||||
modalEdit.value = true;
|
||||
modal.value = true;
|
||||
edit.value = false;
|
||||
rawItem.value = _props.row;
|
||||
rowIndex.value = _props.rowIndex;
|
||||
levelId.value = _props.row.educationLevelId;
|
||||
levelId.value = checkLevelEducation ? _props.row.educationLevelId : "";
|
||||
|
||||
// positionPathId.value = resultPath;
|
||||
// levelId.value = _props.row.levelId;
|
||||
// positionPathId.value = _props.row.positionPathId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue