@finema/finework-layer 0.2.102 → 0.2.104

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.104](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.103...0.2.104) (2026-01-07)
4
+
5
+ ### Features
6
+
7
+ * refactor PortalApp component layout and improve structure ([b4684a9](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/b4684a98baf5e9ed1b828fb132730c94e946de8d))
8
+
9
+ ## [0.2.103](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.102...0.2.103) (2026-01-06)
10
+
11
+ ### Features
12
+
13
+ * add asset management functionality and update routes ([a8bb09e](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/a8bb09e7d1c0ac1a9a4601e03daa44b6b7bc4015))
14
+
3
15
  ## [0.2.102](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.101...0.2.102) (2025-12-29)
4
16
 
5
17
  ### Features
@@ -1,186 +1,188 @@
1
1
  <template>
2
- <div
3
- v-if="managementApps.length > 0 || financeApps.length > 0 || peopleApps.length > 0 || legalApps.length > 0"
4
- class="overflow-auto bg-white p-5"
5
- :class="[isNavbar ? 'max-h-[calc(100vh-130px)]' : 'h-full']"
6
- >
7
- <div class="mb-5 flex items-center gap-2">
8
- <img
9
- src="/icon-finema.png"
10
- alt="icon-finema"
11
- class="h-8 w-8 -translate-y-1"
12
- />
13
- <div class="text-2xl font-bold">
14
- Finework Apps
15
- </div>
16
- </div>
2
+ <Card>
17
3
  <div
18
- class="grid gap-5"
19
- :class="[isNavbar ?`md:grid-cols-2 xl:grid-cols-4` : `md:grid-cols-2 xl:grid-cols-3`]"
4
+ v-if="managementApps.length > 0 || financeApps.length > 0 || peopleApps.length > 0 || legalApps.length > 0"
5
+ class="overflow-auto bg-white"
6
+ :class="[isNavbar ? 'max-h-[calc(100vh-130px)]' : 'h-full']"
20
7
  >
8
+ <div class="mb-5 flex items-center gap-2">
9
+ <img
10
+ src="/icon-finema.png"
11
+ alt="icon-finema"
12
+ class="h-8 w-8 -translate-y-1"
13
+ />
14
+ <div class="text-2xl font-bold">
15
+ Finework Apps
16
+ </div>
17
+ </div>
21
18
  <div
22
- v-if="managementApps.length > 0"
23
- class="space-y-6"
19
+ class="grid gap-5"
20
+ :class="[isNavbar ?`md:grid-cols-2 xl:grid-cols-4` : `md:grid-cols-2 xl:grid-cols-3`]"
24
21
  >
25
- <div class="text-lg font-bold text-gray-600">
26
- Management
27
- </div>
28
-
29
- <component
30
- :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
31
- v-for="app in managementApps"
32
- :key="app.name"
33
- :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
34
- class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
35
- :class="app.status === StatusPortal.DEVELOPING
36
- ? 'cursor-not-allowed bg-gray-200 opacity-60'
37
- : 'bg-gray-100 hover:bg-gray-200'"
22
+ <div
23
+ v-if="managementApps.length > 0"
24
+ class="space-y-6"
38
25
  >
39
- <div
40
- v-if="app.status === StatusPortal.DEVELOPING"
41
- class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
42
- >
43
- กำลังพัฒนา
26
+ <div class="text-lg font-bold text-gray-600">
27
+ Management
44
28
  </div>
45
- <img
46
- :src="app.logo"
47
- :alt="app.label"
48
- class="h-[45px] w-[45px] bg-white"
49
- />
50
- <div>
51
- <div class="text-lg font-bold">
52
- {{ app.label }}
29
+
30
+ <component
31
+ :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
32
+ v-for="app in managementApps"
33
+ :key="app.name"
34
+ :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
35
+ class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
36
+ :class="app.status === StatusPortal.DEVELOPING
37
+ ? 'cursor-not-allowed bg-gray-200 opacity-60'
38
+ : 'bg-gray-100 hover:bg-gray-200'"
39
+ >
40
+ <div
41
+ v-if="app.status === StatusPortal.DEVELOPING"
42
+ class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
43
+ >
44
+ กำลังพัฒนา
53
45
  </div>
54
- <div class="text-sm text-gray-500">
55
- {{ app.description }}
46
+ <img
47
+ :src="app.logo"
48
+ :alt="app.label"
49
+ class="h-[45px] w-[45px] bg-white"
50
+ />
51
+ <div>
52
+ <div class="text-lg font-bold">
53
+ {{ app.label }}
54
+ </div>
55
+ <div class="text-sm text-gray-500">
56
+ {{ app.description }}
57
+ </div>
56
58
  </div>
