@ozdao/martyrs 0.2.604 → 0.2.605

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (833) hide show
  1. package/README.md +2 -2
  2. package/dist/_virtual/dayjs.min.js +1 -1
  3. package/dist/_virtual/weekOfYear.js +1 -1
  4. package/dist/{abac-Blt8bUTL.js → abac-kz5xI99l.js} +1 -0
  5. package/dist/auth.server.js +52 -12
  6. package/dist/builder.js +67 -2
  7. package/dist/chats.server.js +2 -2
  8. package/dist/community.server.js +3 -3
  9. package/dist/core.server.js +2 -2
  10. package/dist/{core.websocket-Cl76z2wT.js → core.websocket-B2FA8gGl.js} +0 -2
  11. package/dist/{crud-BT5FIvQC.js → crud-Cwn0frBP.js} +8 -2
  12. package/dist/events.server.js +4 -4
  13. package/dist/files.server.js +1 -1
  14. package/dist/gallery.server.js +2 -2
  15. package/dist/governance.server.js +10 -10
  16. package/dist/{index-kvBwwb0w.js → index-CPACC651.js} +1 -1
  17. package/dist/inventory.server.js +4 -4
  18. package/dist/{mailing-DT7nbNjZ.js → mailing-BBCidXGr.js} +38 -2
  19. package/dist/marketplace.server.js +2 -2
  20. package/dist/martyrs/dist/martyrs.es3.js +1 -1
  21. package/dist/martyrs/dist/martyrs.es3.js.map +1 -1
  22. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +1 -1
  23. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js.map +1 -1
  24. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js +1 -1
  25. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js.map +1 -1
  26. package/dist/{node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_ → martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13}/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +305 -268
  27. package/dist/martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +1 -0
  28. package/dist/martyrs/src/components/Address/Address.vue2.js +13 -13
  29. package/dist/martyrs/src/components/Address/Address.vue2.js.map +1 -1
  30. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  31. package/dist/martyrs/src/components/Button/Button.vue2.js +1 -1
  32. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
  33. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +150 -143
  34. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
  35. package/dist/martyrs/src/components/Chart/Chart.vue.js +296 -0
  36. package/dist/martyrs/src/components/Chart/Chart.vue.js.map +1 -0
  37. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
  38. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/Chips/Chips.vue.js +5 -6
  40. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -1
  41. package/dist/martyrs/src/components/Countdown/Countdown.vue.js +5 -5
  42. package/dist/martyrs/src/components/Countdown/Countdown.vue.js.map +1 -1
  43. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js +2 -2
  44. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js.map +1 -1
  45. package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +6 -6
  46. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
  47. package/dist/martyrs/src/components/EmptyState/EmptyState.vue.js +1 -1
  48. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  49. package/dist/martyrs/src/components/Field/Field.vue.js +4 -4
  50. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  51. package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js +3 -3
  52. package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js.map +1 -1
  53. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +27 -21
  54. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js.map +1 -1
  55. package/dist/martyrs/src/components/Map/Map.vue.js +20 -16
  56. package/dist/martyrs/src/components/Map/Map.vue.js.map +1 -1
  57. package/dist/martyrs/src/components/Popup/Popup.vue.js +3 -4
  58. package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -1
  59. package/dist/martyrs/src/components/Radio/Radio.vue.js +12 -10
  60. package/dist/martyrs/src/components/Radio/Radio.vue.js.map +1 -1
  61. package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
  62. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
  63. package/dist/martyrs/src/components/Status/Snack.vue.js +1 -1
  64. package/dist/martyrs/src/components/Status/Snack.vue.js.map +1 -1
  65. package/dist/martyrs/src/components/Status/Status.vue.js +1 -1
  66. package/dist/martyrs/src/components/Status/Status.vue.js.map +1 -1
  67. package/dist/martyrs/src/components/Table/Table.vue.js +21 -4
  68. package/dist/martyrs/src/components/Table/Table.vue.js.map +1 -1
  69. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
  70. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
  71. package/dist/martyrs/src/components/Tree/Tree.vue.js +1 -1
  72. package/dist/martyrs/src/components/Upload/Upload.vue2.js +2 -2
  73. package/dist/martyrs/src/components/Upload/Upload.vue2.js.map +1 -1
  74. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +2 -2
  75. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js.map +1 -1
  76. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  77. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js.map +1 -1
  78. package/dist/martyrs/src/modules/auth/auth.client.js +14 -2
  79. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  80. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +4 -4
  81. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -1
  82. package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js +1 -1
  83. package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js.map +1 -1
  84. package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js +96 -0
  85. package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js.map +1 -0
  86. package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js +337 -0
  87. package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js.map +1 -0
  88. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  89. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js.map +1 -1
  90. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
  91. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  92. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +32 -18
  93. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  94. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +76 -40
  95. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  96. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +6 -5
  97. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -1
  98. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +4 -4
  99. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  100. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +3 -1
  101. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  102. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
  103. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  104. package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js +28 -16
  105. package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js.map +1 -1
  106. package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +1 -1
  107. package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -1
  108. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +1 -1
  109. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
  110. package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js +6 -2
  111. package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
  112. package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js +53 -0
  113. package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js.map +1 -0
  114. package/dist/martyrs/src/modules/auth/views/store/auth.js +2 -2
  115. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  116. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +179 -253
  117. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
  118. package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js +105 -44
  119. package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js.map +1 -1
  120. package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js +11 -5
  121. package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js.map +1 -1
  122. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js +1 -1
  123. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js.map +1 -1
  124. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
  125. package/dist/martyrs/src/modules/community/community.client.js +4 -4
  126. package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
  127. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  128. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
  129. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +4 -4
  130. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js +2 -2
  132. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
  134. package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js.map +1 -1
  135. package/dist/martyrs/src/modules/core/core.client.js +18 -16
  136. package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
  137. package/dist/martyrs/src/modules/core/views/classes/core.app.js +25 -6
  138. package/dist/martyrs/src/modules/core/views/classes/core.app.js.map +1 -1
  139. package/dist/martyrs/src/modules/core/views/classes/module.manager.js +4 -2
  140. package/dist/martyrs/src/modules/core/views/classes/module.manager.js.map +1 -1
  141. package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js +1 -1
  142. package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
  144. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js.map +1 -1
  145. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js +132 -0
  146. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js.map +1 -0
  147. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +3 -3
  148. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
  149. package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js +6 -28
  150. package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js +29 -11
  152. package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js.map +1 -1
  153. package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js +2 -2
  154. package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +41 -26
  156. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
  157. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +1 -1
  158. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -1
  159. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  160. package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +2 -2
  161. package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
  162. package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js +5 -5
  163. package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js.map +1 -1
  164. package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js +2 -2
  165. package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js.map +1 -1
  166. package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js +2 -2
  167. package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js.map +1 -1
  168. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +4 -4
  169. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
  170. package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js +1 -1
  171. package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js.map +1 -1
  172. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +2 -2
  173. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js.map +1 -1
  174. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js +3 -3
  175. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +1 -1
  176. package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +2 -2
  177. package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js.map +1 -1
  178. package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js +6 -6
  179. package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js.map +1 -1
  180. package/dist/martyrs/src/modules/core/views/mixins/mixins.js +14 -1
  181. package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
  182. package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
  183. package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js.map +1 -1
  184. package/dist/martyrs/src/modules/core/views/store/core.store.js +4 -0
  185. package/dist/martyrs/src/modules/core/views/store/core.store.js.map +1 -1
  186. package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +3 -0
  187. package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
  188. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  189. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +9 -9
  190. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
  191. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  192. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  193. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
  194. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js.map +1 -1
  195. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +1 -1
  196. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -1
  197. package/dist/martyrs/src/modules/events/events.client.js +4 -4
  198. package/dist/martyrs/src/modules/events/events.client.js.map +1 -1
  199. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  200. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  201. package/dist/martyrs/src/modules/gallery/router/gallery.router.js +3 -3
  202. package/dist/martyrs/src/modules/gallery/router/gallery.router.js.map +1 -1
  203. package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js +3 -3
  204. package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js.map +1 -1
  205. package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js +4 -4
  206. package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js.map +1 -1
  207. package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js +2 -2
  208. package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js +3 -3
  210. package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js.map +1 -1
  211. package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js +3 -3
  212. package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js.map +1 -1
  213. package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js +1 -1
  214. package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js.map +1 -1
  215. package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js +1 -1
  216. package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js.map +1 -1
  217. package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js +1 -1
  218. package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js.map +1 -1
  219. package/dist/martyrs/src/modules/governance/views/router/governance.router.js +3 -3
  220. package/dist/martyrs/src/modules/governance/views/router/governance.router.js.map +1 -1
  221. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +2 -2
  222. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -1
  223. package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js +32 -0
  224. package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js.map +1 -0
  225. package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js +32 -0
  226. package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js.map +1 -0
  227. package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js +32 -0
  228. package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js.map +1 -0
  229. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
  230. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js.map +1 -1
  231. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +2 -2
  232. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js.map +1 -1
  233. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  234. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js.map +1 -1
  235. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
  236. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js.map +1 -1
  237. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +290 -173
  238. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
  239. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  240. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
  241. package/dist/martyrs/src/modules/inventory/inventory.client.js +4 -4
  242. package/dist/martyrs/src/modules/inventory/inventory.client.js.map +1 -1
  243. package/dist/martyrs/src/modules/inventory/router/inventory.router.js +15 -0
  244. package/dist/martyrs/src/modules/inventory/router/inventory.router.js.map +1 -1
  245. package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js +4 -4
  246. package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js.map +1 -1
  247. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
  248. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
  249. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js +3 -3
  250. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js.map +1 -1
  251. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +2 -2
  252. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js.map +1 -1
  253. package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js +1 -1
  254. package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js.map +1 -1
  255. package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js +2 -2
  256. package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js.map +1 -1
  257. package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js +1 -1
  258. package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js.map +1 -1
  259. package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js +2 -2
  260. package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js.map +1 -1
  261. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +1 -1
  262. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
  263. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +3 -3
  264. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -1
  265. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +2 -2
  266. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  267. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
  268. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
  269. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +2 -2
  270. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js.map +1 -1
  271. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +2 -2
  272. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
  273. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +6 -6
  274. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
  275. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  276. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -1
  277. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  278. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -1
  279. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +5 -5
  280. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
  281. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
  282. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
  283. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +8 -8
  284. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  285. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +5 -5
  286. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
  287. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +11 -11
  288. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  289. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +3 -3
  290. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
  291. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +11 -11
  292. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  293. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +4 -4
  294. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js.map +1 -1
  295. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +2 -2
  296. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
  297. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +162 -68
  298. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
  299. package/dist/martyrs/src/modules/notifications/notifications.client.js +181 -17
  300. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  301. package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js +21 -0
  302. package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js.map +1 -0
  303. package/dist/martyrs/src/modules/notifications/router/notifications.router.js +13 -42
  304. package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +1 -1
  305. package/dist/martyrs/src/modules/notifications/store/notifications.store.js +66 -1
  306. package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
  307. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +9 -7
  308. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -1
  309. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +11 -9
  310. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -1
  311. package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js +9 -9
  312. package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js.map +1 -1
  313. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +66 -19
  314. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -1
  315. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +29 -27
  316. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
  317. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +7 -12
  318. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js.map +1 -1
  319. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +1 -1
  320. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
  321. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js +4 -4
  322. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js.map +1 -1
  323. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  324. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -1
  325. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +46 -25
  326. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
  327. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +2 -2
  328. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -1
  329. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +54 -38
  330. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -1
  331. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +454 -139
  332. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
  333. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +2 -1
  334. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  335. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +141 -68
  336. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  337. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +38 -32
  338. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
  339. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
  340. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
  341. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +4 -4
  342. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -1
  343. package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js +1 -1
  344. package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js.map +1 -1
  345. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +167 -95
  346. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -1
  347. package/dist/martyrs/src/modules/orders/orders.client.js +22 -20
  348. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  349. package/dist/martyrs/src/modules/orders/store/orders.js +3 -5
  350. package/dist/martyrs/src/modules/orders/store/orders.js.map +1 -1
  351. package/dist/martyrs/src/modules/orders/store/shopcart.js +5 -5
  352. package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
  353. package/dist/martyrs/src/modules/orders/utils/rent-price.js +60 -0
  354. package/dist/martyrs/src/modules/orders/utils/rent-price.js.map +1 -0
  355. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
  356. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +45 -55
  357. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
  358. package/dist/martyrs/src/modules/organizations/components/blocks/EmptyState.vue.js +1 -1
  359. package/dist/martyrs/src/modules/organizations/components/blocks/Rating.vue.js +1 -1
  360. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +2 -2
  361. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js.map +1 -1
  362. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  363. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js.map +1 -1
  364. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +3 -3
  365. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js.map +1 -1
  366. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
  367. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js.map +1 -1
  368. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  369. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js.map +1 -1
  370. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +2 -2
  371. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
  372. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +8 -8
  373. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
  374. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +216 -83
  375. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  376. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +35 -25
  377. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
  378. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +3 -2
  379. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
  380. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  381. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
  382. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  383. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
  384. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +20 -18
  385. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  386. package/dist/martyrs/src/modules/organizations/organizations.client.js +39 -33
  387. package/dist/martyrs/src/modules/organizations/organizations.client.js.map +1 -1
  388. package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js +81 -0
  389. package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js.map +1 -1
  390. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  391. package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
  392. package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js.map +1 -1
  393. package/dist/martyrs/src/modules/pages/views/router/pages.router.js +2 -2
  394. package/dist/martyrs/src/modules/pages/views/router/pages.router.js.map +1 -1
  395. package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  396. package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js.map +1 -1
  397. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +2 -2
  398. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  399. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +3 -3
  400. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js.map +1 -1
  401. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
  402. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
  403. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js +3 -3
  404. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js.map +1 -1
  405. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +2 -2
  406. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +1 -1
  407. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +9 -25
  408. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  409. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +34 -17
  410. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
  411. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +96 -96
  412. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  413. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  414. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js.map +1 -1
  415. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  416. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js.map +1 -1
  417. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +22 -9
  418. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js.map +1 -1
  419. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  420. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
  421. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  422. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
  423. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +3 -3
  424. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
  425. package/dist/martyrs/src/modules/products/router/categories.router.js +2 -2
  426. package/dist/martyrs/src/modules/products/router/categories.router.js.map +1 -1
  427. package/dist/martyrs/src/modules/products/router/products.router.js +17 -3
  428. package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
  429. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +11 -10
  430. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
  431. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +197 -81
  432. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
  433. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js +2 -2
  434. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js.map +1 -1
  435. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
  436. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
  437. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +685 -80
  438. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
  439. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +68 -18
  440. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
  441. package/dist/martyrs/src/modules/rents/views/router/rents.router.js +3 -3
  442. package/dist/martyrs/src/modules/rents/views/router/rents.router.js.map +1 -1
  443. package/dist/martyrs/src/modules/rents/views/store/rents.store.js +1 -1
  444. package/dist/martyrs/src/modules/rents/views/store/rents.store.js.map +1 -1
  445. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js +3 -3
  446. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js.map +1 -1
  447. package/dist/martyrs/src/modules/reports/router/reports.router.js +1 -1
  448. package/dist/martyrs/src/modules/reports/router/reports.router.js.map +1 -1
  449. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +5 -5
  450. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
  451. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  452. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +3 -3
  453. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
  454. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +9 -7
  455. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
  456. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +29 -37
  457. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
  458. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +8 -8
  459. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -1
  460. package/dist/martyrs/src/modules/spots/router/spots.router.js +3 -3
  461. package/dist/martyrs/src/modules/spots/router/spots.router.js.map +1 -1
  462. package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +3 -3
  463. package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js.map +1 -1
  464. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  465. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js.map +1 -1
  466. package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js +1 -1
  467. package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js.map +1 -1
  468. package/dist/martyrs.es10.js +59 -57
  469. package/dist/martyrs.es106.js +2 -2
  470. package/dist/martyrs.es11.js +31 -30
  471. package/dist/martyrs.es113.js +22 -166
  472. package/dist/martyrs.es114.js +4 -457
  473. package/dist/martyrs.es115.js +8 -40
  474. package/dist/martyrs.es116.js +166 -9
  475. package/dist/martyrs.es117.js +451 -43
  476. package/dist/martyrs.es118.js +38 -10
  477. package/dist/martyrs.es119.js +9 -44
  478. package/dist/martyrs.es12.js +8 -9
  479. package/dist/martyrs.es120.js +49 -4
  480. package/dist/martyrs.es121.js +10 -127
  481. package/dist/martyrs.es122.js +42 -98
  482. package/dist/martyrs.es123.js +4 -86
  483. package/dist/martyrs.es124.js +120 -29
  484. package/dist/martyrs.es125.js +99 -10
  485. package/dist/martyrs.es126.js +71 -24
  486. package/dist/martyrs.es127.js +37 -8
  487. package/dist/martyrs.es128.js +11 -22
  488. package/dist/martyrs.es129.js +39 -4
  489. package/dist/martyrs.es13.js +22 -19
  490. package/dist/martyrs.es130.js +9 -8
  491. package/dist/martyrs.es131.js +7 -7
  492. package/dist/martyrs.es132.js +2 -2
  493. package/dist/martyrs.es133.js +1 -1
  494. package/dist/martyrs.es135.js +1 -1
  495. package/dist/martyrs.es137.js +1 -1
  496. package/dist/martyrs.es138.js +7 -8
  497. package/dist/martyrs.es139.js +8 -7
  498. package/dist/martyrs.es14.js +2 -2
  499. package/dist/martyrs.es140.js +2 -2
  500. package/dist/martyrs.es144.js +10 -29
  501. package/dist/martyrs.es145.js +29 -10
  502. package/dist/martyrs.es146.js +2 -2
  503. package/dist/martyrs.es147.js +2 -2
  504. package/dist/martyrs.es149.js +1 -1
  505. package/dist/martyrs.es2.js +31 -30
  506. package/dist/martyrs.es22.js +16 -16
  507. package/dist/martyrs.es23.js +8 -8
  508. package/dist/martyrs.es24.js +9 -9
  509. package/dist/martyrs.es26.js +9 -11
  510. package/dist/martyrs.es27.js +9 -9
  511. package/dist/martyrs.es28.js +1 -1
  512. package/dist/martyrs.es29.js +5 -5
  513. package/dist/martyrs.es3.js +1 -1
  514. package/dist/martyrs.es38.js +1 -1
  515. package/dist/martyrs.es4.js +12 -12
  516. package/dist/martyrs.es41.js +34 -224
  517. package/dist/martyrs.es5.js +251 -238
  518. package/dist/martyrs.es61.js +33 -26
  519. package/dist/martyrs.es74.js +7 -7
  520. package/dist/martyrs.es76.js +12 -12
  521. package/dist/martyrs.es8.js +31 -31
  522. package/dist/music.server.js +3 -3
  523. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js +90 -0
  524. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js.map +1 -0
  525. package/dist/notifications.server.js +255 -23
  526. package/dist/orders.server.js +674 -136
  527. package/dist/organizations.server.js +11 -6
  528. package/dist/products.server.js +68 -7
  529. package/dist/{queryProcessor-C_5Iipam.js → queryProcessor-B2FCngFP.js} +3 -2
  530. package/dist/rents.server.js +183 -7
  531. package/dist/{socials.schema-DxnnaBgO.js → socials.schema-C3RjkqJv.js} +4 -0
  532. package/dist/spots.server.js +1 -1
  533. package/dist/style.css +292 -204
  534. package/dist/{tickets.controller-DdF85W-i.js → tickets.controller-Dpzf4kQx.js} +1 -1
  535. package/dist/wallet.server.js +2 -2
  536. package/package.json +5 -3
  537. package/src/builder/modes/ssr.rspack.dev.js +2 -0
  538. package/src/builder/rspack/rspack.config.ssr.client.js +58 -1
  539. package/src/builder/ssr/asset-resolver.js +1 -1
  540. package/src/builder/templates/page.js +2 -0
  541. package/src/components/Address/Address.vue +16 -16
  542. package/src/components/Button/Button.vue +0 -1
  543. package/src/components/ButtonSegmented/ButtonSegmented.vue +1 -1
  544. package/src/components/Calendar/Calendar.vue +141 -118
  545. package/src/components/Chart/Chart.vue +216 -0
  546. package/src/components/Checkbox/Checkbox.vue +1 -1
  547. package/src/components/Chips/Chips.vue +4 -5
  548. package/src/components/Countdown/Countdown.vue +5 -5
  549. package/src/components/DatePicker/DatePicker.vue +2 -2
  550. package/src/components/EditImages/EditImages.vue +3 -3
  551. package/src/components/EmptyState/EmptyState.vue +1 -1
  552. package/src/components/Feed/Feed.vue +5 -0
  553. package/src/components/Field/Field.vue +3 -3
  554. package/src/components/FieldDate/FieldDate.vue +2 -2
  555. package/src/components/LocationMarker/LocationMarker.vue +28 -21
  556. package/src/components/Map/Map.vue +20 -15
  557. package/src/components/Popup/Popup.vue +3 -3
  558. package/src/components/Radio/Radio.vue +2 -2
  559. package/src/components/Select/Select.vue +1 -1
  560. package/src/components/Status/Snack.vue +1 -1
  561. package/src/components/Status/Status.vue +1 -1
  562. package/src/components/Table/Table.vue +16 -1
  563. package/src/components/Upload/Upload.vue +1 -1
  564. package/src/components/UploadImage/UploadImage.vue +1 -1
  565. package/src/components/UploadImageMultiple/UploadImageMultiple.vue +1 -1
  566. package/src/jit/rules.js +4 -0
  567. package/src/modules/TASKS.MD +16 -3
  568. package/src/modules/auth/auth.client.js +18 -3
  569. package/src/modules/auth/controllers/routes/users.routes.js +18 -0
  570. package/src/modules/auth/controllers/services/auth.service.js +3 -3
  571. package/src/modules/auth/controllers/services/users.service.js +34 -5
  572. package/src/modules/auth/views/components/blocks/OtpDialog.vue +4 -4
  573. package/src/modules/auth/views/components/blocks/PopupAuth.vue +1 -1
  574. package/src/modules/auth/views/components/blocks/SidebarUserCard.vue +95 -0
  575. package/src/modules/auth/views/components/pages/BackofficeUsers.vue +337 -0
  576. package/src/modules/auth/views/components/pages/Invite.vue +1 -1
  577. package/src/modules/auth/views/components/pages/Profile.vue +1 -1
  578. package/src/modules/auth/views/components/pages/ProfileEdit.vue +23 -14
  579. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +45 -26
  580. package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +8 -7
  581. package/src/modules/auth/views/components/pages/ResetPassword.vue +4 -4
  582. package/src/modules/auth/views/components/pages/SignUp.vue +3 -3
  583. package/src/modules/auth/views/components/pages/UserDashboard.vue +8 -5
  584. package/src/modules/auth/views/components/sections/FeaturedUsers.vue +1 -1
  585. package/src/modules/auth/views/components/sections/SliderFeatures.vue +1 -1
  586. package/src/modules/auth/views/middlewares/auth.validation.js +7 -2
  587. package/src/modules/auth/views/router/users.backoffice.router.js +39 -0
  588. package/src/modules/auth/views/store/auth.js +2 -2
  589. package/src/modules/backoffice/components/admin/Backcalls.vue +2 -2
  590. package/src/modules/backoffice/components/admin/Dashboard.sublime-workspace +1 -1
  591. package/src/modules/backoffice/components/admin/FastOrders.vue +3 -3
  592. package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
  593. package/src/modules/backoffice/components/pages/Dashboard.vue +102 -139
  594. package/src/modules/backoffice/configs/navigation.backoffice.config.js +91 -29
  595. package/src/modules/backoffice/router/backoffice.router.js +7 -1
  596. package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
  597. package/src/modules/chats/components/sections/ChatWindow.vue +1 -1
  598. package/src/modules/community/community.client.js +4 -4
  599. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  600. package/src/modules/community/components/layouts/Community.vue +4 -4
  601. package/src/modules/community/components/sections/Comment.vue +1 -1
  602. package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
  603. package/src/modules/core/TASK.MD +2 -2
  604. package/src/modules/core/controllers/classes/abac/abac.core.js +1 -0
  605. package/src/modules/core/controllers/classes/core.websocket.js +0 -2
  606. package/src/modules/core/controllers/classes/crud/crud.core.js +6 -0
  607. package/src/modules/core/controllers/classes/crud/crud.service.js +6 -0
  608. package/src/modules/core/controllers/utils/mailing.js +35 -26
  609. package/src/modules/core/controllers/utils/queryProcessor.js +4 -2
  610. package/src/modules/core/core.client.js +1 -0
  611. package/src/modules/core/models/schemas/embedding.schema.js +8 -0
  612. package/src/modules/core/models/schemas/socials.schema.js +4 -0
  613. package/src/modules/core/sw.js +448 -0
  614. package/src/modules/core/views/classes/core.app.js +37 -13
  615. package/src/modules/core/views/classes/module.manager.js +3 -1
  616. package/src/modules/core/views/components/blocks/AlertDialog.vue +1 -1
  617. package/src/modules/core/views/components/blocks/BlockSearch.vue +1 -1
  618. package/src/modules/core/views/components/blocks/BlockSlider.vue +96 -0
  619. package/src/modules/core/views/components/blocks/CardHeader.vue +2 -2
  620. package/src/modules/core/views/components/blocks/CardStat.vue +4 -18
  621. package/src/modules/{auth → core}/views/components/blocks/CardUser.vue +45 -20
  622. package/src/modules/core/views/components/blocks/HelpCard.vue +1 -1
  623. package/src/modules/core/views/components/blocks/PopupAuth.vue +1 -1
  624. package/src/modules/core/views/components/blocks/PopupDateSelector.vue +41 -24
  625. package/src/modules/core/views/components/layouts/Client.vue +1 -1
  626. package/src/modules/core/views/components/pages/404.vue +5 -5
  627. package/src/modules/core/views/components/partials/BottomNavigationBar.vue +5 -5
  628. package/src/modules/core/views/components/partials/CitySelection.vue +2 -2
  629. package/src/modules/core/views/components/partials/Footer.centered.vue +2 -2
  630. package/src/modules/core/views/components/partials/Footer.vue +2 -2
  631. package/src/modules/core/views/components/partials/Header.vue +3 -3
  632. package/src/modules/core/views/components/partials/LocationSelection.vue +1 -1
  633. package/src/modules/core/views/components/partials/Navigation.vue +1 -1
  634. package/src/modules/core/views/components/sections/Filters.vue +2 -2
  635. package/src/modules/core/views/components/sections/SectionPageTitle.vue +2 -2
  636. package/src/modules/core/views/components/sections/Walkthrough.vue +6 -6
  637. package/src/modules/core/views/mixins/mixins.js +17 -0
  638. package/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
  639. package/src/modules/core/views/store/core.store.js +5 -0
  640. package/src/modules/core/views/utils/vue-app-renderer.js +5 -0
  641. package/src/modules/events/components/pages/EditEventTickets.vue +9 -9
  642. package/src/modules/events/components/pages/Event.vue +2 -2
  643. package/src/modules/events/components/sections/EditTickets.vue +1 -1
  644. package/src/modules/events/components/sections/SelectDate.vue +1 -1
  645. package/src/modules/events/events.client.js +4 -4
  646. package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
  647. package/src/modules/gallery/router/gallery.router.js +3 -3
  648. package/src/modules/governance/middlewares/sprints.verifier.js +3 -3
  649. package/src/modules/governance/middlewares/tasks.verifier.js +3 -3
  650. package/src/modules/governance/models/sprint.model.js +1 -1
  651. package/src/modules/governance/models/task.model.js +1 -1
  652. package/src/modules/governance/reactcode/src/components/TaskStatusBadge.tsx +1 -1
  653. package/src/modules/governance/views/components/blocks/CardInitiativeItem.vue +3 -3
  654. package/src/modules/governance/views/components/blocks/CardSprintItem.vue +4 -4
  655. package/src/modules/governance/views/components/blocks/CardTaskItem.vue +2 -2
  656. package/src/modules/governance/views/components/blocks/CardVotingItem.vue +3 -3
  657. package/src/modules/governance/views/components/pages/Initiatives.vue +3 -3
  658. package/src/modules/governance/views/components/partials/TaskStatusBadge.vue +1 -1
  659. package/src/modules/governance/views/components/sections/FormSprintDetails.vue +1 -1
  660. package/src/modules/governance/views/components/sections/FormTaskDetails.vue +1 -1
  661. package/src/modules/governance/views/router/governance.router.js +3 -3
  662. package/src/modules/icons/components/IconSearchPopup.vue +1 -1
  663. package/src/modules/icons/entities/IconApplications.vue +14 -0
  664. package/src/modules/icons/entities/IconCustomers.vue +14 -0
  665. package/src/modules/icons/entities/IconUsers.vue +14 -0
  666. package/src/modules/inventory/components/forms/AdjustmentForm.vue +2 -2
  667. package/src/modules/inventory/components/forms/ColumnSettingsMenu.vue +2 -2
  668. package/src/modules/inventory/components/forms/HistoryView.vue +1 -1
  669. package/src/modules/inventory/components/forms/StockAlertsForm.vue +3 -3
  670. package/src/modules/inventory/components/pages/Inventory.vue +278 -159
  671. package/src/modules/inventory/components/pages/InventoryEdit.vue +2 -2
  672. package/src/modules/inventory/inventory.client.js +4 -4
  673. package/src/modules/inventory/models/stock.audit.model.js +1 -1
  674. package/src/modules/inventory/router/inventory.router.js +12 -0
  675. package/src/modules/landing/components/sections/SectionEarn.vue +3 -3
  676. package/src/modules/landing/components/sections/SectionFeature.vue +1 -1
  677. package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
  678. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
  679. package/src/modules/landing/components/sections/SectionGuide.vue +2 -2
  680. package/src/modules/landing/components/sections/SectionHeroToken.vue +1 -1
  681. package/src/modules/landing/components/sections/SectionHeroVideo.vue +1 -1
  682. package/src/modules/landing/components/sections/SectionMobileApp.vue +2 -2
  683. package/src/modules/landing/components/sections/SectionOverview.vue +1 -1
  684. package/src/modules/landing/components/sections/SectionRoadmap.vue +1 -1
  685. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  686. package/src/modules/marketplace/views/components/sections/SectionMenu.vue +2 -2
  687. package/src/modules/music/components/SidebarMusic.vue +1 -1
  688. package/src/modules/music/components/cards/AlbumCard.vue +1 -1
  689. package/src/modules/music/components/cards/ArtistCard.vue +1 -1
  690. package/src/modules/music/components/cards/ArtistCardSmall.vue +1 -1
  691. package/src/modules/music/components/cards/PlaylistCard.vue +1 -1
  692. package/src/modules/music/components/cards/TrackListCard.vue +6 -6
  693. package/src/modules/music/components/forms/AlbumForm.vue +2 -2
  694. package/src/modules/music/components/forms/ArtistForm.vue +1 -1
  695. package/src/modules/music/components/forms/PlaylistForm.vue +5 -5
  696. package/src/modules/music/components/forms/TrackForm.vue +3 -3
  697. package/src/modules/music/components/pages/Album.vue +8 -8
  698. package/src/modules/music/components/pages/Artist.vue +5 -5
  699. package/src/modules/music/components/pages/Playlist.vue +11 -11
  700. package/src/modules/music/components/pages/SearchResults.vue +2 -2
  701. package/src/modules/music/components/pages/Track.vue +11 -11
  702. package/src/modules/music/components/player/FullscreenPlayer.vue +3 -3
  703. package/src/modules/music/components/player/TrackProgress.vue +1 -1
  704. package/src/modules/notifications/components/sections/NotificationPreferences.vue +182 -52
  705. package/src/modules/notifications/controllers/notifications.controller.js +242 -17
  706. package/src/modules/notifications/models/notification-preference.model.js +4 -0
  707. package/src/modules/notifications/notifications.client.js +213 -20
  708. package/src/modules/notifications/router/notifications.backoffice.router.js +16 -0
  709. package/src/modules/notifications/router/notifications.router.js +13 -45
  710. package/src/modules/notifications/routes/notifications.routes.js +9 -0
  711. package/src/modules/notifications/services/notification.service.js +33 -9
  712. package/src/modules/notifications/services/telegram.service.js +2 -2
  713. package/src/modules/notifications/services/web-push.service.js +6 -2
  714. package/src/modules/notifications/store/notifications.store.js +69 -0
  715. package/src/modules/orders/components/blocks/CardApplication.vue +9 -6
  716. package/src/modules/orders/components/blocks/CardCustomer.vue +10 -7
  717. package/src/modules/orders/components/blocks/CardOrder.vue +8 -8
  718. package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +58 -12
  719. package/src/modules/orders/components/blocks/CardOrderItem.vue +31 -28
  720. package/src/modules/orders/components/blocks/CardOrderUser.vue +7 -12
  721. package/src/modules/orders/components/blocks/CardOrderVar1.vue +3 -3
  722. package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +1 -1
  723. package/src/modules/orders/components/elements/PriceTotal.vue +4 -4
  724. package/src/modules/orders/components/forms/FormApplicationDetails.vue +1 -1
  725. package/src/modules/orders/components/forms/FormSelectCustomer.vue +48 -25
  726. package/src/modules/orders/components/pages/Applications.vue +2 -2
  727. package/src/modules/orders/components/pages/Customers.vue +35 -23
  728. package/src/modules/orders/components/pages/OrderBackoffice.vue +780 -393
  729. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  730. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +112 -42
  731. package/src/modules/orders/components/pages/Orders.vue +20 -19
  732. package/src/modules/orders/components/pages/Orders_refact.vue +3 -3
  733. package/src/modules/orders/components/partials/ShopCart.vue +1 -1
  734. package/src/modules/orders/components/sections/ApplicationDetails.vue +2 -2
  735. package/src/modules/orders/components/sections/AskToLogin.vue +1 -1
  736. package/src/modules/orders/components/sections/CustomerDetails.vue +130 -64
  737. package/src/modules/orders/controllers/orders.controller.js +463 -134
  738. package/src/modules/orders/middlewares/applications.verifier.js +3 -3
  739. package/src/modules/orders/middlewares/customers.verifier.js +4 -0
  740. package/src/modules/orders/middlewares/orders.verifier.js +187 -0
  741. package/src/modules/orders/models/customer.model.js +2 -0
  742. package/src/modules/orders/models/order.model.js +20 -2
  743. package/src/modules/orders/orders.client.js +21 -19
  744. package/src/modules/orders/routes/applications.routes.js +13 -3
  745. package/src/modules/orders/routes/customers.routes.js +2 -0
  746. package/src/modules/orders/routes/orders.routes.js +46 -4
  747. package/src/modules/orders/store/orders.js +4 -7
  748. package/src/modules/orders/store/shopcart.js +6 -7
  749. package/src/modules/orders/utils/rent-price.js +90 -0
  750. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  751. package/src/modules/organizations/components/blocks/CardOrganization.vue +30 -33
  752. package/src/modules/organizations/components/blocks/EmptyState.vue +1 -1
  753. package/src/modules/organizations/components/blocks/Rating.vue +1 -1
  754. package/src/modules/organizations/components/blocks/Socials.vue +2 -2
  755. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
  756. package/src/modules/organizations/components/forms/AddExistingMembersForm.vue +3 -3
  757. package/src/modules/organizations/components/forms/DepartmentForm.vue +1 -1
  758. package/src/modules/organizations/components/forms/InviteForm.vue +1 -1
  759. package/src/modules/organizations/components/pages/Department.vue +2 -2
  760. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  761. package/src/modules/organizations/components/pages/Members.vue +8 -8
  762. package/src/modules/organizations/components/pages/Organization.vue +232 -124
  763. package/src/modules/organizations/components/pages/OrganizationCreate.vue +3 -3
  764. package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
  765. package/src/modules/organizations/components/pages/OrganizationEdit.vue +15 -6
  766. package/src/modules/organizations/components/pages/Organizations.vue +3 -2
  767. package/src/modules/organizations/components/sections/Documents.vue +1 -1
  768. package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
  769. package/src/modules/organizations/configs/navigation.organization.config.js +34 -26
  770. package/src/modules/organizations/controllers/organizations.controller.js +8 -3
  771. package/src/modules/organizations/models/organization.model.js +1 -0
  772. package/src/modules/organizations/organizations.client.js +39 -33
  773. package/src/modules/organizations/router/organizations.backoffice.router.js +67 -0
  774. package/src/modules/pages/views/components/pages/Pages.vue +1 -1
  775. package/src/modules/pages/views/router/pages.router.js +2 -2
  776. package/src/modules/products/components/blocks/CardPosition.vue +2 -2
  777. package/src/modules/products/components/blocks/CardProduct.vue +2 -2
  778. package/src/modules/products/components/blocks/ProductDiscounts.vue +1 -1
  779. package/src/modules/products/components/blocks/ProductImages.vue +1 -1
  780. package/src/modules/products/components/blocks/ProductVariants.vue +3 -3
  781. package/src/modules/products/components/elements/Price.vue +2 -2
  782. package/src/modules/products/components/forms/ColumnSettingsMenu.vue +2 -2
  783. package/src/modules/products/components/forms/ReorderSettingsForm.vue +3 -3
  784. package/src/modules/products/components/forms/StockAuditForm.vue +2 -2
  785. package/src/modules/products/components/forms/StockHistoryView.vue +1 -1
  786. package/src/modules/products/components/pages/Categories.vue +9 -20
  787. package/src/modules/products/components/pages/ProductEdit.vue +19 -3
  788. package/src/modules/products/components/pages/Products.vue +20 -19
  789. package/src/modules/products/components/sections/EditAttributes.vue +1 -1
  790. package/src/modules/products/components/sections/EditCategories.vue +1 -1
  791. package/src/modules/products/components/sections/EditDiscounts.vue +2 -2
  792. package/src/modules/products/components/sections/EditVariants.vue +14 -2
  793. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  794. package/src/modules/products/components/sections/ProductConfigurator.vue +1 -1
  795. package/src/modules/products/components/sections/SectionProduct.vue +3 -3
  796. package/src/modules/products/controllers/products.controller.js +50 -5
  797. package/src/modules/products/experiments/product-recommendation/components/HeroRecommendation.vue +2 -2
  798. package/src/modules/products/models/product.model.js +7 -0
  799. package/src/modules/products/models/variant.model.js +4 -0
  800. package/src/modules/products/router/categories.router.js +2 -2
  801. package/src/modules/products/router/products.router.js +14 -3
  802. package/src/modules/rents/controllers/routes/rents.routes.js +11 -0
  803. package/src/modules/rents/controllers/services/rents.services.js +193 -2
  804. package/src/modules/rents/models/rent.model.js +9 -0
  805. package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +28 -11
  806. package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +200 -40
  807. package/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue +2 -2
  808. package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +2 -2
  809. package/src/modules/rents/views/components/pages/Rents.vue +641 -142
  810. package/src/modules/rents/views/components/pages/RentsEdit.vue +44 -4
  811. package/src/modules/rents/views/router/rents.router.js +3 -3
  812. package/src/modules/rents/views/store/rents.store.js +1 -1
  813. package/src/modules/reports/components/pages/BackofficeReports.vue +3 -3
  814. package/src/modules/reports/router/reports.router.js +1 -1
  815. package/src/modules/spots/components/blocks/CardSpot.vue +6 -6
  816. package/src/modules/spots/components/pages/Spot.vue +2 -2
  817. package/src/modules/spots/components/pages/SpotEdit.vue +8 -6
  818. package/src/modules/spots/components/pages/Spots.vue +18 -24
  819. package/src/modules/spots/components/sections/WorktimeEdit.vue +7 -7
  820. package/src/modules/spots/router/spots.router.js +3 -3
  821. package/src/modules/wallet/views/components/blocks/CashDeposit.vue +1 -1
  822. package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +3 -3
  823. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  824. package/src/modules/wallet/views/components/pages/Wallet.vue +4 -4
  825. package/src/modules/wallet/views/router/wallet.router.js +1 -1
  826. package/src/styles/layout.scss +1 -1
  827. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
  828. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +0 -1
  829. package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js +0 -70
  830. package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js.map +0 -1
  831. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js +0 -336
  832. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js.map +0 -1
  833. package/dist/node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +0 -1
@@ -1,25 +1,31 @@
1
- import { getCurrentInstance, computed, ref, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, toDisplayString } from "vue";
1
+ import { getCurrentInstance, ref, computed, watch, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, unref, withCtx, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  /* empty css */
4
- import Button from "../../../../components/Button/Button.vue2.js";
5
- import _sfc_main$2 from "../../../../components/Tab/Tab.vue2.js";
6
- import _sfc_main$3 from "../../../../components/Popup/Popup.vue.js";
7
- import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
4
+ /* empty css */
5
+ import _sfc_main$5 from "../../../../components/Tab/Tab.vue2.js";
6
+ import _sfc_main$1 from "../../../core/views/components/sections/SectionPageTitle.vue.js";
7
+ import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
8
+ import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
8
9
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
9
- import _sfc_main$5 from "../blocks/CardOrderItem.vue.js";
10
+ import _sfc_main$7 from "../blocks/CardOrderItem.vue.js";
10
11
  import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
11
- import _sfc_main$6 from "../forms/FormSelectCustomer.vue.js";
12
- import _sfc_main$7 from "../sections/FormDelivery.vue.js";
13
- import _sfc_main$8 from "../sections/FormPayment.vue.js";
12
+ import _sfc_main$3 from "../../../core/views/components/blocks/Card.vue.js";
13
+ import _sfc_main$8 from "../forms/FormSelectCustomer.vue.js";
14
+ import _sfc_main$9 from "../sections/FormDelivery.vue.js";
15
+ import _sfc_main$a from "../sections/FormPayment.vue.js";
14
16
  import { useStore } from "../../../core/views/store/core.store.js";
15
17
  import { state as state$1 } from "../../../auth/views/store/auth.js";
16
18
  import { mutations, state, actions as actions$2 } from "../../store/orders.js";
17
19
  import { actions } from "../../../organizations/store/organizations.js";
18
20
  import { actions as actions$1 } from "../../../products/store/products.js";
19
21
  import variantsStore from "../../../products/store/variants.store.js";
22
+ import { calcRentTotalPrice } from "../../utils/rent-price.js";
20
23
  /* empty css */
21
24
  const _hoisted_1 = { class: "flex flex-column pd-thin" };
22
- const _hoisted_2 = { class: "flex-v-center flex-nowrap flex" };
25
+ const _hoisted_2 = {
26
+ key: 1,
27
+ class: "o-x-hidden o-y-scroll"
28
+ };
23
29
  const _hoisted_3 = { class: "bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big" };
24
30
  const _hoisted_4 = { class: "gap-thin flex flex-column" };
25
31
  const _hoisted_5 = ["onClick"];
@@ -31,7 +37,7 @@ const _hoisted_7 = ["src"];
31
37
  const _hoisted_8 = { class: "fw-medium" };
32
38
  const _hoisted_9 = {
33
39
  key: 0,
34
- class: "t-small t-transp"
40
+ class: "t-small opacity-50"
35
41
  };
36
42
  const _hoisted_10 = { class: "mn-l-auto" };
37
43
  const _hoisted_11 = {
@@ -46,15 +52,20 @@ const _sfc_main = {
46
52
  const route = useRoute();
47
53
  const router = useRouter();
48
54
  const { proxy } = getCurrentInstance();
49
- const { formatPrice, returnCurrency } = useGlobalMixins();
55
+ const { formatPrice, returnCurrency, isPhone, isTablet } = useGlobalMixins();
50
56
  mutations.resetOrder(state.current);
57
+ const selectedOrganization = ref(null);
58
+ const orgId = computed(() => selectedOrganization.value?._id || route.params._id);
51
59
  let cartTotalPrice = computed(() => {
52
60
  return Number(state.current.positions.reduce((total, product) => {
53
61
  if (product.listing === "rent" && product.date?.start && product.date?.end) {
54
- const start = new Date(product.date.start);
55
- const end = new Date(product.date.end);
56
- const days = Math.ceil(Math.abs(end - start) / (1e3 * 60 * 60 * 24)) + 1;
57
- return total + product.price * product.quantity * days;
62
+ return total + calcRentTotalPrice(
63
+ product.price,
64
+ product.quantity,
65
+ product.date.start,
66
+ product.date.end,
67
+ product.rentPeriod || "day"
68
+ );
58
69
  } else {
59
70
  return total + product.price * product.quantity;
60
71
  }
@@ -93,11 +104,14 @@ const _sfc_main = {
93
104
  try {
94
105
  let selectedDates = null;
95
106
  if (selectedProduct.value.listing === "rent") {
107
+ const rentPeriod = selectedProduct.value.rentPeriod || "day";
108
+ const enableTime = ["hour", "4hours", "flat"].includes(rentPeriod);
96
109
  selectedDates = await proxy.$dateSelector(
97
110
  selectedProduct.value._id,
98
111
  variant._id,
99
112
  1,
100
- variant.price || selectedProduct.value.price
113
+ variant.price || selectedProduct.value.price,
114
+ { enableTime, periodType: rentPeriod }
101
115
  );
102
116
  if (!selectedDates) {
103
117
  return;
@@ -113,7 +127,8 @@ const _sfc_main = {
113
127
  unit: variant.unit || selectedProduct.value.unit,
114
128
  date: selectedDates,
115
129
  variant: variant._id,
116
- org_id: route.params._id
130
+ rentPeriod: selectedProduct.value.rentPeriod || "day",
131
+ org_id: orgId.value
117
132
  };
118
133
  store.core.actions.add(state.current.positions, position);
119
134
  closeVariantsPopup();
@@ -164,12 +179,9 @@ const _sfc_main = {
164
179
  };
165
180
  state.current.owner = {
166
181
  type: "Organization",
167
- target: route.params._id
168
- };
169
- state.current.customer = {
170
- type: "Customer",
171
- target: state.current.customer._id || null
182
+ target: orgId.value
172
183
  };
184
+ state.current.customer = state.current.customer._id ? { type: "Customer", target: state.current.customer._id } : { type: "Customer", target: null, phone: state.current.customer.phone, email: state.current.customer.email, profile: { name: state.current.customer.profile?.name } };
173
185
  order.value = await actions$2.create(state.current);
174
186
  }
175
187
  function redirectTo() {
@@ -177,55 +189,110 @@ const _sfc_main = {
177
189
  name: route.meta.context === "backoffice" ? "BackofficeOrderEdit" : "OrganizationOrderEdit",
178
190
  params: {
179
191
  order: order.value._id,
180
- _id: route.params._id
192
+ _id: orgId.value
181
193
  }
182
194
  });
183
195
  }
184
196
  const orderOrganization = ref({});
197
+ watch(selectedOrganization, async (org) => {
198
+ if (org) {
199
+ orderOrganization.value = await actions.read({
200
+ _id: org._id,
201
+ lookup: ["spots"]
202
+ });
203
+ }
204
+ });
185
205
  onMounted(async () => {
186
- orderOrganization.value = await actions.read({
187
- _id: route.params._id,
188
- lookup: ["spots"]
189
- });
206
+ if (route.params._id) {
207
+ orderOrganization.value = await actions.read({
208
+ _id: route.params._id,
209
+ lookup: ["spots"]
210
+ });
211
+ selectedOrganization.value = orderOrganization.value[0];
212
+ } else {
213
+ const orgs = await actions.read({ user: state$1.user._id });
214
+ if (orgs?.length) {
215
+ selectedOrganization.value = orgs[0];
216
+ }
217
+ }
190
218
  });
191
219
  return (_ctx, _cache) => {
192
220
  return openBlock(), createElementBlock("div", _hoisted_1, [
193
- createVNode(_sfc_main$1, { class: "mn-b-thin" }, {
221
+ createVNode(_sfc_main$1, {
222
+ title: "Add Order",
223
+ actions: [
224
+ { method: async () => {
225
+ await onSubmit();
226
+ redirectTo();
227
+ }, label: "Save Order" }
228
+ ],
229
+ class: "mn-b-thin"
230
+ }, null, 8, ["actions"]),
231
+ !unref(route).params._id ? (openBlock(), createBlock(_sfc_main$2, {
232
+ key: 0,
233
+ title: "Organization",
234
+ class: "mn-b-small"
235
+ }, {
194
236
  default: withCtx(() => [
195
- createElementVNode("header", _hoisted_2, [
196
- _cache[4] || (_cache[4] = createElementVNode("h2", { class: "mn-r-auto" }, "Create Order", -1)),
197
- createVNode(Button, {
198
- submit: onSubmit,
199
- callback: redirectTo,
200
- class: "pd-small radius-big bg-main t-black uppercase fw-medium"
237
+ selectedOrganization.value ? (openBlock(), createBlock(_sfc_main$3, {
238
+ key: 0,
239
+ photo: selectedOrganization.value.profile?.photo,
240
+ title: selectedOrganization.value.profile?.name,
241
+ classImage: "h-3r w-3r radius-small o-hidden flex-shrink-0",
242
+ onClick: _cache[0] || (_cache[0] = () => {
243
+ selectedOrganization.value = null;
244
+ }),
245
+ class: "h-4r w-100 bg-white pd-thin radius-medium mn-b-thin flex-v-center flex-nowrap flex gap-thin cursor-pointer"
246
+ }, null, 8, ["photo", "title"])) : (openBlock(), createElementBlock("section", _hoisted_2, [
247
+ createVNode(_sfc_main$4, {
248
+ showLoadMore: false,
249
+ search: { placeholder: "Search organization...", class: "bg-white mn-b-thin" },
250
+ states: { empty: { title: "No organizations", description: "No organizations found." } },
251
+ store: { read: (options) => actions.read(options), state: null },
252
+ options: { user: state$1.user._id }
201
253
  }, {
202
- default: withCtx(() => _cache[3] || (_cache[3] = [
203
- createTextVNode(" Add Order ")
204
- ])),
254
+ default: withCtx(({ items }) => [
255
+ (openBlock(true), createElementBlock(Fragment, null, renderList(items, (org) => {
256
+ return openBlock(), createBlock(_sfc_main$3, {
257
+ key: org._id,
258
+ photo: org.profile?.photo,
259
+ title: org.profile?.name,
260
+ classImage: "h-3r w-3r radius-small o-hidden flex-shrink-0",
261
+ onClick: () => {
262
+ selectedOrganization.value = org;
263
+ },
264
+ class: "h-4r bg-white pd-thin radius-medium w-100 mn-b-thin cursor-pointer flex-v-center flex-nowrap flex gap-thin"
265
+ }, null, 8, ["photo", "title", "onClick"]);
266
+ }), 128))
267
+ ]),
205
268
  _: 1
206
- })
207
- ])
269
+ }, 8, ["store", "options"])
270
+ ]))
208
271
  ]),
209
272
  _: 1
210
- }),
211
- createVNode(_sfc_main$2, {
273
+ })) : createCommentVNode("", true),
274
+ createVNode(_sfc_main$5, {
212
275
  selected: tabOrderCreate.value,
213
- "onUpdate:selected": _cache[0] || (_cache[0] = ($event) => tabOrderCreate.value = $event),
276
+ "onUpdate:selected": _cache[1] || (_cache[1] = ($event) => tabOrderCreate.value = $event),
214
277
  tabs: [
215
278
  { name: "Positions", value: "positions" },
216
279
  { name: "Customer", value: "customer" },
217
280
  { name: "Delivery", value: "delivery" },
218
281
  { name: "Payment", value: "payment" }
219
282
  ],
220
- class: "fw-medium radius-medium bg-light mn-b-small"
283
+ class: "fw-medium radius-medium bg-light pd-thin mn-b-small"
221
284
  }, null, 8, ["selected"]),
222
- createVNode(_sfc_main$3, {
285
+ createVNode(_sfc_main$6, {
223
286
  onClosePopup: closeProductsPopup,
224
287
  isPopupOpen: isOpenProductsPopup.value,
225
- class: "bg-white flex flex-column radius-big pd-medium pos-relative"
288
+ align: unref(isPhone)() || unref(isTablet)() ? "bottom center" : "center center",
289
+ class: normalizeClass([
290
+ "bg-white flex flex-column radius-big pd-medium pos-relative",
291
+ unref(isPhone)() || unref(isTablet)() ? "w-100 radius-zero radius-tr-medium radius-tl-medium h-max-80" : "w-min-30r w-max-30r"
292
+ ])
226
293
  }, {
227
294
  default: withCtx(() => [
228
- _cache[5] || (_cache[5] = createElementVNode("h3", { class: "mn-b-small" }, "Add to order", -1)),
295
+ _cache[4] || (_cache[4] = createElementVNode("h3", { class: "mn-b-small" }, "Add to order", -1)),
229
296
  createElementVNode("div", _hoisted_3, [
230
297
  createVNode(_sfc_main$4, {
231
298
  showLoadMore: false,
@@ -247,7 +314,7 @@ const _sfc_main = {
247
314
  state: null
248
315
  },
249
316
  options: {
250
- owner: unref(route).params._id
317
+ owner: orgId.value
251
318
  },
252
319
  class: ""
253
320
  }, {
@@ -255,7 +322,7 @@ const _sfc_main = {
255
322
  items
256
323
  }) => [
257
324
  (openBlock(true), createElementBlock(Fragment, null, renderList(items, (product, index) => {
258
- return openBlock(), createBlock(_sfc_main$5, {
325
+ return openBlock(), createBlock(_sfc_main$7, {
259
326
  key: `${product._id}_${index}`,
260
327
  editable: false,
261
328
  productId: product._id,
@@ -271,12 +338,16 @@ const _sfc_main = {
271
338
  ])
272
339
  ]),
273
340
  _: 1
274
- }, 8, ["isPopupOpen"]),
275
- createVNode(_sfc_main$3, {
341
+ }, 8, ["isPopupOpen", "align", "class"]),
342
+ createVNode(_sfc_main$6, {
276
343
  title: "Select variant",
277
344
  onClosePopup: closeVariantsPopup,
278
345
  isPopupOpen: isVariantsPopupOpen.value,
279
- class: "bg-white w-100 w-max-30r radius-medium pd-medium"
346
+ align: unref(isPhone)() || unref(isTablet)() ? "bottom center" : "center center",
347
+ class: normalizeClass([
348
+ "bg-white w-100 radius-medium pd-medium",
349
+ unref(isPhone)() || unref(isTablet)() ? "radius-zero radius-tr-medium radius-tl-medium" : "w-max-30r"
350
+ ])
280
351
  }, {
281
352
  default: withCtx(() => [
282
353
  createVNode(_sfc_main$4, {
@@ -325,9 +396,9 @@ const _sfc_main = {
325
396
  }, 8, ["store", "options"])
326
397
  ]),
327
398
  _: 1
328
- }, 8, ["isPopupOpen"]),
329
- tabOrderCreate.value === "positions" ? (openBlock(), createBlock(_sfc_main$1, {
330
- key: 0,
399
+ }, 8, ["isPopupOpen", "align", "class"]),
400
+ tabOrderCreate.value === "positions" ? (openBlock(), createBlock(_sfc_main$2, {
401
+ key: 1,
331
402
  title: "Positions",
332
403
  actions: [{
333
404
  label: "+",
@@ -338,7 +409,7 @@ const _sfc_main = {
338
409
  default: withCtx(() => [
339
410
  state.current.positions.length === 0 ? (openBlock(), createElementBlock("span", _hoisted_11, " No positions added yet ")) : createCommentVNode("", true),
340
411
  (openBlock(true), createElementBlock(Fragment, null, renderList(state.current.positions, (product, index) => {
341
- return openBlock(), createBlock(_sfc_main$5, {
412
+ return openBlock(), createBlock(_sfc_main$7, {
342
413
  key: `${product._id}_${product.variant || "no-variant"}_${index}`,
343
414
  editable: true,
344
415
  productId: product._id,
@@ -349,37 +420,39 @@ const _sfc_main = {
349
420
  unit: product.unit,
350
421
  dates: product.date,
351
422
  listing: product.listing,
423
+ rentPeriod: product.rentPeriod || "day",
352
424
  price: product.price,
353
425
  increase: () => incrementOrderItemQuantity(product._id, product.variant),
354
426
  decrease: () => decrementOrderItemQuantity(product._id, product.variant),
355
427
  remove: () => removeOrderItem(product._id, product.variant),
356
- onUpdateRentDates: _cache[1] || (_cache[1] = (productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)),
428
+ onUpdateRentDates: _cache[2] || (_cache[2] = (productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)),
357
429
  class: "mn-b-thin pd-thin radius-medium bg-white"
358
- }, null, 8, ["productId", "variantId", "images", "name", "quantity", "unit", "dates", "listing", "price", "increase", "decrease", "remove"]);
430
+ }, null, 8, ["productId", "variantId", "images", "name", "quantity", "unit", "dates", "listing", "rentPeriod", "price", "increase", "decrease", "remove"]);
359
431
  }), 128))
360
432
  ]),
361
433
  _: 1
362
434
  }, 8, ["actions"])) : createCommentVNode("", true),
363
- tabOrderCreate.value === "customer" ? (openBlock(), createBlock(_sfc_main$6, {
364
- key: 1,
435
+ tabOrderCreate.value === "customer" ? (openBlock(), createBlock(_sfc_main$8, {
436
+ key: 2,
365
437
  customer: state.current.customer,
366
- "onUpdate:customer": _cache[2] || (_cache[2] = ($event) => state.current.customer = $event),
438
+ "onUpdate:customer": _cache[3] || (_cache[3] = ($event) => state.current.customer = $event),
439
+ orgId: orgId.value,
367
440
  class: "mn-b-semi"
368
- }, null, 8, ["customer"])) : createCommentVNode("", true),
369
- tabOrderCreate.value === "delivery" ? (openBlock(), createBlock(_sfc_main$7, {
370
- key: 2,
441
+ }, null, 8, ["customer", "orgId"])) : createCommentVNode("", true),
442
+ tabOrderCreate.value === "delivery" ? (openBlock(), createBlock(_sfc_main$9, {
443
+ key: 3,
371
444
  order: state.current,
372
445
  organization: orderOrganization.value[0]
373
446
  }, null, 8, ["order", "organization"])) : createCommentVNode("", true),
374
- tabOrderCreate.value === "payment" ? (openBlock(), createBlock(_sfc_main$8, {
375
- key: 3,
447
+ tabOrderCreate.value === "payment" ? (openBlock(), createBlock(_sfc_main$a, {
448
+ key: 4,
376
449
  order: state.current,
377
450
  organization: orderOrganization.value[0]
378
451
  }, null, 8, ["order", "organization"])) : createCommentVNode("", true),
379
- createVNode(_sfc_main$1, { class: "mn-b-semi" }, {
452
+ createVNode(_sfc_main$2, { class: "mn-b-semi" }, {
380
453
  default: withCtx(() => [
381
454
  createElementVNode("div", _hoisted_12, [
382
- _cache[6] || (_cache[6] = createElementVNode("span", { class: "mn-r-auto t-transp" }, "In total", -1)),
455
+ _cache[5] || (_cache[5] = createElementVNode("span", { class: "mn-r-auto opacity-50" }, "In total", -1)),
383
456
  createElementVNode("span", null, toDisplayString(unref(cartTotalPrice)) + " " + toDisplayString(unref(returnCurrency)()), 1)
384
457
  ])
385
458
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"OrderCreateBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"flex flex-column pd-thin\">\n <Block class=\"mn-b-thin\">\n <header class=\"flex-v-center flex-nowrap flex\">\n <h2 class=\"mn-r-auto\">Create Order</h2>\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase fw-medium\"\n >\n Add Order \n </Button>\n </header>\n </Block>\n\n <Tab \n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"fw-medium radius-medium bg-light mn-b-small\"\n />\n\n <Popup \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white flex flex-column radius-big pd-medium pos-relative\"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :showLoadMore=\"false\"\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n },\n skeleton: {\n hide: true\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" \n :key=\"`${product._id}_${index}`\"\n :editable=\"false\" \n :productId=\"product._id\"\n :images=\"product.images\"\n :name=\"product.name\"\n @click=\"() => selectProduct(product)\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <!-- Popup for selecting variant of the product -->\n <Popup \n title=\"Select variant\" \n @close-popup=\"closeVariantsPopup\" \n :isPopupOpen=\"isVariantsPopupOpen\"\n class=\"bg-white w-100 w-max-30r radius-medium pd-medium\"\n >\n <Feed\n :store=\"variants\"\n :options=\"{\n product: selectedProduct?._id,\n }\"\n :skeleton=\"{\n structure: [\n { block: 'text', size: 'small' },\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'small' }\n ]\n }\"\n :states=\"{\n empty: {\n title: 'No variants',\n description: 'Create your first variant'\n }\n }\"\n v-slot=\"{ items }\"\n >\n <div class=\"gap-thin flex flex-column\">\n <div \n v-for=\"(variant, index) in items\" \n :key=\"index\"\n @click=\"addVariantToOrder(variant)\"\n class=\"w-100 cursor-pointer hover:scale-[1.05] bg-light pd-small radius-small flex-v-center flex-nowrap flex gap-thin\"\n >\n <div v-if=\"variant.images && variant.images.length\" class=\"aspect-1x1 h-3r radius-small o-hidden\">\n <img \n :src=\"(FILE_SERVER_URL || '') + variant.images[0]\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n </div>\n <div>\n <p class=\"fw-medium\">{{ variant.name || 'Default variant' }}</p>\n <p v-if=\"variant.attributes && variant.attributes.length\" class=\"t-small t-transp\">\n {{ variant.attributes.map(attr => `${attr.name}: ${attr.value}`).join(', ') }}\n </p>\n </div>\n <p class=\"mn-l-auto\">{{ formatPrice(variant.price || variant.cost) }}</p>\n </div>\n </div>\n </Feed>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n :editable=\"true\" \n :productId=\"product._id\"\n :variantId=\"product.variant\"\n :images=\"product.images\"\n :name=\"product.name\"\n :quantity=\"product.quantity\"\n :unit=\"product.unit\"\n :dates=\"product.date\"\n :listing=\"product.listing\"\n :price=\"product.price\"\n :increase=\"() => incrementOrderItemQuantity(product._id, product.variant)\"\n :decrease=\"() => decrementOrderItemQuantity(product._id, product.variant)\"\n :remove=\"() => removeOrderItem(product._id, product.variant)\"\n @updateRentDates=\"(productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <FormSelectCustomer\n v-if=\"tabOrderCreate === 'customer'\"\n v-model:customer=\"orders.state.current.customer\"\n class=\"mn-b-semi\"\n />\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\"\n :organization=\"orderOrganization[0]\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n :organization=\"orderOrganization[0]\" \n />\n\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto t-transp\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch, getCurrentInstance } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@martyrs/src/components/Field/Field.vue'\n import Button from \"@martyrs/src/components/Button/Button.vue\"; \n import Tab from '@martyrs/src/components/Tab/Tab.vue'\n import Popup from '@martyrs/src/components/Popup/Popup.vue';\n\timport Block from '@martyrs/src/components/Block/Block.vue';\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@martyrs/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@martyrs/src/modules/auth/views/components/blocks/CardUser.vue'\n\n import BlockSearch from '@martyrs/src/modules/core/views/components/blocks/BlockSearch.vue'\n\n import FormSelectCustomer from '@martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue'\n import FormDelivery from '@martyrs/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as orders from '@martyrs/src/modules/orders/store/orders.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import * as products from '@martyrs/src/modules/products/store/products.js';\n import variants from '@martyrs/src/modules/products/store/variants.store.js';\n\n import customers from '@martyrs/src/modules/orders/store/customers.store';\n\n import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n const store = useStore()\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n const { proxy } = getCurrentInstance()\n const { formatPrice, returnCurrency } = useGlobalMixins()\n\n orders.mutations.resetOrder(orders.state.current)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n if (product.listing === 'rent' && product.date?.start && product.date?.end) {\n const start = new Date(product.date.start);\n const end = new Date(product.date.end);\n const days = Math.ceil(Math.abs(end - start) / (1000 * 60 * 60 * 24)) + 1;\n return total + product.price * product.quantity * days;\n } else {\n return total + product.price * product.quantity;\n }\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n const isVariantsPopupOpen = ref(false);\n const selectedProduct = ref(null);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n function closeVariantsPopup() {\n isVariantsPopupOpen.value = false;\n selectedProduct.value = null;\n }\n\n function selectProduct(product) {\n selectedProduct.value = product;\n closeProductsPopup();\n \n // If product has only one variant, add it directly without showing popup\n if (product.variants && product.variants.length === 1) {\n addVariantToOrder(product.variants[0]);\n return;\n }\n \n // If product has multiple variants or no variants defined, show popup\n isVariantsPopupOpen.value = true;\n }\n\n function formatProductName(product, variant) {\n if (!variant || product.variants?.length === 1 && !(variant.attributes?.length))\n return product.name;\n\n const attrs = variant.attributes?.map(a => a.value).filter(Boolean);\n return attrs?.length\n ? `${product.name} / ${attrs.join(' / ')}`\n : `${product.name} / ${variant.name}`;\n }\n\n async function addVariantToOrder(variant) {\n try {\n let selectedDates = null;\n \n // Если товар для аренды, сначала выбираем даты\n if (selectedProduct.value.listing === 'rent') {\n selectedDates = await proxy.$dateSelector(\n selectedProduct.value._id,\n variant._id,\n 1,\n variant.price || selectedProduct.value.price\n );\n \n if (!selectedDates) {\n // Если отменили выбор дат, возвращаемся к выбору вариантов\n return;\n }\n }\n \n const position = {\n _id: selectedProduct.value._id,\n images: variant.images?.length > 0 ? variant.images : selectedProduct.value.images,\n name: formatProductName(selectedProduct.value, variant),\n listing: selectedProduct.value.listing,\n price: variant.price || selectedProduct.value.price,\n quantity: 1,\n unit: variant.unit || selectedProduct.value.unit,\n date: selectedDates,\n variant: variant._id,\n org_id: route.params._id\n };\n\n store.core.actions.add(orders.state.current.positions, position);\n closeVariantsPopup();\n } catch (error) {\n console.error('Error adding variant to order:', error);\n }\n }\n\n\n // Функции управления позициями заказа\n function incrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity++;\n }\n }\n\n function decrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity--;\n \n if (orderItem.quantity < 1) {\n removeOrderItem(productId, variantId);\n }\n }\n }\n\n function removeOrderItem(productId, variantId) {\n const itemIndex = orders.state.current.positions.findIndex(item => \n item._id === productId && item.variant === variantId\n );\n \n if (itemIndex > -1) {\n orders.state.current.positions.splice(itemIndex, 1);\n }\n }\n\n function updateOrderRentDates(productId, variantId, dates) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.date = dates;\n }\n }\n\n // Data\n let order = ref(null)\n\n async function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: route.params._id,\n }\n\n orders.state.current.customer = {\n type: 'Customer',\n target: orders.state.current.customer._id || null,\n }\n\n order.value = await orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: route.meta.context === 'backoffice' ? 'BackofficeOrderEdit' : 'OrganizationOrderEdit',\n params: { \n order: order.value._id,\n _id: route.params._id\n } \n })\n }\n\n const orderOrganization = ref({})\n\n\n\n onMounted(async() => {\n\n orderOrganization.value = await organizations.actions.read({\n _id: route.params._id,\n lookup: ['spots']\n })\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["orders.mutations","orders.state","auth.state","orders.actions","organizations.actions"],"mappings":"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"}
1
+ {"version":3,"file":"OrderCreateBackoffice.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"flex flex-column pd-thin\">\n <SectionPageTitle\n title=\"Add Order\"\n :actions=\"[\n { method: async () => { await onSubmit(); redirectTo(); }, label: 'Save Order' }\n ]\"\n class=\"mn-b-thin\"\n />\n\n <!-- Выбор организации (backoffice context) -->\n <Block v-if=\"!route.params._id\" title=\"Organization\" class=\"mn-b-small\">\n <Card\n v-if=\"selectedOrganization\"\n :photo=\"selectedOrganization.profile?.photo\"\n :title=\"selectedOrganization.profile?.name\"\n classImage=\"h-3r w-3r radius-small o-hidden flex-shrink-0\"\n @click=\"() => { selectedOrganization = null }\"\n class=\"h-4r w-100 bg-white pd-thin radius-medium mn-b-thin flex-v-center flex-nowrap flex gap-thin cursor-pointer\"\n />\n <section v-else class=\"o-x-hidden o-y-scroll\">\n <Feed\n :showLoadMore=\"false\"\n :search=\"{ placeholder: 'Search organization...', class: 'bg-white mn-b-thin' }\"\n :states=\"{ empty: { title: 'No organizations', description: 'No organizations found.' } }\"\n :store=\"{ read: (options) => organizations.actions.read(options), state: null }\"\n :options=\"{ user: auth.state.user._id }\"\n v-slot=\"{ items }\"\n >\n <Card\n v-for=\"org in items\"\n :key=\"org._id\"\n :photo=\"org.profile?.photo\"\n :title=\"org.profile?.name\"\n classImage=\"h-3r w-3r radius-small o-hidden flex-shrink-0\"\n @click=\"() => { selectedOrganization = org }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin cursor-pointer flex-v-center flex-nowrap flex gap-thin\"\n />\n </Feed>\n </section>\n </Block>\n\n <Tab\n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"fw-medium radius-medium bg-light pd-thin mn-b-small\"\n />\n\n <Popup\n @close-popup=\"closeProductsPopup\"\n :isPopupOpen=\"isOpenProductsPopup\"\n :align=\"isPhone() || isTablet() ? 'bottom center' : 'center center'\"\n class=\"bg-white flex flex-column radius-big pd-medium pos-relative\"\n :class=\"\n isPhone() || isTablet()\n ? 'w-100 radius-zero radius-tr-medium radius-tl-medium h-max-80'\n : 'w-min-30r w-max-30r'\n \"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :showLoadMore=\"false\"\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n },\n skeleton: {\n hide: true\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n owner: orgId\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" \n :key=\"`${product._id}_${index}`\"\n :editable=\"false\" \n :productId=\"product._id\"\n :images=\"product.images\"\n :name=\"product.name\"\n @click=\"() => selectProduct(product)\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <!-- Popup for selecting variant of the product -->\n <Popup\n title=\"Select variant\"\n @close-popup=\"closeVariantsPopup\"\n :isPopupOpen=\"isVariantsPopupOpen\"\n :align=\"isPhone() || isTablet() ? 'bottom center' : 'center center'\"\n class=\"bg-white w-100 radius-medium pd-medium\"\n :class=\"\n isPhone() || isTablet()\n ? 'radius-zero radius-tr-medium radius-tl-medium'\n : 'w-max-30r'\n \"\n >\n <Feed\n :store=\"variants\"\n :options=\"{\n product: selectedProduct?._id,\n }\"\n :skeleton=\"{\n structure: [\n { block: 'text', size: 'small' },\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'small' }\n ]\n }\"\n :states=\"{\n empty: {\n title: 'No variants',\n description: 'Create your first variant'\n }\n }\"\n v-slot=\"{ items }\"\n >\n <div class=\"gap-thin flex flex-column\">\n <div \n v-for=\"(variant, index) in items\" \n :key=\"index\"\n @click=\"addVariantToOrder(variant)\"\n class=\"w-100 cursor-pointer hover:scale-[1.05] bg-light pd-small radius-small flex-v-center flex-nowrap flex gap-thin\"\n >\n <div v-if=\"variant.images && variant.images.length\" class=\"aspect-1x1 h-3r radius-small o-hidden\">\n <img \n :src=\"(FILE_SERVER_URL || '') + variant.images[0]\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n </div>\n <div>\n <p class=\"fw-medium\">{{ variant.name || 'Default variant' }}</p>\n <p v-if=\"variant.attributes && variant.attributes.length\" class=\"t-small opacity-50\">\n {{ variant.attributes.map(attr => `${attr.name}: ${attr.value}`).join(', ') }}\n </p>\n </div>\n <p class=\"mn-l-auto\">{{ formatPrice(variant.price || variant.cost) }}</p>\n </div>\n </div>\n </Feed>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"`${product._id}_${product.variant || 'no-variant'}_${index}`\"\n :editable=\"true\" \n :productId=\"product._id\"\n :variantId=\"product.variant\"\n :images=\"product.images\"\n :name=\"product.name\"\n :quantity=\"product.quantity\"\n :unit=\"product.unit\"\n :dates=\"product.date\"\n :listing=\"product.listing\"\n :rentPeriod=\"product.rentPeriod || 'day'\"\n :price=\"product.price\"\n :increase=\"() => incrementOrderItemQuantity(product._id, product.variant)\"\n :decrease=\"() => decrementOrderItemQuantity(product._id, product.variant)\"\n :remove=\"() => removeOrderItem(product._id, product.variant)\"\n @updateRentDates=\"(productId, variantId, dates) => updateOrderRentDates(productId, variantId, dates)\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <FormSelectCustomer\n v-if=\"tabOrderCreate === 'customer'\"\n v-model:customer=\"orders.state.current.customer\"\n :orgId=\"orgId\"\n class=\"mn-b-semi\"\n />\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\"\n :organization=\"orderOrganization[0]\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n :organization=\"orderOrganization[0]\" \n />\n\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto opacity-50\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch, getCurrentInstance } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@martyrs/src/components/Field/Field.vue'\n import Button from \"@martyrs/src/components/Button/Button.vue\";\n import Tab from '@martyrs/src/components/Tab/Tab.vue'\n import SectionPageTitle from '@martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue'\n import Popup from '@martyrs/src/components/Popup/Popup.vue';\n\timport Block from '@martyrs/src/components/Block/Block.vue';\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@martyrs/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@martyrs/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@martyrs/src/modules/core/views/components/blocks/CardUser.vue'\n import Card from '@martyrs/src/modules/core/views/components/blocks/Card.vue'\n\n import BlockSearch from '@martyrs/src/modules/core/views/components/blocks/BlockSearch.vue'\n\n import FormSelectCustomer from '@martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue'\n import FormDelivery from '@martyrs/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@martyrs/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as orders from '@martyrs/src/modules/orders/store/orders.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import * as products from '@martyrs/src/modules/products/store/products.js';\n import variants from '@martyrs/src/modules/products/store/variants.store.js';\n\n import customers from '@martyrs/src/modules/orders/store/customers.store';\n\n import { calcRentTotalPrice } from '@martyrs/src/modules/orders/utils/rent-price.js';\n import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js';\n\n const store = useStore()\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n const { proxy } = getCurrentInstance()\n const { formatPrice, returnCurrency, isPhone, isTablet } = useGlobalMixins()\n\n orders.mutations.resetOrder(orders.state.current)\n\n // Organization selection (backoffice context without route.params._id)\n const selectedOrganization = ref(null)\n const orgId = computed(() => selectedOrganization.value?._id || route.params._id)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n if (product.listing === 'rent' && product.date?.start && product.date?.end) {\n return total + calcRentTotalPrice(\n product.price,\n product.quantity,\n product.date.start,\n product.date.end,\n product.rentPeriod || 'day'\n );\n } else {\n return total + product.price * product.quantity;\n }\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n const isVariantsPopupOpen = ref(false);\n const selectedProduct = ref(null);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n function closeVariantsPopup() {\n isVariantsPopupOpen.value = false;\n selectedProduct.value = null;\n }\n\n function selectProduct(product) {\n selectedProduct.value = product;\n closeProductsPopup();\n \n // If product has only one variant, add it directly without showing popup\n if (product.variants && product.variants.length === 1) {\n addVariantToOrder(product.variants[0]);\n return;\n }\n \n // If product has multiple variants or no variants defined, show popup\n isVariantsPopupOpen.value = true;\n }\n\n function formatProductName(product, variant) {\n if (!variant || product.variants?.length === 1 && !(variant.attributes?.length))\n return product.name;\n\n const attrs = variant.attributes?.map(a => a.value).filter(Boolean);\n return attrs?.length\n ? `${product.name} / ${attrs.join(' / ')}`\n : `${product.name} / ${variant.name}`;\n }\n\n async function addVariantToOrder(variant) {\n try {\n let selectedDates = null;\n \n // Если товар для аренды, сначала выбираем даты\n if (selectedProduct.value.listing === 'rent') {\n const rentPeriod = selectedProduct.value.rentPeriod || 'day'\n const enableTime = ['hour', '4hours', 'flat'].includes(rentPeriod)\n selectedDates = await proxy.$dateSelector(\n selectedProduct.value._id,\n variant._id,\n 1,\n variant.price || selectedProduct.value.price,\n { enableTime, periodType: rentPeriod }\n );\n \n if (!selectedDates) {\n // Если отменили выбор дат, возвращаемся к выбору вариантов\n return;\n }\n }\n \n const position = {\n _id: selectedProduct.value._id,\n images: variant.images?.length > 0 ? variant.images : selectedProduct.value.images,\n name: formatProductName(selectedProduct.value, variant),\n listing: selectedProduct.value.listing,\n price: variant.price || selectedProduct.value.price,\n quantity: 1,\n unit: variant.unit || selectedProduct.value.unit,\n date: selectedDates,\n variant: variant._id,\n rentPeriod: selectedProduct.value.rentPeriod || 'day',\n org_id: orgId.value\n };\n\n store.core.actions.add(orders.state.current.positions, position);\n closeVariantsPopup();\n } catch (error) {\n console.error('Error adding variant to order:', error);\n }\n }\n\n\n // Функции управления позициями заказа\n function incrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity++;\n }\n }\n\n function decrementOrderItemQuantity(productId, variantId) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.quantity--;\n \n if (orderItem.quantity < 1) {\n removeOrderItem(productId, variantId);\n }\n }\n }\n\n function removeOrderItem(productId, variantId) {\n const itemIndex = orders.state.current.positions.findIndex(item => \n item._id === productId && item.variant === variantId\n );\n \n if (itemIndex > -1) {\n orders.state.current.positions.splice(itemIndex, 1);\n }\n }\n\n function updateOrderRentDates(productId, variantId, dates) {\n const orderItem = orders.state.current.positions.find(item => \n item._id === productId && item.variant === variantId\n );\n \n if (orderItem) {\n orderItem.date = dates;\n }\n }\n\n // Data\n let order = ref(null)\n\n async function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: orgId.value,\n }\n\n orders.state.current.customer = orders.state.current.customer._id\n ? { type: 'Customer', target: orders.state.current.customer._id }\n : { type: 'Customer', target: null, phone: orders.state.current.customer.phone, email: orders.state.current.customer.email, profile: { name: orders.state.current.customer.profile?.name } }\n\n order.value = await orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: route.meta.context === 'backoffice' ? 'BackofficeOrderEdit' : 'OrganizationOrderEdit',\n params: {\n order: order.value._id,\n _id: orgId.value\n } \n })\n }\n\n const orderOrganization = ref({})\n\n\n\n watch(selectedOrganization, async (org) => {\n if (org) {\n orderOrganization.value = await organizations.actions.read({\n _id: org._id,\n lookup: ['spots']\n })\n }\n })\n\n onMounted(async() => {\n if (route.params._id) {\n orderOrganization.value = await organizations.actions.read({\n _id: route.params._id,\n lookup: ['spots']\n })\n selectedOrganization.value = orderOrganization.value[0]\n } else {\n const orgs = await organizations.actions.read({ user: auth.state.user._id })\n if (orgs?.length) {\n selectedOrganization.value = orgs[0]\n }\n }\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["orders.mutations","orders.state","auth.state","orders.actions","organizations.actions"],"mappings":"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"}
@@ -1,24 +1,26 @@
1
- import { ref, computed, resolveComponent, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx, createElementVNode, toDisplayString, normalizeClass, Fragment, renderList } from "vue";
2
- import { useRoute } from "vue-router";
3
- import _sfc_main$3 from "../../../../components/Tab/Tab.vue2.js";
1
+ import { ref, computed, resolveComponent, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx, createElementVNode, normalizeClass, Fragment, renderList } from "vue";
2
+ import { useRoute, useRouter } from "vue-router";
3
+ import _sfc_main$4 from "../../../../components/Tab/Tab.vue2.js";
4
4
  import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
5
- import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
5
+ import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
6
6
  import { state, actions, getters } from "../../store/orders.js";
7
7
  import { state as state$1 } from "../../../auth/views/store/auth.js";
8
- import _sfc_main$6 from "../blocks/CardOrderUser.vue.js";
9
- import _sfc_main$5 from "../blocks/CardOrderBackoffice.vue.js";
8
+ import _sfc_main$3 from "../../../core/views/components/blocks/CardStat.vue.js";
9
+ import _sfc_main$7 from "../blocks/CardOrderUser.vue.js";
10
+ import _sfc_main$6 from "../blocks/CardOrderBackoffice.vue.js";
10
11
  import _sfc_main$1 from "../../../core/views/components/sections/SectionPageTitle.vue.js";
11
12
  import { useGlobalMixins } from "../../../core/views/mixins/mixins.js";
13
+ import { useStore } from "../../../core/views/store/core.store.js";
12
14
  const _hoisted_1 = { class: "mobile:pd-thin pd-medium" };
13
- const _hoisted_2 = { class: "gap-micro flex-nowrap flex" };
14
- const _hoisted_3 = { class: "w-100 bg-white radius-small pd-small" };
15
- const _hoisted_4 = { class: "w-100 bg-white radius-small pd-small" };
16
- const _hoisted_5 = { class: "w-100 bg-white radius-small pd-small" };
15
+ const _hoisted_2 = { class: "flex gap-micro mobile:flex-column" };
17
16
  const _sfc_main = {
18
17
  __name: "Orders",
19
18
  setup(__props) {
19
+ const store = useStore();
20
20
  const route = useRoute();
21
+ const router = useRouter();
21
22
  const { returnCurrency, formatPrice, formatDate } = useGlobalMixins();
23
+ const orderStatuses = store.core.state.options?.orders?.statuses || [];
22
24
  const tab = ref("all");
23
25
  const tabs = [
24
26
  { label: "All Orders", value: "all" },
@@ -28,9 +30,9 @@ const _sfc_main = {
28
30
  const tabStatusFilter = computed(() => {
29
31
  switch (tab.value) {
30
32
  case "in_progress":
31
- return ["created", "confirmed", "processing", "preparing", "shipped"];
33
+ return ["created", "confirmed", "in_progress"];
32
34
  case "returns":
33
- return ["cancelled", "canceled", "returned"];
35
+ return ["canceled"];
34
36
  default:
35
37
  return null;
36
38
  }
@@ -38,6 +40,9 @@ const _sfc_main = {
38
40
  const totalPrice = computed(() => {
39
41
  return calculateTotalSum(state.all);
40
42
  });
43
+ const totalPricePaid = computed(() => {
44
+ return calculateSum(state.all, "paid");
45
+ });
41
46
  const totalPriceUnpaid = computed(() => {
42
47
  return calculateSum(state.all, "unpaid");
43
48
  });
@@ -61,8 +66,8 @@ const _sfc_main = {
61
66
  key: 0,
62
67
  title: "Orders",
63
68
  actions: [
64
- unref(route).meta.context === "backoffice" && { to: { name: "BackofficeAdminCreateOrder" }, label: "Create Order" },
65
- unref(route).meta.context === "organization" && { to: { name: "OrganizationAdminCreateOrder", params: { _id: unref(route).params._id } }, label: "Create Order" }
69
+ unref(route).meta.context === "backoffice" && { method: () => unref(router).push({ name: "BackofficeAdminCreateOrder" }), label: "+ Add Order" },
70
+ unref(route).meta.context === "organization" && { method: () => unref(router).push({ name: "OrganizationAdminCreateOrder", params: { _id: unref(route).params._id } }), label: "+ Add Order" }
66
71
  ].filter(Boolean),
67
72
  class: "mn-b-small"
68
73
  }, null, 8, ["actions"])) : createCommentVNode("", true),
@@ -73,23 +78,23 @@ const _sfc_main = {
73
78
  }, {
74
79
  default: withCtx(() => [
75
80
  createElementVNode("div", _hoisted_2, [
76
- createElementVNode("div", _hoisted_3, [
77
- _cache[1] || (_cache[1] = createElementVNode("p", { class: "mn-b-thin" }, "Total", -1)),
78
- createElementVNode("h3", null, toDisplayString(unref(formatPrice)(totalPrice.value)), 1)
79
- ]),
80
- createElementVNode("div", _hoisted_4, [
81
- _cache[2] || (_cache[2] = createElementVNode("p", { class: "mn-b-thin" }, "Paid", -1)),
82
- createElementVNode("h3", null, toDisplayString(unref(formatPrice)(totalPriceUnpaid.value)), 1)
83
- ]),
84
- createElementVNode("div", _hoisted_5, [
85
- _cache[3] || (_cache[3] = createElementVNode("p", { class: "mn-b-thin" }, "Unpaid", -1)),
86
- createElementVNode("h3", null, toDisplayString(unref(formatPrice)(totalPrice.value)), 1)
87
- ])
81
+ createVNode(_sfc_main$3, {
82
+ title: "Total",
83
+ value: unref(formatPrice)(totalPrice.value)
84
+ }, null, 8, ["value"]),
85
+ createVNode(_sfc_main$3, {
86
+ title: "Paid",
87
+ value: unref(formatPrice)(totalPricePaid.value)
88
+ }, null, 8, ["value"]),
89
+ createVNode(_sfc_main$3, {
90
+ title: "Unpaid",
91
+ value: unref(formatPrice)(totalPriceUnpaid.value)
92
+ }, null, 8, ["value"])
88
93
  ])
89
94
  ]),
90
95
  _: 1
91
96
  })) : createCommentVNode("", true),
92
- unref(route).meta.context === "user" ? (openBlock(), createBlock(_sfc_main$3, {
97
+ unref(route).meta.context === "user" ? (openBlock(), createBlock(_sfc_main$4, {
93
98
  key: 2,
94
99
  tabs,
95
100
  selected: tab.value,
@@ -97,7 +102,7 @@ const _sfc_main = {
97
102
  classTab: "bg-light",
98
103
  class: "mn-b-small"
99
104
  }, null, 8, ["selected"])) : createCommentVNode("", true),
100
- createVNode(_sfc_main$4, {
105
+ createVNode(_sfc_main$5, {
101
106
  search: true,
102
107
  states: {
103
108
  empty: {
@@ -114,7 +119,7 @@ const _sfc_main = {
114
119
  ...unref(route).meta.context === "user" && { customer: unref(route).params._id },
115
120
  ...tab.value !== "all" && { status: tabStatusFilter.value }
116
121
  },
117
- class: normalizeClass(unref(route).meta.context === "user" ? "gap-small cols-1" : "gap-thin cols-3 mobile:cols-1")
122
+ class: normalizeClass(unref(route).meta.context === "user" ? "gap-small cols-1" : "gap-thin cols-3 tablet:cols-1 mobile:cols-1")
118
123
  }, {
119
124
  default: withCtx(({
120
125
  items
@@ -127,13 +132,14 @@ const _sfc_main = {
127
132
  }
128
133
  }, {
129
134
  default: withCtx(() => [
130
- createVNode(_sfc_main$5, {
135
+ createVNode(_sfc_main$6, {
131
136
  order,
132
137
  user: state$1.user,
138
+ statuses: unref(orderStatuses),
133
139
  formatDate: unref(formatDate),
134
140
  getTotal: getters.getTotal,
135
141
  currency: unref(returnCurrency)()
136
- }, null, 8, ["order", "user", "formatDate", "getTotal", "currency"])
142
+ }, null, 8, ["order", "user", "statuses", "formatDate", "getTotal", "currency"])
137
143
  ]),
138
144
  _: 2
139
145
  }, 1032, ["to"]);
@@ -143,7 +149,7 @@ const _sfc_main = {
143
149
  to: `/users/${unref(route).params._id}/orders/${order._id}`
144
150
  }, {
145
151
  default: withCtx(() => [
146
- createVNode(_sfc_main$6, {
152
+ createVNode(_sfc_main$7, {
147
153
  orderId: order._id,
148
154
  status: order.status,
149
155
  createdAt: order.createdAt,