@finema/finework-layer 1.0.84 → 1.0.85
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,7 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.85](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.84...1.0.85) (2026-06-24)
|
|
4
|
+
|
|
3
5
|
## [1.0.84](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.83...1.0.84) (2026-06-24)
|
|
4
6
|
|
|
5
7
|
## [1.0.83](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.82...1.0.83) (2026-06-24)
|
|
@@ -86,11 +86,13 @@
|
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
88
|
<script lang="ts" setup>
|
|
89
|
+
import { UserModuleOptions } from '#layer/app/composables/useAuth'
|
|
89
90
|
import { IssueLogTypeOptions } from '#layer/app/constants/issue-log/type'
|
|
90
91
|
import { useIssueLogAddLoader } from '#layer/app/loaders/issue-log/issue-log'
|
|
91
92
|
|
|
92
93
|
const emit = defineEmits<{
|
|
93
94
|
(e: 'update', value: boolean): void
|
|
95
|
+
(e: 'success'): void
|
|
94
96
|
}>()
|
|
95
97
|
|
|
96
98
|
defineProps<{
|
|
@@ -106,7 +108,13 @@ const form = useForm({
|
|
|
106
108
|
title: v.pipe(v.string(), v.minLength(1, 'กรุณาระบุหัวข้อ')),
|
|
107
109
|
description: v.pipe(v.string(), v.minLength(1, 'กรุณาระบุรายละเอียด')),
|
|
108
110
|
type: v.pipe(v.string(), v.minLength(1, 'กรุณาเลือกประเภท')),
|
|
109
|
-
|
|
111
|
+
file: v.object({
|
|
112
|
+
url: v.string(),
|
|
113
|
+
name: v.string(),
|
|
114
|
+
path: v.string(),
|
|
115
|
+
size: v.number(),
|
|
116
|
+
id: v.string(),
|
|
117
|
+
}, 'กรุณาเลือกไฟล์'),
|
|
110
118
|
}),
|
|
111
119
|
),
|
|
112
120
|
})
|
|
@@ -123,6 +131,17 @@ const formFields = createFormFields(() => [
|
|
|
123
131
|
required: true,
|
|
124
132
|
},
|
|
125
133
|
},
|
|
134
|
+
{
|
|
135
|
+
type: INPUT_TYPES.SELECT,
|
|
136
|
+
class: 'col-span-2',
|
|
137
|
+
props: {
|
|
138
|
+
form,
|
|
139
|
+
label: 'ระบบ',
|
|
140
|
+
name: 'app',
|
|
141
|
+
placeholder: 'เลือกระบบ',
|
|
142
|
+
options: UserModuleOptions,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
126
145
|
{
|
|
127
146
|
type: INPUT_TYPES.SELECT,
|
|
128
147
|
class: 'col-span-2',
|
|
@@ -143,7 +162,7 @@ const formFields = createFormFields(() => [
|
|
|
143
162
|
name: 'description',
|
|
144
163
|
label: 'รายละเอียด',
|
|
145
164
|
placeholder: 'อธิบายปัญหาหรือ feature ที่ต้องการอย่างละเอียด เช่น ขั้นตอนที่ทำให้เกิดปัญหา, ผลลัพธ์ที่ต้องการ',
|
|
146
|
-
rows:
|
|
165
|
+
rows: 2,
|
|
147
166
|
required: true,
|
|
148
167
|
},
|
|
149
168
|
},
|
|
@@ -152,7 +171,7 @@ const formFields = createFormFields(() => [
|
|
|
152
171
|
class: 'col-span-2',
|
|
153
172
|
props: {
|
|
154
173
|
form,
|
|
155
|
-
name: '
|
|
174
|
+
name: 'file_id',
|
|
156
175
|
label: 'แนบรูปภาพ (ถ้ามี)',
|
|
157
176
|
placeholder: 'PNG, JPG, GIF, WEBP (สูงสุด 5MB)',
|
|
158
177
|
requestOptions: useRequestOptions().file(FileAppType.COMMON),
|
|
@@ -164,14 +183,17 @@ const formFields = createFormFields(() => [
|
|
|
164
183
|
|
|
165
184
|
const onSubmit = form.handleSubmit((values) => {
|
|
166
185
|
addLoader.run({
|
|
167
|
-
data:
|
|
186
|
+
data: {
|
|
187
|
+
...values,
|
|
188
|
+
file_id: values.file?.id,
|
|
189
|
+
},
|
|
168
190
|
})
|
|
169
191
|
})
|
|
170
192
|
|
|
171
193
|
useWatchTrue(
|
|
172
194
|
() => addLoader.status.value.isSuccess,
|
|
173
195
|
() => {
|
|
174
|
-
emit('
|
|
196
|
+
emit('success')
|
|
175
197
|
form.resetForm()
|
|
176
198
|
noti.success({
|
|
177
199
|
title: 'ส่งรายงานสำเร็จ ขอบคุณ!',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="fixed right-
|
|
2
|
+
<div class="fixed right-4 bottom-4 z-200">
|
|
3
3
|
<button
|
|
4
|
-
class="group bg-primary-600 ring-primary-200 flex size-
|
|
4
|
+
class="group bg-primary-600 ring-primary-200 flex size-10 cursor-pointer items-center justify-center rounded-full shadow-lg ring-2 transition-all duration-200 hover:bg-primary-700 hover:scale-105 hover:shadow-xl md:size-12"
|
|
5
5
|
title="แจ้งปัญหา / ขอ Feature"
|
|
6
6
|
@click="isOpen = true"
|
|
7
7
|
>
|
|
8
8
|
<Icon
|
|
9
9
|
name="ph:bug-beetle"
|
|
10
|
-
class="size-
|
|
10
|
+
class="size-6 text-white transition-transform duration-200 group-hover:rotate-12 md:size-7"
|
|
11
11
|
/>
|
|
12
12
|
</button>
|
|
13
13
|
</div>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<IssueLogFormIssue
|
|
16
16
|
:is-open="isOpen"
|
|
17
17
|
@update="(v) => isOpen = v"
|
|
18
|
+
@success="isOpen = false"
|
|
18
19
|
/>
|
|
19
20
|
</template>
|
|
20
21
|
|
|
@@ -106,6 +106,55 @@ export enum UserModule {
|
|
|
106
106
|
LOAN = 'loan',
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
const UserModuleLabel = {
|
|
110
|
+
[UserModule.CHECKIN]: 'Clock-In',
|
|
111
|
+
[UserModule.TIMESHEET]: 'Timesheet',
|
|
112
|
+
[UserModule.TODO]: 'Todo',
|
|
113
|
+
[UserModule.PMO]: 'PMO',
|
|
114
|
+
[UserModule.REQUEST]: 'Request',
|
|
115
|
+
[UserModule.SETTING]: 'Setting',
|
|
116
|
+
[UserModule.QUOTATION]: 'Quotation',
|
|
117
|
+
[UserModule.COSTSHEET]: 'Cost Sheet',
|
|
118
|
+
[UserModule.NEWSLETTER]: 'Newsletter',
|
|
119
|
+
[UserModule.CONTRACT]: 'Contract',
|
|
120
|
+
[UserModule.EVALUATION]: 'Evaluation',
|
|
121
|
+
[UserModule.EMPLOYEE]: 'Employee',
|
|
122
|
+
[UserModule.ASSET]: 'Asset',
|
|
123
|
+
[UserModule.RECRUIT]: 'Recruit',
|
|
124
|
+
[UserModule.LG]: 'งบค้ำประกัน',
|
|
125
|
+
[UserModule.EFACTORING]: 'E-Factoring',
|
|
126
|
+
[UserModule.RESOURCE]: 'Resource',
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const UserModuleLogo = {
|
|
130
|
+
[UserModule.CHECKIN]: '/admin/clock-in-logo.png',
|
|
131
|
+
[UserModule.TIMESHEET]: '/admin/timesheet-logo.png',
|
|
132
|
+
[UserModule.TODO]: '/admin/todo.png',
|
|
133
|
+
[UserModule.PMO]: '/admin/pmo-logo.png',
|
|
134
|
+
[UserModule.REQUEST]: '/admin/request.png',
|
|
135
|
+
[UserModule.SETTING]: '/admin/report.svg',
|
|
136
|
+
[UserModule.QUOTATION]: '/admin/quotation.png',
|
|
137
|
+
[UserModule.COSTSHEET]: '/admin/cost-sheet.png',
|
|
138
|
+
[UserModule.NEWSLETTER]: '/admin/newsletter.png',
|
|
139
|
+
[UserModule.CONTRACT]: '/admin/contract.png',
|
|
140
|
+
[UserModule.EVALUATION]: '/admin/evaluation.png',
|
|
141
|
+
[UserModule.EMPLOYEE]: '/admin/employee.png',
|
|
142
|
+
[UserModule.ASSET]: '/admin/assets.png',
|
|
143
|
+
[UserModule.RECRUIT]: '/admin/recruit.png',
|
|
144
|
+
[UserModule.LG]: '/admin/guarantee.png',
|
|
145
|
+
[UserModule.EFACTORING]: '/admin/efactoring.png',
|
|
146
|
+
[UserModule.RESOURCE]: '/admin/resource.svg',
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export const UserModuleOptions = Object.entries(UserModuleLabel).map(([value, label]) => ({
|
|
150
|
+
value,
|
|
151
|
+
label,
|
|
152
|
+
avatar: {
|
|
153
|
+
src: UserModuleLogo[value as keyof typeof UserModuleLogo],
|
|
154
|
+
alt: label,
|
|
155
|
+
},
|
|
156
|
+
}))
|
|
157
|
+
|
|
109
158
|
export interface IUserAccessLevel {
|
|
110
159
|
used_id: string
|
|
111
160
|
pmo: Permission.USER | Permission.ADMIN | Permission.SUPER
|
|
@@ -29,3 +29,52 @@ export const IssueLogTypeOptions = Object.entries(IssueLogTypeLabel).map(([value
|
|
|
29
29
|
color: IssueLogTypeColor[value as IssueLogType],
|
|
30
30
|
},
|
|
31
31
|
}))
|
|
32
|
+
|
|
33
|
+
const UserModuleLabel = {
|
|
34
|
+
[UserModule.CHECKIN]: 'Clock-In',
|
|
35
|
+
[UserModule.TIMESHEET]: 'Timesheet',
|
|
36
|
+
[UserModule.TODO]: 'Todo',
|
|
37
|
+
[UserModule.PMO]: 'PMO',
|
|
38
|
+
[UserModule.REQUEST]: 'Request',
|
|
39
|
+
[UserModule.SETTING]: 'Setting',
|
|
40
|
+
[UserModule.QUOTATION]: 'Quotation',
|
|
41
|
+
[UserModule.COSTSHEET]: 'Cost Sheet',
|
|
42
|
+
[UserModule.NEWSLETTER]: 'Newsletter',
|
|
43
|
+
[UserModule.CONTRACT]: 'Contract',
|
|
44
|
+
[UserModule.EVALUATION]: 'Evaluation',
|
|
45
|
+
[UserModule.EMPLOYEE]: 'Employee',
|
|
46
|
+
[UserModule.ASSET]: 'Asset',
|
|
47
|
+
[UserModule.RECRUIT]: 'Recruit',
|
|
48
|
+
[UserModule.LG]: 'งบค้ำประกัน',
|
|
49
|
+
[UserModule.EFACTORING]: 'E-Factoring',
|
|
50
|
+
[UserModule.RESOURCE]: 'Resource',
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const UserModuleLogo = {
|
|
54
|
+
[UserModule.CHECKIN]: '/admin/clock-in-logo.png',
|
|
55
|
+
[UserModule.TIMESHEET]: '/admin/timesheet-logo.png',
|
|
56
|
+
[UserModule.TODO]: '/admin/todo.png',
|
|
57
|
+
[UserModule.PMO]: '/admin/pmo-logo.png',
|
|
58
|
+
[UserModule.REQUEST]: '/admin/request.png',
|
|
59
|
+
[UserModule.SETTING]: '/admin/report.svg',
|
|
60
|
+
[UserModule.QUOTATION]: '/admin/quotation.png',
|
|
61
|
+
[UserModule.COSTSHEET]: '/admin/cost-sheet.png',
|
|
62
|
+
[UserModule.NEWSLETTER]: '/admin/newsletter.png',
|
|
63
|
+
[UserModule.CONTRACT]: '/admin/contract.png',
|
|
64
|
+
[UserModule.EVALUATION]: '/admin/evaluation.png',
|
|
65
|
+
[UserModule.EMPLOYEE]: '/admin/employee.png',
|
|
66
|
+
[UserModule.ASSET]: '/admin/assets.png',
|
|
67
|
+
[UserModule.RECRUIT]: '/admin/recruit.png',
|
|
68
|
+
[UserModule.LG]: '/admin/guarantee.png',
|
|
69
|
+
[UserModule.EFACTORING]: '/admin/efactoring.png',
|
|
70
|
+
[UserModule.RESOURCE]: '/admin/resource.svg',
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const UserModuleOptions = Object.entries(UserModuleLabel).map(([value, label]) => ({
|
|
74
|
+
value,
|
|
75
|
+
label,
|
|
76
|
+
avatar: {
|
|
77
|
+
src: UserModuleLogo[value as keyof typeof UserModuleLogo],
|
|
78
|
+
alt: label,
|
|
79
|
+
},
|
|
80
|
+
}))
|