@ozdao/prometheus-framework 0.2.222 → 0.2.224

Sign up to get free protection for your applications and to get access to all the features.
Files changed (498) hide show
  1. package/dist/auth.server.js +4 -4
  2. package/dist/auth.server.mjs +4 -4
  3. package/dist/builder.js +53 -53
  4. package/dist/builder.mjs +53 -53
  5. package/dist/community.server.js +8 -3
  6. package/dist/community.server.mjs +8 -3
  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/node_modules/@capacitor/core/dist/index.cjs +529 -0
  16. package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
  17. package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
  18. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
  19. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
  20. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
  21. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
  22. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
  23. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
  24. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
  25. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
  26. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
  27. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
  28. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
  29. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
  30. package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
  31. package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
  32. package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
  33. package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
  34. package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
  35. package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
  36. package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
  37. package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
  38. package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
  39. package/dist/orders.server.js +2 -2
  40. package/dist/orders.server.mjs +2 -2
  41. package/dist/organizations.server.js +149 -107
  42. package/dist/organizations.server.mjs +149 -107
  43. package/dist/pages.server.js +1 -1
  44. package/dist/pages.server.mjs +1 -1
  45. package/dist/products.server.js +119 -266
  46. package/dist/products.server.mjs +119 -266
  47. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
  48. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
  49. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
  50. package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
  51. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
  52. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
  53. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
  54. package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
  55. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
  56. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
  57. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
  58. package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
  59. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +0 -1
  60. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs.map +1 -1
  61. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +0 -1
  62. package/dist/prometheus-framework/src/components/Button/Button.vue2.js.map +1 -1
  63. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +25 -40
  64. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
  65. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +26 -41
  66. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
  67. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  69. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
  70. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
  71. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
  72. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
  73. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  74. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
  75. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  77. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
  78. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
  79. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
  80. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
  81. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +4 -4
  84. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +4 -4
  85. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +3 -3
  88. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
  89. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +3 -3
  90. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
  91. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +3 -3
  92. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +3 -3
  93. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +4 -3
  94. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
  95. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +4 -3
  96. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  97. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +3 -3
  98. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
  99. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
  100. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
  101. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
  102. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
  103. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +11 -0
  104. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -1
  105. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +11 -0
  106. package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -1
  107. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
  108. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
  109. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
  110. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
  111. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
  112. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
  113. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
  114. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
  115. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
  116. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
  117. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
  118. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
  119. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +6 -3
  120. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
  121. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +6 -3
  122. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  123. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +50 -35
  124. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
  125. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +55 -40
  126. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
  127. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +3 -3
  128. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  129. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  130. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
  131. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  132. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
  133. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
  134. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
  135. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
  136. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
  137. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
  138. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  139. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +46 -49
  140. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
  141. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +46 -49
  142. package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
  143. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
  144. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
  145. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
  146. package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
  147. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
  148. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
  149. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
  150. package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
  151. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  153. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +30 -55
  154. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
  155. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +31 -56
  156. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
  157. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +164 -135
  160. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
  161. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +165 -136
  162. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
  163. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  164. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  165. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +124 -135
  166. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  167. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
  168. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
  169. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  170. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
  171. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
  172. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
  173. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
  174. package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
  175. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  177. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
  178. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
  179. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
  180. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
  181. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
  184. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
  185. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
  186. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
  187. package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
  188. package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
  189. package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
  190. package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
  191. package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
  192. package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
  193. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
  194. package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
  195. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +20 -11
  196. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  197. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +20 -11
  198. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  199. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
  200. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
  201. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
  202. package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
  203. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
  204. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
  205. package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
  206. package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
  207. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
  208. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
  209. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
  210. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
  211. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  213. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
  214. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
  215. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
  216. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
  217. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
  218. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
  219. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
  220. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
  221. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  222. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
  223. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
  224. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
  225. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
  226. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  227. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
  228. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  229. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  231. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  232. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  233. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  234. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  235. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
  236. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
  237. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
  238. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
  239. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
  240. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
  241. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
  242. package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
  243. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
  244. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
  245. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
  246. package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
  247. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
  248. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  249. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  250. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  251. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -3
  252. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  253. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  254. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  255. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  256. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  257. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  258. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  259. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  260. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  261. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
  262. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
  263. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
  264. package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +1 -1
  265. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  266. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  267. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +60 -23
  268. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
  269. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
  270. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
  271. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  272. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  273. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  274. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  275. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
  276. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
  277. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
  278. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
  279. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
  280. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  281. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  282. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  283. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
  284. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  285. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  286. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  287. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  288. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  289. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +4 -4
  290. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  291. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
  292. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
  293. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
  294. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
  295. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
  296. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
  297. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
  298. package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
  299. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
  300. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
  301. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
  302. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
  303. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +637 -631
  304. package/dist/prometheus-framework/src/modules/pages/pages.client.js +637 -631
  305. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +3 -3
  306. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +3 -3
  307. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  308. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  309. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  310. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  311. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +5 -10
  312. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
  313. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
  314. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
  315. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  316. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  317. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +12 -7
  318. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
  319. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
  320. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  321. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  322. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  323. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  324. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  325. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  326. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  327. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  328. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  329. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  330. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  331. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  332. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  333. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  334. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  335. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  336. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  337. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
  338. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js.map +1 -1
  339. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
  340. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  341. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  342. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  343. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
  344. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
  345. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  346. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  347. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
  348. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  349. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  350. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  351. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  352. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  353. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
  354. package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
  355. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
  356. package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
  357. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
  358. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
  359. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
  360. package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
  361. package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
  362. package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
  363. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
  364. package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
  365. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  366. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
  367. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  368. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
  369. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  370. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  371. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  372. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  373. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  374. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  375. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  376. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  377. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
  378. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
  379. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
  380. package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
  381. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
  382. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
  383. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
  384. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +1 -1
  385. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  386. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  387. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +3 -3
  388. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  389. package/dist/prometheus-framework/src/modules/users/router/users.cjs +2 -2
  390. package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
  391. package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
  392. package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
  393. package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
  394. package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
  395. package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
  396. package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
  397. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  398. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  399. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  400. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  401. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  402. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  403. package/dist/prometheus-framework.cjs.js +17 -17
  404. package/dist/prometheus-framework.es.js +1790 -1790
  405. package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
  406. package/dist/queryProcessor-CcsJEUBr.js +196 -0
  407. package/dist/spots.server.js +1 -1
  408. package/dist/spots.server.mjs +1 -1
  409. package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
  410. package/dist/verifyAccesses-BvLnOtBN.js +89 -0
  411. package/dist/wallet.server.js +2 -2
  412. package/dist/wallet.server.mjs +2 -2
  413. package/package.json +1 -1
  414. package/src/builder/modes/ssr.dev.js +2 -2
  415. package/src/builder/modes/ssr.prod.js +4 -4
  416. package/src/builder/ssr/ssr-render-html.js +10 -14
  417. package/src/builder/templates/page.html +37 -0
  418. package/src/builder/templates/page.js +4 -0
  419. package/src/builder/webpack/webpack.config.client.js +2 -2
  420. package/src/builder/webpack/webpack.config.ssr.js +1 -1
  421. package/src/components/Button/Button.vue +0 -1
  422. package/src/components/Feed/Feed.vue +34 -55
  423. package/src/components/FieldTags/BlockTags.vue +0 -1
  424. package/src/components/UploadImage/UploadImage.vue +2 -1
  425. package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
  426. package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
  427. package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
  428. package/src/modules/auth/controllers/services/auth.service.js +1 -0
  429. package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
  430. package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
  431. package/src/modules/auth/views/middlewares/ownership.validation.js +16 -1
  432. package/src/modules/auth/views/store/auth.js +43 -39
  433. package/src/modules/auth/views/store/twofa.js +2 -5
  434. package/src/modules/auth/views/validations/inputs.validation.js +12 -6
  435. package/src/modules/community/components/layouts/Community.vue +3 -3
  436. package/src/modules/community/components/pages/BlogPost.vue +122 -120
  437. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
  438. package/src/modules/community/components/sections/Comments.vue +5 -5
  439. package/src/modules/community/controllers/blog.controller.js +1 -1
  440. package/src/modules/community/router/blogposts.js +37 -38
  441. package/src/modules/community/routes/blog.routes.js +4 -0
  442. package/src/modules/community/store/blogposts.js +11 -19
  443. package/src/modules/community/store/reactions.js +1 -7
  444. package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
  445. package/src/modules/events/components/pages/EditEvent.vue +76 -59
  446. package/src/modules/events/components/pages/Event.vue +2 -15
  447. package/src/modules/events/components/pages/Events.vue +2 -1
  448. package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
  449. package/src/modules/events/components/sections/HeroEvent.vue +15 -17
  450. package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
  451. package/src/modules/events/router/events.js +11 -4
  452. package/src/modules/events/store/events.js +2 -4
  453. package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
  454. package/src/modules/gallery/controllers/gallery.controller.js +30 -31
  455. package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
  456. package/src/modules/gallery/routes/gallery.routes.js +22 -4
  457. package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
  458. package/src/modules/globals/globals.client.js +2 -0
  459. package/src/modules/globals/views/classes/globals.store.js +4 -3
  460. package/src/modules/globals/views/components/blocks/Card.vue +56 -0
  461. package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
  462. package/src/modules/globals/views/components/layouts/App.vue +1 -0
  463. package/src/modules/globals/views/components/layouts/Client.vue +0 -30
  464. package/src/modules/globals/views/store/globals.js +4 -2
  465. package/src/modules/globals/views/utils/axios-instance.js +18 -0
  466. package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
  467. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
  468. package/src/modules/landing/components/pages/Governance.vue +4 -2
  469. package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
  470. package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
  471. package/src/modules/landing/router/landing.js +2 -1
  472. package/src/modules/orders/store/orders.js +1 -3
  473. package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
  474. package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
  475. package/src/modules/organizations/controllers/organizations.controller.js +2 -1
  476. package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
  477. package/src/modules/organizations/models/department.model.js +3 -100
  478. package/src/modules/organizations/models/organization.model.js +6 -4
  479. package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
  480. package/src/modules/organizations/router/organizations.js +2 -0
  481. package/src/modules/organizations/store/departments.js +6 -6
  482. package/src/modules/organizations/store/organizations.js +2 -16
  483. package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
  484. package/src/modules/products/components/blocks/CardProduct.vue +2 -0
  485. package/src/modules/products/components/pages/Product.vue +1 -1
  486. package/src/modules/products/components/sections/MenuSection.vue +2 -2
  487. package/src/modules/products/controllers/products.controller.js +201 -367
  488. package/src/modules/products/routes/products.routes.js +0 -5
  489. package/src/modules/products/store/categories.js +1 -2
  490. package/src/modules/products/store/leftovers.js +1 -2
  491. package/src/modules/products/store/products.js +1 -13
  492. package/src/modules/reports/components/sections/FormReport.vue +20 -20
  493. package/src/modules/spots/store/spots.js +1 -6
  494. package/src/modules/users/components/pages/Profile.vue +1 -1
  495. package/src/modules/users/router/users.js +2 -2
  496. package/src/modules/users/store/users.js +1 -3
  497. package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
  498. package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from "../components/layouts/layoutEvents.vue.js";
2
- import { requiresAdmin } from "../../auth/views/middlewares/auth.validation.js";
2
+ import "../../auth/views/store/auth.js";
3
3
  const eventsRoutes = [
4
4
  {
5
5
  path: "events",
@@ -27,6 +27,21 @@ const eventsRoutes = [
27
27
  )
28
28
  }]
29
29
  },
30
+ {
31
+ path: "events/backoffice",
32
+ name: "Events Backoffice",
33
+ meta: {
34
+ title: {
35
+ en: "Manage Events",
36
+ ru: "Управление Событиями"
37
+ },
38
+ authorize: []
39
+ },
40
+ component: () => import(
41
+ /* webpackChunkName: 'CreateEvent' */
42
+ "../components/pages/EventsBackoffice.vue.js"
43
+ )
44
+ },
30
45
  {
31
46
  path: "events/create",
32
47
  name: "Create Event",
@@ -68,10 +83,6 @@ const eventsRoutes = [
68
83
  {
69
84
  path: "events/:url/edit/tickets",
70
85
  name: "Edit Event Tickets",
71
- meta: { authorize: [] },
72
- beforeEnter: [
73
- requiresAdmin
74
- ],
75
86
  component: () => import(
76
87
  /* webpackChunkName: 'EditEvent' */
77
88
  "../components/pages/EditEventTickets.vue.js"
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/router/events.js"],"sourcesContent":["import layoutEvents from '../components/layouts/layoutEvents.vue'\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\n\nconst eventsRoutes = [\n {\n path: 'events',\n component: layoutEvents,\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n children: [{\n path: ':category?',\n name: 'Events',\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'EventList' */ '../components/pages/Events.vue')\n }]\n },{\n path: 'events/create',\n name: 'Create Event',\n meta: {\n title: {\n en: 'Create Event',\n ru: 'Создать Событие'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'CreateEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url',\n name: 'Event',\n meta: {\n title: {\n en: 'Event',\n ru: 'Событие'\n }\n },\n component: () => import(/* webpackChunkName: 'EventDetail' */ '../components/pages/Event.vue')\n },{\n path: 'events/:url/edit',\n name: 'Edit Event',\n meta: { authorize: [] },\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url/edit/tickets',\n name: 'Edit Event Tickets',\n meta: { authorize: [] },\n beforeEnter: [\n validationAuth.requiresAdmin,\n ],\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEventTickets.vue')\n }\n];\n\nexport default eventsRoutes;\n"],"names":["layoutEvents","validationAuth.requiresAdmin"],"mappings":";;AAGK,MAAC,eAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA;AAAAA,IACX,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,YAAY;AAAA,IACb;AAAA,IACD,UAAU,CAAC;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,QACJ,OAAO;AAAA,UACL,IAAI;AAAA,UACJ,IAAI;AAAA,QACL;AAAA,QACD,YAAY;AAAA,MACb;AAAA,MACD,WAAW,MAAM;AAAA;AAAA,QAA2C;AAAA,MAAgC;AAAA,IAClG,CAAK;AAAA,EACL;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,WAAW,CAAE;AAAA,IACd;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA6C;AAAA,IAAmC;AAAA,EACrG;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA6C;AAAA,IAA+B;AAAA,EACjG;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM,EAAE,WAAW,GAAI;AAAA,IACvB,WAAW,MAAM;AAAA;AAAA,MAA2C;AAAA,IAAmC;AAAA,EACnG;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM,EAAE,WAAW,GAAI;AAAA,IACvB,aAAa;AAAA,MACXC;AAAAA,IACD;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA2C;AAAA,IAA0C;AAAA,EACvG;AACH;"}
1
+ {"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/router/events.js"],"sourcesContent":["import layoutEvents from '../components/layouts/layoutEvents.vue'\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\n\nconst eventsRoutes = [\n {\n path: 'events',\n component: layoutEvents,\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n children: [{\n path: ':category?',\n name: 'Events',\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'EventList' */ '../components/pages/Events.vue')\n }]\n },{\n path: 'events/backoffice',\n name: 'Events Backoffice',\n meta: {\n title: {\n en: 'Manage Events',\n ru: 'Управление Событиями'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'CreateEvent' */ '../components/pages/EventsBackoffice.vue')\n },{\n path: 'events/create',\n name: 'Create Event',\n meta: {\n title: {\n en: 'Create Event',\n ru: 'Создать Событие'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'CreateEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url',\n name: 'Event',\n meta: {\n title: {\n en: 'Event',\n ru: 'Событие'\n }\n },\n component: () => import(/* webpackChunkName: 'EventDetail' */ '../components/pages/Event.vue')\n },{\n path: 'events/:url/edit',\n name: 'Edit Event',\n meta: { authorize: [] },\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url/edit/tickets',\n name: 'Edit Event Tickets',\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEventTickets.vue')\n }\n];\n\nexport default eventsRoutes;\n"],"names":["layoutEvents"],"mappings":";;AAGK,M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EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW,MAAM;AAAA;AAAA,MAA2C;AAAA,IAA0C;AAAA,EACvG;AACH;"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const axios = require("axios");
4
3
  const vue = require("vue");
4
+ const axiosInstance = require("../../globals/views/utils/axios-instance.cjs");
5
5
  const globals = require("../../globals/views/store/globals.cjs");
6
- const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
7
6
  const state = vue.reactive({
8
7
  all: [],
9
8
  filter: {
@@ -41,7 +40,7 @@ const state = vue.reactive({
41
40
  });
42
41
  async function read(options = {}) {
43
42
  try {
44
- const response = await $axios.get("/api/events/read", { params: options });
43
+ const response = await axiosInstance.default.get("/api/events/read", { params: options });
45
44
  if (options.url) {
46
45
  set(response.data, "current");
47
46
  } else {
@@ -54,7 +53,7 @@ async function read(options = {}) {
54
53
  }
55
54
  }
56
55
  async function create(eventData) {
57
- return $axios.post("/api/events/create", eventData).then(
56
+ return axiosInstance.default.post("/api/events/create", eventData).then(
58
57
  (response) => {
59
58
  set(response.data, "current");
60
59
  return Promise.resolve(response.data);
@@ -66,7 +65,7 @@ async function create(eventData) {
66
65
  );
67
66
  }
68
67
  async function update(eventData) {
69
- return $axios.post("/api/events/update", eventData).then(
68
+ return axiosInstance.default.post("/api/events/update", eventData).then(
70
69
  (response) => {
71
70
  set(response.data, "current");
72
71
  return Promise.resolve(response.data);
@@ -78,7 +77,7 @@ async function update(eventData) {
78
77
  );
79
78
  }
80
79
  async function remove(_id) {
81
- return await $axios.post(`/api/events/delete`, { _id }).then(
80
+ return await axiosInstance.default.post(`/api/events/delete`, { _id }).then(
82
81
  (response) => {
83
82
  const index = state.all.findIndex((p) => p._id === _id);
84
83
  if (index !== -1) {
@@ -1 +1 @@
1
- {"version":3,"file":"events.cjs","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["// Dependencies\nimport axios from 'axios';\n// Setup Axios\nconst $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true}) \n// Vue modules\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// State\nconst state = reactive({\n all: [],\n filter: {\n // query\n tags: [],\n period: '',\n date: null,\n // pagination\n },\n pagination: {\n page: 1,\n perPage: 18,\n },\n // Sort\n sort: {\n current: 'popularity',\n ascending: false\n },\n current: {\n _id: \"\",\n special: false,\n specialData: {},\n cover: \"\",\n url: \"\",\n status: \"\",\n name: \"\",\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: [],\n }\n});\n\nasync function read(options = {}) {\n\n try {\n const response = await $axios.get('/api/events/read', { params: options });\n \n if (options.url) {\n set(response.data, 'current')\n } else {\n set(response.data, 'all')\n }\n return Promise.resolve(response.data);\n } catch (err) {\n setError(err)\n return Promise.reject(err);\n }\n}\nasync function create(eventData) {\n return $axios.post('/api/events/create', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function update(eventData) {\n return $axios.post('/api/events/update', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function remove(_id) {\n return await $axios.post(`/api/events/delete`, {_id: _id}).then(\n response => {\n const index = state.all.findIndex(p => p._id === _id);\n if (index !== -1) {\n state.all.splice(index, 1);\n }\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nfunction clean () {\n state.current = {\n _id: \"\",\n cover: \"\",\n url: \"\",\n phase: \"\",\n name: \"\",\n special: false,\n specialData: {\n subtitle: '',\n logos: [],\n video: '',\n ticketImage: '',\n ticketLinkStripe: '',\n ticketPrice: '',\n guestTitle: '',\n guestDescription: '',\n guestFacebook: '',\n guestInstagram: '',\n guestTwitter: '',\n guestTelegram: '',\n guestSoundcloud: '',\n guestSpotify: '',\n guestVideo: '',\n guests: [],\n lineup: [],\n lineupBackground: '',\n previousVideo: ''\n },\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: []\n }\n}\n\nconst history = []\nhistory.push(state) // push initial state\n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n read,\n create,\n update,\n remove,\n set,\n clean,\n}\n"],"names":["reactive","setError","watch"],"mappings":";;;;;AAGA,MAAM,SAAS,MAAM,OAAO,EAAC,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAC;AAM5E,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,QAAQ;AAAA;AAAA,IAEN,MAAM,CAAE;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA;AAAA,EAEP;AAAA,EACD,YAAY;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AAAA;AAAA,EAED,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,WAAW;AAAA,EACZ;AAAA,EACD,SAAS;AAAA,IACP,KAAK;AAAA,IACL,SAAS;AAAA,IACT,aAAa,CAAE;AAAA,IACf,OAAO;AAAA,IACP,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,CAAE;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACD,OAAO;AAAA,IACP,SAAS,CAAE;AAAA,EACZ;AACH,CAAC;AAED,eAAe,KAAK,UAAU,IAAI;AAEhC,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,IAAI,oBAAoB,EAAE,QAAQ,QAAO,CAAE;AAEzE,QAAI,QAAQ,KAAK;AACf,UAAI,SAAS,MAAM,SAAS;AAAA,IAClC,OAAW;AACL,UAAI,SAAS,MAAM,KAAK;AAAA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AAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,MACX,UAAU;AAAA,MACV,OAAO,CAAE;AAAA,MACT,OAAO;AAAA,MACP,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,QAAQ,CAAE;AAAA,MACV,QAAQ,CAAE;AAAA,MACV,kBAAkB;AAAA,MAClB,eAAe;AAAA,IAChB;AAAA,IACD,MAAM,CAAE;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACD,OAAO;AAAA,IACP,SAAS,CAAE;AAAA,EACZ;AACH;AAKAC,IAAAA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;;;;;;;;"}
1
+ {"version":3,"file":"events.cjs","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["// Vue modules\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// State\nconst state = reactive({\n all: [],\n filter: {\n // query\n tags: [],\n period: '',\n date: null,\n // pagination\n },\n pagination: {\n page: 1,\n perPage: 18,\n },\n // Sort\n sort: {\n current: 'popularity',\n ascending: false\n },\n current: {\n _id: \"\",\n special: false,\n specialData: {},\n cover: \"\",\n url: \"\",\n status: \"\",\n name: \"\",\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: [],\n }\n});\n\nasync function read(options = {}) {\n\n try {\n const response = await $axios.get('/api/events/read', { params: options });\n \n if (options.url) {\n set(response.data, 'current')\n } else {\n set(response.data, 'all')\n }\n return Promise.resolve(response.data);\n } catch (err) {\n setError(err)\n return Promise.reject(err);\n }\n}\nasync function create(eventData) {\n return $axios.post('/api/events/create', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function update(eventData) {\n return $axios.post('/api/events/update', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function remove(_id) {\n return await $axios.post(`/api/events/delete`, {_id: _id}).then(\n response => {\n const index = state.all.findIndex(p => p._id === _id);\n if (index !== -1) {\n state.all.splice(index, 1);\n }\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nfunction clean () {\n state.current = {\n _id: \"\",\n cover: \"\",\n url: \"\",\n phase: \"\",\n name: \"\",\n special: false,\n specialData: {\n subtitle: '',\n logos: [],\n video: '',\n ticketImage: '',\n ticketLinkStripe: '',\n ticketPrice: '',\n guestTitle: '',\n guestDescription: '',\n guestFacebook: '',\n guestInstagram: '',\n guestTwitter: '',\n guestTelegram: '',\n guestSoundcloud: '',\n guestSpotify: '',\n guestVideo: '',\n guests: [],\n lineup: [],\n lineupBackground: '',\n previousVideo: ''\n },\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: []\n }\n}\n\nconst history = []\nhistory.push(state) // push initial state\n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n read,\n create,\n update,\n remove,\n set,\n clean,\n}\n"],"names":["reactive","$axios","setError","watch"],"mappings":";;;;;AAOK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,QAAQ;AAAA;AAAA,IAEN,MAAM,CAAE;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA;AAAA,EAEP;AAAA,EACD,YAAY;AAAA,IACV,MAAM;AAAA,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,UAAU,aAAa;AAErC,CAAC;;;;;;;;"}
@@ -1,7 +1,6 @@
1
- import axios from "axios";
2
1
  import { reactive, watch } from "vue";
2
+ import $axios from "../../globals/views/utils/axios-instance.js";
3
3
  import { setError } from "../../globals/views/store/globals.js";
4
- const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
5
4
  const state = reactive({
6
5
  all: [],
7
6
  filter: {
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["// Dependencies\nimport axios from 'axios';\n// Setup Axios\nconst $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true}) \n// Vue modules\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// State\nconst state = reactive({\n all: [],\n filter: {\n // query\n tags: [],\n period: '',\n date: null,\n // pagination\n },\n pagination: {\n page: 1,\n perPage: 18,\n },\n // Sort\n sort: {\n current: 'popularity',\n ascending: false\n },\n current: {\n _id: \"\",\n special: false,\n specialData: {},\n cover: \"\",\n url: \"\",\n status: \"\",\n name: \"\",\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: [],\n }\n});\n\nasync function read(options = {}) {\n\n try {\n const response = await $axios.get('/api/events/read', { params: options });\n \n if (options.url) {\n set(response.data, 'current')\n } else {\n set(response.data, 'all')\n }\n return Promise.resolve(response.data);\n } catch (err) {\n setError(err)\n return Promise.reject(err);\n }\n}\nasync function create(eventData) {\n return $axios.post('/api/events/create', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function update(eventData) {\n return $axios.post('/api/events/update', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function remove(_id) {\n return await $axios.post(`/api/events/delete`, {_id: _id}).then(\n response => {\n const index = state.all.findIndex(p => p._id === _id);\n if (index !== -1) {\n state.all.splice(index, 1);\n }\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nfunction clean () {\n state.current = {\n _id: \"\",\n cover: \"\",\n url: \"\",\n phase: \"\",\n name: \"\",\n special: false,\n specialData: {\n subtitle: '',\n logos: [],\n video: '',\n ticketImage: '',\n ticketLinkStripe: '',\n ticketPrice: '',\n guestTitle: '',\n guestDescription: '',\n guestFacebook: '',\n guestInstagram: '',\n guestTwitter: '',\n guestTelegram: '',\n guestSoundcloud: '',\n guestSpotify: '',\n guestVideo: '',\n guests: [],\n lineup: [],\n lineupBackground: '',\n previousVideo: ''\n },\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: []\n }\n}\n\nconst history = []\nhistory.push(state) // push initial state\n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n read,\n create,\n update,\n remove,\n set,\n clean,\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,MAAM,OAAO,EAAC,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAC;AAM5E,MAAC,QAAQ,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EACP,QAAQ;AAAA;AAAA,IAEN,MAAM,CAAE;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA;AAAA,EAEP;AAAA,EACD,YAAY;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AAAA;AAAA,EAED,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,WAAW;AAAA,EACZ;AAAA,EACD,SAAS;AAAA,IACP,KAAK;AAAA,IACL,SAAS;AAAA,IACT,aAAa,CAAE;AAAA,IACf,OAAO;AAAA,IACP,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,CAAE;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,M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AI;AAAA,IACrC;AAAA,IACD,WAAS;AACP,eAAS,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC5B;AAAA,EACL;AACA;AAEA,SAAS,IAAI,WAAW,UAAU;AAChC,QAAM,QAAQ,IAAI;AACpB;AAEA,SAAS,QAAS;AAChB,QAAM,UAAU;AAAA,IACd,KAAK;AAAA,IACL,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,MACX,UAAU;AAAA,MACV,OAAO,CAAE;AAAA,MACT,OAAO;AAAA,MACP,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,QAAQ,CAAE;AAAA,MACV,QAAQ,CAAE;AAAA,MACV,kBAAkB;AAAA,MAClB,eAAe;AAAA,IAChB;AAAA,IACD,MAAM,CAAE;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACD,OAAO;AAAA,IACP,SAAS,CAAE;AAAA,EACZ;AACH;AAKA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
1
+ {"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["// Vue modules\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// State\nconst state = reactive({\n all: [],\n filter: {\n // query\n tags: [],\n period: '',\n date: null,\n // pagination\n },\n pagination: {\n page: 1,\n perPage: 18,\n },\n // Sort\n sort: {\n current: 'popularity',\n ascending: false\n },\n current: {\n _id: \"\",\n special: false,\n specialData: {},\n cover: \"\",\n url: \"\",\n status: \"\",\n name: \"\",\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: [],\n }\n});\n\nasync function read(options = {}) {\n\n try {\n const response = await $axios.get('/api/events/read', { params: options });\n \n if (options.url) {\n set(response.data, 'current')\n } else {\n set(response.data, 'all')\n }\n return Promise.resolve(response.data);\n } catch (err) {\n setError(err)\n return Promise.reject(err);\n }\n}\nasync function create(eventData) {\n return $axios.post('/api/events/create', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function update(eventData) {\n return $axios.post('/api/events/update', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function remove(_id) {\n return await $axios.post(`/api/events/delete`, {_id: _id}).then(\n response => {\n const index = state.all.findIndex(p => p._id === _id);\n if (index !== -1) {\n state.all.splice(index, 1);\n }\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nfunction clean () {\n state.current = {\n _id: \"\",\n cover: \"\",\n url: \"\",\n phase: \"\",\n name: \"\",\n special: false,\n specialData: {\n subtitle: '',\n logos: [],\n video: '',\n ticketImage: '',\n ticketLinkStripe: '',\n ticketPrice: '',\n guestTitle: '',\n guestDescription: '',\n guestFacebook: '',\n guestInstagram: '',\n guestTwitter: '',\n guestTelegram: '',\n guestSoundcloud: '',\n guestSpotify: '',\n guestVideo: '',\n guests: [],\n lineup: [],\n lineupBackground: '',\n previousVideo: ''\n },\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: []\n }\n}\n\nconst history = []\nhistory.push(state) // push initial state\n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n read,\n create,\n update,\n remove,\n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M,CAAE;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACD,OAAO;AAAA,IACP,SAAS,CAAE;AAAA,EACZ;AACH;AAKA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
@@ -2,8 +2,8 @@
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 */
6
- const Button = require("../../../../components/Button/Button.vue.cjs");
5
+ ;/* empty css */
6
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
7
7
  ;/* empty css */
8
8
  const Chips = require("../../../../components/Chips/Chips.vue.cjs");
9
9
  ;/* empty css */
@@ -79,13 +79,19 @@ const _sfc_main = {
79
79
  };
80
80
  const photos = vue.ref([]);
81
81
  const deletePhoto = async (item) => {
82
- await gallery.default.delete(item._id);
83
- gallery.default.removeItem(item, photos.value);
82
+ let deletedPhoto = JSON.parse(JSON.stringify(item));
83
+ deletedPhoto.owner.target = deletedPhoto.owner.target._id;
84
+ deletedPhoto.creator.target = deletedPhoto.creator.target._id;
85
+ await gallery.default.delete(deletedPhoto);
86
+ gallery.default.removeItem(deletedPhoto, photos.value);
84
87
  };
85
88
  const changeStatus = async (item, status) => {
86
- item.status = status;
87
- await gallery.default.update(item);
88
- gallery.default.updateItem(item, photos.value);
89
+ let updatedPhoto = JSON.parse(JSON.stringify(item));
90
+ updatedPhoto.status = status;
91
+ updatedPhoto.owner.target = updatedPhoto.owner.target._id;
92
+ updatedPhoto.creator.target = updatedPhoto.creator.target._id;
93
+ updatedPhoto = await gallery.default.update(updatedPhoto);
94
+ gallery.default.updateItem(updatedPhoto, photos.value);
89
95
  };
90
96
  const createPhoto = async (status) => {
91
97
  if (uploadedImages.length < 1) {
@@ -123,7 +129,7 @@ const _sfc_main = {
123
129
  { name: "Archived", value: "archived" }
124
130
  ],
125
131
  actions: [
126
- { method: () => openPhotoPopup(null), label: "Add Photo" }
132
+ ..._ctx.hasAccess(vue.unref(route).params._id, "gallery", "create", auth.state.accesses) ? [{ method: () => openPhotoPopup(null), label: "Add Photo" }] : []
127
133
  ],
128
134
  class: "mn-b-small bg-light bg-light radius-big"
129
135
  }, null, 8, ["tabs_current", "actions"]),
@@ -167,9 +173,12 @@ const _sfc_main = {
167
173
  creator: item.creator,
168
174
  date: item.createdAt,
169
175
  actions: [
170
- { method: () => deletePhoto(item), label: "Delete" },
171
- { method: () => changeStatus(item, "archived"), label: "Archive" },
172
- item.status === "draft" ? { method: () => changeStatus(item, "published"), label: "Publish" } : { method: () => changeStatus(item, "draft"), label: "Draft" }
176
+ ..._ctx.hasAccess(vue.unref(route).params._id, "gallery", "delete", auth.state.accesses) ? [{ method: () => deletePhoto(item), label: "Delete" }] : [],
177
+ ..._ctx.hasAccess(vue.unref(route).params._id, "gallery", "edit", auth.state.accesses) ? [
178
+ ...item.status !== "archived" ? [{ method: () => changeStatus(item, "archived"), label: "Archive" }] : [],
179
+ ...item.status !== "published" ? [{ method: () => changeStatus(item, "published"), label: "Publish" }] : [],
180
+ ...item.status !== "draft" ? [{ method: () => changeStatus(item, "draft"), label: "Draft" }] : []
181
+ ] : []
173
182
  ],
174
183
  class: "pd-small mn-b-small"
175
184
  }, null, 8, ["entity", "user", "owner", "creator", "date", "actions"]),
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeGallery.vue.cjs","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n { method: () => openPhotoPopup(null), label: 'Add Photo' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n { method: () => deletePhoto(item), label: 'Delete' },\n { method: () => changeStatus(item,'archived'), label: 'Archive' },\n item.status === 'draft' ? \n { method: () => changeStatus(item,'published'), label: 'Publish' } : \n { method: () => changeStatus(item,'draft'), label: 'Draft' }\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\n\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n await gallery.delete(item._id);\n gallery.removeItem(item, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n item.status = status\n await gallery.update(item)\n gallery.updateItem(item, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRoute","ref","gallery","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4KA,UAAM,QAAQA,UAAQ,SAAA;AAGtB,UAAM,MAAMC,IAAG,IAAC,KAAK;AAErB,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;AAGD,UAAM,qBAAqBA,IAAAA,IAAI,KAAK;AACpC,aAAS,iBAAiB,OAAO;AAC/B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,oBAAoB;AAC3B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,mBAAmBA,IAAAA,IAAI,KAAK;AAClC,aAAS,eAAe,OAAO;AAC7B,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,kBAAkB;AACzB,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AACvB,oBAAc,QAAQ,EAAE,MAAM,MAAM,OAAO;IAC7C;AAEA,UAAM,gBAAgBA,IAAAA,IAAI,IAAI;AACLA,QAAG,IAAC,KAAK;AAClC,UAAM,gBAAgBA,IAAAA,IAAI;AAAA,MACxB,MAAM;AAAA,MACN,OAAO;AAAA,IACT,CAAC;AACD,UAAM,iBAAiBA,IAAG,IAAC,EAAE;AAC7B,UAAM,kBAAkB,CAAC,cAAc;AACrC,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,SAASA,IAAG,IAAC,EAAE;AAErB,UAAM,cAAc,OAAO,SAAS;AAClC,YAAMC,gBAAQ,OAAO,KAAK,GAAG;AAC7BA,cAAAA,QAAQ,WAAW,MAAM,OAAO,KAAK;AAAA,IACvC;AAEA,UAAM,eAAe,OAAO,MAAM,WAAW;AAC3C,WAAK,SAAS;AACd,YAAMA,QAAO,QAAC,OAAO,IAAI;AACzBA,cAAAA,QAAQ,WAAW,MAAM,OAAO,KAAK;AAAA,IACvC;AAEA,UAAM,cAAc,OAAO,WAAW;AACpC,UAAI,eAAe,SAAS,GAAG;AAC7B,cAAM,yBAAyB;AAC/B;AAAA,MACD;AAED,UAAI,gBAAgB,MAAMA,QAAO,QAAC,OAAO;AAAA,QACvC,QAAQ,eAAe;AAAA,QACvB,MAAM,cAAc,MAAM;AAAA,QAC1B;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQC,KAAAA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtCD,gBAAAA,QAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"BackofficeGallery.vue.cjs","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'create', auth.state.accesses) ? [{ method: () => openPhotoPopup(null), label: 'Add Photo' }] : [])\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'delete', auth.state.accesses) ? [{ method: () => deletePhoto(item), label: 'Delete' }] : []),\n ...(hasAccess(route.params._id, 'gallery', 'edit', auth.state.accesses) ? [\n ...(item.status !== 'archived' ? [{ method: () => changeStatus(item, 'archived'), label: 'Archive' }] : []),\n ...(item.status !== 'published' ? [{ method: () => changeStatus(item, 'published'), label: 'Publish' }] : []),\n ...(item.status !== 'draft' ? [{ method: () => changeStatus(item, 'draft'), label: 'Draft' }] : [])\n ] : [])\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n let deletedPhoto = JSON.parse(JSON.stringify(item));\n\n deletedPhoto.owner.target = deletedPhoto.owner.target._id\n deletedPhoto.creator.target = deletedPhoto.creator.target._id\n\n await gallery.delete(deletedPhoto);\n\n gallery.removeItem(deletedPhoto, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n let updatedPhoto = JSON.parse(JSON.stringify(item));\n\n updatedPhoto.status = status\n\n updatedPhoto.owner.target = updatedPhoto.owner.target._id\n updatedPhoto.creator.target = updatedPhoto.creator.target._id\n\n updatedPhoto = await gallery.update(updatedPhoto)\n gallery.updateItem(updatedPhoto, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRoute","ref","gallery","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAM,QAAQA,UAAQ,SAAA;AAGtB,UAAM,MAAMC,IAAG,IAAC,KAAK;AAErB,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAA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,SAAS,aAAa,MAAM,OAAO;AACtD,mBAAa,QAAQ,SAAS,aAAa,QAAQ,OAAO;AAE1D,qBAAe,MAAMA,QAAAA,QAAQ,OAAO,YAAY;AAChDA,cAAAA,QAAQ,WAAW,cAAc,OAAO,KAAK;AAAA,IAC/C;AAEA,UAAM,cAAc,OAAO,WAAW;AACpC,UAAI,eAAe,SAAS,GAAG;AAC7B,cAAM,yBAAyB;AAC/B;AAAA,MACD;AAED,UAAI,gBAAgB,MAAMA,QAAO,QAAC,OAAO;AAAA,QACvC,QAAQ,eAAe;AAAA,QACvB,MAAM,cAAc,MAAM;AAAA,QAC1B;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQC,KAAAA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtCD,gBAAAA,QAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { ref, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createBlock, createCommentVNode, createTextVNode } from "vue";
2
2
  import { useRoute } from "vue-router";
3
- /* empty css */
4
- import _sfc_main$9 from "../../../../components/Button/Button.vue.js";
3
+ /* empty css */
4
+ import _sfc_main$9 from "../../../../components/Button/Button.vue2.js";
5
5
  /* empty css */
6
6
  import _sfc_main$4 from "../../../../components/Chips/Chips.vue.js";
7
7
  /* empty css */
@@ -77,13 +77,19 @@ const _sfc_main = {
77
77
  };
78
78
  const photos = ref([]);
79
79
  const deletePhoto = async (item) => {
80
- await gallery.delete(item._id);
81
- gallery.removeItem(item, photos.value);
80
+ let deletedPhoto = JSON.parse(JSON.stringify(item));
81
+ deletedPhoto.owner.target = deletedPhoto.owner.target._id;
82
+ deletedPhoto.creator.target = deletedPhoto.creator.target._id;
83
+ await gallery.delete(deletedPhoto);
84
+ gallery.removeItem(deletedPhoto, photos.value);
82
85
  };
83
86
  const changeStatus = async (item, status) => {
84
- item.status = status;
85
- await gallery.update(item);
86
- gallery.updateItem(item, photos.value);
87
+ let updatedPhoto = JSON.parse(JSON.stringify(item));
88
+ updatedPhoto.status = status;
89
+ updatedPhoto.owner.target = updatedPhoto.owner.target._id;
90
+ updatedPhoto.creator.target = updatedPhoto.creator.target._id;
91
+ updatedPhoto = await gallery.update(updatedPhoto);
92
+ gallery.updateItem(updatedPhoto, photos.value);
87
93
  };
88
94
  const createPhoto = async (status) => {
89
95
  if (uploadedImages.length < 1) {
@@ -121,7 +127,7 @@ const _sfc_main = {
121
127
  { name: "Archived", value: "archived" }
122
128
  ],
123
129
  actions: [
124
- { method: () => openPhotoPopup(null), label: "Add Photo" }
130
+ ..._ctx.hasAccess(unref(route).params._id, "gallery", "create", state.accesses) ? [{ method: () => openPhotoPopup(null), label: "Add Photo" }] : []
125
131
  ],
126
132
  class: "mn-b-small bg-light bg-light radius-big"
127
133
  }, null, 8, ["tabs_current", "actions"]),
@@ -165,9 +171,12 @@ const _sfc_main = {
165
171
  creator: item.creator,
166
172
  date: item.createdAt,
167
173
  actions: [
168
- { method: () => deletePhoto(item), label: "Delete" },
169
- { method: () => changeStatus(item, "archived"), label: "Archive" },
170
- item.status === "draft" ? { method: () => changeStatus(item, "published"), label: "Publish" } : { method: () => changeStatus(item, "draft"), label: "Draft" }
174
+ ..._ctx.hasAccess(unref(route).params._id, "gallery", "delete", state.accesses) ? [{ method: () => deletePhoto(item), label: "Delete" }] : [],
175
+ ..._ctx.hasAccess(unref(route).params._id, "gallery", "edit", state.accesses) ? [
176
+ ...item.status !== "archived" ? [{ method: () => changeStatus(item, "archived"), label: "Archive" }] : [],
177
+ ...item.status !== "published" ? [{ method: () => changeStatus(item, "published"), label: "Publish" }] : [],
178
+ ...item.status !== "draft" ? [{ method: () => changeStatus(item, "draft"), label: "Draft" }] : []
179
+ ] : []
171
180
  ],
172
181
  class: "pd-small mn-b-small"
173
182
  }, null, 8, ["entity", "user", "owner", "creator", "date", "actions"]),
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeGallery.vue.js","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n { method: () => openPhotoPopup(null), label: 'Add Photo' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n { method: () => deletePhoto(item), label: 'Delete' },\n { method: () => changeStatus(item,'archived'), label: 'Archive' },\n item.status === 'draft' ? \n { method: () => changeStatus(item,'published'), label: 'Publish' } : \n { method: () => changeStatus(item,'draft'), label: 'Draft' }\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\n\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n await gallery.delete(item._id);\n gallery.removeItem(item, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n item.status = status\n await gallery.update(item)\n gallery.updateItem(item, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4KA,UAAM,QAAQ,SAAQ;AAGtB,UAAM,MAAM,IAAI,KAAK;AAErB,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;A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QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtC,gBAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"BackofficeGallery.vue.js","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'create', auth.state.accesses) ? [{ method: () => openPhotoPopup(null), label: 'Add Photo' }] : [])\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'delete', auth.state.accesses) ? [{ method: () => deletePhoto(item), label: 'Delete' }] : []),\n ...(hasAccess(route.params._id, 'gallery', 'edit', auth.state.accesses) ? [\n ...(item.status !== 'archived' ? [{ method: () => changeStatus(item, 'archived'), label: 'Archive' }] : []),\n ...(item.status !== 'published' ? [{ method: () => changeStatus(item, 'published'), label: 'Publish' }] : []),\n ...(item.status !== 'draft' ? [{ method: () => changeStatus(item, 'draft'), label: 'Draft' }] : [])\n ] : [])\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n let deletedPhoto = JSON.parse(JSON.stringify(item));\n\n deletedPhoto.owner.target = deletedPhoto.owner.target._id\n deletedPhoto.creator.target = deletedPhoto.creator.target._id\n\n await gallery.delete(deletedPhoto);\n\n gallery.removeItem(deletedPhoto, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n let updatedPhoto = JSON.parse(JSON.stringify(item));\n\n updatedPhoto.status = status\n\n updatedPhoto.owner.target = updatedPhoto.owner.target._id\n updatedPhoto.creator.target = updatedPhoto.creator.target._id\n\n updatedPhoto = await gallery.update(updatedPhoto)\n gallery.updateItem(updatedPhoto, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAM,QAAQ,SAAQ;AAGtB,UAAM,MAAM,IAAI,KAAK;AAErB,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;AAGD,UAAM,qBAAqB,IAAI,KAAK;AACpC,aAAS,iBAAiB,OAAO;AAC/B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,oBAAoB;AAC3B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,mBAAmB,IAAI,KAAK;AAClC,aAAS,eAAe,OAAO;AAC7B,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,kBAAkB;AACzB,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AACvB,oBAAc,QAAQ,EAAE,MAAM,MAAM,OAAO;IAC7C;AAEA,UAAM,gBAAgB,IAAI,IAAI;AACL,QAAI,KAAK;AAClC,UAAM,gBAAgB,IAAI;AAAA,MACxB,MAAM;AAAA,MACN,OAAO;AAAA,IACT,CAAC;AACD,UAAM,iBAAiB,IAAI,EAAE;AAC7B,UAAM,kBAAkB,CAAC,cAAc;AACrC,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,SAAS,IA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6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const ownership_validation = require("../../auth/views/middlewares/ownership.validation.cjs");
3
4
  const gallery = [{
4
5
  path: "gallery",
5
6
  name: "Backoffice Gallery",
@@ -7,9 +8,11 @@ const gallery = [{
7
8
  title: {
8
9
  en: "Backoffice Gallery",
9
10
  ru: "Управление Галерей"
10
- },
11
- authorize: []
11
+ }
12
12
  },
13
+ beforeEnter: [
14
+ ownership_validation.requiresAccess("gallery", "read")
15
+ ],
13
16
  component: () => Promise.resolve().then(() => require(
14
17
  /* webpackChunkName: 'BackofficeGallery' */
15
18
  "../components/sections/BackofficeGallery.vue.cjs"
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.backoffice.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["const gallery = [{\n path: 'gallery',\n name: 'Backoffice Gallery',\n meta: {\n title: {\n en: 'Backoffice Gallery',\n ru: 'Управление Галерей'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),\n}];\n\nexport default gallery;"],"names":[],"mappings":";;AAAK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,IACD,WAAW,CAAE;AAAA,EACd;AAAA,EACD,WAAW,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA;AAAA;AAAA,IAA4C;AAAA,EAAmE,CAAC;AAC1I,CAAC;;"}
1
+ {"version":3,"file":"gallery.backoffice.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["import * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\nconst gallery = [{\n path: 'gallery',\n name: 'Backoffice Gallery',\n meta: {\n title: {\n en: 'Backoffice Gallery',\n ru: 'Управление Галерей'\n },\n },\n beforeEnter: [\n validationOwnership.requiresAccess('gallery', 'read')\n ],\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),\n}];\n\nexport default gallery;"],"names":["validationOwnership.requiresAccess"],"mappings":";;;AAEK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,EACF;AAAA,EACD,aAAa;AAAA,IACXA,qBAAkC,eAAC,WAAW,MAAM;AAAA,EACrD;AAAA,EACD,WAAW,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA;AAAA;AAAA,IAA4C;AAAA,EAAmE,CAAC;AAC1I,CAAC;;"}
@@ -1,3 +1,4 @@
1
+ import { requiresAccess } from "../../auth/views/middlewares/ownership.validation.js";
1
2
  const gallery = [{
2
3
  path: "gallery",
3
4
  name: "Backoffice Gallery",
@@ -5,9 +6,11 @@ const gallery = [{
5
6
  title: {
6
7
  en: "Backoffice Gallery",
7
8
  ru: "Управление Галерей"
8
- },
9
- authorize: []
9
+ }
10
10
  },
11
+ beforeEnter: [
12
+ requiresAccess("gallery", "read")
13
+ ],
11
14
  component: () => import(
12
15
  /* webpackChunkName: 'BackofficeGallery' */
13
16
  "../components/sections/BackofficeGallery.vue.js"
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.backoffice.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["const gallery = [{\n path: 'gallery',\n name: 'Backoffice Gallery',\n meta: {\n title: {\n en: 'Backoffice Gallery',\n ru: 'Управление Галерей'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),\n}];\n\nexport default gallery;"],"names":[],"mappings":"AAAK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,IACD,WAAW,CAAE;AAAA,EACd;AAAA,EACD,WAAW,MAAM;AAAA;AAAA,IAAmD;AAAA,EAAmE;AACzI,CAAC;"}
1
+ {"version":3,"file":"gallery.backoffice.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["import * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\nconst gallery = [{\n path: 'gallery',\n name: 'Backoffice Gallery',\n meta: {\n title: {\n en: 'Backoffice Gallery',\n ru: 'Управление Галерей'\n },\n },\n beforeEnter: [\n validationOwnership.requiresAccess('gallery', 'read')\n ],\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),\n}];\n\nexport default gallery;"],"names":["validationOwnership.requiresAccess"],"mappings":";AAEK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,EACF;AAAA,EACD,aAAa;AAAA,IACXA,eAAmC,WAAW,MAAM;AAAA,EACrD;AAAA,EACD,WAAW,MAAM;AAAA;AAAA,IAAmD;AAAA,EAAmE;AACzI,CAAC;"}
@@ -8,6 +8,7 @@ const Header = require("./views/components/partials/Header.vue.cjs");
8
8
  const Sidebar = require("./views/components/partials/Sidebar.vue.cjs");
9
9
  const BottomNavigationBar = require("./views/components/partials/BottomNavigationBar.vue.cjs");
10
10
  const mixins = require("./views/mixins/mixins.cjs");
11
+ const vueAppRenderer = require("./views/utils/vue-app-renderer.cjs");
11
12
  const globals = require("./views/store/globals.cjs");
12
13
  function initializeGlobals(app, store, router, options = {}) {
13
14
  const route = options.route || "Home";
@@ -60,6 +61,7 @@ exports.layoutClient = Client.default;
60
61
  exports.Header = Header.default;
61
62
  exports.Sidebar = Sidebar.default;
62
63
  exports.mixins = mixins;
64
+ exports.appRenderer = vueAppRenderer;
63
65
  exports.storeGlobals = globals;
64
66
  exports.default = ModuleGlobals;
65
67
  //# sourceMappingURL=globals.client.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"globals.client.cjs","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":";;;;;;;;;;;AA8BA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAgB/B,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI;AAC1D,MAAI,OAAO,iBAAiB,sBAAsB,QAAQ,IAAI;AAE9D,MACG,MAAMA,OAAmB,YAAA;AAG5B,SAAO,WAAW,CAAC,IAAI,MAAM,SAAS;AACpC,UAAM,SAAS,GAAG,OAAO;AAEzB,QAAI,QAAQ;AACV,UAAI,CAAC,IAAI,OAAO,iBAAiB,MAAM,iBAAiB,SAAS,MAAM,GAAG;AACxE,eAAO,KAAK,EAAE,MAAM,OAAQ,CAAA;AAAA,MACpC,OAAa;AACN,YAAI,OAAO,iBAAiB,MAAM,SAAS;AAC3C,eAAO,KAAI;AAAA,MACX;AAAA,IACF;AAED,WAAO,KAAI;AAAA,EAEf,CAAG;AAED,QAAM,SAAS,WAAWC,OAAY;AAEtC,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,YAAY,WAAW,MAAM,qCAAO,sCAAwD,CAAA,EAAG,CAAA;AAC3I,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,gBAAgB,WAAW,MAAM,qCAAO,sCAAwD,CAAA,EAAG,CAAA;AAC/I,SAAO,SAAS,OAAO,EAAE,MAAM,mBAAmB,MAAM,YAAY,UAAU,EAAE,MAAM,WAAU,EAAI,CAAA;AACtG;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA;AAAA,IAEP;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,cAAMC,OAAY;AAAA,MAClB,WAAMC,IAAS;AAAA,MACf,QAAMC,OAAM;AAAA,MACZ,SAAMC,QAAO;AAAA,MACb,qBAAMC,oBAAmB;AAAA,IACpB;AAAA,EACF;AACH;;;;;;;;;;"}
1
+ {"version":3,"file":"globals.client.cjs","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as appRenderer from './views/utils/vue-app-renderer.js';\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n appRenderer,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":";;;;;;;;;;;;AAgCA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAgB/B,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI;AAC1D,MAAI,OAAO,iBAAiB,sBAAsB,QAAQ,IAAI;AAE9D,MACG,MAAMA,OAAmB,YAAA;AAG5B,SAAO,WAAW,CAAC,IAAI,MAAM,SAAS;AACpC,UAAM,SAAS,GAAG,OAAO;AAEzB,QAAI,QAAQ;AACV,UAAI,CAAC,IAAI,OAAO,iBAAiB,MAAM,iBAAiB,SAAS,MAAM,GAAG;AACxE,eAAO,KAAK,EAAE,MAAM,OAAQ,CAAA;AAAA,MACpC,OAAa;AACN,YAAI,OAAO,iBAAiB,MAAM,SAAS;AAC3C,eAAO,KAAI;AAAA,MACX;AAAA,IACF;AAED,WAAO,KAAI;AAAA,EAEf,CAAG;AAED,QAAM,SAAS,WAAWC,OAAY;AAEtC,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,YAAY,WAAW,MAAM,qCAAO,sCAAwD,CAAA,EAAG,CAAA;AAC3I,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,gBAAgB,WAAW,MAAM,qCAAO,sCAAwD,CAAA,EAAG,CAAA;AAC/I,SAAO,SAAS,OAAO,EAAE,MAAM,mBAAmB,MAAM,YAAY,UAAU,EAAE,MAAM,WAAU,EAAI,CAAA;AACtG;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA;AAAA,IAEP;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,cAAMC,OAAY;AAAA,MAClB,WAAMC,IAAS;AAAA,MACf,QAAMC,OAAM;AAAA,MACZ,SAAMC,QAAO;AAAA,MACb,qBAAMC,oBAAmB;AAAA,IACpB;AAAA,EACF;AACH;;;;;;;;;;;"}
@@ -7,6 +7,7 @@ import _sfc_main$3 from "./views/components/partials/Sidebar.vue.js";
7
7
  import _sfc_main$4 from "./views/components/partials/BottomNavigationBar.vue.js";
8
8
  import { globalMixins } from "./views/mixins/mixins.js";
9
9
  import * as mixins from "./views/mixins/mixins.js";
10
+ import * as vueAppRenderer from "./views/utils/vue-app-renderer.js";
10
11
  import * as globals from "./views/store/globals.js";
11
12
  function initializeGlobals(app, store, router, options = {}) {
12
13
  const route = options.route || "Home";
@@ -55,6 +56,7 @@ const ModuleGlobals = {
55
56
  export {
56
57
  _sfc_main$2 as Header,
57
58
  _sfc_main$3 as Sidebar,
59
+ vueAppRenderer as appRenderer,
58
60
  ModuleGlobals as default,
59
61
  default2 as getBrowserLocale,
60
62
  _sfc_main$1 as layoutApp,
@@ -1 +1 @@
1
- {"version":3,"file":"globals.client.js","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleG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AAAA,IAEP;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,cAAMC;AAAAA,MACN,WAAMC;AAAAA,MACN,QAAMC;AAAAA,MACN,SAAMC;AAAAA,MACN,qBAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
1
+ {"version":3,"file":"globals.client.js","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as appRenderer from './views/utils/vue-app-renderer.js';\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n appRenderer,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":";;;;;;;;;;;AAgCA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAgB/B,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI;AAC1D,MAAI,OAAO,iBAAiB,sBAAsB,QAAQ,IAAI;AAE9D,MACG,MAAMA,YAAmB;AAG5B,SAAO,WAAW,CAAC,IAAI,MAAM,SAAS;AACpC,UAAM,SAAS,GAAG,OAAO;AAEzB,QAAI,QAAQ;AACV,UAAI,CAAC,IAAI,OAAO,iBAAiB,MAAM,iBAAiB,SAAS,MAAM,GAAG;AACxE,eAAO,KAAK,EAAE,MAAM,OAAQ,CAAA;AAAA,MACpC,OAAa;AACN,YAAI,OAAO,iBAAiB,MAAM,SAAS;AAC3C,eAAO,KAAI;AAAA,MACX;AAAA,IACF;AAED,WAAO,KAAI;AAAA,EAEf,CAAG;AAED,QAAM,SAAS,WAAWC,OAAY;AAEtC,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,YAAY,WAAW,MAAM,OAAO,qCAAwD,EAAG,CAAA;AAC3I,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,gBAAgB,WAAW,MAAM,OAAO,qCAAwD,EAAG,CAAA;AAC/I,SAAO,SAAS,OAAO,EAAE,MAAM,mBAAmB,MAAM,YAAY,UAAU,EAAE,MAAM,WAAU,EAAI,CAAA;AACtG;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA;AAAA,IAEP;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,cAAMC;AAAAA,MACN,WAAMC;AAAAA,MACN,QAAMC;AAAAA,MACN,SAAMC;AAAAA,MACN,qBAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
@@ -57,9 +57,10 @@ class Store {
57
57
  body: item
58
58
  });
59
59
  }
60
- async delete(itemId) {
61
- return await this.request(`/delete/${itemId}`, {
62
- method: "DELETE"
60
+ async delete(item) {
61
+ return await this.request(`/delete`, {
62
+ method: "DELETE",
63
+ body: item
63
64
  });
64
65
  }
65
66
  // Enhanced Mutations utilizing Vue reactivity system efficiently