@finema/finework-layer 0.2.96 → 0.2.98

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.98](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.97...0.2.98) (2025-12-25)
4
+
5
+ ### Bug Fixes
6
+
7
+ * add conditional rendering for management and finance apps based on user permissions ([be786f5](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/be786f50ea8f54d0277a2fc2f2e7903ddad55db6))
8
+
9
+ ## [0.2.97](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.96...0.2.97) (2025-12-25)
10
+
11
+ ### Bug Fixes
12
+
13
+ * inter IUser ([3c4c855](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/3c4c855e69bfde7d55cbd59b8fcfd4a35147e2c0))
14
+
3
15
  ## [0.2.96](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.95...0.2.96) (2025-12-24)
4
16
 
5
17
  ### Bug Fixes
@@ -250,14 +250,19 @@ const managementApps = computed(() => [
250
250
  },
251
251
  ]
252
252
  : []),
253
- {
254
- name: 'Requests',
255
- logo: '/admin/request-admin.png',
256
- label: 'Requests',
257
- description: 'จัดการคำขอ',
258
- to: '/',
259
- status: StatusPortal.DEVELOPING,
260
- },
253
+
254
+ ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
255
+ ? [
256
+ {
257
+ name: 'Requests',
258
+ logo: '/admin/request-admin.png',
259
+ label: 'Requests',
260
+ description: 'จัดการคำขอ',
261
+ to: '/',
262
+ status: StatusPortal.DEVELOPING,
263
+ },
264
+ ]
265
+ : []),
261
266
  ])
262
267
 
263
268
  const financeApps = computed(() => [
@@ -287,23 +292,32 @@ const financeApps = computed(() => [
287
292
  },
288
293
  ]
289
294
  : []),
290
- {
291
- name: 'eFactoring',
292
- logo: '/admin/efactoring.png',
293
- label: 'eFactoring',
294
- description: 'การเบิกเงินหมุนเวียนกับธนาคาร',
295
- to: '/',
296
- status: StatusPortal.DEVELOPING,
297
- },
298
295
 
299
- {
300
- name: 'Guarantee',
301
- logo: '/admin/cost-sheet.png',
302
- label: 'งบค้ำประกัน',
303
- description: 'การเบิกเงินค้ำซองและค้ำสัญญากับธนาคาร',
304
- to: '/',
305
- status: StatusPortal.DEVELOPING,
306
- },
296
+ ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
297
+ ? [
298
+ {
299
+ name: 'eFactoring',
300
+ logo: '/admin/efactoring.png',
301
+ label: 'eFactoring',
302
+ description: 'การเบิกเงินหมุนเวียนกับธนาคาร',
303
+ to: '/',
304
+ status: StatusPortal.DEVELOPING,
305
+ },
306
+ ]
307
+ : []),
308
+
309
+ ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
310
+ ? [
311
+ {
312
+ name: 'Guarantee',
313
+ logo: '/admin/cost-sheet.png',
314
+ label: 'งบค้ำประกัน',
315
+ description: 'การเบิกเงินค้ำซองและค้ำสัญญากับธนาคาร',
316
+ to: '/',
317
+ status: StatusPortal.DEVELOPING,
318
+ },
319
+ ]
320
+ : []),
307
321
  ])
308
322
 
309
323
  const peopleApps = computed(() => [
@@ -331,30 +345,43 @@ const peopleApps = computed(() => [
331
345
  },
332
346
  ]
333
347
  : []),
334
- {
335
- name: 'Evaluation',
336
- logo: '/admin/evaluation.png',
337
- label: 'Evaluation',
338
- description: 'ระบบจัดการการประเมิน',
339
- to: '/',
340
- status: StatusPortal.DEVELOPING,
341
- },
342
- {
343
- name: 'Recruit',
344
- logo: '/admin/recruit.png',
345
- label: 'Recruit',
346
- description: 'ระบบการสรรหาบุคลากร',
347
- to: '/',
348
- status: StatusPortal.DEVELOPING,
349
- },
350
- {
351
- name: 'Assets',
352
- logo: '/admin/assets.png',
353
- label: 'Assets',
354
- description: 'ระบบจัดการสินทรัพย์',
355
- to: '/',
356
- status: StatusPortal.DEVELOPING,
357
- },
348
+
349
+ ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
350
+ ? [
351
+ {
352
+ name: 'Evaluation',
353
+ logo: '/admin/evaluation.png',
354
+ label: 'Evaluation',
355
+ description: 'ระบบจัดการการประเมิน',
356
+ to: '/',
357
+ status: StatusPortal.DEVELOPING,
358
+ },
359
+ ]
360
+ : []),
361
+ ...(auth.hasPermission(UserModule.SETTING, Permission.SUPER)
362
+ ? [
363
+ {
364
+ name: 'Recruit',
365
+ logo: '/admin/recruit.png',
366
+ label: 'Recruit',
367
+ description: 'ระบบการสรรหาบุคลากร',
368
+ to: '/',
369
+ status: StatusPortal.DEVELOPING,
370
+ },
371
+ ]
372
+ : []),
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
+ : []),
358
385
  ])
359
386
 
360
387
  const legalApps = computed(() => [
@@ -27,21 +27,59 @@ export interface ITeam {
27
27
 
28
28
  export interface IUser {
29
29
  id: string
30
+ employee_id: string
31
+ employee_type: string
32
+ employee_status: string
33
+ head_employee_id: string
34
+ head_user: IUser
35
+ head_user_id: string
30
36
  email: string
31
37
  full_name: string
32
38
  display_name: string
33
39
  position: string
34
40
  team: ITeam
41
+ sig: string
35
42
  team_code: string
36
43
  avatar_url: string
37
44
  company: string
38
- sig: string
45
+ company_branch: string
39
46
  access_level: IUserAccessLevel
40
47
  is_active: boolean
41
48
  joined_date: string
49
+ working_start_at: string
50
+ working_end_at: string
51
+ azure_id: string
42
52
  slack_id: string
43
53
  created_at: string
44
54
  updated_at: string
55
+ updated_by?: IUser
56
+ created_by: IUser
57
+ profile: IUserProfile
58
+ }
59
+
60
+ export interface IUserProfile {
61
+ id: string
62
+ created_at: string
63
+ updated_at: string
64
+ user_id: string
65
+ title: string
66
+ first_name: string
67
+ last_name: string
68
+ title_en: string
69
+ first_name_en: string
70
+ last_name_en: string
71
+ gender: string
72
+ birth_date: string
73
+ blood_type: string
74
+ marital_status: string
75
+ military_status: string
76
+ personal_email: string
77
+ emergency_person: string
78
+ emergency_relation: string
79
+ emergency_phone: string
80
+ phone: string
81
+ created_by_id: IUser
82
+ updated_by_id: IUser
45
83
  }
46
84
 
47
85
  export enum UserModule {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "0.2.96",
4
+ "version": "0.2.98",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",