@ozdao/prometheus-framework 0.2.221 → 0.2.223

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/dist/auth.server.js +4 -4
  2. package/dist/auth.server.mjs +4 -4
  3. package/dist/builder.js +72 -60
  4. package/dist/builder.mjs +72 -60
  5. package/dist/community.server.js +9 -4
  6. package/dist/community.server.mjs +9 -4
  7. package/dist/events.server.js +14 -24
  8. package/dist/events.server.mjs +14 -24
  9. package/dist/files.server.js +1 -1
  10. package/dist/files.server.mjs +1 -1
  11. package/dist/gallery.server.js +42 -76
  12. package/dist/gallery.server.mjs +41 -75
  13. package/dist/index-CsS7qx1d.js +243 -0
  14. package/dist/index-UIHE6Rk3.mjs +244 -0
  15. package/dist/main.css +1 -1
  16. package/dist/node_modules/@capacitor/core/dist/index.cjs +529 -0
  17. package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
  18. package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
  19. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
  20. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
  21. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
  22. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
  23. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
  24. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
  25. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
  26. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
  27. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
  28. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
  29. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
  30. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
  31. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
  32. package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
  33. package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
  34. package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
  35. package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
  36. package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
  37. package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
  38. package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
  39. package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
  40. package/dist/orders.server.js +2 -2
  41. package/dist/orders.server.mjs +2 -2
  42. package/dist/organizations.server.js +174 -95
  43. package/dist/organizations.server.mjs +174 -95
  44. package/dist/pages.server.js +1 -1
  45. package/dist/pages.server.mjs +1 -1
  46. package/dist/products.server.js +119 -266
  47. package/dist/products.server.mjs +119 -266
  48. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
  49. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
  50. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
  51. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
  52. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
  53. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
  54. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
  55. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
  56. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
  57. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
  58. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
  59. package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
  60. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +26 -41
  61. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
  62. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -42
  63. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
  64. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  66. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
  67. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
  68. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
  69. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
  70. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  72. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
  73. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
  74. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
  75. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
  76. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
  79. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
  80. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -1
  89. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
  90. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -1
  91. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  92. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
  95. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
  96. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
  97. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
  98. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +44 -0
  99. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
  100. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +44 -0
  101. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
  102. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
  103. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
  104. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
  105. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
  106. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
  107. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
  108. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
  109. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
  110. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
  111. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
  112. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
  113. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
  114. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +4 -2
  115. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
  116. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +4 -2
  117. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
  118. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +13 -9
  119. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
  120. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -10
  121. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  122. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +53 -40
  123. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
  124. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +58 -45
  125. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
  126. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
  127. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
  130. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
  132. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
  133. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
  134. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
  135. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
  136. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +4 -4
  137. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +4 -4
  138. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +47 -43
  139. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
  140. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +47 -43
  141. package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
  142. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
  143. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
  144. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
  145. package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
  146. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
  147. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
  148. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
  149. package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
  150. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +29 -54
  155. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
  156. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +30 -55
  157. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
  158. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +163 -134
  159. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
  160. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +165 -136
  161. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
  162. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +124 -135
  165. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  166. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
  167. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
  168. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  169. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
  170. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
  171. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
  172. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
  173. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
  174. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
  177. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
  178. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
  179. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
  180. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  182. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
  183. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
  184. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
  185. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
  186. package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
  187. package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
  188. package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
  189. package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
  190. package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
  191. package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
  192. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
  193. package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
  194. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +20 -11
  195. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  196. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +20 -11
  197. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  198. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
  199. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
  200. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
  201. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
  202. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
  203. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
  204. package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
  205. package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
  206. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
  207. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
  208. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
  209. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
  210. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  214. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
  215. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
  216. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
  217. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
  218. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
  219. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
  220. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
  221. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
  222. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  223. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
  224. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
  225. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
  226. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
  227. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  228. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
  229. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  230. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
  231. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
  232. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
  233. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
  234. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
  235. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
  236. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
  237. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
  238. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
  239. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
  240. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
  241. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
  242. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
  243. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
  244. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
  245. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  246. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
  247. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  248. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  249. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  250. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  252. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  253. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  254. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
  255. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  256. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
  257. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
  258. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
  259. package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +1 -1
  260. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  261. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  262. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  263. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  264. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  265. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  266. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +60 -23
  267. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
  268. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
  269. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
  270. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
  271. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
  272. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
  273. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
  274. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  275. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  276. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  277. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  278. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  279. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  280. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  281. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  282. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  283. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  284. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
  285. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  286. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
  287. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
  288. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
  289. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
  290. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
  291. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
  292. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
  293. package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
  294. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
  295. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
  296. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
  297. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
  298. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +807 -801
  299. package/dist/prometheus-framework/src/modules/pages/pages.client.js +807 -801
  300. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  301. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  302. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  303. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  304. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +5 -10
  305. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
  306. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
  307. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
  308. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  309. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  310. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +12 -7
  311. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
  312. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
  313. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  314. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  315. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  316. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  317. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  318. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  319. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  320. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  321. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  322. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  323. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  324. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  325. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  326. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
  327. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js.map +1 -1
  328. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  329. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  330. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  331. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  332. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
  333. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
  334. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  335. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  336. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
  337. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  338. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  339. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  340. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  341. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  342. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
  343. package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
  344. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
  345. package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
  346. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
  347. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
  348. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
  349. package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
  350. package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
  351. package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
  352. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
  353. package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
  354. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
  355. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
  356. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  357. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  358. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  359. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  360. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +3 -3
  361. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
  362. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
  363. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
  364. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  365. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  366. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
  367. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
  368. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
  369. package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
  370. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
  371. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
  372. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
  373. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +1 -1
  374. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  375. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  376. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  377. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  378. package/dist/prometheus-framework/src/modules/users/router/users.cjs +2 -2
  379. package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
  380. package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
  381. package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
  382. package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
  383. package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
  384. package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
  385. package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
  386. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  387. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  388. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  389. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  390. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
  391. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  392. package/dist/prometheus-framework.cjs.js +17 -17
  393. package/dist/prometheus-framework.es.js +1790 -1790
  394. package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
  395. package/dist/queryProcessor-CcsJEUBr.js +196 -0
  396. package/dist/spots.server.js +1 -1
  397. package/dist/spots.server.mjs +1 -1
  398. package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
  399. package/dist/verifyAccesses-BvLnOtBN.js +89 -0
  400. package/dist/wallet.server.js +2 -2
  401. package/dist/wallet.server.mjs +2 -2
  402. package/package.json +1 -1
  403. package/src/builder/modes/ssr.dev.js +2 -2
  404. package/src/builder/modes/ssr.prod.js +4 -4
  405. package/src/builder/ssr/ssr-render-html.js +11 -13
  406. package/src/builder/templates/page.html +37 -0
  407. package/src/builder/templates/page.js +4 -0
  408. package/src/builder/webpack/webpack.config.client.js +9 -6
  409. package/src/builder/webpack/webpack.config.ssr.js +1 -1
  410. package/src/components/Button/Button.vue +0 -1
  411. package/src/components/Feed/Feed.vue +34 -55
  412. package/src/components/FieldTags/BlockTags.vue +0 -1
  413. package/src/components/UploadImage/UploadImage.vue +2 -1
  414. package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
  415. package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
  416. package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
  417. package/src/modules/auth/controllers/services/auth.service.js +1 -0
  418. package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
  419. package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
  420. package/src/modules/auth/views/middlewares/ownership.validation.js +60 -0
  421. package/src/modules/auth/views/store/auth.js +43 -39
  422. package/src/modules/auth/views/store/twofa.js +2 -5
  423. package/src/modules/auth/views/validations/inputs.validation.js +12 -6
  424. package/src/modules/community/components/blocks/CardBlogpost.vue +3 -1
  425. package/src/modules/community/components/layouts/Community.vue +7 -9
  426. package/src/modules/community/components/pages/BlogPost.vue +122 -123
  427. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
  428. package/src/modules/community/components/sections/Comments.vue +5 -5
  429. package/src/modules/community/controllers/blog.controller.js +1 -1
  430. package/src/modules/community/models/blogpost.model.js +1 -1
  431. package/src/modules/community/router/blogposts.js +40 -33
  432. package/src/modules/community/routes/blog.routes.js +4 -0
  433. package/src/modules/community/store/blogposts.js +11 -19
  434. package/src/modules/community/store/reactions.js +1 -7
  435. package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
  436. package/src/modules/events/components/pages/EditEvent.vue +76 -59
  437. package/src/modules/events/components/pages/Event.vue +2 -15
  438. package/src/modules/events/components/pages/Events.vue +2 -1
  439. package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
  440. package/src/modules/events/components/sections/HeroEvent.vue +15 -17
  441. package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
  442. package/src/modules/events/router/events.js +11 -4
  443. package/src/modules/events/store/events.js +2 -4
  444. package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
  445. package/src/modules/gallery/controllers/gallery.controller.js +30 -31
  446. package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
  447. package/src/modules/gallery/routes/gallery.routes.js +22 -4
  448. package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
  449. package/src/modules/globals/globals.client.js +2 -0
  450. package/src/modules/globals/views/classes/globals.store.js +4 -3
  451. package/src/modules/globals/views/components/blocks/Card.vue +56 -0
  452. package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
  453. package/src/modules/globals/views/components/layouts/App.vue +1 -0
  454. package/src/modules/globals/views/components/layouts/Client.vue +0 -30
  455. package/src/modules/globals/views/store/globals.js +4 -2
  456. package/src/modules/globals/views/utils/axios-instance.js +18 -0
  457. package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
  458. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
  459. package/src/modules/landing/components/pages/Governance.vue +4 -2
  460. package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
  461. package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
  462. package/src/modules/landing/router/landing.js +2 -1
  463. package/src/modules/orders/store/orders.js +1 -3
  464. package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
  465. package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
  466. package/src/modules/organizations/controllers/organizations.controller.js +28 -35
  467. package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
  468. package/src/modules/organizations/models/department.model.js +3 -86
  469. package/src/modules/organizations/models/organization.model.js +6 -4
  470. package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
  471. package/src/modules/organizations/router/organizations.js +2 -0
  472. package/src/modules/organizations/store/departments.js +6 -6
  473. package/src/modules/organizations/store/organizations.js +2 -16
  474. package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
  475. package/src/modules/products/components/blocks/CardProduct.vue +2 -0
  476. package/src/modules/products/components/pages/Product.vue +1 -1
  477. package/src/modules/products/components/sections/MenuSection.vue +2 -2
  478. package/src/modules/products/controllers/products.controller.js +201 -367
  479. package/src/modules/products/routes/products.routes.js +0 -5
  480. package/src/modules/products/store/categories.js +1 -2
  481. package/src/modules/products/store/leftovers.js +1 -2
  482. package/src/modules/products/store/products.js +1 -13
  483. package/src/modules/reports/components/sections/FormReport.vue +20 -20
  484. package/src/modules/spots/store/spots.js +1 -6
  485. package/src/modules/users/components/pages/Profile.vue +1 -1
  486. package/src/modules/users/router/users.js +2 -2
  487. package/src/modules/users/store/users.js +1 -3
  488. package/src/styles/base/all.scss +0 -2
  489. package/src/styles/config.scss +6 -0
  490. package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
  491. package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
- ;/* empty css */
5
+ ;/* empty css */
6
6
  const Button = require("../../../../components/Button/Button.vue.cjs");
7
7
  const Tab = require("../../../../components/Tab/Tab.vue2.cjs");
8
8
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
@@ -1,6 +1,6 @@
1
1
  import { computed, ref, onMounted, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, createBlock, createCommentVNode, normalizeClass, toDisplayString } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
- /* empty css */
3
+ /* empty css */
4
4
  import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
5
5
  import _sfc_main$3 from "../../../../components/Tab/Tab.vue2.js";
6
6
  import _sfc_main$4 from "../../../../components/Popup/Popup.vue.js";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const Block = require("../../../../components/Block/Block.vue.cjs");
6
- ;/* empty css */
6
+ ;/* empty css */
7
7
  const clickOutside = require("../../../../components/FieldPhone/click-outside.cjs");
8
8
  ;/* empty css */
9
9
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
@@ -1,7 +1,7 @@
1
1
  import { ref, openBlock, createElementBlock, Fragment, createVNode, withCtx, unref, withDirectives, createBlock, isRef, renderList, createCommentVNode, createTextVNode } from "vue";
2
2
  import { useRoute } from "vue-router";
3
3
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
4
- /* empty css */
4
+ /* empty css */
5
5
  import clickOutside from "../../../../components/FieldPhone/click-outside.js";
6
6
  /* empty css */
7
7
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Block = require("../../../../components/Block/Block.vue.cjs");
5
- const Field = require("../../../../components/Field/Field.vue2.cjs");
5
+ const Field = require("../../../../components/Field/Field.vue.cjs");
6
6
  const FieldPhone = require("../../../../components/FieldPhone/FieldPhone.vue.cjs");
7
7
  const Select = require("../../../../components/Select/Select.vue.cjs");
8
8
  const _hoisted_1 = { class: "gap-thin flex-justify-between flex-nowrap flex" };
@@ -1,6 +1,6 @@
1
1
  import { ref, openBlock, createBlock, withCtx, createVNode, createElementVNode, unref, isRef } from "vue";
2
2
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
3
- import Field from "../../../../components/Field/Field.vue2.js";
3
+ import Field from "../../../../components/Field/Field.vue.js";
4
4
  import _sfc_main$2 from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
5
  import Select from "../../../../components/Select/Select.vue.js";
6
6
  const _hoisted_1 = { class: "gap-thin flex-justify-between flex-nowrap flex" };
@@ -3,10 +3,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const globals = require("../../../globals/views/store/globals.cjs");
5
5
  const Block = require("../../../../components/Block/Block.vue.cjs");
6
- const Address = require("../../../../components/Address/Address.vue2.cjs");
7
- const LocationMarker = require("../../../../components/LocationMarker/LocationMarker.vue2.cjs");
6
+ const Address = require("../../../../components/Address/Address.vue.cjs");
7
+ const LocationMarker = require("../../../../components/LocationMarker/LocationMarker.vue.cjs");
8
8
  const Radio = require("../../../../components/Radio/Radio.vue.cjs");
9
- const Field = require("../../../../components/Field/Field.vue2.cjs");
9
+ const Field = require("../../../../components/Field/Field.vue.cjs");
10
10
  const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("h4", { class: "font-second mn-b-thin" }, "Select deliverty type", -1);
11
11
  const _hoisted_2 = { class: "mn-b-small flex-nowrap flex" };
12
12
  const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("h4", { class: "font-second mn-b-thin" }, "Address", -1);
