pukaad-ui-lib 1.206.0 → 1.208.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
CHANGED
|
@@ -95,7 +95,7 @@ const onSubmit = async () => {
|
|
|
95
95
|
loading.value = true;
|
|
96
96
|
try {
|
|
97
97
|
const res = await api("/profiles/me/about", {
|
|
98
|
-
method: "
|
|
98
|
+
method: "PATCH",
|
|
99
99
|
body: {
|
|
100
100
|
description: form.value.description,
|
|
101
101
|
address: form.value.address,
|
|
@@ -103,16 +103,14 @@ const onSubmit = async () => {
|
|
|
103
103
|
contact_channels: form.value.contact_channels
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
$toast?.error?.(res.message || "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14");
|
|
112
|
-
}
|
|
106
|
+
$toast?.success?.(
|
|
107
|
+
res.message?.description || "\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08"
|
|
108
|
+
);
|
|
109
|
+
emit("submit", form.value);
|
|
110
|
+
isDrawerOpen.value = false;
|
|
113
111
|
} catch (e) {
|
|
114
112
|
$toast?.error?.(
|
|
115
|
-
e?.data?.message || "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E43\u0E19\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D"
|
|
113
|
+
e?.data?.message?.description || e?.data?.message || "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E43\u0E19\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D"
|
|
116
114
|
);
|
|
117
115
|
} finally {
|
|
118
116
|
loading.value = false;
|
|
@@ -1,24 +1,83 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div class="flex gap-[16px] w-full">
|
|
3
3
|
<!-- กรอกข้อมูล -->
|
|
4
4
|
<div class="flex flex-col gap-[16px] w-[490px]">
|
|
5
|
-
<InputAddress />
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<InputAddress v-model="addressValue" />
|
|
6
|
+
<template v-if="!isAddressCompleted">
|
|
7
|
+
<div class="font-body-large-prominent">รายละเอียด</div>
|
|
8
|
+
<div class="flex flex-col gap-[4px]">
|
|
9
|
+
<InputAutocomplete
|
|
10
|
+
label="ชื่อสถานที่ธุรกิจ"
|
|
11
|
+
placeholder="กรอกชื่อสถานที่"
|
|
12
|
+
required
|
|
13
|
+
show-counter
|
|
14
|
+
:limit="180"
|
|
15
|
+
/>
|
|
16
|
+
<InputTextField
|
|
17
|
+
v-if="extraNameCount >= 1"
|
|
18
|
+
label="ชื่อภาษาไทย"
|
|
19
|
+
placeholder="ใส่ในกรณีที่ต่างจากชื่อหลัก"
|
|
20
|
+
show-counter
|
|
21
|
+
:limit="180"
|
|
22
|
+
/>
|
|
23
|
+
<InputTextField
|
|
24
|
+
v-if="extraNameCount >= 2"
|
|
25
|
+
label="ชื่อภาษาอังกฤษ"
|
|
26
|
+
placeholder="ใส่ในกรณีที่ต่างจากชื่อหลัก"
|
|
27
|
+
show-counter
|
|
28
|
+
:limit="180"
|
|
29
|
+
/>
|
|
30
|
+
<Button
|
|
31
|
+
v-if="extraNameCount < 2"
|
|
32
|
+
variant="text"
|
|
33
|
+
color="primary"
|
|
34
|
+
class="w-[145px]"
|
|
35
|
+
@click="extraNameCount++"
|
|
36
|
+
>
|
|
37
|
+
<Icon name="lucide:plus" />
|
|
38
|
+
เพิ่มชื่อสถานที่
|
|
39
|
+
</Button>
|
|
40
|
+
</div>
|
|
41
|
+
<InputCombobox
|
|
42
|
+
label="หมวดหมู่"
|
|
43
|
+
placeholder="เพิ่มหมวดหมู่ที่เกี่ยวข้องกับสถานที่"
|
|
44
|
+
:limit="3"
|
|
45
|
+
show-counter
|
|
46
|
+
:items="[]"
|
|
11
47
|
required
|
|
48
|
+
multiple
|
|
49
|
+
/>
|
|
50
|
+
<InputTextarea
|
|
51
|
+
label="คำอธิบาย"
|
|
52
|
+
placeholder="คำอธิบายเกี่ยวกับสถานที่ (สูงสุด 220 ตัวอักษร)"
|
|
53
|
+
:limit="220"
|
|
12
54
|
show-counter
|
|
13
|
-
:limit="180"
|
|
14
55
|
/>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
56
|
+
<InputDateOpening />
|
|
57
|
+
<div class="flex flex-col gap-[8px]">
|
|
58
|
+
<InputPhone label="เบอร์โทรศัพท์" placeholder="กรอกเบอร์โทรศัพท์" />
|
|
59
|
+
<InputPhone
|
|
60
|
+
v-for="(item, index) in extraPhones"
|
|
61
|
+
:key="index"
|
|
62
|
+
label="เบอร์โทรศัพท์"
|
|
63
|
+
placeholder="กรอกเบอร์โทรศัพท์"
|
|
64
|
+
v-model="extraPhones[index]"
|
|
65
|
+
/>
|
|
66
|
+
<Button
|
|
67
|
+
variant="text"
|
|
68
|
+
color="primary"
|
|
69
|
+
class="w-[145px]"
|
|
70
|
+
@click="extraPhones.push('')"
|
|
71
|
+
>
|
|
72
|
+
<Icon name="lucide:plus" />
|
|
73
|
+
เพิ่มเบอร์โทรศัพท์
|
|
74
|
+
</Button>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
18
77
|
</div>
|
|
19
78
|
|
|
20
79
|
<!-- แสดง polygon -->
|
|
21
|
-
<div class="flex flex-col gap-[16px] w-[334px]">
|
|
80
|
+
<div class="flex flex-col gap-[16px] w-[334px] sticky top-0 self-start">
|
|
22
81
|
<div class="w-[334px] h-[434px] bg-gray-300 rounded-[12px]"></div>
|
|
23
82
|
<InputTextField
|
|
24
83
|
icon-prepend="lucide:locate-fixed"
|
|
@@ -27,5 +86,15 @@
|
|
|
27
86
|
/>
|
|
28
87
|
</div>
|
|
29
88
|
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<script setup>
|
|
92
|
+
import { ref, computed } from "vue";
|
|
93
|
+
const addressValue = ref({});
|
|
94
|
+
const extraNameCount = ref(0);
|
|
95
|
+
const extraPhones = ref([]);
|
|
96
|
+
const isAddressCompleted = computed(() => {
|
|
97
|
+
const v = addressValue.value;
|
|
98
|
+
return !!(v.province_id && v.amphur_id && v.tambon_id && v.zipcode);
|
|
99
|
+
});
|
|
100
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pukaad-ui-lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.208.0",
|
|
4
4
|
"description": "pukaad-ui for MeMSG",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -93,4 +93,4 @@
|
|
|
93
93
|
"@types/vue-cropperjs": "^4.1.6",
|
|
94
94
|
"@vue/compiler-sfc": "^3.5.24"
|
|
95
95
|
}
|
|
96
|
-
}
|
|
96
|
+
}
|