pukaad-ui-lib 1.357.0 → 1.359.0
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/dist/module.json +1 -1
- package/dist/runtime/components/display/display-image-place.vue +178 -47
- package/dist/runtime/components/image/image-cropper.d.vue.ts +2 -2
- package/dist/runtime/components/image/image-cropper.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +3 -3
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +3 -3
- package/dist/runtime/components/input/input-combobox.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-combobox.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-link.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-link.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-localized-name.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-suggest.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-suggest.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-text-field.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-text-field.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-typed-field.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-typed-field.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-media-view.d.vue.ts +3 -0
- package/dist/runtime/components/modal/modal-media-view.vue +48 -7
- package/dist/runtime/components/modal/modal-media-view.vue.d.ts +3 -0
- package/dist/runtime/components/modal/modal-report.vue +1 -53
- package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.d.vue.ts +5 -2
- package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue +35 -30
- package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue.d.ts +5 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,58 +1,139 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- Personal state → Featured layout — 1 รูป: w-full -->
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="layoutMode === 'featured' && photos.length === 1"
|
|
5
|
+
class="h-[360px]"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="w-full h-full rounded-[8px] overflow-hidden cursor-pointer"
|
|
9
|
+
@click="openLightbox('photo', 0)"
|
|
10
|
+
>
|
|
11
|
+
<Image
|
|
12
|
+
:src="photos[0].url"
|
|
13
|
+
class="w-full h-full object-cover"
|
|
14
|
+
width="auto"
|
|
15
|
+
height="auto"
|
|
16
|
+
/>
|
|
6
17
|
</div>
|
|
7
18
|
</div>
|
|
8
19
|
|
|
9
20
|
<!-- Personal state → Featured layout — 2 รูป: แบ่งครึ่ง w-full -->
|
|
10
|
-
<div
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
<div
|
|
22
|
+
v-else-if="layoutMode === 'featured' && photos.length === 2"
|
|
23
|
+
class="flex gap-[8px] h-[360px]"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
class="flex-1 rounded-[8px] overflow-hidden cursor-pointer"
|
|
27
|
+
@click="openLightbox('photo', 0)"
|
|
28
|
+
>
|
|
29
|
+
<Image
|
|
30
|
+
:src="photos[0].url"
|
|
31
|
+
class="w-full h-full object-cover"
|
|
32
|
+
width="auto"
|
|
33
|
+
height="auto"
|
|
34
|
+
/>
|
|
13
35
|
</div>
|
|
14
|
-
<div
|
|
15
|
-
|
|
36
|
+
<div
|
|
37
|
+
class="flex-1 rounded-[8px] overflow-hidden cursor-pointer"
|
|
38
|
+
@click="openLightbox('photo', 1)"
|
|
39
|
+
>
|
|
40
|
+
<Image
|
|
41
|
+
:src="photos[1].url"
|
|
42
|
+
class="w-full h-full object-cover"
|
|
43
|
+
width="auto"
|
|
44
|
+
height="auto"
|
|
45
|
+
/>
|
|
16
46
|
</div>
|
|
17
47
|
</div>
|
|
18
48
|
|
|
19
49
|
<!-- Personal state → Featured layout — 3+ รูป: layout เดิม -->
|
|
20
50
|
<div v-else-if="layoutMode === 'featured'" class="flex gap-[8px] h-[360px]">
|
|
21
|
-
<div
|
|
22
|
-
|
|
23
|
-
|
|
51
|
+
<div
|
|
52
|
+
v-if="photos[0]"
|
|
53
|
+
class="w-[620px] shrink-0 rounded-[8px] overflow-hidden cursor-pointer"
|
|
54
|
+
@click="openLightbox('photo', 0)"
|
|
55
|
+
>
|
|
56
|
+
<Image
|
|
57
|
+
:src="photos[0].url"
|
|
58
|
+
class="w-full h-full object-cover"
|
|
59
|
+
width="auto"
|
|
60
|
+
height="auto"
|
|
61
|
+
/>
|
|
24
62
|
</div>
|
|
25
63
|
|
|
26
|
-
<div
|
|
27
|
-
|
|
64
|
+
<div
|
|
65
|
+
v-if="photos[1]"
|
|
66
|
+
class="flex-1 rounded-[8px] overflow-hidden cursor-pointer"
|
|
67
|
+
@click="openLightbox('photo', 1)"
|
|
68
|
+
>
|
|
69
|
+
<Image
|
|
70
|
+
:src="photos[1].url"
|
|
71
|
+
class="w-full h-full object-cover"
|
|
72
|
+
width="auto"
|
|
73
|
+
height="auto"
|
|
74
|
+
/>
|
|
28
75
|
</div>
|
|
29
76
|
|
|
30
77
|
<div class="w-[306px] shrink-0 flex flex-col gap-[8px]">
|
|
31
|
-
<div
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
78
|
+
<div
|
|
79
|
+
v-if="photos[2]"
|
|
80
|
+
class="flex-1 min-h-0 relative rounded-[8px] overflow-hidden cursor-pointer"
|
|
81
|
+
@click="openLightbox('photo', 2)"
|
|
82
|
+
>
|
|
83
|
+
<Image
|
|
84
|
+
:src="photos[2].url"
|
|
85
|
+
class="w-full h-full object-cover"
|
|
86
|
+
width="auto"
|
|
87
|
+
height="auto"
|
|
88
|
+
/>
|
|
89
|
+
<div
|
|
90
|
+
v-if="featuredPhoto2Overflow > 0"
|
|
91
|
+
class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]"
|
|
92
|
+
>
|
|
36
93
|
<Icon name="fa6-solid:image" :size="42" />
|
|
37
|
-
<span class="font-body-large"
|
|
94
|
+
<span class="font-body-large"
|
|
95
|
+
>รูปภาพ ({{ convertNumber(featuredPhoto2Overflow) }})</span
|
|
96
|
+
>
|
|
38
97
|
</div>
|
|
39
98
|
</div>
|
|
40
99
|
|
|
41
|
-
<div
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
100
|
+
<div
|
|
101
|
+
v-if="videos[0]"
|
|
102
|
+
class="flex-1 min-h-0 relative rounded-[8px] overflow-hidden cursor-pointer"
|
|
103
|
+
@click="openLightbox('video', 0)"
|
|
104
|
+
>
|
|
105
|
+
<Image
|
|
106
|
+
:src="videos[0].url"
|
|
107
|
+
class="w-full h-full object-cover"
|
|
108
|
+
width="auto"
|
|
109
|
+
height="auto"
|
|
110
|
+
/>
|
|
111
|
+
<div
|
|
112
|
+
class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]"
|
|
113
|
+
>
|
|
45
114
|
<Icon name="fa6-solid:video" :size="42" />
|
|
46
115
|
<span class="font-body-large">วิดีโอ ({{ videos.length }})</span>
|
|
47
116
|
</div>
|
|
48
117
|
</div>
|
|
49
|
-
<div
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
118
|
+
<div
|
|
119
|
+
v-else-if="photos[3]"
|
|
120
|
+
class="flex-1 min-h-0 relative rounded-[8px] overflow-hidden cursor-pointer"
|
|
121
|
+
@click="openLightbox('photo', 3)"
|
|
122
|
+
>
|
|
123
|
+
<Image
|
|
124
|
+
:src="photos[3].url"
|
|
125
|
+
class="w-full h-full object-cover"
|
|
126
|
+
width="auto"
|
|
127
|
+
height="auto"
|
|
128
|
+
/>
|
|
129
|
+
<div
|
|
130
|
+
v-if="featuredPhoto3Overflow > 0"
|
|
131
|
+
class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]"
|
|
132
|
+
>
|
|
54
133
|
<Icon name="fa6-solid:image" :size="42" />
|
|
55
|
-
<span class="font-body-large"
|
|
134
|
+
<span class="font-body-large"
|
|
135
|
+
>รูปภาพ ({{ convertNumber(featuredPhoto3Overflow) }})</span
|
|
136
|
+
>
|
|
56
137
|
</div>
|
|
57
138
|
</div>
|
|
58
139
|
</div>
|
|
@@ -61,34 +142,73 @@
|
|
|
61
142
|
<!-- Office / Business state → Album layout -->
|
|
62
143
|
<div v-else-if="layoutMode === 'album'" class="grid grid-cols-5 gap-[10px]">
|
|
63
144
|
<!-- Row 1: photos[0..3] -->
|
|
64
|
-
<div
|
|
65
|
-
|
|
66
|
-
|
|
145
|
+
<div
|
|
146
|
+
v-for="(photo, i) in galleryRow1"
|
|
147
|
+
:key="`g1-${i}`"
|
|
148
|
+
class="w-[132px] h-[132px] rounded-[8px] overflow-hidden cursor-pointer"
|
|
149
|
+
@click="openLightbox('photo', i)"
|
|
150
|
+
>
|
|
151
|
+
<Image
|
|
152
|
+
:src="photo.url"
|
|
153
|
+
class="w-full h-full object-cover"
|
|
154
|
+
width="auto"
|
|
155
|
+
height="auto"
|
|
156
|
+
/>
|
|
67
157
|
</div>
|
|
68
158
|
|
|
69
159
|
<!-- Row 1 col 5: image count overlay -->
|
|
70
|
-
<div
|
|
160
|
+
<div
|
|
161
|
+
v-show="galleryCountPhoto != null"
|
|
71
162
|
class="w-[132px] h-[132px] relative rounded-[8px] overflow-hidden cursor-pointer"
|
|
72
|
-
@click="openLightbox('photo', 8)"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
163
|
+
@click="openLightbox('photo', 8)"
|
|
164
|
+
>
|
|
165
|
+
<Image
|
|
166
|
+
v-if="galleryCountPhoto"
|
|
167
|
+
:src="galleryCountPhoto.url"
|
|
168
|
+
class="w-full h-full object-cover"
|
|
169
|
+
width="auto"
|
|
170
|
+
height="auto"
|
|
171
|
+
/>
|
|
172
|
+
<div
|
|
173
|
+
class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]"
|
|
174
|
+
>
|
|
76
175
|
<Icon name="fa6-solid:image" :size="35" />
|
|
77
|
-
<span class="font-label-medium"
|
|
176
|
+
<span class="font-label-medium"
|
|
177
|
+
>รูปภาพ ({{ convertNumber(photos.length - 8) }})</span
|
|
178
|
+
>
|
|
78
179
|
</div>
|
|
79
180
|
</div>
|
|
80
181
|
|
|
81
182
|
<!-- Row 2: photos[4..7] -->
|
|
82
|
-
<div
|
|
83
|
-
|
|
84
|
-
|
|
183
|
+
<div
|
|
184
|
+
v-for="(photo, i) in galleryRow2"
|
|
185
|
+
:key="`g2-${i}`"
|
|
186
|
+
class="w-[132px] h-[132px] rounded-[8px] overflow-hidden cursor-pointer"
|
|
187
|
+
@click="openLightbox('photo', 4 + i)"
|
|
188
|
+
>
|
|
189
|
+
<Image
|
|
190
|
+
:src="photo.url"
|
|
191
|
+
class="w-full h-full object-cover"
|
|
192
|
+
width="auto"
|
|
193
|
+
height="auto"
|
|
194
|
+
/>
|
|
85
195
|
</div>
|
|
86
196
|
|
|
87
197
|
<!-- Row 2 col 5: video overlay -->
|
|
88
|
-
<div
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
198
|
+
<div
|
|
199
|
+
v-if="videos[0]"
|
|
200
|
+
class="w-[132px] h-[132px] relative rounded-[8px] overflow-hidden cursor-pointer"
|
|
201
|
+
@click="openLightbox('video', 0)"
|
|
202
|
+
>
|
|
203
|
+
<Image
|
|
204
|
+
:src="videos[0].url"
|
|
205
|
+
class="w-full h-full object-cover"
|
|
206
|
+
width="auto"
|
|
207
|
+
height="auto"
|
|
208
|
+
/>
|
|
209
|
+
<div
|
|
210
|
+
class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]"
|
|
211
|
+
>
|
|
92
212
|
<Icon name="fa6-solid:video" :size="35" />
|
|
93
213
|
<span class="font-label-medium">วิดีโอ ({{ videos.length }})</span>
|
|
94
214
|
</div>
|
|
@@ -96,7 +216,13 @@
|
|
|
96
216
|
</div>
|
|
97
217
|
|
|
98
218
|
<!-- Lightbox modal -->
|
|
99
|
-
<ModalMediaView
|
|
219
|
+
<ModalMediaView
|
|
220
|
+
v-model="isMediaOpen"
|
|
221
|
+
:items="mediaItems"
|
|
222
|
+
:title="props.title"
|
|
223
|
+
:start-index="mediaStartIndex"
|
|
224
|
+
:uploader-label="uploaderLabel"
|
|
225
|
+
/>
|
|
100
226
|
</template>
|
|
101
227
|
|
|
102
228
|
<script setup>
|
|
@@ -115,6 +241,9 @@ const layoutMode = computed(() => {
|
|
|
115
241
|
if (props.state === "office" || props.state === "business") return "album";
|
|
116
242
|
return "featured";
|
|
117
243
|
});
|
|
244
|
+
const uploaderLabel = computed(
|
|
245
|
+
() => props.state === "business" ? "\u0E1D\u0E48\u0E32\u0E22\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23" : "\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E23\u0E30\u0E1A\u0E1A"
|
|
246
|
+
);
|
|
118
247
|
const photos = computed(() => props.photos.filter((p) => !!p.url));
|
|
119
248
|
const videos = computed(() => props.videos.filter((p) => !!p.url));
|
|
120
249
|
const featuredPhoto2Overflow = computed(() => {
|
|
@@ -135,7 +264,9 @@ const galleryCountPhoto = computed(
|
|
|
135
264
|
const isMediaOpen = ref(false);
|
|
136
265
|
const mediaType = ref("photo");
|
|
137
266
|
const mediaStartIndex = ref(0);
|
|
138
|
-
const mediaItems = computed(
|
|
267
|
+
const mediaItems = computed(
|
|
268
|
+
() => mediaType.value === "photo" ? photos.value : videos.value
|
|
269
|
+
);
|
|
139
270
|
const openLightbox = (type, index) => {
|
|
140
271
|
mediaType.value = type;
|
|
141
272
|
mediaStartIndex.value = index;
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -48,14 +48,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
id: string;
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
52
|
-
description: string;
|
|
53
|
-
limit: number;
|
|
54
51
|
labelKey: string;
|
|
55
52
|
placeholder: string;
|
|
53
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
54
|
+
description: string;
|
|
56
55
|
disabledErrorMessage: boolean;
|
|
57
56
|
disabledBorder: boolean;
|
|
58
57
|
showCounter: boolean;
|
|
58
|
+
limit: number;
|
|
59
59
|
returnObject: boolean;
|
|
60
60
|
freeText: boolean;
|
|
61
61
|
valueKey: string;
|
|
@@ -48,14 +48,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
id: string;
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
52
|
-
description: string;
|
|
53
|
-
limit: number;
|
|
54
51
|
labelKey: string;
|
|
55
52
|
placeholder: string;
|
|
53
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
54
|
+
description: string;
|
|
56
55
|
disabledErrorMessage: boolean;
|
|
57
56
|
disabledBorder: boolean;
|
|
58
57
|
showCounter: boolean;
|
|
58
|
+
limit: number;
|
|
59
59
|
returnObject: boolean;
|
|
60
60
|
freeText: boolean;
|
|
61
61
|
valueKey: string;
|
|
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
34
34
|
name: string;
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
fullWidth: boolean;
|
|
37
|
-
limit: number;
|
|
38
37
|
disabledErrorMessage: boolean;
|
|
38
|
+
limit: number;
|
|
39
39
|
accept: string;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
34
34
|
name: string;
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
fullWidth: boolean;
|
|
37
|
-
limit: number;
|
|
38
37
|
disabledErrorMessage: boolean;
|
|
38
|
+
limit: number;
|
|
39
39
|
accept: string;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
}>, {
|
|
13
13
|
name: string;
|
|
14
14
|
modelValue: InputLinkItem[] | ContactChannel[];
|
|
15
|
-
limit: number;
|
|
16
15
|
showCounter: boolean;
|
|
16
|
+
limit: number;
|
|
17
17
|
format: "legacy" | "contact_channel";
|
|
18
18
|
defaultFirst: boolean;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
}>, {
|
|
13
13
|
name: string;
|
|
14
14
|
modelValue: InputLinkItem[] | ContactChannel[];
|
|
15
|
-
limit: number;
|
|
16
15
|
showCounter: boolean;
|
|
16
|
+
limit: number;
|
|
17
17
|
format: "legacy" | "contact_channel";
|
|
18
18
|
defaultFirst: boolean;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -11,10 +11,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
|
-
options: InputSelectItem[];
|
|
15
|
-
limit: number;
|
|
16
14
|
placeholder: string;
|
|
15
|
+
options: InputSelectItem[];
|
|
17
16
|
showCounter: boolean;
|
|
17
|
+
limit: number;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -11,10 +11,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
|
-
options: InputSelectItem[];
|
|
15
|
-
limit: number;
|
|
16
14
|
placeholder: string;
|
|
15
|
+
options: InputSelectItem[];
|
|
17
16
|
showCounter: boolean;
|
|
17
|
+
limit: number;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -19,13 +19,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
|
-
description: string;
|
|
23
|
-
limit: number;
|
|
24
22
|
labelKey: string;
|
|
25
23
|
placeholder: string;
|
|
24
|
+
description: string;
|
|
26
25
|
disabledErrorMessage: boolean;
|
|
27
26
|
disabledBorder: boolean;
|
|
28
27
|
showCounter: boolean;
|
|
28
|
+
limit: number;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -19,13 +19,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
|
-
description: string;
|
|
23
|
-
limit: number;
|
|
24
22
|
labelKey: string;
|
|
25
23
|
placeholder: string;
|
|
24
|
+
description: string;
|
|
26
25
|
disabledErrorMessage: boolean;
|
|
27
26
|
disabledBorder: boolean;
|
|
28
27
|
showCounter: boolean;
|
|
28
|
+
limit: number;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -25,9 +25,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
+
placeholder: string;
|
|
28
29
|
state: "user" | "admin";
|
|
29
30
|
limit: number;
|
|
30
|
-
placeholder: string;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -25,9 +25,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
+
placeholder: string;
|
|
28
29
|
state: "user" | "admin";
|
|
29
30
|
limit: number;
|
|
30
|
-
placeholder: string;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -59,10 +59,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
59
59
|
id: string;
|
|
60
60
|
name: string;
|
|
61
61
|
required: boolean;
|
|
62
|
-
limit: number;
|
|
63
62
|
disabledErrorMessage: boolean;
|
|
64
63
|
disabledBorder: boolean;
|
|
65
64
|
showCounter: boolean;
|
|
65
|
+
limit: number;
|
|
66
66
|
readonly: boolean;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -59,10 +59,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
59
59
|
id: string;
|
|
60
60
|
name: string;
|
|
61
61
|
required: boolean;
|
|
62
|
-
limit: number;
|
|
63
62
|
disabledErrorMessage: boolean;
|
|
64
63
|
disabledBorder: boolean;
|
|
65
64
|
showCounter: boolean;
|
|
65
|
+
limit: number;
|
|
66
66
|
readonly: boolean;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -46,11 +46,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
|
-
limit: number;
|
|
50
49
|
rows: number;
|
|
51
50
|
disabledErrorMessage: boolean;
|
|
52
51
|
disabledBorder: boolean;
|
|
53
52
|
showCounter: boolean;
|
|
53
|
+
limit: number;
|
|
54
54
|
readonly: boolean;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
@@ -46,11 +46,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
|
-
limit: number;
|
|
50
49
|
rows: number;
|
|
51
50
|
disabledErrorMessage: boolean;
|
|
52
51
|
disabledBorder: boolean;
|
|
53
52
|
showCounter: boolean;
|
|
53
|
+
limit: number;
|
|
54
54
|
readonly: boolean;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
22
|
options: import("../../../types/components/input/input-select.js").InputSelectItem[];
|
|
23
|
-
limit: number;
|
|
24
23
|
showCounter: boolean;
|
|
24
|
+
limit: number;
|
|
25
25
|
selectClass: import("vue").HTMLAttributes["class"];
|
|
26
26
|
resetOnTypeChange: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
22
|
options: import("../../../types/components/input/input-select.js").InputSelectItem[];
|
|
23
|
-
limit: number;
|
|
24
23
|
showCounter: boolean;
|
|
24
|
+
limit: number;
|
|
25
25
|
selectClass: import("vue").HTMLAttributes["class"];
|
|
26
26
|
resetOnTypeChange: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,6 +6,8 @@ export interface ModalMediaViewProps {
|
|
|
6
6
|
startIndex?: number;
|
|
7
7
|
/** ข้อมูล review เต็ม สำหรับแสดง overlay รีวิว */
|
|
8
8
|
review?: CardReviewProps;
|
|
9
|
+
/** ป้ายชื่อผู้ดูแลสื่อนี้ ที่แสดงใน overlay (โหมดไม่ใช่ review) — office = "ผู้ดูแลระบบ", business = "ฝ่ายจัดการ" */
|
|
10
|
+
uploaderLabel?: string;
|
|
9
11
|
}
|
|
10
12
|
type __VLS_Props = ModalMediaViewProps;
|
|
11
13
|
type __VLS_ModelProps = {
|
|
@@ -20,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
20
22
|
title: string;
|
|
21
23
|
items: CarouselItem[];
|
|
22
24
|
startIndex: number;
|
|
25
|
+
uploaderLabel: string;
|
|
23
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
27
|
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
@@ -15,10 +15,25 @@
|
|
|
15
15
|
<div
|
|
16
16
|
v-if="!props.review && currentItem?.description"
|
|
17
17
|
class="absolute bottom-0 w-full z-10"
|
|
18
|
-
style="
|
|
18
|
+
style="
|
|
19
|
+
background: linear-gradient(
|
|
20
|
+
to top,
|
|
21
|
+
rgba(0, 0, 0, 0.75) 0%,
|
|
22
|
+
transparent 100%
|
|
23
|
+
);
|
|
24
|
+
"
|
|
19
25
|
>
|
|
20
|
-
<div
|
|
21
|
-
|
|
26
|
+
<div
|
|
27
|
+
class="p-[16px] h-[125px] flex flex-col gap-[8px] text-white font-body-large"
|
|
28
|
+
>
|
|
29
|
+
<div class="flex justify-between items-center">
|
|
30
|
+
<div class="font-body-large-prominent">{{ props.uploaderLabel }}</div>
|
|
31
|
+
<Icon
|
|
32
|
+
name="lucide:flag"
|
|
33
|
+
class="cursor-pointer"
|
|
34
|
+
@click="isOpenModalReport = true"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
22
37
|
<div>{{ currentItem.description }}</div>
|
|
23
38
|
</div>
|
|
24
39
|
</div>
|
|
@@ -27,7 +42,13 @@
|
|
|
27
42
|
<div
|
|
28
43
|
v-if="props.review"
|
|
29
44
|
class="absolute bottom-0 w-full z-10"
|
|
30
|
-
style="
|
|
45
|
+
style="
|
|
46
|
+
background: linear-gradient(
|
|
47
|
+
to top,
|
|
48
|
+
rgba(0, 0, 0, 0.75) 0%,
|
|
49
|
+
transparent 100%
|
|
50
|
+
);
|
|
51
|
+
"
|
|
31
52
|
>
|
|
32
53
|
<div class="flex flex-col w-full">
|
|
33
54
|
<div
|
|
@@ -65,7 +86,11 @@
|
|
|
65
86
|
:model-value="props.review.review.rating"
|
|
66
87
|
/>
|
|
67
88
|
<span class="font-body-small opacity-75">
|
|
68
|
-
{{
|
|
89
|
+
{{
|
|
90
|
+
convertDateTorelativeText(
|
|
91
|
+
props.review.review.created_at ?? ""
|
|
92
|
+
)
|
|
93
|
+
}}
|
|
69
94
|
</span>
|
|
70
95
|
</div>
|
|
71
96
|
</div>
|
|
@@ -118,7 +143,11 @@
|
|
|
118
143
|
:model-value="props.review.review.rating"
|
|
119
144
|
/>
|
|
120
145
|
<span class="font-body-small opacity-75">
|
|
121
|
-
{{
|
|
146
|
+
{{
|
|
147
|
+
convertDateTorelativeText(
|
|
148
|
+
props.review.review.created_at ?? ""
|
|
149
|
+
)
|
|
150
|
+
}}
|
|
122
151
|
</span>
|
|
123
152
|
</div>
|
|
124
153
|
</div>
|
|
@@ -135,6 +164,12 @@
|
|
|
135
164
|
</div>
|
|
136
165
|
</div>
|
|
137
166
|
</Modal>
|
|
167
|
+
|
|
168
|
+
<ModalReport
|
|
169
|
+
v-model="isOpenModalReport"
|
|
170
|
+
state="media"
|
|
171
|
+
@submit="onReportSubmit"
|
|
172
|
+
/>
|
|
138
173
|
</template>
|
|
139
174
|
|
|
140
175
|
<script setup>
|
|
@@ -145,10 +180,16 @@ const props = defineProps({
|
|
|
145
180
|
items: { type: Array, required: false, default: () => [] },
|
|
146
181
|
title: { type: String, required: false, default: "" },
|
|
147
182
|
startIndex: { type: Number, required: false, default: 0 },
|
|
148
|
-
review: { type: Object, required: false }
|
|
183
|
+
review: { type: Object, required: false },
|
|
184
|
+
uploaderLabel: { type: String, required: false, default: "\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E23\u0E30\u0E1A\u0E1A" }
|
|
149
185
|
});
|
|
150
186
|
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
151
187
|
const showMoreDescription = ref(false);
|
|
152
188
|
const currentIndex = ref(props.startIndex ?? 0);
|
|
189
|
+
const isOpenModalReport = ref(false);
|
|
153
190
|
const currentItem = computed(() => props.items[currentIndex.value] ?? null);
|
|
191
|
+
const onReportSubmit = (payload) => {
|
|
192
|
+
console.log("report payload:", payload);
|
|
193
|
+
isOpenModalReport.value = false;
|
|
194
|
+
};
|
|
154
195
|
</script>
|
|
@@ -6,6 +6,8 @@ export interface ModalMediaViewProps {
|
|
|
6
6
|
startIndex?: number;
|
|
7
7
|
/** ข้อมูล review เต็ม สำหรับแสดง overlay รีวิว */
|
|
8
8
|
review?: CardReviewProps;
|
|
9
|
+
/** ป้ายชื่อผู้ดูแลสื่อนี้ ที่แสดงใน overlay (โหมดไม่ใช่ review) — office = "ผู้ดูแลระบบ", business = "ฝ่ายจัดการ" */
|
|
10
|
+
uploaderLabel?: string;
|
|
9
11
|
}
|
|
10
12
|
type __VLS_Props = ModalMediaViewProps;
|
|
11
13
|
type __VLS_ModelProps = {
|
|
@@ -20,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
20
22
|
title: string;
|
|
21
23
|
items: CarouselItem[];
|
|
22
24
|
startIndex: number;
|
|
25
|
+
uploaderLabel: string;
|
|
23
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
27
|
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
@@ -63,24 +63,6 @@ const placeEditOptions = [
|
|
|
63
63
|
{ label: "\u0E22\u0E49\u0E32\u0E22\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E41\u0E25\u0E49\u0E27", value: "relocated" },
|
|
64
64
|
{ label: "\u0E2D\u0E37\u0E48\u0E19\u0E46", value: "other" }
|
|
65
65
|
];
|
|
66
|
-
const placeCloseDuplicateOptions = [
|
|
67
|
-
{ label: "\u0E1B\u0E34\u0E14\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E22\u0E38\u0E14\u0E01\u0E34\u0E08\u0E01\u0E32\u0E23\u0E41\u0E25\u0E49\u0E27", value: "closed" },
|
|
68
|
-
{ label: "\u0E44\u0E21\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48", value: "not_exist" },
|
|
69
|
-
{ label: "\u0E0B\u0E49\u0E33\u0E01\u0E31\u0E1A\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E2D\u0E37\u0E48\u0E19", value: "duplicate" },
|
|
70
|
-
{ label: "\u0E2D\u0E37\u0E48\u0E19\u0E46", value: "other" }
|
|
71
|
-
];
|
|
72
|
-
const placeReportOptions = [
|
|
73
|
-
{ label: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07", value: "invalid_info" },
|
|
74
|
-
{ label: "\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48\u0E08\u0E23\u0E34\u0E07", value: "fake_place" },
|
|
75
|
-
{ label: "\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E0B\u0E49\u0E33", value: "duplicate_place" },
|
|
76
|
-
{ label: "\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07", value: "invalid_category" },
|
|
77
|
-
{ label: "\u0E1E\u0E34\u0E01\u0E31\u0E14\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07", value: "invalid_location" },
|
|
78
|
-
{ label: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E18\u0E38\u0E23\u0E01\u0E34\u0E08\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E17\u0E47\u0E08\u0E2B\u0E23\u0E37\u0E2D\u0E41\u0E2D\u0E1A\u0E2D\u0E49\u0E32\u0E07", value: "impersonation_business" },
|
|
79
|
-
{ label: "\u0E0A\u0E37\u0E48\u0E2D\u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E21\u0E35\u0E2A\u0E41\u0E1B\u0E21\u0E2B\u0E23\u0E37\u0E2D\u0E42\u0E06\u0E29\u0E13\u0E32", value: "spam_advertising" },
|
|
80
|
-
{ label: "\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E25\u0E30\u0E40\u0E21\u0E34\u0E14\u0E25\u0E34\u0E02\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C", value: "copyright_infringement" },
|
|
81
|
-
{ label: "\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E44\u0E21\u0E48\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E2A\u0E21\u0E2B\u0E23\u0E37\u0E2D\u0E1C\u0E34\u0E14\u0E01\u0E0E\u0E2B\u0E21\u0E32\u0E22", value: "inappropriate_illegal" },
|
|
82
|
-
{ label: "\u0E2D\u0E37\u0E48\u0E19\u0E46", value: "other" }
|
|
83
|
-
];
|
|
84
66
|
const mediaOptions = [
|
|
85
67
|
{ label: "\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E44\u0E21\u0E48\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E2A\u0E21", value: "inappropriate" },
|
|
86
68
|
{ label: "\u0E02\u0E49\u0E2D\u0E01\u0E31\u0E07\u0E27\u0E25\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E04\u0E27\u0E32\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27", value: "privacy" },
|
|
@@ -89,37 +71,12 @@ const mediaOptions = [
|
|
|
89
71
|
{ label: "\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E19\u0E35\u0E49", value: "wrong_place" },
|
|
90
72
|
{ label: "\u0E2D\u0E37\u0E48\u0E19\u0E46", value: "other" }
|
|
91
73
|
];
|
|
92
|
-
const reviewOptions = [
|
|
93
|
-
{ label: "\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E44\u0E21\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07", value: "irrelevant" },
|
|
94
|
-
{ label: "\u0E2B\u0E22\u0E32\u0E1A\u0E04\u0E32\u0E22 / \u0E44\u0E21\u0E48\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E2A\u0E21", value: "inappropriate" },
|
|
95
|
-
{ label: "\u0E25\u0E32\u0E21\u0E01\u0E2D\u0E19\u0E32\u0E08\u0E32\u0E23", value: "pornographic" },
|
|
96
|
-
{ label: "\u0E04\u0E27\u0E32\u0E21\u0E23\u0E38\u0E19\u0E41\u0E23\u0E07", value: "violence" },
|
|
97
|
-
{ label: "\u0E02\u0E48\u0E21\u0E02\u0E39\u0E48 \u0E04\u0E38\u0E01\u0E04\u0E32\u0E21", value: "harassment" },
|
|
98
|
-
{ label: "\u0E01\u0E25\u0E31\u0E48\u0E19\u0E41\u0E01\u0E25\u0E49\u0E07", value: "bullying" },
|
|
99
|
-
{ label: "\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E04\u0E27\u0E32\u0E21\u0E40\u0E01\u0E25\u0E35\u0E22\u0E14\u0E0A\u0E31\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E02\u0E31\u0E14\u0E41\u0E22\u0E49\u0E07", value: "hate_speech" },
|
|
100
|
-
{ label: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E0B\u0E49\u0E33\u0E2B\u0E23\u0E37\u0E2D\u0E2A\u0E41\u0E1B\u0E21", value: "spam" },
|
|
101
|
-
{ label: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E17\u0E47\u0E08", value: "fake_info" },
|
|
102
|
-
{ label: "\u0E25\u0E30\u0E40\u0E21\u0E34\u0E14\u0E17\u0E23\u0E31\u0E1E\u0E22\u0E4C\u0E2A\u0E34\u0E19\u0E17\u0E32\u0E07\u0E1B\u0E31\u0E0D\u0E0D\u0E32", value: "copyright" },
|
|
103
|
-
{ label: "\u0E25\u0E30\u0E40\u0E21\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E15\u0E01\u0E25\u0E07\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19", value: "terms_violation" },
|
|
104
|
-
{ label: "\u0E1C\u0E34\u0E14\u0E01\u0E0E\u0E2B\u0E21\u0E32\u0E22", value: "illegal" },
|
|
105
|
-
{ label: "\u0E2A\u0E48\u0E07\u0E1C\u0E25\u0E01\u0E23\u0E30\u0E17\u0E1A\u0E15\u0E48\u0E2D\u0E1A\u0E38\u0E04\u0E04\u0E25", value: "personal_impact" },
|
|
106
|
-
{ label: "\u0E40\u0E02\u0E49\u0E32\u0E02\u0E48\u0E32\u0E22\u0E2B\u0E25\u0E2D\u0E01\u0E25\u0E27\u0E07", value: "scam" },
|
|
107
|
-
{ label: "\u0E2D\u0E37\u0E48\u0E19\u0E46", value: "other" }
|
|
108
|
-
];
|
|
109
74
|
const title = computed(() => {
|
|
110
75
|
if (props.state === "place-edit") return "\u0E41\u0E08\u0E49\u0E07\u0E41\u0E01\u0E49\u0E44\u0E02\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E19\u0E35\u0E49";
|
|
111
|
-
if (props.state === "place-close-duplicate") return "\u0E41\u0E08\u0E49\u0E07\u0E1B\u0E34\u0E14\u0E2B\u0E23\u0E37\u0E2D\u0E0B\u0E49\u0E33";
|
|
112
|
-
if (props.state === "place") return "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E19\u0E35\u0E49";
|
|
113
76
|
if (props.state === "media") return "\u0E41\u0E08\u0E49\u0E07\u0E41\u0E01\u0E49\u0E44\u0E02\u0E2A\u0E37\u0E48\u0E2D\u0E19\u0E35\u0E49";
|
|
114
|
-
if (props.state === "review") return "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E23\u0E35\u0E27\u0E34\u0E27\u0E19\u0E35\u0E49";
|
|
115
77
|
return "";
|
|
116
78
|
});
|
|
117
|
-
const placeholderText = computed(() =>
|
|
118
|
-
if (props.state === "place" || props.state === "review") {
|
|
119
|
-
return "\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19";
|
|
120
|
-
}
|
|
121
|
-
return "\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07";
|
|
122
|
-
});
|
|
79
|
+
const placeholderText = computed(() => "\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07");
|
|
123
80
|
const modelValue = defineModel({ type: Boolean, ...{
|
|
124
81
|
default: false
|
|
125
82
|
} });
|
|
@@ -131,18 +88,9 @@ const currentOptions = computed(() => {
|
|
|
131
88
|
if (props.state === "place-edit") {
|
|
132
89
|
return placeEditOptions;
|
|
133
90
|
}
|
|
134
|
-
if (props.state === "place-close-duplicate") {
|
|
135
|
-
return placeCloseDuplicateOptions;
|
|
136
|
-
}
|
|
137
|
-
if (props.state === "place") {
|
|
138
|
-
return placeReportOptions;
|
|
139
|
-
}
|
|
140
91
|
if (props.state === "media") {
|
|
141
92
|
return mediaOptions;
|
|
142
93
|
}
|
|
143
|
-
if (props.state === "review") {
|
|
144
|
-
return reviewOptions;
|
|
145
|
-
}
|
|
146
94
|
return [];
|
|
147
95
|
});
|
|
148
96
|
const items = computed(() => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PickerOptionMenuUserProps } from "#pukaad-ui/types/components/picker/picker-option-menu/picker-option-menu-user";
|
|
2
|
+
import type { ModalReportSubmitPayload } from "#pukaad-ui/types/components/modal/modal-report";
|
|
2
3
|
declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
4
|
"blog-edit": () => any;
|
|
4
5
|
"report-announce": () => any;
|
|
@@ -12,7 +13,6 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
12
13
|
"review-reply": () => any;
|
|
13
14
|
"reply-edit": () => any;
|
|
14
15
|
"profile-name-updated": (name: string) => any;
|
|
15
|
-
"place-close-duplicate": () => any;
|
|
16
16
|
"profile-edit": () => any;
|
|
17
17
|
"profile-share": () => any;
|
|
18
18
|
"profile-follower-delete": () => any;
|
|
@@ -20,7 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
20
20
|
"report-blog": () => any;
|
|
21
21
|
"report-place": () => any;
|
|
22
22
|
"report-profile": () => any;
|
|
23
|
+
"place-close-duplicate": () => any;
|
|
23
24
|
archive: () => any;
|
|
25
|
+
"report-submit": (payload: ModalReportSubmitPayload) => any;
|
|
24
26
|
}, string, import("vue").PublicProps, Readonly<PickerOptionMenuUserProps> & Readonly<{
|
|
25
27
|
"onBlog-edit"?: (() => any) | undefined;
|
|
26
28
|
"onReport-announce"?: (() => any) | undefined;
|
|
@@ -34,7 +36,6 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
34
36
|
"onReview-reply"?: (() => any) | undefined;
|
|
35
37
|
"onReply-edit"?: (() => any) | undefined;
|
|
36
38
|
"onProfile-name-updated"?: ((name: string) => any) | undefined;
|
|
37
|
-
"onPlace-close-duplicate"?: (() => any) | undefined;
|
|
38
39
|
"onProfile-edit"?: (() => any) | undefined;
|
|
39
40
|
"onProfile-share"?: (() => any) | undefined;
|
|
40
41
|
"onProfile-follower-delete"?: (() => any) | undefined;
|
|
@@ -42,7 +43,9 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
42
43
|
"onReport-blog"?: (() => any) | undefined;
|
|
43
44
|
"onReport-place"?: (() => any) | undefined;
|
|
44
45
|
"onReport-profile"?: (() => any) | undefined;
|
|
46
|
+
"onPlace-close-duplicate"?: (() => any) | undefined;
|
|
45
47
|
onArchive?: (() => any) | undefined;
|
|
48
|
+
"onReport-submit"?: ((payload: ModalReportSubmitPayload) => any) | undefined;
|
|
46
49
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
50
|
declare const _default: typeof __VLS_export;
|
|
48
51
|
export default _default;
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
/>
|
|
12
12
|
|
|
13
13
|
<ModalShare v-model="isOpenModalShare" />
|
|
14
|
-
<ModalReport
|
|
14
|
+
<ModalReport
|
|
15
|
+
:state="reportState"
|
|
16
|
+
v-model="isOpenModalReport"
|
|
17
|
+
@submit="onReportSubmit"
|
|
18
|
+
/>
|
|
15
19
|
<ModalProfileEdit
|
|
16
20
|
v-model="isOpenModalProfileEdit"
|
|
17
21
|
:profile-detail="props.profileDetail"
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
|
|
22
26
|
<script setup>
|
|
23
27
|
import { computed, ref } from "vue";
|
|
24
|
-
const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "report-announce", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated"]);
|
|
28
|
+
const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "report-announce", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
|
|
25
29
|
const props = defineProps({
|
|
26
30
|
state: { type: String, required: false },
|
|
27
31
|
profileDetail: { type: Object, required: false },
|
|
@@ -38,7 +42,11 @@ const props = defineProps({
|
|
|
38
42
|
const isOpenModalShare = ref(false);
|
|
39
43
|
const isOpenModalReport = ref(false);
|
|
40
44
|
const isOpenModalProfileEdit = ref(false);
|
|
41
|
-
const reportState = ref();
|
|
45
|
+
const reportState = ref("place-edit");
|
|
46
|
+
const onReportSubmit = (payload) => {
|
|
47
|
+
console.log(payload);
|
|
48
|
+
isOpenModalReport.value = false;
|
|
49
|
+
};
|
|
42
50
|
const menu = [
|
|
43
51
|
{
|
|
44
52
|
label: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C",
|
|
@@ -135,12 +143,12 @@ const menu = [
|
|
|
135
143
|
}
|
|
136
144
|
},
|
|
137
145
|
{
|
|
138
|
-
label: "\
|
|
146
|
+
label: "\u0E41\u0E08\u0E49\u0E07\u0E41\u0E01\u0E49\u0E44\u0E02\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E19\u0E35\u0E49",
|
|
139
147
|
name: "report-place",
|
|
140
|
-
icon: "
|
|
148
|
+
icon: "lucide:flag",
|
|
141
149
|
action: () => {
|
|
142
150
|
isOpenModalReport.value = true;
|
|
143
|
-
reportState.value = "place";
|
|
151
|
+
reportState.value = "place-edit";
|
|
144
152
|
emit("report-place");
|
|
145
153
|
}
|
|
146
154
|
},
|
|
@@ -183,7 +191,7 @@ const menu = [
|
|
|
183
191
|
}
|
|
184
192
|
},
|
|
185
193
|
{
|
|
186
|
-
label: "\u0E41\u0E01\u0E49\u0E44\u0E02",
|
|
194
|
+
label: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E23\u0E35\u0E27\u0E34\u0E27",
|
|
187
195
|
name: "review-edit",
|
|
188
196
|
icon: "lucide:square-pen",
|
|
189
197
|
action: () => {
|
|
@@ -191,16 +199,15 @@ const menu = [
|
|
|
191
199
|
}
|
|
192
200
|
},
|
|
193
201
|
{
|
|
194
|
-
label: "\u0E25\u0E1A",
|
|
202
|
+
label: "\u0E25\u0E1A\u0E23\u0E35\u0E27\u0E34\u0E27\u0E19\u0E35\u0E49",
|
|
195
203
|
name: "review-delete",
|
|
196
204
|
icon: "lucide:trash-2",
|
|
197
205
|
action: () => {
|
|
198
206
|
emit("review-delete");
|
|
199
207
|
}
|
|
200
208
|
},
|
|
201
|
-
// เมนูของกล่อง "การตอบกลับจาก ..." ที่ธุรกิจตอบไว้ (Figma 2456:88751)
|
|
202
209
|
{
|
|
203
|
-
label: "\u0E41\u0E01\u0E49\u0E44\u0E02",
|
|
210
|
+
label: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A",
|
|
204
211
|
name: "reply-edit",
|
|
205
212
|
icon: "lucide:square-pen",
|
|
206
213
|
action: () => {
|
|
@@ -208,7 +215,7 @@ const menu = [
|
|
|
208
215
|
}
|
|
209
216
|
},
|
|
210
217
|
{
|
|
211
|
-
label: "\u0E25\u0E1A",
|
|
218
|
+
label: "\u0E25\u0E1A\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A",
|
|
212
219
|
name: "reply-delete",
|
|
213
220
|
icon: "lucide:trash-2",
|
|
214
221
|
action: () => {
|
|
@@ -227,6 +234,11 @@ const items = computed(() => {
|
|
|
227
234
|
(fil) => ["profile-edit", "profile-share", "archive"].includes(fil.name)
|
|
228
235
|
);
|
|
229
236
|
}
|
|
237
|
+
if (props.state === "report-review") {
|
|
238
|
+
return menu.filter(
|
|
239
|
+
(item) => ["report-review"].includes(item.name)
|
|
240
|
+
);
|
|
241
|
+
}
|
|
230
242
|
if (props.state === "my-review") {
|
|
231
243
|
return menu.filter(
|
|
232
244
|
(fil) => ["review-edit", "review-delete"].includes(fil.name)
|
|
@@ -255,30 +267,23 @@ const items = computed(() => {
|
|
|
255
267
|
);
|
|
256
268
|
}
|
|
257
269
|
if (props.state === "place") {
|
|
258
|
-
return
|
|
259
|
-
|
|
260
|
-
|
|
270
|
+
return [
|
|
271
|
+
{
|
|
272
|
+
label: "\u0E41\u0E08\u0E49\u0E07\u0E41\u0E01\u0E49\u0E44\u0E02\u0E2A\u0E16\u0E32\u0E19\u0E17\u0E35\u0E48\u0E19\u0E35\u0E49",
|
|
273
|
+
name: "report-place",
|
|
274
|
+
icon: "lucide:flag",
|
|
275
|
+
action: () => {
|
|
276
|
+
reportState.value = "place-edit";
|
|
277
|
+
isOpenModalReport.value = true;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
];
|
|
261
281
|
}
|
|
262
282
|
if (props.state === "report-announce") {
|
|
263
283
|
return menu.filter(
|
|
264
284
|
(item) => ["report-announce"].includes(item.name)
|
|
265
285
|
);
|
|
266
286
|
}
|
|
267
|
-
|
|
268
|
-
return menu.filter(
|
|
269
|
-
(item) => ["report-review"].includes(item.name)
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
if (props.state === "business-review") {
|
|
273
|
-
return menu.filter(
|
|
274
|
-
(item) => ["review-reply", "report-review"].includes(item.name)
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
if (props.state === "my-reply") {
|
|
278
|
-
return menu.filter(
|
|
279
|
-
(item) => ["reply-edit", "reply-delete"].includes(item.name)
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
return menu;
|
|
287
|
+
return [];
|
|
283
288
|
});
|
|
284
289
|
</script>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PickerOptionMenuUserProps } from "#pukaad-ui/types/components/picker/picker-option-menu/picker-option-menu-user";
|
|
2
|
+
import type { ModalReportSubmitPayload } from "#pukaad-ui/types/components/modal/modal-report";
|
|
2
3
|
declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
4
|
"blog-edit": () => any;
|
|
4
5
|
"report-announce": () => any;
|
|
@@ -12,7 +13,6 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
12
13
|
"review-reply": () => any;
|
|
13
14
|
"reply-edit": () => any;
|
|
14
15
|
"profile-name-updated": (name: string) => any;
|
|
15
|
-
"place-close-duplicate": () => any;
|
|
16
16
|
"profile-edit": () => any;
|
|
17
17
|
"profile-share": () => any;
|
|
18
18
|
"profile-follower-delete": () => any;
|
|
@@ -20,7 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
20
20
|
"report-blog": () => any;
|
|
21
21
|
"report-place": () => any;
|
|
22
22
|
"report-profile": () => any;
|
|
23
|
+
"place-close-duplicate": () => any;
|
|
23
24
|
archive: () => any;
|
|
25
|
+
"report-submit": (payload: ModalReportSubmitPayload) => any;
|
|
24
26
|
}, string, import("vue").PublicProps, Readonly<PickerOptionMenuUserProps> & Readonly<{
|
|
25
27
|
"onBlog-edit"?: (() => any) | undefined;
|
|
26
28
|
"onReport-announce"?: (() => any) | undefined;
|
|
@@ -34,7 +36,6 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
34
36
|
"onReview-reply"?: (() => any) | undefined;
|
|
35
37
|
"onReply-edit"?: (() => any) | undefined;
|
|
36
38
|
"onProfile-name-updated"?: ((name: string) => any) | undefined;
|
|
37
|
-
"onPlace-close-duplicate"?: (() => any) | undefined;
|
|
38
39
|
"onProfile-edit"?: (() => any) | undefined;
|
|
39
40
|
"onProfile-share"?: (() => any) | undefined;
|
|
40
41
|
"onProfile-follower-delete"?: (() => any) | undefined;
|
|
@@ -42,7 +43,9 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
42
43
|
"onReport-blog"?: (() => any) | undefined;
|
|
43
44
|
"onReport-place"?: (() => any) | undefined;
|
|
44
45
|
"onReport-profile"?: (() => any) | undefined;
|
|
46
|
+
"onPlace-close-duplicate"?: (() => any) | undefined;
|
|
45
47
|
onArchive?: (() => any) | undefined;
|
|
48
|
+
"onReport-submit"?: ((payload: ModalReportSubmitPayload) => any) | undefined;
|
|
46
49
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
50
|
declare const _default: typeof __VLS_export;
|
|
48
51
|
export default _default;
|