fixing insignia

This commit is contained in:
Warunee Tamkoo 2025-05-14 20:38:51 +07:00
parent dea45644d0
commit cc1927a2f4
8 changed files with 64 additions and 54 deletions

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
import { onMounted, ref, computed, reactive, watch } from "vue";
import { useQuasar, QForm } from "quasar";
import { useQuasar, QForm, is } from "quasar";
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
import { useCounterMixin } from "@/stores/mixin";
@ -77,6 +77,7 @@ const modalEdit = ref<boolean>(false); //popup แก้ไขเครื่อ
const modalPersonal = ref<boolean>(false); //popup
const rowid = ref<string>(""); // id
const organization = ref<string>(""); //
const isDeputy = ref<boolean>(false); //
/** หมายเหตุ*/
const dialogNote = ref<boolean>(false); //
@ -315,13 +316,17 @@ const checkStatus = computed(() => {
});
/** เลือกหน่วยงาน*/
function changtypeOc() {
async function changtypeOc() {
if (organization.value !== null) {
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
(v: OptionData) => v.id === organization.value && v.isDeputy === true
) > -1);
props.fecthInsigniaByOc?.(
props.roundId,
organization.value,
"officer",
props.tab
props.tab,
isDeputy.value
);
}
DataStore.typeOc = organization.value;
@ -441,7 +446,8 @@ async function addlistperson(id: string) {
props.roundId,
organization.value,
"officer",
props.tab
props.tab,
isDeputy.value
);
}
modalAdd.value = false;
@ -536,7 +542,8 @@ async function clickSave() {
props.roundId,
organization.value,
"officer",
props.tab
props.tab,
isDeputy.value
);
success($q, "แก้ไขเครื่องราชฯ ที่ยื่นขอสำเร็จ");
modalEdit.value = false;
@ -589,7 +596,8 @@ async function listreject(profileId: string, reason: string) {
props.roundId,
organization.value,
"officer",
props.tab
props.tab,
isDeputy.value
);
success($q, "บันทึกข้อมูลสำเร็จ");
@ -646,7 +654,8 @@ async function listdelete(id: string, reason: string) {
props.roundId,
organization.value,
"officer",
props.tab
props.tab,
isDeputy.value
);
success($q, "บันทึกข้อมูลสำเร็จ");
closemodelPopupDelete();
@ -884,11 +893,16 @@ onMounted(async () => {
if (organization.value !== "" || organization.value !== undefined) {
if (props.fecthInsigniaByOc) {
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
(v: OptionData) => v.id === organization.value && v.isDeputy === true
) > -1);
props.fecthInsigniaByOc(
props.roundId,
organization.value,
"officer",
props.tab
props.tab,
isDeputy.value
);
DataStore.mainTab = props.tab;
}