diff --git a/src/api/13_salary/api.salary.ts b/src/api/13_salary/api.salary.ts index c99cdd567..cc44168ef 100644 --- a/src/api/13_salary/api.salary.ts +++ b/src/api/13_salary/api.salary.ts @@ -2,6 +2,7 @@ import env from "../index"; const salary = `${env.API_URI}/salary`; const salaryRate = `${env.API_URI}/salary/rate`; const salaryPeriod = `${env.API_URI}/salary/period`; +const salaryPeriodEmp = `${env.API_URI}/salary/period-employee`; const salaryOrg = `${env.API_URI}/org/employee`; const salaryFormula = `${env.API_URI}/salary/formula`; @@ -31,7 +32,8 @@ export default { salaryListPeriodProfileById: (id: string) => `${salaryPeriod}/profile/${id}`, salaryListPerson: `${env.API_URI}/org/profile/salary/gen`, salaryPeriodProfile: `${salary}/period/org/profile`, - + salaryReportListsByid: (type: string, rootId: string, periodId: string) => + `${salary}/report/${type}/${rootId}/${periodId}`, salaryProperty: (id: string) => `${salaryPeriod}/org/property/${id}`, /** รายการเงินเดือนลูกจ้างประจำ*/ @@ -45,13 +47,21 @@ export default { salaryEmployeeRateList: `${salaryRate}/employee`, salaryEmployeeRateListByid: (id: string) => `${salaryRate}/employee/${id}`, - salaryEmployeePosType:()=>`${salaryOrg}/pos/type`, - salaryFormula:()=>`${salaryFormula}`, - salaryFormulaById:(id:string)=>`${salaryFormula}/${id}`, - salaryEmployeePositionType:(key:string)=>`${salaryOrg}/pos/position?keyword=${key}&type=positionType`, - salaryEmployeeActive :()=>`${salary}/employee/active`, + salaryEmployeePosType: () => `${salaryOrg}/pos/type`, + salaryFormula: () => `${salaryFormula}`, + salaryFormulaById: (id: string) => `${salaryFormula}/${id}`, + salaryEmployeePositionType: (key: string) => + `${salaryOrg}/pos/position?keyword=${key}&type=positionType`, + salaryEmployeeActive: () => `${salary}/employee/active`, + salaryPeriodStatus: (type: string, periodId: string, rootId: string) => + `${salaryPeriod}/${type}/approve/${periodId}/${rootId}`, + salaryPeriodStatusComment: (type: string, periodId: string, rootId: string) => + `${salaryPeriod}/${type}/comment/${periodId}/${rootId}`, - salaryPeriodStatus:(type:string,periodId:string,rootId:string)=>`${salaryPeriod}/${type}/approve/${periodId}/${rootId}`, - salaryPeriodStatusComment:(type:string,periodId:string,rootId:string)=>`${salaryPeriod}/${type}/comment/${periodId}/${rootId}` + /** รายการเงินเดือนลูกจ้างประจำ*/ + salaryListPeriodLatestEmp: `${salaryPeriodEmp}/latest`, + salaryListPeriodQuotaEmp: (id: string) => `${salaryPeriodEmp}/quota/${id}`, + salaryListPeriodORGEmp: (id: string) => `${salaryPeriodEmp}/org/${id}`, + salaryPeriodProfileEmp: `${salaryPeriodEmp}/org/profile`, }; diff --git a/src/api/registry/api.registry.ts b/src/api/registry/api.registry.ts index 659f9cf76..da9223ed6 100644 --- a/src/api/registry/api.registry.ts +++ b/src/api/registry/api.registry.ts @@ -27,4 +27,13 @@ export default { `${registryNew}training/${trainingId}`, profileNewTrainingHisByTrainingId: (trainingId: string) => `${registryNew}training/history/${trainingId}`, + +// ประวัติการศึกษา +profileNewEducation: `${registryNew}educations`, +profileNewEducationByProfileId: (profileId: string) => + `${registryNew}educations/${profileId}`, +profileNewEducationByEducationId: (educationId: string) => + `${registryNew}educations/${educationId}`, +profileNewEducationHisByEducationId: (educationsId: string) => + `${registryNew}educations/history/${educationsId}`, }; diff --git a/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue b/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue index 0437dbe27..1d36bb25e 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/02_Train.vue @@ -167,83 +167,19 @@ const pagination = ref({ page: formFilter.page, rowsPerPage: formFilter.pageSize, }); +const historyFormFilter = reactive({ + page: 1, + pageSize: 10, + keyword: "", +}); -const row = [ - { - name: "ชื่อโครงการ", - topic: "ชื่อหัวข้อ", - yearly: "2567", - place: "สถานที่", - duration: "3 ปี", - department: "แผนกสาขา", - numberOrder: "1244", - dateOrder: new Date(), - startDate: new Date(), - endDate: new Date(), - }, - { - name: "ชื่อโครงการ", - topic: "ชื่อหัวข้อ", - yearly: "2567", - place: "สถานที่", - duration: "2567", - department: "แผนกสาขา", - numberOrder: "1244", - dateOrder: new Date(), - startDate: new Date(), - endDate: new Date(), - }, - { - name: "ชื่อโครงการ", - topic: "ชื่อหัวข้อ", - yearly: "2567", - place: "สถานที่", - duration: "2567", - department: "แผนกสาขา", - numberOrder: "1244", - dateOrder: new Date(), - startDate: new Date(), - endDate: new Date(), - }, - { - name: "ชื่อโครงการ", - topic: "ชื่อหัวข้อ", - yearly: "2567", - place: "สถานที่", - duration: "2567", - department: "แผนกสาขา", - numberOrder: "1244", - dateOrder: new Date(), - startDate: new Date(), - endDate: new Date(), - }, - { - name: "ชื่อโครงการ", - topic: "ชื่อหัวข้อ", - yearly: "2567", - place: "สถานที่", - duration: "2567", - department: "แผนกสาขา", - numberOrder: "1244", - dateOrder: new Date(), - startDate: new Date(), - endDate: new Date(), - }, - { - name: "ชื่อโครงการ", - topic: "ชื่อหัวข้อ", - yearly: "2567", - place: "สถานที่", - duration: "2567", - department: "แผนกสาขา", - numberOrder: "1244", - dateOrder: new Date(), - startDate: new Date(), - endDate: new Date(), - }, -]; +const historyPagination = ref({ + page: historyFormFilter.page, + rowsPerPage: historyFormFilter.pageSize, +}); const rows = ref([]); +const historyRows = ref([]); const visibleColumns = ref([ "name", // ชื่อโครงงาน @@ -258,6 +194,19 @@ const visibleColumns = ref([ "endDate", // วันสิ้นสุด ]); +const historyVisibleColumns = ref([ + "name", // ชื่อโครงงาน + "topic", // หัวข้อ + "yearly", // ปีที่อบรม + "place", // สถานที่ + "duration", // รวมระยะวเลา + "department", // หน่วยงานที่รับผิดชอบ + "numberOrder", // เลขที่คำสั่ง + "dateOrder", // คำสั่งลงวันที่ + "startDate", // วันเริ่มต้น + "endDate", // วันสิ้นสุด +]); + function validateForm() { onSubmit(); } @@ -444,6 +393,22 @@ async function fetchData(id: string) { }); } +async function fetchHistoryData(id: string) { + showLoader(); + await http + .get(config.API.profileNewTrainingHisByTrainingId(id)) + .then(async (res) => { + historyRows.value = res.data.result; + console.log(historyRows.value); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + onMounted(async () => { await fetchData(id.value); }); @@ -539,6 +504,7 @@ onMounted(async () => { bordered :paging="true" dense + :filter="formFilter.keyword" :rows-per-page-options="[20, 50, 100]" v-model:pagination="pagination" class="custom-header-table" @@ -600,7 +566,9 @@ onMounted(async () => { round size="14px" icon="mdi-history" - @click="() => (historyDialog = true)" + @click=" + () => (fetchHistoryData(props.row.id), (historyDialog = true)) + " > ประวัติแก้ไขประวัติการศึกษา @@ -1087,7 +1055,7 @@ onMounted(async () => { dense outlined bg-color="white" - v-model="formFilter.keyword" + v-model="historyFormFilter.keyword" label="ค้นหา" class="q-mr-sm" > @@ -1097,7 +1065,7 @@ onMounted(async () => { { -