57
- </div>
58
- </component>
59
- </div>
60
-
61
- <div
62
- v-if="financeApps.length > 0"
63
- class="space-y-6"
64
- >
65
- <div class="text-lg font-bold text-gray-600">
66
- Finance
59
+ </component>
67
60
  </div>
68
61
 
69
- <component
70
- :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
71
- v-for="app in financeApps"
72
- :key="app.name"
73
- :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
74
- class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
75
- :class="app.status === StatusPortal.DEVELOPING
76
- ? 'cursor-not-allowed bg-gray-200 opacity-60'
77
- : 'bg-gray-100 hover:bg-gray-200'"
62
+ <div
63
+ v-if="financeApps.length > 0"
64
+ class="space-y-6"
78
65
  >
79
- <div
80
- v-if="app.status === StatusPortal.DEVELOPING"
81
- class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
82
- >
83
- กำลังพัฒนา
66
+ <div class="text-lg font-bold text-gray-600">
67
+ Finance
84
68
  </div>
85
69
 
86
- <img
87
- :src="app.logo"
88
- :alt="app.label"
89
- class="h-[45px] w-[45px] bg-white"
90
- />
91
-
92
- <div>
93
- <div class="text-lg font-bold">
94
- {{ app.label }}
95
- </div>
96
- <div class="text-sm text-gray-500">
97
- {{ app.description }}
70
+ <component
71
+ :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
72
+ v-for="app in financeApps"
73
+ :key="app.name"
74
+ :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
75
+ class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
76
+ :class="app.status === StatusPortal.DEVELOPING
77
+ ? 'cursor-not-allowed bg-gray-200 opacity-60'
78
+ : 'bg-gray-100 hover:bg-gray-200'"
79
+ >
80
+ <div
81
+ v-if="app.status === StatusPortal.DEVELOPING"
82
+ class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
83
+ >
84
+ กำลังพัฒนา
98
85
  </div>
99
- </div>
100
- </component>
101
- </div>
102
86
 
103
- <div
104
- v-if="peopleApps.length >0"
105
- class="space-y-6"
106
- >
107
- <div class="text-lg font-bold text-gray-600">
108
- People
87
+ <img
88
+ :src="app.logo"
89
+ :alt="app.label"
90
+ class="h-[45px] w-[45px] bg-white"
91
+ />
92
+
93
+ <div>
94
+ <div class="text-lg font-bold">
95
+ {{ app.label }}
96
+ </div>
97
+ <div class="text-sm text-gray-500">
98
+ {{ app.description }}
99
+ </div>
100
+ </div>
101
+ </component>
109
102
  </div>
110
103
 
111
- <component
112
- :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
113
- v-for="app in peopleApps"
114
- :key="app.name"
115
- :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
116
- class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
117
- :class="app.status === StatusPortal.DEVELOPING
118
- ? 'cursor-not-allowed bg-gray-200 opacity-60'
119
- : 'bg-gray-100 hover:bg-gray-200'"
104
+ <div
105
+ v-if="peopleApps.length >0"
106
+ class="space-y-6"
120
107
  >
121
- <div
122
- v-if="app.status === StatusPortal.DEVELOPING"
123
- class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
124
- >
125
- กำลังพัฒนา
108
+ <div class="text-lg font-bold text-gray-600">
109
+ People
126
110
  </div>
127
- <img
128
- :src="app.logo"
129
- :alt="app.label"
130
- class="h-[45px] w-[45px] bg-white"
131
- />
132
- <div>
133
- <div class="text-lg font-bold">
134
- {{ app.label }}
111
+
112
+ <component
113
+ :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
114
+ v-for="app in peopleApps"
115
+ :key="app.name"
116
+ :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
117
+ class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
118
+ :class="app.status === StatusPortal.DEVELOPING
119
+ ? 'cursor-not-allowed bg-gray-200 opacity-60'
120
+ : 'bg-gray-100 hover:bg-gray-200'"
121
+ >
122
+ <div
123
+ v-if="app.status === StatusPortal.DEVELOPING"
124
+ class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
125
+ >
126
+ กำลังพัฒนา
135
127
  </div>
136
- <div class="text-sm text-gray-500">
137
- {{ app.description }}
128
+ <img
129
+ :src="app.logo"
130
+ :alt="app.label"
131
+ class="h-[45px] w-[45px] bg-white"
132
+ />
133
+ <div>
134
+ <div class="text-lg font-bold">
135
+ {{ app.label }}
136
+ </div>
137
+ <div class="text-sm text-gray-500">
138
+ {{ app.description }}
139
+ </div>
138
140
  </div>
139
- </div>
140
- </component>
141
- </div>
142
-
143
- <div
144
- v-if="legalApps.length > 0"
145
- class="space-y-6"
146
- >
147
- <div class="text-lg font-bold text-gray-600">
148
- Legal
141
+ </component>
149
142
  </div>
150
143
 
151
- <component
152
- :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
153
- v-for="app in legalApps"
154
- :key="app.name"
155
- :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
156
- class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
157
- :class="app.status === StatusPortal.DEVELOPING
158
- ? 'cursor-not-allowed bg-gray-200 opacity-60'
159
- : 'bg-gray-100 hover:bg-gray-200'"
144
+ <div
145
+ v-if="legalApps.length > 0"
146
+ class="space-y-6"
160
147
  >
161
- <div
162
- v-if="app.status === StatusPortal.DEVELOPING"
163
- class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
164
- >
165
- กำลังพัฒนา
148
+ <div class="text-lg font-bold text-gray-600">
149
+ Legal
166
150
  </div>
167
- <img
168
- :src="app.logo"
169
- :alt="app.label"
170
- class="h-[45px] w-[45px] bg-white"
171
- />
172
- <div>
173
- <div class="text-lg font-bold">
174
- {{ app.label }}
151
+
152
+ <component
153
+ :is="app.status === StatusPortal.DEVELOPING ? 'div' : NuxtLink"
154
+ v-for="app in legalApps"
155
+ :key="app.name"
156
+ :to="app.status !== StatusPortal.DEVELOPING ? app.to : undefined"
157
+ class="relative flex items-center gap-3 rounded-lg px-2.5 py-[15px]"
158
+ :class="app.status === StatusPortal.DEVELOPING
159
+ ? 'cursor-not-allowed bg-gray-200 opacity-60'
160
+ : 'bg-gray-100 hover:bg-gray-200'"
161
+ >
162
+ <div
163
+ v-if="app.status === StatusPortal.DEVELOPING"
164
+ class="absolute top-2 right-2 rounded-full bg-orange-100 px-2 py-0.5 text-xs font-semibold text-orange-600"
165
+ >
166
+ กำลังพัฒนา
175
167
  </div>
176
- <div class="text-sm text-gray-500">
177
- {{ app.description }}
168
+ <img
169
+ :src="app.logo"
170
+ :alt="app.label"
171
+ class="h-[45px] w-[45px] bg-white"
172
+ />
173
+ <div>
174
+ <div class="text-lg font-bold">
175
+ {{ app.label }}
176
+ </div>
177
+ <div class="text-sm text-gray-500">
178
+ {{ app.description }}
179
+ </div>
178
180
  </div>
179
- </div>
180
- </component>
181
+ </component>
182
+ </div>
181
183
  </div>
182
184
  </div>
183
- </div>
185
+ </Card>
184
186
  </template>
185
187
 
186
188
  <script lang="ts" setup>
@@ -346,6 +348,18 @@ const peopleApps = computed(() => [
346
348
  ]
347
349
  : []),
348
350
 
351
+ ...(auth.hasPermission(UserModule.ASSET, Permission.USER, Permission.ADMIN)
352
+ ? [
353
+ {
354
+ name: 'Assets',
355
+ logo: '/admin/assets.png',
356
+ label: 'Assets',
357
+ description: 'ระบบจัดการสินทรัพย์',
358
+ to: routes.asset.item.items.to,
359
+ status: StatusPortal.ACTIVE,
360
+ },
361
+ ]
362
+ : []),
349
363
  ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
350
364
  ? [
351
365
  {
@@ -370,18 +384,7 @@ const peopleApps = computed(() => [
370
384
  },
371
385
  ]
372
386
  : []),
373
- ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
374
- ? [
375
- {
376
- name: 'Assets',
377
- logo: '/admin/assets.png',
378
- label: 'Assets',
379
- description: 'ระบบจัดการสินทรัพย์',
380
- to: '/',
381
- status: StatusPortal.DEVELOPING,
382
- },
383
- ]
384
- : []),
387
+
385
388
  ])
386
389
 
387
390
  const legalApps = computed(() => [
@@ -130,5 +130,14 @@ export const routes = {
130
130
  icon: 'ph:users',
131
131
  },
132
132
  },
133
+ asset: {
134
+ item: {
135
+ items: {
136
+ label: 'ข้อมูลสินทรัพย์',
137
+ to: '/asset/items',
138
+ icon: 'ph:desktop-tower',
139
+ },
140
+ },
141
+ },
133
142
 
134
143
  } as const
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "0.2.102",
4
+ "version": "0.2.104",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",