From 2a0760997c2e6701dfba6f62810c165963bd9dfe Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 9 Jul 2024 10:00:49 +0700 Subject: [PATCH 01/10] fixing kpi toString --- src/modules/14_KPI/components/Tab/04_Result.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/14_KPI/components/Tab/04_Result.vue b/src/modules/14_KPI/components/Tab/04_Result.vue index 6c87c0b0e..ebe047324 100644 --- a/src/modules/14_KPI/components/Tab/04_Result.vue +++ b/src/modules/14_KPI/components/Tab/04_Result.vue @@ -171,11 +171,17 @@ function getData() { developmentMethod.value = data.developEvaluator; developmentPeriod.value = data.timeEvaluator; evaluatorComment.value = data.reasonEvaluator; - superiorCommentCheck.value = data.isReasonCommander.toString(); + superiorCommentCheck.value = + data.isReasonCommander != null + ? data.isReasonCommander.toString() + : null; superiorComment.value = data.reasonCommander; - additionalSuperiorCheck.value = data.isReasonCommanderHigh.toString(); + additionalSuperiorCheck.value = + data.isReasonCommanderHigh != null + ? data.isReasonCommanderHigh.toString() + : null; additionalSuperiorComment.value = data.reasonCommanderHigh; result1.value = data.totalPoint1; result2.value = data.totalPoint2_1 + data.totalPoint2_2; From 81135ab9d5b71d76e4affd98d01dc974c2656fca Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 9 Jul 2024 10:07:37 +0700 Subject: [PATCH 02/10] build to .me --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 096fab0e2..b913841df 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,8 +9,8 @@ env: REGISTRY: docker.frappet.com IMAGE_NAME: ehr/bma-ehr-app DEPLOY_HOST: frappet.com - COMPOSE_PATH: /home/frappet/docker/bma-ehr - # COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr + # COMPOSE_PATH: /home/frappet/docker/bma-ehr + COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr jobs: # act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=latest -s DOCKER_USER=kittapath@frappet.com -s DOCKER_PASS=P@ssw0rd -s SSH_PASSWORD=FPTadmin2357 release-test: From 8fec24c9101af2544ebc13a271d5444c4e5d0268 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 9 Jul 2024 10:10:36 +0700 Subject: [PATCH 03/10] back --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b913841df..096fab0e2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,8 +9,8 @@ env: REGISTRY: docker.frappet.com IMAGE_NAME: ehr/bma-ehr-app DEPLOY_HOST: frappet.com - # COMPOSE_PATH: /home/frappet/docker/bma-ehr - COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr + COMPOSE_PATH: /home/frappet/docker/bma-ehr + # COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr jobs: # act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=latest -s DOCKER_USER=kittapath@frappet.com -s DOCKER_PASS=P@ssw0rd -s SSH_PASSWORD=FPTadmin2357 release-test: From 8ef9c5d7bc795552f766fb4245d1d7a76ffa51d9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 9 Jul 2024 10:17:37 +0700 Subject: [PATCH 04/10] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=96=E0=B8=B7=E0=B8=AD=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=AD=E0=B8=87=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogHistory.vue | 329 +++++++++--------- .../interface/response/History.ts | 23 ++ 2 files changed, 196 insertions(+), 156 deletions(-) create mode 100644 src/modules/04_registryNew/interface/response/History.ts diff --git a/src/modules/04_registryNew/components/DialogHistory.vue b/src/modules/04_registryNew/components/DialogHistory.vue index 1879c65e4..7ad3d49fa 100644 --- a/src/modules/04_registryNew/components/DialogHistory.vue +++ b/src/modules/04_registryNew/components/DialogHistory.vue @@ -5,23 +5,43 @@ import { useRouter } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; -/** importType*/ -import type { DataOption } from "@/modules/04_registryNew/interface/index/Main"; +/** + * importType* + */ +import type { QTableProps } from "quasar"; import type { QForm } from "quasar"; +import type { DataOption } from "@/modules/04_registryNew/interface/index/Main"; +import type { + HistoryPos, + Position, +} from "@/modules/04_registryNew/interface/response/History"; -/** importStore*/ +/** + * import components + */ +import DialogHeader from "@/components/DialogHeader.vue"; + +/** + * importStore + */ import { useCounterMixin } from "@/stores/mixin"; -/** use*/ +/** + * use + */ const myForm = ref(); const router = useRouter(); const $q = useQuasar(); -const { showLoader, hideLoader, messageError, date2Thai, dialogMessageNotify } = - useCounterMixin(); +const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin(); -/**props*/ +/** + * props + */ const modal = defineModel("modal", { required: true }); +/** + * ตัวแปร + */ const employeeClass = ref(""); const typeKeyword = ref(""); const Keyword = ref(""); @@ -35,7 +55,12 @@ const typeKeywordOps = ref([ { id: "position", name: "ตำแหน่ง" }, ]); const positionOps = ref([]); -const columns = ref([ +const options = ref([]); + +/** + * Table + */ +const columns = ref([ { name: "no", label: "ลำดับ", @@ -81,18 +106,26 @@ const columns = ref([ align: "left", label: "วันที่ถือครอง", field: "date", + format: (val, row) => `${date2Thai(val)}`, headerStyle: "font-size: 14px", style: "font-size: 14px", }, ]); -const rows = ref([]); +const rows = ref([]); +/** + * function fetch ข้อมูลตำแหน่ง ข้าราชการ + */ function fecthPositionOfficer() { http .get(config.API.listPositionPathHistory) .then((res) => { let data = res.data.result.items; - positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name })); + + positionOps.value = data.map((e: Position) => ({ + id: e.id, + name: e.name, + })); options.value = positionOps.value; }) .catch((err) => { @@ -100,12 +133,20 @@ function fecthPositionOfficer() { }); } +/** + * function fetch ข้อมูลตำแหน่ง ลูกจ้างประจำ + */ function fetchPositionPerm() { http .get(config.API.listPositionEmployeePositionHistory) .then((res) => { let data = res.data.result.items; - positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name })); + console.log(data); + + positionOps.value = data.map((e: Position) => ({ + id: e.id, + name: e.name, + })); options.value = positionOps.value; }) .catch((err) => { @@ -113,12 +154,20 @@ function fetchPositionPerm() { }); } +/** + * function เปลี่ยนประเภท + */ function changeEmployeeClass() { typeKeyword.value = ""; Keyword.value = ""; positionKeyword.value = ""; rows.value = []; } + +/** + * function เลือกฟิลด์ที่จะค้นหา + * @param typeKeyword ประเภทฟิลด์ + */ function selectTypeKeyword(typeKeyword: string) { positionOps.value = []; positionKeyword.value = ""; @@ -131,6 +180,10 @@ function selectTypeKeyword(typeKeyword: string) { } } +/** + * function ค้นหาประวัติถือครองตำแหน่ง + * @param type ประเภทข่าราชการ + */ function clickSearch(type: string) { myForm.value!.validate().then((result: boolean) => { if (result) { @@ -151,16 +204,15 @@ function clickSearch(type: string) { .then((res) => { let data = res.data.result; if (data.length !== 0) { - rows.value = data.map((e: any) => ({ + rows.value = data.map((e: HistoryPos) => ({ id: e.id, citizenId: e.citizenId, name: e.fullName, posNo: e.posNo, position: e.position, - date: date2Thai(e.date), + date: e.date, })); } else { - dialogMessageNotify($q, "ไม่มีข้อมูลที่ต้องการค้นหา"); rows.value = []; } }) @@ -174,8 +226,13 @@ function clickSearch(type: string) { } }); } -const options = ref([]); -function filterFn(val: string, update: any) { + +/** + * function ค้นหาข่อมูล Optiion + * @param val คำค้นหา + * @param update function + */ +function filterFn(val: string, update: Function) { if (val === "") { update(() => { options.value = positionOps.value; @@ -189,6 +246,11 @@ function filterFn(val: string, update: any) { }); } } + +/** + * function redirect ไปทะเบียนประวัติ + * @param id + */ function clickRedirect(id: string) { const url = employeeClass.value === "officer" @@ -197,42 +259,32 @@ function clickRedirect(id: string) { router.push(`${url}/${id}`); } -const paging = ref(true); -const pagination = ref({ - sortBy: "order", - descending: false, - page: 1, - rowsPerPage: 10, -}); -const paginationLabel = (start: number, end: number, total: number) => { - if (paging.value == true) return " " + start + "-" + end + " ใน " + total; - else return start + "-" + end + " ใน " + total; -}; +/** + * function ปิด popup + */ +function closeDialog() { + modal.value = false; + employeeClass.value = ""; + typeKeyword.value = ""; + Keyword.value = ""; + positionKeyword.value = ""; + rows.value = []; +} - -
- -
+ + + + - - - + -
- - - - - -
- - +
+ + + + +
+ + - + diff --git a/src/modules/04_registryNew/interface/response/History.ts b/src/modules/04_registryNew/interface/response/History.ts new file mode 100644 index 000000000..75669ae59 --- /dev/null +++ b/src/modules/04_registryNew/interface/response/History.ts @@ -0,0 +1,23 @@ +interface HistoryPos { + citizenId: string; + date: string | Date; + fullName: string; + id: string; + posNo: string; + position: string; +} + +interface Position { + createdAt: string; + createdFullName: string; + createdUserId: string; + id: string; + isActive: boolean; + lastUpdateFullName: string; + lastUpdateUserId: ""; + lastUpdatedAt: string; + name: string; + note: string; +} + +export type { HistoryPos, Position }; From bb6afbb98ef0c8babbf793597b4c607d98b733f7 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 9 Jul 2024 10:39:49 +0700 Subject: [PATCH 05/10] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=82?= =?UTF-8?q?=E0=B8=84=E0=B9=89=E0=B8=94=E0=B8=95=E0=B8=B2=E0=B8=A1=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 20 +-- .../components/salaryNew/Salary.vue | 168 +++++++++--------- .../components/probation/FormAssign.vue | 45 +++-- .../components/EditEmployee/Salary.vue | 128 +++++++------ .../10_order/components/step/step01.vue | 2 + .../Tab/Dialog/01_FormIndicator.vue | 2 + .../components/Tab/Topic/02_Competency.vue | 2 +- .../components/FollowResult.vue | 33 ++-- .../15_development/components/MainTab.vue | 2 +- .../15_development/components/Other.vue | 3 +- .../components/ProjectDetail.vue | 77 +++++++- .../15_development/components/Target.vue | 93 +++++----- 12 files changed, 323 insertions(+), 252 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index b29b5fb3d..c83ba8b29 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -11,31 +11,31 @@ export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL; const config = ref({ development: { // API_URI: "http://localhost:13001/api/v1", - API_URI: "https://bma-ehr.frappet.synology.me/api/v1", + API_URI: "https://bma-ehr.frappet.com/api/v1", // API_URI_ORG_SERVICE: "https://localhost:7056/api/v1", //ใช้ชั่วคราว - API_URI_ORG_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว + API_URI_ORG_SERVICE: "https://bma-ehr.frappet.com/api/v1", //ใช้ชั่วคราว // API_URI_ORG_EMPLOYEE_SERVICE: "https://localhost:7208/api/v1", //ใช้ชั่วคราว - API_URI_ORG_EMPLOYEE_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว + API_URI_ORG_EMPLOYEE_SERVICE: "https://bma-ehr.frappet.com/api/v1", //ใช้ชั่วคราว // API_URI_PROFILE_SERVICE: "https://localhost:7159/api/v1", - API_URI_PROFILE_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว + API_URI_PROFILE_SERVICE: "https://bma-ehr.frappet.com/api/v1", //ใช้ชั่วคราว // API_CANDIDATE_URI: "https://localhost:7007/api/v1", - API_CANDIDATE_URI: "https://bma-ehr.frappet.synology.me/api/v1", + API_CANDIDATE_URI: "https://bma-ehr.frappet.com/api/v1", // API_REPORT_URI: "https://localhost:7187/api/v1", - API_REPORT_URI: "https://bma-ehr.frappet.synology.me/api/v1", + API_REPORT_URI: "https://bma-ehr.frappet.com/api/v1", // API_PLACEMENT_URI: "https://localhost:7260/api", - API_PLACEMENT_URI: "https://bma-ehr.frappet.synology.me/api/v1", + API_PLACEMENT_URI: "https://bma-ehr.frappet.com/api/v1", API_URI_ORG_TREE: "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json", MEET_URI: "meet.frappet.com", - API_RETIREMENT_URI: "https://bma-ehr.frappet.synology.me/api/v1", + API_RETIREMENT_URI: "https://bma-ehr.frappet.com/api/v1", // API_PROBATION_URI: "https://ehr.joolsoft.com/v1", - API_PROBATION_URI: "https://bma-ehr.frappet.synology.me/api/v1/probation", + API_PROBATION_URI: "https://bma-ehr.frappet.com/api/v1/probation", // API_PROBATION_URI: "http://192.168.1.151:7776/v1", API_REPORT2_URI: "https://bma-ehr.frappet.synology.me/api/v2", LINK_EVALUATE_PUBLISH: "https://bma-ehr-publish.frappet.synology.me", API_REPORT_TEMPLATE_URI: "https://report-server.frappet.synology.me/api/v1/report-template", - API_SUPPORT_URI: "https://bma-ehr.frappet.synology.me/api/v1/support", + API_SUPPORT_URI: "https://bma-ehr.frappet.com/api/v1/support", }, test: { API_URI: "http://localhost:5010/api/v1", diff --git a/src/modules/04_registry/components/salaryNew/Salary.vue b/src/modules/04_registry/components/salaryNew/Salary.vue index 608fbddef..7006e7f5b 100644 --- a/src/modules/04_registry/components/salaryNew/Salary.vue +++ b/src/modules/04_registry/components/salaryNew/Salary.vue @@ -1706,52 +1706,50 @@ const fetchData = async () => { .then((res) => { let data = res.data.result; rows.value = []; - data.map((e: any) => { - rows.value.push({ - id: e.id, - date: new Date(e.date), - amount: e.amount, - positionSalaryAmount: e.positionSalaryAmount, - mouthSalaryAmount: e.mouthSalaryAmount, - oc: e.oc, - ocId: e.ocId, - position: e.position, - positionName: e.positionName, - positionId: - e.positionId !== "00000000-0000-0000-0000-000000000000" - ? e.positionId - : "", - posNo: e.posNo, - posNoId: - e.posNoId !== "00000000-0000-0000-0000-000000000000" - ? e.posNoId - : "", - positionLine: e.positionLine, - positionLineName: e.positionLineName, - positionLineId: e.positionLineId, - positionPathSide: e.positionPathSide, - positionPathSideId: e.positionPathSideId, - positionPathSideName: e.positionPathSideName, - positionType: e.positionType, - positionTypeId: e.positionTypeId, - positionLevelId: e.positionLevelId, - positionLevel: e.positionLevel, - positionExecutive: e.positionExecutive, - positionExecutiveId: e.positionExecutiveId, - positionExecutiveName: e.positionExecutiveName, - positionExecutiveSide: e.positionExecutiveSide, - positionExecutiveSideId: e.positionExecutiveSideId, - salaryClass: e.salaryClass, - salaryRef: e.salaryRef, - salaryStatus: e.salaryStatus, - refCommandNo: e.refCommandNo, - createdFullName: e.createdFullName, - orgName: e.orgName, - agencyName: e.agencyName, - cLevel: e.cLevel, - createdAt: new Date(e.createdAt), - }); - }); + rows.value = data.map((e: any) => ({ + id: e.id, + date: new Date(e.date), + amount: e.amount, + positionSalaryAmount: e.positionSalaryAmount, + mouthSalaryAmount: e.mouthSalaryAmount, + oc: e.oc, + ocId: e.ocId, + position: e.position, + positionName: e.positionName, + positionId: + e.positionId !== "00000000-0000-0000-0000-000000000000" + ? e.positionId + : "", + posNo: e.posNo, + posNoId: + e.posNoId !== "00000000-0000-0000-0000-000000000000" + ? e.posNoId + : "", + positionLine: e.positionLine, + positionLineName: e.positionLineName, + positionLineId: e.positionLineId, + positionPathSide: e.positionPathSide, + positionPathSideId: e.positionPathSideId, + positionPathSideName: e.positionPathSideName, + positionType: e.positionType, + positionTypeId: e.positionTypeId, + positionLevelId: e.positionLevelId, + positionLevel: e.positionLevel, + positionExecutive: e.positionExecutive, + positionExecutiveId: e.positionExecutiveId, + positionExecutiveName: e.positionExecutiveName, + positionExecutiveSide: e.positionExecutiveSide, + positionExecutiveSideId: e.positionExecutiveSideId, + salaryClass: e.salaryClass, + salaryRef: e.salaryRef, + salaryStatus: e.salaryStatus, + refCommandNo: e.refCommandNo, + createdFullName: e.createdFullName, + orgName: e.orgName, + agencyName: e.agencyName, + cLevel: e.cLevel, + createdAt: new Date(e.createdAt), + })); }) .catch((e) => { messageError($q, e); @@ -2257,46 +2255,44 @@ const clickHistory = async (row: RequestItemsObject) => { .then((res) => { let data = res.data.result; rowsHistory.value = []; - data.map((e: any) => { - rowsHistory.value.push({ - id: e.id, - date: new Date(e.date), - amount: e.amount, - positionSalaryAmount: e.positionSalaryAmount, - mouthSalaryAmount: e.mouthSalaryAmount, - oc: e.oc, - ocId: e.ocId, - position: e.position, - positionId: e.positionId, - positionName: e.positionName, - posNo: e.posNo, - posNoId: e.posNoId, - positionLine: e.positionLine, - positionLineName: e.positionLineName, - positionLineId: e.positionLineId, - positionPathSide: e.positionPathSide, - positionPathSideId: e.positionPathSideId, - positionPathSideName: e.positionPathSideName, - positionType: e.positionType, - positionTypeId: e.positionTypeId, - positionLevel: e.positionLevel, - positionLevelId: e.positionLevelId, - positionExecutive: e.positionExecutive, - positionExecutiveId: e.positionExecutiveId, - positionExecutiveName: e.positionExecutiveName, - positionExecutiveSide: e.positionExecutiveSide, - positionExecutiveSideId: e.positionExecutiveSideId, - salaryClass: e.salaryClass, - salaryStatus: e.salaryStatus, - salaryRef: e.salaryRef, - refCommandNo: e.refCommandNo, - createdFullName: e.createdFullName, - orgName: e.orgName, - agencyName: e.agencyName, - cLevel: e.cLevel, - createdAt: new Date(e.createdAt), - }); - }); + rowsHistory.value = data.map((e: any) => ({ + id: e.id, + date: new Date(e.date), + amount: e.amount, + positionSalaryAmount: e.positionSalaryAmount, + mouthSalaryAmount: e.mouthSalaryAmount, + oc: e.oc, + ocId: e.ocId, + position: e.position, + positionId: e.positionId, + positionName: e.positionName, + posNo: e.posNo, + posNoId: e.posNoId, + positionLine: e.positionLine, + positionLineName: e.positionLineName, + positionLineId: e.positionLineId, + positionPathSide: e.positionPathSide, + positionPathSideId: e.positionPathSideId, + positionPathSideName: e.positionPathSideName, + positionType: e.positionType, + positionTypeId: e.positionTypeId, + positionLevel: e.positionLevel, + positionLevelId: e.positionLevelId, + positionExecutive: e.positionExecutive, + positionExecutiveId: e.positionExecutiveId, + positionExecutiveName: e.positionExecutiveName, + positionExecutiveSide: e.positionExecutiveSide, + positionExecutiveSideId: e.positionExecutiveSideId, + salaryClass: e.salaryClass, + salaryStatus: e.salaryStatus, + salaryRef: e.salaryRef, + refCommandNo: e.refCommandNo, + createdFullName: e.createdFullName, + orgName: e.orgName, + agencyName: e.agencyName, + cLevel: e.cLevel, + createdAt: new Date(e.createdAt), + })); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index adc2cba5d..c3d6187b8 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -299,6 +299,8 @@ function deleteProductivitys(item: number) { } } + + /** get ข้อมูล */ async function getUser() { await http @@ -980,17 +982,18 @@ watch(knowledge.value, () => { * @param update fn */ function filterFnCaretaker(val: string, update: any) { + const dataFilter = filtermantor(OPcaretaker.value, [caretaker2.value]).filter( + (i: any) => i.id !== chairman.value.id + ); if (val == "") { update(() => { - optionCaretaker.value = filtermantor(OPcaretaker.value, [ - caretaker2.value, - ]); + optionCaretaker.value = dataFilter; }); } else { update(() => { - optionCaretaker.value = filtermantor(OPcaretaker.value, [ - caretaker2.value, - ]).filter((e: any) => e.name.search(val) !== -1); + optionCaretaker.value = dataFilter.filter( + (e: any) => e.name.search(val) !== -1 + ); }); } } @@ -1002,17 +1005,18 @@ function filterFnCaretaker(val: string, update: any) { */ function filterFnCaretaker2(val: string, update: any) { + const dataFilter = filtermantor(OPcaretaker.value, [caretaker1.value]).filter( + (i: any) => i.id !== chairman.value.id + ); if (val == "") { update(() => { - optionCaretaker2.value = filtermantor(OPcaretaker.value, [ - caretaker1.value, - ]); + optionCaretaker2.value = dataFilter; }); } else { update(() => { - optionCaretaker2.value = filtermantor(OPcaretaker.value, [ - caretaker1.value, - ]).filter((e: any) => e.name.search(val) !== -1); + optionCaretaker2.value = dataFilter.filter( + (e: any) => e.name.search(val) !== -1 + ); }); } } @@ -1024,13 +1028,16 @@ function filterFnCaretaker2(val: string, update: any) { */ function filterFnCommander(val: string, update: any) { + const dataFilter = OPcommander.value.filter( + (i: any) => i.id !== chairman.value.id + ); if (val == "") { update(() => { - OPcommanderFn.value = OPcommander.value; + OPcommanderFn.value = dataFilter; }); } else { update(() => { - OPcommanderFn.value = OPcommander.value.filter( + OPcommanderFn.value = dataFilter.filter( (e: any) => e.name.search(val) !== -1 ); }); @@ -1044,13 +1051,19 @@ function filterFnCommander(val: string, update: any) { */ function filterFnChairman(val: string, update: any) { + const dataFilter = OPchairman.value.filter( + (i: any) => + i.id !== caretaker1.value.id && + i.id !== caretaker2.value.id && + i.id !== commander.value.id + ); if (val == "") { update(() => { - OPchairmanFn.value = OPchairman.value; + OPchairmanFn.value = dataFilter; }); } else { update(() => { - OPchairmanFn.value = OPchairman.value.filter( + OPchairmanFn.value = dataFilter.filter( (e: any) => e.name.search(val) !== -1 ); }); diff --git a/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue b/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue index 07deb7ae4..e04767679 100644 --- a/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue +++ b/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue @@ -972,39 +972,37 @@ const fetchData = async () => { .then((res) => { let data = res.data.result; rows.value = []; - data.map((e: ResponseObject) => { - rows.value.push({ - id: e.id, - date: new Date(e.date), - amount: e.amount, - positionSalaryAmount: e.positionSalaryAmount, - mouthSalaryAmount: e.mouthSalaryAmount, - oc: e.oc, - ocId: e.ocId, - position: e.position, - positionId: e.positionId, - posNo: e.posNo, - posNoId: e.posNoId, - positionLine: e.positionLine, - positionLineId: e.positionLineId, - positionPathSide: e.positionPathSide, - positionPathSideId: e.positionPathSideId, - positionType: e.positionType, - positionTypeId: e.positionTypeId, - positionLevel: e.positionLevel, - positionLevelId: e.positionLevelId, - positionExecutive: e.positionExecutive, - positionExecutiveId: e.positionExecutiveId, - positionExecutiveSide: e.positionExecutiveSide, - positionExecutiveSideId: e.positionExecutiveSideId, - salaryClass: e.salaryClass, - salaryRef: e.salaryRef, - salaryStatus: e.salaryStatus, - refCommandNo: e.refCommandNo, - createdFullName: e.createdFullName, - createdAt: new Date(e.createdAt), - }); - }); + rows.value = data.map((e: ResponseObject) => ({ + id: e.id, + date: new Date(e.date), + amount: e.amount, + positionSalaryAmount: e.positionSalaryAmount, + mouthSalaryAmount: e.mouthSalaryAmount, + oc: e.oc, + ocId: e.ocId, + position: e.position, + positionId: e.positionId, + posNo: e.posNo, + posNoId: e.posNoId, + positionLine: e.positionLine, + positionLineId: e.positionLineId, + positionPathSide: e.positionPathSide, + positionPathSideId: e.positionPathSideId, + positionType: e.positionType, + positionTypeId: e.positionTypeId, + positionLevel: e.positionLevel, + positionLevelId: e.positionLevelId, + positionExecutive: e.positionExecutive, + positionExecutiveId: e.positionExecutiveId, + positionExecutiveSide: e.positionExecutiveSide, + positionExecutiveSideId: e.positionExecutiveSideId, + salaryClass: e.salaryClass, + salaryRef: e.salaryRef, + salaryStatus: e.salaryStatus, + refCommandNo: e.refCommandNo, + createdFullName: e.createdFullName, + createdAt: new Date(e.createdAt), + })); }) .catch((e) => { messageError($q, e); @@ -1450,39 +1448,37 @@ const clickHistory = async (row: RequestItemsObject) => { .then((res) => { let data = res.data.result; rowsHistory.value = []; - data.map((e: ResponseObject) => { - rowsHistory.value.push({ - id: e.id, - date: new Date(e.date), - amount: e.amount, - positionSalaryAmount: e.positionSalaryAmount, - mouthSalaryAmount: e.mouthSalaryAmount, - oc: e.oc, - ocId: e.ocId, - position: e.position, - positionId: e.positionId, - posNo: e.posNo, - posNoId: e.posNoId, - positionLine: e.positionLine, - positionLineId: e.positionLineId, - positionPathSide: e.positionPathSide, - positionPathSideId: e.positionPathSideId, - positionType: e.positionType, - positionTypeId: e.positionTypeId, - positionLevel: e.positionLevel, - positionLevelId: e.positionLevelId, - positionExecutive: e.positionExecutive, - positionExecutiveId: e.positionExecutiveId, - positionExecutiveSide: e.positionExecutiveSide, - positionExecutiveSideId: e.positionExecutiveSideId, - salaryClass: e.salaryClass, - salaryRef: e.salaryRef, - refCommandNo: e.refCommandNo, - salaryStatus: e.salaryStatus, - createdFullName: e.createdFullName, - createdAt: new Date(e.createdAt), - }); - }); + rowsHistory.value = data.map((e: ResponseObject) => ({ + id: e.id, + date: new Date(e.date), + amount: e.amount, + positionSalaryAmount: e.positionSalaryAmount, + mouthSalaryAmount: e.mouthSalaryAmount, + oc: e.oc, + ocId: e.ocId, + position: e.position, + positionId: e.positionId, + posNo: e.posNo, + posNoId: e.posNoId, + positionLine: e.positionLine, + positionLineId: e.positionLineId, + positionPathSide: e.positionPathSide, + positionPathSideId: e.positionPathSideId, + positionType: e.positionType, + positionTypeId: e.positionTypeId, + positionLevel: e.positionLevel, + positionLevelId: e.positionLevelId, + positionExecutive: e.positionExecutive, + positionExecutiveId: e.positionExecutiveId, + positionExecutiveSide: e.positionExecutiveSide, + positionExecutiveSideId: e.positionExecutiveSideId, + salaryClass: e.salaryClass, + salaryRef: e.salaryRef, + refCommandNo: e.refCommandNo, + salaryStatus: e.salaryStatus, + createdFullName: e.createdFullName, + createdAt: new Date(e.createdAt), + })); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/10_order/components/step/step01.vue b/src/modules/10_order/components/step/step01.vue index f06b8cbe3..e06d50818 100644 --- a/src/modules/10_order/components/step/step01.vue +++ b/src/modules/10_order/components/step/step01.vue @@ -899,6 +899,7 @@ const getClass = (val: boolean) => { :rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]" :label="`${'พ.ศ.'}`" dense + hide-bottom-space outlined > @@ -927,6 +928,7 @@ const getClass = (val: boolean) => { :class="getClass(true)" outlined dense + hide-bottom-space class="full-width datepicker" :model-value=" dateCommand != null ? date2Thai(dateCommand) : null diff --git a/src/modules/14_KPI/components/Tab/Dialog/01_FormIndicator.vue b/src/modules/14_KPI/components/Tab/Dialog/01_FormIndicator.vue index 7086a9a29..d543fdbe7 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/01_FormIndicator.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/01_FormIndicator.vue @@ -863,6 +863,7 @@ const title = computed(() => { autoApply :enableTimePicker="false" week-start="0" + @update:model-value="formDetail.endDate = null" >