@ozdao/prometheus-framework 0.2.188 → 0.2.189

Sign up to get free protection for your applications and to get access to all the features.
Files changed (298) 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 +5 -5
  11. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +73 -42
  21. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
  27. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
  33. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
  39. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/globals/globals.client.js +34 -10
  41. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +1 -0
  42. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +72 -0
  43. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +57 -0
  45. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +35 -0
  47. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.cjs +1 -0
  48. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.js +75 -0
  49. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -0
  50. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +194 -0
  51. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.js +38 -0
  53. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.cjs +1 -0
  54. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.js +31 -0
  55. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +66 -0
  57. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.cjs +1 -0
  58. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.js +16 -0
  59. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -0
  60. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +54 -0
  61. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.js +7 -0
  63. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.js +47 -0
  65. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.cjs +1 -0
  66. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.js +18 -0
  67. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +83 -0
  69. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -11
  71. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +3 -3
  73. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +3 -3
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  87. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +1 -1
  89. package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/orders/store/applications.js +1 -1
  91. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
  115. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +2 -2
  121. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  125. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.js +1 -1
  127. package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/pages/views/store/pages.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +3 -3
  131. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
  139. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
  141. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
  143. package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
  145. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +3 -3
  149. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  151. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
  153. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  155. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.js +1 -1
  157. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +1 -1
  159. package/dist/style.css +1 -1
  160. package/package.json +1 -1
  161. package/src/builder/modes/ssr.dev.js +4 -1
  162. package/src/builder/templates/page.js +1 -1
  163. package/src/builder/webpack/webpack.config.base.js +2 -1
  164. package/src/builder/webpack/webpack.config.spa.js +0 -1
  165. package/src/components/Feed/Feed.vue +5 -5
  166. package/src/components/Sidebar/Sidebar.vue +1 -1
  167. package/src/modules/auth/controllers/services/twofa.service.js +1 -1
  168. package/src/modules/auth/views/components/pages/EnterCode.vue +1 -1
  169. package/src/modules/auth/views/store/auth.js +1 -1
  170. package/src/modules/auth/views/store/twofa.js +1 -1
  171. package/src/modules/auth/views/validations/inputs.validation.js +1 -1
  172. package/src/modules/backoffice/router/backoffice.js +1 -1
  173. package/src/modules/chats/controllers/chats.controller.js +1 -1
  174. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  175. package/src/modules/community/components/pages/BlogPost.vue +63 -2
  176. package/src/modules/community/components/sections/Comment.vue +1 -1
  177. package/src/modules/community/models/blogpost.model.js +4 -4
  178. package/src/modules/community/store/blogposts.js +1 -1
  179. package/src/modules/community/store/reactions.js +1 -1
  180. package/src/modules/events/components/blocks/CardEvent.vue +2 -2
  181. package/src/modules/events/controllers/events.controller.js +1 -1
  182. package/src/modules/events/controllers/tickets.controller.js +1 -1
  183. package/src/modules/events/models/event.model.js +4 -4
  184. package/src/modules/events/store/events.js +1 -1
  185. package/src/modules/events/store/tickets.js +1 -1
  186. package/src/modules/gallery/components/pages/Gallery.vue +2 -2
  187. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -2
  188. package/src/modules/gallery/models/photo.model.js +3 -3
  189. package/src/modules/gallery/store/gallery.js +1 -1
  190. package/src/modules/globals/{services → controllers/classes}/globals.crud.js +2 -2
  191. package/src/modules/globals/globals.client.js +78 -8
  192. package/src/modules/globals/globals.server.js +3 -3
  193. package/src/modules/globals/models/{metadata.schema.js → schemas/metadata.schema.js} +1 -1
  194. package/src/modules/globals/{services → views/classes}/globals.store.js +1 -1
  195. package/src/modules/globals/{components → views/components}/blocks/BlockSorting.vue +1 -1
  196. package/src/modules/globals/views/components/layouts/App.vue +83 -0
  197. package/src/modules/globals/{components → views/components}/layouts/Client.vue +8 -8
  198. package/src/modules/globals/{components → views/components}/partials/Header.vue +1 -1
  199. package/src/modules/globals/views/middlewares/localization.js +16 -0
  200. package/src/modules/integrations/stripe/controllers/webhooks/stripe.webhook.js +2 -2
  201. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  202. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
  203. package/src/modules/marketplace/router/marketplace.js +1 -1
  204. package/src/modules/orders/components/pages/Order.vue +1 -1
  205. package/src/modules/orders/components/pages/OrderBackoffice.vue +2 -2
  206. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  207. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
  208. package/src/modules/orders/components/pages/Orders.vue +2 -2
  209. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  210. package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
  211. package/src/modules/orders/controllers/applications.controller.js +1 -1
  212. package/src/modules/orders/controllers/orders.controller.js +1 -1
  213. package/src/modules/orders/models/customer.model.js +3 -3
  214. package/src/modules/orders/models/order.model.js +1 -1
  215. package/src/modules/orders/orders.server.js +1 -1
  216. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  217. package/src/modules/orders/router/orders.router.js +1 -1
  218. package/src/modules/orders/store/applications.js +1 -1
  219. package/src/modules/orders/store/customers.store.js +1 -1
  220. package/src/modules/orders/store/orders.js +1 -1
  221. package/src/modules/orders/store/shopcart.js +1 -1
  222. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  223. package/src/modules/organizations/components/pages/Members.vue +2 -2
  224. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  225. package/src/modules/organizations/controllers/invites.controller.js +1 -1
  226. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  227. package/src/modules/organizations/models/invite.model.js +2 -2
  228. package/src/modules/organizations/models/organization.model.js +1 -1
  229. package/src/modules/organizations/router/backoffice.router.js +1 -1
  230. package/src/modules/organizations/router/organizations.js +1 -1
  231. package/src/modules/organizations/store/departments.js +1 -1
  232. package/src/modules/organizations/store/invites.js +1 -1
  233. package/src/modules/organizations/store/memberships.js +1 -1
  234. package/src/modules/organizations/store/organizations.js +1 -1
  235. package/src/modules/pages/pages.server.js +1 -1
  236. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  237. package/src/modules/pages/views/components/pages/PageEdit.vue +1 -1
  238. package/src/modules/pages/views/components/pages/Pages.vue +2 -2
  239. package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
  240. package/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  241. package/src/modules/pages/views/router/pages.router.js +1 -1
  242. package/src/modules/pages/views/store/pages.js +1 -1
  243. package/src/modules/pages/views/store/pages.store.js +1 -1
  244. package/src/modules/products/components/blocks/CardLeftover.vue +1 -1
  245. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  246. package/src/modules/products/components/pages/ProductEdit.vue +1 -1
  247. package/src/modules/products/components/pages/Products.vue +1 -1
  248. package/src/modules/products/models/leftover.model.js +1 -1
  249. package/src/modules/products/store/categories.js +1 -1
  250. package/src/modules/products/store/leftovers.js +1 -1
  251. package/src/modules/products/store/products.js +1 -1
  252. package/src/modules/projects/store/projects.js +1 -1
  253. package/src/modules/reports/store/reports.js +1 -1
  254. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  255. package/src/modules/spots/components/pages/Map.vue +1 -1
  256. package/src/modules/spots/router/spots.js +1 -1
  257. package/src/modules/spots/spots.server.js +1 -1
  258. package/src/modules/spots/store/spots.js +1 -1
  259. package/src/modules/users/models/user.model.js +3 -3
  260. package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
  261. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  262. package/src/modules/wallet/views/store/payments.store.js +1 -1
  263. package/src/modules/wallet/views/store/wallet.store.js +1 -1
  264. package/src/modules/globals/router/routerGuards.js +0 -29
  265. /package/src/modules/globals/{services → controllers/classes}/globals.cache.js +0 -0
  266. /package/src/modules/globals/{services → controllers/classes}/globals.logger.js +0 -0
  267. /package/src/modules/globals/{services → controllers/classes}/globals.observer.js +0 -0
  268. /package/src/modules/globals/{services → controllers/classes}/globals.webhook.js +0 -0
  269. /package/src/modules/globals/{utils → controllers/utils}/mailing.js +0 -0
  270. /package/src/modules/globals/{utils → controllers/utils}/parseCookie.js +0 -0
  271. /package/src/modules/globals/{utils → controllers/utils}/seo-friendly-url.js +0 -0
  272. /package/src/modules/globals/{utils → controllers/utils}/sitemap.js +0 -0
  273. /package/src/modules/globals/models/{common.schema.js → schemas/common.schema.js} +0 -0
  274. /package/src/modules/globals/models/{credentials.schema.js → schemas/credentials.schema.js} +0 -0
  275. /package/src/modules/globals/models/{engagement.schema.js → schemas/engagement.schema.js} +0 -0
  276. /package/src/modules/globals/models/{ownership.schema.js → schemas/ownership.schema.js} +0 -0
  277. /package/src/modules/globals/models/{profile.schema.js → schemas/profile.schema.js} +0 -0
  278. /package/src/modules/globals/models/{socials.schema.js → schemas/socials.schema.js} +0 -0
  279. /package/src/modules/globals/{components → views/components}/blocks/BlockFilter.vue +0 -0
  280. /package/src/modules/globals/{components → views/components}/blocks/BlockSearch.vue +0 -0
  281. /package/src/modules/globals/{components → views/components}/blocks/CardFooter.vue +0 -0
  282. /package/src/modules/globals/{components → views/components}/blocks/CardHeader.vue +0 -0
  283. /package/src/modules/globals/{components → views/components}/elements/ButtonDate.vue +0 -0
  284. /package/src/modules/globals/{components → views/components}/elements/ButtonSort.vue +0 -0
  285. /package/src/modules/globals/{components → views/components}/layouts/Empty.vue +0 -0
  286. /package/src/modules/globals/{components → views/components}/pages/401.vue +0 -0
  287. /package/src/modules/globals/{components → views/components}/pages/404.vue +0 -0
  288. /package/src/modules/globals/{components → views/components}/partials/BottomNavigation.vue +0 -0
  289. /package/src/modules/globals/{components → views/components}/partials/Footer.vue +0 -0
  290. /package/src/modules/globals/{components → views/components}/partials/Navigation.vue +0 -0
  291. /package/src/modules/globals/{components → views/components}/partials/NavigationBar.vue +0 -0
  292. /package/src/modules/globals/{components → views/components}/sections/SectionPageTitle.vue +0 -0
  293. /package/src/modules/globals/{components → views/components}/sections/Title.vue +0 -0
  294. /package/src/modules/globals/{components → views/components}/sections/Walkthrough.vue +0 -0
  295. /package/src/modules/globals/{localization → views/localization}/get-browser-locale.js +0 -0
  296. /package/src/modules/globals/{mixins → views/mixins}/mixins.js +0 -0
  297. /package/src/modules/globals/{router → views/router}/scrollBehavior.js +0 -0
  298. /package/src/modules/globals/{store → views/store}/globals.js +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");;/* empty css */const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const u=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const r=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */;/* empty css */;/* empty css */const f=require("../../../../components/Button/Button.vue2.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),D=require("../../../icons/navigation/IconDelete.vue.cjs");;/* empty css */;/* empty css */const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-light pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-light pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),H=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Gallery",-1),Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={__name:"DepartmentEdit",setup(Z){const N=c.useRouter(),d=c.useRoute();async function V(){e.ref(w.state.memberships),d.params.department&&await t.actions.readOne(d.params.department)}V();const n=e.ref(!1),_=e.ref(null);function y(o){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function k(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function E(){N.push({name:"Organization Members",params:{_id:d.params._id}})}async function v(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function q(o){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:o.user._id})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",C,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(d).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:v,callback:o.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:k,callback:E,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>y()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(s,l)=>(e.openBlock(),e.createBlock(b.default,{class:"h-4r bg-white pd-thin radius-medium w-100",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,action:{label:{is:D.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>q(s)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(x.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(B.default,{search:{placeholder:"Search customer...",class:"bg-light mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:s=>w.actions.read(s),state:null},options:{target:e.unref(d).params._id},class:"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(l,$)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:l._id,user:l.user,photo:(m=l.user.profile)==null?void 0:m.photo,name:((p=l.user.profile)==null?void 0:p.name)||l.user.phone||l.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:l.user._id,user:l.user,position:"Member"}),i()},class:"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(r.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[G,H,e.createElementVNode("div",J,[K,e.createVNode(r.default,{label:"Read gallery",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.read,"onUpdate:radio":a[4]||(a[4]=s=>t.state.department.accesses.gallery.read=!t.state.department.accesses.gallery.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit gallery",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.edit,"onUpdate:radio":a[5]||(a[5]=s=>t.state.department.accesses.gallery.edit=!t.state.department.accesses.gallery.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete gallery",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.gallery.delete=!t.state.department.accesses.gallery.delete)},null,8,["radio"]),Q,e.createVNode(r.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":a[7]||(a[7]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":a[8]||(a[8]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(r.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":a[10]||(a[10]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":a[11]||(a[11]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(r.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":a[13]||(a[13]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":a[14]||(a[14]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[15]||(a[15]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=Y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");;/* empty css */const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const u=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const r=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */;/* empty css */;/* empty css */const f=require("../../../../components/Button/Button.vue2.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),D=require("../../../icons/navigation/IconDelete.vue.cjs");;/* empty css */;/* empty css */const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/views/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-light pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-light pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),H=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Gallery",-1),Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={__name:"DepartmentEdit",setup(Z){const N=c.useRouter(),d=c.useRoute();async function V(){e.ref(w.state.memberships),d.params.department&&await t.actions.readOne(d.params.department)}V();const n=e.ref(!1),_=e.ref(null);function y(o){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function k(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function E(){N.push({name:"Organization Members",params:{_id:d.params._id}})}async function v(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function q(o){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:o.user._id})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",C,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(d).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:v,callback:o.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:k,callback:E,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>y()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(s,l)=>(e.openBlock(),e.createBlock(b.default,{class:"h-4r bg-white pd-thin radius-medium w-100",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,action:{label:{is:D.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>q(s)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(x.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(B.default,{search:{placeholder:"Search customer...",class:"bg-light mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:s=>w.actions.read(s),state:null},options:{target:e.unref(d).params._id},class:"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(l,$)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:l._id,user:l.user,photo:(m=l.user.profile)==null?void 0:m.photo,name:((p=l.user.profile)==null?void 0:p.name)||l.user.phone||l.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:l.user._id,user:l.user,position:"Member"}),i()},class:"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(r.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[G,H,e.createElementVNode("div",J,[K,e.createVNode(r.default,{label:"Read gallery",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.read,"onUpdate:radio":a[4]||(a[4]=s=>t.state.department.accesses.gallery.read=!t.state.department.accesses.gallery.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit gallery",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.edit,"onUpdate:radio":a[5]||(a[5]=s=>t.state.department.accesses.gallery.edit=!t.state.department.accesses.gallery.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete gallery",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.gallery.delete=!t.state.department.accesses.gallery.delete)},null,8,["radio"]),Q,e.createVNode(r.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":a[7]||(a[7]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":a[8]||(a[8]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(r.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":a[10]||(a[10]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":a[11]||(a[11]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(r.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":a[13]||(a[13]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":a[14]||(a[14]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[15]||(a[15]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=Y;
@@ -20,7 +20,7 @@ import H from "../../../icons/navigation/IconDelete.vue.js";
20
20
  /* empty css */
21
21
  /* empty css */
22
22
  import $ from "../../../users/components/blocks/CardUser.vue.js";
23
- import { actions as N } from "../../../globals/store/globals.js";
23
+ import { actions as N } from "../../../globals/views/store/globals.js";
24
24
  import { state as e, actions as f } from "../../store/departments.js";
25
25
  import { actions as L, state as j } from "../../store/memberships.js";
26
26
  const q = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin flex-nowrap flex bg-light pd-medium radius-big" }, J = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router"),m=require("../../../../components/Feed/Feed.vue.cjs");;/* empty css */;/* empty css */const M=require("../../../../components/Popup/Popup.vue2.cjs"),N=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),z=require("../sections/MembersAdd.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");const _=require("../../../users/components/blocks/CardUser.vue.cjs"),P=require("../blocks/CardDepartment.vue.cjs"),k=require("../../../icons/navigation/IconDelete.vue.cjs"),p=require("../../../auth/views/store/auth.cjs"),w=require("../../../globals/store/globals.cjs"),f=require("../../store/invites.cjs"),b=require("../../store/memberships.cjs"),y=require("../../store/organizations.cjs"),v=require("../../store/departments.cjs"),V={class:"pd-thin"},I={key:2,class:"cols-1 gap-thin"},A={key:3},F={__name:"Members",setup(S){const o=g.useRoute();g.useRouter();const d=e.ref(null),i=e.ref("members"),l=e.ref([]),c=e.ref(!1);function B(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{d.value=(await y.actions.read({_id:o.params._id,user:p.state.user._id}))[0]}),e.computed(()=>{const n=v.state.departments,a=n.flatMap(s=>s.subdepartments.map(t=>t._id));return n.filter(s=>!a.includes(s._id))});async function C(n,a,s){try{const t=await f.actions.create({owner:{type:"Organization",target:d.value._id},creator:{type:"User",target:p.state.user._id},invites:n});for(let r of t.createdInvites)w.actions.add(l.value,r);h(),a()}catch(t){s(t)}}async function q(n,a){confirm("Confirm remove of member")==!0&&(b.state.memberships.splice(n,1),await b.actions.delete(a))}async function x(n,a){confirm("Confirm remove of member")==!0&&(w.actions.delete(l.value,a),await f.actions.delete(a._id))}return(n,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",V,[e.createVNode(N.default,{title:"Members","onUpdate:tabs_current":a[0]||(a[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:`Members (${y.state.current.numberOfMembers||0})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:B,label:"Invite members"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(M.default,{title:"Add members",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(z.default,{text:"Please enter your email or phone number to send an invitation link:",organization:d.value,onSendInvite:C},null,8,["organization"])]),_:1},8,["isPopupOpen"]),i.value==="departments"?(e.openBlock(),e.createBlock(m.default,{key:0,states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>n.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:t=>v.actions.read(t),state:null},options:{organization:e.unref(o).params._id,user:p.state.user._id}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(r,u)=>(e.openBlock(),e.createBlock(P.default,{key:u,department:r,organization:e.unref(o).params._id,class:"radius-semi bg-light pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])):e.createCommentVNode("",!0),i.value==="departments"&&v.state.departments.length>0?(e.openBlock(),e.createBlock(s,{key:1,to:{path:`/organizations/${e.unref(o).params._id}/departments/create`},class:"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"},{default:e.withCtx(()=>[e.createTextVNode(" Add department ")]),_:1},8,["to"])):e.createCommentVNode("",!0),i.value==="members"?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(m.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:t=>b.actions.read(t)},options:{target:e.unref(o).params._id,role:["member","owner"]},class:"gap-thin cols-1"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(r,u)=>(e.openBlock(),e.createBlock(_.default,{key:u,user:r,_id:r.user._id,photo:r.user.profile.photo,phone:r.user.phone,email:r.user.email,name:r.user.profile.name||"No name",role:r.label||r.role,onClick:$=>n.$router.push(`/profile/${r.user._id}`),action:r.role!=="owner"?{label:{is:k.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>q(u,r)}:null,class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",A,[e.createVNode(m.default,{items:l.value,"onUpdate:items":a[1]||(a[1]=t=>l.value=t),states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:t=>f.actions.read(t)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,r=>(e.openBlock(),e.createBlock(_.default,{key:n.index,user:{type:"invite"},name:r.email||r.phone,role:r.status,action:{label:{is:k.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>x(n.index,r)},class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["items","store","options"])])):e.createCommentVNode("",!0)])}}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router"),m=require("../../../../components/Feed/Feed.vue.cjs");;/* empty css */;/* empty css */const M=require("../../../../components/Popup/Popup.vue2.cjs"),N=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),z=require("../sections/MembersAdd.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");const _=require("../../../users/components/blocks/CardUser.vue.cjs"),P=require("../blocks/CardDepartment.vue.cjs"),k=require("../../../icons/navigation/IconDelete.vue.cjs"),p=require("../../../auth/views/store/auth.cjs"),w=require("../../../globals/views/store/globals.cjs"),f=require("../../store/invites.cjs"),b=require("../../store/memberships.cjs"),y=require("../../store/organizations.cjs"),v=require("../../store/departments.cjs"),V={class:"pd-thin"},I={key:2,class:"cols-1 gap-thin"},A={key:3},F={__name:"Members",setup(S){const o=g.useRoute();g.useRouter();const d=e.ref(null),i=e.ref("members"),l=e.ref([]),c=e.ref(!1);function B(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{d.value=(await y.actions.read({_id:o.params._id,user:p.state.user._id}))[0]}),e.computed(()=>{const n=v.state.departments,a=n.flatMap(s=>s.subdepartments.map(t=>t._id));return n.filter(s=>!a.includes(s._id))});async function C(n,a,s){try{const t=await f.actions.create({owner:{type:"Organization",target:d.value._id},creator:{type:"User",target:p.state.user._id},invites:n});for(let r of t.createdInvites)w.actions.add(l.value,r);h(),a()}catch(t){s(t)}}async function q(n,a){confirm("Confirm remove of member")==!0&&(b.state.memberships.splice(n,1),await b.actions.delete(a))}async function x(n,a){confirm("Confirm remove of member")==!0&&(w.actions.delete(l.value,a),await f.actions.delete(a._id))}return(n,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",V,[e.createVNode(N.default,{title:"Members","onUpdate:tabs_current":a[0]||(a[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:`Members (${y.state.current.numberOfMembers||0})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:B,label:"Invite members"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(M.default,{title:"Add members",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(z.default,{text:"Please enter your email or phone number to send an invitation link:",organization:d.value,onSendInvite:C},null,8,["organization"])]),_:1},8,["isPopupOpen"]),i.value==="departments"?(e.openBlock(),e.createBlock(m.default,{key:0,states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>n.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:t=>v.actions.read(t),state:null},options:{organization:e.unref(o).params._id,user:p.state.user._id}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(r,u)=>(e.openBlock(),e.createBlock(P.default,{key:u,department:r,organization:e.unref(o).params._id,class:"radius-semi bg-light pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])):e.createCommentVNode("",!0),i.value==="departments"&&v.state.departments.length>0?(e.openBlock(),e.createBlock(s,{key:1,to:{path:`/organizations/${e.unref(o).params._id}/departments/create`},class:"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"},{default:e.withCtx(()=>[e.createTextVNode(" Add department ")]),_:1},8,["to"])):e.createCommentVNode("",!0),i.value==="members"?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(m.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:t=>b.actions.read(t)},options:{target:e.unref(o).params._id,role:["member","owner"]},class:"gap-thin cols-1"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(r,u)=>(e.openBlock(),e.createBlock(_.default,{key:u,user:r,_id:r.user._id,photo:r.user.profile.photo,phone:r.user.phone,email:r.user.email,name:r.user.profile.name||"No name",role:r.label||r.role,onClick:$=>n.$router.push(`/profile/${r.user._id}`),action:r.role!=="owner"?{label:{is:k.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>q(u,r)}:null,class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",A,[e.createVNode(m.default,{items:l.value,"onUpdate:items":a[1]||(a[1]=t=>l.value=t),states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:t=>f.actions.read(t)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,r=>(e.openBlock(),e.createBlock(_.default,{key:n.index,user:{type:"invite"},name:r.email||r.phone,role:r.status,action:{label:{is:k.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>x(n.index,r)},class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["items","store","options"])])):e.createCommentVNode("",!0)])}}};exports.default=F;
@@ -4,7 +4,7 @@ import $ from "../../../../components/Feed/Feed.vue.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import E from "../../../../components/Popup/Popup.vue2.js";
7
- import L from "../../../globals/components/sections/SectionPageTitle.vue.js";
7
+ import L from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
8
8
  import T from "../sections/MembersAdd.vue.js";
9
9
  /* empty css */
10
10
  import "../../../../components/Menu/MenuItem.vue.js";
@@ -12,7 +12,7 @@ import x from "../../../users/components/blocks/CardUser.vue.js";
12
12
  import j from "../blocks/CardDepartment.vue.js";
13
13
  import M from "../../../icons/navigation/IconDelete.vue.js";
14
14
  import { state as w } from "../../../auth/views/store/auth.js";
15
- import { actions as z } from "../../../globals/store/globals.js";
15
+ import { actions as z } from "../../../globals/views/store/globals.js";
16
16
  import { actions as k } from "../../store/invites.js";
17
17
  import { actions as I, state as q } from "../../store/memberships.js";
18
18
  import { actions as G, state as H } from "../../store/organizations.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const v=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),g=require("../../../users/components/blocks/CardUser.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),w=require("../../../users/store/users.cjs"),x={class:"mn-b-thin t-transp p-medium"},E={class:"mn-b-thin pos-relative"},y={key:0,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={class:"cols-1 mn-b-small radius-medium pd-semi bg-light pos-relative"},V=["onClick"],C=e.createElementVNode("span",null,"Invite to organization",-1),q={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(c,{emit:d}){let n=e.ref(null),l=e.ref(!1);const u=e.ref(null),m=d,r=e.ref([{contact:""}]);async function p(){return new Promise((a,s)=>{m("send-invite",r.value,a,s)})}return(a,s)=>{const f=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",x,e.toDisplayString(c.text),1),e.createElementVNode("div",E,[e.withDirectives(e.createVNode(b.default,{onSearch:s[0]||(s[0]=o=>{e.isRef(n)?n.value=o:n=o,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-grey"},null,512),[[f,()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(n)&&e.unref(l)?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(k.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:o=>w.actions.read(o),state:null},options:{search:e.unref(n)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(t,i)=>(e.openBlock(),e.createBlock(g.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{r.value.push({contact:t.email||t.phone}),e.isRef(l)?l.value=!1:l=!1},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(o,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"},[e.createVNode(h.default,{field:o.contact,"onUpdate:field":i=>o.contact=i,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:u.value},{default:e.withCtx(()=>[t<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:s[1]||(s[1]=()=>r.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>r.value.splice(t,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(_.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,V))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(v.default,{submit:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[C]),_:1})])}}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const v=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../globals/views/components/blocks/BlockSearch.vue.cjs"),g=require("../../../users/components/blocks/CardUser.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),w=require("../../../users/store/users.cjs"),x={class:"mn-b-thin t-transp p-medium"},E={class:"mn-b-thin pos-relative"},y={key:0,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={class:"cols-1 mn-b-small radius-medium pd-semi bg-light pos-relative"},V=["onClick"],C=e.createElementVNode("span",null,"Invite to organization",-1),q={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(c,{emit:d}){let n=e.ref(null),l=e.ref(!1);const u=e.ref(null),m=d,r=e.ref([{contact:""}]);async function p(){return new Promise((a,s)=>{m("send-invite",r.value,a,s)})}return(a,s)=>{const f=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",x,e.toDisplayString(c.text),1),e.createElementVNode("div",E,[e.withDirectives(e.createVNode(b.default,{onSearch:s[0]||(s[0]=o=>{e.isRef(n)?n.value=o:n=o,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-grey"},null,512),[[f,()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(n)&&e.unref(l)?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(k.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:o=>w.actions.read(o),state:null},options:{search:e.unref(n)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(t,i)=>(e.openBlock(),e.createBlock(g.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{r.value.push({contact:t.email||t.phone}),e.isRef(l)?l.value=!1:l=!1},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(o,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"},[e.createVNode(h.default,{field:o.contact,"onUpdate:field":i=>o.contact=i,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:u.value},{default:e.withCtx(()=>[t<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:s[1]||(s[1]=()=>r.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>r.value.splice(t,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(_.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,V))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(v.default,{submit:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[C]),_:1})])}}};exports.default=q;
@@ -3,7 +3,7 @@ import S from "../../../../components/Field/Field.vue2.js";
3
3
  /* empty css */
4
4
  import V from "../../../../components/Button/Button.vue2.js";
5
5
  import z from "../../../../components/Feed/Feed.vue.js";
6
- import B from "../../../globals/components/blocks/BlockSearch.vue.js";
6
+ import B from "../../../globals/views/components/blocks/BlockSearch.vue.js";
7
7
  import D from "../../../users/components/blocks/CardUser.vue.js";
8
8
  import F from "../../../icons/navigation/IconDelete.vue.js";
9
9
  import M from "../../../icons/navigation/IconAdd.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs");require("../../auth/views/store/auth.cjs");const t=[{path:"backoffice",component:e.default,children:[{path:"",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/OrganizationBackoffice.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");require("../../auth/views/store/auth.cjs");const t=[{path:"backoffice",component:e.default,children:[{path:"",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/OrganizationBackoffice.vue.cjs"))}]}];exports.default=t;
@@ -1,4 +1,4 @@
1
- import o from "../../globals/components/layouts/Empty.vue.js";
1
+ import o from "../../globals/views/components/layouts/Empty.vue.js";
2
2
  import "../../auth/views/store/auth.js";
3
3
  const a = [{
4
4
  path: "backoffice",
@@ -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=require("./members.router.cjs"),o=require("./departments.router.cjs"),n=require("../../products/router/products.router.cjs"),a=require("../../products/router/categories.router.cjs"),i=require("../../products/router/leftovers.router.cjs"),u=require("../../wallet/views/router/payments.router.cjs"),s=require("../../orders/router/orders.backoffice.router.cjs"),c=require("../../gallery/router/gallery.backoffice.router.cjs"),d=require("./backoffice.router.cjs"),r=require("../../auth/views/middlewares/auth.validation.cjs"),l=[{path:"organizations",component:e.default,meta:{title:{en:"Organizations",ru:"Организации"},breadcrumbs:{hidden:!0}},children:[{path:"create",name:"Create Organization",meta:{title:{en:"Create Organization",ru:"Создать Организацию"}},beforeEnter:[r.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/OrganizationEdit.vue.cjs"))},{path:":_id",name:"OrganizationRoot",meta:{title:{en:"Group",ru:"Группа"}},component:e.default,children:[{path:"",name:"Organization",meta:{title:{en:"Group",ru:"Группа"},breadcrumbs:{hidden:!0}},component:()=>Promise.resolve().then(()=>require("../components/pages/Organization.vue.cjs"))},...t.default,...o.default,...n.default,...a.default,...i.default,...u.default,...s.default,...c.default,...d.default]},{path:":_id/edit",name:"Organization Edit",meta:{title:{en:"Edit Organization",ru:"Редактировать Организацию"}},beforeEnter:[r.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/OrganizationEdit.vue.cjs"))}]}];exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/views/components/layouts/Empty.vue.cjs"),t=require("./members.router.cjs"),o=require("./departments.router.cjs"),n=require("../../products/router/products.router.cjs"),a=require("../../products/router/categories.router.cjs"),i=require("../../products/router/leftovers.router.cjs"),u=require("../../wallet/views/router/payments.router.cjs"),s=require("../../orders/router/orders.backoffice.router.cjs"),c=require("../../gallery/router/gallery.backoffice.router.cjs"),d=require("./backoffice.router.cjs"),r=require("../../auth/views/middlewares/auth.validation.cjs"),l=[{path:"organizations",component:e.default,meta:{title:{en:"Organizations",ru:"Организации"},breadcrumbs:{hidden:!0}},children:[{path:"create",name:"Create Organization",meta:{title:{en:"Create Organization",ru:"Создать Организацию"}},beforeEnter:[r.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/OrganizationEdit.vue.cjs"))},{path:":_id",name:"OrganizationRoot",meta:{title:{en:"Group",ru:"Группа"}},component:e.default,children:[{path:"",name:"Organization",meta:{title:{en:"Group",ru:"Группа"},breadcrumbs:{hidden:!0}},component:()=>Promise.resolve().then(()=>require("../components/pages/Organization.vue.cjs"))},...t.default,...o.default,...n.default,...a.default,...i.default,...u.default,...s.default,...c.default,...d.default]},{path:":_id/edit",name:"Organization Edit",meta:{title:{en:"Edit Organization",ru:"Редактировать Организацию"}},beforeEnter:[r.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/OrganizationEdit.vue.cjs"))}]}];exports.default=l;
@@ -1,4 +1,4 @@
1
- import t from "../../globals/components/layouts/Empty.vue.js";
1
+ import t from "../../globals/views/components/layouts/Empty.vue.js";
2
2
  import o from "./members.router.js";
3
3
  import e from "./departments.router.js";
4
4
  import i from "../../products/router/products.router.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("axios");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const l=require("vue"),n=require("../../globals/store/globals.cjs"),s=o.create({baseURL:process.env.API_URL,withCredentials:!0});s.defaults.withCredentials=!0;const a=l.reactive({departments:[],department:{organization:"",profile:{photo:"",name:"",description:"",categories:[]},address:"",location:{lat:null,lng:null},worktime:[],delivery:[],payment:[],members:[],subdepartments:[],hidden:!1,accesses:{gallery:{read:!1,edit:!1,delete:!1},products:{read:!1,edit:!1,delete:!1},orders:{read:!1,confirm:!1,delete:!1},departments:{read:!1,edit:!1,delete:!1}}},error:null}),d={async readOne(r){try{const e=await s.get(`/api/departments/get/${r}`);return a.department=e.data,a.error=null,e.data}catch(e){return n.setError(e),null}},async read(r={}){try{const e=await s.get("/api/departments/read",{params:r});return console.log("Response:",e),a.departments=e.data,a.error=null,e.data}catch(e){return console.log(e),n.setError(e),null}},async create(r,e){try{const t=await s.post(`/api/departments/${r}/create`,e);return a.error=null,t.data}catch(t){return n.setError(t),null}},async update(r,e){try{const t=await s.post(`/api/departments/${r}/update`,e);return a.error=null,t}catch(t){return n.setError(t),null}},async delete(r,e){try{return await s.delete(`/api/departments/${r}/delete`,{data:{_id:e}}),a.error=null,!0}catch(t){return n.setError(t),!1}}};l.watch(a,(r,e)=>{});exports.actions=d;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("axios");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const l=require("vue"),n=require("../../globals/views/store/globals.cjs"),s=o.create({baseURL:process.env.API_URL,withCredentials:!0});s.defaults.withCredentials=!0;const a=l.reactive({departments:[],department:{organization:"",profile:{photo:"",name:"",description:"",categories:[]},address:"",location:{lat:null,lng:null},worktime:[],delivery:[],payment:[],members:[],subdepartments:[],hidden:!1,accesses:{gallery:{read:!1,edit:!1,delete:!1},products:{read:!1,edit:!1,delete:!1},orders:{read:!1,confirm:!1,delete:!1},departments:{read:!1,edit:!1,delete:!1}}},error:null}),d={async readOne(r){try{const e=await s.get(`/api/departments/get/${r}`);return a.department=e.data,a.error=null,e.data}catch(e){return n.setError(e),null}},async read(r={}){try{const e=await s.get("/api/departments/read",{params:r});return console.log("Response:",e),a.departments=e.data,a.error=null,e.data}catch(e){return console.log(e),n.setError(e),null}},async create(r,e){try{const t=await s.post(`/api/departments/${r}/create`,e);return a.error=null,t.data}catch(t){return n.setError(t),null}},async update(r,e){try{const t=await s.post(`/api/departments/${r}/update`,e);return a.error=null,t}catch(t){return n.setError(t),null}},async delete(r,e){try{return await s.delete(`/api/departments/${r}/delete`,{data:{_id:e}}),a.error=null,!0}catch(t){return n.setError(t),!1}}};l.watch(a,(r,e)=>{});exports.actions=d;exports.state=a;
@@ -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.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/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;
@@ -7,7 +7,7 @@ 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"),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.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/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;
@@ -8,7 +8,7 @@ import O from "../../../../components/Popup/Popup.vue2.js";
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";