fix โครงสร้างอัตรากำลัง
This commit is contained in:
parent
53d05ad09a
commit
46bced52a6
1 changed files with 14 additions and 16 deletions
|
|
@ -121,28 +121,25 @@ function onSubmit() {
|
|||
["org" + type + "Fax"]: formData.orgFax,
|
||||
["org" + type + "Rank"]: formData.orgLevel,
|
||||
["org" + type + "RankSub"]: formData.orgLevelSub,
|
||||
misId: formData.misId,
|
||||
misId: formData.misId ? formData.misId : "",
|
||||
isDeputy:
|
||||
type === "Root"
|
||||
? formData.isDeputy
|
||||
? formData.isDeputy
|
||||
: false
|
||||
: undefined,
|
||||
isOfficer:
|
||||
type === "Child1"
|
||||
? formData.isOfficer
|
||||
? formData.isOfficer
|
||||
: false
|
||||
: undefined,
|
||||
|
||||
[nameId]: rootId,
|
||||
responsibility:
|
||||
formData.responsibility != null ? formData.responsibility : "",
|
||||
};
|
||||
|
||||
if (type === "Root") {
|
||||
body = {
|
||||
...body,
|
||||
isDeputy:
|
||||
formData.isDeputy !== undefined ? String(formData.isDeputy) : "",
|
||||
};
|
||||
}
|
||||
if (type === "Child1") {
|
||||
body = {
|
||||
...body,
|
||||
isOfficer:
|
||||
formData.isOfficer !== undefined ? String(formData.isOfficer) : "",
|
||||
};
|
||||
}
|
||||
|
||||
//เพิ่มข้อมูล
|
||||
if (actionType.value === "ADD") {
|
||||
await http
|
||||
|
|
@ -208,6 +205,7 @@ function closeClear() {
|
|||
formData.orgLevel = "";
|
||||
formData.responsibility = "";
|
||||
formData.isOfficer = false;
|
||||
formData.isDeputy = false;
|
||||
formData.misId = "";
|
||||
props.close?.();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue