@ozdao/prometheus-framework 0.2.40 → 0.2.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. package/dist/events.server.js +9 -0
  2. package/dist/events.server.mjs +9 -0
  3. package/dist/files.server.js +4 -1
  4. package/dist/files.server.mjs +4 -1
  5. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -225
  7. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +225 -2
  9. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +2 -61
  11. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +61 -2
  13. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.js +26 -28
  15. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  17. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
  19. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  21. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +70 -2
  23. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -95
  25. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +95 -2
  27. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  29. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  31. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  45. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +3 -3
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +24 -23
  49. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  54. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +65 -2
  55. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +125 -81
  63. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +3 -3
  64. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +65 -56
  65. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  67. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +67 -53
  69. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +2 -2
  70. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +48 -37
  71. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +71 -57
  73. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  75. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  77. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +20 -11
  89. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  91. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +6 -6
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +22 -19
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +6 -6
  123. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  127. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +31 -28
  131. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  133. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  135. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +78 -80
  143. package/dist/style.css +1 -1
  144. package/package.json +1 -1
  145. package/src/components/Countdown/Countdown.vue +4 -3
  146. package/src/components/Header/Header.vue +2 -0
  147. package/src/modules/community/components/layouts/Community.vue +2 -2
  148. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -0
  149. package/src/modules/constructor/components/sections/Constructor.vue +1 -1
  150. package/src/modules/events/components/pages/EditEvent.vue +48 -3
  151. package/src/modules/events/components/pages/Event.vue +16 -8
  152. package/src/modules/events/components/sections/HeroEvent.vue +32 -28
  153. package/src/modules/events/components/sections/SectionMainGuest.vue +3 -2
  154. package/src/modules/events/components/sections/SectionPreviousEvents.vue +22 -15
  155. package/src/modules/events/models/event.model.js +9 -0
  156. package/src/modules/files/middlewares/server/middlewareBusboy.js +13 -2
  157. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
  158. package/src/modules/orders/store/shopcart.js +21 -5
  159. package/src/modules/payments/controller/payments.controller.js +54 -200
  160. package/src/modules/payments/controller/payments.tinkoff.controller.js +242 -0
  161. package/src/modules/payments/models/payment.model.js +22 -0
  162. package/src/modules/payments/routes/payments.routes.js +4 -25
  163. package/src/modules/payments/routes/payments.tinkoff.routes.js +58 -0
  164. package/src/modules/products/components/pages/Product.vue +3 -1
  165. package/src/modules/products/components/sections/SectionProduct.vue +3 -0
  166. package/src/modules/products/controllers/products.controller.js +188 -109
  167. package/src/modules/products/models/product.model.js +1 -0
  168. package/src/modules/wallet/components/pages/Wallet.vue +72 -87
  169. package/src/modules/wallet/controllers/crypto.controller.js +79 -0
  170. package/src/modules/wallet/models/wallet.model.js +27 -0
  171. /package/src/modules/{orders/models/payment.model.js → payments/models/payment.tinkoff.model.js} +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("../../../globals/store/globals.cjs");require("../../store/orders.cjs");const a=require("../../../../components/Block/Block.vue.cjs"),o=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/FieldPhone/FieldPhone2.vue.cjs"),s=require("../../../../components/Select/Select.vue.cjs"),m=require("../../../../components/Address/Address.vue2.cjs"),c=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),n=require("../../../../components/Radio/Radio.vue.cjs"),y={class:"order-form col"},f=t.createElementVNode("p",{class:"mn-b-small"}," Prefer to chat instead of calling? Just drop your messenger info here: ",-1),v={class:"flex-nowrap flex"},b={class:"mn-b-small flex-nowrap flex"},p={class:"mn-b-small flex-nowrap flex"},g={__name:"FormOrderDetails",props:{order:Object},setup(l){const i=l;return t.onMounted(()=>{r.state.position&&(i.order.delivery.address=r.state.position.address),r.state.position&&(i.order.delivery.location=r.state.position.location)}),(w,e)=>(t.openBlock(),t.createElementBlock("div",y,[t.createVNode(a.default,{title:"Personal Data",class:"mn-b-thin"},{default:t.withCtx(()=>[t.createVNode(o.default,{field:l.order.user.name,"onUpdate:field":e[0]||(e[0]=d=>l.order.user.name=d),label:"Name*",placeholder:"Enter your name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),t.createVNode(u.default,{modelValue:l.order.user.phone,"onUpdate:modelValue":e[1]||(e[1]=d=>l.order.user.phone=d),onCountry:e[2]||(e[2]=d=>{l.order.user.number=d}),inputOptions:{placeholder:"Enter contact phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["modelValue"]),f,t.createElementVNode("div",v,[t.createVNode(s.default,{options:[{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"},{name:"Line",value:"line"}],"onUpdate:select":e[3]||(e[3]=d=>l.order.user.messenger.type=d.value),placeholder:"Messenger",size:"small",class:"bg-white pd-medium radius-small mn-r-small"}),t.createVNode(o.default,{field:l.order.user.messenger.value,"onUpdate:field":e[4]||(e[4]=d=>l.order.user.messenger.value=d),placeholder:"Enter your contact here",class:"bg-white pd-medium radius-small w-100"},null,8,["field"])])]),_:1}),t.createVNode(a.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[t.createElementVNode("div",b,[t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[5]||(e[5]=d=>l.order.delivery.type=d),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[6]||(e[6]=d=>l.order.delivery.type=d),label:"Post",value:"Post",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),t.createVNode(m.default,{label:"Address",apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium","onUpdate:location":e[7]||(e[7]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[8]||(e[8]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(c.default,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":e[9]||(e[9]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[10]||(e[10]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(o.default,{field:l.order.comment,"onUpdate:field":e[11]||(e[11]=d=>l.order.comment=d),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1},8,["tooltip"]),t.createVNode(a.default,{title:"Payment"},{default:t.withCtx(()=>[t.createElementVNode("div",p,[t.createVNode(s.default,{select:l.order.payment.type,"onUpdate:select":e[12]||(e[12]=d=>l.order.payment.type=d),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1})]))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("../../../globals/store/globals.cjs");require("../../store/orders.cjs");const a=require("../../../../components/Block/Block.vue.cjs"),o=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/FieldPhone/FieldPhone2.vue.cjs"),s=require("../../../../components/Select/Select.vue2.cjs"),m=require("../../../../components/Address/Address.vue2.cjs"),c=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),n=require("../../../../components/Radio/Radio.vue.cjs"),y={class:"order-form col"},f=t.createElementVNode("p",{class:"mn-b-small"}," Prefer to chat instead of calling? Just drop your messenger info here: ",-1),v={class:"flex-nowrap flex"},b={class:"mn-b-small flex-nowrap flex"},p={class:"mn-b-small flex-nowrap flex"},g={__name:"FormOrderDetails",props:{order:Object},setup(l){const i=l;return t.onMounted(()=>{r.state.position&&(i.order.delivery.address=r.state.position.address),r.state.position&&(i.order.delivery.location=r.state.position.location)}),(w,e)=>(t.openBlock(),t.createElementBlock("div",y,[t.createVNode(a.default,{title:"Personal Data",class:"mn-b-thin"},{default:t.withCtx(()=>[t.createVNode(o.default,{field:l.order.user.name,"onUpdate:field":e[0]||(e[0]=d=>l.order.user.name=d),label:"Name*",placeholder:"Enter your name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),t.createVNode(u.default,{modelValue:l.order.user.phone,"onUpdate:modelValue":e[1]||(e[1]=d=>l.order.user.phone=d),onCountry:e[2]||(e[2]=d=>{l.order.user.number=d}),inputOptions:{placeholder:"Enter contact phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["modelValue"]),f,t.createElementVNode("div",v,[t.createVNode(s.default,{options:[{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"},{name:"Line",value:"line"}],"onUpdate:select":e[3]||(e[3]=d=>l.order.user.messenger.type=d.value),placeholder:"Messenger",size:"small",class:"bg-white pd-medium radius-small mn-r-small"}),t.createVNode(o.default,{field:l.order.user.messenger.value,"onUpdate:field":e[4]||(e[4]=d=>l.order.user.messenger.value=d),placeholder:"Enter your contact here",class:"bg-white pd-medium radius-small w-100"},null,8,["field"])])]),_:1}),t.createVNode(a.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[t.createElementVNode("div",b,[t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[5]||(e[5]=d=>l.order.delivery.type=d),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[6]||(e[6]=d=>l.order.delivery.type=d),label:"Post",value:"Post",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),t.createVNode(m.default,{label:"Address",apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium","onUpdate:location":e[7]||(e[7]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[8]||(e[8]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(c.default,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":e[9]||(e[9]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[10]||(e[10]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(o.default,{field:l.order.comment,"onUpdate:field":e[11]||(e[11]=d=>l.order.comment=d),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1},8,["tooltip"]),t.createVNode(a.default,{title:"Payment"},{default:t.withCtx(()=>[t.createElementVNode("div",p,[t.createVNode(s.default,{select:l.order.payment.type,"onUpdate:select":e[12]||(e[12]=d=>l.order.payment.type=d),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1})]))}};exports.default=g;
@@ -2,9 +2,9 @@ import { onMounted as y, openBlock as p, createElementBlock as f, createVNode as
2
2
  import { state as t } from "../../../globals/store/globals.js";
3
3
  import "../../store/orders.js";
4
4
  import i from "../../../../components/Block/Block.vue.js";
5
- import s from "../../../../components/Field/Field.vue.js";
5
+ import s from "../../../../components/Field/Field.vue2.js";
6
6
  import v from "../../../../components/FieldPhone/FieldPhone2.vue.js";
7
- import m from "../../../../components/Select/Select.vue.js";
7
+ import m from "../../../../components/Select/Select.vue2.js";
8
8
  import b from "../../../../components/Address/Address.vue2.js";
9
9
  import c from "../../../../components/LocationMarker/LocationMarker.vue2.js";
10
10
  import u from "../../../../components/Radio/Radio.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const e=s.reactive({organization:null,positions:[],currentState:!1}),n={toggleShopcart(){e.currentState=!e.currentState},setShopcart(){try{const t=localStorage.getItem("shopcart");if(t){const o=JSON.parse(t);e.positions=o.positions,e.organization=o.organization}}catch(t){throw console.error(t),t}},addProductToCart(t,o){const i=e.positions.find(r=>r._id===t._id);i?i.quantity++:e.positions.push({_id:t._id,images:t.images,name:t.name,price:t.price,quantity:1,org_id:o}),localStorage.setItem("shopcart",JSON.stringify({positions:e.positions,organization:o}))},removeProduct(t){const o=e.positions.find(r=>r._id===t),i=e.positions.indexOf(o);i>-1&&(e.positions.splice(i,1),localStorage.setItem("shopcart",JSON.stringify(e.positions)))},decrementItemQuantity(t){const o=e.positions.find(r=>r._id===t),i=e.positions.indexOf(o);i>-1&&(o.quantity--,o.quantity<1&&e.positions.splice(i,1),localStorage.setItem("shopcart",JSON.stringify(e.positions)))},incrementItemQuantity(t){const o=e.positions.find(i=>i._id===t);o&&(o.quantity++,localStorage.setItem("shopcart",JSON.stringify(e.positions)))},resetShopcart({state:t}){t.positions=[],localStorage.removeItem("shopcart")}};s.computed(()=>Number(e.positions.reduce((t,o)=>t+o.price*o.quantity,0))),s.computed(()=>Number(e.positions.reduce((t,o)=>t+o.quantity,0))),s.computed(()=>Number(e.currentState));s.watch(e,(t,o)=>{});exports.actions=n;exports.state=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const t=r.reactive({organization:null,positions:[],currentState:!1}),s={toggleShopcart(){t.currentState=!t.currentState},setShopcart(){try{const o=localStorage.getItem("shopcart");if(o){const i=JSON.parse(o);t.positions=i.positions,t.organization=i.organization}}catch(o){throw console.error(o),o}},addProductToCart(o,i){const e=t.positions.find(n=>n._id===o._id);e?e.quantity++:t.positions.push({_id:o._id,images:o.images,name:o.name,price:o.price,quantity:1,org_id:i}),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:i}))},removeProduct(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},decrementItemQuantity(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(i.quantity--,i.quantity<1&&t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},incrementItemQuantity(o){const i=t.positions.find(e=>e._id===o);i&&(i.quantity++,localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},resetShopcart({state:o}){o.positions=[],localStorage.removeItem("shopcart")}};r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.price*i.quantity,0))),r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.quantity,0))),r.computed(()=>Number(t.currentState));r.watch(t,(o,i)=>{});exports.actions=s;exports.state=t;
@@ -1,11 +1,11 @@
1
- import { reactive as n, computed as s, watch as a } from "vue";
1
+ import { reactive as s, computed as r, watch as a } from "vue";
2
2
  import "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import "../../globals/store/globals.js";
4
- const o = n({
4
+ const o = s({
5
5
  organization: null,
6
6
  positions: [],
7
7
  currentState: !1
8
- }), u = {
8
+ }), g = {
9
9
  toggleShopcart() {
10
10
  o.currentState = !o.currentState;
11
11
  },
@@ -22,7 +22,7 @@ const o = n({
22
22
  },
23
23
  addProductToCart(t, i) {
24
24
  const e = o.positions.find(
25
- (r) => r._id === t._id
25
+ (n) => n._id === t._id
26
26
  );
27
27
  e ? e.quantity++ : o.positions.push({
28
28
  _id: t._id,
@@ -40,30 +40,39 @@ const o = n({
40
40
  },
41
41
  removeProduct(t) {
42
42
  const i = o.positions.find(
43
- (r) => r._id === t
43
+ (n) => n._id === t
44
44
  ), e = o.positions.indexOf(i);
45
- e > -1 && (o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify(o.positions)));
45
+ e > -1 && (o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify({
46
+ positions: o.positions,
47
+ organization: o.organization
48
+ })));
46
49
  },
47
50
  decrementItemQuantity(t) {
48
51
  const i = o.positions.find(
49
- (r) => r._id === t
52
+ (n) => n._id === t
50
53
  ), e = o.positions.indexOf(i);
51
- e > -1 && (i.quantity--, i.quantity < 1 && o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify(o.positions)));
54
+ e > -1 && (i.quantity--, i.quantity < 1 && o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify({
55
+ positions: o.positions,
56
+ organization: o.organization
57
+ })));
52
58
  },
53
59
  incrementItemQuantity(t) {
54
60
  const i = o.positions.find(
55
61
  (e) => e._id === t
56
62
  );
57
- i && (i.quantity++, localStorage.setItem("shopcart", JSON.stringify(o.positions)));
63
+ i && (i.quantity++, localStorage.setItem("shopcart", JSON.stringify({
64
+ positions: o.positions,
65
+ organization: o.organization
66
+ })));
58
67
  },
59
68
  resetShopcart({ state: t }) {
60
69
  t.positions = [], localStorage.removeItem("shopcart");
61
70
  }
62
71
  };
63
- s(() => Number(o.positions.reduce((t, i) => t + i.price * i.quantity, 0))), s(() => Number(o.positions.reduce((t, i) => t + i.quantity, 0))), s(() => Number(o.currentState));
72
+ r(() => Number(o.positions.reduce((t, i) => t + i.price * i.quantity, 0))), r(() => Number(o.positions.reduce((t, i) => t + i.quantity, 0))), r(() => Number(o.currentState));
64
73
  a(o, (t, i) => {
65
74
  });
66
75
  export {
67
- u as actions,
76
+ g as actions,
68
77
  o as state
69
78
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue2.cjs");require("./DepartmentMemberModify.vue2.cjs");const k={class:"br-grey radius-small mn-b-small"},v={key:1,class:"pd-small br-grey br-1px br-solid"},y=["disabled"],B={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(u,{emit:m}){const t=u,a=m,n=e.ref({subdepartment:null});t.department!==null&&(n.value=t.departments[t.department]);function d(o,l,r){return o.filter(s=>!(l.some(b=>b._id===s._id)||r._id===s._id))}const c=e.computed(()=>d(t.alldepartments,t.departments,t.maindepartment));async function i(){t.departments.push(n.value.subdepartment),a("callback")}async function p(){t.departments.splice(t.department,1),a("callback")}return(o,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",k,[t.department===null?(e.openBlock(),e.createBlock(e.unref(f.default),{key:0,modelValue:n.value.subdepartment,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value.subdepartment=r),options:c.value,"get-option-label":r=>r.name,class:"w-100 mn-b-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",v,e.toDisplayString(n.value.name?n.value.name:"Безымянный"),1))]),t.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!n.value.subdepartment,onClick:i,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,y)):e.createCommentVNode("",!0),t.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},g=_.default(B,[["__scopeId","data-v-5e4dcced"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../../../../components/Field/Field.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("./DepartmentMemberModify.vue2.cjs");const k={class:"br-grey radius-small mn-b-small"},v={key:1,class:"pd-small br-grey br-1px br-solid"},y=["disabled"],B={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(u,{emit:m}){const t=u,a=m,n=e.ref({subdepartment:null});t.department!==null&&(n.value=t.departments[t.department]);function d(o,l,r){return o.filter(s=>!(l.some(b=>b._id===s._id)||r._id===s._id))}const c=e.computed(()=>d(t.alldepartments,t.departments,t.maindepartment));async function i(){t.departments.push(n.value.subdepartment),a("callback")}async function p(){t.departments.splice(t.department,1),a("callback")}return(o,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",k,[t.department===null?(e.openBlock(),e.createBlock(e.unref(f.default),{key:0,modelValue:n.value.subdepartment,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value.subdepartment=r),options:c.value,"get-option-label":r=>r.name,class:"w-100 mn-b-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",v,e.toDisplayString(n.value.name?n.value.name:"Безымянный"),1))]),t.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!n.value.subdepartment,onClick:i,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,y)):e.createCommentVNode("",!0),t.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},g=_.default(B,[["__scopeId","data-v-5e4dcced"]]);exports.default=g;
@@ -1,8 +1,8 @@
1
1
  import { ref as v, computed as y, openBlock as r, createElementBlock as l, createElementVNode as k, createBlock as g, unref as h, toDisplayString as w, createCommentVNode as d } from "vue";
2
2
  import D from "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
3
- import "../../../../components/Field/Field.vue2.js";
3
+ import "../../../../components/Field/Field.vue.js";
4
4
  import M from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- import "../../../../components/Select/Select.vue2.js";
5
+ import "../../../../components/Select/Select.vue.js";
6
6
  import "./DepartmentMemberModify.vue2.js";
7
7
  const V = { class: "br-grey radius-small mn-b-small" }, x = {
8
8
  key: 1,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as m, createBlock as l, withCtx as g, createTextVNode as h, toDisplayString as y } from "vue";
2
- import b from "../../../../components/Button/Button.vue.js";
2
+ import b from "../../../../components/Button/Button.vue2.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as i } from "../../store/memberships.js";
5
5
  const M = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const p=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue2.cjs");const m=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Checkbox/Checkbox.vue2.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const s=require("../../../../components/Button/Button.vue.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const r=require("../../../spots/store/spots.cjs"),i=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const _={class:"for-transition w-100"},f={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},h={class:"flex-nowrap flex bg-grey pd-medium radius-big"},b={key:0,class:"mn-r-auto"},w={key:1,class:"mn-r-auto"},g={class:"flex-nowrap flex pd-thin"},k={class:"flex-nowrap flex pd-thin"},x={__name:"DepartmentEdit",setup(V){const n=a.useRouter(),t=a.useRoute();e.ref("details"),e.ref(!1);async function o(){t.params.department&&await i.actions.read(t.params.department),e.ref(i.state.memberships),await r.actions.read(t.params._id),t.params.department&&await r.actions.readOne(t.params.department)}o(),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function c(){t.params.department&&await r.actions.update(t.params._id,r.state.department),t.params.department||await r.actions.create(t.params._id,r.state.department)}function d(){n.replace({name:"Department",params:{_id:t.params._id,department:r.state.department._id}})}async function u(){await r.actions.delete(t.params._id,r.state.department)}return(l,N)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",f,[e.createVNode(p.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",h,[e.unref(t).params.department?(e.openBlock(),e.createElementBlock("h1",b,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",w,"Create Spot")),e.createElementVNode("section",g,[e.createVNode(s.default,{submit:c,callback:d},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("section",k,[e.createVNode(s.default,{submit:u,callback:l.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},E=m.default(x,[["__scopeId","data-v-190683d5"]]);exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const p=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const m=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const s=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const r=require("../../../spots/store/spots.cjs"),i=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const _={class:"for-transition w-100"},f={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},h={class:"flex-nowrap flex bg-grey pd-medium radius-big"},b={key:0,class:"mn-r-auto"},w={key:1,class:"mn-r-auto"},g={class:"flex-nowrap flex pd-thin"},k={class:"flex-nowrap flex pd-thin"},x={__name:"DepartmentEdit",setup(V){const n=a.useRouter(),t=a.useRoute();e.ref("details"),e.ref(!1);async function o(){t.params.department&&await i.actions.read(t.params.department),e.ref(i.state.memberships),await r.actions.read(t.params._id),t.params.department&&await r.actions.readOne(t.params.department)}o(),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function c(){t.params.department&&await r.actions.update(t.params._id,r.state.department),t.params.department||await r.actions.create(t.params._id,r.state.department)}function d(){n.replace({name:"Department",params:{_id:t.params._id,department:r.state.department._id}})}async function u(){await r.actions.delete(t.params._id,r.state.department)}return(l,N)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",f,[e.createVNode(p.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",h,[e.unref(t).params.department?(e.openBlock(),e.createElementBlock("h1",b,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",w,"Create Spot")),e.createElementVNode("section",g,[e.createVNode(s.default,{submit:c,callback:d},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("section",k,[e.createVNode(s.default,{submit:u,callback:l.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},E=m.default(x,[["__scopeId","data-v-190683d5"]]);exports.default=E;
@@ -2,17 +2,17 @@ import { ref as e, openBlock as s, createElementBlock as i, createElementVNode a
2
2
  import { useRouter as w, useRoute as x } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
4
  import g from "../../../../components/Breadcrumbs/Breadcrumbs.vue2.js";
5
- import "../../../../components/Tab/Tab.vue2.js";
6
- import "../../../../components/Field/Field.vue2.js";
5
+ import "../../../../components/Tab/Tab.vue.js";
6
+ import "../../../../components/Field/Field.vue.js";
7
7
  import y from "../../../../../../_virtual/_plugin-vue_export-helper.js";
8
- import "../../../../components/Select/Select.vue2.js";
9
- import "../../../../components/Checkbox/Checkbox.vue2.js";
8
+ import "../../../../components/Select/Select.vue.js";
9
+ import "../../../../components/Checkbox/Checkbox.vue.js";
10
10
  import "../../../../components/Address/Address.vue.js";
11
11
  import "../../../../components/Loader/Loader.vue.js";
12
12
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
13
- import d from "../../../../components/Button/Button.vue.js";
13
+ import d from "../../../../components/Button/Button.vue2.js";
14
14
  import "vue-i18n";
15
- import "../../../../components/Popup/Popup.vue2.js";
15
+ import "../../../../components/Popup/Popup.vue.js";
16
16
  import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
17
17
  import "../blocks/EditArray.vue2.js";
18
18
  import "../blocks/DepartmentSub.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const f=require("../../../../components/Tab/Tab.vue.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../../../events/components/sections/Feed.vue.cjs"),h=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),g=require("../sections/DetailsTab.vue.cjs"),w=require("../../../products/components/pages/Products.vue.cjs"),o=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),C=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const N={key:0,class:"pd-thin for-transition w-100"},B={class:"pos-relative"},V={key:0},x={__name:"Organization",setup(z){const l=c.useRouter(),t=c.useRoute();let m=t.query.tab?t.query.tab:"products";const d=e.ref(null);e.onMounted(async()=>{d.value=await a.actions.read({_id:t.params._id,user:o.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(m);return t.query.tab=r.value,e.watch(r,u=>{l.replace({query:{...t.query,tab:u}})}),(u,n)=>{const i=e.resolveComponent("router-link");return d.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(g.default,{organization:a.state.current,user:o.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(f.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=s=>r.value=s),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",B,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(h.default,{key:0,user:o.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:o.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"&&o.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(k.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(i,{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(i,{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(i,{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(w.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",V,[e.createVNode(b.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:s=>C.actions.read(e.unref(t).params._id),state:a.state},options:{user:o.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(p,_)=>(e.openBlock(),e.createBlock(q.default,{key:_,spot:p,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),o.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=s=>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=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const f=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../../../events/components/sections/Feed.vue.cjs"),h=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),g=require("../sections/DetailsTab.vue.cjs"),w=require("../../../products/components/pages/Products.vue.cjs"),o=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),C=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const N={key:0,class:"pd-thin for-transition w-100"},B={class:"pos-relative"},V={key:0},x={__name:"Organization",setup(z){const l=c.useRouter(),t=c.useRoute();let m=t.query.tab?t.query.tab:"products";const d=e.ref(null);e.onMounted(async()=>{d.value=await a.actions.read({_id:t.params._id,user:o.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(m);return t.query.tab=r.value,e.watch(r,u=>{l.replace({query:{...t.query,tab:u}})}),(u,n)=>{const i=e.resolveComponent("router-link");return d.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(g.default,{organization:a.state.current,user:o.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(f.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=s=>r.value=s),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",B,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(h.default,{key:0,user:o.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:o.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"&&o.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(k.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(i,{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(i,{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(i,{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(w.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",V,[e.createVNode(b.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:s=>C.actions.read(e.unref(t).params._id),state:a.state},options:{user:o.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(p,_)=>(e.openBlock(),e.createBlock(q.default,{key:_,spot:p,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),o.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=s=>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=x;
@@ -3,7 +3,7 @@ import { useRouter as N, useRoute as O } 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 P from "../../../../components/Tab/Tab.vue.js";
6
+ import P from "../../../../components/Tab/Tab.vue2.js";
7
7
  import V from "../../../../components/Block/Block.vue.js";
8
8
  import A from "../../../../components/Feed/Feed.vue.js";
9
9
  import "../../../mobile/components/Menu/Menu.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
@@ -4,13 +4,13 @@ import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import v from "../../../../components/FieldTags/BlockTags.vue.js";
7
- import "../../../../components/Tab/Tab.vue2.js";
8
- import i from "../../../../components/Field/Field.vue.js";
9
- import "../../../../components/Select/Select.vue2.js";
7
+ import "../../../../components/Tab/Tab.vue.js";
8
+ import i from "../../../../components/Field/Field.vue2.js";
9
+ import "../../../../components/Select/Select.vue.js";
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import k from "../../../../components/UploadImage/UploadImage.vue.js";
12
- import T from "../../../../components/Button/Button.vue.js";
13
- import "../../../../components/Popup/Popup.vue2.js";
12
+ import T from "../../../../components/Button/Button.vue2.js";
13
+ import "../../../../components/Popup/Popup.vue.js";
14
14
  import { state as z } from "../../../auth/store/auth.js";
15
15
  import { actions as s, state as e } from "../../store/organizations.js";
16
16
  import "../../store/memberships.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),c=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},b={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),_={__name:"Organizations",setup(p){const t=l.useRoute(),d=l.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,o=>{d.replace({query:{...t.query,tab:o}})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",b,[f,e.createElementVNode("button",{onClick:a[0]||(a[0]=s=>o.$router.push({name:"Create Organization"})),class:"bg-second radius-100 i-big hover-scale-1 cursor-pointer t-whitebg-second"}," + ")]),e.createVNode(c.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=s=>r.value=s),tabs:[{name:"Owner",value:"owner"},{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-b-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="owner"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.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==="member"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,member:e.unref(t).params._id},null,8,["user","member"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),c=require("../../../../components/Tab/Tab.vue2.cjs"),u=require("../sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},b={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),_={__name:"Organizations",setup(p){const t=l.useRoute(),d=l.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,o=>{d.replace({query:{...t.query,tab:o}})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",b,[f,e.createElementVNode("button",{onClick:a[0]||(a[0]=s=>o.$router.push({name:"Create Organization"})),class:"bg-second radius-100 i-big hover-scale-1 cursor-pointer t-whitebg-second"}," + ")]),e.createVNode(c.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=s=>r.value=s),tabs:[{name:"Owner",value:"owner"},{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-b-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="owner"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.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==="member"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,member:e.unref(t).params._id},null,8,["user","member"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(u.default,{key:0,user:n.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as v, watch as w, openBlock as a, createElementBlock as h, createElementVNode as b, createVNode as s, Transition as n, withCtx as u, createBlock as l, unref as m, createCommentVNode as i } from "vue";
2
2
  import { useRoute as g, useRouter as y } from "vue-router";
3
- import k from "../../../../components/Tab/Tab.vue.js";
3
+ import k from "../../../../components/Tab/Tab.vue2.js";
4
4
  import d from "../sections/Feed.vue.js";
5
5
  import { state as c } from "../../../auth/store/auth.js";
6
6
  const q = { class: "pd-thin" }, x = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, C = /* @__PURE__ */ b("h2", { class: "mn-r-medium" }, "Groups", -1), E = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue.cjs");require("vue-i18n");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,x)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:P=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,x)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:P=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
@@ -1,10 +1,10 @@
1
1
  import { ref as r, watchEffect as y, resolveComponent as P, openBlock as t, createElementBlock as s, createElementVNode as o, Fragment as i, renderList as d, unref as _, toDisplayString as f, createVNode as h, withCtx as k, pushScopeId as w, popScopeId as C } from "vue";
2
2
  import { useRouter as I, useRoute as g } from "vue-router";
3
- import D from "../../../../components/Field/Field.vue.js";
3
+ import D from "../../../../components/Field/Field.vue2.js";
4
4
  import "vue-i18n";
5
5
  import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
- import "../../../../components/Popup/Popup.vue2.js";
7
- import "../../../../components/Button/Button.vue2.js";
6
+ import "../../../../components/Popup/Popup.vue.js";
7
+ import "../../../../components/Button/Button.vue.js";
8
8
  import "./Documents.vue2.js";
9
9
  const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "documents" }, F = /* @__PURE__ */ E(() => /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Список документов", -1)), N = { class: "mn-b-big cols-4" }, O = ["onClick"], R = { class: "mn-b-small" }, U = { class: "t-semi t-transp radius-small" }, V = {
10
10
  __name: "Documents",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const c=require("../blocks/EmptyState.vue.cjs"),m=require("../blocks/CardDepartment.vue.cjs"),d=require("../../store/departments.cjs"),p=require("../../../auth/store/auth.cjs"),g={__name:"FeedDepartments",props:{organization:Object,units:Array,memberships:Array},async setup(a){let l,u;const o=a;e.ref("departments"),[l,u]=e.withAsyncContext(()=>d.actions.read(o.organization._id)),await l,u();const i=e.computed(()=>{const n=d.state.departments,r=n.flatMap(t=>t.subdepartments.map(s=>s._id));return n.filter(t=>!r.includes(t._id))});return(n,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[i.value.length<1?(e.openBlock(),e.createBlock(c.default,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>n.$router.push(`/organizations/${o.organization._id}/departments/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t,s)=>(e.openBlock(),e.createBlock(m.default,{key:s,department:t,organization:a.organization,class:"radius-big bg-grey mn-b-thin"},null,8,["department","organization"]))),128)),i.value.length>0&&p.state.user._id===a.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r[0]||(r[0]=t=>n.$router.push(`/organizations/${o.organization._id}/departments/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const c=require("../blocks/EmptyState.vue.cjs"),m=require("../blocks/CardDepartment.vue.cjs"),d=require("../../store/departments.cjs"),p=require("../../../auth/store/auth.cjs"),g={__name:"FeedDepartments",props:{organization:Object,units:Array,memberships:Array},async setup(a){let l,u;const o=a;e.ref("departments"),[l,u]=e.withAsyncContext(()=>d.actions.read(o.organization._id)),await l,u();const i=e.computed(()=>{const n=d.state.departments,r=n.flatMap(t=>t.subdepartments.map(s=>s._id));return n.filter(t=>!r.includes(t._id))});return(n,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[i.value.length<1?(e.openBlock(),e.createBlock(c.default,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>n.$router.push(`/organizations/${o.organization._id}/departments/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t,s)=>(e.openBlock(),e.createBlock(m.default,{key:s,department:t,organization:a.organization,class:"radius-big bg-grey mn-b-thin"},null,8,["department","organization"]))),128)),i.value.length>0&&p.state.user._id===a.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r[0]||(r[0]=t=>n.$router.push(`/organizations/${o.organization._id}/departments/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { ref as g, withAsyncContext as b, computed as f, openBlock as n, createBlock as d, Transition as y, withCtx as _, createElementVNode as u, createCommentVNode as p, createElementBlock as c, Fragment as h, renderList as z } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
3
  import k from "../blocks/EmptyState.vue.js";
4
4
  import v from "../blocks/CardDepartment.vue.js";
5
5
  import { actions as $, state as A } from "../../store/departments.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/Select/Select.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");const c=require("../../store/invites.cjs"),b={class:"mn-b-medium radius-medium pd-semi bg-white"},h=e.createElementVNode("h3",{class:"mn-b-medium"},"Добавить участников",-1),k=e.createElementVNode("p",{class:"mn-b-small t-transp p-medium"},"Укажите email или телефон, чтобы отправить ссылку с приглашением:",-1),E={class:"w-100 flex-nowrap flex"},V={key:0,class:"mn-r-medium flex-v-center flex"},N=["onClick"],g=e.createElementVNode("p",{class:"t-blue mn-r-small"},"+ Добавить приглашение",-1),w=[g],B=e.createElementVNode("span",null,"Отправить приглашения ",-1),x={__name:"MembersAdd",props:{organization:Object},emits:["send-invite"],setup(s,{emit:q}){const i=s,r=e.ref(null),t=e.ref([{contact:"",role:""}]);function d(){t.value.push({contact:"",role:""})}function m(n){t.value.splice(n,1)}async function u(n){await c.actions.create(i.organization._id,t.value)}function p(){}return(n,y)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("section",b,[h,k,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(l,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"br-1px br-solid br-grey flex radius-small mn-b-thin"},[e.createElementVNode("div",E,[e.createVNode(_.default,{field:l.contact,"onUpdate:field":a=>l.contact=a,placeholder:"Email или телефон",class:"w-100 bg-white",validation:r.value},null,8,["field","onUpdate:field","validation"]),o>0?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("button",{onClick:a=>m(o),class:"button-small button"},"×",8,N)])):e.createCommentVNode("",!0)]),e.createVNode(v.default,{options:[{name:"Директор",value:"director"},{name:"Менеджер",value:"manager"},{name:"Сотрудник",value:"member"}],prop:l,content:"role",placeholder:"Роль",size:"small",class:"w-80"},null,8,["prop"])]))),128)),e.createElementVNode("div",{onClick:d,class:"mn-b-small flex-v-center flex-nowrap flex"},w),e.createVNode(f.default,{submit:n.a=()=>u(c.state.invites),callback:p,class:"mn-t-medium"},{default:e.withCtx(()=>[B]),_:1},8,["submit"])])]))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/Select/Select.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs");require("../../../middlewares/client/inputs.validation.cjs");const c=require("../../store/invites.cjs"),b={class:"mn-b-medium radius-medium pd-semi bg-white"},h=e.createElementVNode("h3",{class:"mn-b-medium"},"Добавить участников",-1),k=e.createElementVNode("p",{class:"mn-b-small t-transp p-medium"},"Укажите email или телефон, чтобы отправить ссылку с приглашением:",-1),E={class:"w-100 flex-nowrap flex"},V={key:0,class:"mn-r-medium flex-v-center flex"},N=["onClick"],g=e.createElementVNode("p",{class:"t-blue mn-r-small"},"+ Добавить приглашение",-1),w=[g],B=e.createElementVNode("span",null,"Отправить приглашения ",-1),x={__name:"MembersAdd",props:{organization:Object},emits:["send-invite"],setup(s,{emit:q}){const i=s,r=e.ref(null),t=e.ref([{contact:"",role:""}]);function d(){t.value.push({contact:"",role:""})}function m(n){t.value.splice(n,1)}async function u(n){await c.actions.create(i.organization._id,t.value)}function p(){}return(n,y)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("section",b,[h,k,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(l,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"br-1px br-solid br-grey flex radius-small mn-b-thin"},[e.createElementVNode("div",E,[e.createVNode(_.default,{field:l.contact,"onUpdate:field":a=>l.contact=a,placeholder:"Email или телефон",class:"w-100 bg-white",validation:r.value},null,8,["field","onUpdate:field","validation"]),o>0?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("button",{onClick:a=>m(o),class:"button-small button"},"×",8,N)])):e.createCommentVNode("",!0)]),e.createVNode(v.default,{options:[{name:"Директор",value:"director"},{name:"Менеджер",value:"manager"},{name:"Сотрудник",value:"member"}],prop:l,content:"role",placeholder:"Роль",size:"small",class:"w-80"},null,8,["prop"])]))),128)),e.createElementVNode("div",{onClick:d,class:"mn-b-small flex-v-center flex-nowrap flex"},w),e.createVNode(f.default,{submit:n.a=()=>u(c.state.invites),callback:p,class:"mn-t-medium"},{default:e.withCtx(()=>[B]),_:1},8,["submit"])])]))}};exports.default=x;
@@ -1,7 +1,7 @@
1
1
  import { ref as m, openBlock as l, createElementBlock as o, createElementVNode as e, Fragment as b, renderList as h, createVNode as i, createCommentVNode as w, withCtx as x } from "vue";
2
- import g from "../../../../components/Field/Field.vue.js";
3
- import k from "../../../../components/Select/Select.vue.js";
4
- import C from "../../../../components/Button/Button.vue.js";
2
+ import g from "../../../../components/Field/Field.vue2.js";
3
+ import k from "../../../../components/Select/Select.vue2.js";
4
+ import C from "../../../../components/Button/Button.vue2.js";
5
5
  import "../../../middlewares/client/inputs.validation.js";
6
6
  import { state as y, actions as V } from "../../store/invites.js";
7
7
  const z = { class: "mn-b-medium radius-medium pd-semi bg-white" }, E = /* @__PURE__ */ e("h3", { class: "mn-b-medium" }, "Добавить участников", -1), M = /* @__PURE__ */ e("p", { class: "mn-b-small t-transp p-medium" }, "Укажите email или телефон, чтобы отправить ссылку с приглашением:", -1), N = { class: "w-100 flex-nowrap flex" }, B = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../../../../components/Tab/Tab.vue.cjs"),v={class:"mn-b-big radius-medium bg-white"},b={key:0,class:"pd-semi"},_={class:"br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium"},k={class:"w-100 mn-r-small"},h={class:"t-transp"},B={key:0,class:"mn-l-medium flex-v-center flex"},f=["onClick"],g={key:1,class:"pd-semi"},E={key:0},y={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},x={class:"w-100 mn-r-small"},N={class:"t-transp"},V={class:"mn-l-medium flex-v-center flex"},C=["onClick"],S={__name:"MembersList",props:{organization:Object,memberships:Array,invites:Array},emits:[["removeMember","removeInvite"]],setup(n,{emit:a}){const i=n,c=a,o=e.ref("members");function m(l,s){i.memberships.splice(l,1),c("removeMember",s)}function d(l,s){i.invites.splice(l,1),c("removeInvite",s)}return(l,s)=>(e.openBlock(),e.createElementBlock("section",v,[e.createVNode(p.default,{selected:o.value,"onUpdate:selected":s[0]||(s[0]=t=>o.value=t),class:"br-grey br-b br-solid radius-small",tabs:[{name:"Участники",value:"members"},{name:"Приглашения",value:"invites"}]},null,8,["selected"]),o.value==="members"?(e.openBlock(),e.createElementBlock("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.memberships,(t,r)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("span",k,e.toDisplayString(t.user.email)+" "+e.toDisplayString(t.user.phone),1),e.createElementVNode("span",h,e.toDisplayString(t.position),1),t.position!=="Основатель"?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("button",{onClick:u=>m(r,t),class:"button-small button"},"×",8,f)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),o.value==="invites"?(e.openBlock(),e.createElementBlock("div",g,[n.invites.length<1?(e.openBlock(),e.createElementBlock("span",E,"В организации нет приглашений")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",x,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",N,e.toDisplayString(t.status),1),e.createElementVNode("div",V,[e.createElementVNode("button",{onClick:u=>d(r,t),class:"button-small button"},"×",8,C)])]))),256))])):e.createCommentVNode("",!0)]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../../../../components/Tab/Tab.vue2.cjs"),v={class:"mn-b-big radius-medium bg-white"},b={key:0,class:"pd-semi"},_={class:"br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium"},k={class:"w-100 mn-r-small"},h={class:"t-transp"},B={key:0,class:"mn-l-medium flex-v-center flex"},f=["onClick"],g={key:1,class:"pd-semi"},E={key:0},y={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},x={class:"w-100 mn-r-small"},N={class:"t-transp"},V={class:"mn-l-medium flex-v-center flex"},C=["onClick"],S={__name:"MembersList",props:{organization:Object,memberships:Array,invites:Array},emits:[["removeMember","removeInvite"]],setup(n,{emit:a}){const i=n,c=a,o=e.ref("members");function m(l,s){i.memberships.splice(l,1),c("removeMember",s)}function d(l,s){i.invites.splice(l,1),c("removeInvite",s)}return(l,s)=>(e.openBlock(),e.createElementBlock("section",v,[e.createVNode(p.default,{selected:o.value,"onUpdate:selected":s[0]||(s[0]=t=>o.value=t),class:"br-grey br-b br-solid radius-small",tabs:[{name:"Участники",value:"members"},{name:"Приглашения",value:"invites"}]},null,8,["selected"]),o.value==="members"?(e.openBlock(),e.createElementBlock("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.memberships,(t,r)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("span",k,e.toDisplayString(t.user.email)+" "+e.toDisplayString(t.user.phone),1),e.createElementVNode("span",h,e.toDisplayString(t.position),1),t.position!=="Основатель"?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("button",{onClick:u=>m(r,t),class:"button-small button"},"×",8,f)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),o.value==="invites"?(e.openBlock(),e.createElementBlock("div",g,[n.invites.length<1?(e.openBlock(),e.createElementBlock("span",E,"В организации нет приглашений")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",x,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",N,e.toDisplayString(t.status),1),e.createElementVNode("div",V,[e.createElementVNode("button",{onClick:u=>d(r,t),class:"button-small button"},"×",8,C)])]))),256))])):e.createCommentVNode("",!0)]))}};exports.default=S;
@@ -1,5 +1,5 @@
1
1
  import { ref as x, openBlock as s, createElementBlock as t, createVNode as k, Fragment as v, renderList as b, createElementVNode as n, toDisplayString as o, createCommentVNode as m } from "vue";
2
- import y from "../../../../components/Tab/Tab.vue.js";
2
+ import y from "../../../../components/Tab/Tab.vue2.js";
3
3
  const g = { class: "mn-b-big radius-medium bg-white" }, w = {
4
4
  key: 0,
5
5
  class: "pd-semi"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const p=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/EmptyState.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const b=require("../blocks/CardOrganization.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let q=n.query.tab?n.query.tab:"details";const i=e.ref(q);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(m.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(b.default,{key:l._id,organization:l,user:p.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const p=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/EmptyState.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const b=require("../blocks/CardOrganization.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let q=n.query.tab?n.query.tab:"details";const i=e.ref(q);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(m.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(b.default,{key:l._id,organization:l,user:p.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
@@ -1,16 +1,16 @@
1
1
  import { ref as m, withAsyncContext as b, watch as _, openBlock as e, createElementBlock as n, createElementVNode as f, createBlock as p, Fragment as g, renderList as h, normalizeClass as w } from "vue";
2
2
  import { useRouter as v, useRoute as z } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
- import "../../../../components/Tab/Tab.vue2.js";
5
- import "../../../../components/Field/Field.vue2.js";
6
- import "../../../../components/Select/Select.vue2.js";
7
- import "../../../../components/Button/Button.vue2.js";
4
+ import "../../../../components/Tab/Tab.vue.js";
5
+ import "../../../../components/Field/Field.vue.js";
6
+ import "../../../../components/Select/Select.vue.js";
7
+ import "../../../../components/Button/Button.vue.js";
8
8
  import "../../../../components/Dropdown/Dropdown.vue2.js";
9
9
  import "../../../../components/Chips/Chips.vue2.js";
10
10
  import { state as k } from "../../../auth/store/auth.js";
11
11
  import "../../store/memberships.js";
12
12
  import "vue-i18n";
13
- import "../../../../components/Popup/Popup.vue2.js";
13
+ import "../../../../components/Popup/Popup.vue.js";
14
14
  import "../../../reports/store/reports.js";
15
15
  import { actions as q } from "../../store/organizations.js";
16
16
  import B from "../blocks/EmptyState.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../../components/Field/Field.vue.cjs"),y=require("../../../../components/Select/Select.vue.cjs"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),q={class:"gap-thin flex-nowrap flex"},k=["disabled"],N={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(c,{emit:i}){const t=c,s=i,l=e.ref(null),a=e.ref(null),d=e.ref("pcs"),u=e.ref(null),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity,u.value=t.product.price,d.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity,u.value=t.product.price,d.value=t.product.type),e.watch([l,a,u,d],()=>{s("update",{...l.value,price:u.value,quantity:a.value,type:d.value})});function m(){s("add",{...l.value,price:u.value,quantity:a.value,type:d.value})}function v(){s("delete",{...l.value,price:u.value,quantity:a.value,type:d.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(b.default,{modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=o=>l.value=o),options:c.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white h-100 pd-small radius-small"},null,8,["modelValue","options"]),e.createVNode(n.default,{field:u.value,"onUpdate:field":r[1]||(r[1]=o=>u.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(n.default,{field:a.value,"onUpdate:field":r[3]||(r[3]=o=>a.value=o),type:"number",label:"Quantity",class:"bg-white pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(y.default,{select:d.value,"onUpdate:select":r[2]||(r[2]=o=>d.value=o),options:["pcs","g","ml"],class:"bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),c.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,k)),c.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../../components/Field/Field.vue2.cjs"),y=require("../../../../components/Select/Select.vue2.cjs"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../icons/navigation/IconAdd.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),q={class:"gap-thin flex-nowrap flex"},k=["disabled"],N={__name:"CardPosition",props:{product:Object,array:Array,products:Array},emits:["add","delete","update"],setup(c,{emit:i}){const t=c,s=i,l=e.ref(null),a=e.ref(null),d=e.ref("pcs"),u=e.ref(null),p=e.computed(()=>l.value&&a.value>0&&u.value>0);e.watch(t.array,()=>{l.value=t.product,a.value=t.product.quantity,u.value=t.product.price,d.value=t.product.type}),t.product&&(l.value=t.product,a.value=t.product.quantity,u.value=t.product.price,d.value=t.product.type),e.watch([l,a,u,d],()=>{s("update",{...l.value,price:u.value,quantity:a.value,type:d.value})});function m(){s("add",{...l.value,price:u.value,quantity:a.value,type:d.value})}function v(){s("delete",{...l.value,price:u.value,quantity:a.value,type:d.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(b.default,{modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=o=>l.value=o),options:c.products,label:"name",multiple:!1,taggable:!1,placeholder:"Select a product",class:"bg-white h-100 pd-small radius-small"},null,8,["modelValue","options"]),e.createVNode(n.default,{field:u.value,"onUpdate:field":r[1]||(r[1]=o=>u.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(n.default,{field:a.value,"onUpdate:field":r[3]||(r[3]=o=>a.value=o),type:"number",label:"Quantity",class:"bg-white pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(y.default,{select:d.value,"onUpdate:select":r[2]||(r[2]=o=>d.value=o),options:["pcs","g","ml"],class:"bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),c.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!p.value,onClick:m,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(g.default),{class:"i-semi"})],8,k)),c.product?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(V.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]))}};exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { ref as i, computed as C, watch as m, openBlock as c, createElementBlock as n, createVNode as d, withCtx as P, unref as v, createCommentVNode as f } from "vue";
2
- import y from "../../../../components/Field/Field.vue.js";
3
- import V from "../../../../components/Select/Select.vue.js";
2
+ import y from "../../../../components/Field/Field.vue2.js";
3
+ import V from "../../../../components/Select/Select.vue2.js";
4
4
  import h from "../../../../components/SelectMulti/SelectMulti.vue.js";
5
5
  import q from "../../../icons/navigation/IconAdd.vue.js";
6
6
  import S from "../../../icons/navigation/IconDelete.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.vue.cjs"),c=require("../../../../components/Magnifier/Magnifier.vue.cjs");require("./ImagesThumbnails.vue2.cjs");const d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),p={class:"product-images"},m={class:"no-responsive cols-4 gap-thin"},_=["src","onClick"],g={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(o){const t=e.ref(!1),n=e.ref(0),a=s=>{n.value=s,t.value=!0},i=()=>{t.value=!1};return(s,v)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,(l,r)=>(e.openBlock(),e.createElementBlock("img",{key:r,src:(s.FILE_SERVER_URL||"")+l,onClick:h=>a(r),class:"radius-medium bg-white o-hidden thumbnail"},null,8,_))),128))]),e.createVNode(u.default,{onClosePopup:i,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(c.default,{imageSrc:(s.FILE_SERVER_URL||"")+o.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},f=d.default(g,[["__scopeId","data-v-5058c750"]]);exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.vue2.cjs"),c=require("../../../../components/Magnifier/Magnifier.vue.cjs");require("./ImagesThumbnails.vue2.cjs");const d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),p={class:"product-images"},m={class:"no-responsive cols-4 gap-thin"},_=["src","onClick"],g={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(o){const t=e.ref(!1),n=e.ref(0),a=s=>{n.value=s,t.value=!0},i=()=>{t.value=!1};return(s,v)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,(l,r)=>(e.openBlock(),e.createElementBlock("img",{key:r,src:(s.FILE_SERVER_URL||"")+l,onClick:h=>a(r),class:"radius-medium bg-white o-hidden thumbnail"},null,8,_))),128))]),e.createVNode(u.default,{onClosePopup:i,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(c.default,{imageSrc:(s.FILE_SERVER_URL||"")+o.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},f=d.default(g,[["__scopeId","data-v-5058c750"]]);exports.default=f;
@@ -1,5 +1,5 @@
1
1
  import { ref as r, openBlock as o, createElementBlock as i, createElementVNode as p, Fragment as d, renderList as _, createVNode as c, withCtx as g } from "vue";
2
- import f from "../../../../components/Popup/Popup.vue.js";
2
+ import f from "../../../../components/Popup/Popup.vue2.js";
3
3
  import h from "../../../../components/Magnifier/Magnifier.vue.js";
4
4
  import "./ImagesThumbnails.vue2.js";
5
5
  import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const g=require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../blocks/CardPosition.vue.cjs"),f=require("vue-router"),l=require("../../../globals/store/globals.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const h={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},N={class:""},q={class:"gap-thin flex-v-center flex-nojustify flex"},B={class:"mn-r-auto"},V={__name:"EditLeftover",setup(E){const s=f.useRoute(),c=f.useRouter(),i=e.ref(m.state.all);e.ref(null);const v=e.computed(()=>t.state.current.positions.reduce((o,r)=>o+r.price*(r.quantity||1),0));e.onMounted(async()=>{if(s.params.leftover)try{await t.actions.fetch(s.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const o=await m.actions.read({organization:s.params._id,limit:100});i.value=o}catch{console.error("error")}});function k(){s.params.leftover?t.actions.fetch(s.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){s.params.leftover?t.actions.update(t.state.current).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error")):t.actions.create(t.state.current).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error"))}function b(){t.actions.delete(s.params.leftover).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error"))}return(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",h,[e.createElementVNode("h2",N,e.toDisplayString(e.unref(s).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(g.default,{select:t.state.current.type,"onUpdate:select":r[0]||(r[0]=n=>t.state.current.type=n),options:["stock-in","stock-out","write-off"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(u.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{onAdd:r[1]||(r[1]=n=>l.actions.add(t.state.current.positions,n)),products:i.value},null,8,["products"])]),_:1}),e.createVNode(u.default,{title:"Invetory Sheet",placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(n,d)=>(e.openBlock(),e.createBlock(p.default,{key:n._id,product:n,array:t.state.current.positions,products:i.value,onAdd:r[2]||(r[2]=a=>l.actions.add(t.state.current.positions,a)),onUpdate:a=>l.actions.update(t.state.current.positions,a,d),onDelete:a=>l.actions.delete(t.state.current.positions,a,d)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1}),e.createVNode(u.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",q,[e.createElementVNode("h3",B," In total: "+e.toDisplayString(o.formatPrice(v.value)),1),e.createElementVNode("a",{onClick:r[3]||(r[3]=n=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:r[4]||(r[4]=n=>k())}," Reset "),e.unref(s).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r[5]||(r[5]=n=>b()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})],64))}};exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const g=require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../blocks/CardPosition.vue.cjs"),f=require("vue-router"),l=require("../../../globals/store/globals.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const h={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},N={class:""},q={class:"gap-thin flex-v-center flex-nojustify flex"},B={class:"mn-r-auto"},V={__name:"EditLeftover",setup(E){const s=f.useRoute(),c=f.useRouter(),i=e.ref(m.state.all);e.ref(null);const v=e.computed(()=>t.state.current.positions.reduce((o,r)=>o+r.price*(r.quantity||1),0));e.onMounted(async()=>{if(s.params.leftover)try{await t.actions.fetch(s.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const o=await m.actions.read({organization:s.params._id,limit:100});i.value=o}catch{console.error("error")}});function k(){s.params.leftover?t.actions.fetch(s.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){s.params.leftover?t.actions.update(t.state.current).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error")):t.actions.create(t.state.current).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error"))}function b(){t.actions.delete(s.params.leftover).then(()=>c.push({name:"Backoffice Leftovers"}),o=>console.error("error"))}return(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",h,[e.createElementVNode("h2",N,e.toDisplayString(e.unref(s).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(g.default,{select:t.state.current.type,"onUpdate:select":r[0]||(r[0]=n=>t.state.current.type=n),options:["stock-in","stock-out","write-off"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(u.default,{title:"Add Position",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{onAdd:r[1]||(r[1]=n=>l.actions.add(t.state.current.positions,n)),products:i.value},null,8,["products"])]),_:1}),e.createVNode(u.default,{title:"Invetory Sheet",placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(n,d)=>(e.openBlock(),e.createBlock(p.default,{key:n._id,product:n,array:t.state.current.positions,products:i.value,onAdd:r[2]||(r[2]=a=>l.actions.add(t.state.current.positions,a)),onUpdate:a=>l.actions.update(t.state.current.positions,a,d),onDelete:a=>l.actions.delete(t.state.current.positions,a,d)},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1}),e.createVNode(u.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",q,[e.createElementVNode("h3",B," In total: "+e.toDisplayString(o.formatPrice(v.value)),1),e.createElementVNode("a",{onClick:r[3]||(r[3]=n=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:r[4]||(r[4]=n=>k())}," Reset "),e.unref(s).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r[5]||(r[5]=n=>b()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})],64))}};exports.default=V;