@ozdao/prometheus-framework 0.2.134 → 0.2.137
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +19 -20
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +44 -0
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +73 -43
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotSub.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotSub.vue.js +24 -0
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +181 -0
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +478 -0
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +121 -0
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +203 -0
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/router/spots.js +92 -0
- package/dist/prometheus-framework/src/modules/spots/spots.client.cjs +1 -0
- package/dist/prometheus-framework/src/modules/spots/spots.client.js +37 -0
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/spots.server.js +169 -0
- package/dist/spots.server.mjs +170 -0
- package/dist/style.css +1 -1
- package/package.json +9 -9
- package/src/modules/globals/components/layouts/Client.vue +10 -8
- package/src/modules/globals/components/sections/Walkthrough.vue +4 -4
- package/src/modules/globals/globals.client.js +5 -5
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +29 -1
- package/src/modules/spots/components/layouts/Spots.vue +1 -1
- package/src/modules/spots/components/pages/SpotEdit.vue +8 -53
- package/src/modules/spots/models/spot.model.js +7 -7
- package/src/modules/spots/router/spots.js +65 -61
- package/src/modules/spots/spots.client.js +43 -0
- package/src/modules/spots/spots.server.js +31 -0
- package/src/modules/spots/components/sections/PlaceModify.vue +0 -113
- package/src/modules/spots/components/sections/Places.vue +0 -119
@@ -0,0 +1,181 @@
|
|
1
|
+
import { ref as k, onMounted as C, watch as g, resolveComponent as O, openBlock as i, createElementBlock as l, createElementVNode as p, toDisplayString as d, createCommentVNode as f, createVNode as _, withCtx as w, Transition as P, createBlock as E, resolveDynamicComponent as x } from "vue";
|
2
|
+
import { useRoute as B, useRouter as S } from "vue-router";
|
3
|
+
import { useI18n as j } from "vue-i18n";
|
4
|
+
/* empty css */
|
5
|
+
/* empty css */
|
6
|
+
import "../../../globals/localization/vue-i18n.js";
|
7
|
+
/* empty css */
|
8
|
+
/* empty css */
|
9
|
+
import { state as h } from "../../../globals/store/globals.js";
|
10
|
+
import { actions as q, state as R } from "../../../products/store/categories.js";
|
11
|
+
import { state as b } from "../../../marketplace/store/marketplace.js";
|
12
|
+
const T = { class: "w-100 h-100" }, V = { class: "h-100 w-100 flex-nowrap flex-column flex gap-thin" }, z = { class: "pos-absolute z-index-2 w-100" }, A = { class: "bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center" }, F = /* @__PURE__ */ p("span", { class: "" }, "Weed in ", -1), L = { key: 0 }, M = { key: 1 }, W = { key: 2 }, Z = {
|
13
|
+
__name: "Spots",
|
14
|
+
setup(D) {
|
15
|
+
const a = B(), u = S(), r = k({
|
16
|
+
city: null,
|
17
|
+
state: null,
|
18
|
+
country: null
|
19
|
+
});
|
20
|
+
function m(e) {
|
21
|
+
return e.replace(/-/g, " ").replace(/\b\w/g, (t) => t.toUpperCase());
|
22
|
+
}
|
23
|
+
C(async () => {
|
24
|
+
if (a.params) {
|
25
|
+
let e = {
|
26
|
+
country: m(a.params.country),
|
27
|
+
state: m(a.params.state),
|
28
|
+
city: m(a.params.city)
|
29
|
+
};
|
30
|
+
r.value = e;
|
31
|
+
}
|
32
|
+
if (a.query) {
|
33
|
+
const e = a.query, t = {
|
34
|
+
categories: e.categories ? e.categories.split(",") : [],
|
35
|
+
prices: e.prices ? e.prices.split(",") : [],
|
36
|
+
delivery: e.delivery ? e.delivery.split(",") : []
|
37
|
+
// Продолжайте этот паттерн для остальных полей фильтра
|
38
|
+
};
|
39
|
+
b.filter = t;
|
40
|
+
}
|
41
|
+
await q.fetchCategories();
|
42
|
+
}), g(() => b.filter, (e, t) => {
|
43
|
+
const o = { ...a.query };
|
44
|
+
Object.keys(t).forEach((s) => {
|
45
|
+
o[s] && delete o[s];
|
46
|
+
});
|
47
|
+
const n = Object.fromEntries(
|
48
|
+
Object.entries(e).filter(([s, c]) => Array.isArray(c) && c.length > 0).map(([s, c]) => [s, c.join(",")])
|
49
|
+
);
|
50
|
+
Object.assign(o, n), u.push({ query: o });
|
51
|
+
}, { deep: !0 });
|
52
|
+
function y(e) {
|
53
|
+
return e.toLowerCase().replace(/ /g, "-").replace(/[^a-z0-9-]/g, "");
|
54
|
+
}
|
55
|
+
g(() => h.position, (e) => {
|
56
|
+
const t = { ...u.currentRoute.value };
|
57
|
+
let o = {
|
58
|
+
country: y(e.country),
|
59
|
+
state: y(e.state),
|
60
|
+
city: y(e.city)
|
61
|
+
};
|
62
|
+
t.params = o, u.replace(t);
|
63
|
+
}, { deep: !0 });
|
64
|
+
const v = {
|
65
|
+
locale: "en",
|
66
|
+
messages: {
|
67
|
+
en: {
|
68
|
+
meta: {
|
69
|
+
title: "Marketplace – Shop Our Wide Selection of Quality Weed for Delivery",
|
70
|
+
description: "Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable."
|
71
|
+
},
|
72
|
+
breadcrumbs: {
|
73
|
+
home: "Home",
|
74
|
+
store: "Marketplace"
|
75
|
+
},
|
76
|
+
categoriesTitle: "Category",
|
77
|
+
categories: [],
|
78
|
+
sort: {
|
79
|
+
price: "By price",
|
80
|
+
newest: "By newest",
|
81
|
+
popularity: "By popularity"
|
82
|
+
},
|
83
|
+
filters: {
|
84
|
+
title: "Filters",
|
85
|
+
price: {
|
86
|
+
title: "Price",
|
87
|
+
from: "From",
|
88
|
+
to: "To"
|
89
|
+
},
|
90
|
+
filters: [],
|
91
|
+
reset: "Reset Filters"
|
92
|
+
}
|
93
|
+
},
|
94
|
+
ru: {
|
95
|
+
meta: {
|
96
|
+
title: "Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки",
|
97
|
+
description: "Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно."
|
98
|
+
},
|
99
|
+
breadcrumbs: {
|
100
|
+
home: "Главная",
|
101
|
+
store: "Маркетплейс"
|
102
|
+
},
|
103
|
+
categoriesTitle: "Категория",
|
104
|
+
categories: [],
|
105
|
+
sort: {
|
106
|
+
price: "По цене",
|
107
|
+
newest: "По новизне",
|
108
|
+
popularity: "По популярности"
|
109
|
+
},
|
110
|
+
filters: {
|
111
|
+
title: "Фильтры",
|
112
|
+
price: {
|
113
|
+
title: "Цена",
|
114
|
+
from: "От",
|
115
|
+
to: "До"
|
116
|
+
},
|
117
|
+
filters: [],
|
118
|
+
reset: "Сбросить фильтры"
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
};
|
123
|
+
return R.all.forEach((e) => {
|
124
|
+
e.localization.forEach((t) => {
|
125
|
+
v.messages[t.locale].categories.push(t.text);
|
126
|
+
});
|
127
|
+
}), j(v), (e, t) => {
|
128
|
+
const o = O("router-view");
|
129
|
+
return i(), l("div", T, [
|
130
|
+
p("div", V, [
|
131
|
+
p("div", z, [
|
132
|
+
p("h2", A, [
|
133
|
+
F,
|
134
|
+
r.value.city || r.value.state || r.value.country ? (i(), l("span", {
|
135
|
+
key: 0,
|
136
|
+
onClick: t[0] || (t[0] = (n) => {
|
137
|
+
h.isOpenLocationPopup = !0;
|
138
|
+
}),
|
139
|
+
class: "t-semi t-main"
|
140
|
+
}, [
|
141
|
+
r.value.city ? (i(), l("span", L, d(r.value.city) + ", ", 1)) : f("", !0),
|
142
|
+
r.value.state ? (i(), l("span", M, d(r.value.state) + ", ", 1)) : f("", !0),
|
143
|
+
r.value.country ? (i(), l("span", W, d(r.value.country), 1)) : f("", !0)
|
144
|
+
])) : (i(), l("span", {
|
145
|
+
key: 1,
|
146
|
+
onClick: t[1] || (t[1] = (n) => {
|
147
|
+
h.isOpenLocationPopup = !0;
|
148
|
+
}),
|
149
|
+
class: "t-semi t-main"
|
150
|
+
}, " The World "))
|
151
|
+
])
|
152
|
+
]),
|
153
|
+
_(o, null, {
|
154
|
+
default: w(({ Component: n, route: s }) => [
|
155
|
+
_(P, {
|
156
|
+
name: "scaleIn",
|
157
|
+
mode: "out-in"
|
158
|
+
}, {
|
159
|
+
default: w(() => [
|
160
|
+
(i(), E(x(n), {
|
161
|
+
ref: "page",
|
162
|
+
key: s.path,
|
163
|
+
localPosition: r.value,
|
164
|
+
apiKey: e.GOOGLE_MAPS_API_KEY,
|
165
|
+
locale: e.$i18n.locale,
|
166
|
+
class: ""
|
167
|
+
}, null, 8, ["localPosition", "apiKey", "locale"]))
|
168
|
+
]),
|
169
|
+
_: 2
|
170
|
+
}, 1024)
|
171
|
+
]),
|
172
|
+
_: 1
|
173
|
+
})
|
174
|
+
])
|
175
|
+
]);
|
176
|
+
};
|
177
|
+
}
|
178
|
+
};
|
179
|
+
export {
|
180
|
+
Z as default
|
181
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),I=require("vue-router"),V=require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs"),j=require("../../../../components/Button/Button.vue2.cjs"),b=require("../../../organizations/store/organizations.cjs"),p=require("../../../globals/store/globals.cjs"),h=require("../../../marketplace/store/marketplace.cjs");;/* empty css */const K=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),F=y=>(o.pushScopeId("data-v-4c504b8d"),y=y(),o.popScopeId(),y),G={class:"h-100 w-100 pos-relative"},Z={class:"w-100 pos-absolute z-index-2 pos-b-10"},H=F(()=>o.createElementVNode("div",{id:"map",class:"h-100 w-100 pos-relative o-hidden"},null,-1)),U={__name:"Map",props:{localPosition:Object,location:{type:Object,default:()=>({lat:15.87,lng:100.9925})},address:{type:String,default:null},apiKey:String,locale:{type:String,default:"en"}},setup(y){const w=I.useRouter(),e=I.useRoute(),E=y;let n=o.ref(null),c=o.ref([]),O=o.ref(0),L=o.ref(50),u=o.ref({lat:0,lng:0}),_=o.ref(null);async function C(){try{const a=await(await fetch("https://ip2c.org/s")).text();if(!a||a[0]!=="1")throw new Error("Unable to fetch the country");const t=a.split(";");if(t.length<4)throw new Error("Invalid response format");return console.log(t[3]),t[3]}catch(s){throw console.error(s),s}}o.onMounted(async()=>{var v,T,f,k,q,x,z,P;let s=parseFloat(e.query.lat||((T=(v=p.state.position)==null?void 0:v.location)==null?void 0:T.lat)),a=parseFloat(e.query.lng||((k=(f=p.state.position)==null?void 0:f.location)==null?void 0:k.lng)),t;if(e.params.location||(q=p.state.position)!=null&&q.location?t=12:e.params.country||(x=p.state.position)!=null&&x.country?t=9:e.params.state||(z=p.state.position)!=null&&z.state?t=6:e.params.city||(P=p.state.position)!=null&&P.city?t=4:t=2,!s||!a){let r;const i=new google.maps.Geocoder;try{r=await C()}catch{r="Thailand",console.log(error)}try{const l=await i.geocode({address:r});console.log(l),l?(s=l.results[0].geometry.location.lat(),a=l.results[0].geometry.location.lng(),t=6):console.error("No results found for the country code.")}catch(l){console.error("Error getting coordinates from country code:",l)}}if(!s&&!a&&(e.params.country||e.params.state||e.params.city)){const r=new google.maps.Geocoder,i=[e.params.city,e.params.state,e.params.country].filter(Boolean).join(", ");try{const l=await r.geocode({address:i});l[0]&&(s=l[0].geometry.location.lat(),a=l[0].geometry.location.lng())}catch(l){console.error("Error getting coordinates:",l)}}const m=new V.Loader({apiKey:E.apiKey,version:"weekly",libraries:["places"],language:"en"});O.value+=L.value;const d={country:e.params.country,state:e.params.state,city:e.params.city,categories:e.query.categories,prices:e.query.prices,delivery:e.query.delivery,sortParam:e.query.sortParam||h.state.sort.param,sortOrder:e.query.sortOrder||h.state.sort.order,location:{coordinates:[a,s]},locationRadius:1e3,limit:500};console.log(d);const g=await b.actions.read(d);b.state.all=[...b.state.all,...g],m.load().then(()=>{n.value=new google.maps.Map(document.getElementById("map"),{mapTypeControl:!1,fullscreenControl:!1,styles:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"},{visibility:"off"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.arterial",elementType:"labels",stylers:[]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",stylers:[]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],center:{lat:s,lng:a},zoom:parseInt(e.query.zoom||t||"12")});for(let r of c.value)r.setMap(null);c.value=[],c.value=g.map(r=>{var l;let i=(l=r.spots[0])==null?void 0:l.location;if(i&&i.type==="Point"){let[N,R]=i.coordinates,S="/marker_2.png";r.products&&r.products.length===0&&(S="/marker.png");const M=new google.maps.Marker({position:{lng:N,lat:R},map:n.value,icon:{url:S,scaledSize:new google.maps.Size(32,48),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,48)}});return M.addListener("click",()=>{w.push({name:"Organization",params:{_id:r._id}})}),M}return null}).filter(r=>r!==null),google.maps.event.addListener(n.value,"center_changed",()=>{let r=n.value.getCenter();u.value={lat:r.lat(),lng:r.lng()}}),google.maps.event.addListener(n.value,"zoom_changed",()=>{_.value=n.value.getZoom()})})});const B=async()=>{const s={country:e.params.country,state:e.params.state,city:e.params.city,categories:e.query.categories,prices:e.query.prices,delivery:e.query.delivery,sortParam:e.query.sortParam||h.state.sort.param,sortOrder:e.query.sortOrder||h.state.sort.order,locationRadius:8e3/_.value,limit:100,location:{type:"Point",coordinates:[u.value.lng,u.value.lat]}};console.log([u.value.lng,u.value.lat]);try{const a=await b.actions.read(s);for(let t of c.value)t.setMap(null);c.value=[],c.value=a.map(t=>{var d;let m=(d=t.spots[0])==null?void 0:d.location;if(m&&m.type==="Point"){let[g,v]=m.coordinates,T=t.products&&t.products.length>0?"/marker_2.png":"/marker.png";const f=new google.maps.Marker({position:{lng:g,lat:v},map:n.value,icon:{url:T,scaledSize:new google.maps.Size(32,48),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,48)}});return f.addListener("click",()=>{w.push({name:"Organization",params:{_id:t._id}})}),f}return null}).filter(t=>t!==null)}catch(a){console.error("Error fetching organizations:",a)}};return(s,a)=>(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("div",Z,[o.createVNode(j.default,{submit:B,class:"mn-l-auto mn-r-auto bg-black t-white w-min-20 button"},{default:o.withCtx(()=>[o.createTextVNode(" Search in This Location ")]),_:1})]),H]))}},A=K.default(U,[["__scopeId","data-v-4c504b8d"]]);exports.default=A;
|
@@ -0,0 +1,478 @@
|
|
1
|
+
import { ref as c, onMounted as K, openBlock as V, createElementBlock as $, createElementVNode as E, createVNode as F, withCtx as G, createTextVNode as Z, pushScopeId as U, popScopeId as A } from "vue";
|
2
|
+
import { useRouter as D, useRoute as H } from "vue-router";
|
3
|
+
import { Loader as J } from "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
|
4
|
+
import Q from "../../../../components/Button/Button.vue2.js";
|
5
|
+
import { actions as I, state as M } from "../../../organizations/store/organizations.js";
|
6
|
+
import { state as p } from "../../../globals/store/globals.js";
|
7
|
+
import { state as h } from "../../../marketplace/store/marketplace.js";
|
8
|
+
/* empty css */
|
9
|
+
import W from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
10
|
+
const X = (y) => (U("data-v-4c504b8d"), y = y(), A(), y), Y = { class: "h-100 w-100 pos-relative" }, ee = { class: "w-100 pos-absolute z-index-2 pos-b-10" }, te = /* @__PURE__ */ X(() => /* @__PURE__ */ E("div", {
|
11
|
+
id: "map",
|
12
|
+
class: "h-100 w-100 pos-relative o-hidden"
|
13
|
+
}, null, -1)), oe = {
|
14
|
+
__name: "Map",
|
15
|
+
props: {
|
16
|
+
localPosition: Object,
|
17
|
+
location: {
|
18
|
+
type: Object,
|
19
|
+
default: () => ({ lat: 15.87, lng: 100.9925 })
|
20
|
+
},
|
21
|
+
address: {
|
22
|
+
type: String,
|
23
|
+
default: null
|
24
|
+
},
|
25
|
+
apiKey: String,
|
26
|
+
locale: {
|
27
|
+
type: String,
|
28
|
+
default: "en"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
setup(y) {
|
32
|
+
const b = D(), e = H(), L = y;
|
33
|
+
let s = c(null), i = c([]), O = c(0), C = c(50), m = c({ lat: 0, lng: 0 }), w = c(null);
|
34
|
+
async function B() {
|
35
|
+
try {
|
36
|
+
const r = await (await fetch("https://ip2c.org/s")).text();
|
37
|
+
if (!r || r[0] !== "1")
|
38
|
+
throw new Error("Unable to fetch the country");
|
39
|
+
const t = r.split(";");
|
40
|
+
if (t.length < 4)
|
41
|
+
throw new Error("Invalid response format");
|
42
|
+
return console.log(t[3]), t[3];
|
43
|
+
} catch (l) {
|
44
|
+
throw console.error(l), l;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
K(async () => {
|
48
|
+
var T, v, f, _, k, x, q, z;
|
49
|
+
let l = parseFloat(e.query.lat || ((v = (T = p.position) == null ? void 0 : T.location) == null ? void 0 : v.lat)), r = parseFloat(e.query.lng || ((_ = (f = p.position) == null ? void 0 : f.location) == null ? void 0 : _.lng)), t;
|
50
|
+
if (e.params.location || (k = p.position) != null && k.location ? t = 12 : e.params.country || (x = p.position) != null && x.country ? t = 9 : e.params.state || (q = p.position) != null && q.state ? t = 6 : e.params.city || (z = p.position) != null && z.city ? t = 4 : t = 2, !l || !r) {
|
51
|
+
let o;
|
52
|
+
const n = new google.maps.Geocoder();
|
53
|
+
try {
|
54
|
+
o = await B();
|
55
|
+
} catch {
|
56
|
+
o = "Thailand", console.log(error);
|
57
|
+
}
|
58
|
+
try {
|
59
|
+
const a = await n.geocode({ address: o });
|
60
|
+
console.log(a), a ? (l = a.results[0].geometry.location.lat(), r = a.results[0].geometry.location.lng(), t = 6) : console.error("No results found for the country code.");
|
61
|
+
} catch (a) {
|
62
|
+
console.error("Error getting coordinates from country code:", a);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
if (!l && !r && (e.params.country || e.params.state || e.params.city)) {
|
66
|
+
const o = new google.maps.Geocoder(), n = [
|
67
|
+
e.params.city,
|
68
|
+
e.params.state,
|
69
|
+
e.params.country
|
70
|
+
].filter(Boolean).join(", ");
|
71
|
+
try {
|
72
|
+
const a = await o.geocode({ address: n });
|
73
|
+
a[0] && (l = a[0].geometry.location.lat(), r = a[0].geometry.location.lng());
|
74
|
+
} catch (a) {
|
75
|
+
console.error("Error getting coordinates:", a);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
const u = new J({
|
79
|
+
apiKey: L.apiKey,
|
80
|
+
version: "weekly",
|
81
|
+
libraries: ["places"],
|
82
|
+
language: "en"
|
83
|
+
});
|
84
|
+
O.value += C.value;
|
85
|
+
const d = {
|
86
|
+
// country: route.params.country,
|
87
|
+
// state: route.params.state,
|
88
|
+
// city: route.params.city,
|
89
|
+
// categories: route.query.categories,
|
90
|
+
// prices: route.query.prices,
|
91
|
+
// delivery: route.query.delivery,
|
92
|
+
country: e.params.country,
|
93
|
+
state: e.params.state,
|
94
|
+
city: e.params.city,
|
95
|
+
categories: e.query.categories,
|
96
|
+
prices: e.query.prices,
|
97
|
+
delivery: e.query.delivery,
|
98
|
+
sortParam: e.query.sortParam || h.sort.param,
|
99
|
+
sortOrder: e.query.sortOrder || h.sort.order,
|
100
|
+
location: { coordinates: [r, l] },
|
101
|
+
locationRadius: 1e3,
|
102
|
+
limit: 500
|
103
|
+
};
|
104
|
+
console.log(d);
|
105
|
+
const g = await I.read(d);
|
106
|
+
M.all = [...M.all, ...g], u.load().then(() => {
|
107
|
+
s.value = new google.maps.Map(document.getElementById("map"), {
|
108
|
+
mapTypeControl: !1,
|
109
|
+
fullscreenControl: !1,
|
110
|
+
styles: [
|
111
|
+
{
|
112
|
+
elementType: "geometry",
|
113
|
+
stylers: [
|
114
|
+
{
|
115
|
+
color: "#212121"
|
116
|
+
}
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
elementType: "labels.icon",
|
121
|
+
stylers: [
|
122
|
+
{
|
123
|
+
visibility: "off"
|
124
|
+
}
|
125
|
+
]
|
126
|
+
},
|
127
|
+
{
|
128
|
+
elementType: "labels.text.fill",
|
129
|
+
stylers: [
|
130
|
+
{
|
131
|
+
color: "#757575"
|
132
|
+
}
|
133
|
+
]
|
134
|
+
},
|
135
|
+
{
|
136
|
+
elementType: "labels.text.stroke",
|
137
|
+
stylers: [
|
138
|
+
{
|
139
|
+
color: "#212121"
|
140
|
+
}
|
141
|
+
]
|
142
|
+
},
|
143
|
+
{
|
144
|
+
featureType: "administrative",
|
145
|
+
elementType: "geometry",
|
146
|
+
stylers: [
|
147
|
+
{
|
148
|
+
color: "#757575"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
visibility: "off"
|
152
|
+
}
|
153
|
+
]
|
154
|
+
},
|
155
|
+
{
|
156
|
+
featureType: "administrative.country",
|
157
|
+
elementType: "labels.text.fill",
|
158
|
+
stylers: [
|
159
|
+
{
|
160
|
+
color: "#9e9e9e"
|
161
|
+
}
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
featureType: "administrative.land_parcel",
|
166
|
+
stylers: [
|
167
|
+
{
|
168
|
+
visibility: "off"
|
169
|
+
}
|
170
|
+
]
|
171
|
+
},
|
172
|
+
{
|
173
|
+
featureType: "administrative.locality",
|
174
|
+
elementType: "labels.text.fill",
|
175
|
+
stylers: [
|
176
|
+
{
|
177
|
+
color: "#bdbdbd"
|
178
|
+
}
|
179
|
+
]
|
180
|
+
},
|
181
|
+
{
|
182
|
+
featureType: "administrative.neighborhood",
|
183
|
+
stylers: [
|
184
|
+
// {
|
185
|
+
// "visibility": "off"
|
186
|
+
// }
|
187
|
+
]
|
188
|
+
},
|
189
|
+
{
|
190
|
+
featureType: "poi",
|
191
|
+
stylers: [
|
192
|
+
{
|
193
|
+
visibility: "off"
|
194
|
+
}
|
195
|
+
]
|
196
|
+
},
|
197
|
+
{
|
198
|
+
featureType: "poi",
|
199
|
+
elementType: "labels.text.fill",
|
200
|
+
stylers: [
|
201
|
+
{
|
202
|
+
color: "#757575"
|
203
|
+
}
|
204
|
+
]
|
205
|
+
},
|
206
|
+
{
|
207
|
+
featureType: "poi.park",
|
208
|
+
elementType: "geometry",
|
209
|
+
stylers: [
|
210
|
+
{
|
211
|
+
color: "#181818"
|
212
|
+
}
|
213
|
+
]
|
214
|
+
},
|
215
|
+
{
|
216
|
+
featureType: "poi.park",
|
217
|
+
elementType: "labels.text.fill",
|
218
|
+
stylers: [
|
219
|
+
{
|
220
|
+
color: "#616161"
|
221
|
+
}
|
222
|
+
]
|
223
|
+
},
|
224
|
+
{
|
225
|
+
featureType: "poi.park",
|
226
|
+
elementType: "labels.text.stroke",
|
227
|
+
stylers: [
|
228
|
+
{
|
229
|
+
color: "#1b1b1b"
|
230
|
+
}
|
231
|
+
]
|
232
|
+
},
|
233
|
+
{
|
234
|
+
featureType: "road",
|
235
|
+
elementType: "geometry.fill",
|
236
|
+
stylers: [
|
237
|
+
{
|
238
|
+
color: "#2c2c2c"
|
239
|
+
}
|
240
|
+
]
|
241
|
+
},
|
242
|
+
{
|
243
|
+
featureType: "road",
|
244
|
+
elementType: "labels",
|
245
|
+
stylers: [
|
246
|
+
{
|
247
|
+
visibility: "off"
|
248
|
+
}
|
249
|
+
]
|
250
|
+
},
|
251
|
+
{
|
252
|
+
featureType: "road",
|
253
|
+
elementType: "labels.icon",
|
254
|
+
stylers: [
|
255
|
+
{
|
256
|
+
visibility: "off"
|
257
|
+
}
|
258
|
+
]
|
259
|
+
},
|
260
|
+
{
|
261
|
+
featureType: "road",
|
262
|
+
elementType: "labels.text.fill",
|
263
|
+
stylers: [
|
264
|
+
{
|
265
|
+
color: "#8a8a8a"
|
266
|
+
}
|
267
|
+
]
|
268
|
+
},
|
269
|
+
{
|
270
|
+
featureType: "road.arterial",
|
271
|
+
elementType: "geometry",
|
272
|
+
stylers: [
|
273
|
+
{
|
274
|
+
color: "#373737"
|
275
|
+
}
|
276
|
+
]
|
277
|
+
},
|
278
|
+
{
|
279
|
+
featureType: "road.arterial",
|
280
|
+
elementType: "labels",
|
281
|
+
stylers: []
|
282
|
+
},
|
283
|
+
{
|
284
|
+
featureType: "road.highway",
|
285
|
+
elementType: "geometry",
|
286
|
+
stylers: [
|
287
|
+
{
|
288
|
+
color: "#3c3c3c"
|
289
|
+
}
|
290
|
+
]
|
291
|
+
},
|
292
|
+
{
|
293
|
+
featureType: "road.highway",
|
294
|
+
elementType: "labels",
|
295
|
+
stylers: [
|
296
|
+
{
|
297
|
+
visibility: "off"
|
298
|
+
}
|
299
|
+
]
|
300
|
+
},
|
301
|
+
{
|
302
|
+
featureType: "road.highway.controlled_access",
|
303
|
+
elementType: "geometry",
|
304
|
+
stylers: [
|
305
|
+
{
|
306
|
+
color: "#4e4e4e"
|
307
|
+
}
|
308
|
+
]
|
309
|
+
},
|
310
|
+
{
|
311
|
+
featureType: "road.local",
|
312
|
+
stylers: []
|
313
|
+
},
|
314
|
+
{
|
315
|
+
featureType: "road.local",
|
316
|
+
elementType: "labels.text.fill",
|
317
|
+
stylers: [
|
318
|
+
{
|
319
|
+
color: "#616161"
|
320
|
+
}
|
321
|
+
]
|
322
|
+
},
|
323
|
+
{
|
324
|
+
featureType: "transit",
|
325
|
+
stylers: [
|
326
|
+
{
|
327
|
+
visibility: "off"
|
328
|
+
}
|
329
|
+
]
|
330
|
+
},
|
331
|
+
{
|
332
|
+
featureType: "transit",
|
333
|
+
elementType: "labels.text.fill",
|
334
|
+
stylers: [
|
335
|
+
{
|
336
|
+
color: "#757575"
|
337
|
+
}
|
338
|
+
]
|
339
|
+
},
|
340
|
+
{
|
341
|
+
featureType: "water",
|
342
|
+
elementType: "geometry",
|
343
|
+
stylers: [
|
344
|
+
{
|
345
|
+
color: "#000000"
|
346
|
+
}
|
347
|
+
]
|
348
|
+
},
|
349
|
+
{
|
350
|
+
featureType: "water",
|
351
|
+
elementType: "labels.text",
|
352
|
+
stylers: [
|
353
|
+
{
|
354
|
+
visibility: "off"
|
355
|
+
}
|
356
|
+
]
|
357
|
+
},
|
358
|
+
{
|
359
|
+
featureType: "water",
|
360
|
+
elementType: "labels.text.fill",
|
361
|
+
stylers: [
|
362
|
+
{
|
363
|
+
color: "#3d3d3d"
|
364
|
+
}
|
365
|
+
]
|
366
|
+
}
|
367
|
+
],
|
368
|
+
center: { lat: l, lng: r },
|
369
|
+
zoom: parseInt(e.query.zoom || t || "12")
|
370
|
+
});
|
371
|
+
for (let o of i.value)
|
372
|
+
o.setMap(null);
|
373
|
+
i.value = [], i.value = g.map((o) => {
|
374
|
+
var a;
|
375
|
+
let n = (a = o.spots[0]) == null ? void 0 : a.location;
|
376
|
+
if (n && n.type === "Point") {
|
377
|
+
let [R, j] = n.coordinates, P = "/marker_2.png";
|
378
|
+
o.products && o.products.length === 0 && (P = "/marker.png");
|
379
|
+
const S = new google.maps.Marker({
|
380
|
+
position: { lng: R, lat: j },
|
381
|
+
map: s.value,
|
382
|
+
icon: {
|
383
|
+
url: P,
|
384
|
+
// URL to the icon
|
385
|
+
scaledSize: new google.maps.Size(32, 48),
|
386
|
+
// icon dimensions
|
387
|
+
origin: new google.maps.Point(0, 0),
|
388
|
+
// coordinate origin for this icon
|
389
|
+
anchor: new google.maps.Point(16, 48)
|
390
|
+
// point on the icon that corresponds to the geographic location of the marker
|
391
|
+
}
|
392
|
+
});
|
393
|
+
return S.addListener("click", () => {
|
394
|
+
b.push({ name: "Organization", params: { _id: o._id } });
|
395
|
+
}), S;
|
396
|
+
}
|
397
|
+
return null;
|
398
|
+
}).filter((o) => o !== null), google.maps.event.addListener(s.value, "center_changed", () => {
|
399
|
+
let o = s.value.getCenter();
|
400
|
+
m.value = {
|
401
|
+
lat: o.lat(),
|
402
|
+
lng: o.lng()
|
403
|
+
};
|
404
|
+
}), google.maps.event.addListener(s.value, "zoom_changed", () => {
|
405
|
+
w.value = s.value.getZoom();
|
406
|
+
});
|
407
|
+
});
|
408
|
+
});
|
409
|
+
const N = async () => {
|
410
|
+
const l = {
|
411
|
+
country: e.params.country,
|
412
|
+
state: e.params.state,
|
413
|
+
city: e.params.city,
|
414
|
+
categories: e.query.categories,
|
415
|
+
prices: e.query.prices,
|
416
|
+
delivery: e.query.delivery,
|
417
|
+
sortParam: e.query.sortParam || h.sort.param,
|
418
|
+
sortOrder: e.query.sortOrder || h.sort.order,
|
419
|
+
locationRadius: 8e3 / w.value,
|
420
|
+
limit: 100,
|
421
|
+
location: {
|
422
|
+
type: "Point",
|
423
|
+
coordinates: [m.value.lng, m.value.lat]
|
424
|
+
}
|
425
|
+
};
|
426
|
+
console.log([m.value.lng, m.value.lat]);
|
427
|
+
try {
|
428
|
+
const r = await I.read(l);
|
429
|
+
for (let t of i.value)
|
430
|
+
t.setMap(null);
|
431
|
+
i.value = [], i.value = r.map((t) => {
|
432
|
+
var d;
|
433
|
+
let u = (d = t.spots[0]) == null ? void 0 : d.location;
|
434
|
+
if (u && u.type === "Point") {
|
435
|
+
let [g, T] = u.coordinates, v = t.products && t.products.length > 0 ? "/marker_2.png" : "/marker.png";
|
436
|
+
const f = new google.maps.Marker({
|
437
|
+
position: { lng: g, lat: T },
|
438
|
+
map: s.value,
|
439
|
+
icon: {
|
440
|
+
url: v,
|
441
|
+
// URL to the icon
|
442
|
+
scaledSize: new google.maps.Size(32, 48),
|
443
|
+
// icon dimensions
|
444
|
+
origin: new google.maps.Point(0, 0),
|
445
|
+
// coordinate origin for this icon
|
446
|
+
anchor: new google.maps.Point(16, 48)
|
447
|
+
// point on the icon that corresponds to the geographic location of the marker
|
448
|
+
}
|
449
|
+
});
|
450
|
+
return f.addListener("click", () => {
|
451
|
+
b.push({ name: "Organization", params: { _id: t._id } });
|
452
|
+
}), f;
|
453
|
+
}
|
454
|
+
return null;
|
455
|
+
}).filter((t) => t !== null);
|
456
|
+
} catch (r) {
|
457
|
+
console.error("Error fetching organizations:", r);
|
458
|
+
}
|
459
|
+
};
|
460
|
+
return (l, r) => (V(), $("div", Y, [
|
461
|
+
E("div", ee, [
|
462
|
+
F(Q, {
|
463
|
+
submit: N,
|
464
|
+
class: "mn-l-auto mn-r-auto bg-black t-white w-min-20 button"
|
465
|
+
}, {
|
466
|
+
default: G(() => [
|
467
|
+
Z(" Search in This Location ")
|
468
|
+
]),
|
469
|
+
_: 1
|
470
|
+
})
|
471
|
+
]),
|
472
|
+
te
|
473
|
+
]));
|
474
|
+
}
|
475
|
+
}, me = /* @__PURE__ */ W(oe, [["__scopeId", "data-v-4c504b8d"]]);
|
476
|
+
export {
|
477
|
+
me as default
|
478
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),c=require("../../../../components/Map/Map.vue.cjs"),p=require("../blocks/SpotSub.vue.cjs"),u=require("../../../users/components/blocks/CardUser.vue.cjs");;/* empty css */const m=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),s=t=>(e.pushScopeId("data-v-a4b9b533"),t=t(),e.popScopeId(),t),h={class:"radius-big o-hidden cols-2-1_3"},g={class:"pd-medium w-100"},b=s(()=>e.createElementVNode("path",{d:"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",fill:"rgb(var(--black))"},null,-1)),L=[b],v=["innerHTML"],w=["innerHTML"],k={class:"pd-small flex-v-center flex-nowrap flex"},f=s(()=>e.createElementVNode("h5",{class:"w-100"},"Contacts ",-1)),C={class:"mn-r-small"},E=s(()=>e.createElementVNode("svg",{width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",fill:"#8A8A8A"})],-1)),V={key:0},N={class:"pd-small flex-v-center flex-nowrap flex"},B=s(()=>e.createElementVNode("h5",{class:"w-100"},"Working Hours ",-1)),$={class:"mn-r-small"},_=s(()=>e.createElementVNode("svg",{width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",fill:"#8A8A8A"})],-1)),x={key:0},M={__name:"Spot",props:{spot:Object,organization:Object},setup(t){const r=t;return(l,n)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(c.default,{location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},class:""},null,8,["location"]),e.createElementVNode("div",g,[(e.openBlock(),e.createElementBlock("svg",{onClick:n[0]||(n[0]=o=>l.$router.push(`/app/organization/${r.organization._id}/spots/${t.spot._id}/edit`)),class:"i-regular pos-absolute pos-r-0 pos-t-0 t-transp",width:"652",height:"652",viewBox:"0 0 652 652",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L)),e.createElementVNode("h3",{onClick:n[1]||(n[1]=o=>l.$router.push(`/app/organization/${r.organization._id}/spots/${t.spot._id}`)),class:"mn-b-small w-100",innerHTML:t.spot.profile.name},null,8,v),e.createElementVNode("p",{onClick:n[2]||(n[2]=o=>l.$router.push(`/app/organization/${r.organization._id}/spots/${t.spot._id}`)),class:"mn-b-small p-big w-100",innerHTML:t.spot.address},null,8,w),e.createVNode(a.default,{class:"radius-small o-hidden br-1px br-solid br-grey-transp-25 mn-b-thin"},{header:e.withCtx(()=>[e.createElementVNode("div",k,[f,e.createElementVNode("p",C,e.toDisplayString(t.spot.members.length)+" человек",1),E])]),content:e.withCtx(()=>[e.createElementVNode("ul",null,[t.spot.members.length<1?(e.openBlock(),e.createElementBlock("li",V,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.spot.members,(o,i)=>(e.openBlock(),e.createBlock(u.default,{class:"br-b br-solid br-grey-transp-25",key:i,user:o.user,position:o.position,onClick:d=>l.$router.push(`/app/profile/${o.user._id}`)},null,8,["user","position","onClick"]))),128))])]),_:1}),e.createVNode(a.default,{class:"radius-small o-hidden br-1px br-solid br-grey-transp-25 mn-b-thin"},{header:e.withCtx(()=>[e.createElementVNode("div",N,[B,e.createElementVNode("p",$,e.toDisplayString(t.spot.subspots?t.spot.subspots.length:0)+" отделов",1),_])]),content:e.withCtx(()=>[e.createElementVNode("ul",null,[t.spot.subspots.length<1?(e.openBlock(),e.createElementBlock("li",x,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.spot.subspots,(o,i)=>(e.openBlock(),e.createBlock(p.default,{onClick:d=>l.$router.push(`/app/organization/spots/${o._id}`),key:i,class:"br-b br-solid br-grey-transp-25",spot:o},null,8,["onClick","spot"]))),128))])]),_:1})])]))}},S=m.default(M,[["__scopeId","data-v-a4b9b533"]]);exports.default=S;
|