@ozdao/prometheus-framework 0.2.186 → 0.2.188

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. package/dist/auth.server.js +35 -23
  2. package/dist/auth.server.mjs +35 -23
  3. package/dist/events.server.js +1 -1
  4. package/dist/events.server.mjs +1 -1
  5. package/dist/globals.server.js +1 -1
  6. package/dist/globals.server.mjs +1 -1
  7. package/dist/mailing-BQKyTI-q.js +77 -0
  8. package/dist/mailing-C3VD4l0h.mjs +78 -0
  9. package/dist/main-BVZtf9OG.js +92 -0
  10. package/dist/main-CbTw08vO.mjs +13584 -0
  11. package/dist/orders.server.js +162 -12
  12. package/dist/orders.server.mjs +162 -12
  13. package/dist/organizations.server.js +1 -1
  14. package/dist/organizations.server.mjs +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/auth.client.js +41 -22
  17. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -0
  18. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +41 -0
  19. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -0
  20. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +124 -0
  21. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -0
  22. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +94 -0
  23. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -0
  24. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +82 -0
  25. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -0
  26. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +118 -0
  27. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -0
  28. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +168 -0
  29. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -0
  30. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +129 -0
  31. package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +1 -0
  32. package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.js +88 -0
  33. package/dist/prometheus-framework/src/modules/auth/views/localization/EnterCode.json.cjs +1 -0
  34. package/dist/prometheus-framework/src/modules/auth/views/localization/EnterCode.json.js +20 -0
  35. package/dist/prometheus-framework/src/modules/auth/views/localization/EnterPassword.json.cjs +1 -0
  36. package/dist/prometheus-framework/src/modules/auth/views/localization/EnterPassword.json.js +26 -0
  37. package/dist/prometheus-framework/src/modules/auth/views/localization/ResetPassword.json.cjs +1 -0
  38. package/dist/prometheus-framework/src/modules/auth/views/localization/ResetPassword.json.js +30 -0
  39. package/dist/prometheus-framework/src/modules/auth/views/localization/SignIn.json.cjs +1 -0
  40. package/dist/prometheus-framework/src/modules/auth/views/localization/SignIn.json.js +38 -0
  41. package/dist/prometheus-framework/src/modules/auth/views/localization/SignUp.json.cjs +1 -0
  42. package/dist/prometheus-framework/src/modules/auth/views/localization/SignUp.json.js +32 -0
  43. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +30 -0
  45. package/dist/prometheus-framework/src/modules/auth/views/router/auth.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/auth/views/router/auth.js +119 -0
  47. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -0
  48. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +176 -0
  49. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -0
  50. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +31 -0
  51. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +1 -0
  52. package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +45 -0
  53. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
  61. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +3 -4
  65. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +10 -10
  69. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +12 -13
  83. package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/events/router/events.js +1 -1
  87. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/globals/globals.client.js +10 -6
  93. package/dist/prometheus-framework/src/modules/globals/localization/get-browser-locale.cjs +1 -0
  94. package/dist/prometheus-framework/src/modules/globals/localization/get-browser-locale.js +7 -0
  95. package/dist/prometheus-framework/src/modules/globals/mixins/mixins.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/globals/mixins/mixins.js +20 -16
  97. package/dist/prometheus-framework/src/modules/globals/router/routerGuards.cjs +1 -0
  98. package/dist/prometheus-framework/src/modules/globals/router/routerGuards.js +18 -0
  99. package/dist/prometheus-framework/src/modules/globals/router/scrollBehavior.cjs +1 -0
  100. package/dist/prometheus-framework/src/modules/globals/router/scrollBehavior.js +18 -0
  101. package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/globals/store/globals.js +38 -76
  103. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +5 -5
  105. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  107. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -3
  119. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  121. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -5
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
  125. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -4
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -3
  131. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/router/departments.router.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/router/departments.router.js +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  145. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -3
  157. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +2 -3
  159. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  161. package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs +1 -1
  162. package/dist/prometheus-framework/src/modules/products/router/categories.router.js +1 -1
  163. package/dist/prometheus-framework/src/modules/products/router/leftovers.router.cjs +1 -1
  164. package/dist/prometheus-framework/src/modules/products/router/leftovers.router.js +1 -1
  165. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +1 -1
  166. package/dist/prometheus-framework/src/modules/products/router/products.router.js +1 -1
  167. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  168. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -3
  169. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  171. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  172. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  173. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  175. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -4
  177. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  179. package/dist/prometheus-framework/src/modules/users/router/users.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/users/router/users.js +3 -4
  181. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/wallet/views/router/payments.router.cjs +1 -1
  184. package/dist/prometheus-framework/src/modules/wallet/views/router/payments.router.js +1 -1
  185. package/dist/prometheus-framework.cjs.js +1 -1
  186. package/dist/prometheus-framework.es.js +1 -1
  187. package/dist/style.css +1 -1
  188. package/dist/tickets.controller-BWVUA-GR.js +401 -0
  189. package/dist/tickets.controller-ChVmHHnj.mjs +402 -0
  190. package/dist/wallet.server.js +1 -1
  191. package/dist/wallet.server.mjs +1 -1
  192. package/dist/web-CK9TrlwB.js +1 -0
  193. package/dist/web-aOWHNbX1.mjs +54 -0
  194. package/package.json +1 -1
  195. package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -1
  196. package/src/components/Sidebar/Sidebar.vue +1 -1
  197. package/src/modules/auth/auth.client.js +53 -28
  198. package/src/modules/auth/auth.server.js +32 -14
  199. package/src/modules/auth/{routes → controllers/routes}/auth.routes.js +3 -3
  200. package/src/modules/auth/{routes → controllers/routes}/twofa.routes.js +2 -2
  201. package/src/modules/auth/controllers/{auth.controller.js → services/auth.service.js} +2 -3
  202. package/src/modules/auth/models/role.model.js +9 -8
  203. package/src/modules/auth/{components → views/components}/layouts/Auth.vue +3 -3
  204. package/src/modules/auth/{components → views/components}/pages/EnterCode.vue +3 -3
  205. package/src/modules/auth/{components → views/components}/pages/EnterPassword.vue +3 -3
  206. package/src/modules/auth/{components → views/components}/pages/Invite.vue +2 -2
  207. package/src/modules/auth/{components → views/components}/pages/ResetPassword.vue +4 -4
  208. package/src/modules/auth/{components → views/components}/pages/SignIn.vue +3 -3
  209. package/src/modules/auth/{components → views/components}/pages/SignUp.vue +4 -4
  210. package/src/modules/{middlewares/client → auth/views/middlewares}/auth.validation.js +20 -1
  211. package/src/modules/auth/views/router/auth.js +102 -0
  212. package/src/modules/{middlewares/client → auth/views/validations}/inputs.validation.js +3 -6
  213. package/src/modules/backoffice/components/layouts/Backoffice.vue +1 -1
  214. package/src/modules/backoffice/components/pages/Dashboard.vue +1 -1
  215. package/src/modules/backoffice/components/partials/Sidebar.vue +1 -1
  216. package/src/modules/backoffice/router/backoffice.js +1 -1
  217. package/src/modules/chats/routes/chats.routes.js +1 -1
  218. package/src/modules/community/components/layouts/Community.vue +1 -1
  219. package/src/modules/community/components/pages/Blog.vue +1 -1
  220. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  221. package/src/modules/community/components/pages/Community.vue +1 -1
  222. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
  223. package/src/modules/community/components/sections/HotPosts.vue +1 -1
  224. package/src/modules/community/routes/blog.routes.js +1 -1
  225. package/src/modules/events/components/elements/ButtonJoin.vue +1 -1
  226. package/src/modules/events/components/pages/EditEvent.vue +1 -1
  227. package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
  228. package/src/modules/events/components/pages/Event.vue +1 -1
  229. package/src/modules/events/components/pages/Events.vue +1 -1
  230. package/src/modules/events/components/sections/FeaturedEvents.vue +1 -1
  231. package/src/modules/events/router/events.js +1 -1
  232. package/src/modules/events/routes/events.routes.js +1 -1
  233. package/src/modules/files/routes/files.routes.js +1 -1
  234. package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
  235. package/src/modules/gallery/routes/gallery.routes.js +2 -2
  236. package/src/modules/globals/globals.client.js +6 -3
  237. package/src/modules/globals/router/routerGuards.js +1 -1
  238. package/src/modules/globals/router/scrollBehavior.js +30 -0
  239. package/src/modules/globals/store/globals.js +3 -3
  240. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  241. package/src/modules/legal/components/pages/Legal.vue +1 -1
  242. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  243. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
  244. package/src/modules/orders/components/pages/Orders.vue +1 -1
  245. package/src/modules/orders/components/sections/FormAddCustomer.vue +1 -1
  246. package/src/modules/orders/models/order.model.js +0 -1
  247. package/src/modules/orders/orders.server.js +3 -1
  248. package/src/modules/orders/routes/applications.routes.js +2 -1
  249. package/src/modules/orders/routes/orders.routes.js +1 -1
  250. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
  251. package/src/modules/organizations/components/pages/Members.vue +1 -1
  252. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  253. package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +1 -1
  254. package/src/modules/organizations/components/pages/OrganizationCreate.vue +1 -1
  255. package/src/modules/organizations/components/pages/OrganizationDetails.vue +2 -2
  256. package/src/modules/organizations/components/pages/OrganizationEdit.vue +1 -1
  257. package/src/modules/organizations/components/pages/Organizations.vue +1 -1
  258. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  259. package/src/modules/organizations/components/sections/Organizations.vue +1 -1
  260. package/src/modules/organizations/components/sections/Publics.vue +1 -1
  261. package/src/modules/organizations/router/backoffice.router.js +1 -1
  262. package/src/modules/organizations/router/departments.router.js +1 -1
  263. package/src/modules/organizations/router/members.router.js +1 -1
  264. package/src/modules/organizations/router/organizations.js +1 -1
  265. package/src/modules/organizations/routes/invites.routes.js +1 -1
  266. package/src/modules/organizations/store/invites.js +1 -1
  267. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  268. package/src/modules/pages/views/components/pages/Pages.vue +1 -1
  269. package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
  270. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  271. package/src/modules/products/components/pages/Product.vue +1 -1
  272. package/src/modules/products/components/pages/Products.vue +1 -1
  273. package/src/modules/products/router/categories.router.js +1 -1
  274. package/src/modules/products/router/leftovers.router.js +1 -1
  275. package/src/modules/products/router/products.router.js +1 -1
  276. package/src/modules/spots/router/spots.js +1 -1
  277. package/src/modules/users/components/pages/Profile.vue +1 -1
  278. package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
  279. package/src/modules/users/components/pages/ProfileEdit.vue +2 -2
  280. package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
  281. package/src/modules/users/router/users.js +1 -2
  282. package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
  283. package/src/modules/wallet/controllers/routes/rewards.routes.js +1 -1
  284. package/src/modules/wallet/views/router/payments.router.js +1 -2
  285. package/src/modules/auth/router/auth.js +0 -111
  286. package/src/modules/globals/localization/methods/get-app-locales.js +0 -13
  287. package/src/modules/globals/localization/vue-i18n.js +0 -38
  288. package/src/modules/globals/localization/vue-i18n.singleton.js +0 -11
  289. package/src/modules/middlewares/client/states.validation.js +0 -23
  290. package/src/modules/middlewares/middlewares.client.js +0 -11
  291. package/src/modules/middlewares/middlewares.server.js +0 -18
  292. package/src/modules/orders/routes/backcalls.routes.js +0 -36
  293. package/src/modules/orders/routes/fastorders.routes.js +0 -32
  294. /package/src/modules/auth/{middlewares → controllers/middlewares}/authJwt.js +0 -0
  295. /package/src/modules/auth/{middlewares → controllers/middlewares}/authSecret.js +0 -0
  296. /package/src/modules/auth/{middlewares → controllers/middlewares}/index.js +0 -0
  297. /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyAccesses.js +0 -0
  298. /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyInvites.js +0 -0
  299. /package/src/modules/auth/{middlewares → controllers/middlewares}/verifySignUp.js +0 -0
  300. /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyUser.js +0 -0
  301. /package/src/modules/auth/controllers/{twofa.controller.js → services/twofa.service.js} +0 -0
  302. /package/src/modules/auth/{utils/server → controllers/utils}/verifyAppleIdToken.js +0 -0
  303. /package/src/modules/auth/{components → views/components}/sections/SliderFeatures.vue +0 -0
  304. /package/src/modules/auth/{localization → views/localization}/EnterCode.json +0 -0
  305. /package/src/modules/auth/{localization → views/localization}/EnterPassword.json +0 -0
  306. /package/src/modules/auth/{localization → views/localization}/ResetPassword.json +0 -0
  307. /package/src/modules/auth/{localization → views/localization}/SignIn.json +0 -0
  308. /package/src/modules/auth/{localization → views/localization}/SignUp.json +0 -0
  309. /package/src/modules/auth/{store → views/store}/auth.js +0 -0
  310. /package/src/modules/auth/{store → views/store}/twofa.js +0 -0
  311. /package/src/modules/globals/localization/{methods/get-browser-locale.js → get-browser-locale.js} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function c(u,s,r,i){u.beforeEach((t,n,e)=>{const{authorize:l}=t.meta;if(l){if(s.auth.state.access.status===!1)return e({path:"/auth/signin",query:{returnUrl:t.path}});if(l.length&&!l.some(o=>s.auth.state.access.roles.includes(o)))return e({path:"/auth/signin"})}const a=t.params.locale;if(r.config.globalProperties.$i18n.locale!==a&&a&&Object.keys(i.global.availableLocales).includes(a))return r.config.globalProperties.$i18n.locale=a,e();e()})}exports.default=c;
@@ -0,0 +1,18 @@
1
+ function n(i, t, r, o) {
2
+ i.beforeEach((l, u, a) => {
3
+ const { authorize: s } = l.meta;
4
+ if (s) {
5
+ if (t.auth.state.access.status === !1)
6
+ return a({ path: "/auth/signin", query: { returnUrl: l.path } });
7
+ if (s.length && !s.some((c) => t.auth.state.access.roles.includes(c)))
8
+ return a({ path: "/auth/signin" });
9
+ }
10
+ const e = l.params.locale;
11
+ if (r.config.globalProperties.$i18n.locale !== e && e && Object.keys(o.global.availableLocales).includes(e))
12
+ return r.config.globalProperties.$i18n.locale = e, a();
13
+ a();
14
+ });
15
+ }
16
+ export {
17
+ n as default
18
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});async function n(o,c,l){if(o.hash){const e=async(t,r)=>document.querySelector(t)||new Promise((s,u)=>{if(r>50)return s();setTimeout(()=>{s(e(t,++r||1))},1e3)});if(o.hash){let t=await e(o.hash),r=await e("#screen");return"scrollBehavior"in document.documentElement.style?r.scrollTo({top:t.offsetTop,behavior:"smooth"}):r.scrollTo(0,t.offsetTop)}}else return o.matched.some(e=>e.meta.scrollTo)?{top:m.meta.scrollTo.top,left:m.meta.scrollTo.left}:l?{savedPosition:l}:{top:0}}exports.default=n;
@@ -0,0 +1,18 @@
1
+ async function a(o, n, l) {
2
+ if (o.hash) {
3
+ const e = async (t, r) => document.querySelector(t) || new Promise((s, c) => {
4
+ if (r > 50)
5
+ return s();
6
+ setTimeout(() => {
7
+ s(e(t, ++r || 1));
8
+ }, 1e3);
9
+ });
10
+ if (o.hash) {
11
+ let t = await e(o.hash), r = await e("#screen");
12
+ return "scrollBehavior" in document.documentElement.style ? r.scrollTo({ top: t.offsetTop, behavior: "smooth" }) : r.scrollTo(0, t.offsetTop);
13
+ }
14
+ } else return o.matched.some((e) => e.meta.scrollTo) ? { top: m.meta.scrollTo.top, left: m.meta.scrollTo.left } : l ? { savedPosition: l } : { top: 0 };
15
+ }
16
+ export {
17
+ a as default
18
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),d=require("../localization/vue-i18n.cjs"),n=l.reactive({loading:!1,isOpenLocationPopup:!1,isOpenSidebar:!1,position:null,search:null,theme:{darkmode:!1},error:{status:"",headers:"",data:"",show:"",name:"",message:""}}),E={setLoading(e){n.loading=e},toggleTheme(){let e=document.querySelector(":root");n.theme.darkmode=!n.theme.darkmode,e.classList.toggle("dark-theme");const o=["--white","--light","--grey","--dark","--black"];n.theme.originalColors||(n.theme.originalColors={},o.forEach(t=>{const s=getComputedStyle(document.documentElement).getPropertyValue(t).trim();n.theme.originalColors[t]=s})),R(o,n.theme.originalColors)},add(e,o){const t=e.findIndex(s=>s._id===o._id);t===-1?e.push(o):e[t]=o},update(e,o){const t=e.findIndex(s=>s._id===o._id);t===-1?e.push(o):Object.assign(e[t],o)},delete(e,o){const t=e.findIndex(s=>s._id===o._id);t!==-1&&e.splice(t,1)},increment(e,o){console.log(e),console.log(o);const t=e.find(s=>s._id===o._id);t&&t.quantity++},decrement(e,o){const t=e.find(i=>i._id===o._id),s=e.indexOf(t);s>-1&&(t.quantity--,t.quantity<1&&e.splice(s,1))},reset(e){}},_={ru:{errors:{USER_ALREADY_REGISTERED:"Такой пользователь уже зарегистрирован!",USER_NOT_REGISTERED_YET:"Такой пользователь еще не зарегистрирован!",USER_PHONE_OR_PASSWORD_NOT_FOUND:"Пользователь с таким телефоном или паролем не найден!",INCORRECT_PASSWORD_ENTERED:"Вы ввели неверный пароль!",INVALID_INVITATION_CODE:"Неверный код приглашения",MISSING_REQUIRED_PARAMETERS:"Отсутствуют необходимые параметры.",ERROR_UPDATING_USER:"Произошла ошибка при обновлении пользователя.",PASSWORDS_DO_NOT_MATCH:"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.",CODE_NOT_SENT:"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.",INPUT_ERROR:"Вставьте только четырехзначный код.",WRONG_CODE:"Вы ввели неверный код. Попробуйте еще раз.",POST_URL_ALREADY_IN_USE:"Ошибка! Публикация с этим URL уже используется!",NAME_CANNOT_BE_EMPTY:"Ошибка: Название не может быть пустым. Пожалуйста, введите название."}},en:{errors:{USER_ALREADY_REGISTERED:"Such user is already registered!",USER_NOT_REGISTERED_YET:"This user has not been registered yet!",USER_PHONE_OR_PASSWORD_NOT_FOUND:"User with such phone or password not found!",INCORRECT_PASSWORD_ENTERED:"You entered an incorrect password!",INVALID_INVITATION_CODE:"Incorrect invitation code.",MISSING_REQUIRED_PARAMETERS:"Missing required parameters.",ERROR_UPDATING_USER:"Something wrong when updating user.",PASSWORDS_DO_NOT_MATCH:"The passwords you entered do not match. Please correct the errors and try again.",CODE_NOT_SENT:"Something went wrong and the code was not sent. Please try again.",INPUT_ERROR:"Please enter only a four-digit code.",WRONG_CODE:"You entered an incorrect code. Please try again.",POST_URL_ALREADY_IN_USE:"Failed! Blogpost with this URL is already in use!",NAME_CANNOT_BE_EMPTY:"Error: Name cannot be empty. Please enter a name."}}};d.default.global.mergeLocaleMessage("ru",_.ru);d.default.global.mergeLocaleMessage("en",_.en);function c(e){var t;let o;o=e,(t=e==null?void 0:e.response)!=null&&t.data&&(o=e.response.data),e&&o.errorCode?n.error.message=d.default.global.t(`errors.${o.errorCode}`):n.error.message=o.message||"Unknown error",n.error.show=!0,setTimeout(()=>n.error.show=!1,3e3)}function R(e,o){e.forEach(t=>{const s=o[t],i=s.split(",").map(Number);let a;t==="--white"?a=i.map(r=>255-r/1.075):t==="--black"?a=i.map(r=>255-r):t==="--grey"?a=i.map(r=>255-r*2):a=i.map(r=>255-r/1.075),document.documentElement.style.setProperty(t,n.theme.darkmode?a.join(", "):s)})}exports.actions=E;exports.setError=c;exports.state=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),n=l.reactive({loading:!1,isOpenLocationPopup:!1,isOpenSidebar:!1,position:null,search:null,theme:{darkmode:!1},error:{status:"",headers:"",data:"",show:"",name:"",message:""}}),a={setLoading(e){n.loading=e},toggleTheme(){let e=document.querySelector(":root");n.theme.darkmode=!n.theme.darkmode,e.classList.toggle("dark-theme");const o=["--white","--light","--grey","--dark","--black"];n.theme.originalColors||(n.theme.originalColors={},o.forEach(t=>{const s=getComputedStyle(document.documentElement).getPropertyValue(t).trim();n.theme.originalColors[t]=s})),m(o,n.theme.originalColors)},add(e,o){const t=e.findIndex(s=>s._id===o._id);t===-1?e.push(o):e[t]=o},update(e,o){const t=e.findIndex(s=>s._id===o._id);t===-1?e.push(o):Object.assign(e[t],o)},delete(e,o){const t=e.findIndex(s=>s._id===o._id);t!==-1&&e.splice(t,1)},increment(e,o){console.log(e),console.log(o);const t=e.find(s=>s._id===o._id);t&&t.quantity++},decrement(e,o){const t=e.find(r=>r._id===o._id),s=e.indexOf(t);s>-1&&(t.quantity--,t.quantity<1&&e.splice(s,1))},reset(e){}};function c(e){var t;let o;o=e,(t=e==null?void 0:e.response)!=null&&t.data&&(o=e.response.data),e&&o.errorCode?n.error.message=i18n.global.t(`errors.${o.errorCode}`):n.error.message=o.message||"Unknown error",n.error.show=!0,setTimeout(()=>n.error.show=!1,3e3)}function m(e,o){e.forEach(t=>{const s=o[t],r=s.split(",").map(Number);let d;t==="--white"?d=r.map(i=>255-i/1.075):t==="--black"?d=r.map(i=>255-i):t==="--grey"?d=r.map(i=>255-i*2):d=r.map(i=>255-i/1.075),document.documentElement.style.setProperty(t,n.theme.darkmode?d.join(", "):s)})}exports.actions=a;exports.setError=c;exports.state=n;
@@ -1,6 +1,5 @@
1
- import { reactive as E } from "vue";
2
- import d from "../localization/vue-i18n.js";
3
- const n = E({
1
+ import { reactive as l } from "vue";
2
+ const n = l({
4
3
  loading: !1,
5
4
  isOpenLocationPopup: !1,
6
5
  isOpenSidebar: !1,
@@ -17,7 +16,7 @@ const n = E({
17
16
  name: "",
18
17
  message: ""
19
18
  }
20
- }), g = {
19
+ }), m = {
21
20
  setLoading(e) {
22
21
  n.loading = e;
23
22
  },
@@ -25,97 +24,60 @@ const n = E({
25
24
  toggleTheme() {
26
25
  let e = document.querySelector(":root");
27
26
  n.theme.darkmode = !n.theme.darkmode, e.classList.toggle("dark-theme");
28
- const t = [
27
+ const o = [
29
28
  "--white",
30
29
  "--light",
31
30
  "--grey",
32
31
  "--dark",
33
32
  "--black"
34
33
  ];
35
- n.theme.originalColors || (n.theme.originalColors = {}, t.forEach((o) => {
36
- const s = getComputedStyle(document.documentElement).getPropertyValue(o).trim();
37
- n.theme.originalColors[o] = s;
38
- })), l(t, n.theme.originalColors);
34
+ n.theme.originalColors || (n.theme.originalColors = {}, o.forEach((t) => {
35
+ const s = getComputedStyle(document.documentElement).getPropertyValue(t).trim();
36
+ n.theme.originalColors[t] = s;
37
+ })), a(o, n.theme.originalColors);
39
38
  },
40
- add(e, t) {
41
- const o = e.findIndex((s) => s._id === t._id);
42
- o === -1 ? e.push(t) : e[o] = t;
39
+ add(e, o) {
40
+ const t = e.findIndex((s) => s._id === o._id);
41
+ t === -1 ? e.push(o) : e[t] = o;
43
42
  },
44
- update(e, t) {
45
- const o = e.findIndex((s) => s._id === t._id);
46
- o === -1 ? e.push(t) : Object.assign(e[o], t);
43
+ update(e, o) {
44
+ const t = e.findIndex((s) => s._id === o._id);
45
+ t === -1 ? e.push(o) : Object.assign(e[t], o);
47
46
  },
48
- delete(e, t) {
49
- const o = e.findIndex((s) => s._id === t._id);
50
- o !== -1 && e.splice(o, 1);
47
+ delete(e, o) {
48
+ const t = e.findIndex((s) => s._id === o._id);
49
+ t !== -1 && e.splice(t, 1);
51
50
  },
52
- increment(e, t) {
53
- console.log(e), console.log(t);
54
- const o = e.find(
55
- (s) => s._id === t._id
51
+ increment(e, o) {
52
+ console.log(e), console.log(o);
53
+ const t = e.find(
54
+ (s) => s._id === o._id
56
55
  );
57
- o && o.quantity++;
56
+ t && t.quantity++;
58
57
  },
59
- decrement(e, t) {
60
- const o = e.find(
61
- (i) => i._id === t._id
62
- ), s = e.indexOf(o);
63
- s > -1 && (o.quantity--, o.quantity < 1 && e.splice(s, 1));
58
+ decrement(e, o) {
59
+ const t = e.find(
60
+ (d) => d._id === o._id
61
+ ), s = e.indexOf(t);
62
+ s > -1 && (t.quantity--, t.quantity < 1 && e.splice(s, 1));
64
63
  },
65
64
  reset(e) {
66
65
  }
67
- }, _ = {
68
- ru: {
69
- errors: {
70
- USER_ALREADY_REGISTERED: "Такой пользователь уже зарегистрирован!",
71
- USER_NOT_REGISTERED_YET: "Такой пользователь еще не зарегистрирован!",
72
- USER_PHONE_OR_PASSWORD_NOT_FOUND: "Пользователь с таким телефоном или паролем не найден!",
73
- INCORRECT_PASSWORD_ENTERED: "Вы ввели неверный пароль!",
74
- INVALID_INVITATION_CODE: "Неверный код приглашения",
75
- MISSING_REQUIRED_PARAMETERS: "Отсутствуют необходимые параметры.",
76
- ERROR_UPDATING_USER: "Произошла ошибка при обновлении пользователя.",
77
- PASSWORDS_DO_NOT_MATCH: "Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.",
78
- CODE_NOT_SENT: "Что-то пошло не так и код не был отправлен. Попробуйте еще раз.",
79
- INPUT_ERROR: "Вставьте только четырехзначный код.",
80
- WRONG_CODE: "Вы ввели неверный код. Попробуйте еще раз.",
81
- POST_URL_ALREADY_IN_USE: "Ошибка! Публикация с этим URL уже используется!",
82
- NAME_CANNOT_BE_EMPTY: "Ошибка: Название не может быть пустым. Пожалуйста, введите название."
83
- }
84
- },
85
- en: {
86
- errors: {
87
- USER_ALREADY_REGISTERED: "Such user is already registered!",
88
- USER_NOT_REGISTERED_YET: "This user has not been registered yet!",
89
- USER_PHONE_OR_PASSWORD_NOT_FOUND: "User with such phone or password not found!",
90
- INCORRECT_PASSWORD_ENTERED: "You entered an incorrect password!",
91
- INVALID_INVITATION_CODE: "Incorrect invitation code.",
92
- MISSING_REQUIRED_PARAMETERS: "Missing required parameters.",
93
- ERROR_UPDATING_USER: "Something wrong when updating user.",
94
- PASSWORDS_DO_NOT_MATCH: "The passwords you entered do not match. Please correct the errors and try again.",
95
- CODE_NOT_SENT: "Something went wrong and the code was not sent. Please try again.",
96
- INPUT_ERROR: "Please enter only a four-digit code.",
97
- WRONG_CODE: "You entered an incorrect code. Please try again.",
98
- POST_URL_ALREADY_IN_USE: "Failed! Blogpost with this URL is already in use!",
99
- NAME_CANNOT_BE_EMPTY: "Error: Name cannot be empty. Please enter a name."
100
- }
101
- }
102
66
  };
103
- d.global.mergeLocaleMessage("ru", _.ru);
104
- d.global.mergeLocaleMessage("en", _.en);
105
- function m(e) {
106
- var o;
107
- let t;
108
- t = e, (o = e == null ? void 0 : e.response) != null && o.data && (t = e.response.data), e && t.errorCode ? n.error.message = d.global.t(`errors.${t.errorCode}`) : n.error.message = t.message || "Unknown error", n.error.show = !0, setTimeout(() => n.error.show = !1, 3e3);
67
+ function f(e) {
68
+ var t;
69
+ let o;
70
+ o = e, (t = e == null ? void 0 : e.response) != null && t.data && (o = e.response.data), e && o.errorCode ? n.error.message = i18n.global.t(`errors.${o.errorCode}`) : n.error.message = o.message || "Unknown error", n.error.show = !0, setTimeout(() => n.error.show = !1, 3e3);
109
71
  }
110
- function l(e, t) {
111
- e.forEach((o) => {
112
- const s = t[o], i = s.split(",").map(Number);
113
- let a;
114
- o === "--white" ? a = i.map((r) => 255 - r / 1.075) : o === "--black" ? a = i.map((r) => 255 - r) : o === "--grey" ? a = i.map((r) => 255 - r * 2) : a = i.map((r) => 255 - r / 1.075), document.documentElement.style.setProperty(o, n.theme.darkmode ? a.join(", ") : s);
72
+ function a(e, o) {
73
+ e.forEach((t) => {
74
+ const s = o[t], d = s.split(",").map(Number);
75
+ let r;
76
+ t === "--white" ? r = d.map((i) => 255 - i / 1.075) : t === "--black" ? r = d.map((i) => 255 - i) : t === "--grey" ? r = d.map((i) => 255 - i * 2) : r = d.map((i) => 255 - i / 1.075), document.documentElement.style.setProperty(t, n.theme.darkmode ? r.join(", ") : s);
115
77
  });
116
78
  }
117
79
  export {
118
- g as actions,
119
- m as setError,
80
+ m as actions,
81
+ f as setError,
120
82
  n as state
121
83
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-i18n"),p=require("../../localization/SubscribeNewsletter.json.cjs"),b=require("../../../../components/FieldBig/FieldBig.vue.cjs"),l=require("../../../globals/store/globals.cjs"),m=require("../../../orders/store/applications.cjs"),n=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),v=r=>(e.pushScopeId("data-v-9d8f6473"),r=r(),e.popScopeId(),r),g={class:"pd-thin"},f={class:"pos-relative o-hidden t-black bg-main pd-big radius-big"},h={class:"pos-relative z-index-1"},w={class:"t-center z-index-1 mn-b-big"},N={class:"mn-l-auto mn-r-auto mn-b-medium"},S={class:"t-transp p-big"},E={class:"z-index-1 w-100 flex-nowrap flex"},y=v(()=>e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-b-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1)),V={__name:"SubscribeNewsletter",setup(r){const{t:a}=u.useI18n({useScope:"global",...p.default});let s=e.ref(""),c=e.ref(!1);async function d(){try{await n.validateInputs(c,n.validateEmail,s.value,"Wrong email")}catch{return l.setError({response:{status:"Invalid Email",data:{message:"The email address entered is invalid. Please provide a valid email address."}}}),!1}gtag("event","subscribe_newsletter",{event_category:"conversion",event_label:"Subscribe Newsletter"});try{let t={type:"newsletter",contacts:{email:s.value}};const i=await m.create(t);return Promise.resolve(i.data)}catch(t){return console.log(t),l.setError(t),Promise.reject(t)}}return(t,i)=>(e.openBlock(),e.createElementBlock("section",g,[e.createElementVNode("div",f,[e.createElementVNode("div",h,[e.createElementVNode("header",w,[e.createElementVNode("h2",N,e.toDisplayString(e.unref(a)("SubscribeNewsletter.title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(a)("SubscribeNewsletter.subtitle")),1)]),e.createElementVNode("div",E,[e.createVNode(b.default,{input:e.unref(s),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:e.unref(a)("SubscribeNewsletter.placeholder"),action:e.unref(a)("SubscribeNewsletter.action"),"onUpdate:input":i[0]||(i[0]=o=>e.isRef(s)?s.value=o:s=o),onAction:d,class:"mn-l-auto mn-r-auto bg-white t-black w-100 w-max-30r"},null,8,["input","placeholder","action"])])]),y])]))}},q=_.default(V,[["__scopeId","data-v-9d8f6473"]]);exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-i18n"),p=require("../../localization/SubscribeNewsletter.json.cjs"),b=require("../../../../components/FieldBig/FieldBig.vue.cjs"),l=require("../../../globals/store/globals.cjs"),m=require("../../../orders/store/applications.cjs"),n=require("../../../auth/views/validations/inputs.validation.cjs");;/* empty css */const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),v=r=>(e.pushScopeId("data-v-e66544d0"),r=r(),e.popScopeId(),r),g={class:"pd-thin"},f={class:"pos-relative o-hidden t-black bg-main pd-big radius-big"},h={class:"pos-relative z-index-1"},w={class:"t-center z-index-1 mn-b-big"},N={class:"mn-l-auto mn-r-auto mn-b-medium"},S={class:"t-transp p-big"},E={class:"z-index-1 w-100 flex-nowrap flex"},y=v(()=>e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-b-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1)),V={__name:"SubscribeNewsletter",setup(r){const{t:a}=u.useI18n({useScope:"global",...p.default});let s=e.ref(""),c=e.ref(!1);async function d(){try{await n.validateInputs(c,n.validateEmail,s.value,"Wrong email")}catch{return l.setError({response:{status:"Invalid Email",data:{message:"The email address entered is invalid. Please provide a valid email address."}}}),!1}gtag("event","subscribe_newsletter",{event_category:"conversion",event_label:"Subscribe Newsletter"});try{let t={type:"newsletter",contacts:{email:s.value}};const i=await m.create(t);return Promise.resolve(i.data)}catch(t){return console.log(t),l.setError(t),Promise.reject(t)}}return(t,i)=>(e.openBlock(),e.createElementBlock("section",g,[e.createElementVNode("div",f,[e.createElementVNode("div",h,[e.createElementVNode("header",w,[e.createElementVNode("h2",N,e.toDisplayString(e.unref(a)("SubscribeNewsletter.title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(a)("SubscribeNewsletter.subtitle")),1)]),e.createElementVNode("div",E,[e.createVNode(b.default,{input:e.unref(s),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:e.unref(a)("SubscribeNewsletter.placeholder"),action:e.unref(a)("SubscribeNewsletter.action"),"onUpdate:input":i[0]||(i[0]=o=>e.isRef(s)?s.value=o:s=o),onAction:d,class:"mn-l-auto mn-r-auto bg-white t-black w-100 w-max-30r"},null,8,["input","placeholder","action"])])]),y])]))}},q=_.default(V,[["__scopeId","data-v-e66544d0"]]);exports.default=q;
@@ -1,13 +1,13 @@
1
- import { ref as n, openBlock as u, createElementBlock as b, createElementVNode as e, toDisplayString as c, unref as o, createVNode as _, isRef as f, pushScopeId as v, popScopeId as h } from "vue";
1
+ import { ref as n, openBlock as u, createElementBlock as b, createElementVNode as e, toDisplayString as c, unref as o, createVNode as _, isRef as v, pushScopeId as f, popScopeId as h } from "vue";
2
2
  import { useI18n as g } from "vue-i18n";
3
3
  import w from "../../localization/SubscribeNewsletter.json.js";
4
4
  import S from "../../../../components/FieldBig/FieldBig.vue.js";
5
5
  import { setError as p } from "../../../globals/store/globals.js";
6
6
  import { create as x } from "../../../orders/store/applications.js";
7
- import { validateInputs as y, validateEmail as N } from "../../../middlewares/client/inputs.validation.js";
7
+ import { validateInputs as y, validateEmail as N } from "../../../auth/views/validations/inputs.validation.js";
8
8
  /* empty css */
9
9
  import I from "../../../../../../_virtual/_plugin-vue_export-helper.js";
10
- const E = (a) => (v("data-v-9d8f6473"), a = a(), h(), a), k = { class: "pd-thin" }, z = { class: "pos-relative o-hidden t-black bg-main pd-big radius-big" }, P = { class: "pos-relative z-index-1" }, T = { class: "t-center z-index-1 mn-b-big" }, V = { class: "mn-l-auto mn-r-auto mn-b-medium" }, A = { class: "t-transp p-big" }, B = { class: "z-index-1 w-100 flex-nowrap flex" }, j = /* @__PURE__ */ E(() => /* @__PURE__ */ e("div", { class: "w-100 h-100 pos-absolute pos-b-50-negative pos-r-0 z-index-0 grid" }, [
10
+ const E = (a) => (f("data-v-e66544d0"), a = a(), h(), a), k = { class: "pd-thin" }, z = { class: "pos-relative o-hidden t-black bg-main pd-big radius-big" }, P = { class: "pos-relative z-index-1" }, T = { class: "t-center z-index-1 mn-b-big" }, V = { class: "mn-l-auto mn-r-auto mn-b-medium" }, A = { class: "t-transp p-big" }, B = { class: "z-index-1 w-100 flex-nowrap flex" }, j = /* @__PURE__ */ E(() => /* @__PURE__ */ e("div", { class: "w-100 h-100 pos-absolute pos-b-50-negative pos-r-0 z-index-0 grid" }, [
11
11
  /* @__PURE__ */ e("div", { class: "spiral" })
12
12
  ], -1)), D = {
13
13
  __name: "SubscribeNewsletter",
@@ -67,7 +67,7 @@ const E = (a) => (v("data-v-9d8f6473"), a = a(), h(), a), k = { class: "pd-thin"
67
67
  enableTyping: !1,
68
68
  placeholder: o(i)("SubscribeNewsletter.placeholder"),
69
69
  action: o(i)("SubscribeNewsletter.action"),
70
- "onUpdate:input": r[0] || (r[0] = (l) => f(s) ? s.value = l : s = l),
70
+ "onUpdate:input": r[0] || (r[0] = (l) => v(s) ? s.value = l : s = l),
71
71
  onAction: m,
72
72
  class: "mn-l-auto mn-r-auto bg-white t-black w-100 w-max-30r"
73
73
  }, null, 8, ["input", "placeholder", "action"])
@@ -77,7 +77,7 @@ const E = (a) => (v("data-v-9d8f6473"), a = a(), h(), a), k = { class: "pd-thin"
77
77
  ])
78
78
  ]));
79
79
  }
80
- }, K = /* @__PURE__ */ I(D, [["__scopeId", "data-v-9d8f6473"]]);
80
+ }, K = /* @__PURE__ */ I(D, [["__scopeId", "data-v-e66544d0"]]);
81
81
  export {
82
82
  K as default
83
83
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */const a=require("../../../../components/Menu/Menu.vue2.cjs"),r=require("../../../../components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-light radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */const a=require("../../../../components/Menu/Menu.vue.cjs"),r=require("../../../../components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/views/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-light radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
@@ -2,10 +2,10 @@ import { ref as l, openBlock as m, createElementBlock as u, createVNode as t, wi
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
5
- import p from "../../../../components/Menu/Menu.vue2.js";
5
+ import p from "../../../../components/Menu/Menu.vue.js";
6
6
  import n from "../../../../components/Menu/MenuItem.vue.js";
7
7
  import { useRoute as d, useRouter as h } from "vue-router";
8
- import "../../../auth/store/auth.js";
8
+ import "../../../auth/views/store/auth.js";
9
9
  import "./Legal.vue2.js";
10
10
  const f = { class: "for-transition w-100 pd-medium" }, _ = /* @__PURE__ */ c('<div class="bg-light radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>', 1), b = /* @__PURE__ */ a("span", null, "Terms of Use", -1), k = /* @__PURE__ */ a("span", null, "Privacy Policy", -1), v = /* @__PURE__ */ a("span", null, "Cookie Policy", -1), y = /* @__PURE__ */ a("span", null, "EULA", -1), R = {
11
11
  __name: "Legal",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../blocks/CardOrderItem.vue.cjs"),N=require("../sections/AskToLogin.vue.cjs"),q=require("../sections/Succes.vue.cjs"),E=require("../sections/EmptyState.vue.cjs"),S=require("../sections/FormCustomerDetails.vue.cjs"),w=require("../sections/FormDelivery.vue.cjs"),P=require("../sections/FormPayment.vue.cjs"),g=require("vue-router"),D=require("../../../globals/store/globals.cjs"),i=require("../../../auth/store/auth.cjs"),s=require("../../store/shopcart.cjs"),y=require("../../../organizations/store/organizations.cjs"),t=require("../../store/orders.cjs"),O=require("../../../users/store/users.cjs");;/* empty css */const T={class:"pd-thin"},M={class:"gap-small mn-b-thin cols-2"},z={key:2,class:"order-form col"},F={key:3,class:"bg-light pd-medium radius-big"},I=e.createElementVNode("h4",{class:"font-second mn-b-thin"},"Your Order",-1),R={class:"flex gap-thin flex-wrap mn-b-thin"},A={class:"bg-main pd-thin radius-medium mn-b-thin"},L={class:"pd-small br-b br-solid br-black-transp-10"},Q={class:"pd-small br-b br-solid br-black-transp-10"},U={class:"pd-small h3"},j=["disabled"],Y=e.createElementVNode("p",{class:"mn-b-thin"},[e.createTextVNode(" I agree that placing the order places me under an obligation to make a payment in accordance with "),e.createElementVNode("a",{class:"t-semi font-second t-second",href:"/legal/terms-of-use",target:"_blank"},"Terms of Use.")],-1),$=e.createElementVNode("p",null,null,-1),x={__name:"OrderCreate",setup(G){g.useRoute();const v=g.useRouter(),d=e.computed(()=>t.state.current);e.computed(()=>O.state.current);const c=e.computed(()=>s.getters.cartTotalPrice),l=e.computed(()=>{var r;if(t.state.current.delivery.type==="pickup")return 0;if(t.state.current.delivery.type==="mail")return 350;if(t.state.current.delivery.type==="courier"){const o=((r=u.value[0])==null?void 0:r.distance)||0;return Math.trunc(100+20*o-7.5*(o/10))}return 0});e.computed(()=>l.value+c.value.value);const u=e.ref({});e.onMounted(async()=>{var r;u.value=await y.actions.read({_id:s.state.organization,location:(r=D.state.position)==null?void 0:r.location})}),e.watch(()=>t.state.current.delivery.address,async(r,o)=>{u.value=await y.actions.read({_id:s.state.organization,location:t.state.current.delivery.location})},{deep:!0});const _=e.computed(()=>{var r;return((r=t.state.current.customer.name)==null?void 0:r.length)<2}),k=e.computed(()=>{var a,m,p,h;const r=(a=t.state.current.customer.messenger)==null?void 0:a.type,o=((p=(m=t.state.current.customer.messenger)==null?void 0:m.value)==null?void 0:p.length)>2;return!(((h=t.state.current.customer.number)==null?void 0:h.length)>0)&&!(r&&o)}),f=e.computed(()=>t.state.current.delivery.type!=="Pickup"&&t.state.current.delivery.address<2),b=e.computed(()=>!t.state.current.delivery.type),V=e.computed(()=>!t.state.current.payment.type);async function B(){t.state.current.status="created",t.state.current.owner={target:s.state.organization,type:"organization"},i.state.user._id&&(t.state.current.creator={target:i.state.user._id,type:"User"}),t.state.current.positions=s.state.positions;const r=localStorage.getItem("referalCode");r&&(t.state.current.referralCode=r);let o=await t.actions.create(t.state.current);o?(s.actions.resetShopcart(),v.push({name:"Order Status",params:{order:o._id}})):alert("something wrong")}return(r,o)=>(e.openBlock(),e.createElementBlock("section",T,[i.state.access.status===!1?(e.openBlock(),e.createBlock(N.default,{key:0,class:"mn-b-thin"})):e.createCommentVNode("",!0),e.createElementVNode("div",M,[s.state.positions<1?(e.openBlock(),e.createBlock(E.default,{key:0})):e.createCommentVNode("",!0),d.value.status===!0&&s.state.positions.length>0?(e.openBlock(),e.createBlock(q.default,{key:1,order:d.value},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(S.default,{customer:t.state.current.customer},null,8,["customer"]),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createBlock(w.default,{key:0,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createBlock(P.default,{key:1,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),s.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",F,[I,e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.state.positions,n=>(e.openBlock(),e.createBlock(C.default,{key:n._id,editable:!0,product:n,increase:a=>s.actions.incrementItemQuantity(a._id),decrease:a=>s.actions.decrementItemQuantity(a._id),remove:a=>s.actions.removeProduct(a._id),class:"w-100 bg-white pd-small radius-medium"},null,8,["product","increase","decrease","remove"]))),128))]),e.createElementVNode("div",A,[e.createElementVNode("p",L," Subtotal: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(c.value),1),e.createElementVNode("p",Q," Delivery: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(l.value),1),e.createElementVNode("p",U," Total: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(l.value+c.value.value),1)]),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:_.value||k.value||r.errorCity||f.value||b.value||V.value,onClick:o[0]||(o[0]=n=>B()),class:"bg-main mn-b-small pd-small radius-big w-100 button"}," Place an Order ",8,j)):e.createCommentVNode("",!0),Y,$])):e.createCommentVNode("",!0)])]))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../blocks/CardOrderItem.vue.cjs"),N=require("../sections/AskToLogin.vue.cjs"),q=require("../sections/Succes.vue.cjs"),E=require("../sections/EmptyState.vue.cjs"),S=require("../sections/FormCustomerDetails.vue.cjs"),w=require("../sections/FormDelivery.vue.cjs"),P=require("../sections/FormPayment.vue.cjs"),g=require("vue-router"),D=require("../../../globals/store/globals.cjs"),i=require("../../../auth/views/store/auth.cjs"),s=require("../../store/shopcart.cjs"),y=require("../../../organizations/store/organizations.cjs"),t=require("../../store/orders.cjs"),O=require("../../../users/store/users.cjs");;/* empty css */const T={class:"pd-thin"},M={class:"gap-small mn-b-thin cols-2"},z={key:2,class:"order-form col"},F={key:3,class:"bg-light pd-medium radius-big"},I=e.createElementVNode("h4",{class:"font-second mn-b-thin"},"Your Order",-1),R={class:"flex gap-thin flex-wrap mn-b-thin"},A={class:"bg-main pd-thin radius-medium mn-b-thin"},L={class:"pd-small br-b br-solid br-black-transp-10"},Q={class:"pd-small br-b br-solid br-black-transp-10"},U={class:"pd-small h3"},j=["disabled"],Y=e.createElementVNode("p",{class:"mn-b-thin"},[e.createTextVNode(" I agree that placing the order places me under an obligation to make a payment in accordance with "),e.createElementVNode("a",{class:"t-semi font-second t-second",href:"/legal/terms-of-use",target:"_blank"},"Terms of Use.")],-1),$=e.createElementVNode("p",null,null,-1),x={__name:"OrderCreate",setup(G){g.useRoute();const v=g.useRouter(),d=e.computed(()=>t.state.current);e.computed(()=>O.state.current);const c=e.computed(()=>s.getters.cartTotalPrice),l=e.computed(()=>{var r;if(t.state.current.delivery.type==="pickup")return 0;if(t.state.current.delivery.type==="mail")return 350;if(t.state.current.delivery.type==="courier"){const o=((r=u.value[0])==null?void 0:r.distance)||0;return Math.trunc(100+20*o-7.5*(o/10))}return 0});e.computed(()=>l.value+c.value.value);const u=e.ref({});e.onMounted(async()=>{var r;u.value=await y.actions.read({_id:s.state.organization,location:(r=D.state.position)==null?void 0:r.location})}),e.watch(()=>t.state.current.delivery.address,async(r,o)=>{u.value=await y.actions.read({_id:s.state.organization,location:t.state.current.delivery.location})},{deep:!0});const _=e.computed(()=>{var r;return((r=t.state.current.customer.name)==null?void 0:r.length)<2}),k=e.computed(()=>{var a,m,p,h;const r=(a=t.state.current.customer.messenger)==null?void 0:a.type,o=((p=(m=t.state.current.customer.messenger)==null?void 0:m.value)==null?void 0:p.length)>2;return!(((h=t.state.current.customer.number)==null?void 0:h.length)>0)&&!(r&&o)}),f=e.computed(()=>t.state.current.delivery.type!=="Pickup"&&t.state.current.delivery.address<2),b=e.computed(()=>!t.state.current.delivery.type),V=e.computed(()=>!t.state.current.payment.type);async function B(){t.state.current.status="created",t.state.current.owner={target:s.state.organization,type:"organization"},i.state.user._id&&(t.state.current.creator={target:i.state.user._id,type:"User"}),t.state.current.positions=s.state.positions;const r=localStorage.getItem("referalCode");r&&(t.state.current.referralCode=r);let o=await t.actions.create(t.state.current);o?(s.actions.resetShopcart(),v.push({name:"Order Status",params:{order:o._id}})):alert("something wrong")}return(r,o)=>(e.openBlock(),e.createElementBlock("section",T,[i.state.access.status===!1?(e.openBlock(),e.createBlock(N.default,{key:0,class:"mn-b-thin"})):e.createCommentVNode("",!0),e.createElementVNode("div",M,[s.state.positions<1?(e.openBlock(),e.createBlock(E.default,{key:0})):e.createCommentVNode("",!0),d.value.status===!0&&s.state.positions.length>0?(e.openBlock(),e.createBlock(q.default,{key:1,order:d.value},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(S.default,{customer:t.state.current.customer},null,8,["customer"]),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createBlock(w.default,{key:0,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createBlock(P.default,{key:1,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),s.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",F,[I,e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.state.positions,n=>(e.openBlock(),e.createBlock(C.default,{key:n._id,editable:!0,product:n,increase:a=>s.actions.incrementItemQuantity(a._id),decrease:a=>s.actions.decrementItemQuantity(a._id),remove:a=>s.actions.removeProduct(a._id),class:"w-100 bg-white pd-small radius-medium"},null,8,["product","increase","decrease","remove"]))),128))]),e.createElementVNode("div",A,[e.createElementVNode("p",L," Subtotal: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(c.value),1),e.createElementVNode("p",Q," Delivery: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(l.value),1),e.createElementVNode("p",U," Total: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(l.value+c.value.value),1)]),t.state.current.status!==!0&&s.state.positions.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:_.value||k.value||r.errorCity||f.value||b.value||V.value,onClick:o[0]||(o[0]=n=>B()),class:"bg-main mn-b-small pd-small radius-big w-100 button"}," Place an Order ",8,j)):e.createCommentVNode("",!0),Y,$])):e.createCommentVNode("",!0)])]))}};exports.default=x;
@@ -8,7 +8,7 @@ import A from "../sections/FormDelivery.vue.js";
8
8
  import L from "../sections/FormPayment.vue.js";
9
9
  import { useRoute as Y, useRouter as j } from "vue-router";
10
10
  import { state as q } from "../../../globals/store/globals.js";
11
- import { state as y } from "../../../auth/store/auth.js";
11
+ import { state as y } from "../../../auth/views/store/auth.js";
12
12
  import { getters as G, state as t, actions as p } from "../../store/shopcart.js";
13
13
  import { actions as $ } from "../../../organizations/store/organizations.js";
14
14
  import { state as e, actions as H } from "../../store/orders.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css */;/* empty css */const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),l=require("../../../globals/store/globals.cjs"),F=require("../../../auth/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");;/* empty css */const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=f.useRoute(),g=f.useRouter();t.mutations.resetOrder(t.state.current);let v=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function y(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){g.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-light mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let h={...o};h.quantity=1,l.actions.add(t.state.current.positions,h),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>y()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-light h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router");;/* empty css */const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");;/* empty css */;/* empty css */const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),l=require("../../../globals/store/globals.cjs"),F=require("../../../auth/views/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");;/* empty css */const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=f.useRoute(),g=f.useRouter();t.mutations.resetOrder(t.state.current);let v=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function y(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){g.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-light mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let h={...o};h.quantity=1,l.actions.add(t.state.current.positions,h),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>y()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-light h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
@@ -14,7 +14,7 @@ import H from "../sections/FormAddCustomer.vue.js";
14
14
  import J from "../sections/FormDelivery.vue.js";
15
15
  import K from "../sections/FormPayment.vue.js";
16
16
  import { actions as _ } from "../../../globals/store/globals.js";
17
- import { state as Q } from "../../../auth/store/auth.js";
17
+ import { state as Q } from "../../../auth/views/store/auth.js";
18
18
  import { mutations as D, state as e, actions as W } from "../../store/orders.js";
19
19
  import { actions as X } from "../../../products/store/products.js";
20
20
  import Y from "../../store/customers.store.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-router");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */;/* empty css */const f=require("../../../../components/Block/Block.vue.cjs"),d=require("../../store/orders.cjs"),y=require("../../../auth/store/auth.cjs");;/* empty css */const N=require("../../../globals/components/blocks/CardHeader.vue.cjs"),b=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),E=require("../../../icons/entities/IconTime.vue.cjs"),k={class:"pd-thin"},w={class:"gap-micro flex-nowrap flex"},S={class:"w-100 bg-white radius-small pd-small"},D=e.createElementVNode("p",{class:"mn-b-thin"},"Total",-1),B={class:"w-100 bg-white radius-small pd-small"},x=e.createElementVNode("p",{class:"mn-b-thin"},"Paid",-1),C={class:"w-100 bg-white radius-small pd-small"},q=e.createElementVNode("p",{class:"mn-b-thin"},"Unpaid",-1),P={class:"mn-b-small pd-small bg-white radius-small flex-nowrap flex"},T={class:"w-100"},O={class:"mn-b-thin"},F={class:"t-truncate"},A={class:"w-100 t-right"},M={class:"mn-b-thin"},U={class:"cols-1 mn-b-small gap-thin pd-small bg-white radius-small"},L={class:"mn-r-auto"},R={class:"t-right"},z={class:"t-transp"},H={key:0},I={class:"mn-r-auto"},$={class:"t-right"},j={class:"t-transp"},G={class:"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex"},J={class:"t-medium mn-r-auto"},K={class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},Q=e.createElementVNode("span",{class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin t-white bg-red"}," Unpaid ",-1),W={key:0,class:"pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"},X=e.createElementVNode("p",{class:"mn-b-thin t-transp uppercase p-small t-medium"},"Comment",-1),Y={__name:"Orders",setup(Z){const h=p.useRoute();p.useRouter();const i=e.ref(!1),o=e.ref("all"),m=e.computed(()=>g(d.state.all)),_=e.computed(()=>v(d.state.all,"unpaid"));function g(a){return a.reduce((s,r)=>s+r.positions.reduce((l,t)=>l+t.price,0),0)}function v(a,s){return a.reduce((r,l)=>l.payment.status===s?r+l.positions.reduce((t,c)=>t+c.price,0):r,0)}return e.onMounted(async()=>{}),(a,s)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",k,[e.createVNode(b.default,{title:"Orders","onUpdate:tabs_current":s[0]||(s[0]=l=>o.value=l),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"created"},{name:"Confirmed",value:"confirmed"},{name:"Preparing",value:"preparing"},{name:"Prepared",value:"prepared"},{name:"In delivery",value:"in delivery"},{name:"Delivered",value:"delivered"},{name:"Closed",value:"closed"}],actions:[{to:{name:"AdminOrderAdd"},label:"Create Order"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current"]),e.createVNode(f.default,{title:"Balance",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("div",S,[D,e.createElementVNode("h3",null,e.toDisplayString(a.formatPrice(m.value)),1)]),e.createElementVNode("div",B,[x,e.createElementVNode("h3",null,e.toDisplayString(a.formatPrice(_.value)),1)]),e.createElementVNode("div",C,[q,e.createElementVNode("h3",null,e.toDisplayString(a.formatPrice(m.value)),1)])])]),_:1}),e.createVNode(V.default,{search:!0,states:{empty:{title:"No Orders Found",description:"Currently, there are no orders."}},store:{read:l=>d.actions.read(l)},options:{limit:15,owner:e.unref(h).params._id,...o.value!=="all"&&{status:o.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:l})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,t=>(e.openBlock(),e.createBlock(r,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-light pos-relative pd-medium radius-big"},{default:e.withCtx(()=>{var c;return[e.createVNode(N.default,{entity:t,entityType:"order",user:y.state.user,owner:t.creator,creator:t.creator,date:t.createdAt,class:"mn-b-small"},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",P,[e.createElementVNode("div",T,[e.createElementVNode("h3",O,e.toDisplayString(((c=t.customer.target.profile)==null?void 0:c.name)||t.customer.target.phone||t.customer.target.email||"No name"),1),e.createElementVNode("p",F,e.toDisplayString(t.delivery.address||"Not specified"),1)]),e.createElementVNode("div",A,[e.createElementVNode("h3",M,e.toDisplayString(a.returnCurrency())+e.toDisplayString(d.getters.getTotal(t.positions)),1),e.createElementVNode("p",null,"#"+e.toDisplayString(t._id.slice(0,4)+"..."+t._id.slice(-4)),1)])]),e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(0,2),(n,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"w-100 flex"},[e.createElementVNode("p",L,e.toDisplayString(n.name),1),e.createElementVNode("p",R,[e.createTextVNode(e.toDisplayString(n.quantity)+" "+e.toDisplayString(n.type)+" x "+e.toDisplayString(n.price)+" ",1),e.createElementVNode("span",z,e.toDisplayString(a.returnCurrency()),1)])]))),128)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&t.positions.length>2?(e.openBlock(),e.createElementBlock("div",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(2),(n,u)=>(e.openBlock(),e.createElementBlock("div",{key:u+2,class:"w-100 flex"},[e.createElementVNode("p",I,e.toDisplayString(n.name),1),e.createElementVNode("p",$,[e.createTextVNode(e.toDisplayString(n.quantity)+" "+e.toDisplayString(n.type)+" x "+e.toDisplayString(n.price)+" ",1),e.createElementVNode("span",j,e.toDisplayString(a.returnCurrency()),1)])]))),128))])):e.createCommentVNode("",!0)]),_:2},1024),t.positions.length>2?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[1]||(s[1]=e.withModifiers(n=>i.value=!i.value,["prevent"])),class:"radius-big bg-light-transp-50 pd-nano w-100 flex-center flex"},e.toDisplayString(i.value?"Hide":`+${t.positions.length-2} more`),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",G,[e.createVNode(E.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",J,e.toDisplayString(a.formatDate(t.deadline)),1),e.createElementVNode("span",K,e.toDisplayString(t.status),1),Q]),t.comment?(e.openBlock(),e.createElementBlock("div",W,[X,e.createElementVNode("p",null,e.toDisplayString(t.comment),1)])):e.createCommentVNode("",!0)]}),_:2},1032,["to"]))),256))]),_:1},8,["store","options"])])}}};exports.default=Y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-router");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */;/* empty css */const f=require("../../../../components/Block/Block.vue.cjs"),d=require("../../store/orders.cjs"),y=require("../../../auth/views/store/auth.cjs");;/* empty css */const N=require("../../../globals/components/blocks/CardHeader.vue.cjs"),b=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),E=require("../../../icons/entities/IconTime.vue.cjs"),k={class:"pd-thin"},w={class:"gap-micro flex-nowrap flex"},S={class:"w-100 bg-white radius-small pd-small"},D=e.createElementVNode("p",{class:"mn-b-thin"},"Total",-1),B={class:"w-100 bg-white radius-small pd-small"},x=e.createElementVNode("p",{class:"mn-b-thin"},"Paid",-1),C={class:"w-100 bg-white radius-small pd-small"},q=e.createElementVNode("p",{class:"mn-b-thin"},"Unpaid",-1),P={class:"mn-b-small pd-small bg-white radius-small flex-nowrap flex"},T={class:"w-100"},O={class:"mn-b-thin"},F={class:"t-truncate"},A={class:"w-100 t-right"},M={class:"mn-b-thin"},U={class:"cols-1 mn-b-small gap-thin pd-small bg-white radius-small"},L={class:"mn-r-auto"},R={class:"t-right"},z={class:"t-transp"},H={key:0},I={class:"mn-r-auto"},$={class:"t-right"},j={class:"t-transp"},G={class:"pd-small bg-white radius-small gap-micro flex-v-center flex-nowrap flex"},J={class:"t-medium mn-r-auto"},K={class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},Q=e.createElementVNode("span",{class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin t-white bg-red"}," Unpaid ",-1),W={key:0,class:"pos-relative radius-small bg-fifth-transp-10 mn-t-thin pd-small"},X=e.createElementVNode("p",{class:"mn-b-thin t-transp uppercase p-small t-medium"},"Comment",-1),Y={__name:"Orders",setup(Z){const h=p.useRoute();p.useRouter();const i=e.ref(!1),o=e.ref("all"),m=e.computed(()=>g(d.state.all)),_=e.computed(()=>v(d.state.all,"unpaid"));function g(a){return a.reduce((s,r)=>s+r.positions.reduce((l,t)=>l+t.price,0),0)}function v(a,s){return a.reduce((r,l)=>l.payment.status===s?r+l.positions.reduce((t,c)=>t+c.price,0):r,0)}return e.onMounted(async()=>{}),(a,s)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",k,[e.createVNode(b.default,{title:"Orders","onUpdate:tabs_current":s[0]||(s[0]=l=>o.value=l),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"created"},{name:"Confirmed",value:"confirmed"},{name:"Preparing",value:"preparing"},{name:"Prepared",value:"prepared"},{name:"In delivery",value:"in delivery"},{name:"Delivered",value:"delivered"},{name:"Closed",value:"closed"}],actions:[{to:{name:"AdminOrderAdd"},label:"Create Order"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current"]),e.createVNode(f.default,{title:"Balance",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("div",S,[D,e.createElementVNode("h3",null,e.toDisplayString(a.formatPrice(m.value)),1)]),e.createElementVNode("div",B,[x,e.createElementVNode("h3",null,e.toDisplayString(a.formatPrice(_.value)),1)]),e.createElementVNode("div",C,[q,e.createElementVNode("h3",null,e.toDisplayString(a.formatPrice(m.value)),1)])])]),_:1}),e.createVNode(V.default,{search:!0,states:{empty:{title:"No Orders Found",description:"Currently, there are no orders."}},store:{read:l=>d.actions.read(l)},options:{limit:15,owner:e.unref(h).params._id,...o.value!=="all"&&{status:o.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:l})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,t=>(e.openBlock(),e.createBlock(r,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-light pos-relative pd-medium radius-big"},{default:e.withCtx(()=>{var c;return[e.createVNode(N.default,{entity:t,entityType:"order",user:y.state.user,owner:t.creator,creator:t.creator,date:t.createdAt,class:"mn-b-small"},null,8,["entity","user","owner","creator","date"]),e.createElementVNode("div",P,[e.createElementVNode("div",T,[e.createElementVNode("h3",O,e.toDisplayString(((c=t.customer.target.profile)==null?void 0:c.name)||t.customer.target.phone||t.customer.target.email||"No name"),1),e.createElementVNode("p",F,e.toDisplayString(t.delivery.address||"Not specified"),1)]),e.createElementVNode("div",A,[e.createElementVNode("h3",M,e.toDisplayString(a.returnCurrency())+e.toDisplayString(d.getters.getTotal(t.positions)),1),e.createElementVNode("p",null,"#"+e.toDisplayString(t._id.slice(0,4)+"..."+t._id.slice(-4)),1)])]),e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(0,2),(n,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"w-100 flex"},[e.createElementVNode("p",L,e.toDisplayString(n.name),1),e.createElementVNode("p",R,[e.createTextVNode(e.toDisplayString(n.quantity)+" "+e.toDisplayString(n.type)+" x "+e.toDisplayString(n.price)+" ",1),e.createElementVNode("span",z,e.toDisplayString(a.returnCurrency()),1)])]))),128)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&t.positions.length>2?(e.openBlock(),e.createElementBlock("div",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions.slice(2),(n,u)=>(e.openBlock(),e.createElementBlock("div",{key:u+2,class:"w-100 flex"},[e.createElementVNode("p",I,e.toDisplayString(n.name),1),e.createElementVNode("p",$,[e.createTextVNode(e.toDisplayString(n.quantity)+" "+e.toDisplayString(n.type)+" x "+e.toDisplayString(n.price)+" ",1),e.createElementVNode("span",j,e.toDisplayString(a.returnCurrency()),1)])]))),128))])):e.createCommentVNode("",!0)]),_:2},1024),t.positions.length>2?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[1]||(s[1]=e.withModifiers(n=>i.value=!i.value,["prevent"])),class:"radius-big bg-light-transp-50 pd-nano w-100 flex-center flex"},e.toDisplayString(i.value?"Hide":`+${t.positions.length-2} more`),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",G,[e.createVNode(E.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",J,e.toDisplayString(a.formatDate(t.deadline)),1),e.createElementVNode("span",K,e.toDisplayString(t.status),1),Q]),t.comment?(e.openBlock(),e.createElementBlock("div",W,[X,e.createElementVNode("p",null,e.toDisplayString(t.comment),1)])):e.createCommentVNode("",!0)]}),_:2},1032,["to"]))),256))]),_:1},8,["store","options"])])}}};exports.default=Y;
@@ -5,7 +5,7 @@ import "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.j
5
5
  /* empty css */
6
6
  import q from "../../../../components/Block/Block.vue.js";
7
7
  import { state as k, actions as z, getters as F } from "../../store/orders.js";
8
- import { state as I } from "../../../auth/store/auth.js";
8
+ import { state as I } from "../../../auth/views/store/auth.js";
9
9
  /* empty css */
10
10
  import M from "../../../globals/components/blocks/CardHeader.vue.js";
11
11
  import R from "../../../globals/components/sections/SectionPageTitle.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const b=require("../../../../components/FieldPhone/click-outside.cjs");;/* empty css */const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/store/auth.cjs"),B=require("../../../globals/store/globals.cjs"),y=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await y.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white h-2r pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},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)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-light"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(B.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const b=require("../../../../components/FieldPhone/click-outside.cjs");;/* empty css */const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/views/store/auth.cjs"),B=require("../../../globals/store/globals.cjs"),y=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await y.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white h-2r pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},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)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-light"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(B.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
@@ -10,7 +10,7 @@ import F from "../../../globals/components/blocks/BlockSearch.vue.js";
10
10
  import _ from "../../../users/components/blocks/CardUser.vue.js";
11
11
  import S from "./FormCustomerDetails.vue.js";
12
12
  import { actions as z } from "../../../users/store/users.js";
13
- import { state as A } from "../../../auth/store/auth.js";
13
+ import { state as A } from "../../../auth/views/store/auth.js";
14
14
  import { setError as D } from "../../../globals/store/globals.js";
15
15
  import L from "../../store/customers.store.js";
16
16
  import R from "../../store/models/customer.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/views/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
@@ -1,6 +1,6 @@
1
1
  import { openBlock as m, createBlock as l, withCtx as g, createTextVNode as h, toDisplayString as y } from "vue";
2
2
  import b from "../../../../components/Button/Button.vue2.js";
3
- import "../../../auth/store/auth.js";
3
+ import "../../../auth/views/store/auth.js";
4
4
  import { actions as i } from "../../store/memberships.js";
5
5
  const M = {
6
6
  __name: "ButtonToggleMembership",
@@ -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");require("../../../globals/localization/vue-i18n.cjs");;/* 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 q(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function v(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:q,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:()=>v(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/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;