fix:delete dialogconfirn disable btn submit

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-09 17:47:39 +07:00
parent c55780914c
commit aeaea7ca4a
2 changed files with 12 additions and 14 deletions

View file

@ -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();
} }
});
} }
/** /**

View file

@ -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>