diff --git a/package.json b/package.json index c0a48c7..cdf5646 100644 --- a/package.json +++ b/package.json @@ -1,69 +1,68 @@ { - "name": "ehr", - "version": "0.0.0", - "private": true, - "scripts": { - "dev": "vite", - "build": "run-p build-only", - "preview": "vite preview", - "test:unit": "vitest --environment jsdom --root src/", - "test:e2e": "start-server-and-test preview :4173 'cypress run --e2e'", - "test:e2e:dev": "start-server-and-test 'vite dev --port 4173' :4173 'cypress open --e2e'", - "build-only": "vite build", - "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", - "format": "prettier ./src --write" - }, - "dependencies": { - "@fullcalendar/core": "^6.0.1", - "@fullcalendar/daygrid": "^6.0.1", - "@fullcalendar/interaction": "^6.0.2", - "@fullcalendar/list": "^6.0.2", - "@fullcalendar/react": "^6.0.1", - "@fullcalendar/timegrid": "^6.0.2", - "@fullcalendar/vue3": "^6.0.1", - "@quasar/extras": "^1.15.8", - "@tato30/vue-pdf": "^1.5.1", - "@vuepic/vue-datepicker": "^3.6.3", - "bma-org-chart": "^0.0.7", - "dom-to-image-more": "^3.6.0", - "keycloak-js": "^20.0.2", - "moment": "^2.29.4", - "pdf-lib": "^1.17.1", - "pinia": "^2.0.29", - "quasar": "^2.11.1", - "socket.io-client": "^4.7.4", - "structure-chart": "^0.0.9", - "vue": "^3.4.15", - "vue-router": "^4.1.6", - "vue3-datepicker": "^0.3.4", - "vue3-pdfjs": "^0.1.6", - "xlsx": "^0.18.5" - }, - "devDependencies": { - "@quasar/vite-plugin": "^1.3.0", - "@rushstack/eslint-patch": "^1.1.4", - "@types/jsdom": "^20.0.1", - "@types/node": "^18.11.12", - "@vitejs/plugin-vue": "^4.0.0", - "@vitejs/plugin-vue-jsx": "^3.0.0", - "@vue/eslint-config-prettier": "^7.0.0", - "@vue/eslint-config-typescript": "^11.0.0", - "@vue/test-utils": "^2.2.6", - "@vue/tsconfig": "^0.1.3", - "cypress": "^12.0.2", - "eslint": "^8.22.0", - "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-vue": "^9.3.0", - "jsdom": "^20.0.3", - "npm-run-all": "^4.1.5", - "prettier": "^2.7.1", - "sass": "^1.32.12", - "start-server-and-test": "^1.15.2", - "typescript": "~4.7.4", - "vite": "^4.0.0", - "vitest": "^0.25.6", - "vue-table-to-excel": "^1.0.6", - "vue-tsc": "^1.0.12" - } + "name": "ehr", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "run-p build-only", + "preview": "vite preview", + "test:unit": "vitest --environment jsdom --root src/", + "test:e2e": "start-server-and-test preview :4173 'cypress run --e2e'", + "test:e2e:dev": "start-server-and-test 'vite dev --port 4173' :4173 'cypress open --e2e'", + "build-only": "vite build", + "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", + "format": "prettier ./src --write" + }, + "dependencies": { + "@fullcalendar/core": "^6.0.1", + "@fullcalendar/daygrid": "^6.0.1", + "@fullcalendar/interaction": "^6.0.2", + "@fullcalendar/list": "^6.0.2", + "@fullcalendar/react": "^6.0.1", + "@fullcalendar/timegrid": "^6.0.2", + "@fullcalendar/vue3": "^6.0.1", + "@quasar/extras": "^1.15.8", + "@tato30/vue-pdf": "^1.5.1", + "@vuepic/vue-datepicker": "^3.6.3", + "bma-org-chart": "^0.0.7", + "dom-to-image-more": "^3.6.0", + "keycloak-js": "^20.0.2", + "moment": "^2.29.4", + "pdf-lib": "^1.17.1", + "pinia": "^2.0.29", + "quasar": "^2.11.1", + "socket.io-client": "^4.7.4", + "structure-chart": "^0.0.9", + "vue": "^3.4.15", + "vue-router": "^4.1.6", + "vue3-datepicker": "^0.3.4", + "vue3-pdfjs": "^0.1.6" + }, + "devDependencies": { + "@quasar/vite-plugin": "^1.3.0", + "@rushstack/eslint-patch": "^1.1.4", + "@types/jsdom": "^20.0.1", + "@types/node": "^18.11.12", + "@vitejs/plugin-vue": "^4.0.0", + "@vitejs/plugin-vue-jsx": "^3.0.0", + "@vue/eslint-config-prettier": "^7.0.0", + "@vue/eslint-config-typescript": "^11.0.0", + "@vue/test-utils": "^2.2.6", + "@vue/tsconfig": "^0.1.3", + "cypress": "^12.0.2", + "eslint": "^8.22.0", + "eslint-plugin-cypress": "^2.12.1", + "eslint-plugin-vue": "^9.3.0", + "jsdom": "^20.0.3", + "npm-run-all": "^4.1.5", + "prettier": "^2.7.1", + "sass": "^1.32.12", + "start-server-and-test": "^1.15.2", + "typescript": "~4.7.4", + "vite": "^4.0.0", + "vitest": "^0.25.6", + "vue-table-to-excel": "^1.0.6", + "vue-tsc": "^1.0.12" + } } diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index 40cf317..3c14fee 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -3,6 +3,7 @@ import env from "../index"; const metadata = `${env.API_URI}/org/metadata/`; const org = `${env.API_URI}/org`; const profileOrg = `${env.API_URI}/org/profile`; +const report = `${env.API_URI}/org`; const workflow = `${env.API_URI}/org/workflow`; export default { orgCommandCode: `${metadata}commandCode`, @@ -69,9 +70,9 @@ export default { dataUserOtherByType: (type: string) => `${org}/profile${type}/other/user`, profileReportId: (profileId: string, type: string) => - `${org}/${type}/kk1/${profileId}`, + `${report}/${type}/kk1/${profileId}`, profileKp7ShortId: (profileId: string, type: string) => - `${org}/${type}/kp7-short/${profileId}`, + `${report}/${type}/kp7-short/${profileId}`, /** history */ dataUserInformatioHistory: (type: string) => @@ -125,7 +126,7 @@ export default { dataUserCertificateHistoryByType: ( emType: string, type: string, - id: string, + id: string ) => `${org}/profile${emType}/${type}/history/${id}`, dataUserHonorHistory: (type: string, emType: string, id: string) => `${profileOrg}${emType}/${type}/history/${id}`, @@ -175,7 +176,4 @@ export default { changePassword: `${org}/keycloak/user/change-password`, orgAssistance: (id: string) => `${profileOrg}/assistance/${id}`, - - // ตรวจสอบข้อมูลตำแหน่งและเงินเดือน - profileSalaryTemp: `${profileOrg}/salaryTemp`, }; diff --git a/src/modules/10_registry/components/PositionReview/Table.vue b/src/modules/10_registry/components/PositionReview/Table.vue deleted file mode 100644 index d7e6067..0000000 --- a/src/modules/10_registry/components/PositionReview/Table.vue +++ /dev/null @@ -1,1061 +0,0 @@ - - - - - diff --git a/src/modules/10_registry/interface/review/Edit.ts b/src/modules/10_registry/interface/review/Edit.ts deleted file mode 100644 index 04041b2..0000000 --- a/src/modules/10_registry/interface/review/Edit.ts +++ /dev/null @@ -1,76 +0,0 @@ -interface DataSalaryPos { - avatar: string; - avatarName: string; - citizenId: string; - firstName: string; - id: string; - lastName: string; - org: string; - orgRevisionId: string; - orgRootShortName: string; - posExecutive: string; - posLevel: string; - posLevelId: string; - posNo: string; - posType: string; - posTypeId: string; - position: string; - prefix: string; - rank: string; - root: string; - rootId: string; - statusCheckEdit: string; - type: string; -} - -interface DataPosition { - no?: number; - amount: number; - amountSpecial: number; - commandCode: string; - commandDateAffect: Date; - commandDateSign: Date; - commandId: string; - commandName: string; - commandNo: string; - commandYear: number; - createdAt: string; - createdFullName: string; - createdUserId: string; - dateGovernment: string; - id: string; - isDelete: boolean; - isEdit: boolean; - isEntry: boolean; - isGovernment: string; - lastUpdateFullName: string; - lastUpdateUserId: string; - lastUpdatedAt: string; - mouthSalaryAmount: number; - order: number; - orgChild1: string; - orgChild2: string; - orgChild3: string; - orgChild4: string; - orgRoot: string; - posNo: string; - posNoAbb: string; - positionCee: string; - positionExecutive: string; - positionLevel: string; - positionLine: string; - positionName: string; - positionPathSide: string; - positionSalaryAmount: number; - positionType: string; - profileEmployeeId: string; - profileId: string; - refId: number; - remark: string; - salaryId: string; - status: string; - posNumCodeSitAbb: string; - posNumCodeSit: string; -} - -export type { DataSalaryPos, DataPosition }; diff --git a/src/modules/10_registry/interface/review/Main.ts b/src/modules/10_registry/interface/review/Main.ts deleted file mode 100644 index 9022d50..0000000 --- a/src/modules/10_registry/interface/review/Main.ts +++ /dev/null @@ -1,155 +0,0 @@ -interface Pagination { - rowsPerPage: number; -} - -interface DataOption { - id: string; - name: string; -} -interface DataOption2 { - id: number; - name: string; -} - -interface DataOptionSys { - id: string; - name: string; - system: string; -} -interface DataOptionInsignia { - id: string; - name: string; - typeId: string; - typeName: string; -} - -interface DataOptionEducation { - label: string; - value: boolean; -} - -interface DataOptionEducationLevel { - label: string; - value: string; -} - -interface zipCodeOption { - id: string; - name: string; - zipCode: string; -} - -interface InformationOps { - prefixOps: DataOption[]; - rankOps: DataOption[]; - genderOps: DataOption[]; - bloodOps: DataOption[]; - statusOps: DataOption[]; - religionOps: DataOption[]; - employeeClassOps: DataOption[]; - employeeTypeOps: DataOption[]; -} - -interface AddressOps { - provinceOps: DataOption[]; - districtOps: DataOption[]; - districtCOps: DataOption[]; - subdistrictOps: zipCodeOption[]; - subdistrictCOps: zipCodeOption[]; -} - -interface InsigniaOps { - insigniaOptions: DataOptionInsignia[]; -} - -interface ItemTab { - name: string; - icon: string; - label: string; -} - -interface Request { - createdAt: string; - createdFullName: string; - detail: string; - fullname: string; - id: string; - idcard: string; - lastUpdateFullName: string; - lastUpdatedAt: string; - profileId: string; - remark: string; - status: string; - topic: string; -} - -interface InsigniasType { - id: string; - createdAt: Date; - createdUserId: string; - lastUpdatedAt: Date; - lastUpdateUserId: string; - createdFullName: string; - lastUpdateFullName: string; - name: string; - isActive: boolean; - insignias: InsigniasTypeSub[]; -} - -interface InsigniasTypeSub { - id: string; - createdAt: Date; - createdUserId: string; - lastUpdatedAt: Date; - lastUpdateUserId: string; - createdFullName: string; - lastUpdateFullName: string; - name: string; - shortName: string; - level: string; - isActive: string; - note: string; - insigniaTypeId: string; -} - -interface ResFileData { - downloadUrl: string; - fileName: string; - path: string; - pathname: string; -} - -interface DataHistory { - [key: string]: string | number | Date | boolean; -} - -interface DataCommandCode { - id: string; - createdAt: Date; - lastUpdatedAt: Date; - createdFullName: string; - lastUpdateFullName: string; - name: string; - code: number; -} - -export type { - Pagination, - DataOption, - DataOption2, - DataOptionInsignia, - zipCodeOption, - InformationOps, - AddressOps, - InsigniaOps, - DataOptionSys, - ItemTab, - DataOptionEducation, - DataOptionEducationLevel, - Request, - InsigniasType, - InsigniasTypeSub, - ResFileData, - DataHistory, - DataCommandCode, -}; diff --git a/src/modules/10_registry/router.ts b/src/modules/10_registry/router.ts index a88c4e2..8de71c7 100644 --- a/src/modules/10_registry/router.ts +++ b/src/modules/10_registry/router.ts @@ -17,8 +17,6 @@ const requestEditMain = () => import("@/modules/10_registry/views/requestEditMain.vue"); const requestEditDetail = () => import("@/modules/10_registry/views/requestEditDetail.vue"); -const positionReviewPage = () => - import("@/modules/10_registry/views/positionReview.vue"); export default [ { @@ -95,15 +93,4 @@ export default [ Key: [10], }, }, - - // ตรวจสอบข้อมูลตำแหน่งและเงินเดือน - { - path: "/registry/position-review", - name: "position-review", - component: positionReviewPage, - meta: { - Auth: true, - Key: [10], - }, - }, ]; diff --git a/src/modules/10_registry/store/Position.ts b/src/modules/10_registry/store/Position.ts index 8ab3a02..ad14276 100644 --- a/src/modules/10_registry/store/Position.ts +++ b/src/modules/10_registry/store/Position.ts @@ -12,7 +12,7 @@ const {} = mixin; export const useGovernmentPosDataStore = defineStore("GovernmentPos", () => { // commandCode ขอตำแหน่ง const positionCode = ref([ - 0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, + 0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, ]); const commandCodeData = ref([]); diff --git a/src/modules/10_registry/views/main.vue b/src/modules/10_registry/views/main.vue index 5e3a40c..81d75af 100644 --- a/src/modules/10_registry/views/main.vue +++ b/src/modules/10_registry/views/main.vue @@ -52,11 +52,11 @@ async function onClickDownloadKp7(type: string) { type === "FULL" ? config.API.profileReportId( store.profileId, - dataStore.officerType == "OFFICER" ? "profile" : "profile-employee", + dataStore.officerType == "OFFICER" ? "profile" : "profile-employee" ) : config.API.profileKp7ShortId( store.profileId, - dataStore.officerType == "OFFICER" ? "profile" : "profile-employee", + dataStore.officerType == "OFFICER" ? "profile" : "profile-employee" ); const fileName = type === "FULL" ? "ทปอ. สามัญ" : "ประวัติแบบย่อ"; await http @@ -78,6 +78,11 @@ const clickBack = () => { router.push(`/`); }; +/** ฟังก์ชัน redirect ไปหน้ารายการคำร้องขอแก้ไขข้อมูล*/ +function redirectToPagePetition() { + router.push(`/registry/request-edit`); +} + function onMobile(type: string) { router.push(`/registry/${type}`); } @@ -98,20 +103,10 @@ function onMobile(type: string) { @click="clickBack" /> ข้อมูลทะเบียนประวัติ - - ไปยังหน้าตรวจสอบข้อมูลตำแหน่งและเงินเดือน - - ยื่นคำร้องขอแก้ไขข้อมูล diff --git a/src/modules/10_registry/views/positionReview.vue b/src/modules/10_registry/views/positionReview.vue deleted file mode 100644 index 94387f5..0000000 --- a/src/modules/10_registry/views/positionReview.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - - -