@ozdao/prometheus-framework 0.2.188 → 0.2.190

Sign up to get free protection for your applications and to get access to all the features.
Files changed (367) hide show
  1. package/dist/builder.js +6 -3
  2. package/dist/builder.mjs +6 -3
  3. package/dist/node_modules/@unhead/vue/dist/shared/vue.cf295fb1.cjs +1 -0
  4. package/dist/node_modules/@unhead/vue/dist/shared/vue.cf295fb1.js +26 -0
  5. package/dist/node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs +1 -0
  6. package/dist/node_modules/@unhead/vue/dist/shared/vue.f36acd1f.js +26 -0
  7. package/dist/node_modules/unhead/dist/index.cjs +1 -0
  8. package/dist/node_modules/unhead/dist/index.js +7 -0
  9. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +6 -6
  11. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.cjs +1 -0
  12. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.js +96 -0
  13. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.cjs +1 -0
  14. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.js +74 -0
  15. package/dist/prometheus-framework/src/components/Status/Status.vue.cjs +1 -0
  16. package/dist/prometheus-framework/src/components/Status/Status.vue.js +29 -0
  17. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +73 -42
  29. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  39. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +2 -2
  43. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
  51. package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
  53. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  57. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
  59. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/globals/globals.client.js +37 -10
  61. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +72 -0
  63. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +57 -0
  65. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -0
  66. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +35 -0
  67. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.js +75 -0
  69. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -0
  70. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +194 -0
  71. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.cjs +1 -0
  72. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.js +38 -0
  73. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.cjs +1 -0
  74. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.js +31 -0
  75. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  76. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +92 -0
  77. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -0
  78. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +197 -0
  79. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.cjs +1 -0
  80. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.js +16 -0
  81. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.cjs +1 -0
  82. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.js +10 -0
  83. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.cjs +1 -0
  84. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.js +10 -0
  85. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.cjs +1 -0
  86. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.js +157 -0
  87. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -0
  88. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.js +95 -0
  89. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -0
  90. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +54 -0
  91. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -0
  92. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.js +126 -0
  93. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.cjs +1 -0
  94. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.js +7 -0
  95. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.cjs +1 -0
  96. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.js +47 -0
  97. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.cjs +1 -0
  98. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.js +18 -0
  99. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +1 -0
  100. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +83 -0
  101. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -11
  103. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +3 -3
  105. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +4 -4
  107. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  115. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  119. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  123. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +1 -1
  125. package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/orders/store/applications.js +1 -1
  127. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +1 -1
  129. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
  131. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  137. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  141. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  143. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  147. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  149. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
  161. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
  162. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
  163. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  164. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  165. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
  166. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +2 -2
  167. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  168. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  169. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  171. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.cjs +1 -1
  172. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.js +1 -1
  173. package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/pages/views/store/pages.js +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +3 -3
  177. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  181. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  185. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  187. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  189. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  190. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  191. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  192. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
  193. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  194. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
  195. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  196. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
  197. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  199. package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
  200. package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
  201. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  202. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  203. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  204. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  205. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  206. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  207. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  208. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +3 -3
  209. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  211. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  213. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
  215. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  218. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  219. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  221. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  222. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
  223. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.cjs +1 -1
  224. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.js +1 -1
  225. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  226. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +1 -1
  227. package/dist/style.css +1 -1
  228. package/package.json +1 -1
  229. package/src/builder/modes/ssr.dev.js +4 -1
  230. package/src/builder/templates/page.js +1 -1
  231. package/src/builder/webpack/webpack.config.base.js +2 -1
  232. package/src/builder/webpack/webpack.config.spa.js +0 -1
  233. package/src/components/Feed/Feed.vue +5 -5
  234. package/src/components/LocationSelection/LocationSelection.vue +5 -6
  235. package/src/components/Sidebar/Sidebar.vue +1 -1
  236. package/src/modules/auth/controllers/services/twofa.service.js +1 -1
  237. package/src/modules/auth/views/components/pages/EnterCode.vue +1 -1
  238. package/src/modules/auth/views/store/auth.js +1 -1
  239. package/src/modules/auth/views/store/twofa.js +1 -1
  240. package/src/modules/auth/views/validations/inputs.validation.js +1 -1
  241. package/src/modules/backoffice/router/backoffice.js +1 -1
  242. package/src/modules/chats/controllers/chats.controller.js +1 -1
  243. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  244. package/src/modules/community/components/pages/BlogPost.vue +63 -2
  245. package/src/modules/community/components/sections/Comment.vue +1 -1
  246. package/src/modules/community/models/blogpost.model.js +4 -4
  247. package/src/modules/community/store/blogposts.js +1 -1
  248. package/src/modules/community/store/reactions.js +1 -1
  249. package/src/modules/events/components/blocks/CardEvent.vue +2 -2
  250. package/src/modules/events/controllers/events.controller.js +1 -1
  251. package/src/modules/events/controllers/tickets.controller.js +1 -1
  252. package/src/modules/events/models/event.model.js +4 -4
  253. package/src/modules/events/store/events.js +1 -1
  254. package/src/modules/events/store/tickets.js +1 -1
  255. package/src/modules/gallery/components/pages/Gallery.vue +2 -2
  256. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -2
  257. package/src/modules/gallery/models/photo.model.js +3 -3
  258. package/src/modules/gallery/store/gallery.js +1 -1
  259. package/src/modules/globals/{services → controllers/classes}/globals.crud.js +2 -2
  260. package/src/modules/globals/globals.client.js +83 -8
  261. package/src/modules/globals/globals.server.js +3 -3
  262. package/src/modules/globals/models/{metadata.schema.js → schemas/metadata.schema.js} +1 -1
  263. package/src/modules/globals/{services → views/classes}/globals.store.js +1 -1
  264. package/src/modules/globals/{components → views/components}/blocks/BlockSorting.vue +1 -1
  265. package/src/modules/globals/views/components/layouts/App.vue +104 -0
  266. package/src/modules/globals/{components → views/components}/layouts/Client.vue +31 -53
  267. package/src/modules/globals/{components → views/components}/partials/BottomNavigation.vue +0 -2
  268. package/src/modules/globals/{components → views/components}/partials/Header.vue +15 -11
  269. package/src/modules/globals/{components → views/components}/partials/Navigation.vue +4 -4
  270. package/src/modules/globals/{components → views/components}/sections/Walkthrough.vue +1 -1
  271. package/src/modules/globals/views/middlewares/localization.js +16 -0
  272. package/src/modules/integrations/stripe/controllers/webhooks/stripe.webhook.js +2 -2
  273. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  274. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
  275. package/src/modules/marketplace/router/marketplace.js +1 -1
  276. package/src/modules/orders/components/pages/Order.vue +1 -1
  277. package/src/modules/orders/components/pages/OrderBackoffice.vue +2 -2
  278. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  279. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
  280. package/src/modules/orders/components/pages/Orders.vue +2 -2
  281. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  282. package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
  283. package/src/modules/orders/controllers/applications.controller.js +1 -1
  284. package/src/modules/orders/controllers/orders.controller.js +1 -1
  285. package/src/modules/orders/models/customer.model.js +3 -3
  286. package/src/modules/orders/models/order.model.js +1 -1
  287. package/src/modules/orders/orders.server.js +1 -1
  288. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  289. package/src/modules/orders/router/orders.router.js +1 -1
  290. package/src/modules/orders/store/applications.js +1 -1
  291. package/src/modules/orders/store/customers.store.js +1 -1
  292. package/src/modules/orders/store/orders.js +1 -1
  293. package/src/modules/orders/store/shopcart.js +1 -1
  294. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  295. package/src/modules/organizations/components/pages/Members.vue +2 -2
  296. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  297. package/src/modules/organizations/controllers/invites.controller.js +1 -1
  298. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  299. package/src/modules/organizations/models/invite.model.js +2 -2
  300. package/src/modules/organizations/models/organization.model.js +1 -1
  301. package/src/modules/organizations/router/backoffice.router.js +1 -1
  302. package/src/modules/organizations/router/organizations.js +1 -1
  303. package/src/modules/organizations/store/departments.js +1 -1
  304. package/src/modules/organizations/store/invites.js +1 -1
  305. package/src/modules/organizations/store/memberships.js +1 -1
  306. package/src/modules/organizations/store/organizations.js +1 -1
  307. package/src/modules/pages/pages.server.js +1 -1
  308. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  309. package/src/modules/pages/views/components/pages/PageEdit.vue +1 -1
  310. package/src/modules/pages/views/components/pages/Pages.vue +2 -2
  311. package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
  312. package/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  313. package/src/modules/pages/views/router/pages.router.js +1 -1
  314. package/src/modules/pages/views/store/pages.js +1 -1
  315. package/src/modules/pages/views/store/pages.store.js +1 -1
  316. package/src/modules/products/components/blocks/CardLeftover.vue +1 -1
  317. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  318. package/src/modules/products/components/pages/ProductEdit.vue +1 -1
  319. package/src/modules/products/components/pages/Products.vue +1 -1
  320. package/src/modules/products/models/leftover.model.js +1 -1
  321. package/src/modules/products/store/categories.js +1 -1
  322. package/src/modules/products/store/leftovers.js +1 -1
  323. package/src/modules/products/store/products.js +1 -1
  324. package/src/modules/projects/store/projects.js +1 -1
  325. package/src/modules/reports/store/reports.js +1 -1
  326. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  327. package/src/modules/spots/components/pages/Map.vue +1 -1
  328. package/src/modules/spots/router/spots.js +1 -1
  329. package/src/modules/spots/spots.server.js +1 -1
  330. package/src/modules/spots/store/spots.js +1 -1
  331. package/src/modules/users/models/user.model.js +3 -3
  332. package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
  333. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  334. package/src/modules/wallet/views/store/payments.store.js +1 -1
  335. package/src/modules/wallet/views/store/wallet.store.js +1 -1
  336. package/src/modules/globals/router/routerGuards.js +0 -29
  337. /package/src/modules/globals/{services → controllers/classes}/globals.cache.js +0 -0
  338. /package/src/modules/globals/{services → controllers/classes}/globals.logger.js +0 -0
  339. /package/src/modules/globals/{services → controllers/classes}/globals.observer.js +0 -0
  340. /package/src/modules/globals/{services → controllers/classes}/globals.webhook.js +0 -0
  341. /package/src/modules/globals/{utils → controllers/utils}/mailing.js +0 -0
  342. /package/src/modules/globals/{utils → controllers/utils}/parseCookie.js +0 -0
  343. /package/src/modules/globals/{utils → controllers/utils}/seo-friendly-url.js +0 -0
  344. /package/src/modules/globals/{utils → controllers/utils}/sitemap.js +0 -0
  345. /package/src/modules/globals/models/{common.schema.js → schemas/common.schema.js} +0 -0
  346. /package/src/modules/globals/models/{credentials.schema.js → schemas/credentials.schema.js} +0 -0
  347. /package/src/modules/globals/models/{engagement.schema.js → schemas/engagement.schema.js} +0 -0
  348. /package/src/modules/globals/models/{ownership.schema.js → schemas/ownership.schema.js} +0 -0
  349. /package/src/modules/globals/models/{profile.schema.js → schemas/profile.schema.js} +0 -0
  350. /package/src/modules/globals/models/{socials.schema.js → schemas/socials.schema.js} +0 -0
  351. /package/src/modules/globals/{components → views/components}/blocks/BlockFilter.vue +0 -0
  352. /package/src/modules/globals/{components → views/components}/blocks/BlockSearch.vue +0 -0
  353. /package/src/modules/globals/{components → views/components}/blocks/CardFooter.vue +0 -0
  354. /package/src/modules/globals/{components → views/components}/blocks/CardHeader.vue +0 -0
  355. /package/src/modules/globals/{components → views/components}/elements/ButtonDate.vue +0 -0
  356. /package/src/modules/globals/{components → views/components}/elements/ButtonSort.vue +0 -0
  357. /package/src/modules/globals/{components → views/components}/layouts/Empty.vue +0 -0
  358. /package/src/modules/globals/{components → views/components}/pages/401.vue +0 -0
  359. /package/src/modules/globals/{components → views/components}/pages/404.vue +0 -0
  360. /package/src/modules/globals/{components → views/components}/partials/Footer.vue +0 -0
  361. /package/src/modules/globals/{components → views/components}/partials/NavigationBar.vue +0 -0
  362. /package/src/modules/globals/{components → views/components}/sections/SectionPageTitle.vue +0 -0
  363. /package/src/modules/globals/{components → views/components}/sections/Title.vue +0 -0
  364. /package/src/modules/globals/{localization → views/localization}/get-browser-locale.js +0 -0
  365. /package/src/modules/globals/{mixins → views/mixins}/mixins.js +0 -0
  366. /package/src/modules/globals/{router → views/router}/scrollBehavior.js +0 -0
  367. /package/src/modules/globals/{store → views/store}/globals.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import l from "axios";
2
2
  import "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import { reactive as o, watch as d } from "vue";
4
- import { setError as n } from "../../globals/store/globals.js";
4
+ import { setError as n } from "../../globals/views/store/globals.js";
5
5
  const s = l.create({ baseURL: process.env.API_URL, withCredentials: !0 });
6
6
  s.defaults.withCredentials = !0;
7
7
  const a = o({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("axios"),i=require("vue"),a=require("../../globals/store/globals.cjs"),n=require("../../auth/views/store/auth.cjs"),s=c.create({baseURL:process.env.API_URL,withCredentials:!0}),r=i.reactive({invites:[],invite:null,error:null}),l={async read(t){try{const e=await s.get(`/api/invites/${t.owner}`);return r.invites=e.data,r.error=null,e.data}catch(e){a.setError(e)}},async readOne(t){try{const e=await s.get(`/api/invites/get/${t}`);r.invite=e.data,n.state.user.phone=e.data.phone,n.state.user.email=e.data.email}catch(e){a.setError(e)}},async create(t){try{const e=await s.post("/api/invites/create",t);return Promise.resolve(e.data)}catch(e){a.setError(e)}},async update(t,e){try{await s.put("/api/invites/update",e),r.error=null}catch(o){a.setError(o)}},async delete(t){try{await s.delete(`/api/invites/delete/${t}`),r.error=null}catch(e){a.setError(e)}}};i.watch(r,(t,e)=>{});exports.actions=l;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("axios"),i=require("vue"),a=require("../../globals/views/store/globals.cjs"),n=require("../../auth/views/store/auth.cjs"),s=c.create({baseURL:process.env.API_URL,withCredentials:!0}),r=i.reactive({invites:[],invite:null,error:null}),l={async read(t){try{const e=await s.get(`/api/invites/${t.owner}`);return r.invites=e.data,r.error=null,e.data}catch(e){a.setError(e)}},async readOne(t){try{const e=await s.get(`/api/invites/get/${t}`);r.invite=e.data,n.state.user.phone=e.data.phone,n.state.user.email=e.data.email}catch(e){a.setError(e)}},async create(t){try{const e=await s.post("/api/invites/create",t);return Promise.resolve(e.data)}catch(e){a.setError(e)}},async update(t,e){try{await s.put("/api/invites/update",e),r.error=null}catch(o){a.setError(o)}},async delete(t){try{await s.delete(`/api/invites/delete/${t}`),r.error=null}catch(e){a.setError(e)}}};i.watch(r,(t,e)=>{});exports.actions=l;exports.state=r;
@@ -1,6 +1,6 @@
1
1
  import s from "axios";
2
2
  import { reactive as c, watch as l } from "vue";
3
- import { setError as a } from "../../globals/store/globals.js";
3
+ import { setError as a } from "../../globals/views/store/globals.js";
4
4
  import { state as o } from "../../auth/views/store/auth.js";
5
5
  const i = s.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = c({
6
6
  invites: [],
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("axios"),l=require("vue"),i=require("../../globals/store/globals.cjs"),a=u.create({baseURL:process.env.API_URL,withCredentials:!0}),t=l.reactive({memberships:[],error:null}),d={async read(r={}){try{const e=await a.get("/api/memberships",{params:r});return t.error=null,t.memberships=e.data,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}},async create(r){try{const e=await a.post("/api/memberships/create",r);return t.error=null,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}},async update(r){try{const e=await a.post("/api/memberships/update",r);return t.error=null,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}},async delete(r){try{const e=await a.post("/api/memberships/delete",r);return t.error=null,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}}},y={handleMembershipUpdate(r,e,n,h,p,c){let s;if(console.log("public is",r),console.log("isArray",Array.isArray(r)),Array.isArray(r)?s=r.find(o=>o._id===e.target):typeof r=="object"&&r._id===e.target&&(s=r),s)if(s[p]=n,n)s.memberships.push(e),s[c]+=1;else{const o=s.memberships.findIndex(m=>m._id===e._id);o!==-1&&(s.memberships.splice(o,1),s[c]-=1)}}};l.watch(t,r=>{});exports.actions=d;exports.mutations=y;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("axios"),l=require("vue"),i=require("../../globals/views/store/globals.cjs"),a=u.create({baseURL:process.env.API_URL,withCredentials:!0}),t=l.reactive({memberships:[],error:null}),d={async read(r={}){try{const e=await a.get("/api/memberships",{params:r});return t.error=null,t.memberships=e.data,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}},async create(r){try{const e=await a.post("/api/memberships/create",r);return t.error=null,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}},async update(r){try{const e=await a.post("/api/memberships/update",r);return t.error=null,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}},async delete(r){try{const e=await a.post("/api/memberships/delete",r);return t.error=null,Promise.resolve(e.data)}catch(e){return i.setError(e),Promise.reject(e)}}},y={handleMembershipUpdate(r,e,n,h,p,c){let s;if(console.log("public is",r),console.log("isArray",Array.isArray(r)),Array.isArray(r)?s=r.find(o=>o._id===e.target):typeof r=="object"&&r._id===e.target&&(s=r),s)if(s[p]=n,n)s.memberships.push(e),s[c]+=1;else{const o=s.memberships.findIndex(m=>m._id===e._id);o!==-1&&(s.memberships.splice(o,1),s[c]-=1)}}};l.watch(t,r=>{});exports.actions=d;exports.mutations=y;exports.state=t;
@@ -1,6 +1,6 @@
1
1
  import l from "axios";
2
2
  import { reactive as u, watch as d } from "vue";
3
- import { setError as i } from "../../globals/store/globals.js";
3
+ import { setError as i } from "../../globals/views/store/globals.js";
4
4
  const a = l.create({
5
5
  baseURL: process.env.API_URL,
6
6
  withCredentials: !0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),i=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),c=require("vue"),o=require("../../globals/store/globals.cjs"),s=l.create({baseURL:process.env.API_URL,withCredentials:!0}),a=c.reactive({all:[],current:{_id:null,profile:{tags:[],photo:"",name:"",description:""},structure:[],owner:null,types:"",contacts:{email:"",website:"",phone:"",address:""},socials:{telegram:"",line:"",facebook:"",instagram:"",youtube:""},rating:{popularity:0,median:0,amount:0}}}),u={async create(t,e){t.owner=e;try{const r=await s.post("/api/organizations/create",t);return a.current=r.data,r.data}catch(r){throw console.log(r),o.setError(r),r}},async read(t={}){console.log(t);try{const e=await s.get("/api/organizations",{params:t});return t._id&&Object.assign(a.current||{},e.data[0]),Promise.resolve(e.data)}catch(e){return o.setError(e),Promise.reject(e)}},async update(t,e){return console.log(t,e),await s.post(`/api/organizations/${t}/update`,e).then(r=>(console.log("Organization updated successfully"),Promise.resolve(r.data)),r=>(console.log("Updating organization failed"),Promise.reject(r)))},async remove(t){await s.delete(`/api/organizations/${t}/delete`).then(e=>{a.error=null;let r=i.default.get("user"),n=JSON.parse(r);return n.organization=null,i.default.set("user",JSON.stringify(n),{expires:7,domain:".osi.plus",sameSite:"none",secure:!0}),Promise.resolve(e.data)},e=>(o.setError(e),Promise.reject(e))).catch(e=>{o.setError(e)})},async reset(){a.current={_id:null,profile:{categories:[],photo:"",name:"",description:""},structure:[],owner:null,types:"",contacts:{email:"",website:"",phone:"",address:""},socials:{telegram:"",line:"",facebook:"",instagram:""},rating:{popularity:0,median:0,amount:0}}}};c.watch(a,(t,e)=>{});exports.actions=u;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),i=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),c=require("vue"),o=require("../../globals/views/store/globals.cjs"),s=l.create({baseURL:process.env.API_URL,withCredentials:!0}),a=c.reactive({all:[],current:{_id:null,profile:{tags:[],photo:"",name:"",description:""},structure:[],owner:null,types:"",contacts:{email:"",website:"",phone:"",address:""},socials:{telegram:"",line:"",facebook:"",instagram:"",youtube:""},rating:{popularity:0,median:0,amount:0}}}),u={async create(t,e){t.owner=e;try{const r=await s.post("/api/organizations/create",t);return a.current=r.data,r.data}catch(r){throw console.log(r),o.setError(r),r}},async read(t={}){console.log(t);try{const e=await s.get("/api/organizations",{params:t});return t._id&&Object.assign(a.current||{},e.data[0]),Promise.resolve(e.data)}catch(e){return o.setError(e),Promise.reject(e)}},async update(t,e){return console.log(t,e),await s.post(`/api/organizations/${t}/update`,e).then(r=>(console.log("Organization updated successfully"),Promise.resolve(r.data)),r=>(console.log("Updating organization failed"),Promise.reject(r)))},async remove(t){await s.delete(`/api/organizations/${t}/delete`).then(e=>{a.error=null;let r=i.default.get("user"),n=JSON.parse(r);return n.organization=null,i.default.set("user",JSON.stringify(n),{expires:7,domain:".osi.plus",sameSite:"none",secure:!0}),Promise.resolve(e.data)},e=>(o.setError(e),Promise.reject(e))).catch(e=>{o.setError(e)})},async reset(){a.current={_id:null,profile:{categories:[],photo:"",name:"",description:""},structure:[],owner:null,types:"",contacts:{email:"",website:"",phone:"",address:""},socials:{telegram:"",line:"",facebook:"",instagram:""},rating:{popularity:0,median:0,amount:0}}}};c.watch(a,(t,e)=>{});exports.actions=u;exports.state=a;
@@ -1,7 +1,7 @@
1
1
  import c from "axios";
2
2
  import i from "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import { reactive as l, watch as u } from "vue";
4
- import { setError as o } from "../../globals/store/globals.js";
4
+ import { setError as o } from "../../globals/views/store/globals.js";
5
5
  const s = c.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = l({
6
6
  all: [],
7
7
  current: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),N=require("vue-i18n"),V=require("../../../../constructor/components/sections/Viewer.vue.cjs"),r=require("../blocks/CardPage.vue.cjs"),g=require("../../store/pages.cjs"),w=require("../../../../auth/views/store/auth.cjs"),B=require("../../../../globals/mixins/mixins.cjs"),E={key:0,style:{overflow:"clip"},class:"bg-light pos-relative"},y={class:"pd-medium pos-sticky mobile-only z-index-1 pos-t-0 bg-light w-100 br-b br-solid br-black-transp-10"},P={key:0,class:"z-index-0 pos-relative"},x={class:"transition-ease-in-out w-100 bg-light"},C={key:1,class:"cols-2-1_3 h-100 bg-light z-index-0 pos-relative"},R={key:0,class:"desktop-only h-100 bg-white o-scroll z-index-0 pos-relative"},q={class:"transition-ease-in-out w-100 bg-light"},M={class:"o-scroll pd-medium"},A={class:"gap-thin cols-2"},z={key:0,class:"bg-white pd-medium mn-b-thin radius-semi"},I=e.createElementVNode("h4",{class:"mn-b-small"},"Read Previous",-1),S={key:1,class:"bg-white pd-medium mn-b-thin radius-semi"},T=e.createElementVNode("h4",{class:"mn-b-small pd-micro"},"Table of Contents",-1),j={key:2,class:"bg-white pd-medium mn-b-thin radius-semi"},F=e.createElementVNode("h4",{class:"mn-b-small"},"Read Next",-1),O={__name:"Page",setup(U){const i=e.ref(!1);function p(){i.value=!i.value}function v(t){const l=[];function s(d,k=null){for(const u of d)l.push({...u,parent:k}),u.children.length>0&&s(u.children,u)}return s(t.children),l}const c=e.computed(()=>v(a.value)),o=e.computed(()=>{if(n.value._id===a.value._id)return{children:n.value.children,previousPage:null,nextPage:null};const t=c.value.findIndex(d=>d._id===n.value._id),l=t>0?c.value[t-1]:a.value,s=t<c.value.length-1?c.value[t+1]:null;return{previousPage:l,nextPage:s,children:[]}}),{normalizeUrlParam:D,joinArrayToUrl:_,isAdmin:b}=B.useGlobalMixins(),m=e.computed(()=>b(w.state.access.roles));N.useI18n();const h=f.useRoute(),a=e.ref(null),n=e.ref(null);return e.onMounted(async()=>{let t=h.params.url;t.length>0&&(t=t[0]),a.value=await g.actions.read({url:t});let l=h.params.url;l.length>0&&(l=_(l)),n.value=await g.actions.read({url:l})}),(t,l)=>n.value&&n.value.content?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",y,[e.createElementVNode("button",{onClick:p,class:"cursor-pointer"},e.toDisplayString(i.value===!1?"Show Menu":"Hide Menu"),1)]),i.value?(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("ul",x,[e.createVNode(r.default,{page:a.value,hasAdminRights:m.value,class:"pd-thin"},null,8,["page","hasAdminRights"])])])):e.createCommentVNode("",!0),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",C,[a.value.url!==n.value.url?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("ul",q,[e.createVNode(r.default,{page:a.value,hasAdminRights:m.value,class:"bg-white pd-thin"},null,8,["page","hasAdminRights"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[e.createVNode(V.default,{content:n.value.content,class:""},null,8,["content"]),e.createElementVNode("div",A,[o.value.previousPage?(e.openBlock(),e.createElementBlock("div",z,[I,e.createVNode(r.default,{page:o.value.previousPage,showChildren:!1,class:"h3 t-main bg-white mn-b-thin radius-semi"},null,8,["page"])])):e.createCommentVNode("",!0),o.value.children.length>0?(e.openBlock(),e.createElementBlock("div",S,[T,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.children,s=>(e.openBlock(),e.createBlock(r.default,{key:s.id,page:s,class:"bg-white pd-micro radius-semi"},null,8,["page"]))),128))])):e.createCommentVNode("",!0),o.value.nextPage?(e.openBlock(),e.createElementBlock("div",j,[F,e.createVNode(r.default,{page:o.value.nextPage,class:"h3 t-main bg-white mn-b-thin radius-semi",showChildren:!1},null,8,["page"])])):e.createCommentVNode("",!0)])])]))])):e.createCommentVNode("",!0)}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),N=require("vue-i18n"),V=require("../../../../constructor/components/sections/Viewer.vue.cjs"),r=require("../blocks/CardPage.vue.cjs"),g=require("../../store/pages.cjs"),w=require("../../../../auth/views/store/auth.cjs"),B=require("../../../../globals/views/mixins/mixins.cjs"),E={key:0,style:{overflow:"clip"},class:"bg-light pos-relative"},y={class:"pd-medium pos-sticky mobile-only z-index-1 pos-t-0 bg-light w-100 br-b br-solid br-black-transp-10"},P={key:0,class:"z-index-0 pos-relative"},x={class:"transition-ease-in-out w-100 bg-light"},C={key:1,class:"cols-2-1_3 h-100 bg-light z-index-0 pos-relative"},R={key:0,class:"desktop-only h-100 bg-white o-scroll z-index-0 pos-relative"},q={class:"transition-ease-in-out w-100 bg-light"},M={class:"o-scroll pd-medium"},A={class:"gap-thin cols-2"},z={key:0,class:"bg-white pd-medium mn-b-thin radius-semi"},I=e.createElementVNode("h4",{class:"mn-b-small"},"Read Previous",-1),S={key:1,class:"bg-white pd-medium mn-b-thin radius-semi"},T=e.createElementVNode("h4",{class:"mn-b-small pd-micro"},"Table of Contents",-1),j={key:2,class:"bg-white pd-medium mn-b-thin radius-semi"},F=e.createElementVNode("h4",{class:"mn-b-small"},"Read Next",-1),O={__name:"Page",setup(U){const i=e.ref(!1);function p(){i.value=!i.value}function v(t){const l=[];function s(d,k=null){for(const u of d)l.push({...u,parent:k}),u.children.length>0&&s(u.children,u)}return s(t.children),l}const c=e.computed(()=>v(a.value)),o=e.computed(()=>{if(n.value._id===a.value._id)return{children:n.value.children,previousPage:null,nextPage:null};const t=c.value.findIndex(d=>d._id===n.value._id),l=t>0?c.value[t-1]:a.value,s=t<c.value.length-1?c.value[t+1]:null;return{previousPage:l,nextPage:s,children:[]}}),{normalizeUrlParam:D,joinArrayToUrl:_,isAdmin:b}=B.useGlobalMixins(),m=e.computed(()=>b(w.state.access.roles));N.useI18n();const h=f.useRoute(),a=e.ref(null),n=e.ref(null);return e.onMounted(async()=>{let t=h.params.url;t.length>0&&(t=t[0]),a.value=await g.actions.read({url:t});let l=h.params.url;l.length>0&&(l=_(l)),n.value=await g.actions.read({url:l})}),(t,l)=>n.value&&n.value.content?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",y,[e.createElementVNode("button",{onClick:p,class:"cursor-pointer"},e.toDisplayString(i.value===!1?"Show Menu":"Hide Menu"),1)]),i.value?(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("ul",x,[e.createVNode(r.default,{page:a.value,hasAdminRights:m.value,class:"pd-thin"},null,8,["page","hasAdminRights"])])])):e.createCommentVNode("",!0),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",C,[a.value.url!==n.value.url?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("ul",q,[e.createVNode(r.default,{page:a.value,hasAdminRights:m.value,class:"bg-white pd-thin"},null,8,["page","hasAdminRights"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[e.createVNode(V.default,{content:n.value.content,class:""},null,8,["content"]),e.createElementVNode("div",A,[o.value.previousPage?(e.openBlock(),e.createElementBlock("div",z,[I,e.createVNode(r.default,{page:o.value.previousPage,showChildren:!1,class:"h3 t-main bg-white mn-b-thin radius-semi"},null,8,["page"])])):e.createCommentVNode("",!0),o.value.children.length>0?(e.openBlock(),e.createElementBlock("div",S,[T,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.children,s=>(e.openBlock(),e.createBlock(r.default,{key:s.id,page:s,class:"bg-white pd-micro radius-semi"},null,8,["page"]))),128))])):e.createCommentVNode("",!0),o.value.nextPage?(e.openBlock(),e.createElementBlock("div",j,[F,e.createVNode(r.default,{page:o.value.nextPage,class:"h3 t-main bg-white mn-b-thin radius-semi",showChildren:!1},null,8,["page"])])):e.createCommentVNode("",!0)])])]))])):e.createCommentVNode("",!0)}};exports.default=O;
@@ -5,7 +5,7 @@ import T from "../../../../constructor/components/sections/Viewer.vue.js";
5
5
  import h from "../blocks/CardPage.vue.js";
6
6
  import { actions as w } from "../../store/pages.js";
7
7
  import { state as V } from "../../../../auth/views/store/auth.js";
8
- import { useGlobalMixins as E } from "../../../../globals/mixins/mixins.js";
8
+ import { useGlobalMixins as E } from "../../../../globals/views/mixins/mixins.js";
9
9
  const F = {
10
10
  key: 0,
11
11
  style: { overflow: "clip" },
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),v=require("../../../../globals/mixins/mixins.cjs"),o=require("../../store/pages.cjs"),c=require("../../../../../components/Button/Button.vue2.cjs");;/* empty css */;/* empty css */;/* empty css */const b=require("../../../../constructor/components/sections/Constructor.vue.cjs"),g={key:0},k={key:0,class:"w-100 mn-b-thin bg-light pd-big radius-semi"},h={key:1,class:"pos-sticky pos-l-0 pos-b-0 w-100"},_={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},w={__name:"PageEdit",setup(y){const{normalizeUrlParam:s,joinArrayToUrl:i}=v.useGlobalMixins(),l=u.useRoute(),r=u.useRouter(),t=e.ref(null);e.onMounted(async()=>{let a;if(l.params.url&&(a=l.params.url,a.length>0&&(a=i(a))),a)try{t.value=await o.actions.read({url:a})}catch(n){console.log("error",n)}else t.value=o.state.current});async function m(){t.value.name=t.value.content[0].content,t.value.url||(t.value.url=s(t.value.name));try{l.params.url?await o.actions.update(t.value):await o.actions.create(t.value)}catch(a){console.log("error",a)}r.push(r.resolve({name:"Backoffice Pages Edit",params:{url:t.value.url.split("/")}}).href)}async function d(){try{await o.actions.delete(t.value)}catch(a){console.log("error",a)}}function p(){t.value.parent?r.push(r.resolve({name:"Backoffice Pages Edit",params:{url:t.value.parent.url.split("/")}}).href):r.push({name:"Backoffice Pages"})}return(a,n)=>t.value?(e.openBlock(),e.createElementBlock("div",g,[t.value?(e.openBlock(),e.createElementBlock("section",k,[e.createVNode(b.default,{content:t.value.content,onUpdate:n[0]||(n[0]=f=>t.value.content=f)},null,8,["content"])])):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("section",h,[e.createElementVNode("div",_,[e.unref(l).params.url?(e.openBlock(),e.createBlock(c.default,{key:0,submit:()=>d(),callback:()=>p(),class:"t-nowrap bg-second w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1},8,["submit","callback"])):e.createCommentVNode("",!0),e.createVNode(c.default,{submit:()=>m(),class:"mn-l-auto t-nowrap t-white bg-black w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}};exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),v=require("../../../../globals/views/mixins/mixins.cjs"),o=require("../../store/pages.cjs"),c=require("../../../../../components/Button/Button.vue2.cjs");;/* empty css */;/* empty css */;/* empty css */const b=require("../../../../constructor/components/sections/Constructor.vue.cjs"),g={key:0},k={key:0,class:"w-100 mn-b-thin bg-light pd-big radius-semi"},h={key:1,class:"pos-sticky pos-l-0 pos-b-0 w-100"},_={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},w={__name:"PageEdit",setup(y){const{normalizeUrlParam:s,joinArrayToUrl:i}=v.useGlobalMixins(),l=u.useRoute(),r=u.useRouter(),t=e.ref(null);e.onMounted(async()=>{let a;if(l.params.url&&(a=l.params.url,a.length>0&&(a=i(a))),a)try{t.value=await o.actions.read({url:a})}catch(n){console.log("error",n)}else t.value=o.state.current});async function m(){t.value.name=t.value.content[0].content,t.value.url||(t.value.url=s(t.value.name));try{l.params.url?await o.actions.update(t.value):await o.actions.create(t.value)}catch(a){console.log("error",a)}r.push(r.resolve({name:"Backoffice Pages Edit",params:{url:t.value.url.split("/")}}).href)}async function d(){try{await o.actions.delete(t.value)}catch(a){console.log("error",a)}}function p(){t.value.parent?r.push(r.resolve({name:"Backoffice Pages Edit",params:{url:t.value.parent.url.split("/")}}).href):r.push({name:"Backoffice Pages"})}return(a,n)=>t.value?(e.openBlock(),e.createElementBlock("div",g,[t.value?(e.openBlock(),e.createElementBlock("section",k,[e.createVNode(b.default,{content:t.value.content,onUpdate:n[0]||(n[0]=f=>t.value.content=f)},null,8,["content"])])):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("section",h,[e.createElementVNode("div",_,[e.unref(l).params.url?(e.openBlock(),e.createBlock(c.default,{key:0,submit:()=>d(),callback:()=>p(),class:"t-nowrap bg-second w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1},8,["submit","callback"])):e.createCommentVNode("",!0),e.createVNode(c.default,{submit:()=>m(),class:"mn-l-auto t-nowrap t-white bg-black w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}};exports.default=w;
@@ -1,6 +1,6 @@
1
1
  import { ref as h, onMounted as k, openBlock as l, createElementBlock as u, createVNode as c, createCommentVNode as n, createElementVNode as w, unref as y, createBlock as x, withCtx as i, createTextVNode as m } from "vue";
2
2
  import { useRoute as B, useRouter as P } from "vue-router";
3
- import { useGlobalMixins as E } from "../../../../globals/mixins/mixins.js";
3
+ import { useGlobalMixins as E } from "../../../../globals/views/mixins/mixins.js";
4
4
  import { actions as s, state as N } from "../../store/pages.js";
5
5
  import p from "../../../../../components/Button/Button.vue2.js";
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router"),n=require("../../../../../components/Block/Block.vue.cjs"),o=require("../../../../globals/components/sections/SectionPageTitle.vue.cjs"),u=require("../blocks/CardPage.vue.cjs"),c=require("../../store/pages.cjs"),i=require("../../../../auth/views/store/auth.cjs"),d=require("../../../../globals/mixins/mixins.cjs"),g={__name:"Pages",setup(m){const{normalizeUrlParam:h,joinArrayToUrl:p,isAdmin:r}=d.useGlobalMixins(),l=e.computed(()=>r(i.state.access.roles));a.useRoute(),a.useRouter();const t=e.ref(null);return e.onMounted(async()=>{t.value=await c.actions.read()}),(k,_)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o.default,{title:"Pages",actions:[{to:{name:"Backoffice Pages Add"},label:"Create Page"}],class:"mn-b-small bg-light bg-light radius-big"}),t.value?(e.openBlock(),e.createBlock(n.default,{key:0,class:"mn-b-thin cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,s=>(e.openBlock(),e.createBlock(u.default,{page:s,hasAdminRights:l.value,class:"bg-white pd-thin radius-small"},null,8,["page","hasAdminRights"]))),256))]),_:1})):e.createCommentVNode("",!0)]))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router"),n=require("../../../../../components/Block/Block.vue.cjs"),o=require("../../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),u=require("../blocks/CardPage.vue.cjs"),c=require("../../store/pages.cjs"),i=require("../../../../auth/views/store/auth.cjs"),d=require("../../../../globals/views/mixins/mixins.cjs"),g={__name:"Pages",setup(m){const{normalizeUrlParam:h,joinArrayToUrl:p,isAdmin:r}=d.useGlobalMixins(),l=e.computed(()=>r(i.state.access.roles));a.useRoute(),a.useRouter();const t=e.ref(null);return e.onMounted(async()=>{t.value=await c.actions.read()}),(k,_)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o.default,{title:"Pages",actions:[{to:{name:"Backoffice Pages Add"},label:"Create Page"}],class:"mn-b-small bg-light bg-light radius-big"}),t.value?(e.openBlock(),e.createBlock(n.default,{key:0,class:"mn-b-thin cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,s=>(e.openBlock(),e.createBlock(u.default,{page:s,hasAdminRights:l.value,class:"bg-white pd-thin radius-small"},null,8,["page","hasAdminRights"]))),256))]),_:1})):e.createCommentVNode("",!0)]))}};exports.default=g;
@@ -1,11 +1,11 @@
1
1
  import { computed as n, ref as l, onMounted as m, openBlock as e, createElementBlock as a, createVNode as c, createBlock as r, withCtx as u, Fragment as p, renderList as d, createCommentVNode as g } from "vue";
2
2
  import { useRoute as f, useRouter as _ } from "vue-router";
3
3
  import h from "../../../../../components/Block/Block.vue.js";
4
- import b from "../../../../globals/components/sections/SectionPageTitle.vue.js";
4
+ import b from "../../../../globals/views/components/sections/SectionPageTitle.vue.js";
5
5
  import A from "../blocks/CardPage.vue.js";
6
6
  import { actions as k } from "../../store/pages.js";
7
7
  import { state as v } from "../../../../auth/views/store/auth.js";
8
- import { useGlobalMixins as P } from "../../../../globals/mixins/mixins.js";
8
+ import { useGlobalMixins as P } from "../../../../globals/views/mixins/mixins.js";
9
9
  const E = {
10
10
  __name: "Pages",
11
11
  setup(R) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),g=require("../../../../../components/Block/Block.vue.cjs"),h=require("../../../../../components/Popup/Popup.vue2.cjs"),P=require("../../../../../components/Button/Button.vue2.cjs"),b=require("../../../../constructor/components/sections/Constructor.vue.cjs"),_=require("../blocks/CardPage.vue.cjs"),c=require("../../store/pages.cjs"),w=require("../../../../auth/views/store/auth.cjs"),k=require("../../../../globals/mixins/mixins.cjs"),q={class:"h-max-20r o-scroll"},x={__name:"SidebarPages",setup(B){const{normalizeUrlParam:i,joinArrayToUrl:C,isAdmin:p}=k.useGlobalMixins(),d=e.computed(()=>p(w.state.access.roles));s.useRoute();const l=s.useRouter(),a=e.ref(null);e.onMounted(async()=>{a.value=await c.actions.read()});const t=e.ref({url:null,name:null,parent:null,content:[]}),n=e.ref(!1);function m(o){n.value=!0,t.value.parent=o}function v(){n.value=!1,t.value={url:null,name:null,parent:null,content:[]}}async function f(){t.value.name=t.value.content[0].content,t.value.url=t.value.parent.url+"/"+i(t.value.name),t.value.parent=t.value.parent._id,await c.actions.create(t.value),l.push(l.resolve({name:"Backoffice Pages Edit",params:{url:t.value.url.split("/")}}).href)}return(o,r)=>a.value?(e.openBlock(),e.createBlock(g.default,{key:0,class:"mn-b-thin pd-small radius-semi cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createBlock(_.default,{page:u,class:"radius-small pd-thin",hasAdminRights:d.value,onCreatePage:m},null,8,["page","hasAdminRights"]))),256)),e.createVNode(h.default,{onClosePopup:v,isPopupOpen:n.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(b.default,{content:t.value.content,onUpdate:r[0]||(r[0]=u=>t.value.content=u)},null,8,["content"])]),e.createVNode(P.default,{submit:()=>f(),class:"mn-l-auto t-nowrap t-white bg-black w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1},8,["submit"])]),_:1},8,["isPopupOpen"])]),_:1})):e.createCommentVNode("",!0)}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),g=require("../../../../../components/Block/Block.vue.cjs"),h=require("../../../../../components/Popup/Popup.vue.cjs"),P=require("../../../../../components/Button/Button.vue2.cjs"),b=require("../../../../constructor/components/sections/Constructor.vue.cjs"),_=require("../blocks/CardPage.vue.cjs"),c=require("../../store/pages.cjs"),w=require("../../../../auth/views/store/auth.cjs"),k=require("../../../../globals/views/mixins/mixins.cjs"),q={class:"h-max-20r o-scroll"},x={__name:"SidebarPages",setup(B){const{normalizeUrlParam:i,joinArrayToUrl:C,isAdmin:p}=k.useGlobalMixins(),d=e.computed(()=>p(w.state.access.roles));s.useRoute();const l=s.useRouter(),a=e.ref(null);e.onMounted(async()=>{a.value=await c.actions.read()});const t=e.ref({url:null,name:null,parent:null,content:[]}),n=e.ref(!1);function m(o){n.value=!0,t.value.parent=o}function v(){n.value=!1,t.value={url:null,name:null,parent:null,content:[]}}async function f(){t.value.name=t.value.content[0].content,t.value.url=t.value.parent.url+"/"+i(t.value.name),t.value.parent=t.value.parent._id,await c.actions.create(t.value),l.push(l.resolve({name:"Backoffice Pages Edit",params:{url:t.value.url.split("/")}}).href)}return(o,r)=>a.value?(e.openBlock(),e.createBlock(g.default,{key:0,class:"mn-b-thin pd-small radius-semi cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createBlock(_.default,{page:u,class:"radius-small pd-thin",hasAdminRights:d.value,onCreatePage:m},null,8,["page","hasAdminRights"]))),256)),e.createVNode(h.default,{onClosePopup:v,isPopupOpen:n.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(b.default,{content:t.value.content,onUpdate:r[0]||(r[0]=u=>t.value.content=u)},null,8,["content"])]),e.createVNode(P.default,{submit:()=>f(),class:"mn-l-auto t-nowrap t-white bg-black w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1},8,["submit"])]),_:1},8,["isPopupOpen"])]),_:1})):e.createCommentVNode("",!0)}};exports.default=x;
@@ -1,13 +1,13 @@
1
1
  import { computed as P, ref as l, onMounted as b, openBlock as o, createBlock as c, withCtx as r, createElementBlock as w, Fragment as x, renderList as k, createVNode as u, createElementVNode as A, createTextVNode as R, createCommentVNode as $ } from "vue";
2
2
  import { useRoute as y, useRouter as B } from "vue-router";
3
3
  import C from "../../../../../components/Block/Block.vue.js";
4
- import N from "../../../../../components/Popup/Popup.vue2.js";
4
+ import N from "../../../../../components/Popup/Popup.vue.js";
5
5
  import V from "../../../../../components/Button/Button.vue2.js";
6
6
  import E from "../../../../constructor/components/sections/Constructor.vue.js";
7
7
  import S from "../blocks/CardPage.vue.js";
8
8
  import { actions as p } from "../../store/pages.js";
9
9
  import { state as U } from "../../../../auth/views/store/auth.js";
10
- import { useGlobalMixins as M } from "../../../../globals/mixins/mixins.js";
10
+ import { useGlobalMixins as M } from "../../../../globals/views/mixins/mixins.js";
11
11
  const O = { class: "h-max-20r o-scroll" }, Q = {
12
12
  __name: "SidebarPages",
13
13
  setup(T) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../globals/components/layouts/Empty.vue.cjs"),a=require("../../../backoffice/components/partials/Sidebar.vue.cjs"),e=require("../components/partials/SidebarPages.vue.cjs"),r={path:"pages",component:t.default,meta:{title:{en:"Pages",ru:"Информация"},sidebar:a.default},children:[{path:"",name:"Backoffice Pages",component:()=>Promise.resolve().then(()=>require("../components/pages/Pages.vue.cjs"))},{path:"add",name:"Backoffice Pages Add",meta:{title:{en:"New Page",ru:"Новая страница"},sidebar:e.default},component:()=>Promise.resolve().then(()=>require("../components/pages/PageEdit.vue.cjs"))},{path:":url+",name:"Backoffice Pages Edit",meta:{title:{en:"Edit Page",ru:"Редактировать страницу"},sidebar:e.default},component:()=>Promise.resolve().then(()=>require("../components/pages/PageEdit.vue.cjs"))}]};exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../globals/views/components/layouts/Empty.vue.cjs"),a=require("../../../backoffice/components/partials/Sidebar.vue.cjs"),e=require("../components/partials/SidebarPages.vue.cjs"),r={path:"pages",component:t.default,meta:{title:{en:"Pages",ru:"Информация"},sidebar:a.default},children:[{path:"",name:"Backoffice Pages",component:()=>Promise.resolve().then(()=>require("../components/pages/Pages.vue.cjs"))},{path:"add",name:"Backoffice Pages Add",meta:{title:{en:"New Page",ru:"Новая страница"},sidebar:e.default},component:()=>Promise.resolve().then(()=>require("../components/pages/PageEdit.vue.cjs"))},{path:":url+",name:"Backoffice Pages Edit",meta:{title:{en:"Edit Page",ru:"Редактировать страницу"},sidebar:e.default},component:()=>Promise.resolve().then(()=>require("../components/pages/PageEdit.vue.cjs"))}]};exports.default=r;
