@ozdao/prometheus-framework 0.2.91 → 0.2.93

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/dist/events.server.js +19 -9
  2. package/dist/events.server.mjs +19 -9
  3. package/dist/main-CX2ISR43.mjs +13629 -0
  4. package/dist/main-cffh4bbv.js +92 -0
  5. package/dist/main.css +1 -1
  6. package/dist/orders.server.js +32 -18
  7. package/dist/orders.server.mjs +32 -18
  8. package/dist/organizations.server.js +2 -1
  9. package/dist/organizations.server.mjs +2 -1
  10. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
  12. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
  14. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
  16. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  18. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  20. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
  32. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +14 -48
  36. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +85 -25
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +74 -63
  46. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -0
  47. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.js +74 -0
  48. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/landing/landing.client.js +4 -2
  50. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  51. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
  54. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
  55. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
  56. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
  62. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
  64. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
  70. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +7 -9
  74. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
  76. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
  78. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
  80. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
  84. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
  86. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
  88. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
  90. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +37 -26
  104. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
  110. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
  112. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
  116. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
  120. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
  122. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  124. package/dist/prometheus-framework.cjs.js +1 -1
  125. package/dist/prometheus-framework.es.js +1 -1
  126. package/dist/style.css +1 -1
  127. package/dist/web-CQQEUA9l.js +1 -0
  128. package/dist/web-D2Em-p-C.mjs +54 -0
  129. package/package.json +1 -1
  130. package/src/components/Address/Address.vue +23 -34
  131. package/src/components/LocationMarker/LocationMarker.vue +6 -1
  132. package/src/components/LocationSelection/LocationSelection.vue +4 -0
  133. package/src/components/Map/Map.vue +29 -15
  134. package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
  135. package/src/modules/events/components/layouts/layoutEvents.vue +2 -59
  136. package/src/modules/events/components/pages/Events.vue +106 -23
  137. package/src/modules/events/controllers/events.controller.js +10 -7
  138. package/src/modules/globals/components/blocks/CardHeader.vue +31 -6
  139. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
  140. package/src/modules/landing/components/pages/Farming.vue +226 -0
  141. package/src/modules/landing/components/pages/Governance.vue +3 -5
  142. package/src/modules/landing/components/pages/Home.vue +0 -3
  143. package/src/modules/landing/components/pages/Hotel.vue +1 -3
  144. package/src/modules/landing/components/pages/Page.vue +0 -3
  145. package/src/modules/landing/components/sections/Examples.vue +4 -56
  146. package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
  147. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
  148. package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
  149. package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
  150. package/src/modules/landing/landing.client.js +3 -1
  151. package/src/modules/landing/router/landing.js +11 -0
  152. package/src/modules/marketplace/components/sections/Filters.vue +26 -23
  153. package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
  154. package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
  155. package/src/modules/orders/components/pages/Order.vue +2 -6
  156. package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
  157. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  158. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
  159. package/src/modules/orders/components/pages/Orders.vue +60 -11
  160. package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
  161. package/src/modules/orders/components/sections/SubscribeNewsletter.vue +2 -2
  162. package/src/modules/orders/controllers/orders.controller.js +29 -18
  163. package/src/modules/orders/models/order.model.js +8 -2
  164. package/src/modules/orders/router/orders.backoffice.router.js +3 -5
  165. package/src/modules/orders/router/orders.router.js +2 -2
  166. package/src/modules/orders/store/orders.js +3 -7
  167. package/src/modules/orders/store/shopcart.js +1 -1
  168. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
  169. package/src/modules/organizations/components/pages/Department.vue +5 -1
  170. package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
  171. package/src/modules/organizations/components/pages/Members.vue +2 -1
  172. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  173. package/src/modules/organizations/controllers/memberships.controller.js +3 -1
  174. package/src/modules/organizations/store/memberships.js +1 -1
  175. package/src/modules/products/components/blocks/CardProduct.vue +32 -22
  176. package/src/modules/products/components/pages/ProductEdit.vue +10 -13
  177. package/src/modules/products/components/pages/Products.vue +2 -0
  178. package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
  179. package/src/modules/products/store/products.js +25 -2
  180. package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
  181. package/src/modules/users/components/blocks/CardUser.vue +1 -0
  182. package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const s=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),m=require("../../../icons/navigation/IconDelete.vue.cjs"),b=require("../blocks/CardPosition.vue.cjs"),q=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const y={class:"for-transition w-100 cols-1 pd-thin gap-thin"},E={class:"mn-r-auto"},P={class:"cols-2 gap-thin"},U={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},D={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},z={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},I={class:"cols-1 gap-thin"},F={__name:"ProductEdit",setup(L){const n=k.useRoute(),g=k.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function N(c){f.value=!0}function d(){f.value=!1}e.onMounted(async()=>{await w.actions.fetchCategories();try{const c=await t.actions.read({organization:n.params._id,limit:100});p.value=c}catch{console.error("error")}n.params.product&&await t.actions.read({_id:n.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[])});function v(){n.params.product?t.actions.update(n.params.product,t.state.current):t.actions.create(n.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function h(){g.push({name:"Organization",params:{_id:n.params._id}})}return(c,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",E,e.toDisplayString(e.unref(n).params.product?t.state.current.name:"Create Product"),1),e.unref(n).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:h,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:h,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(C.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":i[0]||(i[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",P,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(q.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(g).push({name:"Categories Organization",params:{_id:e.unref(n).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,r)=>(e.openBlock(),e.createBlock(V.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":l=>t.state.current.category=l},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",U,[e.createVNode(m.default,{onClick:()=>t.state.current.information.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(m.default,{onClick:()=>t.state.current.localization.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]),e.createVNode(o.default,{title:"Quantity Discount",class:"mn-b-semi",actions:[{label:"+",function:()=>t.state.current.quantityDiscount.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.quantityDiscount,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Quantity",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Discount",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",z,[e.createVNode(m.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add ingredient",onClosePopup:d,isPopupOpen:f.value,class:"bg-white pd-big radius-big"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:i[1]||(i[1]=a=>u.actions.add(t.state.current.ingredients,a)),products:p.value,class:"flex-column"},null,8,["products"])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Ingredients",placeholder:"No positions added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,r)=>(e.openBlock(),e.createBlock(b.default,{key:a._id,product:a,array:t.state.current.ingredients,products:p.value,onAdd:i[2]||(i[2]=l=>{u.actions.add(t.state.current.ingredients,l),d()}),onUpdate:l=>{u.actions.update(t.state.current.ingredients,l,r),d()},onDelete:l=>{u.actions.delete(t.state.current.ingredients,l,r),d()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])]),_:1},8,["actions"])]))}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const s=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),m=require("../../../icons/navigation/IconDelete.vue.cjs"),b=require("../blocks/CardPosition.vue.cjs"),q=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const y={class:"for-transition w-100 cols-1 pd-thin gap-thin"},E={class:"mn-r-auto"},P={class:"cols-2 gap-thin"},U={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},D={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},z={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},I={class:"cols-1 gap-thin"},F={__name:"ProductEdit",setup(L){const n=k.useRoute(),g=k.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function N(c){f.value=!0}function d(){f.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),n.params.product&&await t.actions.read({_id:n.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const c=await t.actions.read({organization:n.params._id,limit:100});p.value=c}catch{console.error("error")}});function v(){n.params.product?t.actions.update(n.params.product,t.state.current):t.actions.create(n.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function h(){g.push({name:"Organization",params:{_id:n.params._id}})}return(c,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",E,e.toDisplayString(e.unref(n).params.product?t.state.current.name:"Create Product"),1),e.unref(n).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:h,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:h,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(C.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":i[0]||(i[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",P,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(q.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(g).push({name:"Categories Organization",params:{_id:e.unref(n).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,r)=>(e.openBlock(),e.createBlock(V.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":l=>t.state.current.category=l},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",U,[e.createVNode(m.default,{onClick:()=>t.state.current.information.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(m.default,{onClick:()=>t.state.current.localization.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]),e.createVNode(o.default,{title:"Quantity Discount",class:"mn-b-semi",actions:[{label:"+",function:()=>t.state.current.quantityDiscount.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.quantityDiscount,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Quantity",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Discount",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",z,[e.createVNode(m.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add ingredient",onClosePopup:d,isPopupOpen:f.value,class:"bg-white pd-big radius-big"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:i[1]||(i[1]=a=>u.actions.add(t.state.current.ingredients,a)),products:p.value,class:"flex-column"},null,8,["products"])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Ingredients",placeholder:"No positions added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,r)=>(e.openBlock(),e.createBlock(b.default,{key:a._id,product:a,array:t.state.current.ingredients,products:p.value,onAdd:i[2]||(i[2]=l=>{u.actions.add(t.state.current.ingredients,l),d()}),onUpdate:l=>{u.actions.update(t.state.current.ingredients,l,r),d()},onDelete:l=>{u.actions.delete(t.state.current.ingredients,l,r),d()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])]),_:1},8,["actions"])]))}};exports.default=F;
@@ -14,12 +14,12 @@ import k from "../../../icons/navigation/IconDelete.vue.js";
14
14
  import z from "../blocks/CardPosition.vue.js";
15
15
  import F from "../sections/EditProductInfo.vue.js";
16
16
  import { actions as v } from "../../../globals/store/globals.js";
17
- import { state as e, actions as g } from "../../store/products.js";
18
- import { actions as L, state as Q } from "../../store/categories.js";
17
+ import { state as e, mutations as L, actions as g } from "../../store/products.js";
18
+ import { actions as Q, state as M } from "../../store/categories.js";
19
19
  import "./ProductEdit.vue2.js";
20
- const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class: "mn-r-auto" }, G = { class: "cols-2 gap-thin" }, H = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, J = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, K = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, W = { class: "cols-1 gap-thin" }, he = {
20
+ const j = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class: "mn-r-auto" }, H = { class: "cols-2 gap-thin" }, J = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, K = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, W = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, X = { class: "cols-1 gap-thin" }, be = {
21
21
  __name: "ProductEdit",
22
- setup(X) {
22
+ setup(Y) {
23
23
  const o = B(), U = E(), w = P(e.all), x = P(!1);
24
24
  function N(h) {
25
25
  x.value = !0;
@@ -28,7 +28,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
28
28
  x.value = !1;
29
29
  }
30
30
  V(async () => {
31
- await L.fetchCategories();
31
+ L.resetProduct(), o.params.product && await g.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []), await Q.fetchCategories();
32
32
  try {
33
33
  const h = await g.read({
34
34
  organization: o.params._id,
@@ -38,7 +38,6 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
38
38
  } catch {
39
39
  console.error("error");
40
40
  }
41
- o.params.product && await g.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []);
42
41
  });
43
42
  function O() {
44
43
  o.params.product ? g.update(o.params.product, e.current) : g.create(o.params._id, e.current);
@@ -54,10 +53,10 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
54
53
  }
55
54
  });
56
55
  }
57
- return (h, u) => (i(), s("div", M, [
56
+ return (h, u) => (i(), s("div", j, [
58
57
  a(d, { class: "flex-nowrap flex-v-center flex" }, {
59
58
  default: r(() => [
60
- c("h1", j, q(b(o).params.product ? e.current.name : "Create Product"), 1),
59
+ c("h1", G, q(b(o).params.product ? e.current.name : "Create Product"), 1),
61
60
  b(o).params.product ? (i(), y($, {
62
61
  key: 0,
63
62
  submit: I,
@@ -97,7 +96,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
97
96
  ]),
98
97
  _: 1
99
98
  }),
100
- c("div", G, [
99
+ c("div", H, [
101
100
  a(d, { title: "Profile" }, {
102
101
  default: r(() => [
103
102
  a(F, {
@@ -119,7 +118,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
119
118
  }]
120
119
  }, {
121
120
  default: r(() => [
122
- (i(!0), s(m, null, f(Q.all, (t, n) => (i(), y(R, {
121
+ (i(!0), s(m, null, f(M.all, (t, n) => (i(), y(R, {
123
122
  label: t.name,
124
123
  name: "categories",
125
124
  value: t.url,
@@ -156,7 +155,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
156
155
  placeholder: "Значение параметра",
157
156
  class: "w-100 bg-white radius-small pd-medium"
158
157
  }, null, 8, ["field", "onUpdate:field"]),
159
- c("div", H, [
158
+ c("div", J, [
160
159
  a(k, {
161
160
  onClick: () => e.current.information.splice(n, 1),
162
161
  class: "i-medium"
@@ -191,7 +190,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
191
190
  placeholder: "Значение параметра",
192
191
  class: "w-100 bg-white radius-small pd-medium"
193
192
  }, null, 8, ["field", "onUpdate:field"]),
194
- c("div", J, [
193
+ c("div", K, [
195
194
  a(k, {
196
195
  onClick: () => e.current.localization.splice(n, 1),
197
196
  class: "i-medium"
@@ -227,7 +226,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
227
226
  placeholder: "Discount",
228
227
  class: "w-100 bg-white radius-small pd-medium"
229
228
  }, null, 8, ["field", "onUpdate:field"]),
230
- c("div", K, [
229
+ c("div", W, [
231
230
  a(k, {
232
231
  onClick: () => e.current.quantityDiscount.splice(n, 1),
233
232
  class: "i-medium"
@@ -264,7 +263,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
264
263
  }]
265
264
  }, {
266
265
  default: r(() => [
267
- c("div", W, [
266
+ c("div", X, [
268
267
  (i(!0), s(m, null, f(e.current.ingredients, (t, n) => (i(), y(z, {
269
268
  key: t._id,
270
269
  product: t,
@@ -288,5 +287,5 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
288
287
  }
289
288
  };
290
289
  export {
291
- he as default
290
+ be as default
292
291
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),c=require("../../store/products.cjs"),v={class:"pd-thin"},f={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},y=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),g={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},q={__name:"Products",setup(_){const t=l.useRoute(),s=l.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,o=>{s.replace({query:{...t.query,tabProducts:o}})});function d(o){let r={...t.query};r.search=o,s.push({query:r})}return(o,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",f,[y,e.createElementVNode("button",{onClick:r[0]||(r[0]=u=>o.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(i.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=u=>a.value=u),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",g,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:d,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:u=>c.actions.read(u),state:c.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:u})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,n=>(e.openBlock(),e.createBlock(b.default,{key:n._id,product:n,class:"h-max",onClickCapture:k=>o.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:n._id}})},null,8,["product","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/store/auth.cjs"),l=require("../../store/products.cjs"),f={class:"pd-thin"},y={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},g=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),q={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=c.useRoute(),n=c.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",y,[g,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>l.actions.read(o),state:l.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
@@ -1,28 +1,29 @@
1
- import { ref as _, watch as b, openBlock as i, createElementBlock as l, unref as t, createElementVNode as n, createCommentVNode as m, createBlock as p, createVNode as c, withCtx as f, Fragment as v, renderList as y } from "vue";
1
+ import { ref as _, watch as f, openBlock as i, createElementBlock as l, unref as t, createElementVNode as n, createCommentVNode as m, createBlock as p, createVNode as c, withCtx as b, Fragment as v, renderList as y } from "vue";
2
2
  import { useRoute as g, useRouter as q } from "vue-router";
3
3
  import P from "../../../../components/Tab/Tab.vue2.js";
4
- import k from "../../../../components/Feed/Feed.vue.js";
5
- import $ from "../sections/FilterProducts.vue.js";
4
+ import $ from "../../../../components/Feed/Feed.vue.js";
5
+ import k from "../sections/FilterProducts.vue.js";
6
6
  import C from "../../../globals/components/blocks/BlockSearch.vue.js";
7
7
  import w from "../blocks/CardProduct.vue.js";
8
- import { actions as x, state as z } from "../../store/products.js";
9
- const N = { class: "pd-thin" }, A = {
8
+ import { state as x } from "../../../auth/store/auth.js";
9
+ import { actions as z, state as N } from "../../store/products.js";
10
+ const A = { class: "pd-thin" }, B = {
10
11
  key: 0,
11
12
  class: "mn-b-medium flex-v-center flex-nowrap flex"
12
- }, B = /* @__PURE__ */ n("h2", { class: "mn-r-medium" }, "Products", -1), E = { class: "cols-2-1_3 bg-grey pd-thin radius-big gap-thin" }, H = {
13
+ }, E = /* @__PURE__ */ n("h2", { class: "mn-r-medium" }, "Products", -1), O = { class: "cols-2-1_3 bg-grey pd-thin radius-big gap-thin" }, J = {
13
14
  __name: "Products",
14
- setup(O) {
15
+ setup(V) {
15
16
  const e = g(), d = q(), a = _(e.query.tabProducts ? e.query.tabProducts : "all");
16
- e.query.tabProducts = a.value, b(a, (s) => {
17
+ e.query.tabProducts = a.value, f(a, (s) => {
17
18
  d.replace({ query: { ...e.query, tabProducts: s } });
18
19
  });
19
20
  function h(s) {
20
21
  let r = { ...e.query };
21
22
  r.search = s, d.push({ query: r });
22
23
  }
23
- return (s, r) => (i(), l("div", N, [
24
- t(e).name !== "Organization" ? (i(), l("header", A, [
25
- B,
24
+ return (s, r) => (i(), l("div", A, [
25
+ t(e).name !== "Organization" ? (i(), l("header", B, [
26
+ E,
26
27
  n("button", {
27
28
  onClick: r[0] || (r[0] = (o) => s.$router.push({
28
29
  name: "ProductAdd"
@@ -42,15 +43,15 @@ const N = { class: "pd-thin" }, A = {
42
43
  ],
43
44
  class: "mn-b-small o-hidden h5 radius-big bg-grey"
44
45
  }, null, 8, ["selected"])) : m("", !0),
45
- n("div", E, [
46
- c($),
46
+ n("div", O, [
47
+ c(k),
47
48
  n("div", null, [
48
49
  c(C, {
49
50
  onSearch: h,
50
51
  placeholder: "Enter product name",
51
52
  class: "bg-white mn-b-thin"
52
53
  }),
53
- c(k, {
54
+ c($, {
54
55
  states: {
55
56
  empty: {
56
57
  title: "No Products Found",
@@ -58,8 +59,8 @@ const N = { class: "pd-thin" }, A = {
58
59
  }
59
60
  },
60
61
  store: {
61
- read: (o) => x.read(o),
62
- state: z
62
+ read: (o) => z.read(o),
63
+ state: N
63
64
  },
64
65
  options: {
65
66
  limit: 15,
@@ -73,21 +74,22 @@ const N = { class: "pd-thin" }, A = {
73
74
  },
74
75
  class: "cols-4 gap-thin"
75
76
  }, {
76
- default: f(({
77
+ default: b(({
77
78
  items: o
78
79
  }) => [
79
80
  (i(!0), l(v, null, y(o, (u) => (i(), p(w, {
80
81
  key: u._id,
81
82
  product: u,
83
+ user: x.access,
82
84
  class: "h-max",
83
- onClickCapture: (V) => s.$router.push({
85
+ onClickCapture: (F) => s.$router.push({
84
86
  name: "Product Organization",
85
87
  params: {
86
88
  _id: t(e).params._id,
87
89
  product: u._id
88
90
  }
89
91
  })
90
- }, null, 8, ["product", "onClickCapture"]))), 128))
92
+ }, null, 8, ["product", "user", "onClickCapture"]))), 128))
91
93
  ]),
92
94
  _: 1
93
95
  }, 8, ["store", "options"])
@@ -97,5 +99,5 @@ const N = { class: "pd-thin" }, A = {
97
99
  }
98
100
  };
99
101
  export {
100
- H as default
102
+ J as default
101
103
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue2.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"Введите название",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"Введите цену",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":l[2]||(l[2]=t=>e.product.price.currency=t),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"Введите описание",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"Введите название",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"Введите цену",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":l[2]||(l[2]=t=>e.product.price.currency=t),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"Введите описание",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
@@ -2,7 +2,7 @@ import { openBlock as a, createElementBlock as u, Fragment as o, createVNode as
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
3
  import "../../../../components/Button/Button.vue2.js";
4
4
  import i from "../../../../components/Field/Field.vue.js";
5
- import r from "../../../../components/Select/Select.vue2.js";
5
+ import r from "../../../../components/Select/Select.vue.js";
6
6
  const w = {
7
7
  __name: "EditProductInfo",
8
8
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),i=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),o={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(d(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),e.search&&(r.search=e.search),r.sort="createdAt",r.skip=e.skip||0,r.limit=e.limit||10;try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function d(e,r){t[r]=e}const l={};n.watch(t,(e,r)=>{});exports.actions=o;exports.getters=l;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),i=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(l(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),e.search&&(r.search=e.search),r.sort="createdAt",r.skip=e.skip,r.limit=e.limit;try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}},d={resetProduct(e){t.current={recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}};function l(e,r){t[r]=e}const m={};n.watch(t,(e,r)=>{});exports.actions=u;exports.getters=m;exports.mutations=d;exports.state=t;
@@ -1,7 +1,7 @@
1
1
  import { reactive as n, watch as u } from "vue";
2
2
  import o from "../../../../node_modules/axios/lib/axios.js";
3
3
  import { setError as i } from "../../globals/store/globals.js";
4
- const c = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = n({
4
+ const s = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
5
5
  all: [],
6
6
  current: {
7
7
  recommendation: !1,
@@ -21,64 +21,64 @@ const c = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = n
21
21
  description: ""
22
22
  }
23
23
  }), f = {
24
- async create(e, r) {
24
+ async create(e, t) {
25
25
  const a = {
26
- ...r,
26
+ ...t,
27
27
  organization: e
28
28
  };
29
- return await c.post("/api/products/create", a).then(
30
- (s) => (d(s.data, "current"), Promise.resolve(s.data)),
31
- (s) => (i(s), Promise.reject(s))
29
+ return await s.post("/api/products/create", a).then(
30
+ (c) => (d(c.data, "current"), Promise.resolve(c.data)),
31
+ (c) => (i(c), Promise.reject(c))
32
32
  );
33
33
  },
34
34
  async read(e = {}) {
35
- let r = {};
36
- e._id && (r._id = e._id), e.category && (r.category = e.category), e.organization && (r.organization = e.organization), e.count && (r.count = e.count), e.categories && (r.categories = e.categories), e.prices && (r.prices = e.prices), e.delivery && (r.delivery = e.delivery), e.status && (r.status = e.status), e.search && (r.search = e.search), r.sort = "createdAt", r.skip = e.skip || 0, r.limit = e.limit || 10;
35
+ let t = {};
36
+ e._id && (t._id = e._id), e.category && (t.category = e.category), e.organization && (t.organization = e.organization), e.count && (t.count = e.count), e.categories && (t.categories = e.categories), e.prices && (t.prices = e.prices), e.delivery && (t.delivery = e.delivery), e.status && (t.status = e.status), e.search && (t.search = e.search), t.sort = "createdAt", t.skip = e.skip, t.limit = e.limit;
37
37
  try {
38
- const a = await c.get("/api/products/read", { params: r });
39
- return e._id ? (t.current = { ...a.data[0] }, Promise.resolve(a.data[0])) : Promise.resolve(a.data);
38
+ const a = await s.get("/api/products/read", { params: t });
39
+ return e._id ? (r.current = { ...a.data[0] }, Promise.resolve(a.data[0])) : Promise.resolve(a.data);
40
40
  } catch (a) {
41
41
  return i(a), Promise.reject(a);
42
42
  }
43
43
  },
44
- async update(e, r) {
45
- return await c.post("/api/products/" + e, r).then(
44
+ async update(e, t) {
45
+ return await s.post("/api/products/" + e, t).then(
46
46
  (a) => Promise.resolve(a.data),
47
47
  (a) => (i(a), Promise.reject(a))
48
48
  );
49
49
  },
50
50
  async deleteProduct(e) {
51
- return await c.delete("/api/products/" + e).then(
52
- (r) => Promise.resolve(r.data),
53
- (r) => (i(r), Promise.reject(r))
51
+ return await s.delete("/api/products/" + e).then(
52
+ (t) => Promise.resolve(t.data),
53
+ (t) => (i(t), Promise.reject(t))
54
54
  );
55
55
  },
56
56
  async submitMood(e = null) {
57
- return c.post("/api/product/recommended", { mood: e }).then(
58
- (r) => (t.current = r.data.product, t.current.recommendation = r.data.recommendationText, Promise.resolve(r.data)),
59
- (r) => (i(r), Promise.reject(r))
57
+ return s.post("/api/product/recommended", { mood: e }).then(
58
+ (t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
59
+ (t) => (i(t), Promise.reject(t))
60
60
  );
61
61
  },
62
62
  async fetchProducts() {
63
- return await c.get("/api/products/read").then(
64
- (e) => (t.all = e.data, Promise.resolve(e.data)),
63
+ return await s.get("/api/products/read").then(
64
+ (e) => (r.all = e.data, Promise.resolve(e.data)),
65
65
  (e) => (i(e), Promise.reject(e))
66
66
  );
67
67
  },
68
68
  async fetchProductsPopular() {
69
- return await c.get("/api/products/popular").then(
70
- (e) => (t.popular = e.data, Promise.resolve(e.data)),
69
+ return await s.get("/api/products/popular").then(
70
+ (e) => (r.popular = e.data, Promise.resolve(e.data)),
71
71
  (e) => (i(e), Promise.reject(e))
72
72
  );
73
73
  },
74
74
  async fetchProductsPublished() {
75
- return await c.get("/api/products").then(
75
+ return await s.get("/api/products").then(
76
76
  (e) => {
77
- let r = e.data.filter(function(a, s) {
77
+ let t = e.data.filter(function(a, c) {
78
78
  return a.status !== "unpublished";
79
79
  });
80
- return t.all = r, t.filtered = r.slice(), t.filteredPrice = t.filtered, t.filteredPrice.sort(function(a, s) {
81
- return a[t.sort.current] > s[t.sort.current] ? t.sort.ascending ? 1 : -1 : a[t.sort.current] < s[t.sort.current] ? t.sort.ascending ? -1 : 1 : 0;
80
+ return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, c) {
81
+ return a[r.sort.current] > c[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < c[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
82
82
  }), Promise.resolve(e.data);
83
83
  },
84
84
  (e) => (i(e), Promise.reject(e))
@@ -86,27 +86,48 @@ const c = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = n
86
86
  },
87
87
  async fetchProduct(e) {
88
88
  try {
89
- const r = await c.get("/api/products/" + e);
90
- return t.current = r.data[0], Promise.resolve(r.data[0]);
91
- } catch (r) {
92
- return i(r), Promise.reject(r);
89
+ const t = await s.get("/api/products/" + e);
90
+ return r.current = t.data[0], Promise.resolve(t.data[0]);
91
+ } catch (t) {
92
+ return i(t), Promise.reject(t);
93
93
  }
94
94
  },
95
95
  async fetchProductPopular() {
96
- return await c.get("/api/products").then(
97
- (e) => (t.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
96
+ return await s.get("/api/products").then(
97
+ (e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
98
98
  (e) => (i(e), Promise.reject(e))
99
99
  );
100
100
  }
101
+ }, g = {
102
+ resetProduct(e) {
103
+ r.current = {
104
+ recommendation: !1,
105
+ category: [],
106
+ status: "unpublished",
107
+ information: [],
108
+ images: [],
109
+ files: [],
110
+ image3d: !1,
111
+ name: "",
112
+ sale: 0,
113
+ price: 0,
114
+ localization: [],
115
+ modifications: [],
116
+ quantityDiscount: [],
117
+ ingredients: [],
118
+ description: ""
119
+ };
120
+ }
101
121
  };
102
- function d(e, r) {
103
- t[r] = e;
122
+ function d(e, t) {
123
+ r[t] = e;
104
124
  }
105
- const h = {};
106
- u(t, (e, r) => {
125
+ const p = {};
126
+ u(r, (e, t) => {
107
127
  });
108
128
  export {
109
129
  f as actions,
110
- h as getters,
111
- t as state
130
+ p as getters,
131
+ g as mutations,
132
+ r as state
112
133
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue2.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
@@ -1,7 +1,7 @@
1
1
  import { reactive as d, ref as f, openBlock as b, createElementBlock as g, renderSlot as h, createVNode as s, withCtx as l, createTextVNode as y, createElementVNode as a } from "vue";
2
2
  import _ from "../../../../components/Popup/Popup.vue.js";
3
3
  import v from "../../../../components/Button/Button.vue.js";
4
- import w from "../../../../components/Select/Select.vue2.js";
4
+ import w from "../../../../components/Select/Select.vue.js";
5
5
  import { actions as S } from "../../store/reports.js";
6
6
  const k = /* @__PURE__ */ a("h3", { class: "mn-b-small" }, " Report Content ", -1), P = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), R = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), O = {
7
7
  __name: "FormReport",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue.cjs"),d=require("../../../../components/Map/Map.vue.cjs");require("./CardSpot.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-5d50688e"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),v=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),y={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(n,o)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},class:""},null,8,["location"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:o[0]||(o[0]=s=>n.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:o[1]||(o[1]=s=>n.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:o[2]||(o[2]=s=>n.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,n.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(a.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),v,n.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(a.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},b=c.default(y,[["__scopeId","data-v-5d50688e"]]);exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue.cjs"),d=require("../../../../components/Map/Map.vue.cjs");require("./CardSpot.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-1208d443"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden pos-relative cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),y=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),v={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(o,n)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{apiKey:o.GOOGLE_MAPS_API_KEY,location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},class:""},null,8,["apiKey","location"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:n[0]||(n[0]=s=>o.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:n[1]||(n[1]=s=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:n[2]||(n[2]=s=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,o.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(a.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),y,o.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(a.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},b=c.default(v,[["__scopeId","data-v-1208d443"]]);exports.default=b;
@@ -1,10 +1,10 @@
1
- import { openBlock as n, createElementBlock as u, createVNode as r, createElementVNode as e, toDisplayString as l, createBlock as p, createCommentVNode as d, pushScopeId as h, popScopeId as g } from "vue";
2
- import f from "../../../icons/navigation/IconEdit.vue.js";
1
+ import { openBlock as n, createElementBlock as u, createVNode as r, createElementVNode as i, toDisplayString as l, createBlock as p, createCommentVNode as d, pushScopeId as h, popScopeId as g } from "vue";
2
+ import y from "../../../icons/navigation/IconEdit.vue.js";
3
3
  import c from "../../../../components/Chips/Chips.vue.js";
4
- import y from "../../../../components/Map/Map.vue.js";
4
+ import f from "../../../../components/Map/Map.vue.js";
5
5
  import "./CardSpot.vue2.js";
6
- import $ from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
- const m = (t) => (h("data-v-5d50688e"), t = t(), g(), t), b = { class: "radius-big o-hidden cols-2-1_3" }, v = { class: "pd-medium w-100" }, k = ["innerHTML"], z = { class: "d-block p-big mn-b-semi" }, C = /* @__PURE__ */ m(() => /* @__PURE__ */ e("h4", null, "Delivery:", -1)), S = /* @__PURE__ */ m(() => /* @__PURE__ */ e("h4", null, "Accepted Payment:", -1)), w = {
6
+ import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
+ const m = (t) => (h("data-v-1208d443"), t = t(), g(), t), $ = { class: "radius-big o-hidden pos-relative cols-2-1_3" }, b = { class: "pd-medium w-100" }, k = ["innerHTML"], S = { class: "d-block p-big mn-b-semi" }, z = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Delivery:", -1)), C = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Accepted Payment:", -1)), w = {
8
8
  __name: "CardSpot",
9
9
  props: {
10
10
  spot: Object,
@@ -12,14 +12,15 @@ const m = (t) => (h("data-v-5d50688e"), t = t(), g(), t), b = { class: "radius-b
12
12
  },
13
13
  setup(t) {
14
14
  const s = t;
15
- return (i, o) => (n(), u("div", b, [
16
- r(y, {
15
+ return (o, e) => (n(), u("div", $, [
16
+ r(f, {
17
+ apiKey: o.GOOGLE_MAPS_API_KEY,
17
18
  location: { lat: t.spot.location.coordinates[1], lng: t.spot.location.coordinates[0] },
18
19
  class: ""
19
- }, null, 8, ["location"]),
20
- e("div", v, [
21
- r(f, {
22
- onClick: o[0] || (o[0] = (a) => i.$router.push({
20
+ }, null, 8, ["apiKey", "location"]),
21
+ i("div", b, [
22
+ r(y, {
23
+ onClick: e[0] || (e[0] = (a) => o.$router.push({
23
24
  name: "Spot Edit",
24
25
  params: {
25
26
  _id: s.organization._id,
@@ -28,30 +29,30 @@ const m = (t) => (h("data-v-5d50688e"), t = t(), g(), t), b = { class: "radius-b
28
29
  })),
29
30
  class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
30
31
  }),
31
- e("p", {
32
- onClick: o[1] || (o[1] = (a) => i.$router.push(`/app/organization/${s.organization._id}/spots/${t.spot._id}`)),
32
+ i("p", {
33
+ onClick: e[1] || (e[1] = (a) => o.$router.push(`/app/organization/${s.organization._id}/spots/${t.spot._id}`)),
33
34
  class: "pd-thin bg-white radius-small mn-b-thin p-small w-max"
34
35
  }, l(t.spot.address), 1),
35
- e("h3", {
36
- onClick: o[2] || (o[2] = (a) => i.$router.push(`/app/organization/${s.organization._id}/spots/${t.spot._id}`)),
36
+ i("h3", {
37
+ onClick: e[2] || (e[2] = (a) => o.$router.push(`/app/organization/${s.organization._id}/spots/${t.spot._id}`)),
37
38
  class: "mn-b-thin w-100",
38
39
  innerHTML: t.spot.profile.name
39
40
  }, null, 8, k),
40
- e("p", z, l(t.spot.profile.description), 1),
41
- C,
42
- i.type !== "short" && t.spot.delivery.length > 0 ? (n(), p(c, {
41
+ i("p", S, l(t.spot.profile.description), 1),
42
+ z,
43
+ o.type !== "short" && t.spot.delivery.length > 0 ? (n(), p(c, {
43
44
  key: 0,
44
45
  chips: t.spot.delivery
45
46
  }, null, 8, ["chips"])) : d("", !0),
46
- S,
47
- i.type !== "short" && t.spot.payment.length > 0 ? (n(), p(c, {
47
+ C,
48
+ o.type !== "short" && t.spot.payment.length > 0 ? (n(), p(c, {
48
49
  key: 1,
49
50
  chips: t.spot.payment
50
51
  }, null, 8, ["chips"])) : d("", !0)
51
52
  ])
52
53
  ]));
53
54
  }
54
- }, j = /* @__PURE__ */ $(w, [["__scopeId", "data-v-5d50688e"]]);
55
+ }, K = /* @__PURE__ */ v(w, [["__scopeId", "data-v-1208d443"]]);
55
56
  export {
56
- j as default
57
+ K as default
57
58
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),r={class:"flex-v-center flex-nowrap flex"},a=["src"],s={class:"h4"},c={class:"mn-r-small"},d={key:2,class:"mn-l-auto flex-v-center flex"},m={class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},u={__name:"CardUser",props:{_id:{type:String,default:null},user:{type:Object,required:!0},action:{type:Object},photo:{type:String,default:null},name:{type:String,default:"No name"},role:{type:String},phone:{type:String},email:{type:String}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",r,[t.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.photo,class:"radius-medium bg-white object-fit-cover mn-r-thin i-thin",onClick:i[0]||(i[0]=e.withModifiers(o=>n.$router.push({name:t.user.type==="user"?"User Profile":"Organization",params:{_id:t.user._id}}),["stop"]))},null,8,a)):e.createCommentVNode("",!0),t.photo?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:i[1]||(i[1]=e.withModifiers(o=>n.$router.push({name:"User Profile",params:{_id:t.user._id||t._id}}),["stop"]))})),e.createElementVNode("div",null,[e.createElementVNode("p",s,e.toDisplayString(t.name),1),e.createElementVNode("span",c,e.toDisplayString(t.phone||t.email),1)]),t.action||t.role?(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("span",m,e.toDisplayString(t.role),1),t.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:i[2]||(i[2]=e.withModifiers((...o)=>t.action.method&&t.action.method(...o),["stop"])),class:"h-100 w-2r t-white mn-l-thin capitalize t-medium radius-big bg-red"},e.toDisplayString(t.action.label),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}};exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),r={class:"flex-v-center flex-nowrap flex"},a=["src"],c={class:"h4"},d={class:"mn-r-small"},s={key:2,class:"mn-l-auto flex-v-center flex"},m={key:0,class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},u={__name:"CardUser",props:{_id:{type:String,default:null},user:{type:Object,required:!0},action:{type:Object},photo:{type:String,default:null},name:{type:String,default:"No name"},role:{type:String},phone:{type:String},email:{type:String}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",r,[t.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.photo,class:"radius-medium bg-white object-fit-cover mn-r-thin i-thin",onClick:i[0]||(i[0]=e.withModifiers(o=>n.$router.push({name:t.user.type==="user"?"User Profile":"Organization",params:{_id:t.user._id}}),["stop"]))},null,8,a)):e.createCommentVNode("",!0),t.photo?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:i[1]||(i[1]=e.withModifiers(o=>n.$router.push({name:"User Profile",params:{_id:t.user._id||t._id}}),["stop"]))})),e.createElementVNode("div",null,[e.createElementVNode("p",c,e.toDisplayString(t.name),1),e.createElementVNode("span",d,e.toDisplayString(t.phone||t.email),1)]),t.action||t.role?(e.openBlock(),e.createElementBlock("div",s,[t.role?(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(t.role),1)):e.createCommentVNode("",!0),t.action?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:i[2]||(i[2]=e.withModifiers((...o)=>t.action.method&&t.action.method(...o),["stop"])),class:"h-100 w-2r t-white mn-l-thin capitalize t-medium radius-big bg-red"},e.toDisplayString(t.action.label),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}};exports.default=u;