diff --git a/src/components/NotifyConfirm.vue b/src/components/NotifyConfirm.vue new file mode 100644 index 0000000..1796817 --- /dev/null +++ b/src/components/NotifyConfirm.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/modules/01_exam/components/Address.vue b/src/modules/01_exam/components/Address.vue index 52afe72..d8e3842 100644 --- a/src/modules/01_exam/components/Address.vue +++ b/src/modules/01_exam/components/Address.vue @@ -14,6 +14,7 @@ :save="saveData" :history="true" :addData="addData" + :cancel="cancelData" />
@@ -224,7 +225,7 @@ diff --git a/src/modules/01_exam/components/Document.vue b/src/modules/01_exam/components/Document.vue index d25fde3..3f0b923 100644 --- a/src/modules/01_exam/components/Document.vue +++ b/src/modules/01_exam/components/Document.vue @@ -1,10 +1,10 @@ diff --git a/src/modules/01_exam/components/ExamFinished.vue b/src/modules/01_exam/components/ExamFinished.vue index 52c78f4..8fe7cad 100644 --- a/src/modules/01_exam/components/ExamFinished.vue +++ b/src/modules/01_exam/components/ExamFinished.vue @@ -4,7 +4,7 @@
- เจ้าหน้าที่กำลังตรวจเอกสารชำระเงิน + เจ้าหน้าที่กำลังตรวจสถานที่สอบ
สมัครสอบสำเร็จ
diff --git a/src/modules/01_exam/components/Family.vue b/src/modules/01_exam/components/Family.vue index 7d37a5d..67197d2 100644 --- a/src/modules/01_exam/components/Family.vue +++ b/src/modules/01_exam/components/Family.vue @@ -7,6 +7,7 @@ icon="mdi-account-group" :save="saveData" :addData="addData" + :cancel="cancelData" />
@@ -269,7 +270,7 @@ diff --git a/src/modules/01_exam/components/Image.vue b/src/modules/01_exam/components/Image.vue deleted file mode 100644 index f469333..0000000 --- a/src/modules/01_exam/components/Image.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/src/modules/01_exam/components/Information.vue b/src/modules/01_exam/components/Information.vue index c984ae6..12fd298 100644 --- a/src/modules/01_exam/components/Information.vue +++ b/src/modules/01_exam/components/Information.vue @@ -7,9 +7,10 @@ icon="mdi-account" :save="saveData" :addData="addData" + :cancel="cancelData" /> - -
+ +
+
+
+ + +
+ +
อัปเดต +
+
+
+
+
+ + บันทึกรูป + +
+
+ + diff --git a/src/modules/01_exam/components/Occupation.vue b/src/modules/01_exam/components/Occupation.vue index 04d642e..825b1d6 100644 --- a/src/modules/01_exam/components/Occupation.vue +++ b/src/modules/01_exam/components/Occupation.vue @@ -7,6 +7,7 @@ icon="mdi-briefcase" :save="saveData" :addData="addData" + :cancel="cancelData" />
@@ -33,7 +34,7 @@ label="ข้าราชการกรุงเทพมหานคร ตำแหน่ง" dense :disable="!edit" - size="xs" + size="md" style="font-size: 14px; color: black" /> @@ -60,7 +61,7 @@ label="บุคลากรกรุงเทพมหานคร ตำแหน่ง" dense :disable="!edit" - size="xs" + size="md" style="font-size: 14px; color: black" /> @@ -87,7 +88,7 @@ label="ข้าราชการประเภทอื่น ตำแหน่ง" dense :disable="!edit" - size="xs" + size="md" style="font-size: 14px; color: black" /> @@ -114,7 +115,7 @@ label="ลูกจ้าง/พนักงานราชการของส่วนราชการอื่น ตำแหน่ง" dense :disable="!edit" - size="xs" + size="md" style="font-size: 14px; color: black" /> @@ -127,7 +128,7 @@ label="กำลังศึกษาต่อ" dense :disable="!edit" - size="xs" + size="md" style="font-size: 14px; color: black" /> @@ -227,7 +228,7 @@ diff --git a/src/modules/01_exam/components/OtherFile.vue b/src/modules/01_exam/components/OtherFile.vue index 5b00b71..3fad262 100644 --- a/src/modules/01_exam/components/OtherFile.vue +++ b/src/modules/01_exam/components/OtherFile.vue @@ -7,6 +7,7 @@ icon="mdi-file-document" :history="false" :addData="addData" + :cancel="cancelData" />
@@ -63,7 +64,7 @@ import { ref } from 'vue' import HeaderTop from '@/components/top.vue' const edit = ref(false) -const addData = ref(false) +const addData = ref(true) const files = ref([ { key: 1, @@ -84,4 +85,6 @@ const fileUpload = async (file: any) => { method: 'POST' } } + +const cancelData = () => {} diff --git a/src/modules/01_exam/components/Profile.vue b/src/modules/01_exam/components/Profile.vue index 8ac0ffa..1941104 100644 --- a/src/modules/01_exam/components/Profile.vue +++ b/src/modules/01_exam/components/Profile.vue @@ -1,5 +1,6 @@ diff --git a/src/modules/01_exam/router.ts b/src/modules/01_exam/router.ts index 697bfad..cba08b6 100644 --- a/src/modules/01_exam/router.ts +++ b/src/modules/01_exam/router.ts @@ -2,15 +2,15 @@ const Main = () => import('@/modules/01_exam/views/ExamMain.vue') const Detail = () => import('@/modules/01_exam/views/ExamDetail.vue') export default [ - { - path: '/exam', - name: 'exam', - component: Main, - meta: { - Auth: true - // Key: [7] - } - }, + // { + // path: '/exam', + // name: 'exam', + // component: Main, + // meta: { + // Auth: true + // // Key: [7] + // } + // }, { path: '/exam/:id', name: 'examDetail', diff --git a/src/modules/01_exam/views/ExamDetail.vue b/src/modules/01_exam/views/ExamDetail.vue index 73fdcea..0620bed 100644 --- a/src/modules/01_exam/views/ExamDetail.vue +++ b/src/modules/01_exam/views/ExamDetail.vue @@ -1,10 +1,9 @@ diff --git a/src/router/index.ts b/src/router/index.ts index 1606940..a99fef6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -3,31 +3,32 @@ import HomeView from '../views/HomeView.vue' import Exam from '@/modules/01_exam/router' import Meta02 from '@/modules/02_meta/router' -import keycloak from "@/plugins/keycloak"; +import keycloak from '@/plugins/keycloak' const MainLayout = () => import('@/views/MainLayout.vue') +const Error404NotFound = () => import('@/views/Error404NotFound.vue') const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [ { - path: '/', - name: 'home', + path: '/exam/:id', + // name: 'home', component: MainLayout, children: [ - { - path: '/', - name: 'dashboard', - component: HomeView, - meta: { - Auth: true, - Key: [7] - } - }, - ...Exam, - ...Meta02 + // { + // path: '/', + // name: 'dashboard', + // component: HomeView, + // meta: { + // Auth: true, + // Key: [7] + // } + // }, + ...Exam + // ...Meta02 ] - } + }, /** * 404 Not Found * ref: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route @@ -37,6 +38,11 @@ const router = createRouter({ // path: "/:pathMatch(.*)*", // component: Error404NotFound, // }, + { + // path: "/:catchAll(.*)*", // TODO: ใช้ pathMatch แทนตามในเอกสารแนะนำ คงไว้เผื่อจำเป็น + path: '/:pathMatch(.*)*', + component: Error404NotFound + } ] }) @@ -59,20 +65,20 @@ const router = createRouter({ // ] // }) 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); - next(); - } + if (to.meta.Auth) { + if (!keycloak.authenticated) { + keycloak.login({ + redirectUri: `${window.location.protocol}//${window.location.host}${to.path}`, + locale: 'th' + }) } else { - next(); + // keycloak.updateToken(60); + next() } - // next(); - }); + } else { + next() + } + // next(); +}) export default router diff --git a/src/views/Error404NotFound.vue b/src/views/Error404NotFound.vue new file mode 100644 index 0000000..e06a8c1 --- /dev/null +++ b/src/views/Error404NotFound.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index eb2c506..23f3347 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -68,7 +68,7 @@ const doLogout = () => { - { size="20px" color="grey-7" /> - + --> @@ -208,7 +208,7 @@ const doLogout = () => { - {
- { dense exact > - @@ -299,7 +271,7 @@ const doLogout = () => {
-
+ --> diff --git a/vite.config.ts b/vite.config.ts index 503d8e0..2e9eeec 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,7 +8,9 @@ import { quasar, transformAssetUrls } from '@quasar/vite-plugin' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ - vue(), + vue({ + template: { transformAssetUrls } + }), quasar({ sassVariables: 'src/style/quasar-variables.sass' }), @@ -18,5 +20,8 @@ export default defineConfig({ alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } + }, + build: { + target: 'esnext' } })