โครงสร้าง => refactor code

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-25 11:06:43 +07:00
parent 007df38109
commit 1412ea630b
13 changed files with 369 additions and 408 deletions

View file

@ -70,10 +70,10 @@ function onSubmit() {
.put(config.API.orgSetDateTime(store.draftId as string), {
orgPublishDate: dateTime.value,
})
.then((res) => {
props.close?.();
props.fetchActive();
success($q, "บันทึกข้อมูลสำเร็จ");
.then(async () => {
await props.fetchActive();
await props.close?.();
await success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
@ -91,9 +91,9 @@ function onClickPublish() {
showLoader();
http
.get(config.API.organizationPublishGet)
.then((res) => {
props.fetchActive();
props.close?.();
.then(async () => {
await props.fetchActive();
await props.close?.();
})
.catch((e) => {
messageError($q, e);