@ozdao/prometheus-framework 0.2.51 → 0.2.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/main-0a2437f4.js +91 -0
  2. package/dist/main-482dc398.mjs +13626 -0
  3. package/dist/main-4fnApBsF.js +91 -0
  4. package/dist/main-b2JI9sFg.js +91 -0
  5. package/dist/main-c56d4c09.js +91 -0
  6. package/dist/main-cdd0be68.mjs +13628 -0
  7. package/dist/main-kjbLXQEa.mjs +13606 -0
  8. package/dist/main-x-9D8zvb.mjs +13604 -0
  9. package/dist/main.css +1 -1
  10. package/dist/organizations.server.js +2 -2
  11. package/dist/organizations.server.mjs +2 -2
  12. package/dist/products.server.js +81 -56
  13. package/dist/products.server.mjs +81 -56
  14. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +18 -20
  16. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +19 -19
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +28 -26
  20. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
  22. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
  24. package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
  26. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  28. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
  29. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
  30. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
  32. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
  33. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
  34. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  38. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  40. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
  43. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
  45. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -48
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
  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 +131 -126
  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 +117 -146
  55. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
  57. package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +22 -0
  59. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -0
  60. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +45 -0
  61. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.js +4 -0
  63. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +79 -0
  65. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -0
  66. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +193 -0
  67. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.js +4 -0
  69. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +43 -43
  71. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +65 -55
  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 +64 -51
  75. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +35 -33
  77. package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/products.client.js +2 -2
  79. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/store/categories.js +39 -27
  81. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
  83. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  87. package/dist/prometheus-framework.cjs.js +1 -1
  88. package/dist/prometheus-framework.es.js +1 -1
  89. package/dist/style.css +1 -1
  90. package/dist/web-0066fd51.mjs +55 -0
  91. package/dist/web-6b9fa713.js +1 -0
  92. package/dist/web-6dcbb74b.mjs +55 -0
  93. package/dist/web-caJAdsxy.js +1 -0
  94. package/dist/web-ee302c1d.js +1 -0
  95. package/dist/web-i08OVMw9.mjs +55 -0
  96. package/dist/web-ngl7bNhF.js +1 -0
  97. package/dist/web-t91TrxXa.mjs +55 -0
  98. package/package.json +1 -1
  99. package/src/components/Button/Button.vue +4 -6
  100. package/src/components/Feed/Feed.vue +2 -1
  101. package/src/components/Field/Field.vue +3 -1
  102. package/src/components/LocationMarker/LocationMarker.vue +1 -0
  103. package/src/modules/applications/applications.client.js +0 -1
  104. package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
  105. package/src/modules/icons/entities/IconProfile.vue +10 -1
  106. package/src/modules/icons/entities/IconShopcart.vue +12 -2
  107. package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
  108. package/src/modules/marketplace/components/sections/Filters.vue +7 -1
  109. package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +27 -7
  110. package/src/modules/orders/components/partials/ShopCart.vue +4 -1
  111. package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
  112. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
  113. package/src/modules/organizations/components/blocks/User.vue +18 -9
  114. package/src/modules/organizations/components/pages/Department.vue +19 -3
  115. package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
  116. package/src/modules/organizations/components/pages/Organization.vue +38 -71
  117. package/src/modules/organizations/components/sections/Feed.vue +1 -1
  118. package/src/modules/organizations/controllers/memberships.controller.js +2 -2
  119. package/src/modules/organizations/controllers/organizations.controller.js +0 -1
  120. package/src/modules/organizations/router/products.router.js +24 -4
  121. package/src/modules/products/components/blocks/CardCategory.vue +53 -0
  122. package/src/modules/products/components/pages/Categories.vue +90 -0
  123. package/src/modules/products/components/pages/CategoryEdit.vue +214 -0
  124. package/src/modules/products/components/pages/EditLeftover.vue +6 -4
  125. package/src/modules/products/components/pages/ProductEdit.vue +9 -1
  126. package/src/modules/products/components/pages/Products.vue +58 -38
  127. package/src/modules/products/components/sections/FilterProducts.vue +9 -6
  128. package/src/modules/products/controllers/categories.controller.js +30 -13
  129. package/src/modules/products/controllers/leftovers.controller.js +12 -5
  130. package/src/modules/products/controllers/products.controller.js +18 -0
  131. package/src/modules/products/models/category.model.js +42 -32
  132. package/src/modules/products/products.client.js +4 -2
  133. package/src/modules/products/store/categories.js +17 -3
  134. package/src/modules/products/store/products.js +4 -0
  135. package/src/modules/backoffice/components/admin/Categories.vue +0 -53
  136. package/src/modules/backoffice/components/admin/CategoryEdit.vue +0 -98
  137. package/src/modules/products/components/blocks/CategoryCard.vue +0 -42
  138. package/src/modules/products/router/products.router.js +0 -48
  139. /package/src/modules/{products → organizations}/components/pages/OrganizationCreate.vue +0 -0
  140. /package/src/modules/{products → organizations}/components/pages/OrganizationDetails.vue +0 -0
  141. /package/src/modules/{products → organizations}/components/pages/OrganizationDocuments.vue +0 -0
  142. /package/src/modules/{products → organizations}/components/pages/OrganizationPeople.vue +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