@@ -1,4 +1,4 @@
1
- import a from "../../../globals/components/layouts/Empty.vue.js";
1
+ import a from "../../../globals/views/components/layouts/Empty.vue.js";
2
2
  import t from "../../../backoffice/components/partials/Sidebar.vue.js";
3
3
  import e from "../components/partials/SidebarPages.vue.js";
4
4
  const n = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../globals/components/layouts/Empty.vue.cjs"),t={path:"pages",component:e.default,meta:{title:{en:"Pages",ru:"Информация"}},children:[{path:":url+",name:"Page",meta:{title:{en:"Page",ru:"Страница"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Page.vue.cjs"))}]};exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../globals/views/components/layouts/Empty.vue.cjs"),t={path:"pages",component:e.default,meta:{title:{en:"Pages",ru:"Информация"}},children:[{path:":url+",name:"Page",meta:{title:{en:"Page",ru:"Страница"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Page.vue.cjs"))}]};exports.default=t;
@@ -1,4 +1,4 @@
1
- import e from "../../../globals/components/layouts/Empty.vue.js";
1
+ import e from "../../../globals/views/components/layouts/Empty.vue.js";
2
2
  const a = {
3
3
  path: "pages",
4
4
  component: e,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("axios"),a=require("../../../globals/store/globals.cjs"),i=process.env.API_URL,s=c.create({baseURL:i}),r=o.reactive({all:[],current:{name:"",localization:[],groups:[],url:"",content:[]}}),p={async create(t){try{return(await s.post("/api/pages/create",t)).data}catch(e){throw a.setError(e),e}},async read(t={}){try{return(await s.get("/api/pages/read",{params:t})).data}catch(e){throw a.setError(e),e}},async update(t){try{const e=await s.put("/api/pages/update",t);return r.current=e.data,e.data}catch(e){throw a.setError(e),e}},async delete(t){try{const e=await s.delete("/api/pages/delete",{data:t});return r.all.splice(r.all.findIndex(n=>n._id==t),1),e.data}catch(e){throw a.setError(e),e}}};o.watch(r,t=>{});exports.actions=p;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("axios"),a=require("../../../globals/views/store/globals.cjs"),i=process.env.API_URL,s=c.create({baseURL:i}),r=o.reactive({all:[],current:{name:"",localization:[],groups:[],url:"",content:[]}}),p={async create(t){try{return(await s.post("/api/pages/create",t)).data}catch(e){throw a.setError(e),e}},async read(t={}){try{return(await s.get("/api/pages/read",{params:t})).data}catch(e){throw a.setError(e),e}},async update(t){try{const e=await s.put("/api/pages/update",t);return r.current=e.data,e.data}catch(e){throw a.setError(e),e}},async delete(t){try{const e=await s.delete("/api/pages/delete",{data:t});return r.all.splice(r.all.findIndex(n=>n._id==t),1),e.data}catch(e){throw a.setError(e),e}}};o.watch(r,t=>{});exports.actions=p;exports.state=r;
@@ -1,6 +1,6 @@
1
1
  import { reactive as n, watch as c } from "vue";
2
2
  import p from "axios";
3
- import { setError as r } from "../../../globals/store/globals.js";
3
+ import { setError as r } from "../../../globals/views/store/globals.js";
4
4
  const i = process.env.API_URL, a = p.create({ baseURL: i }), s = n({
5
5
  all: [],
6
6
  current: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),c=require("../../../globals/components/blocks/CardHeader.vue.cjs"),i=require("../../../icons/navigation/IconEdit.vue.cjs"),d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */const m=t=>(e.pushScopeId("data-v-839424cb"),t=t(),e.popScopeId(),t),u={class:"flex-column pos-relative flex-wrap"},f={class:"mn-t-small w-100 bg-white radius-small pd-small spoiler"},v={class:"flex-child flex-child-shrink-0"},h={key:0,class:"mn-r-thin mn-l-thin t-transp"},p={key:1,class:"flex-child flex-child-shrink-0"},k={key:2,class:"mn-r-thin mn-l-thin t-transp"},g={key:3,class:"t-truncate"},y={key:0},V={class:"mn-t-small w-100 mn-b-thin flex"},N={class:"w-50 flex"},E=m(()=>e.createElementVNode("span",{class:"mn-r-thin mn-l-thin t-transp"},"|",-1)),x={class:"w-50"},B={class:"t-transp"},C={class:"t-right w-50"},w={class:"t-transp"},S={__name:"CardLeftover",props:{leftover:Object},setup(t){s.useRouter();const r=e.ref(!0);return(n,l)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(c.default,{entity:t.leftover,entityType:"leftover",user:n.user,owner:t.leftover.creator,creator:t.leftover.creator,date:t.leftover.createdAt},null,8,["entity","user","owner","creator","date"]),e.createVNode(a,{to:{name:"LeftoverEdit",params:{_id:t.leftover.organization,leftover:t.leftover._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("div",f,[e.createElementVNode("div",{onClick:l[0]||(l[0]=o=>r.value=!r.value),class:"flex-v-center flex"},[e.createElementVNode("span",{class:e.normalizeClass(["flex-child flex-child-shrink-0 capitalize w-max mn-r-thin t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin",{"bg-green":t.leftover.type==="stock-in","bg-red":t.leftover.type==="stock-out"}])},e.toDisplayString(t.leftover.type),3),e.createElementVNode("span",v,"Positions "+e.toDisplayString(t.leftover.positions.length),1),t.leftover.order?(e.openBlock(),e.createElementBlock("span",h,"|")):e.createCommentVNode("",!0),t.leftover.order?(e.openBlock(),e.createElementBlock("span",p,"For order "+e.toDisplayString(t.leftover.order),1)):e.createCommentVNode("",!0),t.leftover.comment?(e.openBlock(),e.createElementBlock("span",k,"|")):e.createCommentVNode("",!0),t.leftover.comment?(e.openBlock(),e.createElementBlock("p",g,"Comment: "+e.toDisplayString(t.leftover.comment),1)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.leftover.positions,o=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",N,[e.createElementVNode("span",null,e.toDisplayString(o.name),1),E,e.createElementVNode("span",x,[e.createTextVNode(e.toDisplayString(o.price)+" ",1),e.createElementVNode("span",B,e.toDisplayString(n.returnCurrency()),1)])]),e.createElementVNode("div",C,[e.createTextVNode(e.toDisplayString(o.quantity)+" ",1),e.createElementVNode("span",w,e.toDisplayString(o.type),1)])]))),256))])):e.createCommentVNode("",!0)]),_:1})])])}}},_=d.default(S,[["__scopeId","data-v-839424cb"]]);exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),c=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),i=require("../../../icons/navigation/IconEdit.vue.cjs"),d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */const m=t=>(e.pushScopeId("data-v-1fed0c02"),t=t(),e.popScopeId(),t),u={class:"flex-column pos-relative flex-wrap"},f={class:"mn-t-small w-100 bg-white radius-small pd-small spoiler"},v={class:"flex-child flex-child-shrink-0"},h={key:0,class:"mn-r-thin mn-l-thin t-transp"},p={key:1,class:"flex-child flex-child-shrink-0"},k={key:2,class:"mn-r-thin mn-l-thin t-transp"},g={key:3,class:"t-truncate"},y={key:0},V={class:"mn-t-small w-100 mn-b-thin flex"},N={class:"w-50 flex"},E=m(()=>e.createElementVNode("span",{class:"mn-r-thin mn-l-thin t-transp"},"|",-1)),x={class:"w-50"},B={class:"t-transp"},C={class:"t-right w-50"},w={class:"t-transp"},S={__name:"CardLeftover",props:{leftover:Object},setup(t){s.useRouter();const r=e.ref(!0);return(n,l)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(c.default,{entity:t.leftover,entityType:"leftover",user:n.user,owner:t.leftover.creator,creator:t.leftover.creator,date:t.leftover.createdAt},null,8,["entity","user","owner","creator","date"]),e.createVNode(a,{to:{name:"LeftoverEdit",params:{_id:t.leftover.organization,leftover:t.leftover._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("div",f,[e.createElementVNode("div",{onClick:l[0]||(l[0]=o=>r.value=!r.value),class:"flex-v-center flex"},[e.createElementVNode("span",{class:e.normalizeClass(["flex-child flex-child-shrink-0 capitalize w-max mn-r-thin t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin",{"bg-green":t.leftover.type==="stock-in","bg-red":t.leftover.type==="stock-out"}])},e.toDisplayString(t.leftover.type),3),e.createElementVNode("span",v,"Positions "+e.toDisplayString(t.leftover.positions.length),1),t.leftover.order?(e.openBlock(),e.createElementBlock("span",h,"|")):e.createCommentVNode("",!0),t.leftover.order?(e.openBlock(),e.createElementBlock("span",p,"For order "+e.toDisplayString(t.leftover.order),1)):e.createCommentVNode("",!0),t.leftover.comment?(e.openBlock(),e.createElementBlock("span",k,"|")):e.createCommentVNode("",!0),t.leftover.comment?(e.openBlock(),e.createElementBlock("p",g,"Comment: "+e.toDisplayString(t.leftover.comment),1)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.leftover.positions,o=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",N,[e.createElementVNode("span",null,e.toDisplayString(o.name),1),E,e.createElementVNode("span",x,[e.createTextVNode(e.toDisplayString(o.price)+" ",1),e.createElementVNode("span",B,e.toDisplayString(n.returnCurrency()),1)])]),e.createElementVNode("div",C,[e.createTextVNode(e.toDisplayString(o.quantity)+" ",1),e.createElementVNode("span",w,e.toDisplayString(o.type),1)])]))),256))])):e.createCommentVNode("",!0)]),_:1})])])}}},_=d.default(S,[["__scopeId","data-v-1fed0c02"]]);exports.default=_;
@@ -1,10 +1,10 @@
1
1
  import { ref as h, resolveComponent as v, openBlock as s, createElementBlock as o, createVNode as a, withCtx as m, createElementVNode as t, normalizeClass as p, toDisplayString as r, createCommentVNode as l, Transition as x, Fragment as y, renderList as _, createTextVNode as f, pushScopeId as k, popScopeId as g } from "vue";
2
2
  import { useRouter as w } from "vue-router";
3
- import b from "../../../globals/components/blocks/CardHeader.vue.js";
3
+ import b from "../../../globals/views/components/blocks/CardHeader.vue.js";
4
4
  import C from "../../../icons/navigation/IconEdit.vue.js";
5
5
  import I from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  /* empty css */
7
- const L = (e) => (k("data-v-839424cb"), e = e(), g(), e), N = { class: "flex-column pos-relative flex-wrap" }, S = { class: "mn-t-small w-100 bg-white radius-small pd-small spoiler" }, V = { class: "flex-child flex-child-shrink-0" }, z = {
7
+ const L = (e) => (k("data-v-1fed0c02"), e = e(), g(), e), N = { class: "flex-column pos-relative flex-wrap" }, S = { class: "mn-t-small w-100 bg-white radius-small pd-small spoiler" }, V = { class: "flex-child flex-child-shrink-0" }, z = {
8
8
  key: 0,
9
9
  class: "mn-r-thin mn-l-thin t-transp"
10
10
  }, E = {
@@ -95,7 +95,7 @@ const L = (e) => (k("data-v-839424cb"), e = e(), g(), e), N = { class: "flex-col
95
95
  ]);
96
96
  };
97
97
  }
98
- }, U = /* @__PURE__ */ I(R, [["__scopeId", "data-v-839424cb"]]);
98
+ }, U = /* @__PURE__ */ I(R, [["__scopeId", "data-v-1fed0c02"]]);
99
99
  export {
100
100
  U as default
101
101
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Field/Field.vue2.cjs"),c=require("../../../../components/Select/Select.vue2.cjs");;/* empty css */const y=require("../../../icons/navigation/IconAdd.vue.cjs"),k=require("../../../icons/navigation/IconDelete.vue.cjs"),h={class:"gap-thin"},w={class:"gap-thin mn-b-thin flex-nowrap flex"},g={class:"bg-white w-100 w-min-15r br-solid br-1px br-black-transp-5 pd-small radius-small"},x=["disabled"],V={key:0,class:"gap-thin flex-nowrap flex"},N={__name:"CardPosition",props:{product:Object,products:Array,array:Array,showPrice:{type:Boolean,default:!0}},emits:["add","delete","update"],setup(s,{emit:p}){const l=s,n=p,u=e.ref(null),t=e.ref(1),a=e.ref("pcs"),d=e.ref(0),m=e.computed(()=>u.value&&t.value>0&&d.value>=0);e.watch(l.array,()=>{u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type}),l.product&&(u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type),e.watch([u,t,d,a],()=>{n("update",{...u.value,price:d.value,quantity:t.value||1,type:a.value})});function v(){n("add",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}function b(){n("delete",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",w,[e.createElementVNode("div",g,e.toDisplayString(u.value.name||u.value._id.name),1),s.showPrice?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:0,field:t.value,"onUpdate:field":r[1]||(r[1]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 w-max-10r br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(c.default,{select:a.value,"onUpdate:select":r[0]||(r[0]=o=>a.value=o),options:["pcs","g","ml"],class:"bg-light pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,disabled:!m.value,onClick:v,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(y.default),{class:"i-semi"})],8,x)),s.product?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:b,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(k.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),s.showPrice?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(i.default,{field:d.value,"onUpdate:field":r[2]||(r[2]=o=>d.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(i.default,{field:t.value,"onUpdate:field":r[4]||(r[4]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(c.default,{select:a.value,"onUpdate:select":r[3]||(r[3]=o=>a.value=o),options:["pcs","g","ml"],class:"bg-light pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])])):e.createCommentVNode("",!0)]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Field/Field.vue2.cjs"),c=require("../../../../components/Select/Select.vue.cjs");;/* empty css */const y=require("../../../icons/navigation/IconAdd.vue.cjs"),k=require("../../../icons/navigation/IconDelete.vue.cjs"),h={class:"gap-thin"},w={class:"gap-thin mn-b-thin flex-nowrap flex"},g={class:"bg-white w-100 w-min-15r br-solid br-1px br-black-transp-5 pd-small radius-small"},x=["disabled"],V={key:0,class:"gap-thin flex-nowrap flex"},N={__name:"CardPosition",props:{product:Object,products:Array,array:Array,showPrice:{type:Boolean,default:!0}},emits:["add","delete","update"],setup(s,{emit:p}){const l=s,n=p,u=e.ref(null),t=e.ref(1),a=e.ref("pcs"),d=e.ref(0),m=e.computed(()=>u.value&&t.value>0&&d.value>=0);e.watch(l.array,()=>{u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type}),l.product&&(u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type),e.watch([u,t,d,a],()=>{n("update",{...u.value,price:d.value,quantity:t.value||1,type:a.value})});function v(){n("add",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}function b(){n("delete",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",w,[e.createElementVNode("div",g,e.toDisplayString(u.value.name||u.value._id.name),1),s.showPrice?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:0,field:t.value,"onUpdate:field":r[1]||(r[1]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 w-max-10r br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(c.default,{select:a.value,"onUpdate:select":r[0]||(r[0]=o=>a.value=o),options:["pcs","g","ml"],class:"bg-light pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,disabled:!m.value,onClick:v,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(y.default),{class:"i-semi"})],8,x)),s.product?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:b,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(k.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),s.showPrice?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(i.default,{field:d.value,"onUpdate:field":r[2]||(r[2]=o=>d.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(i.default,{field:t.value,"onUpdate:field":r[4]||(r[4]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(c.default,{select:a.value,"onUpdate:select":r[3]||(r[3]=o=>a.value=o),options:["pcs","g","ml"],class:"bg-light pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])])):e.createCommentVNode("",!0)]))}};exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { ref as n, computed as q, watch as v, openBlock as o, createElementBlock as p, createElementVNode as y, toDisplayString as U, createBlock as B, withCtx as f, createVNode as i, createCommentVNode as c, unref as h } from "vue";
2
2
  import b from "../../../../components/Field/Field.vue2.js";
3
- import w from "../../../../components/Select/Select.vue2.js";
3
+ import w from "../../../../components/Select/Select.vue.js";
4
4
  /* empty css */
5
5
  import Q from "../../../icons/navigation/IconAdd.vue.js";
6
6
  import V from "../../../icons/navigation/IconDelete.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue2.cjs"),i=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),d={class:"o-scroll product-images"},_={class:"no-responsive flex flex-nowrap gap-thin"},m=["src","onClick"],h={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(r){const t=e.ref(!1),l=e.ref(null),n=o=>{l.value=o,t.value=!0},u=()=>{t.value=!1};return(o,g)=>(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.images,(s,a)=>(e.openBlock(),e.createElementBlock("img",{key:a,src:(o.FILE_SERVER_URL||"")+s,onClick:v=>n(s),class:"flex-child flex-child-grow-1 aspect-1x1 radius-semi bg-white o-hidden thumbnail"},null,8,m))),128))]),e.createVNode(c.default,{onClosePopup:u,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(i.default,{photoUrl:(o.FILE_SERVER_URL||"")+l.value},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"])]))}},f=p.default(h,[["__scopeId","data-v-103087bb"]]);exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),i=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),d={class:"o-scroll product-images"},_={class:"no-responsive flex flex-nowrap gap-thin"},m=["src","onClick"],h={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(r){const t=e.ref(!1),l=e.ref(null),n=o=>{l.value=o,t.value=!0},u=()=>{t.value=!1};return(o,g)=>(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.images,(s,a)=>(e.openBlock(),e.createElementBlock("img",{key:a,src:(o.FILE_SERVER_URL||"")+s,onClick:v=>n(s),class:"flex-child flex-child-grow-1 aspect-1x1 radius-semi bg-white o-hidden thumbnail"},null,8,m))),128))]),e.createVNode(c.default,{onClosePopup:u,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(i.default,{photoUrl:(o.FILE_SERVER_URL||"")+l.value},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"])]))}},f=p.default(h,[["__scopeId","data-v-103087bb"]]);exports.default=f;
@@ -1,5 +1,5 @@
1
1
  import { ref as n, openBlock as s, createElementBlock as t, createElementVNode as m, Fragment as d, renderList as _, createVNode as i, withCtx as f } from "vue";
2
- import h from "../../../../components/Popup/Popup.vue2.js";
2
+ import h from "../../../../components/Popup/Popup.vue.js";
3
3
  import g from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
4
4
  /* empty css */
5
5
  import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.vue2.cjs"),d=require("../../../../components/Field/Field.vue2.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");;/* empty css */const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.vue.cjs"),d=require("../../../../components/Field/Field.vue2.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");;/* empty css */const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
@@ -2,7 +2,7 @@ import { computed as h, openBlock as o, createElementBlock as c, Fragment as m,
2
2
  import { useRoute as k, useRouter as v } from "vue-router";
3
3
  import g from "../../../icons/navigation/IconDelete.vue.js";
4
4
  import S from "../../../../components/Button/Button.vue2.js";
5
- import E from "../../../../components/Select/Select.vue2.js";
5
+ import E from "../../../../components/Select/Select.vue.js";
6
6
  import i from "../../../../components/Field/Field.vue2.js";
7
7
  import p from "../../../../components/Block/Block.vue.js";
8
8
  import { actions as f, state as t } from "../../store/categories.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue2.cjs"),q=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */const P=require("../blocks/CardPosition.vue.cjs"),x=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),V=require("../../../auth/views/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");;/* empty css */const B={class:"pd-thin"},E={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},L={class:"gap-thin flex-v-center flex-nojustify flex"},R={class:"mn-r-auto"},F={__name:"EditLeftover",setup(O){const r=v.useRoute(),i=v.useRouter(),f=e.ref(m.state.all);e.ref(null);const b=e.computed(()=>Number(t.state.current.positions.reduce((a,s)=>Number(a)+Number(s.price),0))),c=e.ref(!1);function g(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{if(r.params.leftover)try{await t.actions.fetch(r.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const a=await m.actions.read({organization:r.params._id,limit:100});f.value=a}catch{console.error("error")}});function _(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:V.state.user._id},t.state.current.owner={type:"organization",target:r.params._id},console.log("leftover state is",t.state.current),t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")))}function k(){t.actions.delete(r.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error"))}return(a,s)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("header",E,[e.createElementVNode("h2",S,e.toDisplayString(e.unref(r).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(C.default,{select:t.state.current.type,"onUpdate:select":s[0]||(s[0]=o=>t.state.current.type=o),options:["stock-in","stock-out"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(q.default,{title:"Add position",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:o=>m.actions.read(o),state:null},options:{organization:e.unref(r).params._id},class:""},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(n,l)=>(e.openBlock(),e.createBlock(x.default,{key:n._id,editable:!1,product:n,onClick:()=>{let u={...n};u.quantity=1,u.type="pcs",p.actions.add(t.state.current.positions,u),h()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(d.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>g()}],placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(o,n)=>(e.openBlock(),e.createBlock(P.default,{key:o._id,product:o,array:t.state.current.positions,products:f.value,onUpdate:l=>p.actions.update(t.state.current.positions,l,n),onDelete:l=>p.actions.delete(t.state.current.positions,l,n),class:"mn-b-small radius-medium bg-white pd-small"},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1},8,["actions"]),e.createVNode(d.default,{title:"Comment",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(w.default,{field:t.state.current.comment,"onUpdate:field":s[1]||(s[1]=o=>t.state.current.comment=o),label:"Comment",type:"textarea",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),_:1}),e.createVNode(d.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",L,[e.createElementVNode("h3",R," In total: "+e.toDisplayString(a.formatPrice(b.value)),1),e.createElementVNode("a",{onClick:s[2]||(s[2]=o=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:s[3]||(s[3]=o=>_())}," Reset "),e.unref(r).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s[4]||(s[4]=o=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})]))}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue.cjs"),q=require("../../../../components/Popup/Popup.vue.cjs");;/* empty css */const P=require("../blocks/CardPosition.vue.cjs"),x=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/views/store/globals.cjs"),V=require("../../../auth/views/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");;/* empty css */const B={class:"pd-thin"},E={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},L={class:"gap-thin flex-v-center flex-nojustify flex"},R={class:"mn-r-auto"},F={__name:"EditLeftover",setup(O){const r=v.useRoute(),i=v.useRouter(),f=e.ref(m.state.all);e.ref(null);const b=e.computed(()=>Number(t.state.current.positions.reduce((a,s)=>Number(a)+Number(s.price),0))),c=e.ref(!1);function g(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{if(r.params.leftover)try{await t.actions.fetch(r.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const a=await m.actions.read({organization:r.params._id,limit:100});f.value=a}catch{console.error("error")}});function _(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:V.state.user._id},t.state.current.owner={type:"organization",target:r.params._id},console.log("leftover state is",t.state.current),t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")))}function k(){t.actions.delete(r.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error"))}return(a,s)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("header",E,[e.createElementVNode("h2",S,e.toDisplayString(e.unref(r).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(C.default,{select:t.state.current.type,"onUpdate:select":s[0]||(s[0]=o=>t.state.current.type=o),options:["stock-in","stock-out"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(q.default,{title:"Add position",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:o=>m.actions.read(o),state:null},options:{organization:e.unref(r).params._id},class:""},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(n,l)=>(e.openBlock(),e.createBlock(x.default,{key:n._id,editable:!1,product:n,onClick:()=>{let u={...n};u.quantity=1,u.type="pcs",p.actions.add(t.state.current.positions,u),h()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(d.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>g()}],placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(o,n)=>(e.openBlock(),e.createBlock(P.default,{key:o._id,product:o,array:t.state.current.positions,products:f.value,onUpdate:l=>p.actions.update(t.state.current.positions,l,n),onDelete:l=>p.actions.delete(t.state.current.positions,l,n),class:"mn-b-small radius-medium bg-white pd-small"},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1},8,["actions"]),e.createVNode(d.default,{title:"Comment",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(w.default,{field:t.state.current.comment,"onUpdate:field":s[1]||(s[1]=o=>t.state.current.comment=o),label:"Comment",type:"textarea",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),_:1}),e.createVNode(d.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",L,[e.createElementVNode("h3",R," In total: "+e.toDisplayString(a.formatPrice(b.value)),1),e.createElementVNode("a",{onClick:s[2]||(s[2]=o=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:s[3]||(s[3]=o=>_())}," Reset "),e.unref(r).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s[4]||(s[4]=o=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})]))}};exports.default=F;
@@ -2,13 +2,13 @@ import { ref as h, computed as z, onMounted as E, openBlock as l, createElementB
2
2
  import v from "../../../../components/Block/Block.vue.js";
3
3
  import B from "../../../../components/Field/Field.vue2.js";
4
4
  import F from "../../../../components/Feed/Feed.vue.js";
5
- import I from "../../../../components/Select/Select.vue2.js";
6
- import O from "../../../../components/Popup/Popup.vue2.js";
5
+ import I from "../../../../components/Select/Select.vue.js";
6
+ import O from "../../../../components/Popup/Popup.vue.js";
7
7
  /* empty css */
8
8
  import V from "../blocks/CardPosition.vue.js";
9
9
  import A from "../../../orders/components/blocks/CardOrderItem.vue.js";
10
10
  import { useRoute as j, useRouter as q } from "vue-router";
11
- import { actions as y } from "../../../globals/store/globals.js";
11
+ import { actions as y } from "../../../globals/views/store/globals.js";
12
12
  import { state as M } from "../../../auth/views/store/auth.js";
13
13
  import { state as e, actions as u } from "../../store/leftovers.js";
14
14
  import { state as G, actions as C } from "../../store/products.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");;/* empty css */const o=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),q=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");;/* empty css */const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),h=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});h.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function g(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(y.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(q.default,{key:a._id,product:a,array:t.state.current.ingredients,products:h.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");;/* empty css */const o=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),q=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/views/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");;/* empty css */const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),h=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});h.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function g(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(y.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(q.default,{key:a._id,product:a,array:t.state.current.ingredients,products:h.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
@@ -7,14 +7,14 @@ import d from "../../../../components/Block/Block.vue.js";
7
7
  import v from "../../../../components/Field/Field.vue2.js";
8
8
  import S from "../../../../components/Checkbox/Checkbox.vue.js";
9
9
  import N from "../../../../components/Button/Button.vue2.js";
10
- import T from "../../../../components/Popup/Popup.vue2.js";
10
+ import T from "../../../../components/Popup/Popup.vue.js";
11
11
  import A from "../../../../components/Feed/Feed.vue.js";
12
12
  import L from "../../../../components/EditImages/EditImages.vue.js";
13
13
  import D from "../../../icons/navigation/IconDelete.vue.js";
14
14
  import q from "../blocks/CardPosition.vue.js";
15
15
  import M from "../../../orders/components/blocks/CardOrderItem.vue.js";
16
16
  import j from "../sections/EditProductInfo.vue.js";
17
- import { actions as w } from "../../../globals/store/globals.js";
17
+ import { actions as w } from "../../../globals/views/store/globals.js";
18
18
  import { state as e, mutations as G, actions as c } from "../../store/products.js";
19
19
  import { actions as H, state as J } from "../../store/categories.js";
20
20
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/views/store/auth.cjs"),c=require("../../store/products.cjs"),f={class:"pd-thin"},g={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),y={class:"cols-2-1_3 bg-light pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=l.useRoute(),n=l.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",g,[q,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-light"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>c.actions.read(o),state:c.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/views/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/views/store/auth.cjs"),c=require("../../store/products.cjs"),f={class:"pd-thin"},g={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),y={class:"cols-2-1_3 bg-light pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=l.useRoute(),n=l.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",g,[q,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-light"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>c.actions.read(o),state:c.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
@@ -3,7 +3,7 @@ import { useRoute as y, useRouter as q } from "vue-router";
3
3
  import P from "../../../../components/Tab/Tab.vue2.js";
4
4
  import $ from "../../../../components/Feed/Feed.vue.js";
5
5
  import k from "../sections/FilterProducts.vue.js";
6
- import C from "../../../globals/components/blocks/BlockSearch.vue.js";
6
+ import C from "../../../globals/views/components/blocks/BlockSearch.vue.js";
7
7
  import w from "../blocks/CardProduct.vue.js";
8
8
  import { state as x } from "../../../auth/views/store/auth.js";
9
9
  import { actions as z, state as N } from "../../store/products.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");;/* empty css */;/* empty css */const r=require("../../../../components/Field/Field.vue2.cjs"),i=require("../../../../components/Select/Select.vue2.cjs"),u={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(i.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(i.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"฿",options:["฿"],class:"pos-relative bg-light pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");;/* empty css */;/* empty css */const r=require("../../../../components/Field/Field.vue2.cjs"),i=require("../../../../components/Select/Select.vue.cjs"),u={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(i.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(i.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"฿",options:["฿"],class:"pos-relative bg-light pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=u;
@@ -2,7 +2,7 @@ import { openBlock as u, createElementBlock as a, Fragment as o, createVNode as
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import i from "../../../../components/Field/Field.vue2.js";
5
- import r from "../../../../components/Select/Select.vue2.js";
5
+ import r from "../../../../components/Select/Select.vue.js";
6
6
  const w = {
7
7
  __name: "EditProductInfo",
8
8
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("axios"),a=require("../../globals/store/globals.cjs"),s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),r=o.reactive({all:[],current:{order:1,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}}),c={async fetchCategories(t){return await s.get("/categories",{params:t}).then(e=>(r.all=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},updateCategories(t){return s.post("/categories",t).then(e=>(r.all=t,Promise.resolve(t)),e=>(a.setError(e),Promise.reject(e)))},fetchCategory(t){return s.get("/categories/"+t).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},addCategory(){return s.post("/categories/add",r.current).then(t=>(r.all.push(t.data),Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategory(t){return s.post("/categories/"+t,r.current).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},resetCategory(){r.current={order:0,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}},deleteCategory(t){return s.delete("/categories/"+t).then(e=>{const n=r.all.findIndex(i=>i.url===t);r.all.splice(n,1)},e=>{a.setError(e)})}};o.watch(r,t=>{});exports.actions=c;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("axios"),a=require("../../globals/views/store/globals.cjs"),s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),r=o.reactive({all:[],current:{order:1,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}}),c={async fetchCategories(t){return await s.get("/categories",{params:t}).then(e=>(r.all=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},updateCategories(t){return s.post("/categories",t).then(e=>(r.all=t,Promise.resolve(t)),e=>(a.setError(e),Promise.reject(e)))},fetchCategory(t){return s.get("/categories/"+t).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},addCategory(){return s.post("/categories/add",r.current).then(t=>(r.all.push(t.data),Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategory(t){return s.post("/categories/"+t,r.current).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},resetCategory(){r.current={order:0,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}},deleteCategory(t){return s.delete("/categories/"+t).then(e=>{const n=r.all.findIndex(i=>i.url===t);r.all.splice(n,1)},e=>{a.setError(e)})}};o.watch(r,t=>{});exports.actions=c;exports.state=r;