no message

This commit is contained in:
setthawutttty 2025-01-06 16:38:44 +07:00
parent 5e29bac774
commit 2a65665704
2 changed files with 43 additions and 1 deletions

View file

@ -22,6 +22,8 @@ const route = useRoute();
const { showLoader, hideLoader, messageError, success, dialogConfirm } = mixin;
const checkBox = ref<string>("");
const evaluationResult = ref<string>("");
const id = ref<string>(route.params.id as string);
const modalConfirm = ref<boolean>(false);
const nameOfWork = ref<string>("");
@ -191,6 +193,7 @@ async function confirmApprove() {
data
)
.then(async () => {
updateEvaluationResult();
await nextStep();
modalConfirm.value = false;
})
@ -312,6 +315,7 @@ async function fetchDataSigner() {
nameOfWork.value = data.subjectDoc2;
nameOfOwner.value = data.authorDoc2;
position.value = data.assignedPosition;
evaluationResult.value = data.evaluationResult
}
})
.catch((e) => {
@ -324,6 +328,20 @@ async function fetchDataSigner() {
});
}
function updateEvaluationResult() {
http
.put(config.API.updateEvaluationResult(id.value), {
result: checkBox.value,
})
.then((res) => {
hideLoader();
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
}
onMounted(async () => {
await Promise.all([
fetchDataSigner(),
@ -968,6 +986,7 @@ onMounted(async () => {
/>
</div>
</div>
<div v-if="evaluationResult !== 'PENDING'" align="right" :class="evaluationResult == 'PASS' ? `full-width text-green`:`full-width text-orange` ">ผลการพิจารณา : {{ evaluationResult == 'PASS' ? 'ผ่าน':'ไม่ผ่าน' }}</div>
</div>
<q-dialog v-model="modalConfirm" persistent>
@ -1016,11 +1035,32 @@ onMounted(async () => {
/>
</div>
</div>
<div class="row q-gutter-x-sm q-pt-sm">
<q-radio
v-model="checkBox"
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
size="sm"
dense
val="PASS"
label="ผ่าน"
/>
<q-radio
v-model="checkBox"
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
size="sm"
dense
val="NOTPASS"
label="ไม่ผ่าน"
/>
</div>
</q-card-section>
<q-separator />
<div class="row justify-end q-px-md q-py-sm items-center">
<q-btn
:disable="checkBox == ''"
dense
color="public"
id="onSubmit"