@ozdao/prometheus-framework 0.2.63 → 0.2.64

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/dist/products.server.js +8 -1
  2. package/dist/products.server.mjs +8 -1
  3. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
  5. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
  7. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +20 -20
  9. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Select/Select.vue.js +97 -1
  11. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -97
  13. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  22. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  23. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  24. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  25. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  43. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +54 -48
  69. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +18 -18
  71. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +28 -33
  73. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +58 -44
  75. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +8 -8
  79. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  85. package/dist/style.css +1 -1
  86. package/package.json +1 -1
@@ -876,6 +876,9 @@ const controllerFactory$1 = (db) => {
876
876
  if (req.query.organization) {
877
877
  query.organization = new db.mongoose.Types.ObjectId(req.query.organization);
878
878
  }
879
+ if (req.query.type) {
880
+ query.type = req.query.type;
881
+ }
879
882
  console.log(query);
880
883
  const leftoveres = await Leftover.find(query, null, options).sort({ createdAt: "desc" }).exec();
881
884
  if (!leftoveres) {
@@ -889,17 +892,21 @@ const controllerFactory$1 = (db) => {
889
892
  };
890
893
  const create = async (req, res) => {
891
894
  try {
895
+ console.log(req.body);
892
896
  const leftover = await Leftover.create({
893
897
  organization: req.body.organization,
894
898
  type: req.body.type,
895
899
  order: req.body.order,
896
- positions: req.body.positions
900
+ positions: req.body.positions,
901
+ creator: req.body.creator,
902
+ owner: req.body.owner
897
903
  });
898
904
  if (!leftover) {
899
905
  return res.status(404).send({ message: "ERROR_CREATING_LEFTOVER" });
900
906
  }
901
907
  res.status(200).send(leftover);
902
908
  } catch (err) {
909
+ console.log(err);
903
910
  res.status(500).send({ message: "ERROR_CREATE_LEFTOVER" });
904
911
  }
905
912
  };
@@ -874,6 +874,9 @@ const controllerFactory$1 = (db) => {
874
874
  if (req.query.organization) {
875
875
  query.organization = new db.mongoose.Types.ObjectId(req.query.organization);
876
876
  }
877
+ if (req.query.type) {
878
+ query.type = req.query.type;
879
+ }
877
880
  console.log(query);
878
881
  const leftoveres = await Leftover.find(query, null, options).sort({ createdAt: "desc" }).exec();
879
882
  if (!leftoveres) {
@@ -887,17 +890,21 @@ const controllerFactory$1 = (db) => {
887
890
  };
888
891
  const create = async (req, res) => {
889
892
  try {
893
+ console.log(req.body);
890
894
  const leftover = await Leftover.create({
891
895
  organization: req.body.organization,
892
896
  type: req.body.type,
893
897
  order: req.body.order,
894
- positions: req.body.positions
898
+ positions: req.body.positions,
899
+ creator: req.body.creator,
900
+ owner: req.body.owner
895
901
  });
896
902
  if (!leftover) {
897
903
  return res.status(404).send({ message: "ERROR_CREATING_LEFTOVER" });
898
904
  }
899
905
  res.status(200).send(leftover);
900
906
  } catch (err) {
907
+ console.log(err);
901
908
  res.status(500).send({ message: "ERROR_CREATE_LEFTOVER" });
902
909
  }
903
910
  };
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue2.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),d={key:0},f={key:1},p={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=c.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(r,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(m=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.label.component),{class:e.normalizeClass(t.label.class)},null,8,["class"]))])):(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.label),1)),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:t.align==="left"?"0":"auto",right:t.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(r.$slots,"default",{},void 0,!0)],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}},v=u.default(p,[["__scopeId","data-v-542fc6b9"]]);exports.default=v;
@@ -1 +1,55 @@
1
-
1
+ import { ref as u, computed as f, withDirectives as i, openBlock as o, createElementBlock as l, withModifiers as m, createBlock as p, resolveDynamicComponent as v, normalizeClass as b, toDisplayString as g, createVNode as k, Transition as w, withCtx as y, createElementVNode as h, normalizeStyle as C, renderSlot as O, vShow as S, unref as D } from "vue";
2
+ import x from "../FieldPhone/click-outside.js";
3
+ import "./Dropdown.vue2.js";
4
+ import B from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const T = { key: 0 }, j = { key: 1 }, z = {
6
+ __name: "Dropdown",
7
+ props: {
8
+ label: {
9
+ type: [String, Object],
10
+ default: "Open"
11
+ },
12
+ align: {
13
+ type: String,
14
+ default: "left"
15
+ }
16
+ },
17
+ setup(e) {
18
+ let a = x;
19
+ const s = e, t = u(!1), r = f(() => typeof s.label == "object");
20
+ function c() {
21
+ t.value = !1;
22
+ }
23
+ return (d, n) => i((o(), l("div", {
24
+ class: "dropdown pos-relative",
25
+ onClick: n[0] || (n[0] = m((E) => t.value = !t.value, ["stop"]))
26
+ }, [
27
+ r.value ? (o(), l("div", T, [
28
+ (o(), p(v(e.label.component), {
29
+ class: b(e.label.class)
30
+ }, null, 8, ["class"]))
31
+ ])) : (o(), l("div", j, g(e.label), 1)),
32
+ k(w, {
33
+ name: "TransitionTranslateY",
34
+ mode: "out-in"
35
+ }, {
36
+ default: y(() => [
37
+ i(h("div", {
38
+ style: C({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
39
+ class: "dropdown-content w-15r radius-big"
40
+ }, [
41
+ O(d.$slots, "default", {}, void 0, !0)
42
+ ], 4), [
43
+ [S, t.value]
44
+ ])
45
+ ]),
46
+ _: 3
47
+ })
48
+ ])), [
49
+ [D(a), c]
50
+ ]);
51
+ }
52
+ }, I = /* @__PURE__ */ B(z, [["__scopeId", "data-v-542fc6b9"]]);
53
+ export {
54
+ I as default
55
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),d={key:0},f={key:1},p={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=c.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(r,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(m=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.label.component),{class:e.normalizeClass(t.label.class)},null,8,["class"]))])):(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.label),1)),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:t.align==="left"?"0":"auto",right:t.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(r.$slots,"default",{},void 0,!0)],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}},v=u.default(p,[["__scopeId","data-v-542fc6b9"]]);exports.default=v;
1
+ "use strict";
@@ -1,55 +1 @@
1
- import { ref as u, computed as f, withDirectives as i, openBlock as o, createElementBlock as l, withModifiers as m, createBlock as p, resolveDynamicComponent as v, normalizeClass as b, toDisplayString as g, createVNode as k, Transition as w, withCtx as y, createElementVNode as h, normalizeStyle as C, renderSlot as O, vShow as S, unref as D } from "vue";
2
- import x from "../FieldPhone/click-outside.js";
3
- import "./Dropdown.vue.js";
4
- import B from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const T = { key: 0 }, j = { key: 1 }, z = {
6
- __name: "Dropdown",
7
- props: {
8
- label: {
9
- type: [String, Object],
10
- default: "Open"
11
- },
12
- align: {
13
- type: String,
14
- default: "left"
15
- }
16
- },
17
- setup(e) {
18
- let a = x;
19
- const s = e, t = u(!1), r = f(() => typeof s.label == "object");
20
- function c() {
21
- t.value = !1;
22
- }
23
- return (d, n) => i((o(), l("div", {
24
- class: "dropdown pos-relative",
25
- onClick: n[0] || (n[0] = m((E) => t.value = !t.value, ["stop"]))
26
- }, [
27
- r.value ? (o(), l("div", T, [
28
- (o(), p(v(e.label.component), {
29
- class: b(e.label.class)
30
- }, null, 8, ["class"]))
31
- ])) : (o(), l("div", j, g(e.label), 1)),
32
- k(w, {
33
- name: "TransitionTranslateY",
34
- mode: "out-in"
35
- }, {
36
- default: y(() => [
37
- i(h("div", {
38
- style: C({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
39
- class: "dropdown-content w-15r radius-big"
40
- }, [
41
- O(d.$slots, "default", {}, void 0, !0)
42
- ], 4), [
43
- [S, t.value]
44
- ])
45
- ]),
46
- _: 3
47
- })
48
- ])), [
49
- [D(a), c]
50
- ]);
51
- }
52
- }, I = /* @__PURE__ */ B(z, [["__scopeId", "data-v-542fc6b9"]]);
53
- export {
54
- I as default
55
- };
1
+
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const g=require("../EmptyState/EmptyState.vue.cjs");require("vue-i18n");const h=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),k={__name:"Feed",props:{search:{type:Boolean,default:!1},showLoadMore:{type:Boolean,default:!0},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},setup(s){const a=s,r=e.ref([]),o=e.ref(!1);let i=e.ref(!0),u=e.ref(a.options.skip?a.options.skip:0),l=e.ref(a.options.limit?a.options.limit:10);const d=async()=>{if(o.value){u.value+=l.value;const t=await a.store.read({skip:u.value,limit:l.value,...a.options});t.length===0||t.length<l.value?o.value=!1:o.value=!0,r.value=[...r.value,...t]}},c=async()=>{const t=await a.store.read({skip:u.value,limit:l.value,...a.options});t.length===0||t.length<l.value?o.value=!1:o.value=!0,console.log(t),r.value=t,i.value=!1};e.watch(()=>a.options,(t,n)=>{(t.organization!==n.organization||t.categories!==n.categories||t.prices!==n.prices||t.delivery!==n.delivery||t.search!==n.search||t.status!==n.status||t.hidden!==n.hidden)&&c()},{deep:!0});function m(t){a.options.search=t,console.log(t),c()}return e.onMounted(async()=>{await c()}),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[s.search?(e.openBlock(),e.createBlock(h.default,{key:0,onSearch:m,placeholder:"Enter product name",class:"bg-white mn-b-thin"})):e.createCommentVNode("",!0)]),_:1}),e.unref(i)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(l),p=>(e.openBlock(),e.createBlock(f.default,{key:p}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(i)&&r.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,class:"pd-medium mn-b-thin bg-grey radius-big"},null,8,["title","description"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(i)&&r.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:r.value,user:t.user}):e.createCommentVNode("",!0),s.showLoadMore&&o.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"col-w-100 w-100 bg-main button"}," Load more ")):e.createCommentVNode("",!0)]),_:3},8,["class"])],64))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const g=require("../EmptyState/EmptyState.vue.cjs");require("vue-i18n");const h=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),k={__name:"Feed",props:{search:{type:Boolean,default:!1},showLoadMore:{type:Boolean,default:!0},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},setup(l){const a=l,n=e.ref([]),r=e.ref(!1);let i=e.ref(!0),u=e.ref(a.options.skip?a.options.skip:0),s=e.ref(a.options.limit?a.options.limit:10);const d=async()=>{if(r.value){u.value+=s.value;const t=await a.store.read({skip:u.value,limit:s.value,...a.options});t.length===0||t.length<s.value?r.value=!1:r.value=!0,n.value=[...n.value,...t]}},c=async()=>{const t=await a.store.read({skip:u.value,limit:s.value,...a.options});t.length===0||t.length<s.value?r.value=!1:r.value=!0,console.log(t),n.value=t,i.value=!1};e.watch(()=>a.options,(t,o)=>{(t.organization!==o.organization||t.categories!==o.categories||t.prices!==o.prices||t.delivery!==o.delivery||t.search!==o.search||t.status!==o.status||t.hidden!==o.hidden||t.type!==o.type)&&c()},{deep:!0});function m(t){a.options.search=t,console.log(t),c()}return e.onMounted(async()=>{await c()}),(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[l.search?(e.openBlock(),e.createBlock(h.default,{key:0,onSearch:m,placeholder:"Enter product name",class:"bg-white mn-b-thin"})):e.createCommentVNode("",!0)]),_:1}),e.unref(i)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(s),p=>(e.openBlock(),e.createBlock(f.default,{key:p}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(i)&&n.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:l.states.empty.title,description:l.states.empty.description,class:"pd-medium mn-b-thin bg-grey radius-big"},null,8,["title","description"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(i)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value,user:t.user}):e.createCommentVNode("",!0),l.showLoadMore&&r.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"col-w-100 w-100 bg-main button"}," Load more ")):e.createCommentVNode("",!0)]),_:3},8,["class"])],64))}};exports.default=k;
@@ -1,4 +1,4 @@
1
- import { ref as c, watch as T, onMounted as w, openBlock as n, createElementBlock as h, Fragment as k, createVNode as v, TransitionGroup as y, withCtx as d, createBlock as p, createCommentVNode as o, unref as m, renderList as B, Transition as M, normalizeClass as j, renderSlot as C } from "vue";
1
+ import { ref as c, watch as T, onMounted as B, openBlock as n, createElementBlock as h, Fragment as k, createVNode as v, TransitionGroup as y, withCtx as p, createBlock as d, createCommentVNode as o, unref as m, renderList as M, Transition as j, normalizeClass as w, renderSlot as C } from "vue";
2
2
  import O from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
3
3
  import "../Loader/Loader.vue.js";
4
4
  import $ from "../EmptyState/EmptyState.vue.js";
@@ -47,17 +47,17 @@ const q = {
47
47
  }
48
48
  },
49
49
  setup(r) {
50
- const t = r, i = c([]), a = c(!1);
50
+ const t = r, i = c([]), s = c(!1);
51
51
  let u = c(!0), f = c(t.options.skip ? t.options.skip : 0), l = c(t.options.limit ? t.options.limit : 10);
52
52
  const b = async () => {
53
- if (a.value) {
53
+ if (s.value) {
54
54
  f.value += l.value;
55
55
  const e = await t.store.read({
56
56
  skip: f.value,
57
57
  limit: l.value,
58
58
  ...t.options
59
59
  });
60
- e.length === 0 || e.length < l.value ? a.value = !1 : a.value = !0, i.value = [...i.value, ...e];
60
+ e.length === 0 || e.length < l.value ? s.value = !1 : s.value = !0, i.value = [...i.value, ...e];
61
61
  }
62
62
  }, g = async () => {
63
63
  const e = await t.store.read({
@@ -65,23 +65,23 @@ const q = {
65
65
  limit: l.value,
66
66
  ...t.options
67
67
  });
68
- e.length === 0 || e.length < l.value ? a.value = !1 : a.value = !0, console.log(e), i.value = e, u.value = !1;
68
+ e.length === 0 || e.length < l.value ? s.value = !1 : s.value = !0, console.log(e), i.value = e, u.value = !1;
69
69
  };
70
- T(() => t.options, (e, s) => {
71
- (e.organization !== s.organization || e.categories !== s.categories || e.prices !== s.prices || e.delivery !== s.delivery || e.search !== s.search || e.status !== s.status || e.hidden !== s.hidden) && g();
70
+ T(() => t.options, (e, a) => {
71
+ (e.organization !== a.organization || e.categories !== a.categories || e.prices !== a.prices || e.delivery !== a.delivery || e.search !== a.search || e.status !== a.status || e.hidden !== a.hidden || e.type !== a.type) && g();
72
72
  }, { deep: !0 });
73
73
  function L(e) {
74
74
  t.options.search = e, console.log(e), g();
75
75
  }
76
- return w(async () => {
76
+ return B(async () => {
77
77
  await g();
78
- }), (e, s) => (n(), h(k, null, [
78
+ }), (e, a) => (n(), h(k, null, [
79
79
  v(y, {
80
80
  tag: "ul",
81
81
  name: "scaleTransition"
82
82
  }, {
83
- default: d(() => [
84
- r.search ? (n(), p(z, {
83
+ default: p(() => [
84
+ r.search ? (n(), d(z, {
85
85
  key: 0,
86
86
  onSearch: L,
87
87
  placeholder: "Enter product name",
@@ -90,20 +90,20 @@ const q = {
90
90
  ]),
91
91
  _: 1
92
92
  }),
93
- m(u) ? (n(), p(y, {
93
+ m(u) ? (n(), d(y, {
94
94
  key: 0,
95
95
  tag: "ul",
96
96
  name: "scaleTransition",
97
97
  class: "o-hidden bg-grey radius-big"
98
98
  }, {
99
- default: d(() => [
100
- m(u) ? (n(!0), h(k, { key: 0 }, B(m(l), (S) => (n(), p(O, { key: S }))), 128)) : o("", !0)
99
+ default: p(() => [
100
+ m(u) ? (n(!0), h(k, { key: 0 }, M(m(l), (S) => (n(), d(O, { key: S }))), 128)) : o("", !0)
101
101
  ]),
102
102
  _: 1
103
103
  })) : o("", !0),
104
- v(M, { name: "scaleTransition" }, {
105
- default: d(() => [
106
- !m(u) && i.value.length < 1 ? (n(), p($, {
104
+ v(j, { name: "scaleTransition" }, {
105
+ default: p(() => [
106
+ !m(u) && i.value.length < 1 ? (n(), d($, {
107
107
  key: 0,
108
108
  title: r.states.empty.title,
109
109
  description: r.states.empty.description,
@@ -115,15 +115,15 @@ const q = {
115
115
  v(y, {
116
116
  tag: "ul",
117
117
  name: "scaleTransition",
118
- class: j(e.$attrs.class)
118
+ class: w(e.$attrs.class)
119
119
  }, {
120
- default: d(() => [
120
+ default: p(() => [
121
121
  !m(u) && i.value.length > 0 ? C(e.$slots, "default", {
122
122
  key: 0,
123
123
  items: i.value,
124
124
  user: e.user
125
125
  }) : o("", !0),
126
- r.showLoadMore && a.value && i.value.length > 0 ? (n(), h("button", {
126
+ r.showLoadMore && s.value && i.value.length > 0 ? (n(), h("button", {
127
127
  key: 1,
128
128
  onClick: b,
129
129
  class: "col-w-100 w-100 bg-main button"
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");require("./Select.vue2.cjs");const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},w={class:"w-100"},b=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,select:[String,Object],property:String,placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(o,{emit:m}){const i=m;let f=y.default;const t=o,n=e.ref(t.property?u(t.select,t.property,t.options):t.select),a=e.ref(!1);function v(){a.value=!1}function u(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}e.watch(()=>t.select,l=>{n.value=t.property?u(t.select,t.property,t.options):t.select});const k=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options),d=()=>{a.value=!a.value,i(a.value?"focus":"blur")},h=l=>{n.value=l,d(),t.property?i("update:select",n.value[t.property]):i("update:select",n.value)};return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(d,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[o.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(o.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",w,[e.createElementVNode("span",null,e.toDisplayString((c=n.value)!=null&&c.name?(s=n.value)==null?void 0:s.name:n.value||o.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([l.$attrs.class,"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),style:{"min-width":"max-content"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,r=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(V=>h(r),["stop"])},[r?(e.openBlock(),e.createElementBlock("span",S,e.toDisplayString(r.name||r),1)):e.createCommentVNode("",!0)],8,b))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),v]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[o.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(o.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-67f55841"]]);exports.default=E;
@@ -1 +1,97 @@
1
-
1
+ import { ref as y, watch as M, computed as N, openBlock as s, createElementBlock as n, Fragment as k, withDirectives as b, withModifiers as w, normalizeClass as _, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as g, Transition as S, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
2
+ import D from "../FieldPhone/click-outside.js";
3
+ import "./Select.vue2.js";
4
+ import E from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const L = {
6
+ key: 0,
7
+ class: "t-transp mn-r-small"
8
+ }, A = { class: "w-100" }, F = ["onClick"], I = {
9
+ key: 0,
10
+ class: "w-100"
11
+ }, P = {
12
+ key: 0,
13
+ class: "mn-t-thin invalid-feedback"
14
+ }, Y = {
15
+ __name: "Select",
16
+ props: {
17
+ label: String,
18
+ select: [String, Object],
19
+ property: String,
20
+ placeholder: { type: String, default: "Please select an item" },
21
+ options: { type: Array, default: () => [] },
22
+ validation: Boolean
23
+ },
24
+ emits: ["update:select", "focus", "blur"],
25
+ setup(o, { emit: C }) {
26
+ const p = C;
27
+ let O = D;
28
+ const e = o, l = y(e.property ? f(e.select, e.property, e.options) : e.select), i = y(!1);
29
+ function B() {
30
+ i.value = !1;
31
+ }
32
+ function f(t, h, c) {
33
+ for (const a of c)
34
+ if (a[h] === t || a === t)
35
+ return a;
36
+ return null;
37
+ }
38
+ M(() => e.select, (t) => {
39
+ l.value = e.property ? f(e.select, e.property, e.options) : e.select;
40
+ });
41
+ const V = N(() => e.select ? e.options.filter((t) => t !== e.select) : e.options), v = () => {
42
+ i.value = !i.value, p(i.value ? "focus" : "blur");
43
+ }, j = (t) => {
44
+ l.value = t, v(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
45
+ };
46
+ return (t, h) => {
47
+ var c, a;
48
+ return s(), n(k, null, [
49
+ b((s(), n("div", {
50
+ onClick: w(v, ["stop"]),
51
+ class: _([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
52
+ }, [
53
+ o.label ? (s(), n("div", L, [
54
+ u("span", null, d(o.label), 1)
55
+ ])) : m("", !0),
56
+ u("li", A, [
57
+ u("span", null, d((c = l.value) != null && c.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
58
+ ]),
59
+ g(S, {
60
+ mode: "out-in",
61
+ name: "TransitionTranslateY"
62
+ }, {
63
+ default: x(() => [
64
+ b(u("ul", {
65
+ class: _([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
66
+ style: { "min-width": "max-content" }
67
+ }, [
68
+ (s(!0), n(k, null, T(V.value, (r) => (s(), n("li", {
69
+ onClick: w((q) => j(r), ["stop"])
70
+ }, [
71
+ r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
72
+ ], 8, F))), 256))
73
+ ], 2), [
74
+ [$, i.value]
75
+ ])
76
+ ]),
77
+ _: 1
78
+ })
79
+ ], 2)), [
80
+ [z(O), B]
81
+ ]),
82
+ g(S, {
83
+ mode: "out-in",
84
+ name: "fade"
85
+ }, {
86
+ default: x(() => [
87
+ o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
88
+ ]),
89
+ _: 1
90
+ })
91
+ ], 64);
92
+ };
93
+ }
94
+ }, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-67f55841"]]);
95
+ export {
96
+ Q as default
97
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");require("./Select.vue.cjs");const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},w={class:"w-100"},b=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,select:[String,Object],property:String,placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(o,{emit:m}){const i=m;let f=y.default;const t=o,n=e.ref(t.property?u(t.select,t.property,t.options):t.select),a=e.ref(!1);function v(){a.value=!1}function u(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}e.watch(()=>t.select,l=>{n.value=t.property?u(t.select,t.property,t.options):t.select});const k=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options),d=()=>{a.value=!a.value,i(a.value?"focus":"blur")},h=l=>{n.value=l,d(),t.property?i("update:select",n.value[t.property]):i("update:select",n.value)};return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(d,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[o.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(o.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",w,[e.createElementVNode("span",null,e.toDisplayString((c=n.value)!=null&&c.name?(s=n.value)==null?void 0:s.name:n.value||o.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([l.$attrs.class,"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),style:{"min-width":"max-content"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,r=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(V=>h(r),["stop"])},[r?(e.openBlock(),e.createElementBlock("span",S,e.toDisplayString(r.name||r),1)):e.createCommentVNode("",!0)],8,b))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),v]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[o.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(o.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-67f55841"]]);exports.default=E;
1
+ "use strict";
@@ -1,97 +1 @@
1
- import { ref as y, watch as M, computed as N, openBlock as s, createElementBlock as n, Fragment as k, withDirectives as b, withModifiers as w, normalizeClass as _, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as g, Transition as S, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
2
- import D from "../FieldPhone/click-outside.js";
3
- import "./Select.vue.js";
4
- import E from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const L = {
6
- key: 0,
7
- class: "t-transp mn-r-small"
8
- }, A = { class: "w-100" }, F = ["onClick"], I = {
9
- key: 0,
10
- class: "w-100"
11
- }, P = {
12
- key: 0,
13
- class: "mn-t-thin invalid-feedback"
14
- }, Y = {
15
- __name: "Select",
16
- props: {
17
- label: String,
18
- select: [String, Object],
19
- property: String,
20
- placeholder: { type: String, default: "Please select an item" },
21
- options: { type: Array, default: () => [] },
22
- validation: Boolean
23
- },
24
- emits: ["update:select", "focus", "blur"],
25
- setup(o, { emit: C }) {
26
- const p = C;
27
- let O = D;
28
- const e = o, l = y(e.property ? f(e.select, e.property, e.options) : e.select), i = y(!1);
29
- function B() {
30
- i.value = !1;
31
- }
32
- function f(t, h, c) {
33
- for (const a of c)
34
- if (a[h] === t || a === t)
35
- return a;
36
- return null;
37
- }
38
- M(() => e.select, (t) => {
39
- l.value = e.property ? f(e.select, e.property, e.options) : e.select;
40
- });
41
- const V = N(() => e.select ? e.options.filter((t) => t !== e.select) : e.options), v = () => {
42
- i.value = !i.value, p(i.value ? "focus" : "blur");
43
- }, j = (t) => {
44
- l.value = t, v(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
45
- };
46
- return (t, h) => {
47
- var c, a;
48
- return s(), n(k, null, [
49
- b((s(), n("div", {
50
- onClick: w(v, ["stop"]),
51
- class: _([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
52
- }, [
53
- o.label ? (s(), n("div", L, [
54
- u("span", null, d(o.label), 1)
55
- ])) : m("", !0),
56
- u("li", A, [
57
- u("span", null, d((c = l.value) != null && c.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
58
- ]),
59
- g(S, {
60
- mode: "out-in",
61
- name: "TransitionTranslateY"
62
- }, {
63
- default: x(() => [
64
- b(u("ul", {
65
- class: _([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
66
- style: { "min-width": "max-content" }
67
- }, [
68
- (s(!0), n(k, null, T(V.value, (r) => (s(), n("li", {
69
- onClick: w((q) => j(r), ["stop"])
70
- }, [
71
- r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
72
- ], 8, F))), 256))
73
- ], 2), [
74
- [$, i.value]
75
- ])
76
- ]),
77
- _: 1
78
- })
79
- ], 2)), [
80
- [z(O), B]
81
- ]),
82
- g(S, {
83
- mode: "out-in",
84
- name: "fade"
85
- }, {
86
- default: x(() => [
87
- o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
88
- ]),
89
- _: 1
90
- })
91
- ], 64);
92
- };
93
- }
94
- }, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-67f55841"]]);
95
- export {
96
- Q as default
97
- };
1
+
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../../mobile/components/Menu/Menu.vue.cjs"),s=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const u=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const l={class:""},i=e.createElementVNode("h1",null,"Welcome to Backoffice",-1),d=e.createElementVNode("span",null," Members ",-1),f=e.createElementVNode("span",null," Events ",-1),c=e.createElementVNode("span",null," Community ",-1),p=e.createElementVNode("span",null," Products ",-1),m=e.createElementVNode("span",null," Leftovers ",-1),_=e.createElementVNode("span",null," Orders ",-1),C=e.createElementVNode("span",null," Payments ",-1),N=e.createElementVNode("span",null," Organizations ",-1),V=e.createElementVNode("span",null," Gallery ",-1),k=e.createElementVNode("span",null," Reports ",-1),v={__name:"Dashboard",props:{favorites:Array},setup(h){const r=u.useRoute(),n=u.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(E,t)=>(e.openBlock(),e.createElementBlock("div",l,[i,e.createVNode(o.default,{class:"bg-grey mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[0]||(t[0]=a=>e.unref(n).push({name:"Organization Members",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(s.default,{onClick:t[1]||(t[1]=a=>e.unref(n).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(s.default,{onClick:t[2]||(t[2]=a=>e.unref(n).push({name:"Backoffice Community",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(s.default,{onClick:t[3]||(t[3]=a=>e.unref(n).push({name:"Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(s.default,{onClick:t[4]||(t[4]=a=>e.unref(n).push({name:"Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(s.default,{onClick:t[5]||(t[5]=a=>e.unref(n).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(s.default,{onClick:t[6]||(t[6]=a=>e.unref(n).push({name:"Backoffice Payments",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1})]),_:1}),e.createVNode(o.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[7]||(t[7]=a=>e.unref(n).push({name:"Backoffice Organizations",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1}),e.createVNode(s.default,{onClick:t[8]||(t[8]=a=>e.unref(n).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[V]),_:1}),e.createVNode(s.default,{onClick:t[9]||(t[9]=a=>e.unref(n).push({name:"Backoffice Reports",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1})]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../../mobile/components/Menu/Menu.vue2.cjs"),s=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const u=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const l={class:""},i=e.createElementVNode("h1",null,"Welcome to Backoffice",-1),d=e.createElementVNode("span",null," Members ",-1),f=e.createElementVNode("span",null," Events ",-1),c=e.createElementVNode("span",null," Community ",-1),p=e.createElementVNode("span",null," Products ",-1),m=e.createElementVNode("span",null," Leftovers ",-1),_=e.createElementVNode("span",null," Orders ",-1),C=e.createElementVNode("span",null," Payments ",-1),N=e.createElementVNode("span",null," Organizations ",-1),V=e.createElementVNode("span",null," Gallery ",-1),k=e.createElementVNode("span",null," Reports ",-1),v={__name:"Dashboard",props:{favorites:Array},setup(h){const r=u.useRoute(),n=u.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(E,t)=>(e.openBlock(),e.createElementBlock("div",l,[i,e.createVNode(o.default,{class:"bg-grey mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[0]||(t[0]=a=>e.unref(n).push({name:"Organization Members",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(s.default,{onClick:t[1]||(t[1]=a=>e.unref(n).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(s.default,{onClick:t[2]||(t[2]=a=>e.unref(n).push({name:"Backoffice Community",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(s.default,{onClick:t[3]||(t[3]=a=>e.unref(n).push({name:"Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(s.default,{onClick:t[4]||(t[4]=a=>e.unref(n).push({name:"Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(s.default,{onClick:t[5]||(t[5]=a=>e.unref(n).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(s.default,{onClick:t[6]||(t[6]=a=>e.unref(n).push({name:"Backoffice Payments",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1})]),_:1}),e.createVNode(o.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[7]||(t[7]=a=>e.unref(n).push({name:"Backoffice Organizations",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1}),e.createVNode(s.default,{onClick:t[8]||(t[8]=a=>e.unref(n).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[V]),_:1}),e.createVNode(s.default,{onClick:t[9]||(t[9]=a=>e.unref(n).push({name:"Backoffice Reports",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1})]),_:1})]))}};exports.default=v;
@@ -1,5 +1,5 @@
1
1
  import { ref as p, onMounted as m, openBlock as d, createElementBlock as _, createVNode as o, withCtx as n, unref as e, createElementVNode as t } from "vue";
2
- import u from "../../../mobile/components/Menu/Menu.vue.js";
2
+ import u from "../../../mobile/components/Menu/Menu.vue2.js";
3
3
  import i from "../../../mobile/components/Menu/MenuItem.vue.js";
4
4
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
5
5
  import { useRoute as f, useRouter as c } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),_=require("../../../icons/entities/IconRecent.vue.cjs"),w=require("../../../icons/entities/IconFollowing.vue.cjs"),m=require("../../store/blogposts.cjs"),l=require("../../../auth/store/auth.cjs"),c=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-grey radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-small"},"Topics for ",-1),q={class:"align-self-start bg-grey radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=d.useRoute(),a=d.useRouter(),p=({membership:u,status:r,target:s},i,t)=>{k.mutations.handleMembershipUpdate(c.state.current,u,r,s,i,t)};return(u,r)=>{const s=e.resolveComponent("router-link"),i=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:r[0]||(r[0]=t=>e.unref(a).push({name:"Blog",params:{category:"featured"}}))},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[1]||(r[1]=t=>e.unref(a).push({name:"Blog",params:{category:"popular"}}))},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[2]||(r[2]=t=>e.unref(a).push({name:"Blog",params:{category:"new"}}))},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),l.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[3]||(r[3]=t=>e.unref(a).push({name:"Blog",params:{category:"following"}}))},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(s,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h2",y,[B,e.createVNode(f.default,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":r[4]||(r[4]=t=>m.state.filter.period=t),placeholder:"Select type",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h2 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(i,null,{default:e.withCtx(({Component:t,route:n})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{ref:"page",key:n.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,l.state.user._id?(e.openBlock(),e.createBlock(s,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:t=>c.actions.read(t),state:c.state},options:{user:l.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(h.default,{key:n._id,organization:n,user:l.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["states","store","options"])]),_:1})])])}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router"),f=require("../../../../components/Select/Select.vue.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),_=require("../../../icons/entities/IconRecent.vue.cjs"),w=require("../../../icons/entities/IconFollowing.vue.cjs"),m=require("../../store/blogposts.cjs"),l=require("../../../auth/store/auth.cjs"),c=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-grey radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-small"},"Topics for ",-1),q={class:"align-self-start bg-grey radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=d.useRoute(),a=d.useRouter(),p=({membership:u,status:r,target:s},i,t)=>{k.mutations.handleMembershipUpdate(c.state.current,u,r,s,i,t)};return(u,r)=>{const s=e.resolveComponent("router-link"),i=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:r[0]||(r[0]=t=>e.unref(a).push({name:"Blog",params:{category:"featured"}}))},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[1]||(r[1]=t=>e.unref(a).push({name:"Blog",params:{category:"popular"}}))},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[2]||(r[2]=t=>e.unref(a).push({name:"Blog",params:{category:"new"}}))},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),l.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[3]||(r[3]=t=>e.unref(a).push({name:"Blog",params:{category:"following"}}))},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(s,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h2",y,[B,e.createVNode(f.default,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":r[4]||(r[4]=t=>m.state.filter.period=t),placeholder:"Select type",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h2 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(i,null,{default:e.withCtx(({Component:t,route:n})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{ref:"page",key:n.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,l.state.user._id?(e.openBlock(),e.createBlock(s,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:t=>c.actions.read(t),state:c.state},options:{user:l.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(h.default,{key:n._id,organization:n,user:l.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["states","store","options"])]),_:1})])])}}};exports.default=T;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as b, openBlock as a, createElementBlock as g, createElementVNode as r, normalizeClass as d, unref as o, createVNode as s, createTextVNode as i, createCommentVNode as x, withCtx as n, Transition as w, createBlock as _, resolveDynamicComponent as C, Fragment as $, renderList as B } from "vue";
2
2
  import { useRoute as F, useRouter as z } from "vue-router";
3
- import N from "../../../../components/Select/Select.vue2.js";
3
+ import N from "../../../../components/Select/Select.vue.js";
4
4
  import P from "../../../../components/Feed/Feed.vue.js";
5
5
  import M from "../../../organizations/components/blocks/CardOrganization.vue.js";
6
6
  import R from "../../../icons/entities/IconFeatured.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Upload/Upload.vue2.cjs");const _=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");require("./Community.vue2.cjs");const v=r=>(e.pushScopeId("data-v-bdf0e48a"),r=r(),e.popScopeId(),r),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},y=["onClick"],C=["onClick"],q={__name:"Community",async setup(r){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>l.read()),await s,c(),console.log(l.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await l.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?l.state.all:l.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const n=t.blocks.find(o=>o.type.name==="ImageUpload");if(n)return n.content}return null}),(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,y),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,C)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(q,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Upload/Upload.vue2.cjs");const _=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");require("./Community.vue2.cjs");const v=r=>(e.pushScopeId("data-v-bdf0e48a"),r=r(),e.popScopeId(),r),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},y=["onClick"],C=["onClick"],q={__name:"Community",async setup(r){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>l.read()),await s,c(),console.log(l.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await l.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?l.state.all:l.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const n=t.blocks.find(o=>o.type.name==="ImageUpload");if(n)return n.content}return null}),(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,y),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,C)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(q,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { withAsyncContext as h, ref as u, computed as d, openBlock as l, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
2
  import "../../../../components/Field/Field.vue2.js";
3
3
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- import "../../../../components/Select/Select.vue.js";
4
+ import "../../../../components/Select/Select.vue2.js";
5
5
  import "../../../../components/Button/Button.vue2.js";
6
6
  import "../../../../components/Upload/Upload.vue2.js";
7
7
  import $ from "../blocks/CardBlogpost.vue.js";