pukaad-ui-lib 1.216.0 → 1.217.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/drawer/drawer-suggest-place/drawer-suggest-place.vue +16 -1
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.vue +11 -1
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-map.d.vue.ts +1 -0
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-map.vue +1 -1
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-map.vue.d.ts +1 -0
- 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/package.json +2 -2
- /package/dist/runtime/assets/svg/socials/{facebook.svg → Facebook.svg} +0 -0
- /package/dist/runtime/assets/svg/socials/{instagram.svg → Instagram.svg} +0 -0
- /package/dist/runtime/assets/svg/socials/{Tiktok.svg → TikTok.svg} +0 -0
- /package/dist/runtime/assets/svg/socials/{Youtube.svg → YouTube.svg} +0 -0
package/dist/module.json
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<script setup>
|
|
99
|
-
import { computed, ref } from "vue";
|
|
99
|
+
import { computed, ref, watch } from "vue";
|
|
100
100
|
import { useNuxtApp } from "nuxt/app";
|
|
101
101
|
import { useApi } from "@/runtime/composables/useApi";
|
|
102
102
|
import { usePresignedUpload } from "@/runtime/composables/usePresignedUpload";
|
|
@@ -114,6 +114,21 @@ const photoColumns = ref(false);
|
|
|
114
114
|
const videoColumns = ref(false);
|
|
115
115
|
if (!formData.value.photos) formData.value.photos = [];
|
|
116
116
|
if (!formData.value.videos) formData.value.videos = [];
|
|
117
|
+
watch(isOpen, (val) => {
|
|
118
|
+
if (!val) {
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
formData.value = {
|
|
121
|
+
photos: [],
|
|
122
|
+
videos: [],
|
|
123
|
+
address: {},
|
|
124
|
+
extraPhones: [],
|
|
125
|
+
contactChannels: [],
|
|
126
|
+
categories: [],
|
|
127
|
+
reviewPhotos: []
|
|
128
|
+
};
|
|
129
|
+
}, 300);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
117
132
|
const isFormValid = computed(() => {
|
|
118
133
|
const d = formData.value;
|
|
119
134
|
const addressComplete = !!(d.address?.province_id && d.address?.amphur_id && d.address?.tambon_id && d.address?.zipcode);
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
</template>
|
|
75
75
|
|
|
76
76
|
<script setup>
|
|
77
|
-
import { ref, computed, onMounted } from "vue";
|
|
77
|
+
import { ref, computed, onMounted, watch } from "vue";
|
|
78
78
|
import { useApi } from "@/runtime/composables/useApi";
|
|
79
79
|
import SuggestPlaceMap from "./suggest-place-map.vue";
|
|
80
80
|
const props = defineProps({
|
|
@@ -95,6 +95,16 @@ const isAddressCompleted = computed(() => {
|
|
|
95
95
|
const v = modelValue.value.address || {};
|
|
96
96
|
return !!(v.province_id && v.amphur_id && v.tambon_id && v.zipcode);
|
|
97
97
|
});
|
|
98
|
+
watch(
|
|
99
|
+
() => modelValue.value.isReview,
|
|
100
|
+
(newVal) => {
|
|
101
|
+
if (!newVal) {
|
|
102
|
+
modelValue.value.rating = void 0;
|
|
103
|
+
modelValue.value.reviewDescription = "";
|
|
104
|
+
modelValue.value.reviewPhotos = [];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
);
|
|
98
108
|
const listEndpointMap = {
|
|
99
109
|
personal: "/personal/suggest-places",
|
|
100
110
|
business: "/business/suggest-places",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { ref, onMounted, watch } from "vue";
|
|
11
|
+
import "leaflet/dist/leaflet.css";
|
|
11
12
|
import { useThaiAddress } from "@/runtime/composables/useThaiAddress";
|
|
12
13
|
import provincesGeoJson from "@/runtime/geo/provinces.json";
|
|
13
14
|
import mapPinSvg from "@/runtime/assets/svg/map-pin.svg?raw";
|
|
@@ -24,7 +25,6 @@ let marker = null;
|
|
|
24
25
|
const { getProvinceById } = useThaiAddress();
|
|
25
26
|
onMounted(async () => {
|
|
26
27
|
const L = (await import("leaflet")).default;
|
|
27
|
-
await import("leaflet/dist/leaflet.css");
|
|
28
28
|
if (mapContainer.value) {
|
|
29
29
|
map = L.map(mapContainer.value, {
|
|
30
30
|
zoomControl: false,
|
|
@@ -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;
|
|
67
69
|
responsive: boolean;
|
|
68
70
|
restore: boolean;
|
|
69
71
|
checkCrossOrigin: boolean;
|
|
70
72
|
checkOrientation: boolean;
|
|
71
73
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
-
modal: boolean;
|
|
73
74
|
guides: boolean;
|
|
74
75
|
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;
|
|
67
69
|
responsive: boolean;
|
|
68
70
|
restore: boolean;
|
|
69
71
|
checkCrossOrigin: boolean;
|
|
70
72
|
checkOrientation: boolean;
|
|
71
73
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
-
modal: boolean;
|
|
73
74
|
guides: boolean;
|
|
74
75
|
highlight: boolean;
|
|
75
|
-
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pukaad-ui-lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.217.0",
|
|
4
4
|
"description": "pukaad-ui for MeMSG",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
"@types/vue-cropperjs": "^4.1.6",
|
|
96
96
|
"@vue/compiler-sfc": "^3.5.24"
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|