fix workflow

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-03-21 17:41:16 +07:00
parent 6c72cc5538
commit e3abae0a5e
3 changed files with 44 additions and 11 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { reactive, ref, watch } from "vue";
import { reactive, ref, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -20,10 +20,18 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
stateId: { type: String, require: true },
keycloakId: { type: String, require: true },
sysName: { type: String, require: true },
fetchData: { type: Function, require: true },
type: { type: String, require: true },
});
const rejectName = computed(() =>
props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName)
? "ยับยั้ง"
: "ไม่อนุมัติ"
);
/** table*/
const selected = ref<DataCommander[]>([]);
const rows = ref<DataCommander[]>([]);
@ -77,7 +85,10 @@ const formDataQuery = reactive<DataQuery>({
async function fetchLists() {
showLoader();
await http
.put(config.API.workflow + `commander/${props.type}`, formDataQuery)
.put(config.API.workflow + `commander/${props.type}`, {
...formDataQuery,
keycloakId: props.keycloakId,
})
.then(async (res) => {
totalList.value = Math.ceil(
res.data.result.total / formDataQuery.pageSize
@ -281,10 +292,10 @@ function updatePagination(newPagination: Pagination) {
keep-color
color="primary"
v-model="isApproveSetting"
label="ให้เลือกพิจารณา (อนุมัติ/ไม่อนุมัติ)"
:label="`ให้เลือกพิจารณา (อนุมัติ/${rejectName})`"
/>
</div>
<div v-if="!isAcceptSetting">
<div>
<q-checkbox
dense
keep-color