diff --git a/src/modules/05_placement/components/exams_other/Detail.vue b/src/modules/05_placement/components/exams_other/Detail.vue new file mode 100644 index 000000000..569fd064d --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Detail.vue @@ -0,0 +1,65 @@ + + + + \ No newline at end of file diff --git a/src/modules/05_placement/components/exams_other/DialogFooter.vue b/src/modules/05_placement/components/exams_other/DialogFooter.vue new file mode 100644 index 000000000..9bfa25774 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/DialogFooter.vue @@ -0,0 +1,93 @@ + + diff --git a/src/modules/05_placement/components/exams_other/DialogHeader.vue b/src/modules/05_placement/components/exams_other/DialogHeader.vue new file mode 100644 index 000000000..bf1bff6de --- /dev/null +++ b/src/modules/05_placement/components/exams_other/DialogHeader.vue @@ -0,0 +1,27 @@ + + diff --git a/src/modules/05_placement/components/exams_other/Education.vue b/src/modules/05_placement/components/exams_other/Education.vue new file mode 100644 index 000000000..726596805 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Education.vue @@ -0,0 +1,1381 @@ + + + + diff --git a/src/modules/05_placement/components/exams_other/Information/Address.vue b/src/modules/05_placement/components/exams_other/Information/Address.vue new file mode 100644 index 000000000..9f49214a1 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Information/Address.vue @@ -0,0 +1,834 @@ + + + \ No newline at end of file diff --git a/src/modules/05_placement/components/exams_other/Information/Certicate.vue b/src/modules/05_placement/components/exams_other/Information/Certicate.vue new file mode 100644 index 000000000..41663f571 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Information/Certicate.vue @@ -0,0 +1,828 @@ + + + + diff --git a/src/modules/05_placement/components/exams_other/Information/Information.vue b/src/modules/05_placement/components/exams_other/Information/Information.vue new file mode 100644 index 000000000..2f280eb6c --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Information/Information.vue @@ -0,0 +1,992 @@ + + + \ No newline at end of file diff --git a/src/modules/05_placement/components/exams_other/Information/layout.vue b/src/modules/05_placement/components/exams_other/Information/layout.vue new file mode 100644 index 000000000..6e277187c --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Information/layout.vue @@ -0,0 +1,51 @@ + + + diff --git a/src/modules/05_placement/components/exams_other/Information/top.vue b/src/modules/05_placement/components/exams_other/Information/top.vue new file mode 100644 index 000000000..807a8d143 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Information/top.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/modules/05_placement/components/exams_other/Insignia.vue b/src/modules/05_placement/components/exams_other/Insignia.vue new file mode 100644 index 000000000..e7b8f2624 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Insignia.vue @@ -0,0 +1,1199 @@ + + + diff --git a/src/modules/05_placement/components/exams_korkor/Main.vue b/src/modules/05_placement/components/exams_other/Main.vue similarity index 99% rename from src/modules/05_placement/components/exams_korkor/Main.vue rename to src/modules/05_placement/components/exams_other/Main.vue index 92f8ea3b1..d1627d0e8 100644 --- a/src/modules/05_placement/components/exams_korkor/Main.vue +++ b/src/modules/05_placement/components/exams_other/Main.vue @@ -170,13 +170,8 @@ onMounted(async () => { }) // ดูรายการสอบแข่งขัน หน้าต่อไป -const redirectToPage = (id: number) => { - router.push({ - name: 'placementDetail', - params: { - id: id - } - }); +const redirectToPage = (id?: number) => { + router.push(`/placement2/detail`); }; // เลือกปีงบประมาณ diff --git a/src/modules/05_placement/components/exams_other/Table.vue b/src/modules/05_placement/components/exams_other/Table.vue new file mode 100644 index 000000000..85c5d5443 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/Table.vue @@ -0,0 +1,201 @@ + + + diff --git a/src/modules/05_placement/components/exams_other/profileType.ts b/src/modules/05_placement/components/exams_other/profileType.ts new file mode 100644 index 000000000..9ba368651 --- /dev/null +++ b/src/modules/05_placement/components/exams_other/profileType.ts @@ -0,0 +1,171 @@ +//interface class array object {name string ,id number} + +import type { childrenFamily } from "@/modules/04_registry/interface/response/Family"; +interface ChangeActive { + name: string; + id: number; +} + +//ข้อมูลส่วนตัว +interface Information { + cardid: string | null; + prefix: string | null; + age: string | null; + prefixId: string | null; + firstname: string | null; + lastname: string | null; + birthDate: Date; + genderId: string | null; + bloodId: string | null; + nationality: string | null; + ethnicity: string | null; + statusId: string | null; + religionId: string | null; + tel: string | null; + employeeType: string | null; + employeeClass: string | null; + profileType: string | null; +} + +interface Family { + prefixC: string | null; // couple + prefixIdC: string | null; + firstnameC: string | null; + lastnameC: string | null; + lastnameCOld: string | null; + occupationC: string | null; + prefixM: string | null; // male + prefixIdM: string | null; + firstnameM: string | null; + lastnameM: string | null; + occupationM: string | null; + prefixF: string | null; // female + prefixIdF: string | null; + firstnameF: string | null; + lastnameF: string | null; + occupationF: string | null; + same: string | null; + childrens: childrenFamily[]; +} + +interface Address { + address: string | null; + provinceId: string | null; + districtId: string | null; + subdistrictId: string | null; + addressC: string | null; + provinceIdC: string | null; + districtIdC: string | null; + subdistrictIdC: string | null; + same: string | null; +} + +interface Goverment { + ocId: string | null; + positionId: string | null; + workId: string | null; + typeId: string | null; + levelId: string | null; + numberId: string | null; + businessId: string | null; + containDate: Date; + workDate: Date; + retireDate: string | null; + absent: number | null; + age: number | null; + ageAll: string | null; + reasonSameDate: string | null; +} + +interface DataOption { + id: string | number; + name: string; + zipCode?: string; +} + +interface zipCodeOption { + id: string; + name: string; + zipCode: string; +} + +const defaultGoverment: Goverment = { + ocId: null, + positionId: null, + workId: null, + typeId: null, + levelId: null, + numberId: null, + businessId: null, + containDate: new Date(), + workDate: new Date(), + retireDate: null, + absent: 0, + age: 0, + ageAll: null, + reasonSameDate: null, +}; + +const defaultAddress: Address = { + address: null, + provinceId: null, + districtId: null, + subdistrictId: null, + addressC: null, + provinceIdC: null, + districtIdC: null, + subdistrictIdC: null, + same: "0", +}; + +const defaultInformation: Information = { + cardid: null, + age: null, + prefix: null, + prefixId: null, + firstname: null, + lastname: null, + birthDate: new Date(), + genderId: null, + bloodId: null, + nationality: null, + ethnicity: null, + statusId: null, + religionId: null, + tel: null, + employeeType: null, + employeeClass: null, + profileType: null, +}; + +const defaultFamily: Family = { + prefixC: null, + prefixIdC: null, + firstnameC: null, + lastnameC: null, + lastnameCOld: null, + occupationC: null, + prefixM: null, + prefixIdM: null, + firstnameM: null, + lastnameM: null, + occupationM: null, + prefixF: null, + prefixIdF: null, + firstnameF: null, + lastnameF: null, + occupationF: null, + same: "0", + childrens: [], +}; + +export { defaultInformation, defaultFamily, defaultAddress, defaultGoverment }; +export type { + ChangeActive, + Information, + Family, + Address, + Goverment, + DataOption, + zipCodeOption, +}; diff --git a/src/modules/05_placement/components/exams_sorkorcho/Main.vue b/src/modules/05_placement/components/exams_sorkorcho/Main.vue index 92f8ea3b1..c4a78ea29 100644 --- a/src/modules/05_placement/components/exams_sorkorcho/Main.vue +++ b/src/modules/05_placement/components/exams_sorkorcho/Main.vue @@ -170,13 +170,9 @@ onMounted(async () => { }) // ดูรายการสอบแข่งขัน หน้าต่อไป -const redirectToPage = (id: number) => { - router.push({ - name: 'placementDetail', - params: { - id: id - } - }); +const redirectToPage = (id?: number) => { + // router.push({ name: 'placementDetail'}); + router.push(`/placement/detail`); }; // เลือกปีงบประมาณ diff --git a/src/modules/05_placement/interface/index/Main.ts b/src/modules/05_placement/interface/index/Main.ts index 2ccb6af46..a6df537f6 100644 --- a/src/modules/05_placement/interface/index/Main.ts +++ b/src/modules/05_placement/interface/index/Main.ts @@ -5,8 +5,10 @@ interface DataOption { disable?: boolean; } -interface Pagination { - rowsPerPage: number; +interface DataOptionInsignia { + id: string; + name: string; + typeName: string; } interface EduOps { @@ -14,6 +16,7 @@ interface EduOps { positionPathOptions: DataOption[]; } + interface InformationOps { prefixOps: DataOption[]; genderOps: DataOption[]; @@ -32,6 +35,13 @@ interface AddressOps { subdistrictCOps: zipCodeOption[]; } +interface InsigniaOps { + insigniaOptions: DataOptionInsignia[]; +} + +interface Pagination { + rowsPerPage: number; +} interface treeTab { id: string; @@ -39,4 +49,13 @@ interface treeTab { children: treeTab[]; } -export type { DataOption, treeTab, InformationOps, AddressOps, Pagination, EduOps }; +export type { + DataOption, + DataOptionInsignia, + treeTab, + InformationOps, + AddressOps, + Pagination, + EduOps, + InsigniaOps +}; diff --git a/src/modules/05_placement/interface/request/Address.ts b/src/modules/05_placement/interface/request/Address.ts new file mode 100644 index 000000000..f8cff7753 --- /dev/null +++ b/src/modules/05_placement/interface/request/Address.ts @@ -0,0 +1,55 @@ +interface DataProps { + row: RequestItemsObject; + rowIndex: number; +} + +//ข้อมูล +interface RequestItemsObject { + currentAddress: String | null; + currentDistrictId: String | null; + currentProvinceId: String | null; + currentSubDistrictId: String | null; + currentZipCode: String | null; + registrationAddress: String | null; + registrationDistrictId: String | null; + registrationProvinceId: String | null; + registrationSame: Boolean | null; + registrationSubDistrictId: String | null; + registrationZipCode: String | null; +} + +interface RequestItemsHistoryObject { + currentAddress: String | null; + currentDistrict: String | null; + currentProvince: String | null; + currentSubDistrict: String | null; + currentZipCode: String | null; + registrationAddress: String | null; + registrationDistrict: String | null; + registrationProvince: String | null; + registrationSame: Boolean | null; + registrationSubDistrict: String | null; + registrationZipCode: String | null; + createdFullName: String | null; + createdAt: Date; +} + +//columns +interface Columns { + [index: number]: { + name: String; + align: String; + label: String; + sortable: Boolean; + field: String; + headerStyle: String; + style: String; + }; +} + +export type { + RequestItemsObject, + Columns, + DataProps, + RequestItemsHistoryObject, +}; diff --git a/src/modules/05_placement/interface/request/Certificate.ts b/src/modules/05_placement/interface/request/Certificate.ts new file mode 100644 index 000000000..a1df312c3 --- /dev/null +++ b/src/modules/05_placement/interface/request/Certificate.ts @@ -0,0 +1,31 @@ +interface DataProps { + row: RequestItemsObject; + rowIndex: number; +} + +//ข้อมูล +interface RequestItemsObject { + id: string; + certificateNo: string; + issuer: string; + issueDate: Date; + expireDate: Date; + certificateType: string; + createdFullName: string; + createdAt: Date; +} + +//columns +interface Columns { + [index: number]: { + name: String; + align: String; + label: String; + sortable: Boolean; + field: String; + headerStyle: String; + style: String; + }; +} + +export type { RequestItemsObject, Columns, DataProps }; diff --git a/src/modules/05_placement/interface/request/Education.ts b/src/modules/05_placement/interface/request/Education.ts new file mode 100644 index 000000000..eb0270198 --- /dev/null +++ b/src/modules/05_placement/interface/request/Education.ts @@ -0,0 +1,42 @@ +interface DataProps { + row: RequestItemsObject; + rowIndex: number; +} + +//ข้อมูล +interface RequestItemsObject { + id: string; + level: string; + levelId: string; + positionPath: string; + positionPathId: string; + institute: string; + degree: string; + field: string; + gpa: string; + country: string; + duration: string; + durationYear: number; + other: string; + fundName: string; + finishDate: Date; + startDate: number; + endDate: number; + createdFullName: string; + createdAt: Date; +} + +//columns +interface Columns { + [index: number]: { + name: String; + align: String; + label: String; + sortable: Boolean; + field: String; + headerStyle: String; + style: String; + }; +} + +export type { RequestItemsObject, Columns, DataProps }; diff --git a/src/modules/05_placement/interface/request/Information.ts b/src/modules/05_placement/interface/request/Information.ts new file mode 100644 index 000000000..39aac0621 --- /dev/null +++ b/src/modules/05_placement/interface/request/Information.ts @@ -0,0 +1,59 @@ +interface DataProps { + row: RequestItemsObject; + rowIndex: number; +} + +//ข้อมูล +interface RequestItemsObject { + birthDate: Date | null; + bloodGroupId: string | null; + citizenId: string | null; + firstName: string | null; + genderId: string | null; + lastName: string | null; + nationality: string | null; + prefixId: string | null; + race: string | null; + relationshipId: string | null; + religionId: string | null; + telephoneNumber: string | null; + employeeType: string | null; + employeeClass: string | null; +} + +interface RequestItemsHistoryObject { + citizenId: string | null; + prefix: string | null; + firstName: string | null; + lastName: string | null; + birthDate: Date; + gender: string | null; + relationship: string | null; + bloodGroup: string | null; + nationality: string | null; + race: string | null; + religion: string | null; + telephoneNumber: string | null; + createdFullName: string | null; + createdAt: Date; + employeeType: string | null; + employeeClass: string | null; +} + +//columns +interface Columns { + name: String; + align: String; + label: String; + sortable: Boolean; + field: String; + headerStyle: String; + style: String; +} + +export type { + RequestItemsObject, + Columns, + DataProps, + RequestItemsHistoryObject, +}; diff --git a/src/modules/05_placement/interface/request/Insignia.ts b/src/modules/05_placement/interface/request/Insignia.ts new file mode 100644 index 000000000..8fa100368 --- /dev/null +++ b/src/modules/05_placement/interface/request/Insignia.ts @@ -0,0 +1,38 @@ +interface DataProps { + row: RequestItemsObject; + rowIndex: number; +} + +//ข้อมูล +interface RequestItemsObject { + id: string; + insigniaType: string; + insignia: string; + insigniaId: string; + year: number; + no: string; + issue: string; + volumeNo: string; + volume: string; + section: string; + page: string; + receiveDate: Date; + dateAnnounce: Date; + createdFullName: string; + createdAt: Date; +} + +//columns +interface Columns { + [index: number]: { + name: String; + align: String; + label: String; + sortable: Boolean; + field: String; + headerStyle: String; + style: String; + }; +} + +export type { RequestItemsObject, Columns, DataProps }; diff --git a/src/modules/05_placement/interface/response/Address.ts b/src/modules/05_placement/interface/response/Address.ts new file mode 100644 index 000000000..8769bd1b4 --- /dev/null +++ b/src/modules/05_placement/interface/response/Address.ts @@ -0,0 +1,34 @@ +//ข้อมูล +interface ResponseObject { + currentAddress: string | null; + currentDistrictId: string | null; + currentProvinceId: string | null; + currentSubDistrictId: string | null; + currentZipCode: string | null; + registrationAddress: string | null; + registrationDistrictId: string | null; + registrationProvinceId: string | null; + registrationSame: Boolean | null; + registrationSubDistrictId: string | null; + registrationZipCode: string | null; + createdFullName: string | null; + createdAt: Date; +} + +interface ResponseHistory { + currentAddress: string | null; + currentDistrictId: string | null; + currentProvinceId: string | null; + currentSubDistrictId: string | null; + currentZipCode: string | null; + registrationAddress: string | null; + registrationDistrictId: string | null; + registrationProvinceId: string | null; + registrationSame: string | null; + registrationSubDistrictId: string | null; + registrationZipCode: string | null; + createdFullName: string | null; + createdAt: Date; +} + +export type { ResponseObject, ResponseHistory }; diff --git a/src/modules/05_placement/interface/response/Certificate.ts b/src/modules/05_placement/interface/response/Certificate.ts new file mode 100644 index 000000000..32756682e --- /dev/null +++ b/src/modules/05_placement/interface/response/Certificate.ts @@ -0,0 +1,13 @@ +//ข้อมูล +interface ResponseObject { + id: string; + certificateNo: string; + issuer: string; + issueDate: Date; + expireDate: Date; + certificateType: string; + createdFullName: string; + createdAt: Date; +} + +export type { ResponseObject }; diff --git a/src/modules/05_placement/interface/response/Education.ts b/src/modules/05_placement/interface/response/Education.ts new file mode 100644 index 000000000..7dcd3bdf2 --- /dev/null +++ b/src/modules/05_placement/interface/response/Education.ts @@ -0,0 +1,24 @@ +//ข้อมูล +interface ResponseObject { + id: string; + educationLevel: string; + educationLevelId: string; + positionPath: string; + positionPathId: string; + institute: string; + degree: string; + field: string; + gpa: string; + country: string; + duration: string; + durationYear: number; + other: string; + fundName: string; + finishDate: Date; + startDate: number; + endDate: number; + createdFullName: string; + createdAt: Date; +} + +export type { ResponseObject }; diff --git a/src/modules/05_placement/interface/response/Information.ts b/src/modules/05_placement/interface/response/Information.ts new file mode 100644 index 000000000..ecb93f462 --- /dev/null +++ b/src/modules/05_placement/interface/response/Information.ts @@ -0,0 +1,23 @@ +//ข้อมูล +interface ResponseObject { + birthDate: Date; + bloodGroupId: string | null; + citizenId: string | null; + firstName: string | null; + genderId: string | null; + lastName: string | null; + nationality: string | null; + prefixId: string | null; + race: string | null; + relationshipId: string | null; + religionId: string | null; + telephoneNumber: string | null; + createdFullName: string | null; + createdAt: Date; + age: string | null; + employeeType: string | null; + employeeClass: string | null; + profileType: string | null; +} + +export type { ResponseObject }; diff --git a/src/modules/05_placement/interface/response/Insignia.ts b/src/modules/05_placement/interface/response/Insignia.ts new file mode 100644 index 000000000..d60b4e22d --- /dev/null +++ b/src/modules/05_placement/interface/response/Insignia.ts @@ -0,0 +1,20 @@ +//ข้อมูล +interface ResponseObject { + id: string; + insigniaType: string; + insignia: string; + insigniaId: string; + year: number; + no: string; + issue: string; + volumeNo: string; + volume: string; + section: string; + page: string; + receiveDate: Date; + dateAnnounce: Date; + createdFullName: string; + createdAt: Date; +} + +export type { ResponseObject }; diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 0d6745f2f..b59e6fbaf 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -3,8 +3,10 @@ */ const MainSorkorcho = () => import("@/modules/05_placement/components/exams_sorkorcho/Main.vue"); -const MainSorkorkor = () => import("@/modules/05_placement/components/exams_korkor/Main.vue"); const PlacementDetail = () => import("@/modules/05_placement/components/pass/Detail.vue"); +const MainOther = () => import("@/modules/05_placement/components/exams_other/Main.vue"); +const Placement2Detail = () => import("@/modules/05_placement/components/exams_other/Detail.vue"); + export default [ { @@ -17,10 +19,20 @@ export default [ Role: "placement", }, }, + { + path: "/placement/detail", + name: "placementDetail", + component: PlacementDetail, + meta: { + Auth: true, + Key: [7], + Role: "placement", + }, + }, { path: "/placement2", name: "placement2", - component: MainSorkorkor, + component: MainOther, meta: { Auth: true, Key: [7], @@ -28,19 +40,9 @@ export default [ }, }, { - path: "/placement/detail", - name: "placementDetail", - component: PlacementDetail, - meta: { - Auth: true, - Key: [7], - Role: "placement", - }, - }, - { - path: "/placement/detail", - name: "placementDetail", - component: PlacementDetail, + path: "/placement2/detail", + name: "placement2Detail", + component: Placement2Detail, meta: { Auth: true, Key: [7], diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index cbe54a598..122c3daec 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -1,8 +1,83 @@ import { defineStore } from "pinia"; import { ref } from "vue"; import type { FormPlacementMainData } from "@/modules/05_placement/interface/request/Main" -export const useProfileDataStore = defineStore("placement", () => { - return {}; + +export const useProfileDataStore = defineStore("profile", () => { + interface profile { + main: { columns: String[] }; + education: { columns: String[] }; + certicate: { columns: String[] }; + train: { columns: String[] }; + insignia: { columns: String[] }; + coined: { columns: String[] }; + assessment: { columns: String[] }; + salary: { columns: String[] }; + discipline: { columns: String[] }; + leave: { columns: String[] }; + talent: { columns: String[] }; + work: { columns: String[] }; + record: { columns: String[] }; + other: { columns: String[] }; + document: { columns: String[] }; + } + + const birthDate = ref(new Date()); + const retireText = ref(null); + const changeRetireText = (val: string | null) => { + retireText.value = val; + }; + const changeBirth = (val: Date) => { + birthDate.value = val; + }; + const profileData = ref({ + main: { columns: [] }, + education: { columns: [] }, + certicate: { columns: [] }, + train: { columns: [] }, + insignia: { columns: [] }, + coined: { columns: [] }, + assessment: { columns: [] }, + salary: { columns: [] }, + discipline: { columns: [] }, + leave: { columns: [] }, + talent: { columns: [] }, + work: { columns: [] }, + record: { columns: [] }, + other: { columns: [] }, + document: { columns: [] }, + }); + + const changeProfileColumns = (system: String, val: String[]) => { + if (system == "main") profileData.value.main.columns = val; + if (system == "education") profileData.value.education.columns = val; + if (system == "certicate") profileData.value.certicate.columns = val; + if (system == "train") profileData.value.train.columns = val; + if (system == "insignia") profileData.value.insignia.columns = val; + if (system == "coined") profileData.value.coined.columns = val; + if (system == "assessment") profileData.value.assessment.columns = val; + if (system == "salary") profileData.value.salary.columns = val; + if (system == "discipline") profileData.value.discipline.columns = val; + if (system == "leave") profileData.value.leave.columns = val; + if (system == "talent") profileData.value.talent.columns = val; + if (system == "work") profileData.value.work.columns = val; + if (system == "record") profileData.value.record.columns = val; + if (system == "other") profileData.value.other.columns = val; + if (system == "document") profileData.value.document.columns = val; + localStorage.setItem("profile", JSON.stringify(profileData.value)); + }; + + if (localStorage.getItem("profile") !== null) { + profileData.value = JSON.parse(localStorage.getItem("profile") || "{}"); + } + + return { + profileData, + changeProfileColumns, + birthDate, + changeBirth, + retireText, + changeRetireText, + }; }); export const usePlacementDataStore = defineStore("placement", () => { interface placement {