Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m40s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-04 16:29:24 +07:00
commit 49bcb5673a
6 changed files with 167 additions and 6 deletions

View file

@ -69,6 +69,8 @@ export default {
`${registryNew}${type}/assessments/${dataId}`,
profileNewAssessmentsHisById: (dataId: string, type: string) =>
`${registryNew}${type}/assessments/admin/history/${dataId}`,
profileDevelopmentUpdateDelete: `${registryNew}/development/update-delete/`,
// การฝึกอบรม
profileNewTraining: (type: string) => `${registryNew}${type}/training`,
@ -78,6 +80,7 @@ export default {
`${registryNew}${type}/training/${trainingId}`,
profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
`${registryNew}${type}/training/admin/history/${trainingId}`,
profileTrainingUpdate: `${registryNew}/training/update-delete/`,
// ประวัติการศึกษา
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
@ -232,6 +235,7 @@ export default {
`${registryNew}${type}/actposition/${id}`,
profileActpositionHistory: (id: string, type: string) =>
`${registryNew}${type}/actposition/history/${id}`,
profileActpositionUpdateDelete: `${registryNew}/actposition/update-delete/`,
//ช่วยราชการ
profileAssistance: (type: string, id: string) =>

View file

@ -247,7 +247,7 @@ onMounted(async () => {
<template>
<div class="toptitle text-dark col-12 row items-center">
รายการตวชดตามตำแหนasdassd
รายการตวชดตามตำแหน
</div>
<Summary />

View file

@ -34,6 +34,7 @@ const {
pathRegistryEmp,
onSearchDataTable,
convertDateToAPI,
dialogRemove,
} = mixin;
const id = ref<string>(route.params.id.toString());
@ -400,6 +401,21 @@ function serchDataTable() {
);
}
function onDelete(rowId: string) {
dialogRemove($q, async () => {
showLoader();
try {
await http.patch(config.API.profileTrainingUpdate + `${rowId}`);
await fetchData(id.value);
await success($q, "ลบข้อมูลสำเร็จ");
} catch (err) {
messageError($q, err);
} finally {
hideLoader();
}
});
}
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
onMounted(() => {
fetchData(id.value);
@ -549,6 +565,22 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="isLeave == false && checkPermission($route)?.attrIsDelete"
flat
dense
round
color="red"
icon="delete"
@click="
() => {
onDelete(props.row.id);
}
"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div :class="col.classes" :style="col.style">
@ -580,6 +612,17 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="isLeave == false && checkPermission($route)?.attrIsDelete"
flat
round
color="red"
icon="delete"
@click="() => onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-card-actions>
<q-separator />
<q-list>

View file

@ -40,6 +40,7 @@ const {
pathRegistryEmp,
onSearchDataTable,
convertDateToAPI,
dialogRemove,
} = mixin;
const profileId = ref<string>(
@ -516,6 +517,21 @@ function serchDataTable() {
);
}
function onDelete(rowId: string) {
dialogRemove($q, async () => {
showLoader();
try {
await http.patch(config.API.profileDevelopmentUpdateDelete + `${rowId}`);
empType.value !== "-temp" && (await getDevelop());
await success($q, "ลบข้อมูลสำเร็จ");
} catch (err) {
messageError($q, err);
} finally {
hideLoader();
}
});
}
onMounted(async () => {
await fetchData();
empType.value !== "-temp" && (await getDevelop());
@ -824,8 +840,20 @@ onMounted(async () => {
@click="openDialogDevelop(props.row)"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn></q-td
>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
flat
round
dense
color="red"
icon="delete"
@click="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
@ -871,6 +899,18 @@ onMounted(async () => {
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
flat
round
dense
color="red"
icon="delete"
@click="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-card-actions>
<q-separator />
<div>

View file

@ -29,6 +29,7 @@ const {
pathRegistryEmp,
onSearchDataTable,
convertDateToAPI,
dialogRemove,
} = mixin;
const profileId = ref<string>(
@ -294,6 +295,21 @@ function serchDataTable() {
);
}
function onDelete(rowId: string) {
dialogRemove($q, async () => {
showLoader();
try {
await http.patch(config.API.profileActpositionUpdateDelete + `${rowId}`);
await fetchData();
await success($q, "ลบข้อมูลสำเร็จ");
} catch (err) {
messageError($q, err);
} finally {
hideLoader();
}
});
}
onMounted(() => {
fetchData();
});
@ -418,6 +434,18 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
flat
dense
round
color="red"
icon="delete"
@click.stop.prevent="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div
@ -463,6 +491,17 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="isLeave === false && checkPermission($route)?.attrIsDelete"
color="red"
icon="delete"
flat
round
@click.stop.prevent="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-card-actions>
<q-separator />

View file

@ -314,11 +314,21 @@ function onSubmit(type: string) {
motherLastNameOld: type === "mother" ? fromData.lastNameOld : undefined,
};
const editId =
type === "couple"
? profileId.value
: type === "children"
? childernId.value
: "";
const url =
isEdit.value && type === "children"
? config.API.profileFamily(empType.value, type) + `/${childernId.value}`
isEdit.value && (type === "children" || type === "couple")
? config.API.profileFamily(empType.value, type) + `/${editId}`
: config.API.profileFamily(empType.value, type);
const method = isEdit.value && type === "children" ? "patch" : "post";
const method =
isEdit.value && (type === "children" || type === "couple")
? "patch"
: "post";
try {
await http[method](url, formBody);
type === "father"
@ -365,6 +375,8 @@ function onOpenDialogForm(
isStatusEdit: boolean = false,
data: any = undefined
) {
console.log(data);
modal.value = true;
typeForm.value = type;
isEdit.value = isStatusEdit;
@ -393,6 +405,17 @@ function onOpenDialogForm(
} else if (type === "couple") {
titleForm.value = "คู่สมรส";
fromData.isLive = 1;
if (isStatusEdit) {
fromData.isLive =
coupleData.isLive === null ? 1 : coupleData.isLive ? 1 : 0;
fromData.citizenId = coupleData.citizenId;
fromData.prefix = coupleData.prefix;
fromData.firstName = coupleData.firstName;
fromData.lastName = coupleData.lastName;
fromData.job = coupleData.job;
fromData.lastNameOld = coupleData.lastNameOld as string;
fromData.statusMarital = coupleData.statusMarital as string;
}
} else if (type === "children") {
titleForm.value = "บุตร";
@ -696,6 +719,18 @@ onMounted(async () => {
<q-card bordered class="bg-grey-1 q-pb-md" v-if="coupleData.isCouple">
<div class="col-12 row q-py-sm q-px-md bg-grey-2 items-start">
<div class="text-weight-medium q-pr-md">สมรส</div>
<q-space />
<q-btn
v-if="!isLeave && checkPermission($route)?.attrIsUpdate"
round
flat
color="edit"
icon="edit"
dense
@click="onOpenDialogForm('couple', true)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</div>
<q-separator />
<div class="col-12 q-pa-md q-col-gutter-md">