Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-10-21 16:04:15 +07:00
commit f12f64313a
2 changed files with 21 additions and 5 deletions

View file

@ -19,6 +19,7 @@ const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
stateId: { type: String, require: true },
fetchData: { type: Function, require: true },
type: { type: String, require: true },
});
/** table*/
@ -73,7 +74,7 @@ const isReasonSetting = ref<boolean>(false);
async function fetchLists() {
showLoader();
await http
.get(config.API.workflow + `commander`)
.get(config.API.workflow + `commander/${props.type}`)
.then(async (res) => {
rows.value = res.data.result;
})

View file

@ -34,6 +34,7 @@ const permission = ref<Permission>({
});
const modalSelectPerson = ref<boolean>(false); // /
const typeSelectPerson = ref<string>("");
const itemState = ref<DataListState[]>([]);
/** ฟังก์ชันเรียกข้อมูล Workflow ที่อยู่ปัจุบัน*/
@ -114,7 +115,7 @@ defineExpose({
<template>
<q-card bordered class="row col-12" v-if="isPermission">
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
<div class="q-pl-sm text-weight-bold text-dark">Workflow</div>
<div class="q-pl-sm text-weight-bold text-dark">สถานะการดำเนนเรอง</div>
</div>
<div class="col-12"><q-separator /></div>
<q-card-section>
@ -190,10 +191,23 @@ defineExpose({
</q-list>
</div>
<div v-if="permission.isOperate && state === index + 1">
<div
v-if="permission.isOperate && state === index + 1"
class="row q-gutter-x-sm"
>
<q-btn
@click.prevent="modalSelectPerson = true"
label="ส่งไปผู้บังคับบัญชา/ผู้มีอำนาจ"
@click.prevent="
(modalSelectPerson = true), (typeSelectPerson = 'operate')
"
label="ส่งไปผู้บังคับบัญชา"
color="public"
/>
<q-btn
@click.prevent="
(modalSelectPerson = true), (typeSelectPerson = 'sign')
"
label="ผู้มีอำนาจ"
color="public"
/>
</div>
@ -216,5 +230,6 @@ defineExpose({
v-model:modal="modalSelectPerson"
:state-id="stateId"
:fetch-data="fetchCheckState"
:type="typeSelectPerson"
/>
</template>