Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop

# Conflicts:
#	src/modules/03_recruiting/components/Address.vue
#	src/modules/03_recruiting/views/03_editor/index.vue
#	src/modules/04_registryPerson/components/Dialog/02_Address.vue
#	src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue
#	src/modules/05_placement/components/PersonalDetail/CheckInformation/02_FormAddress.vue
#	src/modules/05_placement/components/PersonalDetail/Information/Address.vue
This commit is contained in:
Warunee Tamkoo 2024-11-27 18:18:21 +07:00
commit 563f3e1b16
95 changed files with 580 additions and 489 deletions

View file

@ -16,7 +16,7 @@ const dataLabel = {
registrationAddress: "ที่อยู่ตามทะเบียนบ้าน",
registrationProvince: "จังหวัด",
registrationDistrict: "เขต/อำเภอ",
registrationSubDistrict: "แขวง / ตำบล",
registrationSubDistrict: "แขวง/ตำบล",
registrationZipCode: "รหัสไปรษณีย์",
};
@ -51,8 +51,8 @@ async function selectDistrict(e: string | null, name: string) {
}
/**
* งกนเลอก แขวง / ตำบล
* @param e แขวง / ตำบล เลอก
* งกนเลอก แขวง/ตำบล
* @param e แขวง/ตำบล เลอก
* @param name 1 อยตามทะเบยนบาน 2 อยจจ
*/
function selectSubDistrict(e: string | null, name: string) {

View file

@ -63,6 +63,7 @@ const formInformations = reactive<RequestObject>({
firstName: "",
prefix: "",
rank: null,
prefixMain: "",
});
const formDataAddress = reactive<RequestregistrationAddressObject>({
@ -257,7 +258,7 @@ async function amiRequest() {
formInformations.nationality = data.value.nationalityDesc;
// dateOfBirth format 1989-01-01
formInformations.birthDate = conventDateOfBirth(`${data.value.dateOfBirth}`);
formInformations.birthDate = data.value.dateOfBirth ? conventDateOfBirth(`${data.value.dateOfBirth}`) : null;
age.value = storeLinkCenter.calculateAge(data.value.age);
formInformations.gender = data.value.genderDesc;
@ -327,15 +328,15 @@ async function convertDistrict(val: string) {
const id = storeLinkCenter.OpsAddress.districtOps.find(
(e: DataOption) => e.name === val
)?.id;
// /
// /
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
return id ? id : null;
}
/**
* งกนแปลงชอแขวง / ตำบล เป ID
* @param val อแขวง / ตำบล
* งกนแปลงชอแขวง/ตำบล เป ID
* @param val อแขวง/ตำบล
*/
async function convertSubdistrict(val: string) {
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(

View file

@ -66,7 +66,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -261,8 +261,8 @@ function closeDialog() {
<q-form ref="myForm">
<div class="col-12 bg-grey-2 q-pa-sm">
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
<div class="q-col-gutter-xs row no-wrap">
<div class="col-4">
<q-toolbar>
<div class="row q-col-gutter-sm">
<q-select
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
@ -279,9 +279,9 @@ function closeDialog() {
use-input
input-debounce="0"
@update:model-value="changeEmployeeClass"
style="width: 250px"
/>
</div>
<div class="col-3">
<q-select
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
@ -298,59 +298,18 @@ function closeDialog() {
use-input
input-debounce="0"
@update:model-value="selectTypeKeyword(typeKeyword)"
style="width: 250px"
/>
</div>
<div class="col" v-if="typeKeyword === 'no'">
<q-input
borderless
outlined
dense
debounce="300"
v-model="Keyword"
placeholder="ตำแหน่งเลขที่"
:rules="[(val:string) => !!val || `${'กรุณากรอก ตำแหน่งเลขที่'}`]"
hide-bottom-space
/>
</div>
<div class="col" v-if="typeKeyword === 'position'">
<q-select
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่ง'}`]"
outlined
dense
v-model="positionKeyword"
emit-value
map-options
:options="options"
option-label="name"
option-value="id"
:label="`${' เลือกตำแหน่ง'}`"
use-input
input-debounce="0"
@filter="filterFn"
behavior="menu"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template></q-select
>
</div>
<q-space />
<q-btn
color="primary"
icon="mdi-magnify"
label="ค้นหา"
@click="clickSearch(employeeClass)"
/>
</div>
</q-toolbar>
</div>
<div class="col-12 q-mt-sm">

View file

@ -47,7 +47,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "fullName",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
headerStyle: "font-size: 14px; min-width: 200px",

View file

@ -215,6 +215,8 @@ async function getData() {
.get(config.API.profileNewGovernmentById(profileId.value, empType.value))
.then(async (res) => {
const data = await res.data.result;
console.log(data);
formMain.ocId = data.org ?? "-"; //
formMain.positionId = data.position ?? "-"; //
formMain.positionLine = data.positionField ?? "-"; //

View file

@ -39,7 +39,7 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const isLeave = defineModel<boolean>("isLeave", {
const isLeave = defineModel<boolean>("isLeave", {
required: true,
});
@ -230,7 +230,7 @@ function openDialogAdd() {
/**
* function fetch อมลรายการว
*/
function fetchData(id: string) {
async function fetchData(id: string) {
showLoader();
http
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
@ -398,7 +398,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
<q-btn-toggle

View file

@ -256,7 +256,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
<q-btn-toggle
@ -366,7 +365,7 @@ onMounted(() => {
flat
round
@click="openDialogEdit(props.row)"
><q-tooltip>แกไข</q-tooltip></q-btn
><q-tooltip>แกไขอม</q-tooltip></q-btn
>
</div>
</div>

View file

@ -82,7 +82,7 @@ const dataLabel = {
religion: "ศาสนา",
bloodGroup: "หมู่เลือด",
phone: "เบอร์โทร",
email: "อีเมล",
email: "อีเมล",
prefix: "คำนำหน้าชื่อ",
rank: "ยศ",
firstName: "ชื่อ",
@ -316,10 +316,11 @@ async function getData() {
function onClickOpenDialog() {
if (!informaData.value) return;
modal.value = true;
id.value = informaData.value.id;
age.value = calculateAge(informaData.value.birthDate);
formData.citizenId = informaData.value.citizenId;
formData.prefix = informaData.value.prefix;
formData.prefix = informaData.value.prefixMain;
formData.rank = informaData.value.rank;
formData.firstName = informaData.value.firstName;
formData.lastName = informaData.value.lastName;

View file

@ -461,7 +461,7 @@ onMounted(async () => {
icon="add"
@click="
() => {
changeNameData.prefix = profileInfo?.prefix;
changeNameData.prefix = profileInfo?.prefixMain;
changeNameData.firstName = profileInfo?.firstName;
changeNameData.lastName = profileInfo?.lastName;
prefixChange = changeNameData.prefix;
@ -496,7 +496,6 @@ onMounted(async () => {
outlined
emit-value
map-options
options-dense
option-value="name"
style="min-width: 140px"

View file

@ -252,7 +252,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
/**
* งกนดงขอมลทอย
*
* งขอมลทอย อมลจงหว อม เขต / อำเภอ และขอม แขวง / ตำบล
* งขอมลทอย อมลจงหว อม เขต / อำเภอ และขอม แขวง/ตำบล
*/
async function getData() {
showLoader();
@ -337,8 +337,8 @@ async function selectDistrict(e: string | null, name: string) {
}
/**
* งกนเลอก แขวง / ตำบล
* @param e แขวง / ตำบล เลอก
* งกนเลอก แขวง/ตำบล
* @param e แขวง/ตำบล เลอก
* @param name 1 อยตามทะเบยนบาน 2 อยจจ
*/
function selectSubDistrict(e: string | null, name: string) {
@ -941,7 +941,6 @@ onMounted(async () => {
map-options
:options="columnsHistory"
option-value="name"
style="min-width: 140px"
/>
</div>

View file

@ -1008,7 +1008,7 @@ onMounted(async () => {
/>
</div>
</div>
<div class="row q-mt-md">
<div class="row">
<div class="q-mr-sm">สถานภาพการม</div>
<div>
<q-radio

View file

@ -15,6 +15,7 @@ interface RequestObject {
relationship?: string | null;
religion?: string | null;
phone?: string | null;
prefixMain: string;
// telephoneNumber: string | null;
}

View file

@ -3,6 +3,7 @@ interface DataType {
posLevels: any;
posTypeName: string;
posTypeRank: number;
posTypeShortName?: string;
}
interface DataLevel {
@ -27,7 +28,7 @@ interface DataPerson {
}
interface DataRequest {
createdAt: string|Date;
createdAt: string | Date;
createdFullName?: string;
detail: string;
fullname: string;
@ -117,6 +118,7 @@ interface DataProfile {
posTypeName: string;
posTypeRank: number;
};
prefixMain: string;
}
interface DataLeave {

View file

@ -32,6 +32,7 @@ interface ResponseObject {
relationship: string | null;
religion: string | null;
telephoneNumber: string | null;
prefixMain: string;
}
interface Religion {
@ -94,6 +95,7 @@ interface PosType {
lastUpdateFullName: string;
posTypeName: string;
posTypeRank: number;
posTypeShortName?: string;
}
export type {

View file

@ -33,16 +33,17 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
]);
function fetchType(data: DataType[]) {
posTypeMain.value = data;
const list: DataOption[] = data.map((e: DataType) => ({
id: e.id,
name: e.posTypeName,
}));
posTypeOps.value = list;
}
function fetchLevel(data: DataLevel[]) {
function fetchLevel(data: DataLevel[], shortName: string = "") {
const list: DataOption[] = data.map((e: DataLevel) => ({
id: e.id,
name: e.posLevelName,
name: `${shortName} ${e.posLevelName} `,
}));
const seen = new Set();
posLevelOps.value = list.filter((item: DataOption) => {

View file

@ -130,7 +130,7 @@ export const useAddressDataStore = defineStore("addess", () => {
}
/**
* /
* /
* @param id /
* @param position ,
*/

View file

@ -243,7 +243,7 @@ export const useDataLinkCenter = defineStore("DataLinkCenter", () => {
}
/**
* /
* /
* @param id /
* @param position ,
*/

View file

@ -349,6 +349,8 @@ async function fetchDataPersonal() {
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then(async (res) => {
formDetail.value = res.data.result;
console.log(formDetail.value);
storeRegistry.isLeave = res.data.result.isLeave;
if (res.data.result.leaveReason) {
@ -956,7 +958,7 @@ onMounted(async () => {
{{ empType === "" ? "ระดับ" : "ระดับชั้นงาน" }}
</div>
<div class="col">
{{ formDetail?.posLevel?.posLevelName || "-" }}
{{ `${ empType === "" ? '': formDetail?.posType?.posTypeShortName } ${formDetail?.posLevel?.posLevelName}` || "-" }}
</div>
</div>
</div>

View file

@ -242,7 +242,10 @@ function selectType() {
*/
function selectPosType(item: DataOption) {
const dataType = store.posTypeMain.find((e: DataType) => e.id === item.id);
store.fetchLevel(dataType?.posLevels);
const shortName =
empType.value === "officer" ? "" : dataType?.posTypeShortName;
store.fetchLevel(dataType?.posLevels, shortName);
store.labelOption.posType = item.name;
store.labelOption.posLevel = "ทั้งหมด";
store.formFilter.page = 1;

View file

@ -13,6 +13,9 @@ const route = useRoute();
const store = useRegistryNewDataStore();
const isIDP = ref<boolean | null>(null);
const isEmployee = ref<boolean>(
route.name?.toString() == "registryNewRequestEditEMP" ? true : false
);
onBeforeMount(async () => {
isIDP.value = await (route.name?.toString() == "registryNewRequestEditEMP"
@ -39,6 +42,7 @@ onMounted(() => {
@click="router.go(-1)"
/>
รายการคำรองขอแกไขทะเบยนประว
{{ `(${isEmployee ? "ลูกจ้างประจำ" : "ข้าราชการ กทม.สามัญ"})` }}
</div>
</div>