@@ -1,10 +1,10 @@
1
1
  import { onMounted, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
2
2
  import { state } from "../../../globals/views/store/globals.js";
3
3
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
4
- import _sfc_main$3 from "../../../../components/Address/Address.vue2.js";
5
- import _sfc_main$4 from "../../../../components/LocationMarker/LocationMarker.vue2.js";
4
+ import _sfc_main$3 from "../../../../components/Address/Address.vue.js";
5
+ import _sfc_main$4 from "../../../../components/LocationMarker/LocationMarker.vue.js";
6
6
  import _sfc_main$2 from "../../../../components/Radio/Radio.vue.js";
7
- import Field from "../../../../components/Field/Field.vue2.js";
7
+ import Field from "../../../../components/Field/Field.vue.js";
8
8
  const _hoisted_1 = /* @__PURE__ */ createElementVNode("h4", { class: "font-second mn-b-thin" }, "Select deliverty type", -1);
9
9
  const _hoisted_2 = { class: "mn-b-small flex-nowrap flex" };
10
10
  const _hoisted_3 = /* @__PURE__ */ createElementVNode("h4", { class: "font-second mn-b-thin" }, "Address", -1);
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
- const axios = require("axios");
4
+ const axiosInstance = require("../../globals/views/utils/axios-instance.cjs");
5
5
  const globals = require("../../globals/views/store/globals.cjs");
6
6
  const order = require("./models/order.cjs");
7
- const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
8
7
  const state = vue.reactive({
9
8
  all: [],
10
9
  current: {
@@ -14,7 +13,7 @@ const state = vue.reactive({
14
13
  const actions = {
15
14
  async create(order2) {
16
15
  try {
17
- const response = await $axios.post("/api/orders/create", order2);
16
+ const response = await axiosInstance.default.post("/api/orders/create", order2);
18
17
  state.all.push(response.data);
19
18
  return response.data;
20
19
  } catch (error) {
@@ -23,7 +22,7 @@ const actions = {
23
22
  },
24
23
  async read(options = {}) {
25
24
  try {
26
- const response = await $axios.get("/api/orders/read", { params: options });
25
+ const response = await axiosInstance.default.get("/api/orders/read", { params: options });
27
26
  if (options._id) {
28
27
  set(response.data[0], "current");
29
28
  } else {
@@ -37,7 +36,7 @@ const actions = {
37
36
  },
38
37
  async update(order2) {
39
38
  try {
40
- const response = await $axios.post(`/api/orders/update`, order2);
39
+ const response = await axiosInstance.default.post(`/api/orders/update`, order2);
41
40
  const index = state.all.findIndex((o) => o._id === order2._id);
42
41
  if (index !== -1) {
43
42
  state.all[index] = response.data;
@@ -49,7 +48,7 @@ const actions = {
49
48
  },
50
49
  async delete(orderID) {
51
50
  try {
52
- await $axios.delete(`/api/orders/${orderID}`);
51
+ await axiosInstance.default.delete(`/api/orders/${orderID}`);
53
52
  state.all = state.all.filter((o) => o._id !== orderID);
54
53
  } catch (error) {
55
54
  globals.setError(error);
@@ -57,7 +56,7 @@ const actions = {
57
56
  },
58
57
  async changePaymentStatus(orderID, status) {
59
58
  try {
60
- const response = await $axios.post(`/api/orders/payment/${orderID}`, { status });
59
+ const response = await axiosInstance.default.post(`/api/orders/payment/${orderID}`, { status });
61
60
  const index = state.all.findIndex((o) => o._id === orderID);
62
61
  if (index !== -1) {
63
62
  state.all[index] = response.data;
@@ -1 +1 @@
1
- {"version":3,"file":"orders.cjs","sources":["../../../../../../src/modules/orders/store/orders.js"],"sourcesContent":["// Dependencies\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Axios\nimport axios from 'axios';\n// Setup Axios\nconst $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true}) \n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// Init State\nimport orderInitState from \"@pf/src/modules/orders/store/models/order\"\n\n\nconst state = reactive({\n all: [], \n current: {\n ...orderInitState\n }\n});\n\nconst actions = {\n async create(order) {\n try {\n const response = await $axios.post('/api/orders/create', order);\n\n state.all.push(response.data);\n\n return response.data;\n } catch (error) {\n setError(error);\n }\n },\n\n async read( options = {}) {\n try {\n \n const response = await $axios.get('/api/orders/read', { params: options });\n\n if (options._id) {\n set(response.data[0], 'current')\n } else {\n set(response.data, 'all')\n }\n\n return response.data; \n } catch (err) {\n setError(err)\n throw err;\n }\n },\n\n async update(order) {\n try {\n const response = await $axios.post(`/api/orders/update`, order);\n\n const index = state.all.findIndex(o => o._id === order._id);\n \n if (index !== -1) {\n state.all[index] = response.data;\n }\n\n return response.data; \n } catch (error) {\n setError(error);\n }\n },\n\n async delete(orderID) {\n try {\n await $axios.delete(`/api/orders/${orderID}`);\n state.all = state.all.filter(o => o._id !== orderID);\n } catch (error) {\n setError(error);\n }\n },\n\n async changePaymentStatus(orderID, status) {\n try {\n const response = await $axios.post(`/api/orders/payment/${orderID}`, { status });\n const index = state.all.findIndex(o => o._id === orderID);\n if (index !== -1) {\n state.all[index] = response.data;\n }\n } catch (error) {\n setError(error);\n }\n },\n}\n\nconst mutations = { \n resetCustomer(stateObject) { \n Object.assign(stateObject, customerInitState);\n }, \n resetOrder(stateObject) {\n state.current = { ...orderInitState }\n // Object.assign(stateObject, orderInitState);\n } \n}\n\nconst getters = {\n getTotal(positions) {\n return positions.reduce((total, product) => { \n return total + product.price * product.quantity;\n }, 0)\n },\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nconst history = []\n\nhistory.push(state) \n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n actions,\n mutations,\n getters\n}"],"names":["reactive","orderInitState","order","setError","watch"],"mappings":";;;;;;AAKA,MAAM,SAAS,MAAM,OAAO,EAAC,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAC;AAO5E,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,SAAS;AAAA,IACP,GAAGC,MAAc;AAAA,EAClB;AACH,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,OAAOC,QAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,sBAAsBA,MAAK;AAE9D,YAAM,IAAI,KAAK,SAAS,IAAI;AAE5B,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACdC,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAEA,MAAM,KAAM,UAAU,IAAI;AACzB,QAAI;AAEF,YAAM,WAAW,MAAM,OAAO,IAAI,oBAAoB,EAAE,QAAQ,QAAO,CAAE;AAEzE,UAAI,QAAQ,KAAK;AACf,YAAI,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,MACvC,OAAa;AACL,YAAI,SAAS,MAAM,KAAK;AAAA,MACzB;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,KAAK;AACZA,cAAAA,SAAS,GAAG;AACZ,YAAM;AAAA,IACP;AAAA,EACF;AAAA,EAED,MAAM,OAAOD,QAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,sBAAsBA,MAAK;AAE9D,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQA,OAAM,GAAG;AAE1D,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACdC,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,OAAO,SAAS;AACpB,QAAI;AACF,YAAM,OAAO,OAAO,eAAe,OAAO,EAAE;AAC5C,YAAM,MAAM,MAAM,IAAI,OAAO,OAAK,EAAE,QAAQ,OAAO;AAAA,IACpD,SAAQ,OAAO;AACdA,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,oBAAoB,SAAS,QAAQ;AACzC,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,uBAAuB,OAAO,IAAI,EAAE,OAAM,CAAE;AAC/E,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQ,OAAO;AACxD,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAAA,IACF,SAAQ,OAAO;AACdA,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AACH;AAEK,MAAC,YAAY;AAAA,EAChB,cAAc,aAAa;AACzB,WAAO,OAAO,aAAa,iBAAiB;AAAA,EAC7C;AAAA,EACD,WAAW,aAAa;AACtB,UAAM,UAAU,EAAE,GAAGF,cAAgB;AAAA,EAEtC;AACH;AAEK,MAAC,UAAU;AAAA,EACd,SAAS,WAAW;AAClB,WAAO,UAAU,OAAO,CAAC,OAAO,YAAY;AAC1C,aAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,IACxC,GAAE,CAAC;AAAA,EACL;AACH;AAEA,SAAS,IAAI,WAAW,UAAU;AAChC,QAAM,QAAQ,IAAI;AACpB;AAMAG,IAAAA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;;;;;"}
1
+ {"version":3,"file":"orders.cjs","sources":["../../../../../../src/modules/orders/store/orders.js"],"sourcesContent":["// Dependencies\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Setup Axios\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// Init State\nimport orderInitState from \"@pf/src/modules/orders/store/models/order\"\n\n\nconst state = reactive({\n all: [], \n current: {\n ...orderInitState\n }\n});\n\nconst actions = {\n async create(order) {\n try {\n const response = await $axios.post('/api/orders/create', order);\n\n state.all.push(response.data);\n\n return response.data;\n } catch (error) {\n setError(error);\n }\n },\n\n async read( options = {}) {\n try {\n \n const response = await $axios.get('/api/orders/read', { params: options });\n\n if (options._id) {\n set(response.data[0], 'current')\n } else {\n set(response.data, 'all')\n }\n\n return response.data; \n } catch (err) {\n setError(err)\n throw err;\n }\n },\n\n async update(order) {\n try {\n const response = await $axios.post(`/api/orders/update`, order);\n\n const index = state.all.findIndex(o => o._id === order._id);\n \n if (index !== -1) {\n state.all[index] = response.data;\n }\n\n return response.data; \n } catch (error) {\n setError(error);\n }\n },\n\n async delete(orderID) {\n try {\n await $axios.delete(`/api/orders/${orderID}`);\n state.all = state.all.filter(o => o._id !== orderID);\n } catch (error) {\n setError(error);\n }\n },\n\n async changePaymentStatus(orderID, status) {\n try {\n const response = await $axios.post(`/api/orders/payment/${orderID}`, { status });\n const index = state.all.findIndex(o => o._id === orderID);\n if (index !== -1) {\n state.all[index] = response.data;\n }\n } catch (error) {\n setError(error);\n }\n },\n}\n\nconst mutations = { \n resetCustomer(stateObject) { \n Object.assign(stateObject, customerInitState);\n }, \n resetOrder(stateObject) {\n state.current = { ...orderInitState }\n // Object.assign(stateObject, orderInitState);\n } \n}\n\nconst getters = {\n getTotal(positions) {\n return positions.reduce((total, product) => { \n return total + product.price * product.quantity;\n }, 0)\n },\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nconst history = []\n\nhistory.push(state) \n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n actions,\n mutations,\n getters\n}"],"names":["reactive","orderInitState","order","$axios","setError","watch"],"mappings":";;;;;;AAUK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,SAAS;AAAA,IACP,GAAGC,MAAc;AAAA,EAClB;AACH,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,OAAOC,QAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAMC,cAAM,QAAC,KAAK,sBAAsBD,MAAK;AAE9D,YAAM,IAAI,KAAK,SAAS,IAAI;AAE5B,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACdE,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAEA,MAAM,KAAM,UAAU,IAAI;AACzB,QAAI;AAEF,YAAM,WAAW,MAAMD,cAAAA,QAAO,IAAI,oBAAoB,EAAE,QAAQ,QAAO,CAAE;AAEzE,UAAI,QAAQ,KAAK;AACf,YAAI,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,MACvC,OAAa;AACL,YAAI,SAAS,MAAM,KAAK;AAAA,MACzB;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,KAAK;AACZC,cAAAA,SAAS,GAAG;AACZ,YAAM;AAAA,IACP;AAAA,EACF;AAAA,EAED,MAAM,OAAOF,QAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAMC,sBAAO,KAAK,sBAAsBD,MAAK;AAE9D,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQA,OAAM,GAAG;AAE1D,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACdE,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,OAAO,SAAS;AACpB,QAAI;AACF,YAAMD,cAAAA,QAAO,OAAO,eAAe,OAAO,EAAE;AAC5C,YAAM,MAAM,MAAM,IAAI,OAAO,OAAK,EAAE,QAAQ,OAAO;AAAA,IACpD,SAAQ,OAAO;AACdC,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,oBAAoB,SAAS,QAAQ;AACzC,QAAI;AACF,YAAM,WAAW,MAAMD,cAAM,QAAC,KAAK,uBAAuB,OAAO,IAAI,EAAE,OAAM,CAAE;AAC/E,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQ,OAAO;AACxD,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAAA,IACF,SAAQ,OAAO;AACdC,cAAQ,SAAC,KAAK;AAAA,IACf;AAAA,EACF;AACH;AAEK,MAAC,YAAY;AAAA,EAChB,cAAc,aAAa;AACzB,WAAO,OAAO,aAAa,iBAAiB;AAAA,EAC7C;AAAA,EACD,WAAW,aAAa;AACtB,UAAM,UAAU,EAAE,GAAGH,cAAgB;AAAA,EAEtC;AACH;AAEK,MAAC,UAAU;AAAA,EACd,SAAS,WAAW;AAClB,WAAO,UAAU,OAAO,CAAC,OAAO,YAAY;AAC1C,aAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,IACxC,GAAE,CAAC;AAAA,EACL;AACH;AAEA,SAAS,IAAI,WAAW,UAAU;AAChC,QAAM,QAAQ,IAAI;AACpB;AAMAI,IAAAA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;;;;;"}
@@ -1,8 +1,7 @@
1
1
  import { reactive, watch } from "vue";
2
- import axios from "axios";
2
+ import $axios from "../../globals/views/utils/axios-instance.js";
3
3
  import { setError } from "../../globals/views/store/globals.js";
4
4
  import orderInitState from "./models/order.js";
5
- const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
6
5
  const state = reactive({
7
6
  all: [],
8
7
  current: {
@@ -1 +1 @@
1
- {"version":3,"file":"orders.js","sources":["../../../../../../src/modules/orders/store/orders.js"],"sourcesContent":["// Dependencies\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Axios\nimport axios from 'axios';\n// Setup Axios\nconst $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true}) \n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// Init State\nimport orderInitState from \"@pf/src/modules/orders/store/models/order\"\n\n\nconst state = reactive({\n all: [], \n current: {\n ...orderInitState\n }\n});\n\nconst actions = {\n async create(order) {\n try {\n const response = await $axios.post('/api/orders/create', order);\n\n state.all.push(response.data);\n\n return response.data;\n } catch (error) {\n setError(error);\n }\n },\n\n async read( options = {}) {\n try {\n \n const response = await $axios.get('/api/orders/read', { params: options });\n\n if (options._id) {\n set(response.data[0], 'current')\n } else {\n set(response.data, 'all')\n }\n\n return response.data; \n } catch (err) {\n setError(err)\n throw err;\n }\n },\n\n async update(order) {\n try {\n const response = await $axios.post(`/api/orders/update`, order);\n\n const index = state.all.findIndex(o => o._id === order._id);\n \n if (index !== -1) {\n state.all[index] = response.data;\n }\n\n return response.data; \n } catch (error) {\n setError(error);\n }\n },\n\n async delete(orderID) {\n try {\n await $axios.delete(`/api/orders/${orderID}`);\n state.all = state.all.filter(o => o._id !== orderID);\n } catch (error) {\n setError(error);\n }\n },\n\n async changePaymentStatus(orderID, status) {\n try {\n const response = await $axios.post(`/api/orders/payment/${orderID}`, { status });\n const index = state.all.findIndex(o => o._id === orderID);\n if (index !== -1) {\n state.all[index] = response.data;\n }\n } catch (error) {\n setError(error);\n }\n },\n}\n\nconst mutations = { \n resetCustomer(stateObject) { \n Object.assign(stateObject, customerInitState);\n }, \n resetOrder(stateObject) {\n state.current = { ...orderInitState }\n // Object.assign(stateObject, orderInitState);\n } \n}\n\nconst getters = {\n getTotal(positions) {\n return positions.reduce((total, product) => { \n return total + product.price * product.quantity;\n }, 0)\n },\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nconst history = []\n\nhistory.push(state) \n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n actions,\n mutations,\n getters\n}"],"names":[],"mappings":";;;;AAKA,MAAM,SAAS,MAAM,OAAO,EAAC,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAC;AAO5E,MAAC,QAAQ,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,SAAS;AAAA,IACP,GAAG;AAAA,EACJ;AACH,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,OAAO,OAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,sBAAsB,KAAK;AAE9D,YAAM,IAAI,KAAK,SAAS,IAAI;AAE5B,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAEA,MAAM,KAAM,UAAU,IAAI;AACzB,QAAI;AAEF,YAAM,WAAW,MAAM,OAAO,IAAI,oBAAoB,EAAE,QAAQ,QAAO,CAAE;AAEzE,UAAI,QAAQ,KAAK;AACf,YAAI,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,MACvC,OAAa;AACL,YAAI,SAAS,MAAM,KAAK;AAAA,MACzB;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,KAAK;AACZ,eAAS,GAAG;AACZ,YAAM;AAAA,IACP;AAAA,EACF;AAAA,EAED,MAAM,OAAO,OAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,sBAAsB,KAAK;AAE9D,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQ,MAAM,GAAG;AAE1D,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,OAAO,SAAS;AACpB,QAAI;AACF,YAAM,OAAO,OAAO,eAAe,OAAO,EAAE;AAC5C,YAAM,MAAM,MAAM,IAAI,OAAO,OAAK,EAAE,QAAQ,OAAO;AAAA,IACpD,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,oBAAoB,SAAS,QAAQ;AACzC,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,uBAAuB,OAAO,IAAI,EAAE,OAAM,CAAE;AAC/E,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQ,OAAO;AACxD,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAAA,IACF,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AACH;AAEK,MAAC,YAAY;AAAA,EAChB,cAAc,aAAa;AACzB,WAAO,OAAO,aAAa,iBAAiB;AAAA,EAC7C;AAAA,EACD,WAAW,aAAa;AACtB,UAAM,UAAU,EAAE,GAAG,eAAgB;AAAA,EAEtC;AACH;AAEK,MAAC,UAAU;AAAA,EACd,SAAS,WAAW;AAClB,WAAO,UAAU,OAAO,CAAC,OAAO,YAAY;AAC1C,aAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,IACxC,GAAE,CAAC;AAAA,EACL;AACH;AAEA,SAAS,IAAI,WAAW,UAAU;AAChC,QAAM,QAAQ,IAAI;AACpB;AAMA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
1
+ {"version":3,"file":"orders.js","sources":["../../../../../../src/modules/orders/store/orders.js"],"sourcesContent":["// Dependencies\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Setup Axios\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// Init State\nimport orderInitState from \"@pf/src/modules/orders/store/models/order\"\n\n\nconst state = reactive({\n all: [], \n current: {\n ...orderInitState\n }\n});\n\nconst actions = {\n async create(order) {\n try {\n const response = await $axios.post('/api/orders/create', order);\n\n state.all.push(response.data);\n\n return response.data;\n } catch (error) {\n setError(error);\n }\n },\n\n async read( options = {}) {\n try {\n \n const response = await $axios.get('/api/orders/read', { params: options });\n\n if (options._id) {\n set(response.data[0], 'current')\n } else {\n set(response.data, 'all')\n }\n\n return response.data; \n } catch (err) {\n setError(err)\n throw err;\n }\n },\n\n async update(order) {\n try {\n const response = await $axios.post(`/api/orders/update`, order);\n\n const index = state.all.findIndex(o => o._id === order._id);\n \n if (index !== -1) {\n state.all[index] = response.data;\n }\n\n return response.data; \n } catch (error) {\n setError(error);\n }\n },\n\n async delete(orderID) {\n try {\n await $axios.delete(`/api/orders/${orderID}`);\n state.all = state.all.filter(o => o._id !== orderID);\n } catch (error) {\n setError(error);\n }\n },\n\n async changePaymentStatus(orderID, status) {\n try {\n const response = await $axios.post(`/api/orders/payment/${orderID}`, { status });\n const index = state.all.findIndex(o => o._id === orderID);\n if (index !== -1) {\n state.all[index] = response.data;\n }\n } catch (error) {\n setError(error);\n }\n },\n}\n\nconst mutations = { \n resetCustomer(stateObject) { \n Object.assign(stateObject, customerInitState);\n }, \n resetOrder(stateObject) {\n state.current = { ...orderInitState }\n // Object.assign(stateObject, orderInitState);\n } \n}\n\nconst getters = {\n getTotal(positions) {\n return positions.reduce((total, product) => { \n return total + product.price * product.quantity;\n }, 0)\n },\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nconst history = []\n\nhistory.push(state) \n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n actions,\n mutations,\n getters\n}"],"names":[],"mappings":";;;;AAUK,MAAC,QAAQ,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,SAAS;AAAA,IACP,GAAG;AAAA,EACJ;AACH,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,OAAO,OAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,sBAAsB,KAAK;AAE9D,YAAM,IAAI,KAAK,SAAS,IAAI;AAE5B,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAEA,MAAM,KAAM,UAAU,IAAI;AACzB,QAAI;AAEF,YAAM,WAAW,MAAM,OAAO,IAAI,oBAAoB,EAAE,QAAQ,QAAO,CAAE;AAEzE,UAAI,QAAQ,KAAK;AACf,YAAI,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,MACvC,OAAa;AACL,YAAI,SAAS,MAAM,KAAK;AAAA,MACzB;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,KAAK;AACZ,eAAS,GAAG;AACZ,YAAM;AAAA,IACP;AAAA,EACF;AAAA,EAED,MAAM,OAAO,OAAO;AAClB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,sBAAsB,KAAK;AAE9D,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQ,MAAM,GAAG;AAE1D,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAED,aAAO,SAAS;AAAA,IACjB,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,OAAO,SAAS;AACpB,QAAI;AACF,YAAM,OAAO,OAAO,eAAe,OAAO,EAAE;AAC5C,YAAM,MAAM,MAAM,IAAI,OAAO,OAAK,EAAE,QAAQ,OAAO;AAAA,IACpD,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AAAA,EAED,MAAM,oBAAoB,SAAS,QAAQ;AACzC,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,uBAAuB,OAAO,IAAI,EAAE,OAAM,CAAE;AAC/E,YAAM,QAAQ,MAAM,IAAI,UAAU,OAAK,EAAE,QAAQ,OAAO;AACxD,UAAI,UAAU,IAAI;AAChB,cAAM,IAAI,KAAK,IAAI,SAAS;AAAA,MAC7B;AAAA,IACF,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACf;AAAA,EACF;AACH;AAEK,MAAC,YAAY;AAAA,EAChB,cAAc,aAAa;AACzB,WAAO,OAAO,aAAa,iBAAiB;AAAA,EAC7C;AAAA,EACD,WAAW,aAAa;AACtB,UAAM,UAAU,EAAE,GAAG,eAAgB;AAAA,EAEtC;AACH;AAEK,MAAC,UAAU;AAAA,EACd,SAAS,WAAW;AAClB,WAAO,UAAU,OAAO,CAAC,OAAO,YAAY;AAC1C,aAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,IACxC,GAAE,CAAC;AAAA,EACL;AACH;AAEA,SAAS,IAAI,WAAW,UAAU;AAChC,QAAM,QAAQ,IAAI;AACpB;AAMA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const IconEdit = require("../../../icons/navigation/IconEdit.vue.cjs");
5
- ;/* empty css */
5
+ ;/* empty css */
6
6
  ;/* empty css */
7
7
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
8
8
  const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createCommentVNode, Fragment, renderList, createBlock } from "vue";
2
2
  import _sfc_main$1 from "../../../icons/navigation/IconEdit.vue.js";
3
- /* empty css */
3
+ /* empty css */
4
4
  /* empty css */
5
5
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  import _sfc_main$2 from "../../../users/components/blocks/CardUser.vue.js";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const CardOrderItem = require("../../../orders/components/blocks/CardOrderItem.vue.cjs");
6
- const Chips = require("../../../../components/Chips/Chips.vue.cjs");
6
+ const Chips = require("../../../../components/Chips/Chips.vue2.cjs");
7
7
  const PlaceholderOrganizationPic = require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs");
8
8
  const IconPrice = require("../../../icons/entities/IconPrice.vue.cjs");
9
9
  const IconShopcart = require("../../../icons/entities/IconShopcart.vue.cjs");
@@ -1,7 +1,7 @@
1
1
  import { openBlock, createElementBlock, createElementVNode, createBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList, withModifiers } from "vue";
2
2
  import { useRouter } from "vue-router";
3
3
  import _sfc_main$4 from "../../../orders/components/blocks/CardOrderItem.vue.js";
4
- import _sfc_main$1 from "../../../../components/Chips/Chips.vue.js";
4
+ import _sfc_main$1 from "../../../../components/Chips/Chips.vue2.js";
5
5
  import PlaceholderOrganizationPic from "../../../icons/placeholders/PlaceholderOrganizationPic.vue.js";
6
6
  import IconPrice from "../../../icons/entities/IconPrice.vue.js";
7
7
  import _sfc_main$3 from "../../../icons/entities/IconShopcart.vue.js";
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
- ;/* empty css */
5
+ ;/* empty css */
6
6
  const DepartmentSub = require("../blocks/DepartmentSub.vue.cjs");
7
7
  const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
8
8
  const departments = require("../../store/departments.cjs");
@@ -1,6 +1,6 @@
1
1
  import { withAsyncContext, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref, withCtx, createCommentVNode, Fragment, renderList, createBlock } from "vue";
2
2
  import { useRouter, useRoute } from "vue-router";
3
- /* empty css */
3
+ /* empty css */
4
4
  import DepartmentSub from "../blocks/DepartmentSub.vue.js";
5
5
  import _sfc_main$2 from "../../../users/components/blocks/CardUser.vue.js";
6
6
  import { actions, state } from "../../store/departments.js";
@@ -7,13 +7,13 @@ require("vue-i18n");
7
7
  ;/* empty css */
8
8
  const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
9
9
  ;/* empty css */
10
- const Field = require("../../../../components/Field/Field.vue2.cjs");
10
+ const Field = require("../../../../components/Field/Field.vue.cjs");
11
11
  ;/* empty css */
12
12
  const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
13
13
  require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");
14
- ;/* empty css */
15
- ;/* empty css */
16
- ;/* empty css */
14
+ ;/* empty css */
15
+ ;/* empty css */
16
+ ;/* empty css */
17
17
  const Button = require("../../../../components/Button/Button.vue.cjs");
18
18
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
19
19
  const Block = require("../../../../components/Block/Block.vue.cjs");
@@ -47,10 +47,11 @@ const _hoisted_13 = { class: "bg-light pd-medium o-hidden radius-big" };
47
47
  const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("h3", { class: "mn-b-semi" }, "Acessess", -1);
48
48
  const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1);
49
49
  const _hoisted_16 = { class: "cols-1 gap-thin" };
50
- const _hoisted_17 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Gallery", -1);
51
- const _hoisted_18 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Products", -1);
52
- const _hoisted_19 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Orders", -1);
53
- const _hoisted_20 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Departments", -1);
50
+ const _hoisted_17 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Events", -1);
51
+ const _hoisted_18 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Gallery", -1);
52
+ const _hoisted_19 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Products", -1);
53
+ const _hoisted_20 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Orders", -1);
54
+ const _hoisted_21 = /* @__PURE__ */ vue.createElementVNode("h4", null, "Departments", -1);
54
55
  const _sfc_main = {
55
56
  __name: "DepartmentEdit",
56
57
  setup(__props) {
@@ -264,92 +265,128 @@ const _sfc_main = {
264
265
  _hoisted_15,
265
266
  vue.createElementVNode("div", _hoisted_16, [
266
267
  _hoisted_17,
268
+ vue.createVNode(Checkbox.default, {
269
+ label: "Read events",
270
+ name: "readProducts",
271
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
272
+ radio: departments.state.department.accesses.events.read,
273
+ "onUpdate:radio": _cache[4] || (_cache[4] = (updated) => departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)
274
+ }, null, 8, ["radio"]),
275
+ vue.createVNode(Checkbox.default, {
276
+ label: "Create events",
277
+ name: "editProducts",
278
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
279
+ radio: departments.state.department.accesses.events.create,
280
+ "onUpdate:radio": _cache[5] || (_cache[5] = (updated) => departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)
281
+ }, null, 8, ["radio"]),
282
+ vue.createVNode(Checkbox.default, {
283
+ label: "Edit events",
284
+ name: "editProducts",
285
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
286
+ radio: departments.state.department.accesses.events.edit,
287
+ "onUpdate:radio": _cache[6] || (_cache[6] = (updated) => departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)
288
+ }, null, 8, ["radio"]),
289
+ vue.createVNode(Checkbox.default, {
290
+ label: "Delete events",
291
+ name: "deleteProducts",
292
+ class: "w-100 bg-white radius-small pd-small",
293
+ radio: departments.state.department.accesses.events.delete,
294
+ "onUpdate:radio": _cache[7] || (_cache[7] = (updated) => departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)
295
+ }, null, 8, ["radio"]),
296
+ _hoisted_18,
267
297
  vue.createVNode(Checkbox.default, {
268
298
  label: "Read gallery",
269
299
  name: "readProducts",
270
300
  class: "w-100 mn-r-small bg-white radius-small pd-small",
271
301
  radio: departments.state.department.accesses.gallery.read,
272
- "onUpdate:radio": _cache[4] || (_cache[4] = (updated) => departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)
302
+ "onUpdate:radio": _cache[8] || (_cache[8] = (updated) => departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)
303
+ }, null, 8, ["radio"]),
304
+ vue.createVNode(Checkbox.default, {
305
+ label: "Create photos",
306
+ name: "editProducts",
307
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
308
+ radio: departments.state.department.accesses.gallery.create,
309
+ "onUpdate:radio": _cache[9] || (_cache[9] = (updated) => departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)
273
310
  }, null, 8, ["radio"]),
274
311
  vue.createVNode(Checkbox.default, {
275
312
  label: "Edit gallery",
276
313
  name: "editProducts",
277
314
  class: "w-100 mn-r-small bg-white radius-small pd-small",
278
315
  radio: departments.state.department.accesses.gallery.edit,
279
- "onUpdate:radio": _cache[5] || (_cache[5] = (updated) => departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)
316
+ "onUpdate:radio": _cache[10] || (_cache[10] = (updated) => departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)
280
317
  }, null, 8, ["radio"]),
281
318
  vue.createVNode(Checkbox.default, {
282
319
  label: "Delete gallery",
283
320
  name: "deleteProducts",
284
321
  class: "w-100 bg-white radius-small pd-small",
285
322
  radio: departments.state.department.accesses.gallery.delete,
286
- "onUpdate:radio": _cache[6] || (_cache[6] = (updated) => departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)
323
+ "onUpdate:radio": _cache[11] || (_cache[11] = (updated) => departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)
287
324
  }, null, 8, ["radio"]),
288
- _hoisted_18,
325
+ _hoisted_19,
289
326
  vue.createVNode(Checkbox.default, {
290
327
  label: "Read products",
291
328
  name: "readProducts",
292
329
  class: "w-100 mn-r-small bg-white radius-small pd-small",
293
330
  radio: departments.state.department.accesses.products.read,
294
- "onUpdate:radio": _cache[7] || (_cache[7] = (updated) => departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)
331
+ "onUpdate:radio": _cache[12] || (_cache[12] = (updated) => departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)
295
332
  }, null, 8, ["radio"]),
296
333
  vue.createVNode(Checkbox.default, {
297
334
  label: "Edit products",
298
335
  name: "editProducts",
299
336
  class: "w-100 mn-r-small bg-white radius-small pd-small",
300
337
  radio: departments.state.department.accesses.products.edit,
301
- "onUpdate:radio": _cache[8] || (_cache[8] = (updated) => departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)
338
+ "onUpdate:radio": _cache[13] || (_cache[13] = (updated) => departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)
302
339
  }, null, 8, ["radio"]),
303
340
  vue.createVNode(Checkbox.default, {
304
341
  label: "Delete products",
305
342
  name: "deleteProducts",
306
343
  class: "w-100 bg-white radius-small pd-small",
307
344
  radio: departments.state.department.accesses.products.delete,
308
- "onUpdate:radio": _cache[9] || (_cache[9] = (updated) => departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)
345
+ "onUpdate:radio": _cache[14] || (_cache[14] = (updated) => departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)
309
346
  }, null, 8, ["radio"]),
310
- _hoisted_19,
347
+ _hoisted_20,
311
348
  vue.createVNode(Checkbox.default, {
312
349
  label: "Read orders",
313
350
  name: "readOrders",
314
351
  class: "w-100 mn-r-small bg-white radius-small pd-small",
315
352
  radio: departments.state.department.accesses.orders.read,
316
- "onUpdate:radio": _cache[10] || (_cache[10] = (updated) => departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)
353
+ "onUpdate:radio": _cache[15] || (_cache[15] = (updated) => departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)
317
354
  }, null, 8, ["radio"]),
318
355
  vue.createVNode(Checkbox.default, {
319
356
  label: "Confirm orders",
320
357
  name: "confirmOrders",
321
358
  class: "w-100 mn-r-small bg-white radius-small pd-small",
322
359
  radio: departments.state.department.accesses.orders.confirm,
323
- "onUpdate:radio": _cache[11] || (_cache[11] = (updated) => departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)
360
+ "onUpdate:radio": _cache[16] || (_cache[16] = (updated) => departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)
324
361
  }, null, 8, ["radio"]),
325
362
  vue.createVNode(Checkbox.default, {
326
363
  label: "Delete orders",
327
364
  name: "deleteOrders",
328
365
  class: "w-100 bg-white radius-small pd-small",
329
366
  radio: departments.state.department.accesses.orders.delete,
330
- "onUpdate:radio": _cache[12] || (_cache[12] = (updated) => departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)
367
+ "onUpdate:radio": _cache[17] || (_cache[17] = (updated) => departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)
331
368
  }, null, 8, ["radio"]),
332
- _hoisted_20,
369
+ _hoisted_21,
333
370
  vue.createVNode(Checkbox.default, {
334
371
  label: "Read departments",
335
372
  name: "readDepartments",
336
373
  class: "w-100 mn-r-small bg-white radius-small pd-small",
337
374
  radio: departments.state.department.accesses.departments.read,
338
- "onUpdate:radio": _cache[13] || (_cache[13] = (updated) => departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)
375
+ "onUpdate:radio": _cache[18] || (_cache[18] = (updated) => departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)
339
376
  }, null, 8, ["radio"]),
340
377
  vue.createVNode(Checkbox.default, {
341
378
  label: "Edit departments",
342
379
  name: "editDepartments",
343
380
  class: "w-100 mn-r-small bg-white radius-small pd-small",
344
381
  radio: departments.state.department.accesses.departments.edit,
345
- "onUpdate:radio": _cache[14] || (_cache[14] = (updated) => departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)
382
+ "onUpdate:radio": _cache[19] || (_cache[19] = (updated) => departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)
346
383
  }, null, 8, ["radio"]),
347
384
  vue.createVNode(Checkbox.default, {
348
385
  label: "Delete departments",
349
386
  name: "deleteDepartments",
350
387
  class: "w-100 bg-white radius-small pd-small",
351
388
  radio: departments.state.department.accesses.departments.delete,
352
- "onUpdate:radio": _cache[15] || (_cache[15] = (updated) => departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)
389
+ "onUpdate:radio": _cache[20] || (_cache[20] = (updated) => departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)
353
390
  }, null, 8, ["radio"])
354
391
  ])
355
392
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+SA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,mBAAe,YAAY;AACXC,UAAG,IAACC,YAAiB,MAAC,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAG,IAAC,KAAK;AACZA,QAAG,IAAC,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAiB,MAAC,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,mBAAe,YAAY;AACXC,UAAG,IAACC,YAAiB,MAAC,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAG,IAAC,KAAK;AACZA,QAAG,IAAC,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAiB,MAAC,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}