@@ -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 @@
-
- กลับ
-
- สมัครสอบ
+ {{
+ tittle
+ }}
@@ -16,21 +15,34 @@
color="primary"
animated
>
-
+
-
+
-
+
-
+
+
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 @@
+
+
+
+
+
+
ไม่พบหน้าที่ต้องการ
+
(404 Not Found)
+
+
+
+
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 = () => {
- {
-
-
+ -->
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'
}
})