pukaad-ui-lib 1.376.1 → 1.377.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/input/input-autocomplete.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +2 -2
- 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 +12 -12
- 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 +1 -1
- package/dist/runtime/components/input/input-suggest.vue.d.ts +1 -1
- 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/suggest-edit-place/modal-suggest-edit-place.d.vue.ts +14 -0
- package/dist/runtime/components/modal/suggest-edit-place/modal-suggest-edit-place.vue +84 -35
- package/dist/runtime/components/modal/suggest-edit-place/modal-suggest-edit-place.vue.d.ts +14 -0
- package/dist/runtime/components/modal/suggest-edit-place/place-Adddateopening.d.vue.ts +15 -0
- package/dist/runtime/components/modal/suggest-edit-place/place-Adddateopening.vue +27 -0
- package/dist/runtime/components/modal/suggest-edit-place/place-Adddateopening.vue.d.ts +15 -0
- package/dist/runtime/components/modal/suggest-edit-place/place-Adddescription.d.vue.ts +10 -0
- package/dist/runtime/components/modal/suggest-edit-place/place-Adddescription.vue +26 -0
- package/dist/runtime/components/modal/suggest-edit-place/place-Adddescription.vue.d.ts +10 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -49,13 +49,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
51
|
description: string;
|
|
52
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
53
52
|
labelKey: string;
|
|
54
53
|
placeholder: string;
|
|
55
|
-
|
|
54
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
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;
|
|
@@ -49,13 +49,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
51
|
description: string;
|
|
52
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
53
52
|
labelKey: string;
|
|
54
53
|
placeholder: string;
|
|
55
|
-
|
|
54
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
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;
|
|
@@ -17,8 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
17
17
|
label: string;
|
|
18
18
|
name: string;
|
|
19
19
|
modelValue: InputLinkItem[] | ContactChannel[];
|
|
20
|
-
limit: number;
|
|
21
20
|
showCounter: boolean;
|
|
21
|
+
limit: number;
|
|
22
22
|
format: "legacy" | "contact_channel";
|
|
23
23
|
hideType: boolean;
|
|
24
24
|
hideAddButton: boolean;
|
|
@@ -52,55 +52,55 @@ const listSocial = [
|
|
|
52
52
|
name: "Facebook",
|
|
53
53
|
icon: "Facebook",
|
|
54
54
|
example: "https://facebook.com/username",
|
|
55
|
-
regex:
|
|
55
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:facebook\.com|fb\.com)\/.+/i
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
name: "Instagram",
|
|
59
59
|
icon: "Instagram",
|
|
60
60
|
example: "https://instagram.com/username",
|
|
61
|
-
regex:
|
|
61
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:instagram\.com)\/.+/i
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
name: "Line",
|
|
65
65
|
icon: "Line",
|
|
66
66
|
example: "https://line.me/ti/p/~@line-id",
|
|
67
|
-
regex:
|
|
67
|
+
regex: /^(?:https?:\/\/)?(?:line\.me|page\.line\.me)\/.+/i
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
name: "LinkedIn",
|
|
71
71
|
icon: "LinkedIn",
|
|
72
72
|
example: "https://linkedin.com/in/username",
|
|
73
|
-
regex:
|
|
73
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:linkedin\.com)\/.+/i
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
name: "Pinterest",
|
|
77
77
|
icon: "Pinterest",
|
|
78
78
|
example: "https://pinterest.com/username",
|
|
79
|
-
regex:
|
|
79
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:pinterest\.com)\/.+/i
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
name: "Snapchat",
|
|
83
83
|
icon: "SnapChat",
|
|
84
84
|
example: "https://snapchat.com/add/username",
|
|
85
|
-
regex:
|
|
85
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:snapchat\.com)\/.+/i
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
name: "Threads",
|
|
89
89
|
icon: "Threads",
|
|
90
90
|
example: "https://threads.net/@username",
|
|
91
|
-
regex:
|
|
91
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:threads\.net)\/.+/i
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
name: "TikTok",
|
|
95
95
|
icon: "TikTok",
|
|
96
96
|
example: "https://tiktok.com/@username",
|
|
97
|
-
regex:
|
|
97
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:tiktok\.com)\/.+/i
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
name: "Tumblr",
|
|
101
101
|
icon: "Tumblr",
|
|
102
102
|
example: "https://username.tumblr.com",
|
|
103
|
-
regex:
|
|
103
|
+
regex: /^(?:https?:\/\/)?(?:(?!www\.)[A-Za-z0-9-]+\.tumblr\.com(?:\/.*)?|(?:www\.)?tumblr\.com\/.+)$/i
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
name: "Website",
|
|
@@ -112,19 +112,19 @@ const listSocial = [
|
|
|
112
112
|
name: "WhatsApp",
|
|
113
113
|
icon: "WhatsApp",
|
|
114
114
|
example: "https://wa.me/1234567890",
|
|
115
|
-
regex:
|
|
115
|
+
regex: /^(?:https?:\/\/)?(?:wa\.me|api\.whatsapp\.com)\/.+/i
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
name: "X",
|
|
119
119
|
icon: "X",
|
|
120
120
|
example: "https://x.com/username",
|
|
121
|
-
regex:
|
|
121
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)\/.+/i
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
name: "YouTube",
|
|
125
125
|
icon: "YouTube",
|
|
126
126
|
example: "https://youtube.com/@username",
|
|
127
|
-
regex:
|
|
127
|
+
regex: /^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/.+/i
|
|
128
128
|
}
|
|
129
129
|
];
|
|
130
130
|
const linkValue = ref([]);
|
|
@@ -17,8 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
17
17
|
label: string;
|
|
18
18
|
name: string;
|
|
19
19
|
modelValue: InputLinkItem[] | ContactChannel[];
|
|
20
|
-
limit: number;
|
|
21
20
|
showCounter: boolean;
|
|
21
|
+
limit: number;
|
|
22
22
|
format: "legacy" | "contact_channel";
|
|
23
23
|
hideType: boolean;
|
|
24
24
|
hideAddButton: boolean;
|
|
@@ -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
14
|
placeholder: string;
|
|
16
|
-
|
|
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
14
|
placeholder: string;
|
|
16
|
-
|
|
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;
|
|
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
description: string;
|
|
23
23
|
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
-
limit: number;
|
|
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;
|
|
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
description: string;
|
|
23
23
|
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
-
limit: number;
|
|
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,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
-
state: "user" | "admin";
|
|
29
28
|
placeholder: string;
|
|
29
|
+
state: "user" | "admin";
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
-
state: "user" | "admin";
|
|
29
28
|
placeholder: string;
|
|
29
|
+
state: "user" | "admin";
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -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>;
|
|
@@ -47,10 +47,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
49
|
rows: number;
|
|
50
|
-
limit: 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;
|
|
@@ -47,10 +47,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
49
|
rows: number;
|
|
50
|
-
limit: 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>;
|
|
@@ -39,10 +39,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
39
39
|
categories: string[];
|
|
40
40
|
} | {
|
|
41
41
|
field: "description";
|
|
42
|
+
value: string;
|
|
43
|
+
} | {
|
|
44
|
+
field: "description_edit";
|
|
42
45
|
editType: string;
|
|
43
46
|
value: string;
|
|
44
47
|
} | {
|
|
45
48
|
field: "dateopening";
|
|
49
|
+
openingHours: BusinessHoursSchedule[];
|
|
50
|
+
specialDays: SpecialDaySchedule[];
|
|
51
|
+
} | {
|
|
52
|
+
field: "dateopening_edit";
|
|
46
53
|
editType: string;
|
|
47
54
|
openingHours: BusinessHoursSchedule[];
|
|
48
55
|
specialDays: SpecialDaySchedule[];
|
|
@@ -85,10 +92,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
85
92
|
categories: string[];
|
|
86
93
|
} | {
|
|
87
94
|
field: "description";
|
|
95
|
+
value: string;
|
|
96
|
+
} | {
|
|
97
|
+
field: "description_edit";
|
|
88
98
|
editType: string;
|
|
89
99
|
value: string;
|
|
90
100
|
} | {
|
|
91
101
|
field: "dateopening";
|
|
102
|
+
openingHours: BusinessHoursSchedule[];
|
|
103
|
+
specialDays: SpecialDaySchedule[];
|
|
104
|
+
} | {
|
|
105
|
+
field: "dateopening_edit";
|
|
92
106
|
editType: string;
|
|
93
107
|
openingHours: BusinessHoursSchedule[];
|
|
94
108
|
specialDays: SpecialDaySchedule[];
|
|
@@ -10,14 +10,18 @@
|
|
|
10
10
|
แนะนำให้แก้ไข
|
|
11
11
|
</div>
|
|
12
12
|
<div v-else class="font-title-medium-prominent">
|
|
13
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
v-if="
|
|
15
|
+
activeField === 'phone' || activeField === 'link' || activeField === 'description' || activeField === 'dateopening'
|
|
16
|
+
"
|
|
17
|
+
>
|
|
14
18
|
แนะนำให้แก้ไข
|
|
15
19
|
</div>
|
|
16
20
|
<div v-if="activeField === 'place_name'">แก้ไขชื่อสถานที่</div>
|
|
17
21
|
<div v-if="activeField === 'address'">แก้ไขที่อยู่</div>
|
|
18
22
|
<div v-if="activeField === 'category'">แก้ไขหมวดหมู่</div>
|
|
19
|
-
<div v-if="activeField === '
|
|
20
|
-
<div v-if="activeField === '
|
|
23
|
+
<div v-if="activeField === 'description_edit'">แก้ไขคำอธิบาย</div>
|
|
24
|
+
<div v-if="activeField === 'dateopening_edit'">แก้ไขวัน เวลาทำการ</div>
|
|
21
25
|
<div v-if="activeField === 'phone_edit'">แก้ไขเบอร์โทรศัพท์</div>
|
|
22
26
|
<div v-if="activeField === 'link_edit'">แก้ไขช่องทางติดต่อ</div>
|
|
23
27
|
</div>
|
|
@@ -66,7 +70,9 @@
|
|
|
66
70
|
</div>
|
|
67
71
|
<div
|
|
68
72
|
class="flex w-full gap-[8px] py-[6px] px-[8px] items-center hover:cursor-pointer"
|
|
69
|
-
@click="
|
|
73
|
+
@click="
|
|
74
|
+
props.item.description ? openDescriptionEditField() : openField('description')
|
|
75
|
+
"
|
|
70
76
|
>
|
|
71
77
|
<div class="flex w-full gap-[8px] font-body-large">
|
|
72
78
|
<Icon
|
|
@@ -77,27 +83,22 @@
|
|
|
77
83
|
<div v-if="props.item.description">
|
|
78
84
|
{{ props.item.description }}
|
|
79
85
|
</div>
|
|
80
|
-
<div v-else class="text-cloud"
|
|
86
|
+
<div v-else class="text-cloud">เพิ่มคำอธิบาย</div>
|
|
81
87
|
</div>
|
|
82
88
|
<Icon name="lucide:chevron-right" :size="16" />
|
|
83
89
|
</div>
|
|
84
90
|
<div
|
|
85
91
|
class="flex w-full gap-[8px] py-[6px] px-[8px] items-center hover:cursor-pointer"
|
|
86
|
-
@click="
|
|
92
|
+
@click="
|
|
93
|
+
hasOpeningHoursData ? openDateOpeningEditField() : openField('dateopening')
|
|
94
|
+
"
|
|
87
95
|
>
|
|
88
96
|
<div class="flex w-full gap-[8px] font-body-large">
|
|
89
|
-
<Icon
|
|
90
|
-
name="lucide:clock"
|
|
91
|
-
:size="20"
|
|
92
|
-
:class="[
|
|
93
|
-
'shrink-0',
|
|
94
|
-
todayStatus.isOpen ? 'text-primary' : 'text-destructive'
|
|
95
|
-
]"
|
|
96
|
-
/>
|
|
97
|
+
<Icon name="lucide:clock" :size="20" class="text-primary shrink-0" />
|
|
97
98
|
<div v-if="todayStatus.label" class="font-body-large">
|
|
98
99
|
{{ todayStatus.label }}
|
|
99
100
|
</div>
|
|
100
|
-
<div v-else class="text-cloud"
|
|
101
|
+
<div v-else class="text-cloud">เพิ่มวัน เวลาทำการ</div>
|
|
101
102
|
</div>
|
|
102
103
|
<Icon name="lucide:chevron-right" :size="16" />
|
|
103
104
|
</div>
|
|
@@ -119,20 +120,13 @@
|
|
|
119
120
|
<Icon name="lucide:chevron-right" :size="16" />
|
|
120
121
|
</div>
|
|
121
122
|
</template>
|
|
122
|
-
<div v-else class="flex w-full gap-[8px] py-[6px] px-[8px] items-center">
|
|
123
|
-
<div class="flex w-full gap-[8px] font-body-large">
|
|
124
|
-
<Icon name="lucide:phone" :size="20" class="text-primary shrink-0" />
|
|
125
|
-
<div class="text-cloud">ไม่มีข้อมูลเบอร์โทรศัพท์</div>
|
|
126
|
-
</div>
|
|
127
|
-
<Icon name="lucide:chevron-right" :size="16" />
|
|
128
|
-
</div>
|
|
129
123
|
<div
|
|
130
124
|
class="flex w-full gap-[8px] py-[6px] px-[8px] items-center hover:cursor-pointer"
|
|
131
125
|
@click="openField('phone')"
|
|
132
126
|
>
|
|
133
127
|
<div class="flex w-full gap-[8px] font-body-large">
|
|
134
128
|
<Icon name="lucide:phone" :size="20" class="text-primary shrink-0" />
|
|
135
|
-
<div class="text-
|
|
129
|
+
<div class="text-cloud">เพิ่มเบอร์โทรศัพท์</div>
|
|
136
130
|
</div>
|
|
137
131
|
<Icon name="lucide:chevron-right" :size="16" />
|
|
138
132
|
</div>
|
|
@@ -150,20 +144,13 @@
|
|
|
150
144
|
<Icon name="lucide:chevron-right" :size="16" />
|
|
151
145
|
</div>
|
|
152
146
|
</template>
|
|
153
|
-
<div v-else class="flex w-full gap-[8px] py-[6px] px-[8px] items-center">
|
|
154
|
-
<div class="flex w-full gap-[8px] font-body-large">
|
|
155
|
-
<Icon name="lucide:link" :size="20" class="text-primary shrink-0" />
|
|
156
|
-
<div class="text-cloud">ไม่มีข้อมูลช่องทางติดต่อ</div>
|
|
157
|
-
</div>
|
|
158
|
-
<Icon name="lucide:chevron-right" :size="16" />
|
|
159
|
-
</div>
|
|
160
147
|
<div
|
|
161
148
|
class="flex w-full gap-[8px] py-[6px] px-[8px] items-center hover:cursor-pointer"
|
|
162
149
|
@click="openField('link')"
|
|
163
150
|
>
|
|
164
151
|
<div class="flex w-full gap-[8px] font-body-large">
|
|
165
152
|
<Icon name="lucide:link" :size="20" class="text-primary shrink-0" />
|
|
166
|
-
<div class="text-
|
|
153
|
+
<div class="text-cloud">เพิ่มช่องทางติดต่ออื่น</div>
|
|
167
154
|
</div>
|
|
168
155
|
<Icon name="lucide:chevron-right" :size="16" />
|
|
169
156
|
</div>
|
|
@@ -200,6 +187,11 @@
|
|
|
200
187
|
|
|
201
188
|
<PlaceDescription
|
|
202
189
|
v-else-if="activeField === 'description'"
|
|
190
|
+
v-model:description-value="descriptionValue"
|
|
191
|
+
/>
|
|
192
|
+
|
|
193
|
+
<PlaceDescriptionEdit
|
|
194
|
+
v-else-if="activeField === 'description_edit'"
|
|
203
195
|
:current-description="props.item.description"
|
|
204
196
|
v-model:edit-type="descriptionEditType"
|
|
205
197
|
v-model:description-value="descriptionValue"
|
|
@@ -207,6 +199,12 @@
|
|
|
207
199
|
|
|
208
200
|
<PlaceDateOpening
|
|
209
201
|
v-else-if="activeField === 'dateopening'"
|
|
202
|
+
v-model:opening-hours="newOpeningHours"
|
|
203
|
+
v-model:special-days="newSpecialDays"
|
|
204
|
+
/>
|
|
205
|
+
|
|
206
|
+
<PlaceDateOpeningEdit
|
|
207
|
+
v-else-if="activeField === 'dateopening_edit'"
|
|
210
208
|
:current-opening-hours="props.item.opening_hours"
|
|
211
209
|
:current-special-days="props.item.special_days"
|
|
212
210
|
:current-open-status="props.item.open_status"
|
|
@@ -268,8 +266,10 @@ import { useApi } from "#pukaad-ui/runtime/composables/useApi";
|
|
|
268
266
|
import PlaceName from "./place-name.vue";
|
|
269
267
|
import PlaceAddress from "./place-address.vue";
|
|
270
268
|
import PlaceCategory from "./place-category.vue";
|
|
271
|
-
import PlaceDescription from "./place-
|
|
272
|
-
import
|
|
269
|
+
import PlaceDescription from "./place-Adddescription.vue";
|
|
270
|
+
import PlaceDescriptionEdit from "./place-description.vue";
|
|
271
|
+
import PlaceDateOpening from "./place-Adddateopening.vue";
|
|
272
|
+
import PlaceDateOpeningEdit from "./place-dateopening.vue";
|
|
273
273
|
import PlacePhone from "./place-Addphone.vue";
|
|
274
274
|
import PlacePhoneEdit from "./place-phone.vue";
|
|
275
275
|
import PlaceLink from "./place-Addlink.vue";
|
|
@@ -386,6 +386,17 @@ const openField = (field) => {
|
|
|
386
386
|
}
|
|
387
387
|
activeField.value = field;
|
|
388
388
|
};
|
|
389
|
+
const openDescriptionEditField = () => {
|
|
390
|
+
descriptionEditType.value = "";
|
|
391
|
+
descriptionValue.value = "";
|
|
392
|
+
activeField.value = "description_edit";
|
|
393
|
+
};
|
|
394
|
+
const openDateOpeningEditField = () => {
|
|
395
|
+
dateOpeningEditType.value = "";
|
|
396
|
+
newOpeningHours.value = [];
|
|
397
|
+
newSpecialDays.value = [];
|
|
398
|
+
activeField.value = "dateopening_edit";
|
|
399
|
+
};
|
|
389
400
|
const openPhoneEditField = (currentPhone) => {
|
|
390
401
|
phoneEditType.value = "";
|
|
391
402
|
editPhoneValue.value = "";
|
|
@@ -425,12 +436,25 @@ const buildSuggestEditBody = () => {
|
|
|
425
436
|
categories: categories.value
|
|
426
437
|
};
|
|
427
438
|
case "description":
|
|
439
|
+
return {
|
|
440
|
+
topic_key: "description",
|
|
441
|
+
edit_type: "add",
|
|
442
|
+
description: descriptionValue.value
|
|
443
|
+
};
|
|
444
|
+
case "description_edit":
|
|
428
445
|
return {
|
|
429
446
|
topic_key: "description",
|
|
430
447
|
edit_type: descriptionEditType.value,
|
|
431
448
|
description: descriptionValue.value
|
|
432
449
|
};
|
|
433
450
|
case "dateopening":
|
|
451
|
+
return {
|
|
452
|
+
topic_key: "opening_hours",
|
|
453
|
+
edit_type: "add",
|
|
454
|
+
opening_hours: newOpeningHours.value,
|
|
455
|
+
special_days: newSpecialDays.value
|
|
456
|
+
};
|
|
457
|
+
case "dateopening_edit":
|
|
434
458
|
return {
|
|
435
459
|
topic_key: "opening_hours",
|
|
436
460
|
edit_type: dateOpeningEditType.value,
|
|
@@ -504,6 +528,12 @@ const onSubmit = async () => {
|
|
|
504
528
|
if (activeField.value === "description") {
|
|
505
529
|
emit("submit-field", {
|
|
506
530
|
field: "description",
|
|
531
|
+
value: descriptionValue.value
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
if (activeField.value === "description_edit") {
|
|
535
|
+
emit("submit-field", {
|
|
536
|
+
field: "description_edit",
|
|
507
537
|
editType: descriptionEditType.value,
|
|
508
538
|
value: descriptionValue.value
|
|
509
539
|
});
|
|
@@ -511,6 +541,13 @@ const onSubmit = async () => {
|
|
|
511
541
|
if (activeField.value === "dateopening") {
|
|
512
542
|
emit("submit-field", {
|
|
513
543
|
field: "dateopening",
|
|
544
|
+
openingHours: newOpeningHours.value,
|
|
545
|
+
specialDays: newSpecialDays.value
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
if (activeField.value === "dateopening_edit") {
|
|
549
|
+
emit("submit-field", {
|
|
550
|
+
field: "dateopening_edit",
|
|
514
551
|
editType: dateOpeningEditType.value,
|
|
515
552
|
openingHours: newOpeningHours.value,
|
|
516
553
|
specialDays: newSpecialDays.value
|
|
@@ -579,12 +616,12 @@ const canSubmit = computed(() => {
|
|
|
579
616
|
if (!categoryEditType.value) return false;
|
|
580
617
|
if (categoryEditType.value === "new") return categories.value.length > 0;
|
|
581
618
|
return true;
|
|
582
|
-
case "
|
|
619
|
+
case "description_edit":
|
|
583
620
|
if (!descriptionEditType.value) return false;
|
|
584
621
|
if (descriptionEditType.value === "new")
|
|
585
622
|
return !!descriptionValue.value.trim();
|
|
586
623
|
return true;
|
|
587
|
-
case "
|
|
624
|
+
case "dateopening_edit":
|
|
588
625
|
if (!dateOpeningEditType.value) return false;
|
|
589
626
|
if (dateOpeningEditType.value === "new")
|
|
590
627
|
return newOpeningHours.value.some((s) => s.isOpen);
|
|
@@ -597,6 +634,15 @@ const canSubmit = computed(() => {
|
|
|
597
634
|
if (!linkEditType.value) return false;
|
|
598
635
|
if (linkEditType.value === "new") return !!editChannelValue.value.trim();
|
|
599
636
|
return true;
|
|
637
|
+
// flow "เพิ่มใหม่" (phone/link/description/dateopening) ไม่มี editType ให้เช็ค แต่ต้องกันส่งค่าว่างเอง
|
|
638
|
+
case "phone":
|
|
639
|
+
return !!phoneValue.value.trim();
|
|
640
|
+
case "link":
|
|
641
|
+
return newContactChannels.value.some((ch) => !!ch.value.trim());
|
|
642
|
+
case "description":
|
|
643
|
+
return !!descriptionValue.value.trim();
|
|
644
|
+
case "dateopening":
|
|
645
|
+
return newOpeningHours.value.some((s) => s.isOpen);
|
|
600
646
|
default:
|
|
601
647
|
return true;
|
|
602
648
|
}
|
|
@@ -656,4 +702,7 @@ const todayStatus = computed(() => {
|
|
|
656
702
|
label: nextSlot ? `\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48 \u2022 \u0E40\u0E1B\u0E34\u0E14\u0E40\u0E27\u0E25\u0E32 ${nextSlot.start} \u0E19.` : "\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48 \u2022 \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49\u0E1B\u0E34\u0E14\u0E17\u0E33\u0E01\u0E32\u0E23\u0E41\u0E25\u0E49\u0E27"
|
|
657
703
|
};
|
|
658
704
|
});
|
|
705
|
+
const hasOpeningHoursData = computed(
|
|
706
|
+
() => toArray(props.item.opening_hours).length > 0 || toArray(props.item.special_days).length > 0
|
|
707
|
+
);
|
|
659
708
|
</script>
|
|
@@ -39,10 +39,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
39
39
|
categories: string[];
|
|
40
40
|
} | {
|
|
41
41
|
field: "description";
|
|
42
|
+
value: string;
|
|
43
|
+
} | {
|
|
44
|
+
field: "description_edit";
|
|
42
45
|
editType: string;
|
|
43
46
|
value: string;
|
|
44
47
|
} | {
|
|
45
48
|
field: "dateopening";
|
|
49
|
+
openingHours: BusinessHoursSchedule[];
|
|
50
|
+
specialDays: SpecialDaySchedule[];
|
|
51
|
+
} | {
|
|
52
|
+
field: "dateopening_edit";
|
|
46
53
|
editType: string;
|
|
47
54
|
openingHours: BusinessHoursSchedule[];
|
|
48
55
|
specialDays: SpecialDaySchedule[];
|
|
@@ -85,10 +92,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
85
92
|
categories: string[];
|
|
86
93
|
} | {
|
|
87
94
|
field: "description";
|
|
95
|
+
value: string;
|
|
96
|
+
} | {
|
|
97
|
+
field: "description_edit";
|
|
88
98
|
editType: string;
|
|
89
99
|
value: string;
|
|
90
100
|
} | {
|
|
91
101
|
field: "dateopening";
|
|
102
|
+
openingHours: BusinessHoursSchedule[];
|
|
103
|
+
specialDays: SpecialDaySchedule[];
|
|
104
|
+
} | {
|
|
105
|
+
field: "dateopening_edit";
|
|
92
106
|
editType: string;
|
|
93
107
|
openingHours: BusinessHoursSchedule[];
|
|
94
108
|
specialDays: SpecialDaySchedule[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BusinessHoursSchedule } from "#pukaad-ui/runtime/components/input/input-date-opening.vue";
|
|
2
|
+
import type { SpecialDaySchedule } from "#pukaad-ui/runtime/components/input/input-date-opening-special.vue";
|
|
3
|
+
type __VLS_ModelProps = {
|
|
4
|
+
"openingHours"?: BusinessHoursSchedule[];
|
|
5
|
+
"specialDays"?: SpecialDaySchedule[];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:openingHours": (value: BusinessHoursSchedule[]) => any;
|
|
9
|
+
"update:specialDays": (value: SpecialDaySchedule[]) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
11
|
+
"onUpdate:openingHours"?: ((value: BusinessHoursSchedule[]) => any) | undefined;
|
|
12
|
+
"onUpdate:specialDays"?: ((value: SpecialDaySchedule[]) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-[16px]">
|
|
3
|
+
<div class="flex gap-[8px] items-center">
|
|
4
|
+
<Icon name="lucide:clock" :size="20" class="text-primary shrink-0" />
|
|
5
|
+
<div class="font-body-large-prominent">เพิ่มวัน เวลาทำการ</div>
|
|
6
|
+
</div>
|
|
7
|
+
<InputDateOpening name="new_opening_hours" v-model="newOpeningHours" />
|
|
8
|
+
<InputDateOpeningSpecial
|
|
9
|
+
v-if="isNewOpeningHoursCompleted"
|
|
10
|
+
name="new_special_days"
|
|
11
|
+
v-model="newSpecialDays"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed } from "vue";
|
|
18
|
+
const newOpeningHours = defineModel("openingHours", { type: Array, ...{
|
|
19
|
+
default: () => []
|
|
20
|
+
} });
|
|
21
|
+
const newSpecialDays = defineModel("specialDays", { type: Array, ...{
|
|
22
|
+
default: () => []
|
|
23
|
+
} });
|
|
24
|
+
const isNewOpeningHoursCompleted = computed(
|
|
25
|
+
() => Array.isArray(newOpeningHours.value) && newOpeningHours.value.some((s) => s.isOpen)
|
|
26
|
+
);
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BusinessHoursSchedule } from "#pukaad-ui/runtime/components/input/input-date-opening.vue";
|
|
2
|
+
import type { SpecialDaySchedule } from "#pukaad-ui/runtime/components/input/input-date-opening-special.vue";
|
|
3
|
+
type __VLS_ModelProps = {
|
|
4
|
+
"openingHours"?: BusinessHoursSchedule[];
|
|
5
|
+
"specialDays"?: SpecialDaySchedule[];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:openingHours": (value: BusinessHoursSchedule[]) => any;
|
|
9
|
+
"update:specialDays": (value: SpecialDaySchedule[]) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
11
|
+
"onUpdate:openingHours"?: ((value: BusinessHoursSchedule[]) => any) | undefined;
|
|
12
|
+
"onUpdate:specialDays"?: ((value: SpecialDaySchedule[]) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
"descriptionValue"?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:descriptionValue": (value: string) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:descriptionValue"?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-[16px]">
|
|
3
|
+
<div class="flex gap-[8px] items-center">
|
|
4
|
+
<Icon
|
|
5
|
+
name="lucide:circle-alert"
|
|
6
|
+
:size="20"
|
|
7
|
+
class="text-primary shrink-0"
|
|
8
|
+
/>
|
|
9
|
+
<div class="font-body-large-prominent">เพิ่มคำอธิบาย</div>
|
|
10
|
+
</div>
|
|
11
|
+
<InputTextarea
|
|
12
|
+
name="new_description"
|
|
13
|
+
v-model="descriptionValue"
|
|
14
|
+
label="คำอธิบาย"
|
|
15
|
+
placeholder="คำอธิบายเกี่ยวกับสถานที่ (สูงสุด 220 ตัวอักษร)"
|
|
16
|
+
:limit="220"
|
|
17
|
+
show-counter
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
const descriptionValue = defineModel("descriptionValue", { type: String, ...{
|
|
24
|
+
default: ""
|
|
25
|
+
} });
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
"descriptionValue"?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:descriptionValue": (value: string) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:descriptionValue"?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|