@finema/finework-layer 2.0.33 → 2.0.35

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.35](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.34...2.0.35) (2026-08-19)
4
+
5
+ ### Features
6
+
7
+ * translate feedback ticket form from Thai to English ([437b87a](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/437b87a5d75f02c615eeca19595d8f51f5dedcf7))
8
+
9
+ ## [2.0.34](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.33...2.0.34) (2026-08-18)
10
+
11
+ ### Features
12
+
13
+ * improve file deletion logic in feedback ticket form ([1a5b7e4](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/1a5b7e432e6677510d5c39744616b07601e55b30))
14
+
3
15
  ## [2.0.33](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.32...2.0.33) (2026-08-18)
4
16
 
5
17
  ## [2.0.32](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/2.0.31...2.0.32) (2026-08-18)
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  <div>
22
22
  <h2 class="text-base font-semibold text-gray-900">
23
- แจ้งปัญหา / ขอ Feature
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,7 +77,7 @@
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>
@@ -106,9 +106,9 @@ const noti = useNotification()
106
106
  const form = useForm({
107
107
  validationSchema: toTypedSchema(
108
108
  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, 'กรุณาเลือกประเภท')),
109
+ title: v.pipe(v.string(), v.minLength(1, 'Please enter a title')),
110
+ description: v.pipe(v.string(), v.minLength(1, 'Please enter a description')),
111
+ category: v.pipe(v.string(), v.minLength(1, 'Please select a category')),
112
112
  priority: v.optional(v.string(), FeedbackTicketPriority.LOW),
113
113
  app: v.nullish(v.string()),
114
114
  files: v.nullish(
@@ -133,8 +133,8 @@ const formFields = createFormFields(() => [
133
133
  props: {
134
134
  form,
135
135
  name: 'title',
136
- label: 'หัวข้อ',
137
- placeholder: 'อธิบายปัญหาหรือ feature ที่ต้องการสั้นๆ',
136
+ label: 'Title',
137
+ placeholder: 'Briefly describe the issue or feature you need',
138
138
  required: true,
139
139
  },
140
140
  },
@@ -143,9 +143,9 @@ const formFields = createFormFields(() => [
143
143
  class: 'col-span-2',
144
144
  props: {
145
145
  form,
146
- label: 'ระบบ',
146
+ label: 'App',
147
147
  name: 'app',
148
- placeholder: 'เลือกระบบ',
148
+ placeholder: 'Select an app',
149
149
  clearable: true,
150
150
  options: UserModuleOptions,
151
151
  },
@@ -155,8 +155,8 @@ const formFields = createFormFields(() => [
155
155
  props: {
156
156
  form,
157
157
  name: 'category',
158
- label: 'ประเภท',
159
- placeholder: 'เลือกประเภท',
158
+ label: 'Category',
159
+ placeholder: 'Select a category',
160
160
  options: FeedbackTicketCategoryOptions,
161
161
  required: true,
162
162
  },
@@ -166,8 +166,8 @@ const formFields = createFormFields(() => [
166
166
  props: {
167
167
  form,
168
168
  name: 'priority',
169
- label: 'ความสำคัญ',
170
- placeholder: 'เลือกความสำคัญ',
169
+ label: 'Priority',
170
+ placeholder: 'Select a priority',
171
171
  options: FeedbackTicketPriorityOptions,
172
172
  },
173
173
  },
@@ -177,8 +177,8 @@ const formFields = createFormFields(() => [
177
177
  props: {
178
178
  form,
179
179
  name: 'description',
180
- label: 'รายละเอียด',
181
- placeholder: 'อธิบายปัญหาหรือ feature ที่ต้องการอย่างละเอียด เช่น ขั้นตอนที่ทำให้เกิดปัญหา, ผลลัพธ์ที่ต้องการ',
180
+ label: 'Description',
181
+ placeholder: 'Describe the issue or feature in detail, e.g. steps to reproduce, expected result',
182
182
  rows: 2,
183
183
  required: true,
184
184
  },
@@ -189,8 +189,8 @@ const formFields = createFormFields(() => [
189
189
  props: {
190
190
  form,
191
191
  name: 'files',
192
- label: 'แนบรูปภาพ (ถ้ามี)',
193
- placeholder: 'PNG, JPG, GIF, WEBP (สูงสุด 5MB)',
192
+ label: 'Attach images (optional)',
193
+ placeholder: 'PNG, JPG, GIF, WEBP (max 5MB)',
194
194
  requestOptions: useRequestOptions().file(FileAppType.COMMON),
195
195
  accept: '.jpg,.jpeg,.png,.gif,.webp',
196
196
  maxSize: 5120,
@@ -199,7 +199,19 @@ const formFields = createFormFields(() => [
199
199
  change: () => {},
200
200
  success: () => {},
201
201
  delete: (file: any) => {
202
- form.setFieldValue('files', form.values.files?.filter((f: any) => f.id !== file.id))
202
+ const currentFiles = form.values.files || []
203
+
204
+ const nextFiles
205
+ = typeof file === 'number'
206
+ ? currentFiles.filter((_: any, index: number) => index !== file)
207
+ : currentFiles.filter(
208
+ (f: any) =>
209
+ f.id !== file?.id
210
+ && f.path !== file?.path
211
+ && f.url !== file?.url,
212
+ )
213
+
214
+ form.setFieldValue('files', nextFiles.length ? nextFiles : null)
203
215
  },
204
216
  },
205
217
  },
@@ -217,7 +229,7 @@ useWatchTrue(
217
229
  emit('success')
218
230
  form.resetForm()
219
231
  noti.success({
220
- title: 'ส่งรายงานสำเร็จ ขอบคุณ!',
232
+ title: 'Submitted successfully, thank you!',
221
233
  })
222
234
  },
223
235
  )
@@ -226,8 +238,8 @@ useWatchTrue(
226
238
  () => addLoader.status.value.isError,
227
239
  () => {
228
240
  noti.error({
229
- title: 'ส่งรายงานไม่สำเร็จ',
230
- description: StringHelper.getError(addLoader.status.value.errorData, 'กรุณาลองใหม่ภายหลัง'),
241
+ title: 'Failed to submit',
242
+ description: StringHelper.getError(addLoader.status.value.errorData, 'Please try again later'),
231
243
  })
232
244
  },
233
245
  )
@@ -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
  }))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "2.0.33",
4
+ "version": "2.0.35",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",