Merge branch 'NiceDev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-08-05 13:40:00 +07:00
commit ff6101067e

View file

@ -10,7 +10,6 @@ import type { Permission } from "@/components/Workflow/interface/index/Main";
import type { DataListState } from "@/components/Workflow/interface/response/Main";
import DialogSelectPerson from "@/components/Workflow/DialogSelectPerson.vue";
import Keycloak from "keycloak-js";
const $q = useQuasar();
const { dialogConfirm, showLoader, hideLoader, messageError } =
@ -31,6 +30,7 @@ const stateId = ref<string>(""); //id state ปัจุบัน
const state = ref<number>(1); //state
const isPermission = ref<boolean>(true); // Workflow
const KeycloakId = ref<string>("");
const isLoading = ref<boolean>(false); //
const permission = ref<Permission>({
isChangeState: false, ///
@ -48,6 +48,7 @@ const itemState = ref<DataListState[]>([]);
/** ฟังก์ชันเรียกข้อมูล Workflow ที่อยู่ปัจุบัน*/
async function fetchCheckState() {
isLoading.value = true;
await http
.post(config.API.workflow + `check-user-now`, {
refId: id,
@ -74,6 +75,9 @@ async function fetchCheckState() {
})
.catch(() => {
isPermission.value = false;
})
.finally(() => {
isLoading.value = false;
});
}
@ -129,7 +133,22 @@ defineExpose({
<div class="q-pl-sm text-weight-bold text-dark">สถานะการดำเนนเรอง</div>
</div>
<div class="col-12"><q-separator /></div>
<q-card-section>
<q-card-section class="col-12 q-px-lg q-py-md" v-if="isLoading">
<q-timeline color="primary">
<q-timeline-entry
v-for="(step, index) in 4"
:key="index"
:icon="`mdi-numeric-${index + 1}`"
color="grey-4"
>
<template #title>
<q-skeleton type="rect" width="150px" height="20px" />
</template>
</q-timeline-entry>
</q-timeline>
</q-card-section>
<q-card-section v-else>
<div class="q-px-lg q-py-md">
<q-timeline color="primary">
<q-timeline-entry