@finema/finework-layer 0.2.75 → 0.2.76

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.
Files changed (51) hide show
  1. package/.husky/pre-commit +1 -1
  2. package/.playground/.env.example +5 -0
  3. package/.playground/app/assets/css/main.css +6 -6
  4. package/.playground/app/pages/layout-admin/[id]/index.vue +145 -145
  5. package/.playground/app/pages/layout-admin/test/[id]/index.vue +286 -286
  6. package/.playground/app/pages/layout-admin.vue +285 -285
  7. package/.playground/app/pages/layout-user.vue +284 -0
  8. package/.playground/app/pages/submenu/layout-admin.vue +210 -210
  9. package/.playground/public/admin/clock-in-admin-logo.png +0 -0
  10. package/.playground/public/admin/clock-in-logo.png +0 -0
  11. package/.playground/public/admin/clock-in.png +0 -0
  12. package/.playground/public/admin/pmo-logo.png +0 -0
  13. package/.playground/public/admin/spider-web.png +0 -0
  14. package/.playground/public/admin/super-admin-logo.png +0 -0
  15. package/.playground/public/admin/super-admin.png +0 -0
  16. package/.playground/public/admin/timesheet-admin-logo.png +0 -0
  17. package/.playground/public/admin/timesheet-logo.png +0 -0
  18. package/.playground/public/admin/timesheet.png +0 -0
  19. package/CHANGELOG.md +374 -367
  20. package/app/app.config.ts +144 -144
  21. package/app/app.vue +10 -10
  22. package/app/assets/css/main.css +77 -77
  23. package/app/components/Button/ActionIcon.vue +29 -29
  24. package/app/components/Button/Back.vue +22 -22
  25. package/app/components/Format/Currency.vue +17 -17
  26. package/app/components/Format/Date.vue +24 -24
  27. package/app/components/Format/DateTime.vue +24 -24
  28. package/app/components/Format/Number.vue +17 -17
  29. package/app/components/Format/Percent.vue +38 -38
  30. package/app/components/Format/TimeFromNow.vue +38 -38
  31. package/app/components/InfoItemList.vue +196 -196
  32. package/app/components/Layout/Admin/Sidebar.vue +329 -329
  33. package/app/components/Layout/Admin/index.vue +224 -270
  34. package/app/components/Layout/Apps.vue +45 -45
  35. package/app/components/Layout/User/index.vue +102 -145
  36. package/app/components/Notifications/index.vue +147 -0
  37. package/app/components/StatusBox.vue +56 -56
  38. package/app/composables/useAuth.ts +207 -207
  39. package/app/composables/useNotification.ts +64 -0
  40. package/app/composables/useRequestOptions.ts +86 -86
  41. package/app/constants/routes.ts +86 -86
  42. package/app/error.vue +218 -218
  43. package/app/middleware/auth.ts +45 -45
  44. package/app/middleware/common.ts +12 -12
  45. package/app/middleware/guest.ts +7 -7
  46. package/app/middleware/permissions.ts +29 -29
  47. package/bun.lock +2758 -2758
  48. package/index.d.ts +16 -16
  49. package/nuxt.config.ts +41 -41
  50. package/package.json +38 -38
  51. package/app/components/NotificationList.vue +0 -65
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- bunx lint-staged
1
+ bunx lint-staged
@@ -0,0 +1,5 @@
1
+ PORT=3000
2
+ APP_BASE_URL=http://localhost:3000
3
+ APP_BASE_API=https://finework-api.finema.dev
4
+ APP_BASE_INTERNAL_API=http://localhost:3000/api
5
+ APP_BASE_API_MOCK=http://localhost:3000/api/mock
@@ -1,6 +1,6 @@
1
- @import "tailwindcss";
2
- @import "@nuxt/ui";
3
-
4
-
5
- @source "../../../../node_modules/@finema/core";
6
- @source "../../../../app";
1
+ @import "tailwindcss";
2
+ @import "@nuxt/ui";
3
+
4
+
5
+ @source "../../../../node_modules/@finema/core";
6
+ @source "../../../../app";
@@ -1,148 +1,148 @@
1
- <template>
1
+ <template>
2
2
  <LayoutAdmin
3
3
  label="Test Layout"
4
4
  :sidebar-items="sidebarItems"
