@ozdao/prometheus-framework 0.2.135 → 0.2.138

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/main-DTHFR7H_.mjs +14510 -0
  2. package/dist/main-wXdocsbd.js +92 -0
  3. package/dist/main.css +1 -1
  4. package/dist/organizations.server.js +1 -2
  5. package/dist/organizations.server.mjs +1 -2
  6. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +19 -20
  8. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/components/Map/Map.vue.js +3 -2
  10. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -0
  11. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +44 -0
  12. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  14. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  16. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  18. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +51 -52
  20. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  22. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +7 -7
  24. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +81 -76
  26. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  28. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  30. package/dist/prometheus-framework.cjs.js +1 -1
  31. package/dist/prometheus-framework.es.js +1 -1
  32. package/dist/spots.server.js +3 -3
  33. package/dist/spots.server.mjs +3 -3
  34. package/dist/style.css +1 -1
  35. package/dist/web-Dh669DqQ.mjs +54 -0
  36. package/dist/web-Dt2RCU54.js +1 -0
  37. package/package.json +9 -9
  38. package/src/components/Map/Map.vue +2 -2
  39. package/src/modules/organizations/components/pages/Organization.vue +3 -3
  40. package/src/modules/organizations/controllers/memberships.controller.js +2 -2
  41. package/src/modules/spots/components/blocks/CardSpot.vue +0 -1
  42. package/src/modules/spots/components/pages/SpotEdit.vue +8 -5
  43. package/src/modules/spots/controllers/spots.controller.js +1 -5
  44. package/src/modules/spots/router/spots.js +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),s=require("../../../../components/Chips/Chips.vue2.cjs"),d=require("../../../../components/Map/Map.vue.cjs");;/* empty css */const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-fba16034"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden pos-relative cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),y=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),b={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(o,n)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{apiKey:o.GOOGLE_MAPS_API_KEY,location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},locale:o.$i18n.locale,class:""},null,8,["apiKey","location","locale"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:n[0]||(n[0]=a=>o.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:n[1]||(n[1]=a=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:n[2]||(n[2]=a=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,o.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(s.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),y,o.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(s.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},v=c.default(b,[["__scopeId","data-v-fba16034"]]);exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue2.cjs"),d=require("../../../../components/Map/Map.vue.cjs");;/* empty css */const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-6c15ff4f"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden pos-relative cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),f=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),y={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(o,n)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{apiKey:o.GOOGLE_MAPS_API_KEY,location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},locale:o.$i18n.locale,class:""},null,8,["apiKey","location","locale"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:n[0]||(n[0]=s=>o.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:n[1]||(n[1]=s=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:n[2]||(n[2]=s=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,o.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(a.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),f,o.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(a.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},v=c.default(y,[["__scopeId","data-v-6c15ff4f"]]);exports.default=v;
@@ -1,10 +1,10 @@
1
- import { openBlock as n, createElementBlock as u, createVNode as l, createElementVNode as i, toDisplayString as r, createBlock as p, createCommentVNode as d, pushScopeId as h, popScopeId as g } from "vue";
2
- import f from "../../../icons/navigation/IconEdit.vue.js";
1
+ import { openBlock as n, createElementBlock as u, createVNode as l, createElementVNode as i, toDisplayString as r, createBlock as p, createCommentVNode as d, pushScopeId as h, popScopeId as f } from "vue";
2
+ import g from "../../../icons/navigation/IconEdit.vue.js";
3
3
  import c from "../../../../components/Chips/Chips.vue2.js";
4
4
  import y from "../../../../components/Map/Map.vue.js";
5
5
  /* empty css */
6
6
  import $ from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
