@finema/finework-layer 2.0.34 → 2.0.36
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
|
+
## [2.0.36](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.35...2.0.36) (2026-08-19)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* replace success notification with modal in feedback ticket form ([3368f40](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/3368f40fd726fee9496093fd4c6915535d64868a))
|
|
8
|
+
|
|
9
|
+
## [2.0.35](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.34...2.0.35) (2026-08-19)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* translate feedback ticket form from Thai to English ([437b87a](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/437b87a5d75f02c615eeca19595d8f51f5dedcf7))
|
|
14
|
+
|
|
3
15
|
## [2.0.34](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.33...2.0.34) (2026-08-18)
|
|
4
16
|
|
|
5
17
|
### Features
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
<div>
|
|
22
22
|
<h2 class="text-base font-semibold text-gray-900">
|
|
23
|
-
|
|
23
|
+
Report Issue / Request Feature
|
|
24
24
|
</h2>
|
|
25
25
|
<p class="text-xs text-gray-500">
|
|
26
26
|
Feedback Ticket
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<NuxtLink
|
|
32
32
|
:to="routes.feedbackTicket.tickets.to"
|
|
33
33
|
class="flex size-8 cursor-pointer items-center justify-center rounded-lg text-gray-400 transition hover:bg-gray-100 hover:text-gray-600"
|
|
34
|
-
title="
|
|
34
|
+
title="View all tickets"
|
|
35
35
|
@click="emit('update', false)"
|
|
36
36
|
>
|
|
37
37
|
<Icon
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
class="flex-1 justify-center"
|
|
70
70
|
@click="emit('update', false)"
|
|
71
71
|
>
|
|
72
|
-
|
|
72
|
+
Cancel
|
|
73
73
|
</Button>
|
|
74
74
|
<Button
|
|
75
75
|
class="flex-1 justify-center"
|
|
@@ -77,12 +77,44 @@
|
|
|
77
77
|
:disabled="!form.meta.value.dirty || addLoader.status.value.isLoading"
|
|
78
78
|
@click="onSubmit"
|
|
79
79
|
>
|
|
80
|
-
|
|
80
|
+
Submit
|
|
81
81
|
</Button>
|
|
82
82
|
</div>
|
|
83
83
|
</div>
|
|
84
84
|
</template>
|
|
85
85
|
</Slideover>
|
|
86
|
+
|
|
87
|
+
<Modal
|
|
88
|
+
v-model:open="isSuccessOpen"
|
|
89
|
+
:ui="{ content: 'max-w-sm' }"
|
|
90
|
+
>
|
|
91
|
+
<template #content>
|
|
92
|
+
<div class="relative flex flex-col items-center px-6 py-10 text-center">
|
|
93
|
+
<button
|
|
94
|
+
class="absolute top-4 right-4 flex size-8 cursor-pointer items-center justify-center rounded-lg text-gray-400 transition hover:bg-gray-100 hover:text-gray-600"
|
|
95
|
+
type="button"
|
|
96
|
+
@click="isSuccessOpen = false"
|
|
97
|
+
>
|
|
98
|
+
<Icon
|
|
99
|
+
name="ph:x"
|
|
100
|
+
class="size-5"
|
|
101
|
+
/>
|
|
102
|
+
</button>
|
|
103
|
+
<div class="flex size-20 items-center justify-center rounded-full bg-green-500">
|
|
104
|
+
<Icon
|
|
105
|
+
name="ph:check-bold"
|
|
106
|
+
class="size-10 text-white"
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
<h3 class="mt-6 text-xl font-bold text-gray-900">
|
|
110
|
+
Feedback received!
|
|
111
|
+
</h3>
|
|
112
|
+
<p class="mt-2 text-sm text-gray-400">
|
|
113
|
+
Every issue reported makes us better.
|
|
114
|
+
</p>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
</Modal>
|
|
86
118
|
</template>
|
|
87
119
|
|
|
88
120
|
<script lang="ts" setup>
|
|
@@ -103,12 +135,14 @@ defineProps<{
|
|
|
103
135
|
const addLoader = useFeedbackTicketAddLoader()
|
|
104
136
|
const noti = useNotification()
|
|
105
137
|
|
|
138
|
+
const isSuccessOpen = ref(false)
|
|
139
|
+
|
|
106
140
|
const form = useForm({
|
|
107
141
|
validationSchema: toTypedSchema(
|
|
108
142
|
v.object({
|
|
109
|
-
title: v.pipe(v.string(), v.minLength(1, '
|
|
110
|
-
description: v.pipe(v.string(), v.minLength(1, '
|
|
111
|
-
category: v.pipe(v.string(), v.minLength(1, '
|
|
143
|
+
title: v.pipe(v.string(), v.minLength(1, 'Please enter a title')),
|
|
144
|
+
description: v.pipe(v.string(), v.minLength(1, 'Please enter a description')),
|
|
145
|
+
category: v.pipe(v.string(), v.minLength(1, 'Please select a category')),
|
|
112
146
|
priority: v.optional(v.string(), FeedbackTicketPriority.LOW),
|
|
113
147
|
app: v.nullish(v.string()),
|
|
114
148
|
files: v.nullish(
|
|
@@ -133,8 +167,8 @@ const formFields = createFormFields(() => [
|
|
|
133
167
|
props: {
|
|
134
168
|
form,
|
|
135
169
|
name: 'title',
|
|
136
|
-
label: '
|
|
137
|
-
placeholder: '
|
|
170
|
+
label: 'Title',
|
|
171
|
+
placeholder: 'Briefly describe the issue or feature you need',
|
|
138
172
|
required: true,
|
|
139
173
|
},
|
|
140
174
|
},
|
|
@@ -143,9 +177,9 @@ const formFields = createFormFields(() => [
|
|
|
143
177
|
class: 'col-span-2',
|
|
144
178
|
props: {
|
|
145
179
|
form,
|
|
146
|
-
label: '
|
|
180
|
+
label: 'App',
|
|
147
181
|
name: 'app',
|
|
148
|
-
placeholder: '
|
|
182
|
+
placeholder: 'Select an app',
|
|
149
183
|
clearable: true,
|
|
150
184
|
options: UserModuleOptions,
|
|
151
185
|
},
|
|
@@ -155,8 +189,8 @@ const formFields = createFormFields(() => [
|
|
|
155
189
|
props: {
|
|
156
190
|
form,
|
|
157
191
|
name: 'category',
|
|
158
|
-
label: '
|
|
159
|
-
placeholder: '
|
|
192
|
+
label: 'Category',
|
|
193
|
+
placeholder: 'Select a category',
|
|
160
194
|
options: FeedbackTicketCategoryOptions,
|
|
161
195
|
required: true,
|
|
162
196
|
},
|
|
@@ -166,8 +200,8 @@ const formFields = createFormFields(() => [
|
|
|
166
200
|
props: {
|
|
167
201
|
form,
|
|
168
202
|
name: 'priority',
|
|
169
|
-
label: '
|
|
170
|
-
placeholder: '
|
|
203
|
+
label: 'Priority',
|
|
204
|
+
placeholder: 'Select a priority',
|
|
171
205
|
options: FeedbackTicketPriorityOptions,
|
|
172
206
|
},
|
|
173
207
|
},
|
|
@@ -177,8 +211,8 @@ const formFields = createFormFields(() => [
|
|
|
177
211
|
props: {
|
|
178
212
|
form,
|
|
179
213
|
name: 'description',
|
|
180
|
-
label: '
|
|
181
|
-
placeholder: '
|
|
214
|
+
label: 'Description',
|
|
215
|
+
placeholder: 'Describe the issue or feature in detail, e.g. steps to reproduce, expected result',
|
|
182
216
|
rows: 2,
|
|
183
217
|
required: true,
|
|
184
218
|
},
|
|
@@ -189,8 +223,8 @@ const formFields = createFormFields(() => [
|
|
|
189
223
|
props: {
|
|
190
224
|
form,
|
|
191
225
|
name: 'files',
|
|
192
|
-
label: '
|
|
193
|
-
placeholder: 'PNG, JPG, GIF, WEBP (
|
|
226
|
+
label: 'Attach images (optional)',
|
|
227
|
+
placeholder: 'PNG, JPG, GIF, WEBP (max 5MB)',
|
|
194
228
|
requestOptions: useRequestOptions().file(FileAppType.COMMON),
|
|
195
229
|
accept: '.jpg,.jpeg,.png,.gif,.webp',
|
|
196
230
|
maxSize: 5120,
|
|
@@ -228,9 +262,7 @@ useWatchTrue(
|
|
|
228
262
|
() => {
|
|
229
263
|
emit('success')
|
|
230
264
|
form.resetForm()
|
|
231
|
-
|
|
232
|
-
title: 'ส่งรายงานสำเร็จ ขอบคุณ!',
|
|
233
|
-
})
|
|
265
|
+
isSuccessOpen.value = true
|
|
234
266
|
},
|
|
235
267
|
)
|
|
236
268
|
|
|
@@ -238,8 +270,8 @@ useWatchTrue(
|
|
|
238
270
|
() => addLoader.status.value.isError,
|
|
239
271
|
() => {
|
|
240
272
|
noti.error({
|
|
241
|
-
title: '
|
|
242
|
-
description: StringHelper.getError(addLoader.status.value.errorData, '
|
|
273
|
+
title: 'Failed to submit',
|
|
274
|
+
description: StringHelper.getError(addLoader.status.value.errorData, 'Please try again later'),
|
|
243
275
|
})
|
|
244
276
|
},
|
|
245
277
|
)
|
|
@@ -12,7 +12,24 @@ export const FeedbackTicketPriorityLabel: Record<FeedbackTicketPriority, string>
|
|
|
12
12
|
[FeedbackTicketPriority.LOW]: 'Low',
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export const FeedbackTicketPriorityIcon: Record<FeedbackTicketPriority, string> = {
|
|
16
|
+
[FeedbackTicketPriority.CRITICAL]: 'ph:warning-circle-fill',
|
|
17
|
+
[FeedbackTicketPriority.HIGH]: 'ph:arrow-up',
|
|
18
|
+
[FeedbackTicketPriority.MEDIUM]: 'ph:minus',
|
|
19
|
+
[FeedbackTicketPriority.LOW]: 'ph:arrow-down',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const FeedbackTicketPriorityColor: Record<FeedbackTicketPriority, 'info' | 'neutral' | 'success' | 'warning' | 'error'> = {
|
|
23
|
+
[FeedbackTicketPriority.CRITICAL]: 'error',
|
|
24
|
+
[FeedbackTicketPriority.HIGH]: 'warning',
|
|
25
|
+
[FeedbackTicketPriority.MEDIUM]: 'info',
|
|
26
|
+
[FeedbackTicketPriority.LOW]: 'neutral',
|
|
27
|
+
}
|
|
28
|
+
|
|
15
29
|
export const FeedbackTicketPriorityOptions = Object.entries(FeedbackTicketPriorityLabel).map(([value, label]) => ({
|
|
16
30
|
value,
|
|
17
31
|
label,
|
|
32
|
+
chip: {
|
|
33
|
+
color: FeedbackTicketPriorityColor[value as FeedbackTicketPriority],
|
|
34
|
+
},
|
|
18
35
|
}))
|