@finema/finework-layer 0.2.67 → 0.2.69

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.
@@ -1,275 +1,275 @@
1
- <template>
2
- <LayoutAdmin
3
- label="Test Layout"
4
- :sidebar-items="sidebarItems"
5
- is-sidebar-group
6
- root-app-path="/layout-admin"
7
- >
8
- <NuxtLayout>
9
- <div class="mb-4 flex gap-4">
10
- <FormFields
11
- :form="form"
12
- :options="formSearchFields"
13
- class="w-full max-w-[600px] gap-3"
14
- />
15
- <Button
16
- icon="material-symbols:filter-list-rounded"
17
- variant="outline"
18
- color="neutral"
19
- class="w-fit"
20
- @click="showFilter = !showFilter"
21
- >
22
- Filters
23
- <Badge
24
- v-if="countForm"
25
- class="size-6 items-center justify-center rounded-full"
26
- :label="countForm"
27
- />
28
- </Button>
29
- </div>
30
- <Card> asdasdasdasdasdasd </Card>
31
- <div class="bg-white p-4">
32
- <Tabs
33
- variant="link"
34
- :items="items"
35
- class="w-full"
36
- />
37
- <Tabs
38
- orientation="vertical"
39
- :items="items"
40
- class="w-full"
41
- />
42
- </div>
43
- <InfoItemList
44
- :items="[
45
- {
46
- label: 'Status:',
47
- value: 'Active',
48
- },
49
- {
50
- label: '',
51
- value: '42',
52
- },
53
- ]"
54
- />
55
- </NuxtLayout>
56
- </LayoutAdmin>
57
- </template>
58
-
59
- <script lang="ts" setup>
60
- import type { NavigationMenuItem } from '@nuxt/ui'
61
-
62
- const auth = useAuth()
63
- const showFilter = useState('pageFilterOpen')
64
- const items = ref([
65
- {
66
- label: 'Account',
67
- icon: 'i-lucide-user',
68
- content: 'This is the account content.',
69
- },
70
- {
71
- label: 'Password',
72
- icon: 'i-lucide-lock',
73
- content: 'This is the password content.',
74
- },
75
- ])
76
-
77
- useApp().definePage({
78
- title: 'Test Layout',
79
- breadcrumbs: [
80
- {
81
- label: 'Home',
82
- to: '/',
83
- },
84
- {
85
- label: 'Test Layout',
86
- to: '/test-layout',
87
- },
88
- ],
89
- })
90
-
91
- const form = useForm({
92
- validationSchema: toTypedSchema(
93
- v.object({
94
- q: v.optional(v.pipe(v.string()), ''),
95
- status: v.optional(v.pipe(v.string()), ''),
96
- user_id: v.optional(v.pipe(v.string()), ''),
97
- date_range: v.nullish(
98
- v.object({
99
- start: v.union([v.date(), v.string()]),
100
- end: v.union([v.date(), v.string()]),
101
- }),
102
- ),
103
- }),
104
- ),
105
- })
106
-
107
- const countForm = computed(
108
- () =>
109
- [
110
- form.values.q,
111
- form.values.status,
112
- form.values.user_id,
113
- form.values.date_range?.start || form.values.date_range?.end,
114
- ].filter(Boolean).length,
115
- )
116
-
117
- auth.me.set({
118
- id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
119
- created_at: '2025-09-02T10:16:37.195Z',
120
- updated_at: '2025-10-11T10:14:10.296Z',
121
- email: 'long@finema.co',
122
- full_name: 'Passakon Puttasuwan',
123
- display_name: 'Long',
124
- position: 'Technical Specialist',
125
- team_code: 'DEV',
126
- company: 'finema',
127
- avatar_url:
128
- 'https://avatars.slack-edge.com/2023-09-25/5968557597936_c750902e3ffc4f690d80_512.jpg',
129
- slack_id: 'U0147KLKKH8',
130
- azure_id: 'fd7fbb55-a249-4b79-b439-2270981bd3ae',
131
- is_active: true,
132
- joined_date: '2025-09-02T00:00:00Z',
133
- access_level: {
134
- user_id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
135
- clockin: 'ADMIN',
136
- timesheet: 'ADMIN',
137
- pmo: 'SUPER',
138
- setting: 'SUPER',
139
- created_at: '2025-08-15T16:40:29.319Z',
140
- updated_at: '2025-09-30T10:14:59.228Z',
141
- },
142
- team: {
143
- id: 'ef2abb00-d57f-4a38-a5d1-660ee63d2e1f',
144
- created_at: '2025-08-26T10:36:53.598Z',
145
- updated_at: '2025-10-01T06:00:29.941Z',
146
- name: 'Developer Team',
147
- code: 'DEV',
148
- color: 'violet',
149
- description: '',
150
- working_start_at: '12:02:00',
151
- working_end_at: '20:00:00',
152
- created_by_id: null,
153
- updated_by_id: '96d3ec63-be14-41c6-9268-ea8095d2a73b',
154
- deleted_by_id: null,
155
- },
156
- })
157
-
158
- const sidebarItems: NavigationMenuItem[] = [
159
- {
160
- children: [
161
- {
162
- label: 'Submenu 1',
163
- to: '/layout-admin',
164
- icon: 'i-heroicons-outline:home',
165
- },
166
- {
167
- label: 'Submenu 2',
168
- to: '/layout-admin/test/1',
169
- icon: 'i-heroicons-outline:home',
170
- },
171
- ],
172
- },
173
- {
174
- label: 'DASHBOARD',
175
- children: [
176
- {
177
- label: 'Submenu 1',
178
- to: '/submenu',
179
- icon: 'i-heroicons-outline:home',
180
- },
181
- {
182
- label: 'Submenu 2',
183
- to: '/submenu/layout-admin',
184
- icon: 'i-heroicons-outline:home',
185
- },
186
- ],
187
- },
188
- {
189
- label: 'Users',
190
- children: [
191
- {
192
- label: 'Submenu 1',
193
- to: '/submenu1',
194
- icon: 'i-heroicons-outline:home',
195
- },
196
- {
197
- label: 'Submenu 2',
198
- to: '/layout-admin',
199
- icon: 'i-heroicons-outline:home',
200
- children: [
201
- {
202
- label: 'Submenu 2-1',
203
- to: '/layout-admin/1',
204
- icon: 'i-heroicons-outline:home',
205
- },
206
- {
207
- label: 'Submenu 2-2',
208
- to: '/layout-admin/2',
209
- },
210
- ],
211
- },
212
- ],
213
- },
214
- ]
215
-
216
- const formSearchFields = createFormFields(() => [
217
- {
218
- type: INPUT_TYPES.SEARCH,
219
- props: {
220
- name: 'q',
221
- placeholder: 'ค้นหา',
222
- },
223
- },
224
- ])
225
-
226
- const formFields = createFormFields(() => [
227
- {
228
- type: INPUT_TYPES.SEARCH,
229
- props: {
230
- name: 'q',
231
- placeholder: 'ค้นหา',
232
- },
233
- },
234
- {
235
- type: INPUT_TYPES.DATE_RANGE,
236
- props: {
237
- label: 'Tender Date',
238
- name: 'date_range',
239
- placeholder: 'ระบุช่วงเวลา Tender Date',
240
- clearable: true,
241
- },
242
- },
243
- {
244
- type: INPUT_TYPES.SELECT,
245
- props: {
246
- name: 'user_id',
247
- label: 'Main Responsibility',
248
- placeholder: 'Main Responsibility',
249
- options: [
250
- {
251
- value: 'test',
252
- label: 'test',
253
- },
254
- ],
255
- searchable: true,
256
- clearable: true,
257
- },
258
- },
259
- {
260
- type: INPUT_TYPES.SELECT,
261
- props: {
262
- name: 'status',
263
- label: 'status',
264
- placeholder: 'All Status',
265
- clearable: true,
266
- options: [
267
- {
268
- value: 'test',
269
- label: 'test',
270
- },
271
- ],
272
- },
273
- },
274
- ])
275
- </script>
1
+ <template>
2
+ <LayoutAdmin
3
+ label="Test Layout"
4
+ :sidebar-items="sidebarItems"
5
+ is-sidebar-group
6
+ root-app-path="/layout-admin"
7
+ >
8
+ <NuxtLayout>
9
+ <div class="mb-4 flex gap-4">
10
+ <FormFields
11
+ :form="form"
12
+ :options="formSearchFields"
13
+ class="w-full max-w-[600px] gap-3"
14
+ />
15
+ <Button
16
+ icon="material-symbols:filter-list-rounded"
17
+ variant="outline"
18
+ color="neutral"
19
+ class="w-fit"
20
+ @click="showFilter = !showFilter"
21
+ >
22
+ Filters
23
+ <Badge
24
+ v-if="countForm"
25
+ class="size-6 items-center justify-center rounded-full"
26
+ :label="countForm"
27
+ />
28
+ </Button>
29
+ </div>
30
+ <Card> asdasdasdasdasdasd </Card>
31
+ <div class="bg-white p-4">
32
+ <Tabs
33
+ variant="link"
34
+ :items="items"
35
+ class="w-full"
36
+ />
37
+ <Tabs
38
+ orientation="vertical"
39
+ :items="items"
40
+ class="w-full"
41
+ />
42
+ </div>
43
+ <InfoItemList
44
+ :items="[
45
+ {
46
+ label: 'Status:',
47
+ value: 'Active',
48
+ },
49
+ {
50
+ label: '',
51
+ value: '42',
52
+ },
53
+ ]"
54
+ />
55
+ </NuxtLayout>
56
+ </LayoutAdmin>
57
+ </template>
58
+
59
+ <script lang="ts" setup>
60
+ import type { NavigationMenuItem } from '@nuxt/ui'
61
+
62
+ const auth = useAuth()
63
+ const showFilter = useState('pageFilterOpen')
64
+ const items = ref([
65
+ {
66
+ label: 'Account',
67
+ icon: 'i-lucide-user',
68
+ content: 'This is the account content.',
69
+ },
70
+ {
71
+ label: 'Password',
72
+ icon: 'i-lucide-lock',
73
+ content: 'This is the password content.',
74
+ },
75
+ ])
76
+
77
+ useApp().definePage({
78
+ title: 'Test Layout',
79
+ breadcrumbs: [
80
+ {
81
+ label: 'Home',
82
+ to: '/',
83
+ },
84
+ {
85
+ label: 'Test Layout',
86
+ to: '/test-layout',
87
+ },
88
+ ],
89
+ })
90
+
91
+ const form = useForm({
92
+ validationSchema: toTypedSchema(
93
+ v.object({
94
+ q: v.optional(v.pipe(v.string()), ''),
95
+ status: v.optional(v.pipe(v.string()), ''),
96
+ user_id: v.optional(v.pipe(v.string()), ''),
97
+ date_range: v.nullish(
98
+ v.object({
99
+ start: v.union([v.date(), v.string()]),
100
+ end: v.union([v.date(), v.string()]),
101
+ }),
102
+ ),
103
+ }),
104
+ ),
105
+ })
106
+
107
+ const countForm = computed(
108
+ () =>
109
+ [
110
+ form.values.q,
111
+ form.values.status,
112
+ form.values.user_id,
113
+ form.values.date_range?.start || form.values.date_range?.end,
114
+ ].filter(Boolean).length,
115
+ )
116
+
117
+ auth.me.set({
118
+ id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
119
+ created_at: '2025-09-02T10:16:37.195Z',
120
+ updated_at: '2025-10-11T10:14:10.296Z',
121
+ email: 'long@finema.co',
122
+ full_name: 'Passakon Puttasuwan',
123
+ display_name: 'Long',
124
+ position: 'Technical Specialist',
125
+ team_code: 'DEV',
126
+ company: 'finema',
127
+ avatar_url:
128
+ 'https://avatars.slack-edge.com/2023-09-25/5968557597936_c750902e3ffc4f690d80_512.jpg',
129
+ slack_id: 'U0147KLKKH8',
130
+ azure_id: 'fd7fbb55-a249-4b79-b439-2270981bd3ae',
131
+ is_active: true,
132
+ joined_date: '2025-09-02T00:00:00Z',
133
+ access_level: {
134
+ user_id: 'edab2396-2b6f-4855-b04e-a7c9ae9b70ae',
135
+ clockin: 'ADMIN',
136
+ timesheet: 'ADMIN',
137
+ pmo: 'SUPER',
138
+ setting: 'SUPER',
139
+ created_at: '2025-08-15T16:40:29.319Z',
140
+ updated_at: '2025-09-30T10:14:59.228Z',
141
+ },
142
+ team: {
143
+ id: 'ef2abb00-d57f-4a38-a5d1-660ee63d2e1f',
144
+ created_at: '2025-08-26T10:36:53.598Z',
145
+ updated_at: '2025-10-01T06:00:29.941Z',
146
+ name: 'Developer Team',
147
+ code: 'DEV',
148
+ color: 'violet',
149
+ description: '',
150
+ working_start_at: '12:02:00',
151
+ working_end_at: '20:00:00',
152
+ created_by_id: null,
153
+ updated_by_id: '96d3ec63-be14-41c6-9268-ea8095d2a73b',
154
+ deleted_by_id: null,
155
+ },
156
+ })
157
+
158
+ const sidebarItems: NavigationMenuItem[] = [
159
+ {
160
+ children: [
161
+ {
162
+ label: 'Submenu 1',
163
+ to: '/layout-admin',
164
+ icon: 'i-heroicons-outline:home',
165
+ },
166
+ {
167
+ label: 'Submenu 2',
168
+ to: '/layout-admin/test/1',
169
+ icon: 'i-heroicons-outline:home',
170
+ },
171
+ ],
172
+ },
173
+ {
174
+ label: 'DASHBOARD',
175
+ children: [
176
+ {
177
+ label: 'Submenu 1',
178
+ to: '/submenu',
179
+ icon: 'i-heroicons-outline:home',
180
+ },
181
+ {
182
+ label: 'Submenu 2',
183
+ to: '/submenu/layout-admin',
184
+ icon: 'i-heroicons-outline:home',
185
+ },
186
+ ],
187
+ },
188
+ {
189
+ label: 'Users',
190
+ children: [
191
+ {
192
+ label: 'Submenu 1',
193
+ to: '/submenu1',
194
+ icon: 'i-heroicons-outline:home',
195
+ },
196
+ {
197
+ label: 'Submenu 2',
198
+ to: '/layout-admin',
199
+ icon: 'i-heroicons-outline:home',
200
+ children: [
201
+ {
202
+ label: 'Submenu 2-1',
203
+ to: '/layout-admin/1',
204
+ icon: 'i-heroicons-outline:home',
205
+ },
206
+ {
207
+ label: 'Submenu 2-2',
208
+ to: '/layout-admin/2',
209
+ },
210
+ ],
211
+ },
212
+ ],
213
+ },
214
+ ]
215
+
216
+ const formSearchFields = createFormFields(() => [
217
+ {
218
+ type: INPUT_TYPES.SEARCH,
219
+ props: {
220
+ name: 'q',
221
+ placeholder: 'ค้นหา',
222
+ },
223
+ },
224
+ ])
225
+
226
+ const formFields = createFormFields(() => [
227
+ {
228
+ type: INPUT_TYPES.SEARCH,
229
+ props: {
230
+ name: 'q',
231
+ placeholder: 'ค้นหา',
232
+ },
233
+ },
234
+ {
235
+ type: INPUT_TYPES.DATE_RANGE,
236
+ props: {
237
+ label: 'Tender Date',
238
+ name: 'date_range',
239
+ placeholder: 'ระบุช่วงเวลา Tender Date',
240
+ clearable: true,
241
+ },
242
+ },
243
+ {
244
+ type: INPUT_TYPES.SELECT,
245
+ props: {
246
+ name: 'user_id',
247
+ label: 'Main Responsibility',
248
+ placeholder: 'Main Responsibility',
249
+ options: [
250
+ {
251
+ value: 'test',
252
+ label: 'test',
253
+ },
254
+ ],
255
+ searchable: true,
256
+ clearable: true,
257
+ },
258
+ },
259
+ {
260
+ type: INPUT_TYPES.SELECT,
261
+ props: {
262
+ name: 'status',
263
+ label: 'status',
264
+ placeholder: 'All Status',
265
+ clearable: true,
266
+ options: [
267
+ {
268
+ value: 'test',
269
+ label: 'test',
270
+ },
271
+ ],
272
+ },
273
+ },
274
+ ])
275
+ </script>