- const m = (o) => (h("data-v-fba16034"), o = o(), g(), o), b = { class: "radius-big o-hidden pos-relative cols-2-1_3" }, v = { class: "pd-medium w-100" }, k = ["innerHTML"], S = { class: "d-block p-big mn-b-semi" }, z = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Delivery:", -1)), C = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Accepted Payment:", -1)), w = {
7
+ const m = (o) => (h("data-v-6c15ff4f"), o = o(), f(), o), v = { class: "radius-big o-hidden pos-relative cols-2-1_3" }, b = { class: "pd-medium w-100" }, k = ["innerHTML"], S = { class: "d-block p-big mn-b-semi" }, z = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Delivery:", -1)), C = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Accepted Payment:", -1)), w = {
8
8
  __name: "CardSpot",
9
9
  props: {
10
10
  spot: Object,
@@ -12,7 +12,7 @@ const m = (o) => (h("data-v-fba16034"), o = o(), g(), o), b = { class: "radius-b
12
12
  },
13
13
  setup(o) {
14
14
  const s = o;
15
- return (t, e) => (n(), u("div", b, [
15
+ return (t, e) => (n(), u("div", v, [
16
16
  l(y, {
17
17
  apiKey: t.GOOGLE_MAPS_API_KEY,
18
18
  location: {
@@ -22,8 +22,8 @@ const m = (o) => (h("data-v-fba16034"), o = o(), g(), o), b = { class: "radius-b
22
22
  locale: t.$i18n.locale,
23
23
  class: ""
24
24
  }, null, 8, ["apiKey", "location", "locale"]),
25
- i("div", v, [
26
- l(f, {
25
+ i("div", b, [
26
+ l(g, {
27
27
  onClick: e[0] || (e[0] = (a) => t.$router.push({
28
28
  name: "Spot Edit",
29
29
  params: {
@@ -56,7 +56,7 @@ const m = (o) => (h("data-v-fba16034"), o = o(), g(), o), b = { class: "radius-b
56
56
  ])
57
57
  ]));
58
58
  }
59
- }, K = /* @__PURE__ */ $(w, [["__scopeId", "data-v-fba16034"]]);
59
+ }, K = /* @__PURE__ */ $(w, [["__scopeId", "data-v-6c15ff4f"]]);
60
60
  export {
61
61
  K as default
62
62
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-router"),d=require("../../../../components/Block/Block.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const r=require("../../../../components/Field/Field.vue.cjs"),N=require("../../../../components/Select/Select.vue.cjs"),n=require("../../../../components/Checkbox/Checkbox.vue.cjs"),g=require("../../../../components/Address/Address.vue2.cjs"),w=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),u=require("../../../../components/Button/Button.vue.cjs");require("vue-i18n");;/* empty css */const t=require("../../store/spots.cjs"),V={class:"for-transition w-100 cols-1 pd-thin gap-thin"},y={class:"mn-r-auto"},E={class:"cols-2 gap-thin"},S={class:"gap-small mn-b-small cols-2-fit-content"},k={class:"w-100"},q=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please the available delivery options:",-1),U=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select the available payment methods:",-1),_=e.createElementVNode("p",{class:"mn-b-small p-medium"},"Options:",-1),P={__name:"SpotEdit",setup(x){const m=p.useRouter(),l=p.useRoute();e.ref("details"),e.ref(!1),e.onMounted(async()=>{await c()});async function c(){var s,o;l.params.spot&&await t.actions.readOne(l.params.spot);const i=(s=t.state.spot.location)==null?void 0:s.coordinates[0],a=(o=t.state.spot.location)==null?void 0:o.coordinates[1];t.state.spot.location={lat:a||1,lng:i||1}}async function f(){t.state.spot.location={type:"Point",coordinates:[t.state.spot.location.lng,t.state.spot.location.lat]},l.params.spot&&await t.actions.update(l.params._id,t.state.spot),l.params.spot||await t.actions.create(l.params._id,t.state.spot)}function b(){m.replace({name:"Spot",params:{_id:l.params._id,spot:t.state.spot._id}})}async function v(){await t.actions.delete(l.params._id,t.state.spot)}return(i,a)=>(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(d.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",y,e.toDisplayString(e.unref(l).params.spot?t.state.spot.profile.name:"Create Spot"),1),e.createVNode(u.default,{submit:f,callback:b,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save Spot ")]),_:1})]),_:1}),e.createElementVNode("div",E,[e.createVNode(d.default,{title:"Profile",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(h.default,{photo:t.state.spot.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.spot.profile.photo=s),uploadPath:"organizations/"+t.state.spot.name+"/avatars",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",k,[e.createVNode(r.default,{field:t.state.spot.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.spot.profile.name=s),label:"Name",placeholder:"Spot Name",class:"mn-b-small bg-white radius-small pd-medium",validation:i.organizationName},null,8,["field","validation"]),e.createVNode(r.default,{field:t.state.spot.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.spot.profile.description=s),label:"Description",placeholder:"Spot description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:i.organizationName},null,8,["field","validation"])])]),e.createVNode(N.default,{select:t.state.spot.status,"onUpdate:select":a[3]||(a[3]=s=>t.state.spot.status=s),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),q,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["pickup","courier","post"],s=>e.createVNode(n.default,{label:s,name:"Delivery",value:s,class:"w-100 mn-b-small bg-white radius-small pd-small",radio:t.state.spot.delivery,"onUpdate:radio":a[4]||(a[4]=o=>t.state.spot.delivery=o)},null,8,["label","value","radio"])),64)),U,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["cash","bank transfer","crypto"],s=>e.createVNode(n.default,{label:s,name:"Payment",value:s,class:"w-100 mn-b-small bg-white radius-small pd-small",radio:t.state.spot.payment,"onUpdate:radio":a[5]||(a[5]=o=>t.state.spot.payment=o)},null,8,["label","value","radio"])),64))]),_:1}),e.createVNode(d.default,{title:"Location",class:"pos-relative"},{default:e.withCtx(()=>{var s;return[e.createVNode(g.default,{apiKey:i.GOOGLE_MAPS_API_KEY,address:t.state.spot.address,location:t.state.spot.location,label:"Address",placeholder:"Enter delivery address",class:"bg-white pd-small radius-tl-medium radius-tr-medium","onUpdate:location":a[6]||(a[6]=o=>{t.state.spot.location=o}),"onUpdate:address":a[7]||(a[7]=o=>{t.state.spot.address=o})},null,8,["apiKey","address","location"]),e.createVNode(w.default,{apiKey:i.GOOGLE_MAPS_API_KEY,address:t.state.spot.address,location:t.state.spot.location,class:"h-20r mn-b-small radius-bl-medium radius-br-medium o-hidden","onUpdate:location":a[8]||(a[8]=o=>{t.state.spot.location=o}),"onUpdate:address":a[9]||(a[9]=o=>{t.state.spot.address=o})},null,8,["apiKey","address","location"]),_,e.createVNode(n.default,{label:"Hide address",name:"address",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:(s=t.state.spot.position)==null?void 0:s.hide,"onUpdate:radio":a[10]||(a[10]=o=>t.state.spot.position.hide=o)},null,8,["radio"]),e.createVNode(r.default,{field:t.state.spot.minorder,"onUpdate:field":a[11]||(a[11]=o=>t.state.spot.minorder=o),label:"Min.order",placeholder:"Enter minimum order value",class:"bg-white radius-small pd-medium",validation:i.organizationName},null,8,["field","validation"])]}),_:1})]),e.createVNode(u.default,{submit:v,callback:i.redirectToDash,class:"w-100 bg-light"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Block/Block.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const r=require("../../../../components/Field/Field.vue.cjs"),N=require("../../../../components/Select/Select.vue.cjs"),n=require("../../../../components/Checkbox/Checkbox.vue.cjs"),w=require("../../../../components/Address/Address.vue2.cjs"),V=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),m=require("../../../../components/Button/Button.vue.cjs");require("vue-i18n");;/* empty css */const t=require("../../store/spots.cjs"),y={class:"for-transition w-100 cols-1 pd-thin gap-thin"},E={class:"mn-r-auto"},S={class:"cols-2 gap-thin"},q={class:"gap-small mn-b-small cols-2-fit-content"},k={class:"w-100"},U=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please the available delivery options:",-1),_=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select the available payment methods:",-1),P=e.createElementVNode("p",{class:"mn-b-small p-medium"},"Options:",-1),O={__name:"SpotEdit",setup(x){const p=u.useRouter(),l=u.useRoute();e.ref("details"),e.ref(!1),e.onMounted(async()=>{await c()});async function c(){var s,o;l.params.spot&&await t.actions.readOne(l.params.spot);const i=(s=t.state.spot.location)==null?void 0:s.coordinates[0],a=(o=t.state.spot.location)==null?void 0:o.coordinates[1];t.state.spot.location={lat:a||1,lng:i||1}}async function f(){t.state.spot.location={type:"Point",coordinates:[t.state.spot.location.lng,t.state.spot.location.lat]},l.params.spot&&await t.actions.update(l.params._id,t.state.spot),l.params.spot||await t.actions.create(l.params._id,t.state.spot)}function b(){p.push({name:"Organization",params:{_id:l.params._id}})}async function h(){await t.actions.delete(l.params._id,t.state.spot)}function v(){p.push({name:"Organization",params:{_id:l.params._id}})}return(i,a)=>(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(d.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",E,e.toDisplayString(e.unref(l).params.spot?t.state.spot.profile.name:"Create Spot"),1),e.createVNode(m.default,{submit:f,callback:b,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save Spot ")]),_:1})]),_:1}),e.createElementVNode("div",S,[e.createVNode(d.default,{title:"Profile",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(g.default,{photo:t.state.spot.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.spot.profile.photo=s),uploadPath:"organizations/"+t.state.spot.name+"/avatars",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",k,[e.createVNode(r.default,{field:t.state.spot.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.spot.profile.name=s),label:"Name",placeholder:"Spot Name",class:"mn-b-small bg-white radius-small pd-medium",validation:i.organizationName},null,8,["field","validation"]),e.createVNode(r.default,{field:t.state.spot.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.spot.profile.description=s),label:"Description",placeholder:"Spot description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:i.organizationName},null,8,["field","validation"])])]),e.createVNode(N.default,{select:t.state.spot.status,"onUpdate:select":a[3]||(a[3]=s=>t.state.spot.status=s),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),U,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["pickup","courier","post"],s=>e.createVNode(n.default,{label:s,name:"Delivery",value:s,class:"w-100 mn-b-small bg-white radius-small pd-small",radio:t.state.spot.delivery,"onUpdate:radio":a[4]||(a[4]=o=>t.state.spot.delivery=o)},null,8,["label","value","radio"])),64)),_,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["cash","bank transfer","crypto"],s=>e.createVNode(n.default,{label:s,name:"Payment",value:s,class:"w-100 mn-b-small bg-white radius-small pd-small",radio:t.state.spot.payment,"onUpdate:radio":a[5]||(a[5]=o=>t.state.spot.payment=o)},null,8,["label","value","radio"])),64))]),_:1}),e.createVNode(d.default,{title:"Location",class:"pos-relative"},{default:e.withCtx(()=>{var s;return[e.createVNode(w.default,{apiKey:i.GOOGLE_MAPS_API_KEY,address:t.state.spot.address,location:t.state.spot.location,locale:i.$i18n.locale,label:"Address",placeholder:"Enter delivery address",class:"bg-white pd-small radius-tl-medium radius-tr-medium","onUpdate:location":a[6]||(a[6]=o=>{t.state.spot.location=o}),"onUpdate:address":a[7]||(a[7]=o=>{t.state.spot.address=o})},null,8,["apiKey","address","location","locale"]),e.createVNode(V.default,{apiKey:i.GOOGLE_MAPS_API_KEY,address:t.state.spot.address,location:t.state.spot.location,locale:i.$i18n.locale,class:"h-20r mn-b-small radius-bl-medium radius-br-medium o-hidden","onUpdate:location":a[8]||(a[8]=o=>{t.state.spot.location=o}),"onUpdate:address":a[9]||(a[9]=o=>{t.state.spot.address=o})},null,8,["apiKey","address","location","locale"]),P,e.createVNode(n.default,{label:"Hide address",name:"address",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:(s=t.state.spot.position)==null?void 0:s.hide,"onUpdate:radio":a[10]||(a[10]=o=>t.state.spot.position.hide=o)},null,8,["radio"]),e.createVNode(r.default,{field:t.state.spot.minorder,"onUpdate:field":a[11]||(a[11]=o=>t.state.spot.minorder=o),label:"Min.order",placeholder:"Enter minimum order value",class:"bg-white radius-small pd-medium",validation:i.organizationName},null,8,["field","validation"])]}),_:1})]),e.createVNode(m.default,{submit:h,callback:v,class:"w-100 bg-light"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1})]))}};exports.default=O;
@@ -1,28 +1,28 @@
1
- import { ref as b, onMounted as E, openBlock as p, createElementBlock as m, createVNode as e, withCtx as n, createElementVNode as d, toDisplayString as D, unref as N, createTextVNode as v, Fragment as h, renderList as _ } from "vue";
2
- import { useRouter as k, useRoute as $ } from "vue-router";
1
+ import { ref as v, onMounted as $, openBlock as p, createElementBlock as m, createVNode as l, withCtx as d, createElementVNode as n, toDisplayString as D, unref as N, createTextVNode as h, Fragment as g, renderList as _ } from "vue";
2
+ import { useRouter as O, useRoute as k } from "vue-router";
3
3
  import u from "../../../../components/Block/Block.vue.js";
4
- import K from "../../../../components/UploadImage/UploadImage.vue.js";
4
+ import z from "../../../../components/UploadImage/UploadImage.vue.js";
5
5
  /* empty css */
6
6
  import c from "../../../../components/Field/Field.vue.js";
7
- import O from "../../../../components/Select/Select.vue.js";
7
+ import K from "../../../../components/Select/Select.vue.js";
8
8
  import f from "../../../../components/Checkbox/Checkbox.vue.js";
9
9
  import A from "../../../../components/Address/Address.vue2.js";
10
- import x from "../../../../components/LocationMarker/LocationMarker.vue2.js";
11
- import g from "../../../../components/Button/Button.vue.js";
10
+ import G from "../../../../components/LocationMarker/LocationMarker.vue2.js";
11
+ import w from "../../../../components/Button/Button.vue.js";
12
12
  import "vue-i18n";
13
13
  /* empty css */
14
14
  import { actions as r, state as a } from "../../store/spots.js";
15
- const z = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class: "mn-r-auto" }, L = { class: "cols-2 gap-thin" }, M = { class: "gap-small mn-b-small cols-2-fit-content" }, T = { class: "w-100" }, V = /* @__PURE__ */ d("p", { class: "p-medium mn-b-small" }, "Please the available delivery options:", -1), B = /* @__PURE__ */ d("p", { class: "p-medium mn-b-small" }, "Please select the available payment methods:", -1), C = /* @__PURE__ */ d("p", { class: "mn-b-small p-medium" }, "Options:", -1), sa = {
15
+ const L = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, M = { class: "mn-r-auto" }, x = { class: "cols-2 gap-thin" }, V = { class: "gap-small mn-b-small cols-2-fit-content" }, B = { class: "w-100" }, C = /* @__PURE__ */ n("p", { class: "p-medium mn-b-small" }, "Please the available delivery options:", -1), I = /* @__PURE__ */ n("p", { class: "p-medium mn-b-small" }, "Please select the available payment methods:", -1), R = /* @__PURE__ */ n("p", { class: "mn-b-small p-medium" }, "Options:", -1), la = {
16
16
  __name: "SpotEdit",
17
- setup(I) {
18
- const w = k(), l = $();
19
- b("details"), b(!1), E(async () => {
17
+ setup(T) {
18
+ const b = O(), e = k();
19
+ v("details"), v(!1), $(async () => {
20
20
  await y();
21
21
  });
22
22
  async function y() {
23
- var t, s;
24
- l.params.spot && await r.readOne(l.params.spot);
25
- const i = (t = a.spot.location) == null ? void 0 : t.coordinates[0], o = (s = a.spot.location) == null ? void 0 : s.coordinates[1];
23
+ var s, t;
24
+ e.params.spot && await r.readOne(e.params.spot);
25
+ const i = (s = a.spot.location) == null ? void 0 : s.coordinates[0], o = (t = a.spot.location) == null ? void 0 : t.coordinates[1];
26
26
  a.spot.location = {
27
27
  lat: o || 1,
28
28
  lng: i || 1
@@ -32,65 +32,68 @@ const z = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class
32
32
  a.spot.location = {
33
33
  type: "Point",
34
34
  coordinates: [a.spot.location.lng, a.spot.location.lat]
35
- }, l.params.spot && await r.update(
36
- l.params._id,
35
+ }, e.params.spot && await r.update(
36
+ e.params._id,
37
37
  a.spot
38
- ), l.params.spot || await r.create(
39
- l.params._id,
38
+ ), e.params.spot || await r.create(
39
+ e.params._id,
40
40
  a.spot
41
41
  );
42
42
  }
43
43
  function U() {
44
- w.replace({ name: "Spot", params: { _id: l.params._id, spot: a.spot._id } });
44
+ b.push({ name: "Organization", params: { _id: e.params._id } });
45
45
  }
46
46
  async function P() {
47
47
  await r.delete(
48
- l.params._id,
48
+ e.params._id,
49
49
  a.spot
50
50
  );
51
51
  }
52
- return (i, o) => (p(), m("div", z, [
53
- e(u, { class: "flex-nowrap flex-v-center flex" }, {
54
- default: n(() => [
55
- d("h1", G, D(N(l).params.spot ? a.spot.profile.name : "Create Spot"), 1),
56
- e(g, {
52
+ function E() {
53
+ b.push({ name: "Organization", params: { _id: e.params._id } });
54
+ }
55
+ return (i, o) => (p(), m("div", L, [
56
+ l(u, { class: "flex-nowrap flex-v-center flex" }, {
57
+ default: d(() => [
58
+ n("h1", M, D(N(e).params.spot ? a.spot.profile.name : "Create Spot"), 1),
59
+ l(w, {
57
60
  submit: S,
58
61
  callback: U,
59
62
  class: "bg-main"
60
63
  }, {
61
- default: n(() => [
62
- v(" Save Spot ")
64
+ default: d(() => [
65
+ h(" Save Spot ")
63
66
  ]),
64
67
  _: 1
65
68
  })
66
69
  ]),
67
70
  _: 1
68
71
  }),
69
- d("div", L, [
70
- e(u, {
72
+ n("div", x, [
73
+ l(u, {
71
74
  title: "Profile",
72
75
  class: "mn-b-semi"
73
76
  }, {
74
- default: n(() => [
75
- d("div", M, [
76
- e(K, {
77
+ default: d(() => [
78
+ n("div", V, [
79
+ l(z, {
77
80
  photo: a.spot.profile.photo,
78
- "onUpdate:photo": o[0] || (o[0] = (t) => a.spot.profile.photo = t),
81
+ "onUpdate:photo": o[0] || (o[0] = (s) => a.spot.profile.photo = s),
79
82
  uploadPath: "organizations/" + a.spot.name + "/avatars",
80
83
  class: "aspect-1x1 w-8r o-hidden radius-extra"
81
84
  }, null, 8, ["photo", "uploadPath"]),
82
- d("div", T, [
83
- e(c, {
85
+ n("div", B, [
86
+ l(c, {
84
87
  field: a.spot.profile.name,
85
- "onUpdate:field": o[1] || (o[1] = (t) => a.spot.profile.name = t),
88
+ "onUpdate:field": o[1] || (o[1] = (s) => a.spot.profile.name = s),
86
89
  label: "Name",
87
90
  placeholder: "Spot Name",
88
91
  class: "mn-b-small bg-white radius-small pd-medium",
89
92
  validation: i.organizationName
90
93
  }, null, 8, ["field", "validation"]),
91
- e(c, {
94
+ l(c, {
92
95
  field: a.spot.profile.description,
93
- "onUpdate:field": o[2] || (o[2] = (t) => a.spot.profile.description = t),
96
+ "onUpdate:field": o[2] || (o[2] = (s) => a.spot.profile.description = s),
94
97
  label: "Description",
95
98
  placeholder: "Spot description (max 120 symbols)",
96
99
  class: "bg-white radius-small pd-medium",
@@ -98,9 +101,9 @@ const z = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class
98
101
  }, null, 8, ["field", "validation"])
99
102
  ])
100
103
  ]),
101
- e(O, {
104
+ l(K, {
102
105
  select: a.spot.status,
103
- "onUpdate:select": o[3] || (o[3] = (t) => a.spot.status = t),
106
+ "onUpdate:select": o[3] || (o[3] = (s) => a.spot.status = s),
104
107
  label: "Status",
105
108
  options: [
106
109
  "unpublished",
@@ -110,71 +113,73 @@ const z = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class
110
113
  placeholder: "Display product",
111
114
  class: "pos-relative w-100 mn-b-small bg-white radius-small pd-medium"
112
115
  }, null, 8, ["select"]),
113
- V,
114
- (p(), m(h, null, _(["pickup", "courier", "post"], (t) => e(f, {
115
- label: t,
116
+ C,
117
+ (p(), m(g, null, _(["pickup", "courier", "post"], (s) => l(f, {
118
+ label: s,
116
119
  name: "Delivery",
117
- value: t,
120
+ value: s,
118
121
  class: "w-100 mn-b-small bg-white radius-small pd-small",
119
122
  radio: a.spot.delivery,
120
- "onUpdate:radio": o[4] || (o[4] = (s) => a.spot.delivery = s)
123
+ "onUpdate:radio": o[4] || (o[4] = (t) => a.spot.delivery = t)
121
124
  }, null, 8, ["label", "value", "radio"])), 64)),
122
- B,
123
- (p(), m(h, null, _(["cash", "bank transfer", "crypto"], (t) => e(f, {
124
- label: t,
125
+ I,
126
+ (p(), m(g, null, _(["cash", "bank transfer", "crypto"], (s) => l(f, {
127
+ label: s,
125
128
  name: "Payment",
126
- value: t,
129
+ value: s,
127
130
  class: "w-100 mn-b-small bg-white radius-small pd-small",
128
131
  radio: a.spot.payment,
129
- "onUpdate:radio": o[5] || (o[5] = (s) => a.spot.payment = s)
132
+ "onUpdate:radio": o[5] || (o[5] = (t) => a.spot.payment = t)
130
133
  }, null, 8, ["label", "value", "radio"])), 64))
131
134
  ]),
132
135
  _: 1
133
136
  }),
134
- e(u, {
137
+ l(u, {
135
138
  title: "Location",
136
139
  class: "pos-relative"
137
140
  }, {
138
- default: n(() => {
139
- var t;
141
+ default: d(() => {
142
+ var s;
140
143
  return [
141
- e(A, {
144
+ l(A, {
142
145
  apiKey: i.GOOGLE_MAPS_API_KEY,
143
146
  address: a.spot.address,
144
147
  location: a.spot.location,
148
+ locale: i.$i18n.locale,
145
149
  label: "Address",
146
150
  placeholder: "Enter delivery address",
147
151
  class: "bg-white pd-small radius-tl-medium radius-tr-medium",
148
- "onUpdate:location": o[6] || (o[6] = (s) => {
149
- a.spot.location = s;
152
+ "onUpdate:location": o[6] || (o[6] = (t) => {
153
+ a.spot.location = t;
150
154
  }),
151
- "onUpdate:address": o[7] || (o[7] = (s) => {
152
- a.spot.address = s;
155
+ "onUpdate:address": o[7] || (o[7] = (t) => {
156
+ a.spot.address = t;
153
157
  })
154
- }, null, 8, ["apiKey", "address", "location"]),
155
- e(x, {
158
+ }, null, 8, ["apiKey", "address", "location", "locale"]),
159
+ l(G, {
156
160
  apiKey: i.GOOGLE_MAPS_API_KEY,
157
161
  address: a.spot.address,
158
162
  location: a.spot.location,
163
+ locale: i.$i18n.locale,
159
164
  class: "h-20r mn-b-small radius-bl-medium radius-br-medium o-hidden",
160
- "onUpdate:location": o[8] || (o[8] = (s) => {
161
- a.spot.location = s;
165
+ "onUpdate:location": o[8] || (o[8] = (t) => {
166
+ a.spot.location = t;
162
167
  }),
163
- "onUpdate:address": o[9] || (o[9] = (s) => {
164
- a.spot.address = s;
168
+ "onUpdate:address": o[9] || (o[9] = (t) => {
169
+ a.spot.address = t;
165
170
  })
166
- }, null, 8, ["apiKey", "address", "location"]),
167
- C,
168
- e(f, {
171
+ }, null, 8, ["apiKey", "address", "location", "locale"]),
172
+ R,
173
+ l(f, {
169
174
  label: "Hide address",
170
175
  name: "address",
171
176
  class: "w-100 mn-r-small bg-white radius-small pd-small",
172
- radio: (t = a.spot.position) == null ? void 0 : t.hide,
173
- "onUpdate:radio": o[10] || (o[10] = (s) => a.spot.position.hide = s)
177
+ radio: (s = a.spot.position) == null ? void 0 : s.hide,
178
+ "onUpdate:radio": o[10] || (o[10] = (t) => a.spot.position.hide = t)
174
179
  }, null, 8, ["radio"]),
175
- e(c, {
180
+ l(c, {
176
181
  field: a.spot.minorder,
177
- "onUpdate:field": o[11] || (o[11] = (s) => a.spot.minorder = s),
182
+ "onUpdate:field": o[11] || (o[11] = (t) => a.spot.minorder = t),
178
183
  label: "Min.order",
179
184
  placeholder: "Enter minimum order value",
180
185
  class: "bg-white radius-small pd-medium",
@@ -185,19 +190,19 @@ const z = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class
185
190
  _: 1
186
191
  })
187
192
  ]),
188
- e(g, {
193
+ l(w, {
189
194
  submit: P,
190
- callback: i.redirectToDash,
195
+ callback: E,
191
196
  class: "w-100 bg-light"
192
197
  }, {
193
- default: n(() => [
194
- v("Delete Spot")
198
+ default: d(() => [
199
+ h("Delete Spot")
195
200
  ]),
196
201
  _: 1
197
- }, 8, ["callback"])
202
+ })
198
203
  ]));
199
204
  }
200
205
  };
201
206
  export {
202
- sa as default
207
+ la as default
203
208
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../globals/components/layouts/Empty.vue.cjs"),r=require("../components/layouts/Spots.vue.cjs"),e=require("../../middlewares/client/auth.validation.cjs"),o={path:"spots",component:t.default,meta:{title:{en:"Spots",ru:"Места"}},children:[{path:":country?",component:r.default,meta:{title:{en:"Spots",ru:"Места"},header_theme:"dark",footer_theme:"dark"},children:[{path:":state?",name:"Spots tate",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs")),children:[{path:":city?",name:"Spots City",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs"))}]}]},{path:":_id/spots/create",name:"Spot Creation",meta:{title:"Создание точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))},{path:":_id/spots/:deparment",name:"Spot",meta:{title:"Точка"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/Spot.vue.cjs"))},{path:":_id/spots/:spot/edit",name:"Spot Edit",meta:{title:"Редактирование точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))}]};exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../globals/components/layouts/Empty.vue.cjs"),o=require("../components/layouts/Spots.vue.cjs"),e=require("../../middlewares/client/auth.validation.cjs"),r={path:"spots",component:t.default,meta:{title:{en:"Spots",ru:"Места"}},children:[{path:":country?",component:o.default,meta:{title:{en:"Spots",ru:"Места"},header_theme:"dark",footer_theme:"dark"},children:[{path:":state?",name:"Spots tate",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs")),children:[{path:":city?",name:"Spots City",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs"))}]}]},{path:":_id/spots/create",name:"Spot Creation",meta:{title:"Создание точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))},{path:":_id/spots/:spot",name:"Spot",meta:{title:"Точка"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/Spot.vue.cjs"))},{path:":_id/spots/:spot/edit",name:"Spot Edit",meta:{title:"Редактирование точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))}]};exports.default=r;
@@ -58,7 +58,7 @@ const n = {
58
58
  )
59
59
  },
60
60
  {
61
- path: ":_id/spots/:deparment",
61
+ path: ":_id/spots/:spot",
62
62
  name: "Spot",
63
63
  meta: {
64
64
  title: "Точка"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */const h=require("../../../../components/Dropdown/Dropdown.vue2.cjs"),g=require("../../../../components/Completion/Completion.vue.cjs"),d=require("../../../../components/Menu/Menu.vue.cjs"),l=require("../../../../components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),N=require("../../../reports/components/sections/FormReport.vue.cjs"),V=require("../../../organizations/components/blocks/Socials.vue.cjs"),B=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),v=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const x={key:0,class:"for-transition w-100"},y={key:0,class:"flex-center flex pd-medium radius-big bg-light uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-light"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={key:4,class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},L={key:6,class:"mn-t-small mn-b-thin"},O=e.createElementVNode("span",null,"Events",-1),A=e.createElementVNode("span",null,"Groups",-1),j=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",null," About ",-1),T=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),H={__name:"Profile",setup(J){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{v.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",x,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",y," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(g.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(N.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1})):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo&&t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," 👨‍👨‍👧‍👧 "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:5,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",L," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(V.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),O]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),A]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),j]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{onClick:r[8]||(r[8]=s=>e.unref(n).push({name:"Legal",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[G]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[9]||(r[9]=s=>b())},{default:e.withCtx(()=>[T]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */const h=require("../../../../components/Dropdown/Dropdown.vue2.cjs"),g=require("../../../../components/Completion/Completion.vue.cjs"),d=require("../../../../components/Menu/Menu.vue2.cjs"),l=require("../../../../components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),N=require("../../../reports/components/sections/FormReport.vue.cjs"),V=require("../../../organizations/components/blocks/Socials.vue.cjs"),B=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),v=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const x={key:0,class:"for-transition w-100"},y={key:0,class:"flex-center flex pd-medium radius-big bg-light uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-light"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={key:4,class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},L={key:6,class:"mn-t-small mn-b-thin"},O=e.createElementVNode("span",null,"Events",-1),A=e.createElementVNode("span",null,"Groups",-1),j=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",null," About ",-1),T=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),H={__name:"Profile",setup(J){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{v.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",x,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",y," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(g.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(N.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1})):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo&&t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," 👨‍👨‍👧‍👧 "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:5,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",L," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(V.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),O]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),A]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),j]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{onClick:r[8]||(r[8]=s=>e.unref(n).push({name:"Legal",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[G]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[9]||(r[9]=s=>b())},{default:e.withCtx(()=>[T]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=H;
@@ -4,7 +4,7 @@ import { ref as U, onMounted as C, openBlock as i, createElementBlock as c, unre
4
4
  /* empty css */
5
5
  import B from "../../../../components/Dropdown/Dropdown.vue2.js";
6
6
  import M from "../../../../components/Completion/Completion.vue.js";
7
- import k from "../../../../components/Menu/Menu.vue.js";
7
+ import k from "../../../../components/Menu/Menu.vue2.js";
8
8
  import _ from "../../../../components/Menu/MenuItem.vue.js";
9
9
  import w from "../../../organizations/components/elements/ButtonToggleMembership.vue.js";
10
10
  import R from "../../../reports/components/sections/FormReport.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./main-5IrI2IOV.js");exports.Address=_._sfc_main;exports.Breadcrumbs=_._sfc_main$16;exports.Button=_._sfc_main$1;exports.Checkbox=_._sfc_main$2;exports.Chips=_._sfc_main$17;exports.Countdown=_._sfc_main$18;exports.DatePicker=_._sfc_main$19;exports.Dropdown=_._sfc_main$3;exports.EmptyState=_._sfc_main$20;exports.Error=_._sfc_main$4;exports.Feed=_._sfc_main$21;exports.Field=_._sfc_main$5;exports.FieldBig=_._sfc_main$22;exports.FieldPhone=_._sfc_main$6;exports.FieldTags=_.FieldTags;exports.Loader=_.Loader;exports.LocationMarker=_._sfc_main$7;exports.Map=_.Map;exports.Marquee=_._sfc_main$27;exports.Popup=_._sfc_main$8;exports.Radio=_._sfc_main$9;exports.Select=_.Select;exports.SelectMulti=_.SelectMulti;exports.Shader=_._sfc_main$23;exports.Sidebar=_._sfc_main$24;exports.Slider=_._sfc_main$25;exports.Spoiler=_._sfc_main$10;exports.Status=_._sfc_main$26;exports.Tab=_._sfc_main$11;exports.Text=_._sfc_main$13;exports.Tooltip=_._sfc_main$12;exports.Upload=_.Upload;exports.UploadImage=_._sfc_main$14;exports.UploadImageMultiple=_._sfc_main$15;exports.default=_.main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./main-wXdocsbd.js");exports.Address=_._sfc_main;exports.Breadcrumbs=_._sfc_main$16;exports.Button=_._sfc_main$1;exports.Checkbox=_._sfc_main$2;exports.Chips=_._sfc_main$17;exports.Countdown=_._sfc_main$18;exports.DatePicker=_._sfc_main$19;exports.Dropdown=_._sfc_main$3;exports.EmptyState=_._sfc_main$20;exports.Error=_._sfc_main$4;exports.Feed=_._sfc_main$21;exports.Field=_._sfc_main$5;exports.FieldBig=_._sfc_main$22;exports.FieldPhone=_._sfc_main$6;exports.FieldTags=_.FieldTags;exports.Loader=_.Loader;exports.LocationMarker=_._sfc_main$7;exports.Map=_.Map;exports.Marquee=_._sfc_main$27;exports.Popup=_._sfc_main$8;exports.Radio=_._sfc_main$9;exports.Select=_.Select;exports.SelectMulti=_.SelectMulti;exports.Shader=_._sfc_main$23;exports.Sidebar=_._sfc_main$24;exports.Slider=_._sfc_main$25;exports.Spoiler=_._sfc_main$10;exports.Status=_._sfc_main$26;exports.Tab=_._sfc_main$11;exports.Text=_._sfc_main$13;exports.Tooltip=_._sfc_main$12;exports.Upload=_.Upload;exports.UploadImage=_._sfc_main$14;exports.UploadImageMultiple=_._sfc_main$15;exports.default=_.main;
@@ -1,4 +1,4 @@
1
- import { _ as e, r as o, a as d, b as r, s as t, t as l, u as i, c as p, v as u, d as S, w as c, e as n, x as m, f as F, F as M, L as b, g, M as h, C as k, h as x, i as B, S as C, j as T, y as U, z as f, A as w, k as L, B as P, l as q, o as y, n as A, U as D, p as E, q as I, m as j } from "./main-BY2OvGB9.mjs";
1
+ import { _ as e, r as o, a as d, b as r, s as t, t as l, u as i, c as p, v as u, d as S, w as c, e as n, x as m, f as F, F as M, L as b, g, M as h, C as k, h as x, i as B, S as C, j as T, y as U, z as f, A as w, k as L, B as P, l as q, o as y, n as A, U as D, p as E, q as I, m as j } from "./main-DTHFR7H_.mjs";
2
2
  export {
3
3
  e as Address,
4
4
  o as Breadcrumbs,
@@ -74,7 +74,7 @@ var spot_model = (db) => {
74
74
  const controllerFactory$1 = (db) => {
75
75
  const Spot = db.spot;
76
76
  const readOne = (req, res) => {
77
- Spot.findOne({ _id: req.params._id }).populate("members.user").populate("subspots").then((spot) => {
77
+ Spot.findOne({ _id: req.params._id }).then((spot) => {
78
78
  if (!spot) {
79
79
  return res.status(404).send({ message: "Отдел не найден" });
80
80
  }
@@ -84,7 +84,7 @@ const controllerFactory$1 = (db) => {
84
84
  });
85
85
  };
86
86
  const read = (req, res) => {
87
- Spot.find({ organization: req.params._id }).populate("members.user").populate("subspots").then((spots) => {
87
+ Spot.find({ organization: req.params._id }).then((spots) => {
88
88
  if (!spots) {
89
89
  return res.status(404).send({ message: "Spots not found" });
90
90
  }
@@ -117,7 +117,7 @@ const controllerFactory$1 = (db) => {
117
117
  });
118
118
  };
119
119
  const deleteSpot = (req, res) => {
120
- Spot.findOneAndRemove({ _id: req.body._id, organization: req.params._id }).then((spot) => {
120
+ Spot.findOneAndDelete({ _id: req.body._id, organization: req.params._id }).then((spot) => {
121
121
  if (!spot) {
122
122
  return res.status(404).send({ message: "Spot not found" });
123
123
  }
@@ -73,7 +73,7 @@ var spot_model = (db) => {
73
73
  const controllerFactory$1 = (db) => {
74
74
  const Spot = db.spot;
75
75
  const readOne = (req, res) => {
76
- Spot.findOne({ _id: req.params._id }).populate("members.user").populate("subspots").then((spot) => {
76
+ Spot.findOne({ _id: req.params._id }).then((spot) => {
77
77
  if (!spot) {
78
78
  return res.status(404).send({ message: "Отдел не найден" });
79
79
  }
@@ -83,7 +83,7 @@ const controllerFactory$1 = (db) => {
83
83
  });
84
84
  };
85
85
  const read = (req, res) => {
86
- Spot.find({ organization: req.params._id }).populate("members.user").populate("subspots").then((spots) => {
86
+ Spot.find({ organization: req.params._id }).then((spots) => {
87
87
  if (!spots) {
88
88
  return res.status(404).send({ message: "Spots not found" });
89
89
  }
@@ -116,7 +116,7 @@ const controllerFactory$1 = (db) => {
116
116
  });
117
117
  };
118
118
  const deleteSpot = (req, res) => {
119
- Spot.findOneAndRemove({ _id: req.body._id, organization: req.params._id }).then((spot) => {
119
+ Spot.findOneAndDelete({ _id: req.body._id, organization: req.params._id }).then((spot) => {
120
120
  if (!spot) {
121
121
  return res.status(404).send({ message: "Spot not found" });
122
122
  }