no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-21 11:55:57 +07:00
parent 7dbbfd5fcf
commit fd1f5ce8e4
5 changed files with 140 additions and 31 deletions

View file

@ -20,6 +20,7 @@ const {
dateToISO,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const route = useRoute();
const $q = useQuasar(); // noti quasar
@ -232,6 +233,32 @@ const clickProposals = (file: string) => {
window.open(file);
}
};
const clickListInsignia = async (propsId: string) => {
dialogConfirm(
$q,
async () => {
await getRequest(propsId);
},
"ยืนยันการคำนวณราชชื่อผู้ได้รับเครื่องราช",
"ต้องการยืนยันการคำนวณราชชื่อผู้ได้รับเครื่องราชนี้หรือไม่ ?"
);
};
const getRequest = async (id: string) => {
showLoader();
await http
.get(config.API.requestInsignia(id))
.then((res) => {
console.log(res);
success($q, "ยืนยันสำเร็จ");
})
.catch((err) => {
console.log(err);
messageError($q, err);
})
.finally(async () => {
await fetchData();
});
};
//
const filterKeyword = ref<string>("");
@ -338,6 +365,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
</q-th>
<q-th auto-width />
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
@ -390,6 +418,19 @@ const paginationLabel = (start: string, end: string, total: string) => {
@click="clickEdit(props.row)"
/>
</q-td>
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="primary"
@click="clickListInsignia(props.row.id)"
icon="mdi-account-star"
>
<q-tooltip>ไดบเครองราชฯ</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
dense
@ -436,8 +477,6 @@ const paginationLabel = (start: string, end: string, total: string) => {
</q-card>
</template>
<style lang="scss" scope>
.filter-card {
background-color: #f1f1f1b0;