fix:delete dialogconfirn disable btn submit
This commit is contained in:
parent
c55780914c
commit
aeaea7ca4a
2 changed files with 12 additions and 14 deletions
|
|
@ -171,20 +171,18 @@ async function fetchDataOperatorList() {
|
||||||
* @param type ประเภท UP,DOWN
|
* @param type ประเภท UP,DOWN
|
||||||
* @param id ID เจ้าหน้าที่ดำเนินการที่ต้องการแก้ไขลำดับ
|
* @param id ID เจ้าหน้าที่ดำเนินการที่ต้องการแก้ไขลำดับ
|
||||||
*/
|
*/
|
||||||
function onSwapData(type: string, id: string) {
|
async function onSwapData(type: string, id: string) {
|
||||||
dialogConfirm($q, async () => {
|
showLoader();
|
||||||
showLoader();
|
try {
|
||||||
try {
|
await http.get(config.API.commandOperator + `/swap/${type}/${id}`);
|
||||||
await http.get(config.API.commandOperator + `/swap/${type}/${id}`);
|
|
||||||
|
|
||||||
await fetchDataOperatorList();
|
await fetchDataOperatorList();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
} finally {
|
} finally {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ watch(modal, (newVal) => {
|
||||||
label="บันทึก"
|
label="บันทึก"
|
||||||
color="public"
|
color="public"
|
||||||
@click="onSubmit"
|
@click="onSubmit"
|
||||||
:disable="!roleName"
|
:disable="!roleName || selected.length === 0"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue