@finema/finework-layer 2.0.25 → 2.0.27
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 +12 -0
- package/app/components/PortalApp.vue +68 -1
- package/app/composables/useAuth.ts +19 -0
- package/app/constants/routes.ts +32 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.27](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.26...2.0.27) (2026-08-16)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add Loan module with corresponding label and logo ([506b4b0](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/506b4b0f048642210e5eeb8da72c421d1c22a000))
|
|
8
|
+
|
|
9
|
+
## [2.0.26](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.25...2.0.26) (2026-08-16)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add PMO modules with permissions and routes for setup, presale bidding, delivery, and warranty ([78b9bd2](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/78b9bd25c92def2b0b18cfb9cf0a74054761c02c))
|
|
14
|
+
|
|
3
15
|
## [2.0.25](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.24...2.0.25) (2026-08-07)
|
|
4
16
|
|
|
5
17
|
## [2.0.24](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.23...2.0.24) (2026-08-07)
|
|
@@ -416,7 +416,74 @@ const managementApps = computed(() => [
|
|
|
416
416
|
},
|
|
417
417
|
]
|
|
418
418
|
: []),
|
|
419
|
-
|
|
419
|
+
...(auth.hasPermission(
|
|
420
|
+
UserModule.PMO_SETUP,
|
|
421
|
+
Permission.ADMIN,
|
|
422
|
+
Permission.USER,
|
|
423
|
+
Permission.SUPER,
|
|
424
|
+
)
|
|
425
|
+
? [
|
|
426
|
+
{
|
|
427
|
+
name: 'pmo-setup',
|
|
428
|
+
logo: '/admin/pmo_setup.png',
|
|
429
|
+
label: 'PMO Setup',
|
|
430
|
+
description: 'ตั้งค่าและบริหารจัดการโครงการ PMO',
|
|
431
|
+
to: routes.pmoSetup.dashboard.to,
|
|
432
|
+
status: StatusPortal.ACTIVE,
|
|
433
|
+
},
|
|
434
|
+
]
|
|
435
|
+
: []),
|
|
436
|
+
...(auth.hasPermission(
|
|
437
|
+
UserModule.PMO_PRESALE_BIDDING,
|
|
438
|
+
Permission.ADMIN,
|
|
439
|
+
Permission.USER,
|
|
440
|
+
Permission.SUPER,
|
|
441
|
+
)
|
|
442
|
+
? [
|
|
443
|
+
{
|
|
444
|
+
name: 'pmo-presale-bidding',
|
|
445
|
+
logo: '/admin/pmo_presale_bidding.png',
|
|
446
|
+
label: 'Presale & Bidding',
|
|
447
|
+
description: 'บริหารจัดการงาน Presale และ Bidding',
|
|
448
|
+
to: routes.pmoPresaleBidding.dashboard.to,
|
|
449
|
+
status: StatusPortal.ACTIVE,
|
|
450
|
+
},
|
|
451
|
+
]
|
|
452
|
+
: []),
|
|
453
|
+
...(auth.hasPermission(
|
|
454
|
+
UserModule.PMO_DELIVERY,
|
|
455
|
+
Permission.ADMIN,
|
|
456
|
+
Permission.USER,
|
|
457
|
+
Permission.SUPER,
|
|
458
|
+
)
|
|
459
|
+
? [
|
|
460
|
+
{
|
|
461
|
+
name: 'pmo-delivery',
|
|
462
|
+
logo: '/admin/pmo_delivery.png',
|
|
463
|
+
label: 'Delivery',
|
|
464
|
+
description: 'บริหารจัดการโครงการช่วง Delivery',
|
|
465
|
+
to: routes.pmoDelivery.dashboard.to,
|
|
466
|
+
status: StatusPortal.ACTIVE,
|
|
467
|
+
},
|
|
468
|
+
]
|
|
469
|
+
: []),
|
|
470
|
+
...(auth.hasPermission(
|
|
471
|
+
UserModule.PMO_WARRANTY,
|
|
472
|
+
Permission.ADMIN,
|
|
473
|
+
Permission.USER,
|
|
474
|
+
Permission.SUPER,
|
|
475
|
+
)
|
|
476
|
+
? [
|
|
477
|
+
{
|
|
478
|
+
name: 'pmo-warranty',
|
|
479
|
+
logo: '/admin/pmo_warranty.png',
|
|
480
|
+
label: 'Warranty',
|
|
481
|
+
description: 'บริหารจัดการโครงการช่วง Warranty',
|
|
482
|
+
to: routes.pmoWarranty.dashboard.to,
|
|
483
|
+
status: StatusPortal.ACTIVE,
|
|
484
|
+
},
|
|
485
|
+
]
|
|
486
|
+
: []),
|
|
420
487
|
])
|
|
421
488
|
|
|
422
489
|
const financeApps = computed(() => [
|
|
@@ -106,6 +106,10 @@ export enum UserModule {
|
|
|
106
106
|
LOAN = 'loan',
|
|
107
107
|
TOR = 'tor',
|
|
108
108
|
SUPPORT = 'support',
|
|
109
|
+
PMO_SETUP = 'pmo_setup',
|
|
110
|
+
PMO_PRESALE_BIDDING = 'pmo_presale_bidding',
|
|
111
|
+
PMO_DELIVERY = 'pmo_delivery',
|
|
112
|
+
PMO_WARRANTY = 'pmo_warranty',
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
const UserModuleLabel = {
|
|
@@ -126,8 +130,13 @@ const UserModuleLabel = {
|
|
|
126
130
|
[UserModule.LG]: 'งบค้ำประกัน',
|
|
127
131
|
[UserModule.EFACTORING]: 'E-Factoring',
|
|
128
132
|
[UserModule.RESOURCE]: 'Resource',
|
|
133
|
+
[UserModule.LOAN]: 'Loan',
|
|
129
134
|
[UserModule.TOR]: 'TOR',
|
|
130
135
|
[UserModule.SUPPORT]: 'Support',
|
|
136
|
+
[UserModule.PMO_SETUP]: 'PMO Setup',
|
|
137
|
+
[UserModule.PMO_PRESALE_BIDDING]: 'PMO Presale Bidding',
|
|
138
|
+
[UserModule.PMO_DELIVERY]: 'PMO Delivery',
|
|
139
|
+
[UserModule.PMO_WARRANTY]: 'PMO Warranty',
|
|
131
140
|
}
|
|
132
141
|
|
|
133
142
|
const UserModuleLogo = {
|
|
@@ -148,8 +157,13 @@ const UserModuleLogo = {
|
|
|
148
157
|
[UserModule.LG]: '/admin/guarantee.png',
|
|
149
158
|
[UserModule.EFACTORING]: '/admin/efactoring.png',
|
|
150
159
|
[UserModule.RESOURCE]: '/admin/resource.svg',
|
|
160
|
+
[UserModule.LOAN]: '/admin/loan.svg',
|
|
151
161
|
[UserModule.TOR]: '/admin/tor.svg',
|
|
152
162
|
[UserModule.SUPPORT]: '/admin/support.svg',
|
|
163
|
+
[UserModule.PMO_SETUP]: '/admin/pmo_setup.png',
|
|
164
|
+
[UserModule.PMO_PRESALE_BIDDING]: '/admin/pmo_presale_bidding.png',
|
|
165
|
+
[UserModule.PMO_DELIVERY]: '/admin/pmo_delivery.png',
|
|
166
|
+
[UserModule.PMO_WARRANTY]: '/admin/pmo_warranty.png',
|
|
153
167
|
}
|
|
154
168
|
|
|
155
169
|
export const UserModuleOptions = Object.entries(UserModuleLabel).map(([value, label]) => ({
|
|
@@ -181,8 +195,13 @@ export interface IUserAccessLevel {
|
|
|
181
195
|
lg: Permission
|
|
182
196
|
efactoring: Permission
|
|
183
197
|
resource: Permission
|
|
198
|
+
loan: Permission
|
|
184
199
|
tor: Permission
|
|
185
200
|
support: Permission
|
|
201
|
+
pmo_setup: Permission
|
|
202
|
+
pmo_presale_bidding: Permission
|
|
203
|
+
pmo_delivery: Permission
|
|
204
|
+
pmo_warranty: Permission
|
|
186
205
|
}
|
|
187
206
|
|
|
188
207
|
export const convertDomainToCookieDomain = (domain: string) => {
|
package/app/constants/routes.ts
CHANGED
|
@@ -275,6 +275,38 @@ export const routes = {
|
|
|
275
275
|
permissions: ['recruit:USER', 'recruit:ADMIN', 'recruit:SUPER'],
|
|
276
276
|
},
|
|
277
277
|
},
|
|
278
|
+
pmoSetup: {
|
|
279
|
+
dashboard: {
|
|
280
|
+
label: 'PMO Setup',
|
|
281
|
+
icon: 'ph:squares-four',
|
|
282
|
+
to: '/pmo-setup',
|
|
283
|
+
permissions: ['pmo_setup:USER', 'pmo_setup:ADMIN', 'pmo_setup:SUPER'],
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
pmoPresaleBidding: {
|
|
287
|
+
dashboard: {
|
|
288
|
+
label: 'Presale & Bidding',
|
|
289
|
+
icon: 'ph:handshake',
|
|
290
|
+
to: '/pmo-presale-bidding',
|
|
291
|
+
permissions: ['pmo_presale_bidding:USER', 'pmo_presale_bidding:ADMIN', 'pmo_presale_bidding:SUPER'],
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
pmoDelivery: {
|
|
295
|
+
dashboard: {
|
|
296
|
+
label: 'Delivery',
|
|
297
|
+
icon: 'ph:truck',
|
|
298
|
+
to: '/pmo-delivery',
|
|
299
|
+
permissions: ['pmo_delivery:USER', 'pmo_delivery:ADMIN', 'pmo_delivery:SUPER'],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
pmoWarranty: {
|
|
303
|
+
dashboard: {
|
|
304
|
+
label: 'Warranty',
|
|
305
|
+
icon: 'ph:shield-check',
|
|
306
|
+
to: '/pmo-warranty',
|
|
307
|
+
permissions: ['pmo_warranty:USER', 'pmo_warranty:ADMIN', 'pmo_warranty:SUPER'],
|
|
308
|
+
},
|
|
309
|
+
},
|
|
278
310
|
} as const
|
|
279
311
|
|
|
280
312
|
export const sidebarProfile = [
|