Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-02-07 17:54:35 +07:00
commit 516b93f90d
11 changed files with 6696 additions and 30 deletions

View file

@ -106,9 +106,9 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
const { id, ...rest } = a ? a : p[0];
const test = { ...e, ...rest };
dataMain.push(test);
posMaster.value = store.fetchPosMaster(dataMain);
}
});
posMaster.value = store.fetchPosMaster(dataMain);
})
.catch((err) => {
messageError($q, err);

View file

@ -103,6 +103,8 @@ interface PosMaster {
positionExecutiveField: string; // ด้านทางการบริหาร
positionArea: string; // ด้าน/สาขา
positionIsSelected: boolean; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้น ๆ หรือไม่?
fullNameCurrentHolder: string | null;
fullNameNextHolder: string | null;
positions: Position[]; // ตำแหน่ง
}
interface Position2 {

View file

@ -48,7 +48,13 @@ export const useOrganizational = defineStore("organizationalStore", () => {
function fetchPosMaster(data: PosMaster[]) {
const newPosMaster = data.map((e: PosMaster) => ({
...e,
positionIsSelected: e.positionIsSelected ? "มี" : "ว่าง",
positionIsSelected:
typeOrganizational.value === "draft" && e.fullNameNextHolder !== null
? e.fullNameNextHolder
: typeOrganizational.value !== "draft" &&
e.fullNameCurrentHolder !== null
? e.fullNameCurrentHolder
: "ว่าง",
posMasterNo:
e.orgShortname +
e.posMasterNoPrefix +

View file

@ -153,27 +153,39 @@
</div>
</div>
<q-space />
<q-btn
v-if="!isVerified && roleRegistryverify"
outlined
color="green"
icon="verified"
@click="onClickVerified"
label="ยืนยันการตรวจสอบข้อมูล"
>
<q-tooltip>นยนการตรวจสอบขอม</q-tooltip>
</q-btn>
<q-btn
v-if="isVerified"
flat
color="green"
icon="verified"
label="ตรวจสอบข้อมูลแล้ว"
>
<q-tooltip>ตรวจสอบขอมลแล</q-tooltip>
</q-btn>
<div v-if="roleRegistryverify || roleKeyregistry">
<q-btn
v-if="!profileStore.isVerified && roleRegistryverify"
outlined
color="green"
icon="verified"
@click="onClickVerified"
label="ยืนยันการตรวจสอบข้อมูล"
>
<q-tooltip>นยนการตรวจสอบขอม</q-tooltip>
</q-btn>
<q-btn
v-else-if="profileStore.isVerified && roleRegistryverify"
outlined
color="warning"
icon="mdi-lock-open"
@click="onClickUnlock"
label="ปลดล็อคให้แก้ไขข้อมูล"
>
<q-tooltip>ปลดลอคใหแกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-else-if="profileStore.isVerified && roleKeyregistry"
flat
color="green"
icon="verified"
label="ตรวจสอบข้อมูลแล้ว"
>
<q-tooltip>ตรวจสอบขอมลแล</q-tooltip>
</q-btn>
</div>
<div v-if="!roleKeyregistry && !roleRegistryverify">
<div v-else>
<q-btn
v-if="
profileType == 'officer' ||
@ -784,9 +796,14 @@ import TrainVue from "@/modules/04_registry/components/Train.vue";
import InsigniaVue from "@/modules/04_registry/components/Insignia.vue";
import CoinedVue from "@/modules/04_registry/components/Coin.vue";
import AssessmentVue from "@/modules/04_registry/components/Assessment.vue";
import SalaryVue from "@/modules/04_registry/components/Salary.vue";
import SalaryEmployeeVue from "@/modules/04_registry/components/SalaryEmployee.vue";
import SalaryEmployeeTempVue from "@/modules/04_registry/components/SalaryEmployeeTemp.vue";
// import SalaryVue from "@/modules/04_registry/components/Salary.vue";
// import SalaryEmployeeVue from "@/modules/04_registry/components/SalaryEmployee.vue";
// import SalaryEmployeeTempVue from "@/modules/04_registry/components/SalaryEmployeeTemp.vue";
import SalaryVue from "@/modules/04_registry/components/salaryNew/Salary.vue";
import SalaryEmployeeVue from "@/modules/04_registry/components/salaryNew/SalaryEmployee.vue";
import SalaryEmployeeTempVue from "@/modules/04_registry/components/salaryNew/SalaryEmployeeTemp.vue";
import DisciplineVue from "@/modules/04_registry/components/Discipline.vue";
import LeaveVue from "@/modules/04_registry/components/Leave.vue";
import TalentVue from "@/modules/04_registry/components/Talent.vue";
@ -906,6 +923,15 @@ function onClickVerified() {
"ต้องการยืนยันการตรวจสอบข้อมูลนี้หรือไม่?"
);
}
function onClickUnlock() {
dialogConfirm(
$q,
async () => {},
"ยืนยันการปลดให้แก้ไขข้อมูล",
"ต้องการยืนยันการปลดให้แก้ไขข้อมูลนี้หรือไม่?"
);
}
onMounted(async () => {
if (keycloak.tokenParsed != null) {
roleKeyregistry.value = await keycloak.tokenParsed.role.includes(
@ -921,6 +947,7 @@ onMounted(async () => {
await checIsVerified();
});
// const isVerified = ref<boolean>(false);
const fetchData = async () => {
showLoader();
await http
@ -942,7 +969,6 @@ const fetchData = async () => {
leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${data.leaveReason})`;
}
reasonStatus.value = reason.length > 0 ? true : false;
isVerified.value = data.isVerified ? data.isVerified : false;
})
.catch((e) => {
messageError($q, e);
@ -952,7 +978,6 @@ const fetchData = async () => {
});
};
const isVerified = ref<boolean>(false);
async function checIsVerified() {
// showLoader();
await http

View file

@ -671,6 +671,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"

View file

@ -531,6 +531,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"

View file

@ -506,6 +506,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff