From 1ce8f35aff809097611e969b793f2fe791de192b Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 12 Sep 2023 09:01:03 +0700 Subject: [PATCH 1/3] build image --- .env.production | 4 ++ .github/workflows/build-local.yaml | 39 ++++++++++++++ .github/workflows/release.yaml | 86 ++++++++++++++++++++++++++++++ Dockerfile | 6 +-- package.json | 2 +- vite.config.ts | 40 +++++++------- 6 files changed, 153 insertions(+), 24 deletions(-) create mode 100644 .env.production create mode 100644 .github/workflows/build-local.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..9fa54e36 --- /dev/null +++ b/.env.production @@ -0,0 +1,4 @@ +VITE_COMPETITIVE_EXAM_PANEL=VITE_COMPETITIVE_EXAM_PANEL +VITE_QUALIFY_DISABLE_EMAM_PANEL=VITE_QUALIFY_DISABLE_EMAM_PANEL +VITE_QUALIFY_EXAM_PANEL=VITE_QUALIFY_EXAM_PANEL +VITE_S3CLUSTER_PUBLIC_URL=VITE_S3CLUSTER_PUBLIC_URL \ No newline at end of file diff --git a/.github/workflows/build-local.yaml b/.github/workflows/build-local.yaml new file mode 100644 index 00000000..b7dc9b1a --- /dev/null +++ b/.github/workflows/build-local.yaml @@ -0,0 +1,39 @@ +# use for local build with act +name: build-local +run-name: build-local ${{ github.actor }} +on: + workflow_dispatch: +env: + REGISTRY: docker.frappet.com + IMAGE_NAME: demo/bma-ehr-manual +jobs: + # act workflow_dispatch -W .github/workflows/build-local.yaml --input IMAGE_VER=test-v1 + build-local: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # skip Set up QEMU because it fail on act and container + - name: Gen Version + id: gen_ver + run: | + if [[ $GITHUB_REF == 'refs/tags/'* ]]; then + IMAGE_VER='${GITHUB_REF/refs\/tags\//}' + else + IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} + fi + if [[ $IMAGE_VER == '' ]]; then + IMAGE_VER='test-vBeta' + fi + echo '::set-output name=image_ver::'$IMAGE_VER + - name: Test Version + run: | + echo $GITHUB_REF + echo ${{ steps.gen_ver.outputs.image_ver }} + + - name: Build and load local docker image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + load: true + tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..33aa1904 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,86 @@ +name: release-test +run-name: release-test ${{ github.actor }} +on: + # push: + # tags: + # - 'v[0-9]+.[0-9]+.[0-9]+' + # tags-ignore: + # - '2.*' + # Allow run workflow manually from Action tab + workflow_dispatch: +env: + REGISTRY: docker.frappet.com + IMAGE_NAME: ehr/bma-ehr-manual + DEPLOY_HOST: frappet.com + COMPOSE_PATH: /home/frappet/docker/bma-ehr-manual + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 +jobs: + # act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=test-v1 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd + release-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # skip Set up QEMU because it fail on act and container + # Gen Version try to get version from tag or inut + - name: Gen Version + id: gen_ver + run: | + if [[ $GITHUB_REF == 'refs/tags/'* ]]; then + IMAGE_VER='${GITHUB_REF/refs\/tags\//}' + else + IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} + fi + if [[ $IMAGE_VER == '' ]]; then + IMAGE_VER='test-vBeta' + fi + echo '::set-output name=image_ver::'$IMAGE_VER + - name: Check Version + run: | + echo $GITHUB_REF + echo ${{ steps.gen_ver.outputs.image_ver }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login in to registry + uses: docker/login-action@v2 + with: + registry: ${{env.REGISTRY}} + username: ${{secrets.DOCKER_USER}} + password: ${{secrets.DOCKER_PASS}} + - name: Build and push docker image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest + - name: Remote Deployment + uses: appleboy/ssh-action@v0.1.8 + with: + host: ${{env.DEPLOY_HOST}} + username: frappet + password: ${{ secrets.SSH_PASSWORD }} + port: 22 + script: | + cd "${{env.COMPOSE_PATH}}" + docker-compose pull + docker-compose up -d + echo "${{ steps.gen_ver.outputs.image_ver }}"> success + - uses: snow-actions/line-notify@v1.1.0 + if: success() + with: + access_token: ${{ env.TOKEN_LINE }} + message: | + -Success✅✅✅ + Image: ${{env.IMAGE_NAME}} + Version: ${{ github.event.inputs.IMAGE_VER }} + By: ${{secrets.DOCKER_USER}} + - uses: snow-actions/line-notify@v1.1.0 + if: failure() + with: + access_token: ${{ env.TOKEN_LINE }} + message: | + -Failure❌❌❌ + Image: ${{env.IMAGE_NAME}} + Version: ${{ github.event.inputs.IMAGE_VER }} + By: ${{secrets.DOCKER_USER}} diff --git a/Dockerfile b/Dockerfile index a6b08ee8..653a338e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ RUN mkdir /app COPY --from=build-stage /app/dist /app COPY nginx.conf /etc/nginx/nginx.conf -COPY entrypoint.sh /usr/local/bin/entrypoint.sh -RUN chmod u+x /usr/local/bin/entrypoint.sh +# COPY entrypoint.sh /usr/local/bin/entrypoint.sh +# RUN chmod u+x /usr/local/bin/entrypoint.sh -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["nginx", "-g", "daemon off;"] diff --git a/package.json b/package.json index 96bfba59..c5ea1cfb 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "vite", - "build": "run-p build-only", + "build": "run-p ", "preview": "vite preview", "test:unit": "vitest --environment jsdom --root src/", "test:e2e": "start-server-and-test preview :4173 'cypress run --e2e'", diff --git a/vite.config.ts b/vite.config.ts index 9393aa96..614aa1ba 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,24 +7,24 @@ import { quasar, transformAssetUrls } from "@quasar/vite-plugin" // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ - vue({ - template: { transformAssetUrls }, - }), - quasar({ - sassVariables: "src/style/quasar-variables.sass", - }), - vueJsx(), - ], - resolve: { - alias: { - "@": fileURLToPath(new URL("./src", import.meta.url)), - }, - }, - build: { - target: "esnext", - }, - server: { - port: 3006, - }, + plugins: [ + vue({ + template: { transformAssetUrls }, + }), + quasar({ + sassVariables: "src/style/quasar-variables.sass", + }), + vueJsx(), + ], + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", import.meta.url)), + }, + }, + build: { + target: "esnext", + }, + server: { + port: 3008, + }, }) From a079fcd0ae87290b799e1214da017d6bc8807a2d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 25 Sep 2023 10:44:54 +0700 Subject: [PATCH 2/3] top view --- src/views/MainLayout.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 9ea9dda4..f3985109 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -228,7 +228,7 @@ onMounted(async () => { }); const setListTab = () => { - console.log(route.name); + // console.log(route.name); if (route.name == "manual") { listTab.value = tabListLogin; @@ -241,6 +241,8 @@ const setListTab = () => { } else if (route.name == "recruitmain") { listTab.value = tabRecruit; } + changeTab(listTab.value[0].tag); + window.scrollTo(0, 0); }; watch(route, () => { setListTab(); From 970c582e34fca6705db7b5637d9a5621540ba881 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 7 Nov 2023 19:23:16 +0700 Subject: [PATCH 3/3] set file build image --- .github/workflows/release.yaml | 36 +- Dockerfile | 6 +- package.json | 2 +- src/interface/request/main/main.ts | 1777 ++++++++--------- .../components/2_data/24_Officer.vue | 544 ++--- src/router/index.ts | 138 +- src/views/MainLayout.vue | 1513 +++++++------- 7 files changed, 1793 insertions(+), 2223 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 33aa1904..eb187c38 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,21 +66,21 @@ jobs: docker-compose pull docker-compose up -d echo "${{ steps.gen_ver.outputs.image_ver }}"> success - - uses: snow-actions/line-notify@v1.1.0 - if: success() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Success✅✅✅ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} - - uses: snow-actions/line-notify@v1.1.0 - if: failure() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Failure❌❌❌ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: success() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Success✅✅✅ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: failure() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Failure❌❌❌ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} diff --git a/Dockerfile b/Dockerfile index 653a338e..a6b08ee8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ RUN mkdir /app COPY --from=build-stage /app/dist /app COPY nginx.conf /etc/nginx/nginx.conf -# COPY entrypoint.sh /usr/local/bin/entrypoint.sh -# RUN chmod u+x /usr/local/bin/entrypoint.sh +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod u+x /usr/local/bin/entrypoint.sh -# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["nginx", "-g", "daemon off;"] diff --git a/package.json b/package.json index c5ea1cfb..96bfba59 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "vite", - "build": "run-p ", + "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'", diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 197c75a0..e4e2df9d 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -1,926 +1,919 @@ -import { readonly } from "vue"; +import { readonly } from "vue" interface ScrollType { - position: number; - direction: string; - directionChanged: boolean; - inflectionPoint: number; - delta: number; + position: number + direction: string + directionChanged: boolean + inflectionPoint: number + delta: number } interface tabType { - key: number; - label: string; - tag: string; + key: number + label: string + tag: string } interface childrenType { - key: number; - label: string; - path?: string; + key: number + label: string + path?: string } interface menuType { - key: number; - icon: string; - activeIcon: string; - label: string; - path: string; - children?: childrenType[]; + key: number + icon: string + activeIcon: string + label: string + path: string + children?: childrenType[] } interface notiType { - id: string; - sender: string; - body: string; - timereceive: Date; + id: string + sender: string + body: string + timereceive: Date } interface optionType { - icon: string; - label: string; - value: string; - color: string; + icon: string + label: string + value: string + color: string } const menuList = readonly([ - { - key: 1, - icon: "mdi-home-variant-outline", - activeIcon: "mdi-home-variant", - label: "หน้าแรก", - path: "dashboard", - role: "dashboard", - }, - { - key: 2, - icon: "mdi-file-outline", - activeIcon: "document", - label: "คู่มือการใช้งาน", - path: "", - role: "metadata", - children: [ - { - key: 2.1, - label: "การเข้าสู่ระบบ", - path: "/manual", + // { + // key: 1, + // icon: "mdi-home-variant-outline", + // activeIcon: "mdi-home-variant", + // label: "หน้าแรก", + // path: "dashboard", + // role: "dashboard", + // }, + { + key: 2, + icon: "mdi-file-outline", + activeIcon: "document", + label: "คู่มือการใช้งาน", + path: "", + role: "metadata", + children: [ + { + key: 2.1, + label: "การเข้าสู่ระบบ", + path: "/manual", + }, + { + key: 2.2, + label: "ระบบข้อมูลหลัก", + path: "/datamain", + }, + { + key: 2.3, + label: "ระบบโครงสร้างอัตรากำลัง", + path: "/structuremain", + }, + { + key: 2.4, + label: "ระบบทะเบียนประวัติ", + path: "/registrationmain", + }, + { + key: 2.5, + label: "หน้าจัดการระบบสรรหา", + path: "/recruitmain", + }, + ], + }, + // { + // key: 3, + // icon: "o_groups", + // activeIcon: "groups", + // label: "โครงสร้างอัตรากำลัง", + // path: "organizational", + // role: "organization", + // children: [ + // { + // key: 3.1, + // label: "จัดการตำแหน่ง", + // path: "organizationalMapping", + // }, + // { + // key: 3.2, + // label: "แผนภูมิโครงสร้าง", + // path: "organizationalStructChart", + // }, + // { + // key: 3.3, + // label: "แผนภูมิองค์กร", + // path: "organizationalOrgChart", + // }, + // { + // key: 3.4, + // label: "ผังโครงสร้าง", + // path: "organizationalTree", + // }, + // { + // key: 3.5, + // label: "ผังโครงสร้างลูกจ้าง", + // path: "organizationalEmployee", + // }, + // { + // key: 3.6, + // label: "จัดการบัญชี 2", + // path: "manageReport2", + // }, + // { + // key: 3.7, + // label: "รายงานบัญชี", + // path: "organizationalReport", + // }, + // ], + // }, + // { + // key: 4, + // icon: "o_contact_page", + // activeIcon: "contact_page", + // label: "ทะเบียนประวัติ", + // path: "registry", + // role: "registry", + // }, + // { + // key: 10, + // icon: "o_contact_page", + // activeIcon: "registry_employee_page", + // label: "ทะเบียนประวัติลูกจ้าง", + // path: "registry-employee", + // role: "registryEmployee", + // }, + // { + // key: 10, + // icon: "mdi-file-certificate-outline", + // activeIcon: "order", + // label: "ออกคำสั่ง", + // path: "order", + // role: "order", + // }, + // { + // key: 5, + // icon: "o_search", + // activeIcon: "search", + // label: "สรรหา", + // path: "recruiting", + // role: "recruit", + // children: [ + // { + // label: "ตั้งค่าเว็บสรรหา", + // path: "editorweb", + // key: 5.1, + // role: "recruit", + // }, + // { + // label: "สอบแข่งขัน", + // path: "", + // key: 5.2, + // role: "recruit", + // children: [ + // { + // label: "จัดการรอบสอบแข่งขัน" /* แข่งขัน */, + // path: "competePeriod", + // role: "recruit", + // }, + // { + // label: "สถิติสมัครสอบแข่งขัน" /* แข่งขัน */, + // path: "competePeriodStat", + // role: "recruit", + // }, + // ], + // }, + // { + // label: "คัดเลือก", + // path: "", + // key: 5.3, + // role: "recruit", + // children: [ + // { + // label: "จัดการรอบคัดเลือก", + // path: "qualifyPeriod", + // role: "recruit", + // }, + // { + // label: "จัดการรอบคัดเลือกคนพิการ", + // path: "disablePeriod", + // role: "recruit", + // }, + // { + // label: "จัดการรายชื่อคัดเลือก", + // path: "manage", + // role: "recruit", + // }, + // { + // label: "สถิติสมัครคัดเลือก", + // path: "qualifyPeriodStat", + // role: "recruit", + // }, + // { + // label: "สถิติสมัครคัดเลือกคนพิการ", + // path: "qualifyPeriodStatDisable", + // role: "recruit", + // }, + // ], + // }, + // ], + // }, + // { + // key: 6, + // path: "placement", + // icon: "how_to_reg", + // activeIcon: "how_to_reg", + // label: "บรรจุ แต่งตั้ง ย้าย โอน", + // role: "placement", + // children: [ + // { + // key: 6.1, + // label: "รายชื่อผู้สอบผ่าน" /* รายชื่อผู้สอบผ่าน */, + // path: "placement", + // role: "placement", + // }, + // // { + // // key: 6.2, + // // label: "ออกคำสั่ง" /* ออกคำสั่งบรรจุ */, + // // path: "Orderplacement", + // // role: "placement", + // // }, + // { + // key: 6.3, + // label: "การทดลองงาน" /* การทดลองงาน */, + // path: "probation", + // role: "probation", + // }, + // { + // key: 6.4, + // label: "รายการขอโอน" /* */, + // path: "transfer", + // role: "placement", + // }, + // { + // key: 6.5, + // label: "รายการรับโอน" /* */, + // path: "receive", + // role: "placement", + // }, + // { + // key: 6.6, + // label: "รายการช่วยราชการ" /* */, + // path: "help-government", + // role: "placement", + // }, + // { + // key: 6.7, + // label: "รายการส่งตัวกลับ" /* */, + // path: "repatriate", + // role: "placement", + // }, + // { + // key: 6.8, + // label: "รายการแต่งตั้ง-เลื่อน" /* */, + // path: "appoint-promote", + // role: "placement", + // }, + // { + // key: 6.9, + // label: "รายการย้าย" /* */, + // path: "relocation", + // role: "placement", + // }, + // { + // key: 6.1, + // label: "รายการอื่นๆ" /* */, + // path: "other", + // role: "placement", + // }, + // ], + // }, + // { + // key: 7, + // icon: "mdi-account-cancel-outline", + // activeIcon: "mdi-account-cancel", + // label: "พ้นจากราชการ", + // path: "retirement", + // role: "retirement", + // children: [ + // { + // key: 7.1, + // label: "ประกาศเกษียณ", + // path: "retirement", + // role: "retirement", + // }, + // { + // key: 7.2, + // label: "รายการลาออก", + // path: "resign", + // role: "retirement", + // }, + // // { + // // key: 7.3, + // // label: "คำสั่งลาออก", + // // path: "resign-order", + // // role: "retirement", + // // }, + // { + // key: 7.3, + // label: "Exit interview", + // path: "exit-Interview", + // role: "retirement", + // }, + // { + // key: 7.4, + // label: "รายการบันทึกการถึงแก่กรรม", + // path: "deceased", + // role: "retirement", + // }, + // { + // key: 7.5, + // label: "รายการให้ออก", + // path: "dismiss-order", + // role: "retirement", + // }, + // { + // key: 7.6, + // label: "รายการปลดออก", + // path: "discharged", + // role: "retirement", + // }, + // { + // key: 7.7, + // label: "รายการไล่ออก", + // path: "expulsion", + // role: "retirement", + // }, + // ], + // }, + // { + // key: 8, + // icon: "mdi-medal-outline", + // activeIcon: "mdi-medal", + // label: "เครื่องราชฯ", + // path: "insignia", + // role: "insignia", + // children: [ + // { + // key: 8.1, + // label: "รอบการเสนอขอ", + // path: "insigniaProposals", + // role: "insignia", + // }, + // { + // key: 8.2, + // label: "จัดการคำขอ", + // path: "insigniaManage", + // role: "insignia", + // }, + // { + // key: 8.3, + // label: "บันทึกผลการเสนอขอ", + // path: "insigniaRecord", + // role: "insignia", + // }, + // { + // key: 8.4, + // label: "จัดสรรเครื่องราชฯ", + // path: "insigniaAllocate", + // role: "insignia", + // }, + // { + // key: 8.6, + // label: "ยืม-คืนเครื่องราชฯ", + // path: "insigniaBorrow", + // role: "insignia", + // }, + // { + // key: 8.5, + // label: "รายงาน", + // path: "insigniaReport", + // role: "insignia", + // }, + // ], + // }, + // { + // key: 8, + // icon: "mdi-medal-outline", + // activeIcon: "mdi-medal", + // label: "เครื่องราชฯ", + // path: "insignia", + // role: "insignia", + // children: [ + // { + // key: 8.1, + // label: "เครื่องราชฯ", + // path: "", + // role: "insignia", + // children: [ + // { + // label: "รอบการเสนอขอ", + // path: "insigniaProposals", + // role: "insignia", + // }, + // { + // label: "จัดการคำขอ", + // path: "insigniaManage", + // role: "insignia", + // }, + // { + // label: "บันทึกผลการได้รับพระราช...", + // path: "insigniaRecord", + // role: "insignia", + // }, + // { + // label: "บันทึกผลการจ่ายใบกำกับ", + // path: "VatInsignia", + // role: "insignia", + // }, - }, - { - key: 2.2, - label: "ระบบข้อมูลหลัก", - path: "/datamain", - }, - { - key: 2.3, - label: "ระบบโครงสร้างอัตรากำลัง", - path: "/structuremain", - }, - { - key: 2.4, - label: "ระบบทะเบียนประวัติ", - path: "/registrationmain", - }, - { - key: 2.5, - label: "หน้าจัดการระบบสรรหา", - path: "/recruitmain", - } - ] - }, - // { - // key: 3, - // icon: "o_groups", - // activeIcon: "groups", - // label: "โครงสร้างอัตรากำลัง", - // path: "organizational", - // role: "organization", - // children: [ - // { - // key: 3.1, - // label: "จัดการตำแหน่ง", - // path: "organizationalMapping", - // }, - // { - // key: 3.2, - // label: "แผนภูมิโครงสร้าง", - // path: "organizationalStructChart", - // }, - // { - // key: 3.3, - // label: "แผนภูมิองค์กร", - // path: "organizationalOrgChart", - // }, - // { - // key: 3.4, - // label: "ผังโครงสร้าง", - // path: "organizationalTree", - // }, - // { - // key: 3.5, - // label: "ผังโครงสร้างลูกจ้าง", - // path: "organizationalEmployee", - // }, - // { - // key: 3.6, - // label: "จัดการบัญชี 2", - // path: "manageReport2", - // }, - // { - // key: 3.7, - // label: "รายงานบัญชี", - // path: "organizationalReport", - // }, - // ], - // }, - // { - // key: 4, - // icon: "o_contact_page", - // activeIcon: "contact_page", - // label: "ทะเบียนประวัติ", - // path: "registry", - // role: "registry", - // }, - // { - // key: 10, - // icon: "o_contact_page", - // activeIcon: "registry_employee_page", - // label: "ทะเบียนประวัติลูกจ้าง", - // path: "registry-employee", - // role: "registryEmployee", - // }, - // { - // key: 10, - // icon: "mdi-file-certificate-outline", - // activeIcon: "order", - // label: "ออกคำสั่ง", - // path: "order", - // role: "order", - // }, - // { - // key: 5, - // icon: "o_search", - // activeIcon: "search", - // label: "สรรหา", - // path: "recruiting", - // role: "recruit", - // children: [ - // { - // label: "ตั้งค่าเว็บสรรหา", - // path: "editorweb", - // key: 5.1, - // role: "recruit", - // }, - // { - // label: "สอบแข่งขัน", - // path: "", - // key: 5.2, - // role: "recruit", - // children: [ - // { - // label: "จัดการรอบสอบแข่งขัน" /* แข่งขัน */, - // path: "competePeriod", - // role: "recruit", - // }, - // { - // label: "สถิติสมัครสอบแข่งขัน" /* แข่งขัน */, - // path: "competePeriodStat", - // role: "recruit", - // }, - // ], - // }, - // { - // label: "คัดเลือก", - // path: "", - // key: 5.3, - // role: "recruit", - // children: [ - // { - // label: "จัดการรอบคัดเลือก", - // path: "qualifyPeriod", - // role: "recruit", - // }, - // { - // label: "จัดการรอบคัดเลือกคนพิการ", - // path: "disablePeriod", - // role: "recruit", - // }, - // { - // label: "จัดการรายชื่อคัดเลือก", - // path: "manage", - // role: "recruit", - // }, - // { - // label: "สถิติสมัครคัดเลือก", - // path: "qualifyPeriodStat", - // role: "recruit", - // }, - // { - // label: "สถิติสมัครคัดเลือกคนพิการ", - // path: "qualifyPeriodStatDisable", - // role: "recruit", - // }, - // ], - // }, - // ], - // }, - // { - // key: 6, - // path: "placement", - // icon: "how_to_reg", - // activeIcon: "how_to_reg", - // label: "บรรจุ แต่งตั้ง ย้าย โอน", - // role: "placement", - // children: [ - // { - // key: 6.1, - // label: "รายชื่อผู้สอบผ่าน" /* รายชื่อผู้สอบผ่าน */, - // path: "placement", - // role: "placement", - // }, - // // { - // // key: 6.2, - // // label: "ออกคำสั่ง" /* ออกคำสั่งบรรจุ */, - // // path: "Orderplacement", - // // role: "placement", - // // }, - // { - // key: 6.3, - // label: "การทดลองงาน" /* การทดลองงาน */, - // path: "probation", - // role: "probation", - // }, - // { - // key: 6.4, - // label: "รายการขอโอน" /* */, - // path: "transfer", - // role: "placement", - // }, - // { - // key: 6.5, - // label: "รายการรับโอน" /* */, - // path: "receive", - // role: "placement", - // }, - // { - // key: 6.6, - // label: "รายการช่วยราชการ" /* */, - // path: "help-government", - // role: "placement", - // }, - // { - // key: 6.7, - // label: "รายการส่งตัวกลับ" /* */, - // path: "repatriate", - // role: "placement", - // }, - // { - // key: 6.8, - // label: "รายการแต่งตั้ง-เลื่อน" /* */, - // path: "appoint-promote", - // role: "placement", - // }, - // { - // key: 6.9, - // label: "รายการย้าย" /* */, - // path: "relocation", - // role: "placement", - // }, - // { - // key: 6.1, - // label: "รายการอื่นๆ" /* */, - // path: "other", - // role: "placement", - // }, - // ], - // }, - // { - // key: 7, - // icon: "mdi-account-cancel-outline", - // activeIcon: "mdi-account-cancel", - // label: "พ้นจากราชการ", - // path: "retirement", - // role: "retirement", - // children: [ - // { - // key: 7.1, - // label: "ประกาศเกษียณ", - // path: "retirement", - // role: "retirement", - // }, - // { - // key: 7.2, - // label: "รายการลาออก", - // path: "resign", - // role: "retirement", - // }, - // // { - // // key: 7.3, - // // label: "คำสั่งลาออก", - // // path: "resign-order", - // // role: "retirement", - // // }, - // { - // key: 7.3, - // label: "Exit interview", - // path: "exit-Interview", - // role: "retirement", - // }, - // { - // key: 7.4, - // label: "รายการบันทึกการถึงแก่กรรม", - // path: "deceased", - // role: "retirement", - // }, - // { - // key: 7.5, - // label: "รายการให้ออก", - // path: "dismiss-order", - // role: "retirement", - // }, - // { - // key: 7.6, - // label: "รายการปลดออก", - // path: "discharged", - // role: "retirement", - // }, - // { - // key: 7.7, - // label: "รายการไล่ออก", - // path: "expulsion", - // role: "retirement", - // }, - // ], - // }, - // { - // key: 8, - // icon: "mdi-medal-outline", - // activeIcon: "mdi-medal", - // label: "เครื่องราชฯ", - // path: "insignia", - // role: "insignia", - // children: [ - // { - // key: 8.1, - // label: "รอบการเสนอขอ", - // path: "insigniaProposals", - // role: "insignia", - // }, - // { - // key: 8.2, - // label: "จัดการคำขอ", - // path: "insigniaManage", - // role: "insignia", - // }, - // { - // key: 8.3, - // label: "บันทึกผลการเสนอขอ", - // path: "insigniaRecord", - // role: "insignia", - // }, - // { - // key: 8.4, - // label: "จัดสรรเครื่องราชฯ", - // path: "insigniaAllocate", - // role: "insignia", - // }, - // { - // key: 8.6, - // label: "ยืม-คืนเครื่องราชฯ", - // path: "insigniaBorrow", - // role: "insignia", - // }, - // { - // key: 8.5, - // label: "รายงาน", - // path: "insigniaReport", - // role: "insignia", - // }, - // ], - // }, - // { - // key: 8, - // icon: "mdi-medal-outline", - // activeIcon: "mdi-medal", - // label: "เครื่องราชฯ", - // path: "insignia", - // role: "insignia", - // children: [ - // { - // key: 8.1, - // label: "เครื่องราชฯ", - // path: "", - // role: "insignia", - // children: [ - // { - // label: "รอบการเสนอขอ", - // path: "insigniaProposals", - // role: "insignia", - // }, - // { - // label: "จัดการคำขอ", - // path: "insigniaManage", - // role: "insignia", - // }, - // { - // label: "บันทึกผลการได้รับพระราช...", - // path: "insigniaRecord", - // role: "insignia", - // }, - // { - // label: "บันทึกผลการจ่ายใบกำกับ", - // path: "VatInsignia", - // role: "insignia", - // }, - - // { - // label: "จัดสรรเครื่องราชฯ", - // path: "insigniaAllocate", - // role: "insignia", - // }, - // { - // label: "รายงาน", - // path: "insigniaReport", - // role: "insignia", - // }, - // ], - // }, - // { - // key: 8.2, - // label: "เหรียญจักรพรรดิมาลา", - // path: "", - // role: "coin", - // children: [ - // { - // label: "รอบการเสนอขอ", - // path: "coinProposals", - // role: "coin", - // }, - // { - // label: "จัดการคำขอ", - // path: "coinManage", - // role: "coin", - // }, - // { - // label: "บันทึกผลการได้รับพระราชทานเหรียญจักรพรรดิมาลา", - // path: "coinReceive", - // role: "coin", - // }, - // { - // label: "บันทึกผลการจ่ายใบกำกับ", - // path: "coinPayment", - // role: "coin", - // }, - // { - // label: - // "รายชื่อที่ยื่นคำร้องขอแก้ไขข้อมูลการขอพระราชทานเหรียญจักรพรรดิมาลา", - // path: "coinRequest", - // role: "coin", - // }, - // // { - // // label: "ประวัติการยื่นขอ", - // // path: "coinHistory", - // // role: "coin", - // // }, - // { - // label: "จัดสรรเหรียญตรา", - // path: "coinAllocate", - // role: "coin", - // }, - // { - // label: "รายงาน", - // path: "coinReport", - // role: "coin", - // }, - // ], - // }, - // ], - // }, -]); + // { + // label: "จัดสรรเครื่องราชฯ", + // path: "insigniaAllocate", + // role: "insignia", + // }, + // { + // label: "รายงาน", + // path: "insigniaReport", + // role: "insignia", + // }, + // ], + // }, + // { + // key: 8.2, + // label: "เหรียญจักรพรรดิมาลา", + // path: "", + // role: "coin", + // children: [ + // { + // label: "รอบการเสนอขอ", + // path: "coinProposals", + // role: "coin", + // }, + // { + // label: "จัดการคำขอ", + // path: "coinManage", + // role: "coin", + // }, + // { + // label: "บันทึกผลการได้รับพระราชทานเหรียญจักรพรรดิมาลา", + // path: "coinReceive", + // role: "coin", + // }, + // { + // label: "บันทึกผลการจ่ายใบกำกับ", + // path: "coinPayment", + // role: "coin", + // }, + // { + // label: + // "รายชื่อที่ยื่นคำร้องขอแก้ไขข้อมูลการขอพระราชทานเหรียญจักรพรรดิมาลา", + // path: "coinRequest", + // role: "coin", + // }, + // // { + // // label: "ประวัติการยื่นขอ", + // // path: "coinHistory", + // // role: "coin", + // // }, + // { + // label: "จัดสรรเหรียญตรา", + // path: "coinAllocate", + // role: "coin", + // }, + // { + // label: "รายงาน", + // path: "coinReport", + // role: "coin", + // }, + // ], + // }, + // ], + // }, +]) const tabListLogin = readonly([ - { - no: 1, - label: "การเข้าสู่หน้าระบบ", - tag: "Mainlogin", - }, - { - no: 2, - label: "การเข้าสู่ระบบโดยใช้ User name และ Password", - tag: "login", - }, - { - no: 3, - label: "การเปลี่ยนรหัสผ่านผู้ใช้งาน", - tag: "Password", - }, - { - no: 4, - label: "การลงทะเบียนผู้ใช้งานใหม่", - tag: "newuser", - }, - { - no: 5, - label: "การออกจากระบบ", - tag: "logout", - }, - { - no: 6, - label: "การแสดงแจ้งเตือน", - tag: "noti", - } -]); + { + no: 1, + label: "การเข้าสู่หน้าระบบ", + tag: "Mainlogin", + }, + { + no: 2, + label: "การเข้าสู่ระบบโดยใช้ User name และ Password", + tag: "login", + }, + { + no: 3, + label: "การเปลี่ยนรหัสผ่านผู้ใช้งาน", + tag: "Password", + }, + { + no: 4, + label: "การลงทะเบียนผู้ใช้งานใหม่", + tag: "newuser", + }, + { + no: 5, + label: "การออกจากระบบ", + tag: "logout", + }, + { + no: 6, + label: "การแสดงแจ้งเตือน", + tag: "noti", + }, +]) const tabListDatamain = readonly([ - { - no: 1, - label: "การเข้าสู่ระบบข้อมูลหลัก", - tag: "MainData", - }, - { - no: 2, - label: "ข้อมูลเกี่ยวกับบุคคล", - tag: "About", - }, - { - no: 3, - label: "ข้อมูลโครงสร้างหน่วยงาน", - tag: "gov", - }, - { - no: 4, - label: "ข้อมูลตำแหน่งของข้าราชการ", - tag: "officer", - }, - { - no: 5, - label: "ข้อมูลตำแหน่งของลูกจ้าง", - tag: "employee", - }, - { - no: 6, - label: "ข้อมูลปฏิทินวันหยุด", - tag: "calender", - }, - { - no: 7, - label: "ข้อมูลเครื่องราชอิสริยาภรณ์", - tag: "insignia", - } -]); + { + no: 1, + label: "การเข้าสู่ระบบข้อมูลหลัก", + tag: "MainData", + }, + { + no: 2, + label: "ข้อมูลเกี่ยวกับบุคคล", + tag: "About", + }, + { + no: 3, + label: "ข้อมูลโครงสร้างหน่วยงาน", + tag: "gov", + }, + { + no: 4, + label: "ข้อมูลตำแหน่งของข้าราชการ", + tag: "officer", + }, + { + no: 5, + label: "ข้อมูลตำแหน่งของลูกจ้าง", + tag: "employee", + }, + { + no: 6, + label: "ข้อมูลปฏิทินวันหยุด", + tag: "calender", + }, + { + no: 7, + label: "ข้อมูลเครื่องราชอิสริยาภรณ์", + tag: "insignia", + }, +]) const tabStructuremain = readonly([ - { - no: 1, - label: "การเข้าสู่ระบบโครงสร้างอัตรากำลัง", - tag: "structuremain", - }, - { - no: 2, - label: "จัดการตำแหน่ง", - tag: "position", - }, - { - no: 3, - label: "แผนภูมิโครงสร้าง", - tag: "structure", - }, - { - no: 4, - label: "แผนภูมิองค์กร", - tag: "organchart", - }, - { - no: 5, - label: "ผังโครงสร้าง", - tag: "chartstru", - }, - { - no: 6, - label: "จัดการบัญชี 2", - tag: "account2", - }, - { - no: 7, - label: "รายงานบัญชี", - tag: "report", - }, - { - no: 8, - label: "ผังโครงสร้างลูกจ้าง", - tag: "chartemploy", - } + { + no: 1, + label: "การเข้าสู่ระบบโครงสร้างอัตรากำลัง", + tag: "structuremain", + }, + { + no: 2, + label: "จัดการตำแหน่ง", + tag: "position", + }, + { + no: 3, + label: "แผนภูมิโครงสร้าง", + tag: "structure", + }, + { + no: 4, + label: "แผนภูมิองค์กร", + tag: "organchart", + }, + { + no: 5, + label: "ผังโครงสร้าง", + tag: "chartstru", + }, + { + no: 6, + label: "จัดการบัญชี 2", + tag: "account2", + }, + { + no: 7, + label: "รายงานบัญชี", + tag: "report", + }, + { + no: 8, + label: "ผังโครงสร้างลูกจ้าง", + tag: "chartemploy", + }, ]) const tabRegistration = readonly([ - { - no: 1, - label: "การเข้าสู่หน้าระบบทะเบียนประวัติ", - tag: "registrationmain", - }, - { - no: 2, - label: "การค้นหาข้อมูลทะเบียนประวัติ", - tag: "registrationFind", - }, - { - no: 3, - label: "การดูรายละเอียดข้อมูลทะเบียน", - tag: "registrationDetail", - }, - { - no: 4, - label: "การเพิ่ม แก้ไข ดูประวัติแก้ไขข้อมูล", - tag: "registrationEdit", - }, - { - no: 5, - label: "การค้นหาข้อมูลส่วนตัว การเลือกคอลัมน์แสดงผลข้อมูล", - tag: "registrationSelect", - }, - { - no: 6, - label: "การปรับหน้าต่างแสดงผลหน้าข้อมูลส่วนตัว", - tag: "registrationWindow", - } + { + no: 1, + label: "การเข้าสู่หน้าระบบทะเบียนประวัติ", + tag: "registrationmain", + }, + { + no: 2, + label: "การค้นหาข้อมูลทะเบียนประวัติ", + tag: "registrationFind", + }, + { + no: 3, + label: "การดูรายละเอียดข้อมูลทะเบียน", + tag: "registrationDetail", + }, + { + no: 4, + label: "การเพิ่ม แก้ไข ดูประวัติแก้ไขข้อมูล", + tag: "registrationEdit", + }, + { + no: 5, + label: "การค้นหาข้อมูลส่วนตัว การเลือกคอลัมน์แสดงผลข้อมูล", + tag: "registrationSelect", + }, + { + no: 6, + label: "การปรับหน้าต่างแสดงผลหน้าข้อมูลส่วนตัว", + tag: "registrationWindow", + }, ]) const tabRecruit = readonly([ - { - no: 1, - label: "การเข้าสู่หน้าระบบสรรหา", - tag: "recruitmain", - }, - { - no: 2, - label: "การตั้งค่าเว็บไซต์ระบบสรรหา", - tag: "recruitSetting", - }, - { - no: 3, - label: "สอบแข่งขัน", - tag: "recruitManagemain", - childern: [ - { - no: 3.1, - label: "จัดการรอบสอบการแข่งขัน", - tag: "recruitManage", - }, - { - no: 3.2, - label: "สถิติสมัครสอบแข่งขัน", - tag: "recruitstati", - }, - ] - }, - { - no: 4, - label: "คัดเลือก", - tag: "recruitQualifiersmain", - childern: [ - { - no: 4.1, - label: "จัดการรอบคัดเลือก", - tag: "recruitQualifiers", - }, - { - no: 4.2, - label: "จัดการรอบคัดเลือกคนพิการ", - tag: "recruitDisabilities", - }, - { - no: 4.3, - label: "จัดการรายชื่อคัดเลือก", - tag: "recruitSelection", - } - ] - } + { + no: 1, + label: "การเข้าสู่หน้าระบบสรรหา", + tag: "recruitmain", + }, + { + no: 2, + label: "การตั้งค่าเว็บไซต์ระบบสรรหา", + tag: "recruitSetting", + }, + { + no: 3, + label: "สอบแข่งขัน", + tag: "recruitManagemain", + childern: [ + { + no: 3.1, + label: "จัดการรอบสอบการแข่งขัน", + tag: "recruitManage", + }, + { + no: 3.2, + label: "สถิติสมัครสอบแข่งขัน", + tag: "recruitstati", + }, + ], + }, + { + no: 4, + label: "คัดเลือก", + tag: "recruitQualifiersmain", + childern: [ + { + no: 4.1, + label: "จัดการรอบคัดเลือก", + tag: "recruitQualifiers", + }, + { + no: 4.2, + label: "จัดการรอบคัดเลือกคนพิการ", + tag: "recruitDisabilities", + }, + { + no: 4.3, + label: "จัดการรายชื่อคัดเลือก", + tag: "recruitSelection", + }, + ], + }, ]) const tabList = readonly([ - { - no: 1, - label: "การเข้าสู่ระบบ", - path: "/manual", - childern: [ - { - no: 1.1, - label: "การเข้าสู่หน้าระบบ", - path: "/manual", - }, - { - no: 1.2, - label: "การเข้าสู่ระบบโดยใช้ User name และ Password", - path: "/login/log", - }, - { - no: 1.3, - label: "การเปลี่ยนรหัสผ่านผู้ใช้งาน", - path: "/login/password", - }, - { - no: 1.4, - label: "การลงทะเบียนผู้ใช้งานใหม่", - path: "/login/newuser", - }, - { - no: 1.5, - label: "การออกจากระบบ", - path: "/login/logout", - }, - { - no: 1.6, - label: "การแสดงแจ้งเตือน", - path: "/login/noti", - } - ] - }, + { + no: 1, + label: "การเข้าสู่ระบบ", + path: "/manual", + childern: [ + { + no: 1.1, + label: "การเข้าสู่หน้าระบบ", + path: "/manual", + }, + { + no: 1.2, + label: "การเข้าสู่ระบบโดยใช้ User name และ Password", + path: "/login/log", + }, + { + no: 1.3, + label: "การเปลี่ยนรหัสผ่านผู้ใช้งาน", + path: "/login/password", + }, + { + no: 1.4, + label: "การลงทะเบียนผู้ใช้งานใหม่", + path: "/login/newuser", + }, + { + no: 1.5, + label: "การออกจากระบบ", + path: "/login/logout", + }, + { + no: 1.6, + label: "การแสดงแจ้งเตือน", + path: "/login/noti", + }, + ], + }, + { + no: 2, + label: "ระบบข้อมูลหลัก", + path: "/Datamain", + childern: [ + { + no: 2.1, + label: "การเข้าสู่ระบบข้อมูลหลัก", + path: "/Datamain", + }, + { + no: 2.2, + label: "ข้อมูลเกี่ยวกับบุคคล", + path: "/Data/about", + }, + { + no: 2.3, + label: "ข้อมูลโครงสร้างหน่วยงาน", + path: "/Data/gov", + }, + { + no: 2.4, + label: "ข้อมูลตำแหน่งของข้าราชการ", + path: "/Data/officer", + }, + { + no: 2.5, + label: "ข้อมูลตำแหน่งของลูกจ้าง", + path: "/Data/employee", + }, + { + no: 2.6, + label: "ข้อมูลปฏิทินวันหยุด", + path: "/Data/calendar", + }, + { + no: 2.7, + label: "ข้อมูลเครื่องราชอิสริยาภรณ์", + path: "/Data/insignia", + }, + ], + }, - { - no: 2, - label: "ระบบข้อมูลหลัก", - path: "/Datamain", - childern: [ - { - no: 2.1, - label: "การเข้าสู่ระบบข้อมูลหลัก", - path: "/Datamain", - }, - { - no: 2.2, - label: "ข้อมูลเกี่ยวกับบุคคล", - path: "/Data/about", - }, - { - no: 2.3, - label: "ข้อมูลโครงสร้างหน่วยงาน", - path: "/Data/gov", - }, - { - no: 2.4, - label: "ข้อมูลตำแหน่งของข้าราชการ", - path: "/Data/officer", - }, - { - no: 2.5, - label: "ข้อมูลตำแหน่งของลูกจ้าง", - path: "/Data/employee", - }, - { - no: 2.6, - label: "ข้อมูลปฏิทินวันหยุด", - path: "/Data/calendar", - }, - { - no: 2.7, - label: "ข้อมูลเครื่องราชอิสริยาภรณ์", - path: "/Data/insignia", - } - ] - }, + { + no: 3, + label: "ระบบโครงสร้างอัตรากำลัง", + path: "/Structuremain", + childern: [ + { + no: 3.1, + label: "การเข้าสู่ระบบโครงสร้างอัตรากำลัง", + path: "/Structuremain", + }, + { + no: 3.2, + label: "จัดการตำแหน่ง", + path: "/Structure/Position", + }, + { + no: 3.3, + label: "แผนภูมิโครงสร้าง", + path: "/Structure/Structure", + }, + { + no: 3.4, + label: "แผนภูมิองค์กร", + path: "/Structure/Organchart", + }, + { + no: 3.5, + label: "ผังโครงสร้าง", + path: "/Structure/Chartstru", + }, + { + no: 3.6, + label: "จัดการบัญชี 2", + path: "/Structure/Account2", + }, + { + no: 3.7, + label: "รายงานบัญชี", + path: "/Structure/Report", + }, + { + no: 3.8, + label: "ผังโครงสร้างลูกจ้าง", + path: "/Structure/Chartemploy", + }, + ], + }, + { + no: 4, + label: "ระบบทะเบียนประวัติ", + path: "/Registrationmain", + childern: [ + { + no: 4.1, + label: "การเข้าสู่หน้าระบบทะเบียนประวัติ", + path: "/Registrationmain", + }, + { + no: 4.2, + label: "การค้นหาข้อมูลทะเบียนประวัติ", + path: "/Registration/find", + }, + { + no: 4.3, + label: "การดูรายละเอียดข้อมูลทะเบียน", + path: "/Registration/detail", + }, + { + no: 4.4, + label: "การเพิ่ม แก้ไข ดูประวัติแก้ไขข้อมูล", + path: "/Registration/edit", + }, + { + no: 4.5, + label: "การค้นหาข้อมูลส่วนตัว การเลือกคอลัมน์แสดงผลข้อมูล", + path: "/Registration/select", + }, + { + no: 4.6, + label: "การปรับหน้าต่างแสดงผลหน้าข้อมูลส่วนตัว", + path: "/Registration/window", + }, + ], + }, - { - no: 3, - label: "ระบบโครงสร้างอัตรากำลัง", - path: "/Structuremain", - childern: [ - { - no: 3.1, - label: "การเข้าสู่ระบบโครงสร้างอัตรากำลัง", - path: "/Structuremain", - }, - { - no: 3.2, - label: "จัดการตำแหน่ง", - path: "/Structure/Position", - }, - { - no: 3.3, - label: "แผนภูมิโครงสร้าง", - path: "/Structure/Structure", - }, - { - no: 3.4, - label: "แผนภูมิองค์กร", - path: "/Structure/Organchart", - }, - { - no: 3.5, - label: "ผังโครงสร้าง", - path: "/Structure/Chartstru", - }, - { - no: 3.6, - label: "จัดการบัญชี 2", - path: "/Structure/Account2", - }, - { - no: 3.7, - label: "รายงานบัญชี", - path: "/Structure/Report", - }, - { - no: 3.8, - label: "ผังโครงสร้างลูกจ้าง", - path: "/Structure/Chartemploy", - } - ] - }, + { + no: 5, + label: "หน้าจัดการระบบสรรหา", + path: "/Recruitmain", + childern: [ + { + no: 5.1, + label: "การเข้าสู่หน้าระบบสรรหา", + path: "/Recruitmain", + }, + { + no: 5.2, + label: "การตั้งค่าเว็บไซต์ระบบสรรหา", + path: "/Recruit/setting", + }, + { + no: 5.3, + label: "สอบแข่งขัน", + path: "", + childern: [ + { + no: 5.31, + label: "จัดการรอบสอบการแข่งขัน", + path: "/Recruit/managecompet", + }, + { + no: 5.32, + label: "สถิติสมัครสอบแข่งขัน", + path: "/Recruit/staticompet", + }, + ], + }, + { + no: 5.4, + label: "คัดเลือก", + path: "", + childern: [ + { + no: 5.41, + label: "จัดการรอบคัดเลือก", + path: "/Recruit/qualifiers", + }, + { + no: 5.42, + label: "จัดการรอบคัดเลือกคนพิการ", + path: "/Recruit/disabilities", + }, + { + no: 5.43, + label: "จัดการรายชื่อคัดเลือก", + path: "/Recruit/selection", + }, + ], + }, + ], + }, +]) - - - { - no: 4, - label: "ระบบทะเบียนประวัติ", - path: "/Registrationmain", - childern: [ - { - no: 4.1, - label: "การเข้าสู่หน้าระบบทะเบียนประวัติ", - path: "/Registrationmain", - }, - { - no: 4.2, - label: "การค้นหาข้อมูลทะเบียนประวัติ", - path: "/Registration/find", - }, - { - no: 4.3, - label: "การดูรายละเอียดข้อมูลทะเบียน", - path: "/Registration/detail", - }, - { - no: 4.4, - label: "การเพิ่ม แก้ไข ดูประวัติแก้ไขข้อมูล", - path: "/Registration/edit", - }, - { - no: 4.5, - label: "การค้นหาข้อมูลส่วนตัว การเลือกคอลัมน์แสดงผลข้อมูล", - path: "/Registration/select", - }, - { - no: 4.6, - label: "การปรับหน้าต่างแสดงผลหน้าข้อมูลส่วนตัว", - path: "/Registration/window", - } - ] - }, - - - { - no: 5, - label: "หน้าจัดการระบบสรรหา", - path: "/Recruitmain", - childern: [ - { - no: 5.1, - label: "การเข้าสู่หน้าระบบสรรหา", - path: "/Recruitmain", - }, - { - no: 5.2, - label: "การตั้งค่าเว็บไซต์ระบบสรรหา", - path: "/Recruit/setting", - }, - { - no: 5.3, - label: "สอบแข่งขัน", - path: "", - childern: [ - { - no: 5.31, - label: "จัดการรอบสอบการแข่งขัน", - path: "/Recruit/managecompet", - }, - { - no: 5.32, - label: "สถิติสมัครสอบแข่งขัน", - path: "/Recruit/staticompet", - }, - ] - }, - { - no: 5.4, - label: "คัดเลือก", - path: "", - childern: [ - { - no: 5.41, - label: "จัดการรอบคัดเลือก", - path: "/Recruit/qualifiers", - }, - { - no: 5.42, - label: "จัดการรอบคัดเลือกคนพิการ", - path: "/Recruit/disabilities", - }, - { - no: 5.43, - label: "จัดการรายชื่อคัดเลือก", - path: "/Recruit/selection", - } - ] - } - ] - } - -]); - -export { menuList, tabList, tabListLogin, tabListDatamain, tabStructuremain, tabRegistration, tabRecruit }; -export type { ScrollType, tabType, menuType, notiType, optionType }; +export { menuList, tabList, tabListLogin, tabListDatamain, tabStructuremain, tabRegistration, tabRecruit } +export type { ScrollType, tabType, menuType, notiType, optionType } diff --git a/src/modules/01_manual/components/2_data/24_Officer.vue b/src/modules/01_manual/components/2_data/24_Officer.vue index 5b5a9689..63620a59 100644 --- a/src/modules/01_manual/components/2_data/24_Officer.vue +++ b/src/modules/01_manual/components/2_data/24_Officer.vue @@ -1,11 +1,11 @@ diff --git a/src/router/index.ts b/src/router/index.ts index 31353479..310e2b48 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,79 +1,79 @@ -import { createRouter, createWebHistory } from "vue-router"; +import { createRouter, createWebHistory } from "vue-router" -const MainLayout = () => import("@/views/MainLayout.vue"); -const Dashboard = () => import("@/views/Dashboard.vue"); -const Error404NotFound = () => import("@/views/Error404NotFound.vue"); +const MainLayout = () => import("@/views/MainLayout.vue") +const Dashboard = () => import("@/views/Dashboard.vue") +const Error404NotFound = () => import("@/views/Error404NotFound.vue") -import ModuleManual from "@/modules/01_manual/router"; +import ModuleManual from "@/modules/01_manual/router" // TODO: ใช้หรือไม่? -import keycloak from "@/plugins/keycloak"; +import keycloak from "@/plugins/keycloak" const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path: "/", - name: "home", - component: MainLayout, - children: [ - { - path: "/", - name: "dashboard", - component: Dashboard, - meta: { - Auth: true, - Key: [7], - Role: "dashboard", - }, - }, - ...ModuleManual, - ], - }, - /** - * 404 Not Found - * ref: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route - */ - { - // path: "/:catchAll(.*)*", // TODO: ใช้ pathMatch แทนตามในเอกสารแนะนำ คงไว้เผื่อจำเป็น - path: "/:pathMatch(.*)*", - component: Error404NotFound, - }, - ], + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: "/", + name: "home", + component: MainLayout, + children: [ + // { + // path: "/", + // name: "dashboard", + // component: Dashboard, + // meta: { + // Auth: true, + // Key: [7], + // Role: "dashboard", + // }, + // }, + ...ModuleManual, + ], + }, + /** + * 404 Not Found + * ref: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route + */ + { + // path: "/:catchAll(.*)*", // TODO: ใช้ pathMatch แทนตามในเอกสารแนะนำ คงไว้เผื่อจำเป็น + path: "/:pathMatch(.*)*", + component: Error404NotFound, + }, + ], - scrollBehavior(to, from, savedPosition) { - if (savedPosition) { - return savedPosition; - } else if (to.hash) { - return { - el: to.hash, - behavior: "smooth", - }; - } - }, -}); + scrollBehavior(to, from, savedPosition) { + if (savedPosition) { + return savedPosition + } else if (to.hash) { + return { + el: to.hash, + behavior: "smooth", + } + } + }, +}) router.beforeEach((to, from, next) => { - if (to.meta.Auth) { - if (!keycloak.authenticated) { - keycloak.login({ - redirectUri: `${window.location.protocol}//${window.location.host}${to.path}`, - locale: "th", - }); - } else { - // keycloak.updateToken(60); - const role = keycloak.tokenParsed?.role; - if (role.includes(to.meta.Role)) { - next(); - } else { - next({ path: "" }); - // next(); - } - } - } else { - next(); - } - // next(); -}); + // if (to.meta.Auth) { + // if (!keycloak.authenticated) { + // keycloak.login({ + // redirectUri: `${window.location.protocol}//${window.location.host}${to.path}`, + // locale: "th", + // }) + // } else { + // // keycloak.updateToken(60); + // const role = keycloak.tokenParsed?.role + // if (role.includes(to.meta.Role)) { + // next() + // } else { + // next({ path: "" }) + // // next(); + // } + // } + // } else { + // next() + // } + next() +}) -export default router; +export default router diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index f3985109..402b5728 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -1,218 +1,207 @@