@finema/finework-layer 0.2.65 → 0.2.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +1 -1
- package/.playground/app/pages/layout-admin/[id]/index.vue +145 -145
- package/.playground/app/pages/layout-admin/test/[id]/index.vue +286 -286
- package/.playground/app/pages/layout-admin.vue +275 -275
- package/.playground/app/pages/submenu/layout-admin.vue +210 -210
- package/.vscode/extensions.json +0 -1
- package/CHANGELOG.md +336 -334
- package/app/app.config.ts +136 -136
- package/app/app.vue +10 -10
- package/app/assets/css/main.css +75 -75
- package/app/components/Button/ActionIcon.vue +29 -29
- package/app/components/Button/Back.vue +22 -22
- package/app/components/InfoItemList.vue +196 -196
- package/app/components/Layout/Admin/Sidebar.vue +329 -329
- package/app/components/Layout/Admin/index.vue +224 -224
- package/app/components/Layout/Apps.vue +45 -45
- package/app/components/Layout/User/index.vue +99 -99
- package/app/components/StatusBox.vue +56 -56
- package/app/composables/useRequestOptions.ts +50 -50
- package/app/constants/routes.ts +86 -86
- package/app/error.vue +218 -218
- package/app/middleware/auth.ts +45 -45
- package/app/middleware/common.ts +12 -12
- package/app/middleware/guest.ts +7 -7
- package/app/middleware/permissions.ts +29 -29
- package/bun.lock +2 -2
- package/index.d.ts +16 -16
- package/nuxt.config.ts +41 -41
- package/package.json +2 -2
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="overflow-hidden pt-[80px]">
|
|
3
|
-
<div class="flex min-h-[calc(100vh-80px)] flex-col">
|
|
4
|
-
<nav
|
|
5
|
-
class="fixed top-0 left-0 z-20 flex min-h-[80px] w-screen items-center justify-center bg-white"
|
|
6
|
-
style="box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04)"
|
|
7
|
-
>
|
|
8
|
-
<div class="mx-auto flex w-full px-4 md:px-8">
|
|
9
|
-
<div class="flex items-center gap-4">
|
|
10
|
-
<NuxtLink :to="routes.home.to">
|
|
11
|
-
<img
|
|
12
|
-
src="/logo-mini.png"
|
|
13
|
-
alt="logo_mini"
|
|
14
|
-
class="h-[27px] w-[172px] cursor-pointer"
|
|
15
|
-
/>
|
|
16
|
-
</NuxtLink>
|
|
17
|
-
<Apps />
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<div class="flex flex-1 items-center justify-end gap-2">
|
|
21
|
-
<DropdownMenu
|
|
22
|
-
:items="userMenuItems"
|
|
23
|
-
size="xl"
|
|
24
|
-
:content="{
|
|
25
|
-
align: 'end',
|
|
26
|
-
side: 'bottom',
|
|
27
|
-
}"
|
|
28
|
-
:ui="{
|
|
29
|
-
content: 'w-48',
|
|
30
|
-
}"
|
|
31
|
-
>
|
|
32
|
-
<div class="relative flex cursor-pointer items-center gap-2">
|
|
33
|
-
<div class="hidden flex-col justify-end text-right lg:flex">
|
|
34
|
-
<p class="text-sm font-bold">
|
|
35
|
-
{{
|
|
36
|
-
auth.me.value?.display_name || auth.me.value?.full_name
|
|
37
|
-
}}
|
|
38
|
-
</p>
|
|
39
|
-
<p class="text-muted text-xs">
|
|
40
|
-
{{ auth.me.value?.email }}
|
|
41
|
-
</p>
|
|
42
|
-
</div>
|
|
43
|
-
<Avatar
|
|
44
|
-
class="border-muted size-[36px] border text-2xl"
|
|
45
|
-
icon="ri:user-line"
|
|
46
|
-
:src="auth.me.value?.avatar_url"
|
|
47
|
-
/>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="overflow-hidden pt-[80px]">
|
|
3
|
+
<div class="flex min-h-[calc(100vh-80px)] flex-col">
|
|
4
|
+
<nav
|
|
5
|
+
class="fixed top-0 left-0 z-20 flex min-h-[80px] w-screen items-center justify-center bg-white"
|
|
6
|
+
style="box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04)"
|
|
7
|
+
>
|
|
8
|
+
<div class="mx-auto flex w-full px-4 md:px-8">
|
|
9
|
+
<div class="flex items-center gap-4">
|
|
10
|
+
<NuxtLink :to="routes.home.to">
|
|
11
|
+
<img
|
|
12
|
+
src="/logo-mini.png"
|
|
13
|
+
alt="logo_mini"
|
|
14
|
+
class="h-[27px] w-[172px] cursor-pointer"
|
|
15
|
+
/>
|
|
16
|
+
</NuxtLink>
|
|
17
|
+
<Apps />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="flex flex-1 items-center justify-end gap-2">
|
|
21
|
+
<DropdownMenu
|
|
22
|
+
:items="userMenuItems"
|
|
23
|
+
size="xl"
|
|
24
|
+
:content="{
|
|
25
|
+
align: 'end',
|
|
26
|
+
side: 'bottom',
|
|
27
|
+
}"
|
|
28
|
+
:ui="{
|
|
29
|
+
content: 'w-48',
|
|
30
|
+
}"
|
|
31
|
+
>
|
|
32
|
+
<div class="relative flex cursor-pointer items-center gap-2">
|
|
33
|
+
<div class="hidden flex-col justify-end text-right lg:flex">
|
|
34
|
+
<p class="text-sm font-bold">
|
|
35
|
+
{{
|
|
36
|
+
auth.me.value?.display_name || auth.me.value?.full_name
|
|
37
|
+
}}
|
|
38
|
+
</p>
|
|
39
|
+
<p class="text-muted text-xs">
|
|
40
|
+
{{ auth.me.value?.email }}
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
<Avatar
|
|
44
|
+
class="border-muted size-[36px] border text-2xl"
|
|
45
|
+
icon="ri:user-line"
|
|
46
|
+
:src="auth.me.value?.avatar_url"
|
|
47
|
+
/>
|
|
48
48
|
<Icon
|
|
49
49
|
name="i-ph:caret-down-light"
|
|
50
50
|
class="size-5"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
</DropdownMenu>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</nav>
|
|
57
|
-
<main class="mx-auto w-full max-w-7xl flex-1 px-4 pb-20 2xl:max-w-7/10">
|
|
58
|
-
<div
|
|
59
|
-
v-if="app.pageMeta.title"
|
|
60
|
-
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-center"
|
|
61
|
-
>
|
|
62
|
-
<div class="flex flex-1 flex-col">
|
|
63
|
-
<h1
|
|
64
|
-
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
65
|
-
:title="app.pageMeta.title"
|
|
66
|
-
>
|
|
67
|
-
{{ app.pageMeta.title }}
|
|
68
|
-
<span id="page-title-extra" />
|
|
69
|
-
</h1>
|
|
70
|
-
|
|
71
|
-
<div id="page-subtitle" />
|
|
72
|
-
</div>
|
|
73
|
-
<div id="page-header" />
|
|
74
|
-
</div>
|
|
75
|
-
<slot />
|
|
76
|
-
</main>
|
|
77
|
-
<div id="page-footer" />
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script lang="ts" setup>
|
|
83
|
-
import type { DropdownMenuItem } from '@nuxt/ui'
|
|
84
|
-
import Apps from '../Apps.vue'
|
|
85
|
-
|
|
86
|
-
const app = useApp()
|
|
87
|
-
const auth = useAuth()
|
|
88
|
-
const userMenuItems: DropdownMenuItem[] = [
|
|
89
|
-
{
|
|
90
|
-
label: 'View profile',
|
|
91
|
-
icon: 'i-lucide-user',
|
|
92
|
-
to: routes.account.profile.to,
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
label: routes.logout.label,
|
|
97
|
-
icon: 'i-lucide-log-out',
|
|
98
|
-
to: routes.logout.to,
|
|
99
|
-
external: true,
|
|
100
|
-
},
|
|
101
|
-
]
|
|
102
|
-
</script>
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</DropdownMenu>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</nav>
|
|
57
|
+
<main class="mx-auto w-full max-w-7xl flex-1 px-4 pb-20 2xl:max-w-7/10">
|
|
58
|
+
<div
|
|
59
|
+
v-if="app.pageMeta.title"
|
|
60
|
+
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-center"
|
|
61
|
+
>
|
|
62
|
+
<div class="flex flex-1 flex-col">
|
|
63
|
+
<h1
|
|
64
|
+
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
65
|
+
:title="app.pageMeta.title"
|
|
66
|
+
>
|
|
67
|
+
{{ app.pageMeta.title }}
|
|
68
|
+
<span id="page-title-extra" />
|
|
69
|
+
</h1>
|
|
70
|
+
|
|
71
|
+
<div id="page-subtitle" />
|
|
72
|
+
</div>
|
|
73
|
+
<div id="page-header" />
|
|
74
|
+
</div>
|
|
75
|
+
<slot />
|
|
76
|
+
</main>
|
|
77
|
+
<div id="page-footer" />
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script lang="ts" setup>
|
|
83
|
+
import type { DropdownMenuItem } from '@nuxt/ui'
|
|
84
|
+
import Apps from '../Apps.vue'
|
|
85
|
+
|
|
86
|
+
const app = useApp()
|
|
87
|
+
const auth = useAuth()
|
|
88
|
+
const userMenuItems: DropdownMenuItem[] = [
|
|
89
|
+
{
|
|
90
|
+
label: 'View profile',
|
|
91
|
+
icon: 'i-lucide-user',
|
|
92
|
+
to: routes.account.profile.to,
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
{
|
|
96
|
+
label: routes.logout.label,
|
|
97
|
+
icon: 'i-lucide-log-out',
|
|
98
|
+
to: routes.logout.to,
|
|
99
|
+
external: true,
|
|
100
|
+
},
|
|
101
|
+
]
|
|
102
|
+
</script>
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slot v-if="skip" />
|
|
3
|
-
<template v-else>
|
|
4
|
-
<Card v-if="status.isLoading">
|
|
5
|
-
<div class="flex items-center justify-center py-12">
|
|
6
|
-
<Loader />
|
|
7
|
-
</div>
|
|
8
|
-
</Card>
|
|
9
|
-
|
|
10
|
-
<!-- Not Found State -->
|
|
11
|
-
<Card v-else-if="status.isSuccess && !data || status.isError && status.errorData?.code === 'NOT_FOUND'">
|
|
12
|
-
<div class="py-12 text-center">
|
|
13
|
-
<Icon
|
|
14
|
-
name="lucide:search-x"
|
|
15
|
-
class="mx-auto mb-4 text-gray-400"
|
|
16
|
-
size="48"
|
|
17
|
-
/>
|
|
18
|
-
<h3 class="mb-2 text-lg font-medium text-gray-900">
|
|
19
|
-
ไม่พบข้อมูล
|
|
20
|
-
</h3>
|
|
21
|
-
<p class="text-gray-600">
|
|
22
|
-
ไม่พบข้อมูลที่คุณค้นหา กรุณาลองใหม่อีกครั้ง
|
|
23
|
-
</p>
|
|
24
|
-
</div>
|
|
25
|
-
</Card>
|
|
26
|
-
<Card v-else-if="status.isError">
|
|
27
|
-
<div class="py-12 text-center">
|
|
28
|
-
<Icon
|
|
29
|
-
name="lucide:alert-circle"
|
|
30
|
-
class="mx-auto mb-4 text-red-500"
|
|
31
|
-
size="48"
|
|
32
|
-
/>
|
|
33
|
-
<h3 class="mb-2 text-lg font-medium text-gray-900">
|
|
34
|
-
เกิดข้อผิดพลาด
|
|
35
|
-
</h3>
|
|
36
|
-
<p class="text-gray-600">
|
|
37
|
-
ไม่สามารถโหลดข้อมูลได้ กรุณาลองใหม่อีกครั้ง
|
|
38
|
-
</p>
|
|
39
|
-
</div>
|
|
40
|
-
</Card>
|
|
41
|
-
<slot
|
|
42
|
-
v-else-if="data"
|
|
43
|
-
:data="data"
|
|
44
|
-
/>
|
|
45
|
-
</template>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script lang="ts" setup generic="T">
|
|
49
|
-
import type { IStatus } from '#core/types/lib'
|
|
50
|
-
|
|
51
|
-
defineProps<{
|
|
52
|
-
status: IStatus
|
|
53
|
-
data: T
|
|
54
|
-
skip?: boolean
|
|
55
|
-
}>()
|
|
56
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<slot v-if="skip" />
|
|
3
|
+
<template v-else>
|
|
4
|
+
<Card v-if="status.isLoading">
|
|
5
|
+
<div class="flex items-center justify-center py-12">
|
|
6
|
+
<Loader />
|
|
7
|
+
</div>
|
|
8
|
+
</Card>
|
|
9
|
+
|
|
10
|
+
<!-- Not Found State -->
|
|
11
|
+
<Card v-else-if="status.isSuccess && !data || status.isError && status.errorData?.code === 'NOT_FOUND'">
|
|
12
|
+
<div class="py-12 text-center">
|
|
13
|
+
<Icon
|
|
14
|
+
name="lucide:search-x"
|
|
15
|
+
class="mx-auto mb-4 text-gray-400"
|
|
16
|
+
size="48"
|
|
17
|
+
/>
|
|
18
|
+
<h3 class="mb-2 text-lg font-medium text-gray-900">
|
|
19
|
+
ไม่พบข้อมูล
|
|
20
|
+
</h3>
|
|
21
|
+
<p class="text-gray-600">
|
|
22
|
+
ไม่พบข้อมูลที่คุณค้นหา กรุณาลองใหม่อีกครั้ง
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
</Card>
|
|
26
|
+
<Card v-else-if="status.isError">
|
|
27
|
+
<div class="py-12 text-center">
|
|
28
|
+
<Icon
|
|
29
|
+
name="lucide:alert-circle"
|
|
30
|
+
class="mx-auto mb-4 text-red-500"
|
|
31
|
+
size="48"
|
|
32
|
+
/>
|
|
33
|
+
<h3 class="mb-2 text-lg font-medium text-gray-900">
|
|
34
|
+
เกิดข้อผิดพลาด
|
|
35
|
+
</h3>
|
|
36
|
+
<p class="text-gray-600">
|
|
37
|
+
ไม่สามารถโหลดข้อมูลได้ กรุณาลองใหม่อีกครั้ง
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
</Card>
|
|
41
|
+
<slot
|
|
42
|
+
v-else-if="data"
|
|
43
|
+
:data="data"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script lang="ts" setup generic="T">
|
|
49
|
+
import type { IStatus } from '#core/types/lib'
|
|
50
|
+
|
|
51
|
+
defineProps<{
|
|
52
|
+
status: IStatus
|
|
53
|
+
data: T
|
|
54
|
+
skip?: boolean
|
|
55
|
+
}>()
|
|
56
|
+
</script>
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import type { AxiosRequestConfig } from 'axios'
|
|
2
|
-
|
|
3
|
-
export const useRequestOptions = () => {
|
|
4
|
-
const config = useRuntimeConfig()
|
|
5
|
-
|
|
6
|
-
const mock = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
7
|
-
baseURL: string
|
|
8
|
-
} => {
|
|
9
|
-
return {
|
|
10
|
-
baseURL: config.public.baseAPIMock || 'http://localhost:3000/api/mock',
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const base = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
15
|
-
baseURL: string
|
|
16
|
-
} => {
|
|
17
|
-
return {
|
|
18
|
-
baseURL: config.public.baseAPI,
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const auth = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
23
|
-
baseURL: string
|
|
24
|
-
} => {
|
|
25
|
-
return {
|
|
26
|
-
baseURL: config.public.baseAPI,
|
|
27
|
-
headers: {
|
|
28
|
-
Authorization: `Bearer ${useAuth().token.value}`,
|
|
29
|
-
},
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const file = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
34
|
-
baseURL: string
|
|
35
|
-
} => {
|
|
36
|
-
return {
|
|
37
|
-
baseURL: config.public.baseAPI + '/uploads',
|
|
38
|
-
headers: {
|
|
39
|
-
Authorization: `Bearer ${useAuth().token.value}`,
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
base,
|
|
46
|
-
mock,
|
|
47
|
-
auth,
|
|
48
|
-
file,
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios'
|
|
2
|
+
|
|
3
|
+
export const useRequestOptions = () => {
|
|
4
|
+
const config = useRuntimeConfig()
|
|
5
|
+
|
|
6
|
+
const mock = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
7
|
+
baseURL: string
|
|
8
|
+
} => {
|
|
9
|
+
return {
|
|
10
|
+
baseURL: config.public.baseAPIMock || 'http://localhost:3000/api/mock',
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const base = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
15
|
+
baseURL: string
|
|
16
|
+
} => {
|
|
17
|
+
return {
|
|
18
|
+
baseURL: config.public.baseAPI,
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const auth = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
23
|
+
baseURL: string
|
|
24
|
+
} => {
|
|
25
|
+
return {
|
|
26
|
+
baseURL: config.public.baseAPI,
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: `Bearer ${useAuth().token.value}`,
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const file = (): Omit<AxiosRequestConfig, 'baseURL'> & {
|
|
34
|
+
baseURL: string
|
|
35
|
+
} => {
|
|
36
|
+
return {
|
|
37
|
+
baseURL: config.public.baseAPI + '/uploads',
|
|
38
|
+
headers: {
|
|
39
|
+
Authorization: `Bearer ${useAuth().token.value}`,
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
base,
|
|
46
|
+
mock,
|
|
47
|
+
auth,
|
|
48
|
+
file,
|
|
49
|
+
}
|
|
50
|
+
}
|
package/app/constants/routes.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
export const routes = {
|
|
2
|
-
home: {
|
|
3
|
-
label: 'หน้าแรก',
|
|
4
|
-
to: '/',
|
|
5
|
-
},
|
|
6
|
-
chooseTeam: {
|
|
7
|
-
label: 'เลือกทีม',
|
|
8
|
-
to: '/choose-team',
|
|
9
|
-
},
|
|
10
|
-
login: {
|
|
11
|
-
label: 'เลือก',
|
|
12
|
-
to: '/login',
|
|
13
|
-
},
|
|
14
|
-
logout: {
|
|
15
|
-
label: 'Log out',
|
|
16
|
-
to: '/api/auth/logout',
|
|
17
|
-
},
|
|
18
|
-
releaseHistory: {
|
|
19
|
-
label: 'Release History',
|
|
20
|
-
to: '/releases',
|
|
21
|
-
icon: 'heroicons:tag',
|
|
22
|
-
},
|
|
23
|
-
account: {
|
|
24
|
-
profile: {
|
|
25
|
-
label: 'โปรไฟล์',
|
|
26
|
-
to: '/account/profile',
|
|
27
|
-
icon: 'mage:user',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
announcements: {
|
|
32
|
-
label: 'Finema Newsletter',
|
|
33
|
-
to: '/announcements',
|
|
34
|
-
icon: 'mage:announcement',
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
adminClockin: {
|
|
38
|
-
checkinDashboard: {
|
|
39
|
-
label: 'ภาพรวมเช็คอิน',
|
|
40
|
-
icon: 'mage:dashboard',
|
|
41
|
-
to: '/clockin-admin',
|
|
42
|
-
permissions: ['clockin:ADMIN'],
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
adminTimesheet: {
|
|
46
|
-
summaryReport: {
|
|
47
|
-
label: 'ภาพรวม',
|
|
48
|
-
icon: 'heroicons-outline:user-group',
|
|
49
|
-
to: '/timesheet-admin/reports/summary',
|
|
50
|
-
permissions: ['timesheet:ADMIN'],
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
admin: {
|
|
54
|
-
users: {
|
|
55
|
-
label: 'จัดการผู้ใช้งาน',
|
|
56
|
-
icon: 'hugeicons:user-circle-02',
|
|
57
|
-
to: '/admin/users',
|
|
58
|
-
// permissions: ['setting:SUPER'],
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
clockin: {
|
|
62
|
-
home: {
|
|
63
|
-
label: 'Clock-In',
|
|
64
|
-
icon: 'i-heroicons-outline:location-marker',
|
|
65
|
-
to: '/clockin',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
timesheet: {
|
|
69
|
-
home: {
|
|
70
|
-
label: 'Timesheet',
|
|
71
|
-
icon: 'mage:dashboard',
|
|
72
|
-
to: '/timesheet',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
pmo: {
|
|
76
|
-
project: {
|
|
77
|
-
projects: {
|
|
78
|
-
label: 'โครงการของฉัน',
|
|
79
|
-
to: '/pmo/projects',
|
|
80
|
-
icon: 'lucide:layers',
|
|
81
|
-
permissions: ['pmo:USER', 'pmo:ADMIN', 'pmo:SUPER'],
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
} as const
|
|
1
|
+
export const routes = {
|
|
2
|
+
home: {
|
|
3
|
+
label: 'หน้าแรก',
|
|
4
|
+
to: '/',
|
|
5
|
+
},
|
|
6
|
+
chooseTeam: {
|
|
7
|
+
label: 'เลือกทีม',
|
|
8
|
+
to: '/choose-team',
|
|
9
|
+
},
|
|
10
|
+
login: {
|
|
11
|
+
label: 'เลือก',
|
|
12
|
+
to: '/login',
|
|
13
|
+
},
|
|
14
|
+
logout: {
|
|
15
|
+
label: 'Log out',
|
|
16
|
+
to: '/api/auth/logout',
|
|
17
|
+
},
|
|
18
|
+
releaseHistory: {
|
|
19
|
+
label: 'Release History',
|
|
20
|
+
to: '/releases',
|
|
21
|
+
icon: 'heroicons:tag',
|
|
22
|
+
},
|
|
23
|
+
account: {
|
|
24
|
+
profile: {
|
|
25
|
+
label: 'โปรไฟล์',
|
|
26
|
+
to: '/account/profile',
|
|
27
|
+
icon: 'mage:user',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
announcements: {
|
|
32
|
+
label: 'Finema Newsletter',
|
|
33
|
+
to: '/announcements',
|
|
34
|
+
icon: 'mage:announcement',
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
adminClockin: {
|
|
38
|
+
checkinDashboard: {
|
|
39
|
+
label: 'ภาพรวมเช็คอิน',
|
|
40
|
+
icon: 'mage:dashboard',
|
|
41
|
+
to: '/clockin-admin',
|
|
42
|
+
permissions: ['clockin:ADMIN'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
adminTimesheet: {
|
|
46
|
+
summaryReport: {
|
|
47
|
+
label: 'ภาพรวม',
|
|
48
|
+
icon: 'heroicons-outline:user-group',
|
|
49
|
+
to: '/timesheet-admin/reports/summary',
|
|
50
|
+
permissions: ['timesheet:ADMIN'],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
admin: {
|
|
54
|
+
users: {
|
|
55
|
+
label: 'จัดการผู้ใช้งาน',
|
|
56
|
+
icon: 'hugeicons:user-circle-02',
|
|
57
|
+
to: '/admin/users',
|
|
58
|
+
// permissions: ['setting:SUPER'],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
clockin: {
|
|
62
|
+
home: {
|
|
63
|
+
label: 'Clock-In',
|
|
64
|
+
icon: 'i-heroicons-outline:location-marker',
|
|
65
|
+
to: '/clockin',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
timesheet: {
|
|
69
|
+
home: {
|
|
70
|
+
label: 'Timesheet',
|
|
71
|
+
icon: 'mage:dashboard',
|
|
72
|
+
to: '/timesheet',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
pmo: {
|
|
76
|
+
project: {
|
|
77
|
+
projects: {
|
|
78
|
+
label: 'โครงการของฉัน',
|
|
79
|
+
to: '/pmo/projects',
|
|
80
|
+
icon: 'lucide:layers',
|
|
81
|
+
permissions: ['pmo:USER', 'pmo:ADMIN', 'pmo:SUPER'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
} as const
|