5
- >
6
- <p>dasdasd</p>
7
- </LayoutAdmin>
8
- </template>
9
-
10
- <script lang="ts" setup>
11
- import type { NavigationMenuItem } from '@nuxt/ui'
12
-
13
- const auth = useAuth()
14
-
15
- useApp().definePage({
16
- title: 'Test Layout',
17
- breadcrumbs: [
18
- {
19
- label: 'Home',
20
- to: '/',
21
- },
22
- {
23
- label: 'Test Layout',
24
- to: '/test-layout',
25
- },
26
- ],
27
- })
28
-
29
- auth.me.set({
30
- id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
31
- created_at: '2025-09-02T10:16:37.195Z',
32
- updated_at: '2025-10-11T10:14:10.296Z',
33
- email: 'long@finema.co',
34
- full_name: 'Passakon Puttasuwan',
35
- display_name: 'Long',
36
- position: 'Technical Specialist',
37
- team_code: 'DEV',
38
- company: 'finema',
39
- avatar_url:
40
- 'https://avatars.slack-edge.com/2023-09-25/5968557597936_c750902e3ffc4f690d80_512.jpg',
41
- slack_id: 'U0147KLKKH8',
42
- azure_id: 'fd7fbb55-a249-4b79-b439-2270981bd3ae',
43
- is_active: true,
44
- joined_date: '2025-09-02T00:00:00Z',
45
- access_level: {
46
- user_id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
47
- clockin: 'ADMIN',
48
- timesheet: 'ADMIN',
49
- pmo: 'SUPER',
50
- setting: 'SUPER',
51
- created_at: '2025-08-15T16:40:29.319Z',
52
- updated_at: '2025-09-30T10:14:59.228Z',
53
- },
54
- team: {
55
- id: 'ef2abb00-d57f-4a38-a5d1-660ee63d2e1f',
56
- created_at: '2025-08-26T10:36:53.598Z',
57
- updated_at: '2025-10-01T06:00:29.941Z',
58
- name: 'Developer Team',
59
- code: 'DEV',
60
- color: 'violet',
61
- description: '',
62
- working_start_at: '12:02:00',
63
- working_end_at: '20:00:00',
64
- created_by_id: null,
65
- updated_by_id: '96d3ec63-be14-41c6-9268-ea8095d2a73b',
66
- deleted_by_id: null,
67
- },
68
- })
69
-
70
- // const sidebarItems: NavigationMenuItem[] = [
71
- // {
72
- // label: "Dashboard",
73
- // children: [
74
- // {
75
- // label: "Submenu 1",
76
- // to: "/layout-admin/submenu1",
77
- // icon: "i-heroicons-outline:home",
78
- // },
79
- // {
80
- // label: "Submenu 2",
81
- // to: "/layout-admin/submenu2",
82
- // icon: "i-heroicons-outline:home",
83
- // },
84
- // ],
85
- // },
86
- // {
87
- // label: "Users",
88
- // children: [
89
- // {
90
- // label: "Submenu 1",
91
- // to: "/layout-admin/submenu1",
92
- // icon: "i-heroicons-outline:home",
93
- // },
94
- // {
95
- // label: "Submenu 2",
96
- // to: "/layout-admin/submenu1",
97
- // icon: "i-heroicons-outline:home",
98
- // },
99
- // ],
100
- // },
101
- // ];
102
- const sidebarItems: NavigationMenuItem[] = [
103
- {
104
- label: 'Submenu 1',
105
- to: '/submenu1',
106
- icon: 'i-heroicons-outline:home',
107
- },
108
- {
109
- label: 'Submenu 2',
110
- to: '/submenu1/layout-admin',
111
- icon: 'i-heroicons-outline:home',
112
- },
113
- {
114
- label: 'Submenu 2',
115
- to: '/submenu1/layout-admin',
116
- icon: 'i-heroicons-outline:home',
117
- children: [
118
- {
119
- label: 'Submenu 2-1',
120
- to: '/submenu1/layout-admin2',
121
- icon: 'i-heroicons-outline:home',
122
- },
123
- {
124
- label: 'Submenu 2-2',
125
- to: '/submenu1/layout-admin',
126
- icon: 'i-heroicons-outline:home',
127
- },
128
- ],
129
- },
130
- {
131
- label: 'Submenu 2',
132
- to: '/submenu1/layout-admin',
133
- icon: 'i-heroicons-outline:home',
134
- children: [
135
- {
136
- label: 'Submenu 2-1',
137
- to: '/submenu1/layout-admin2',
138
- icon: 'i-heroicons-outline:home',
139
- },
140
- {
141
- label: 'Submenu 2-2',
142
- to: '/submenu1/layout-admin',
143
- icon: 'i-heroicons-outline:home',
144
- },
145
- ],
146
- },
147
- ]
148
- </script>
5
+ >
6
+ <p>dasdasd</p>
7
+ </LayoutAdmin>
8
+ </template>
9
+
10
+ <script lang="ts" setup>
11
+ import type { NavigationMenuItem } from '@nuxt/ui'
12
+
13
+ const auth = useAuth()
14
+
15
+ useApp().definePage({
16
+ title: 'Test Layout',
17
+ breadcrumbs: [
18
+ {
19
+ label: 'Home',
20
+ to: '/',
21
+ },
22
+ {
23
+ label: 'Test Layout',
24
+ to: '/test-layout',
25
+ },
26
+ ],
27
+ })
28
+
29
+ auth.me.set({
30
+ id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
31
+ created_at: '2025-09-02T10:16:37.195Z',
32
+ updated_at: '2025-10-11T10:14:10.296Z',
33
+ email: 'long@finema.co',
34
+ full_name: 'Passakon Puttasuwan',
35
+ display_name: 'Long',
36
+ position: 'Technical Specialist',
37
+ team_code: 'DEV',
38
+ company: 'finema',
39
+ avatar_url:
40
+ 'https://avatars.slack-edge.com/2023-09-25/5968557597936_c750902e3ffc4f690d80_512.jpg',
41
+ slack_id: 'U0147KLKKH8',
42
+ azure_id: 'fd7fbb55-a249-4b79-b439-2270981bd3ae',
43
+ is_active: true,
44
+ joined_date: '2025-09-02T00:00:00Z',
45
+ access_level: {
46
+ user_id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
47
+ clockin: 'ADMIN',
48
+ timesheet: 'ADMIN',
49
+ pmo: 'SUPER',
50
+ setting: 'SUPER',
51
+ created_at: '2025-08-15T16:40:29.319Z',
52
+ updated_at: '2025-09-30T10:14:59.228Z',
53
+ },
54
+ team: {
55
+ id: 'ef2abb00-d57f-4a38-a5d1-660ee63d2e1f',
56
+ created_at: '2025-08-26T10:36:53.598Z',
57
+ updated_at: '2025-10-01T06:00:29.941Z',
58
+ name: 'Developer Team',
59
+ code: 'DEV',
60
+ color: 'violet',
61
+ description: '',
62
+ working_start_at: '12:02:00',
63
+ working_end_at: '20:00:00',
64
+ created_by_id: null,
65
+ updated_by_id: '96d3ec63-be14-41c6-9268-ea8095d2a73b',
66
+ deleted_by_id: null,
67
+ },
68
+ })
69
+
70
+ // const sidebarItems: NavigationMenuItem[] = [
71
+ // {
72
+ // label: "Dashboard",
73
+ // children: [
74
+ // {
75
+ // label: "Submenu 1",
76
+ // to: "/layout-admin/submenu1",
77
+ // icon: "i-heroicons-outline:home",
78
+ // },
79
+ // {
80
+ // label: "Submenu 2",
81
+ // to: "/layout-admin/submenu2",
82
+ // icon: "i-heroicons-outline:home",
83
+ // },
84
+ // ],
85
+ // },
86
+ // {
87
+ // label: "Users",
88
+ // children: [
89
+ // {
90
+ // label: "Submenu 1",
91
+ // to: "/layout-admin/submenu1",
92
+ // icon: "i-heroicons-outline:home",
93
+ // },
94
+ // {
95
+ // label: "Submenu 2",
96
+ // to: "/layout-admin/submenu1",
97
+ // icon: "i-heroicons-outline:home",
98
+ // },
99
+ // ],
100
+ // },
101
+ // ];
102
+ const sidebarItems: NavigationMenuItem[] = [
103
+ {
104
+ label: 'Submenu 1',
105
+ to: '/submenu1',
106
+ icon: 'i-heroicons-outline:home',
107
+ },
108
+ {
109
+ label: 'Submenu 2',
110
+ to: '/submenu1/layout-admin',
111
+ icon: 'i-heroicons-outline:home',
112
+ },
113
+ {
114
+ label: 'Submenu 2',
115
+ to: '/submenu1/layout-admin',
116
+ icon: 'i-heroicons-outline:home',
117
+ children: [
118
+ {
119
+ label: 'Submenu 2-1',
120
+ to: '/submenu1/layout-admin2',
121
+ icon: 'i-heroicons-outline:home',
122
+ },
123
+ {
124
+ label: 'Submenu 2-2',
125
+ to: '/submenu1/layout-admin',
126
+ icon: 'i-heroicons-outline:home',
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ label: 'Submenu 2',
132
+ to: '/submenu1/layout-admin',
133
+ icon: 'i-heroicons-outline:home',
134
+ children: [
135
+ {
136
+ label: 'Submenu 2-1',
137
+ to: '/submenu1/layout-admin2',
138
+ icon: 'i-heroicons-outline:home',
139
+ },
140
+ {
141
+ label: 'Submenu 2-2',
142
+ to: '/submenu1/layout-admin',
143
+ icon: 'i-heroicons-outline:home',
144
+ },
145
+ ],
146
+ },
147
+ ]
148
+ </script>