@finema/finework-layer 1.0.84 → 1.0.86
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,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.86](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.85...1.0.86) (2026-06-24)
|
|
4
|
+
|
|
5
|
+
## [1.0.85](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.84...1.0.85) (2026-06-24)
|
|
6
|
+
|
|
3
7
|
## [1.0.84](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.83...1.0.84) (2026-06-24)
|
|
4
8
|
|
|
5
9
|
## [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,14 @@ 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
|
+
app: v.nullish(v.string()),
|
|
112
|
+
file: v.nullish(v.object({
|
|
113
|
+
url: v.string(),
|
|
114
|
+
name: v.string(),
|
|
115
|
+
path: v.string(),
|
|
116
|
+
size: v.number(),
|
|
117
|
+
id: v.string(),
|
|
118
|
+
})),
|
|
110
119
|
}),
|
|
111
120
|
),
|
|
112
121
|
})
|
|
@@ -123,6 +132,18 @@ const formFields = createFormFields(() => [
|
|
|
123
132
|
required: true,
|
|
124
133
|
},
|
|
125
134
|
},
|
|
135
|
+
{
|
|
136
|
+
type: INPUT_TYPES.SELECT,
|
|
137
|
+
class: 'col-span-2',
|
|
138
|
+
props: {
|
|
139
|
+
form,
|
|
140
|
+
label: 'ระบบ',
|
|
141
|
+
name: 'app',
|
|
142
|
+
placeholder: 'เลือกระบบ',
|
|
143
|
+
clearable: true,
|
|
144
|
+
options: UserModuleOptions,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
126
147
|
{
|
|
127
148
|
type: INPUT_TYPES.SELECT,
|
|
128
149
|
class: 'col-span-2',
|
|
@@ -143,7 +164,7 @@ const formFields = createFormFields(() => [
|
|
|
143
164
|
name: 'description',
|
|
144
165
|
label: 'รายละเอียด',
|
|
145
166
|
placeholder: 'อธิบายปัญหาหรือ feature ที่ต้องการอย่างละเอียด เช่น ขั้นตอนที่ทำให้เกิดปัญหา, ผลลัพธ์ที่ต้องการ',
|
|
146
|
-
rows:
|
|
167
|
+
rows: 2,
|
|
147
168
|
required: true,
|
|
148
169
|
},
|
|
149
170
|
},
|
|
@@ -152,7 +173,7 @@ const formFields = createFormFields(() => [
|
|
|
152
173
|
class: 'col-span-2',
|
|
153
174
|
props: {
|
|
154
175
|
form,
|
|
155
|
-
name: '
|
|
176
|
+
name: 'file_id',
|
|
156
177
|
label: 'แนบรูปภาพ (ถ้ามี)',
|
|
157
178
|
placeholder: 'PNG, JPG, GIF, WEBP (สูงสุด 5MB)',
|
|
158
179
|
requestOptions: useRequestOptions().file(FileAppType.COMMON),
|
|
@@ -164,14 +185,17 @@ const formFields = createFormFields(() => [
|
|
|
164
185
|
|
|
165
186
|
const onSubmit = form.handleSubmit((values) => {
|
|
166
187
|
addLoader.run({
|
|
167
|
-
data:
|
|
188
|
+
data: {
|
|
189
|
+
...values,
|
|
190
|
+
file_id: values.file?.id,
|
|
191
|
+
},
|
|
168
192
|
})
|
|
169
193
|
})
|
|
170
194
|
|
|
171
195
|
useWatchTrue(
|
|
172
196
|
() => addLoader.status.value.isSuccess,
|
|
173
197
|
() => {
|
|
174
|
-
emit('
|
|
198
|
+
emit('success')
|
|
175
199
|
form.resetForm()
|
|
176
200
|
noti.success({
|
|
177
201
|
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
|
+
}))
|