@@ -5,7 +5,7 @@ import "vue-i18n";
5
5
  import S from "../../../../components/Tab/Tab.vue2.js";
6
6
  import "../../../../components/Tooltip/Tooltip.vue2.js";
7
7
  import z from "../sections/MembersAdd.vue.js";
8
- import "../../../mobile/components/Menu/Menu.vue2.js";
8
+ import "../../../mobile/components/Menu/Menu.vue.js";
9
9
  import "../../../mobile/components/Menu/MenuItem.vue.js";
10
10
  import B from "../blocks/User.vue.js";
11
11
  import { state as E } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Block/Block.vue.cjs"),_=require("../../../../components/Feed/Feed.vue.cjs"),g=require("../../../mobile/components/Menu/Menu.vue.cjs"),h=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");const v=require("../blocks/User.vue.cjs"),y=require("../blocks/CardDepartment.vue.cjs"),N=require("../../../events/components/sections/Feed.vue.cjs"),q=require("../../../community/components/sections/Feed.vue.cjs"),w=require("../../../spots/components/blocks/CardSpot.vue.cjs"),B=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),V=require("../../store/memberships.cjs"),x=require("../../store/departments.cjs"),z=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const E={key:0,class:"pd-thin for-transition w-100"},M={class:"cols-2 pd-medium bg-grey radius-bg"},T={class:"pos-relative"},F={key:0},O={__name:"Organization",setup($){const c=p.useRouter(),t=p.useRoute();let b=t.query.tab?t.query.tab:"products";const m=e.ref(null);e.onMounted(async()=>{m.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await V.actions.read(t.params._id)});const o=e.ref(b);return t.query.tab=o.value,e.watch(o,u=>{c.replace({query:{...t.query,tab:u}})}),(u,n)=>{const l=e.resolveComponent("router-link");return m.value?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(B.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(g.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(h.default,{onClick:n[0]||(n[0]=r=>e.unref(c).push({name:"Organization Members",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer",theme:"black"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.state.current.numberOfMembers)+" members ",1)]),_:1})]),_:1}),e.createElementVNode("div",M,[e.createVNode(f.default,{title:"Departments",actions:[{label:"+",function:()=>u.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}]},{default:e.withCtx(()=>[e.createVNode(_.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:r=>x.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(i,d)=>(e.openBlock(),e.createBlock(y.default,{key:d,department:i,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["actions"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.current.memberships,(r,i)=>(e.openBlock(),e.createBlock(v.default,{key:i,user:r,position:r.position,class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","position"]))),128))])]),e.createVNode(k.default,{selected:o.value,"onUpdate:selected":n[1]||(n[1]=r=>o.value=r),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="community"?(e.openBlock(),e.createBlock(q.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="events"?(e.openBlock(),e.createBlock(N.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),o.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(f.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(l,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(l,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(l,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="spots"?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(_.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:r=>z.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(i,d)=>(e.openBlock(),e.createBlock(w.default,{key:d,spot:i,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[2]||(n[2]=r=>u.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;
@@ -1,126 +1,97 @@
1
- import { ref as z, onMounted as M, watch as N, resolveComponent as q, openBlock as r, createElementBlock as p, createVNode as t, withCtx as a, unref as o, createElementVNode as f, toDisplayString as B, Fragment as y, renderList as h, createBlock as m, Transition as b, createCommentVNode as l, createTextVNode as k } from "vue";
2
- import { useRouter as D, useRoute as P } from "vue-router";
1
+ import { ref as h, onMounted as N, watch as O, resolveComponent as B, openBlock as r, createElementBlock as d, createVNode as t, unref as s, withCtx as a, Fragment as k, renderList as w, createBlock as l, createElementVNode as M, Transition as c, createCommentVNode as m, createTextVNode as g } from "vue";
2
+ import { useRouter as V, useRoute as q } from "vue-router";
3
3
  import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
- import S from "../../../../components/Tab/Tab.vue2.js";
7
- import C from "../../../../components/Block/Block.vue.js";
8
- import x from "../../../../components/Feed/Feed.vue.js";
9
- import V from "../../../mobile/components/Menu/Menu.vue.js";
10
- import A from "../../../mobile/components/Menu/MenuItem.vue.js";
6
+ import P from "../../../../components/Tab/Tab.vue2.js";
7
+ import $ from "../../../../components/Block/Block.vue.js";
8
+ import z from "../../../../components/Feed/Feed.vue.js";
9
+ import "../../../mobile/components/Menu/Menu.vue.js";
10
+ import "../../../mobile/components/Menu/MenuItem.vue.js";
11
11
  import "../blocks/DepartmentSub.vue2.js";
12
- import E from "../blocks/User.vue.js";
13
- import F from "../blocks/CardDepartment.vue.js";
14
- import L from "../../../events/components/sections/Feed.vue.js";
15
- import R from "../../../community/components/sections/Feed.vue.js";
16
- import T from "../../../spots/components/blocks/CardSpot.vue.js";
17
- import U from "../sections/DetailsTab.vue.js";
18
- import G from "../../../products/components/pages/Products.vue.js";
19
- import { state as u } from "../../../auth/store/auth.js";
20
- import { actions as I, state as i } from "../../store/organizations.js";
21
- import { actions as j } from "../../store/memberships.js";
22
- import { actions as H } from "../../store/departments.js";
23
- import { actions as J } from "../../../spots/store/spots.js";
12
+ import "../blocks/User.vue2.js";
13
+ import A from "../blocks/CardDepartment.vue.js";
14
+ import D from "../../../events/components/sections/Feed.vue.js";
15
+ import E from "../../../community/components/sections/Feed.vue.js";
16
+ import F from "../../../spots/components/blocks/CardSpot.vue.js";
17
+ import S from "../sections/DetailsTab.vue.js";
18
+ import L from "../../../products/components/pages/Products.vue.js";
19
+ import { state as i } from "../../../auth/store/auth.js";
20
+ import { actions as R, state as u } from "../../store/organizations.js";
21
+ import { actions as T } from "../../store/memberships.js";
22
+ import { actions as G } from "../../store/departments.js";
23
+ import { actions as I } from "../../../spots/store/spots.js";
24
24
  import "./Organization.vue2.js";
25
- const K = {
25
+ const U = {
26
26
  key: 0,
27
27
  class: "pd-thin for-transition w-100"
28
- }, Q = { class: "cols-2 pd-medium bg-grey radius-bg" }, W = { class: "pos-relative" }, X = { key: 0 }, we = {
28
+ }, j = { class: "pos-relative" }, H = { key: 0 }, ge = {
29
29
  __name: "Organization",
30
- setup(Y) {
31
- const $ = D(), e = P();
32
- let O = e.query.tab ? e.query.tab : "products";
33
- const w = z(null);
34
- M(async () => {
35
- w.value = await I.read({
30
+ setup(J) {
31
+ const C = V(), e = q();
32
+ let x = e.query.tab ? e.query.tab : "products";
33
+ const y = h(null);
34
+ N(async () => {
35
+ y.value = await R.read({
36
36
  _id: e.params._id,
37
- user: u.user._id
38
- }), await j.read(e.params._id);
37
+ user: i.user._id
38
+ }), await T.read(e.params._id);
39
39
  });
40
- const n = z(O);
41
- return e.query.tab = n.value, N(n, (_) => {
42
- $.replace({ query: { ...e.query, tab: _ } });
43
- }), (_, d) => {
44
- const g = q("router-link");
45
- return w.value ? (r(), p("div", K, [
46
- t(U, {
47
- organization: i.current,
48
- user: u.user,
40
+ const o = h(x);
41
+ return e.query.tab = o.value, O(o, (_) => {
42
+ C.replace({ query: null });
43
+ }), (_, p) => {
44
+ const f = B("router-link");
45
+ return y.value ? (r(), d("div", U, [
46
+ t(S, {
47
+ organization: u.current,
48
+ user: i.user,
49
49
  class: "mn-b-semi"
50
50
  }, null, 8, ["organization", "user"]),
51
- t(V, { class: "mn-b-regular bg-grey" }, {
51
+ t($, {
52
+ title: `${u.current.numberOfMembers} members`,
53
+ actions: [{
54
+ label: ">",
55
+ function: () => _.$router.push(`/organizations/${s(e).params._id}/departments/create`)
56
+ }],
57
+ class: "mn-b-semi"
58
+ }, {
52
59
  default: a(() => [
53
- t(A, {
54
- onClick: d[0] || (d[0] = (s) => o($).push({
55
- name: "Organization Members",
56
- params: {
57
- _id: o(e).params._id
60
+ t(z, {
61
+ states: {
62
+ empty: {
63
+ title: "No Departments Found",
64
+ description: "Currently, there are no departments available."
58
65
  }
59
- })),
60
- class: "cursor-pointer",
61
- theme: "black"
66
+ },
67
+ store: {
68
+ read: (n) => G.read(s(e).params._id),
69
+ state: null
70
+ },
71
+ options: {
72
+ user: i.user._id,
73
+ sort: "numberOfMemberships",
74
+ limit: 10
75
+ }
62
76
  }, {
63
- default: a(() => [
64
- f("span", null, B(i.current.numberOfMembers) + " members ", 1)
77
+ default: a(({
78
+ items: n
79
+ }) => [
80
+ (r(!0), d(k, null, w(n, (b, v) => (r(), l(A, {
81
+ key: v,
82
+ department: b,
83
+ organization: s(e).params._id,
84
+ class: "radius-big bg-white pos-relative mn-b-thin"
85
+ }, null, 8, ["department", "organization"]))), 128))
65
86
  ]),
66
87
  _: 1
67
- })
88
+ }, 8, ["states", "store", "options"])
68
89
  ]),
69
90
  _: 1
70
- }),
71
- f("div", Q, [
72
- t(C, {
73
- title: "Departments",
74
- actions: [{
75
- label: "+",
76
- function: () => _.$router.push(`/organizations/${o(e).params._id}/departments/create`)
77
- }]
78
- }, {
79
- default: a(() => [
80
- t(x, {
81
- states: {
82
- empty: {
83
- title: "No Departments Found",
84
- description: "Currently, there are no departments available."
85
- }
86
- },
87
- store: {
88
- read: (s) => H.read(o(e).params._id),
89
- state: null
90
- },
91
- options: {
92
- user: u.user._id,
93
- sort: "numberOfMemberships",
94
- limit: 10
95
- }
96
- }, {
97
- default: a(({
98
- items: s
99
- }) => [
100
- (r(!0), p(y, null, h(s, (c, v) => (r(), m(F, {
101
- key: v,
102
- department: c,
103
- organization: o(e).params._id,
104
- class: "radius-big bg-white pos-relative mn-b-thin"
105
- }, null, 8, ["department", "organization"]))), 128))
106
- ]),
107
- _: 1
108
- }, 8, ["states", "store", "options"])
109
- ]),
110
- _: 1
111
- }, 8, ["actions"]),
112
- f("div", null, [
113
- (r(!0), p(y, null, h(i.current.memberships, (s, c) => (r(), m(E, {
114
- key: c,
115
- user: s,
116
- position: s.position,
117
- class: "bg-grey radius-small flex-nowrap flex pd-medium"
118
- }, null, 8, ["user", "position"]))), 128))
119
- ])
120
- ]),
121
- t(S, {
122
- selected: n.value,
123
- "onUpdate:selected": d[1] || (d[1] = (s) => n.value = s),
91
+ }, 8, ["title", "actions"]),
92
+ t(P, {
93
+ selected: o.value,
94
+ "onUpdate:selected": p[0] || (p[0] = (n) => o.value = n),
124
95
  tabs: [
125
96
  { name: "Community", value: "community" },
126
97
  { name: "Menu", value: "products" },
@@ -129,92 +100,92 @@ const K = {
129
100
  ],
130
101
  class: "mn-b-small o-hidden h5 radius-big bg-grey"
131
102
  }, null, 8, ["selected"]),
132
- f("div", W, [
133
- t(b, { name: "slide-fade" }, {
103
+ M("div", j, [
104
+ t(c, { name: "slide-fade" }, {
134
105
  default: a(() => [
135
- n.value === "community" ? (r(), m(R, {
106
+ o.value === "community" ? (r(), l(E, {
136
107
  key: 0,
137
- user: u.user._id,
138
- owner: o(e).params._id
139
- }, null, 8, ["user", "owner"])) : l("", !0)
108
+ user: i.user._id,
109
+ owner: s(e).params._id
110
+ }, null, 8, ["user", "owner"])) : m("", !0)
140
111
  ]),
141
112
  _: 1
142
113
  }),
143
- t(b, { name: "slide-fade" }, {
114
+ t(c, { name: "slide-fade" }, {
144
115
  default: a(() => [
145
- n.value === "events" ? (r(), m(L, {
116
+ o.value === "events" ? (r(), l(D, {
146
117
  key: 0,
147
- user: u.user._id,
148
- owner: o(e).params._id,
118
+ user: i.user._id,
119
+ owner: s(e).params._id,
149
120
  sortOrder: "desc",
150
121
  sortParam: "date.start"
151
- }, null, 8, ["user", "owner", "sortParam"])) : l("", !0)
122
+ }, null, 8, ["user", "owner", "sortParam"])) : m("", !0)
152
123
  ]),
153
124
  _: 1
154
125
  }),
155
- n.value === "products" && u.user._id === i.current.owner ? (r(), m(C, {
126
+ o.value === "products" && i.user._id === u.current.owner ? (r(), l($, {
156
127
  key: 0,
157
128
  class: "flex-nowrap gap-thin mn-b-small flex"
158
129
  }, {
159
130
  default: a(() => [
160
- t(g, {
131
+ t(f, {
161
132
  class: "bg-black t-white uppercase t-semi pd-thin radius-extra",
162
133
  to: {
163
134
  name: "ProductAdd",
164
135
  params: {
165
- _id: o(e).params._id
136
+ _id: s(e).params._id
166
137
  }
167
138
  }
168
139
  }, {
169
140
  default: a(() => [
170
- k(" Add Product ")
141
+ g(" Add Product ")
171
142
  ]),
172
143
  _: 1
173
144
  }, 8, ["to"]),
174
- t(g, {
145
+ t(f, {
175
146
  class: "uppercase t-semi pd-thin radius-extra",
176
147
  to: {
177
148
  name: "Leftovers",
178
149
  params: {
179
- _id: o(e).params._id
150
+ _id: s(e).params._id
180
151
  }
181
152
  }
182
153
  }, {
183
154
  default: a(() => [
184
- k(" Change Invetory ")
155
+ g(" Change Invetory ")
185
156
  ]),
186
157
  _: 1
187
158
  }, 8, ["to"]),
188
- t(g, {
159
+ t(f, {
189
160
  class: "d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",
190
161
  to: {
191
162
  name: "Backoffice",
192
163
  params: {
193
- _id: o(e).params._id
164
+ _id: s(e).params._id
194
165
  }
195
166
  }
196
167
  }, {
197
168
  default: a(() => [
198
- k(" Go to Backoffice ")
169
+ g(" Go to Backoffice ")
199
170
  ]),
200
171
  _: 1
201
172
  }, 8, ["to"])
202
173
  ]),
203
174
  _: 1
204
- })) : l("", !0),
205
- t(b, { name: "slide-fade" }, {
175
+ })) : m("", !0),
176
+ t(c, { name: "slide-fade" }, {
206
177
  default: a(() => [
207
- n.value === "products" ? (r(), m(G, {
178
+ o.value === "products" ? (r(), l(L, {
208
179
  key: 0,
209
- organization: i.current
210
- }, null, 8, ["organization"])) : l("", !0)
180
+ organization: u.current
181
+ }, null, 8, ["organization"])) : m("", !0)
211
182
  ]),
212
183
  _: 1
213
184
  }),
214
- t(b, { name: "slide-fade" }, {
185
+ t(c, { name: "slide-fade" }, {
215
186
  default: a(() => [
216
- n.value === "spots" ? (r(), p("div", X, [
217
- t(x, {
187
+ o.value === "spots" ? (r(), d("div", H, [
188
+ t(z, {
218
189
  states: {
219
190
  empty: {
220
191
  title: "No Spots Found",
@@ -222,42 +193,42 @@ const K = {
222
193
  }
223
194
  },
224
195
  store: {
225
- read: (s) => J.read(o(e).params._id),
226
- state: i
196
+ read: (n) => I.read(s(e).params._id),
197
+ state: u
227
198
  },
228
199
  options: {
229
- user: u.user._id,
200
+ user: i.user._id,
230
201
  sort: "numberOfMemberships",
231
202
  contain: ["blogposts"],
232
203
  limit: 10
233
204
  }
234
205
  }, {
235
206
  default: a(({
236
- items: s
207
+ items: n
237
208
  }) => [
238
- (r(!0), p(y, null, h(s, (c, v) => (r(), m(T, {
209
+ (r(!0), d(k, null, w(n, (b, v) => (r(), l(F, {
239
210
  key: v,
240
- spot: c,
241
- organization: i.current,
211
+ spot: b,
212
+ organization: u.current,
242
213
  class: "radius-big bg-grey mn-b-thin"
243
214
  }, null, 8, ["spot", "organization"]))), 128))
244
215
  ]),
245
216
  _: 1
246
217
  }, 8, ["states", "store", "options"]),
247
- u.user._id === i.current.owner ? (r(), p("button", {
218
+ i.user._id === u.current.owner ? (r(), d("button", {
248
219
  key: 0,
249
- onClick: d[2] || (d[2] = (s) => _.$router.push(`/spots/${i.current._id}/spots/create`)),
220
+ onClick: p[1] || (p[1] = (n) => _.$router.push(`/spots/${u.current._id}/spots/create`)),
250
221
  class: "mn-b-thin button w-100"
251
- }, " Add spot ")) : l("", !0)
252
- ])) : l("", !0)
222
+ }, " Add spot ")) : m("", !0)
223
+ ])) : m("", !0)
253
224
  ]),
254
225
  _: 1
255
226
  })
256
227
  ])
257
- ])) : l("", !0);
228
+ ])) : m("", !0);
258
229
  };
259
230
  }
260
231
  };
261
232
  export {
262
- we as default
233
+ ge as default
263
234
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),p=require("../../../icons/skeletons/SkeletonOrganization.vue.cjs"),c=require("../../store/organizations.cjs"),f={class:"pos-relative"},y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!1),o=e.ref(!0),i=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){i.value+=u.value;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=[...r.value,...a]}};return e.onMounted(async()=>{o.value=!0,console.log(t.selectedDate);const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=a,o.value=!1}),(a,b)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,l=>(e.openBlock(),e.createBlock(p.default,{key:l}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&r.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-b-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"cols-1"},{default:e.withCtx(()=>[!o.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(l,v)=>(e.openBlock(),e.createBlock(m.default,{onClick:k=>a.$router.push({name:"Organization",params:{_id:l._id}}),key:l._id,organization:l,user:s.user,type:"normal",class:"w-100 radius-big mn-b-medium"},null,8,["onClick","organization","user"]))),128)):e.createCommentVNode("",!0),n.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),p=require("../../../icons/skeletons/SkeletonOrganization.vue.cjs"),c=require("../../store/organizations.cjs"),f={class:"pos-relative"},y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!1),o=e.ref(!0),i=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){i.value+=u.value;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=[...r.value,...a]}};return e.onMounted(async()=>{o.value=!0;const a=await c.actions.read({skip:i.value,limit:u.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=a,o.value=!1}),(a,b)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,l=>(e.openBlock(),e.createBlock(p.default,{key:l}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&r.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-b-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"cols-1"},{default:e.withCtx(()=>[!o.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(l,v)=>(e.openBlock(),e.createBlock(m.default,{onClick:k=>a.$router.push({name:"Organization",params:{_id:l._id}}),key:l._id,organization:l,user:s.user,type:"normal",class:"w-100 radius-big mn-b-medium"},null,8,["onClick","organization","user"]))),128)):e.createCommentVNode("",!0),n.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=y;
@@ -1,4 +1,4 @@
1
- import { ref as s, onMounted as h, openBlock as a, createElementBlock as i, createVNode as m, TransitionGroup as y, withCtx as g, Fragment as b, renderList as v, createBlock as p, createCommentVNode as d, Transition as z } from "vue";
1
+ import { ref as i, onMounted as h, openBlock as a, createElementBlock as o, createVNode as m, TransitionGroup as y, withCtx as g, Fragment as b, renderList as v, createBlock as p, createCommentVNode as d, Transition as z } from "vue";
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
3
  import S from "../../../../components/EmptyState/EmptyState.vue.js";
4
4
  import w from "../blocks/CardOrganization.vue.js";
@@ -53,12 +53,12 @@ const C = { class: "pos-relative" }, V = {
53
53
  }
54
54
  },
55
55
  setup(f) {
56
- const e = f, t = s([]), n = s(!1), l = s(!0), c = s(0), u = s(20), _ = async () => {
56
+ const e = f, t = i([]), n = i(!1), l = i(!0), c = i(0), s = i(20), _ = async () => {
57
57
  if (n.value) {
58
- c.value += u.value;
58
+ c.value += s.value;
59
59
  const r = await k.read({
60
60
  skip: c.value,
61
- limit: u.value,
61
+ limit: s.value,
62
62
  category: e.category,
63
63
  sortOrder: e.sortOrder,
64
64
  member: e.member,
@@ -75,10 +75,10 @@ const C = { class: "pos-relative" }, V = {
75
75
  }
76
76
  };
77
77
  return h(async () => {
78
- l.value = !0, console.log(e.selectedDate);
78
+ l.value = !0;
79
79
  const r = await k.read({
80
80
  skip: c.value,
81
- limit: u.value,
81
+ limit: s.value,
82
82
  category: e.category,
83
83
  member: e.member,
84
84
  subscriber: e.subscriber,
@@ -92,14 +92,14 @@ const C = { class: "pos-relative" }, V = {
92
92
  status: e.status
93
93
  });
94
94
  r.length === 0 ? n.value = !1 : n.value = !0, t.value = r, l.value = !1;
95
- }), (r, N) => (a(), i("section", C, [
95
+ }), (r, N) => (a(), o("section", C, [
96
96
  m(y, {
97
97
  tag: "ul",
98
98
  name: "fade",
99
99
  class: "o-hidden bg-grey radius-big"
100
100
  }, {
101
101
  default: g(() => [
102
- l.value ? (a(!0), i(b, { key: 0 }, v(u.value, (o) => (a(), p(O, { key: o }))), 128)) : d("", !0)
102
+ l.value ? (a(!0), o(b, { key: 0 }, v(s.value, (u) => (a(), p(O, { key: u }))), 128)) : d("", !0)
103
103
  ]),
104
104
  _: 1
105
105
  }),
@@ -120,15 +120,15 @@ const C = { class: "pos-relative" }, V = {
120
120
  class: "cols-1"
121
121
  }, {
122
122
  default: g(() => [
123
- !l.value && t.value.length > 0 ? (a(!0), i(b, { key: 0 }, v(t.value, (o, D) => (a(), p(w, {
124
- onClick: (L) => r.$router.push({ name: "Organization", params: { _id: o._id } }),
125
- key: o._id,
126
- organization: o,
123
+ !l.value && t.value.length > 0 ? (a(!0), o(b, { key: 0 }, v(t.value, (u, L) => (a(), p(w, {
124
+ onClick: ($) => r.$router.push({ name: "Organization", params: { _id: u._id } }),
125
+ key: u._id,
126
+ organization: u,
127
127
  user: f.user,
128
128
  type: "normal",
129
129
  class: "w-100 radius-big mn-b-medium"
130
130
  }, null, 8, ["onClick", "organization", "user"]))), 128)) : d("", !0),
131
- n.value && t.value.length > 0 ? (a(), i("button", {
131
+ n.value && t.value.length > 0 ? (a(), o("button", {
132
132
  key: 1,
133
133
  onClick: _,
134
134
  class: "w-100 bg-main button"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../middlewares/client/auth.validation.cjs"),t=[{path:":_id/products/:product",name:"Product Organization",meta:{title:{en:"Product",ru:"Продукт"}},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/Product.vue.cjs"))},{path:":_id/products/:product/edit",name:"ProductEdit",beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../../products/components/pages/ProductEdit.vue.cjs"))},{path:":_id/products/add",name:"ProductAdd",component:()=>Promise.resolve().then(()=>require("../../products/components/pages/ProductEdit.vue.cjs"))},{path:":_id/leftovers",name:"Leftovers",meta:{title:{en:"Leftovers",ru:"Остатки"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/Leftovers.vue.cjs"))},{path:":_id/leftovers/add",name:"LeftoverAdd",meta:{title:{en:"Leftovers Add",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/EditLeftover.vue.cjs"))},{path:":_id/leftovers/:leftover",name:"LeftoverEdit",meta:{title:{en:"Leftovers Edit",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/EditLeftover.vue.cjs"))}];exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../middlewares/client/auth.validation.cjs"),t=[{path:":_id/products/:product",name:"Product Organization",meta:{title:{en:"Product",ru:"Продукт"}},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/Product.vue.cjs"))},{path:":_id/products/:product/edit",name:"ProductEdit",beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../../products/components/pages/ProductEdit.vue.cjs"))},{path:":_id/products/add",name:"ProductAdd",component:()=>Promise.resolve().then(()=>require("../../products/components/pages/ProductEdit.vue.cjs"))},{path:":_id/categories",name:"Categories Organization",meta:{title:{en:"Category",ru:"Категория"}},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/Categories.vue.cjs"))},{path:":_id/categories/add",name:"CategoryAdd",component:()=>Promise.resolve().then(()=>require("../../products/components/pages/CategoryEdit.vue.cjs"))},{path:":_id/categories/:category/edit",name:"CategoryEdit",beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../../products/components/pages/CategoryEdit.vue.cjs"))},{path:":_id/leftovers",name:"Leftovers",meta:{title:{en:"Leftovers",ru:"Остатки"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/Leftovers.vue.cjs"))},{path:":_id/leftovers/add",name:"LeftoverAdd",meta:{title:{en:"Leftovers Add",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/EditLeftover.vue.cjs"))},{path:":_id/leftovers/:leftover",name:"LeftoverEdit",meta:{title:{en:"Leftovers Edit",ru:"Управление Остатками"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../products/components/pages/EditLeftover.vue.cjs"))}];exports.default=t;
@@ -22,6 +22,28 @@ const o = [
22
22
  name: "ProductAdd",
23
23
  component: () => import("../../products/components/pages/ProductEdit.vue.js")
24
24
  },
25
+ {
26
+ path: ":_id/categories",
27
+ name: "Categories Organization",
28
+ meta: {
29
+ title: {
30
+ en: "Category",
31
+ ru: "Категория"
32
+ }
33
+ },
34
+ component: () => import("../../products/components/pages/Categories.vue.js")
35
+ },
36
+ {
37
+ path: ":_id/categories/add",
38
+ name: "CategoryAdd",
39
+ component: () => import("../../products/components/pages/CategoryEdit.vue.js")
40
+ },
41
+ {
42
+ path: ":_id/categories/:category/edit",
43
+ name: "CategoryEdit",
44
+ beforeEnter: [t],
45
+ component: () => import("../../products/components/pages/CategoryEdit.vue.js")
46
+ },
25
47
  {
26
48
  path: ":_id/leftovers",
27
49
  name: "Leftovers",
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("./CardCategory.vue2.cjs");const i={class:"flex-v-center flex"},d={class:"mn-r-auto"},m={__name:"CardCategory",props:{category:Object},emits:["delete"],setup(t,{emit:a}){const s=a,c=n.useRoute();n.useRouter();const l=o=>{s("delete",o)};return(o,r)=>{const u=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("h4",d,e.toDisplayString(t.category.name),1),e.createVNode(u,{to:{name:"CategoryEdit",params:{_id:e.unref(c).params._id,category:t.category.url}},class:"mn-r-medium nav-link"},{default:e.withCtx(()=>[e.createTextVNode(" Edit ")]),_:1},8,["to"]),e.createElementVNode("a",{class:"nav-link",onClick:r[0]||(r[0]=_=>l(t.category))}," Delete ")])}}};exports.default=m;