Merge branch 'nice_dev' into develop
This commit is contained in:
commit
ca7c6db5d8
4 changed files with 102 additions and 55 deletions
|
|
@ -594,19 +594,19 @@ const clickHistory = async () => {
|
|||
rowsHistory.value = [];
|
||||
data.map((e: RequestItemsHistoryObject) => {
|
||||
rowsHistory.value.push({
|
||||
currentAddress: e.currentAddress,
|
||||
currentDistrict: e.currentDistrict,
|
||||
currentProvince: e.currentProvince,
|
||||
currentSubDistrict: e.currentSubDistrict,
|
||||
currentZipCode: e.currentZipCode,
|
||||
currentAddress: e.currentAddress ?? "-",
|
||||
currentDistrict: e.currentDistrict ?? "-",
|
||||
currentProvince: e.currentProvince ?? "-",
|
||||
currentSubDistrict: e.currentSubDistrict ?? "-",
|
||||
currentZipCode: e.currentZipCode ?? "-",
|
||||
registrationSame: e.registrationSame,
|
||||
registrationAddress: e.registrationAddress,
|
||||
registrationDistrict: e.registrationDistrict,
|
||||
registrationProvince: e.registrationProvince,
|
||||
registrationSubDistrict: e.registrationSubDistrict,
|
||||
registrationZipCode: e.registrationZipCode,
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
registrationAddress: e.registrationAddress ?? "-",
|
||||
registrationDistrict: e.registrationDistrict ?? "-",
|
||||
registrationProvince: e.registrationProvince ?? "-",
|
||||
registrationSubDistrict: e.registrationSubDistrict ?? "-",
|
||||
registrationZipCode: e.registrationZipCode ?? "-",
|
||||
createdFullName: e.createdFullName ?? "-",
|
||||
createdAt: new Date(e.createdAt) ?? "-",
|
||||
});
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -467,7 +467,8 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<selector
|
||||
<q-select
|
||||
ref="childrenPrefixIdRef"
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -493,6 +494,7 @@
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
ref="childrenFirstNameRef"
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
|
|
@ -507,6 +509,7 @@
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
ref="childrenLastNameRef"
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
|
|
@ -1603,6 +1606,10 @@ const fetchPrefix = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const childrenPrefixIdRef = ref<any>();
|
||||
const childrenFirstNameRef = ref<any>();
|
||||
const childrenLastNameRef = ref<any>();
|
||||
|
||||
const addChildren = async () => {
|
||||
familyData.value.childrens.push({
|
||||
id: `${familyData.value.childrens.length + 1}`,
|
||||
|
|
@ -1617,6 +1624,22 @@ const addChildren = async () => {
|
|||
familyData.value.childrens.sort(
|
||||
(a: childrenFamily, b: childrenFamily) => Number(b.id) - Number(a.id)
|
||||
);
|
||||
|
||||
if (childrenPrefixIdRef.value) {
|
||||
childrenPrefixIdRef.value.forEach((e: any) => {
|
||||
e.resetValidation();
|
||||
});
|
||||
}
|
||||
if (childrenFirstNameRef.value) {
|
||||
childrenFirstNameRef.value.forEach((e: any) => {
|
||||
e.resetValidation();
|
||||
});
|
||||
}
|
||||
if (childrenLastNameRef.value) {
|
||||
childrenLastNameRef.value.forEach((e: any) => {
|
||||
e.resetValidation();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const deleteChildren = (items: childrenFamily) => {
|
||||
|
|
@ -1637,28 +1660,28 @@ const fetchHistory = async () => {
|
|||
data.map((row: ResponseObject) => {
|
||||
const arrayData: ResponseHistory = {
|
||||
couple: row.couple ? "1" : "0",
|
||||
couplePrefixId: row.couplePrefixId,
|
||||
coupleFirstName: row.coupleFirstName,
|
||||
coupleLastName: row.coupleLastName,
|
||||
coupleLastNameOld: row.coupleLastNameOld,
|
||||
coupleCareer: row.coupleCareer,
|
||||
couplePrefixId: row.couplePrefixId ?? "-",
|
||||
coupleFirstName: row.coupleFirstName ?? "-",
|
||||
coupleLastName: row.coupleLastName ?? "-",
|
||||
coupleLastNameOld: row.coupleLastNameOld ?? "-",
|
||||
coupleCareer: row.coupleCareer ?? "-",
|
||||
coupleLive: row.coupleLive ? "1" : "0",
|
||||
coupleCitizenId: row.coupleCitizenId,
|
||||
fatherPrefixId: row.fatherPrefixId,
|
||||
fatherFirstName: row.fatherFirstName,
|
||||
fatherLastName: row.fatherLastName,
|
||||
fatherCareer: row.fatherCareer,
|
||||
coupleCitizenId: row.coupleCitizenId ?? "-",
|
||||
fatherPrefixId: row.fatherPrefixId ?? "-",
|
||||
fatherFirstName: row.fatherFirstName ?? "-",
|
||||
fatherLastName: row.fatherLastName ?? "-",
|
||||
fatherCareer: row.fatherCareer ?? "-",
|
||||
fatherLive: row.fatherLive ? "1" : "0",
|
||||
fatherCitizenId: row.fatherCitizenId,
|
||||
motherPrefixId: row.motherPrefixId,
|
||||
motherFirstName: row.motherFirstName,
|
||||
motherLastName: row.motherLastName,
|
||||
motherCareer: row.motherCareer,
|
||||
fatherCitizenId: row.fatherCitizenId ?? "-",
|
||||
motherPrefixId: row.motherPrefixId ?? "-",
|
||||
motherFirstName: row.motherFirstName ?? "-",
|
||||
motherLastName: row.motherLastName ?? "-",
|
||||
motherCareer: row.motherCareer ?? "-",
|
||||
motherLive: row.motherLive ? "1" : "0",
|
||||
motherCitizenId: row.motherCitizenId,
|
||||
childrens: row.childrens,
|
||||
createdFullName: row.createdFullName,
|
||||
createdAt: new Date(row.createdAt),
|
||||
motherCitizenId: row.motherCitizenId ?? "-",
|
||||
childrens: row.childrens ?? "-",
|
||||
createdFullName: row.createdFullName ?? "-",
|
||||
createdAt: new Date(row.createdAt) ?? "-",
|
||||
};
|
||||
familyDataHistory.value.push(arrayData);
|
||||
});
|
||||
|
|
@ -1752,7 +1775,7 @@ const fetchData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
// hideLoader();
|
||||
profileStore.isLoad++
|
||||
profileStore.isLoad++;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@
|
|||
"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ date2Thai(col.value) }}
|
||||
{{ col.value }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
|
|
@ -409,7 +409,10 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import HistoryTable from "@/components/TableHistory.vue";
|
||||
import type { RequestItemsHistoryObject } from "@/modules/04_registry/interface/request/Government";
|
||||
import type { ResponseObject } from "@/modules/04_registry/interface/response/Government";
|
||||
import type {
|
||||
ResponseObject,
|
||||
RowHistory,
|
||||
} from "@/modules/04_registry/interface/response/Government";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
|
@ -442,7 +445,7 @@ const { birthDate, retireText } = storeToRefs(profileStore);
|
|||
const edit = ref<boolean>(false);
|
||||
const govermentData = ref<Goverment>(defaultGoverment);
|
||||
const myform = ref<any>();
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rowsHistory = ref<RowHistory[]>([]); //select data history
|
||||
const tittleHistory = ref<string>("ประวัติแก้ไขข้อมูลราชการ"); //
|
||||
const filterHistory = ref<string>(""); //search data table history
|
||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||
|
|
@ -784,24 +787,24 @@ const clickHistory = async () => {
|
|||
rowsHistory.value = [];
|
||||
data.map((e: RequestItemsHistoryObject) => {
|
||||
rowsHistory.value.push({
|
||||
oc: e.oc,
|
||||
position: e.position,
|
||||
positionPathSide: e.positionPathSide,
|
||||
posNo: e.posNo,
|
||||
positionLine: e.positionLine,
|
||||
positionType: e.positionType,
|
||||
positionLevel: e.positionLevel,
|
||||
positionExecutive: e.positionExecutive,
|
||||
positionExecutiveSide: e.positionExecutiveSide,
|
||||
dateAppoint: new Date(e.dateAppoint),
|
||||
dateStart: new Date(e.dateStart),
|
||||
retireDate: e.retireDate,
|
||||
govAge: e.govAge,
|
||||
govAgeAbsent: e.govAgeAbsent,
|
||||
govAgePlus: e.govAgePlus,
|
||||
reasonSameDate: e.reasonSameDate,
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
oc: e.oc ?? "-",
|
||||
position: e.position ?? "-",
|
||||
positionPathSide: e.positionPathSide ?? "-",
|
||||
posNo: e.posNo ?? "-",
|
||||
positionLine: e.positionLine ?? "-",
|
||||
positionType: e.positionType ?? "-",
|
||||
positionLevel: e.positionLevel ?? "-",
|
||||
positionExecutive: e.positionExecutive ?? "-",
|
||||
positionExecutiveSide: e.positionExecutiveSide ?? "-",
|
||||
dateAppoint: date2Thai(e.dateAppoint) ?? "-",
|
||||
dateStart: date2Thai(e.dateStart) ?? "-",
|
||||
retireDate: e.retireDate ?? "-",
|
||||
govAge: e.govAge ?? "-",
|
||||
govAgeAbsent: e.govAgeAbsent ?? "-",
|
||||
govAgePlus: e.govAgePlus ?? "-",
|
||||
reasonSameDate: e.reasonSameDate ?? "-",
|
||||
createdFullName: e.createdFullName ?? "-",
|
||||
createdAt: date2Thai(e.createdAt) ?? "-",
|
||||
});
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -20,4 +20,25 @@ interface ResponseObject {
|
|||
reasonSameDate: string | null;
|
||||
}
|
||||
|
||||
export type { ResponseObject };
|
||||
interface RowHistory {
|
||||
oc: string | null;
|
||||
position: string | null;
|
||||
positionPathSide: string | null;
|
||||
posNo: string | null;
|
||||
positionLine: string | null;
|
||||
positionType: string | null;
|
||||
positionLevel: string | null;
|
||||
positionExecutive: string | null;
|
||||
positionExecutiveSide: string | null;
|
||||
dateAppoint: string | null;
|
||||
dateStart: string | null;
|
||||
retireDate: string | null;
|
||||
govAge: string | null;
|
||||
govAgeAbsent: string | null;
|
||||
govAgePlus: string | null;
|
||||
reasonSameDate: string | null;
|
||||
createdFullName: string | null;
|
||||
createdAt: string | null;
|
||||
}
|
||||
|
||||
export type { ResponseObject, RowHistory };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue