fix ทดลองงาน
This commit is contained in:
parent
546003492d
commit
008c47084e
4 changed files with 26 additions and 25 deletions
|
|
@ -280,8 +280,10 @@ function onAddPerson() {
|
|||
actFullName: item.actFullName,
|
||||
posNo: item.posNo,
|
||||
role: member.value,
|
||||
rootId: item.orgRootId,
|
||||
}));
|
||||
rows.value = [...rows.value, ...data];
|
||||
|
||||
rows.value.push(...data);
|
||||
const roleOrder: Record<"chairman" | "committee" | "caregiver", number> = {
|
||||
chairman: 0,
|
||||
committee: 1,
|
||||
|
|
@ -294,6 +296,7 @@ function onAddPerson() {
|
|||
roleOrder[b.role as keyof typeof roleOrder]
|
||||
);
|
||||
});
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
|
|
@ -365,25 +368,24 @@ function changeFormData() {
|
|||
function onSubmit() {
|
||||
const body = {
|
||||
topic: topic.value,
|
||||
persons: rows.value.map(
|
||||
({ prefix, firstName, lastName, citizenId, ...newData }) => newData
|
||||
),
|
||||
persons: rows.value.map(({ ...newData }) => newData),
|
||||
};
|
||||
dialogConfirm($q, () => {
|
||||
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.put(config.API.appointMain + `/${id.value}`, body)
|
||||
.then(async (res) => {
|
||||
.then(async () => {
|
||||
await getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
isSave.value = false;
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -446,17 +448,11 @@ async function onAct() {
|
|||
selected.value = [];
|
||||
}
|
||||
|
||||
function resetFilter() {
|
||||
pagination.value.page = 1;
|
||||
filterKeyword.value = "";
|
||||
getPerson();
|
||||
}
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
if (modal.value) {
|
||||
filterKeyword.value = "";
|
||||
|
||||
optionsTypeMain.value = optionsType.value;
|
||||
const optionData = optionsType.value;
|
||||
const caregiverCount = rows.value.filter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue