@ozdao/martyrs 0.2.444 → 0.2.446

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 (239) hide show
  1. package/dist/auth.server.js +1 -1
  2. package/dist/auth.server.mjs +1 -1
  3. package/dist/chats.server.js +1 -1
  4. package/dist/chats.server.mjs +1 -1
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/{mailing-DqDlUHrs.js → mailing-D4kWlk3_.js} +13 -9
  8. package/dist/{mailing-D0Vezzzb.mjs → mailing-DvCT5ijo.mjs} +13 -9
  9. package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
  10. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  11. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  12. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  13. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  14. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  15. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.cjs → Dropdown.vue.cjs} +2 -2
  16. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js.map → Dropdown.vue.cjs.map} +1 -1
  17. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js → Dropdown.vue.js} +2 -2
  18. package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +1 -0
  19. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  20. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  21. package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
  22. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
  23. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  24. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  25. package/dist/martyrs/src/components/Popup/{Popup.vue.cjs → Popup.vue2.cjs} +2 -2
  26. package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +1 -0
  27. package/dist/martyrs/src/components/Popup/{Popup.vue.js → Popup.vue2.js} +2 -2
  28. package/dist/martyrs/src/components/Popup/{Popup.vue.cjs.map → Popup.vue2.js.map} +1 -1
  29. package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.cjs → SelectMulti.vue.cjs} +2 -2
  30. package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js.map → SelectMulti.vue.cjs.map} +1 -1
  31. package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js → SelectMulti.vue.js} +2 -2
  32. package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +1 -0
  33. package/dist/martyrs/src/components/Tab/{Tab.vue2.cjs → Tab.vue.cjs} +2 -2
  34. package/dist/martyrs/src/components/Tab/{Tab.vue2.js.map → Tab.vue.cjs.map} +1 -1
  35. package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
  36. package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
  37. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs → Tooltip.vue2.cjs} +2 -2
  38. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +1 -0
  39. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.js → Tooltip.vue2.js} +2 -2
  40. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs.map → Tooltip.vue2.js.map} +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  48. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  49. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  55. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  56. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  59. package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
  61. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  63. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
  64. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  65. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  66. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  67. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  68. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  69. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  70. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  71. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  72. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  73. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  75. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  77. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
  79. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
  81. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
  83. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +2 -5
  84. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs.map +1 -1
  85. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +3 -6
  86. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js.map +1 -1
  87. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  88. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  89. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
  90. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  91. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs.map +1 -1
  92. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js.map +1 -1
  93. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
  94. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
  95. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  97. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  99. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  100. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  102. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
  103. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
  105. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  107. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +1 -1
  108. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map +1 -1
  109. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +1 -1
  110. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -1
  111. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
  113. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.cjs +34 -8
  114. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.cjs.map +1 -1
  115. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js +34 -8
  116. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js.map +1 -1
  117. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +28 -19
  118. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs.map +1 -1
  119. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +29 -20
  120. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
  121. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +13 -17
  122. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  123. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +14 -18
  124. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  125. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -3
  126. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  127. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  128. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
  129. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs +12 -4
  130. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
  131. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +25 -17
  132. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  134. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  135. package/dist/martyrs/src/modules/orders/store/orders.cjs +11 -0
  136. package/dist/martyrs/src/modules/orders/store/orders.cjs.map +1 -1
  137. package/dist/martyrs/src/modules/orders/store/orders.js +11 -0
  138. package/dist/martyrs/src/modules/orders/store/orders.js.map +1 -1
  139. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  140. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  141. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  142. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  143. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +4 -4
  144. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +4 -4
  145. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +2 -2
  146. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  147. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -2
  148. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
  149. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
  150. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  151. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  152. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  153. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  154. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  155. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  156. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  157. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  159. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  161. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  162. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  163. package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  164. package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  165. package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  166. package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  167. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  168. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  169. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  170. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  171. package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
  172. package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  173. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  174. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  175. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +6 -6
  176. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  177. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +6 -6
  178. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  179. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  180. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  181. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +31 -24
  182. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  183. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +18 -11
  184. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  185. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  186. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  187. package/dist/martyrs/src/modules/products/store/products.cjs +28 -0
  188. package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
  189. package/dist/martyrs/src/modules/products/store/products.js +28 -0
  190. package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
  191. package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.cjs +1 -1
  192. package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.js +1 -1
  193. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
  195. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +2 -2
  196. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +2 -2
  197. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  198. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  199. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  200. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  201. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  202. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  203. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  204. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  205. package/dist/notifications.server.js +1 -1
  206. package/dist/notifications.server.mjs +1 -1
  207. package/dist/orders.server.js +28 -1
  208. package/dist/orders.server.mjs +28 -1
  209. package/dist/organizations.server.js +1 -1
  210. package/dist/organizations.server.mjs +1 -1
  211. package/dist/style.css +3 -3
  212. package/dist/{tickets.controller-Bbxe7kaF.mjs → tickets.controller-BIhfgjNb.mjs} +1 -1
  213. package/dist/{tickets.controller-CcxkRHlX.js → tickets.controller-zEHIAe_B.js} +1 -1
  214. package/dist/wallet.server.js +1 -1
  215. package/dist/wallet.server.mjs +1 -1
  216. package/package.json +1 -1
  217. package/src/modules/events/components/sections/Feed.vue +1 -4
  218. package/src/modules/globals/controllers/utils/mailing.js +19 -20
  219. package/src/modules/globals/views/components/blocks/BlockFilter.vue +1 -1
  220. package/src/modules/globals/views/components/partials/Header.vue +1 -0
  221. package/src/modules/marketplace/views/components/layouts/Marketplace.vue +1 -1
  222. package/src/modules/orders/components/elements/PriceTotal.vue +28 -2
  223. package/src/modules/orders/components/pages/OrderBackoffice.vue +14 -2
  224. package/src/modules/orders/components/pages/OrderCreate.vue +13 -19
  225. package/src/modules/orders/components/partials/ShopCart.vue +12 -5
  226. package/src/modules/orders/controllers/orders.controller.js +2 -2
  227. package/src/modules/orders/store/orders.js +14 -0
  228. package/src/modules/products/components/pages/Product.vue +6 -5
  229. package/src/modules/products/components/pages/Products.vue +31 -24
  230. package/src/modules/products/store/products.js +28 -0
  231. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  232. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  233. package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +0 -1
  234. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
  235. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  236. package/dist/martyrs/src/components/Popup/Popup.vue.js.map +0 -1
  237. package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.cjs.map +0 -1
  238. package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +0 -1
  239. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +0 -1
@@ -3,7 +3,7 @@ const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
3
3
  const require$$0 = require("apn");
4
4
  const require$$0$1 = require("firebase-admin");
5
5
  const require$$0$2 = require("path");
6
- const mailing = require("./mailing-DqDlUHrs.js");
6
+ const mailing = require("./mailing-D4kWlk3_.js");
7
7
  require("dotenv");
8
8
  require("nodemailer");
9
9
  require("axios");
@@ -2,7 +2,7 @@ import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
2
2
  import require$$0 from "apn";
3
3
  import require$$0$1 from "firebase-admin";
4
4
  import require$$0$2 from "path";
5
- import { r as requireMailing } from "./mailing-D0Vezzzb.mjs";
5
+ import { r as requireMailing } from "./mailing-DvCT5ijo.mjs";
6
6
  import "dotenv";
7
7
  import "nodemailer";
8
8
  import "axios";
@@ -4,7 +4,7 @@ const ownership_schema = require("./ownership.schema-Ck2H9clB.js");
4
4
  const profile_schema = require("./profile.schema-h61hhB2w.js");
5
5
  const credentials_schema = require("./credentials.schema-BmOPv6FD.js");
6
6
  const queryProcessor = require("./queryProcessor-D6GuKfTV.js");
7
- const mailing = require("./mailing-DqDlUHrs.js");
7
+ const mailing = require("./mailing-D4kWlk3_.js");
8
8
  const index = require("./index-DQqZReAr.js");
9
9
  const require$$0 = require("axios");
10
10
  const globals_cache = require("./globals.cache-CwWvNGFQ.js");
@@ -241,6 +241,24 @@ function requireOrders_controller() {
241
241
  hasRequiredOrders_controller = 1;
242
242
  const queryProcessorGlobals = queryProcessor.requireQueryProcessor();
243
243
  const { sendChatMessageTelegram } = mailing.requireMailing();
244
+ function formatPositions(positions) {
245
+ return positions.map((pos) => `🔹 ${pos.name} - Price: $${pos.price}, Quantity: ${pos.quantity}`).join("\n");
246
+ }
247
+ function formatOrderMessage(order) {
248
+ return `
249
+ 🆕 New Order Received!
250
+ 👤 Customer: ${order.customer?.name} (${order.customer?.phone?.number ? order.customer?.phone?.number : "No phone"})
251
+ 💬 Messenger: ${order.customer?.messenger ? order.customer?.messenger?.type + " " + order.customer?.messenger?.value : "None"}
252
+ 🏢 Organization: ${order.organization}
253
+ 📦 Positions:
254
+ ${formatPositions(order.positions)}
255
+ 📝 Comment: ${order.comment ? order.comment : "No comment"}
256
+ 💳 Payment: ${order.payment?.type}
257
+ 🚚 Delivery: ${order.delivery?.type} to ${order.delivery?.address}
258
+ 📌 Status: ${order.status}
259
+ 🧑 Agent: ${order.referralCode}
260
+ `;
261
+ }
244
262
  async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCreator) {
245
263
  let searchCriteria = {};
246
264
  if (customerInfo.phone) {
@@ -283,6 +301,14 @@ function requireOrders_controller() {
283
301
  }
284
302
  return customer;
285
303
  }
304
+ async function sendOrderMessage(orderData) {
305
+ try {
306
+ const formattedMessage = formatOrderMessage(orderData);
307
+ await sendChatMessageTelegram(process.env.TELEGRAM_BOT_USERS.split(","), formattedMessage);
308
+ } catch (err) {
309
+ console.error(err);
310
+ }
311
+ }
286
312
  const controllerFactory = (db2) => {
287
313
  const Order = db2.order;
288
314
  const Customer = db2.customer;
@@ -356,6 +382,7 @@ function requireOrders_controller() {
356
382
  }
357
383
  }
358
384
  await session.commitTransaction();
385
+ sendOrderMessage(orderData).catch(console.error);
359
386
  res.status(201).send(createdOrder);
360
387
  } catch (err) {
361
388
  await session.abortTransaction();
@@ -3,7 +3,7 @@ import { r as requireOwnership_schema } from "./ownership.schema-C0w02Vw1.mjs";
3
3
  import { r as requireProfile_schema } from "./profile.schema-kP_zKXNt.mjs";
4
4
  import { r as requireCredentials_schema } from "./credentials.schema-oOC8B5KL.mjs";
5
5
  import { r as requireQueryProcessor } from "./queryProcessor-CWnMIe2U.mjs";
6
- import { r as requireMailing } from "./mailing-D0Vezzzb.mjs";
6
+ import { r as requireMailing } from "./mailing-DvCT5ijo.mjs";
7
7
  import { r as requireMiddlewares } from "./index-DICZTQ-1.mjs";
8
8
  import require$$0 from "axios";
9
9
  import { r as requireGlobals_cache } from "./globals.cache-BT6q3vOf.mjs";
@@ -240,6 +240,24 @@ function requireOrders_controller() {
240
240
  hasRequiredOrders_controller = 1;
241
241
  const queryProcessorGlobals = requireQueryProcessor();
242
242
  const { sendChatMessageTelegram } = requireMailing();
243
+ function formatPositions(positions) {
244
+ return positions.map((pos) => `🔹 ${pos.name} - Price: $${pos.price}, Quantity: ${pos.quantity}`).join("\n");
245
+ }
246
+ function formatOrderMessage(order) {
247
+ return `
248
+ 🆕 New Order Received!
249
+ 👤 Customer: ${order.customer?.name} (${order.customer?.phone?.number ? order.customer?.phone?.number : "No phone"})
250
+ 💬 Messenger: ${order.customer?.messenger ? order.customer?.messenger?.type + " " + order.customer?.messenger?.value : "None"}
251
+ 🏢 Organization: ${order.organization}
252
+ 📦 Positions:
253
+ ${formatPositions(order.positions)}
254
+ 📝 Comment: ${order.comment ? order.comment : "No comment"}
255
+ 💳 Payment: ${order.payment?.type}
256
+ 🚚 Delivery: ${order.delivery?.type} to ${order.delivery?.address}
257
+ 📌 Status: ${order.status}
258
+ 🧑 Agent: ${order.referralCode}
259
+ `;
260
+ }
243
261
  async function findOrCreateCustomer(Customer, customerInfo, orderOwner, orderCreator) {
244
262
  let searchCriteria = {};
245
263
  if (customerInfo.phone) {
@@ -282,6 +300,14 @@ function requireOrders_controller() {
282
300
  }
283
301
  return customer;
284
302
  }
303
+ async function sendOrderMessage(orderData) {
304
+ try {
305
+ const formattedMessage = formatOrderMessage(orderData);
306
+ await sendChatMessageTelegram(process.env.TELEGRAM_BOT_USERS.split(","), formattedMessage);
307
+ } catch (err) {
308
+ console.error(err);
309
+ }
310
+ }
285
311
  const controllerFactory = (db2) => {
286
312
  const Order = db2.order;
287
313
  const Customer = db2.customer;
@@ -355,6 +381,7 @@ function requireOrders_controller() {
355
381
  }
356
382
  }
357
383
  await session.commitTransaction();
384
+ sendOrderMessage(orderData).catch(console.error);
358
385
  res.status(201).send(createdOrder);
359
386
  } catch (err) {
360
387
  await session.abortTransaction();
@@ -7,7 +7,7 @@ const require$$0 = require("mongoose");
7
7
  const require$$1 = require("@googlemaps/google-maps-services-js");
8
8
  const addMembersQuantity = require("./addMembersQuantity-DxWjHK1K.js");
9
9
  const require$$0$2 = require("uuidv4");
10
- const mailing = require("./mailing-DqDlUHrs.js");
10
+ const mailing = require("./mailing-D4kWlk3_.js");
11
11
  const index = require("./index-DQqZReAr.js");
12
12
  const globals_abac = require("./globals.abac-DT0VjfaZ.js");
13
13
  const engagement_schema = require("./engagement.schema-DAiXsvh1.js");
@@ -6,7 +6,7 @@ import require$$0 from "mongoose";
6
6
  import require$$1 from "@googlemaps/google-maps-services-js";
7
7
  import { r as requireAddUserStatusFields, a as requireAddMembersQuantity } from "./addMembersQuantity-DBfuUEx_.mjs";
8
8
  import require$$0$2 from "uuidv4";
9
- import { r as requireMailing } from "./mailing-D0Vezzzb.mjs";
9
+ import { r as requireMailing } from "./mailing-DvCT5ijo.mjs";
10
10
  import { r as requireMiddlewares } from "./index-DICZTQ-1.mjs";
11
11
  import { r as requireGlobals_abac } from "./globals.abac-CvmZM8XG.mjs";
12
12
  import { r as requireEngagement_schema } from "./engagement.schema-DnDD7Bn3.mjs";
package/dist/style.css CHANGED
@@ -2578,10 +2578,10 @@ to {
2578
2578
  }
2579
2579
  .vue-select-header {
2580
2580
  height: 3rem;
2581
- }.blink[data-v-c30b339c] {
2582
- animation: blink-animation-c30b339c 1s ease infinite;
2581
+ }.blink[data-v-529cceb6] {
2582
+ animation: blink-animation-529cceb6 1s ease infinite;
2583
2583
  }
2584
- @keyframes blink-animation-c30b339c {
2584
+ @keyframes blink-animation-529cceb6 {
2585
2585
  0%, 100% {
2586
2586
  opacity: 1;
2587
2587
  }
@@ -2,7 +2,7 @@ import require$$0$1 from "path";
2
2
  import require$$1 from "puppeteer";
3
3
  import require$$2 from "qrcode";
4
4
  import require$$0 from "mustache";
5
- import { r as requireMailing } from "./mailing-D0Vezzzb.mjs";
5
+ import { r as requireMailing } from "./mailing-DvCT5ijo.mjs";
6
6
  var templateTicket;
7
7
  var hasRequiredTemplateTicket;
8
8
  function requireTemplateTicket() {
@@ -3,7 +3,7 @@ const require$$0$1 = require("path");
3
3
  const require$$1 = require("puppeteer");
4
4
  const require$$2 = require("qrcode");
5
5
  const require$$0 = require("mustache");
6
- const mailing = require("./mailing-DqDlUHrs.js");
6
+ const mailing = require("./mailing-D4kWlk3_.js");
7
7
  var templateTicket;
8
8
  var hasRequiredTemplateTicket;
9
9
  function requireTemplateTicket() {
@@ -5,7 +5,7 @@ require("axios");
5
5
  require("bcryptjs");
6
6
  require("crypto");
7
7
  const require$$2 = require("qrcode");
8
- const tickets_controller = require("./tickets.controller-CcxkRHlX.js");
8
+ const tickets_controller = require("./tickets.controller-zEHIAe_B.js");
9
9
  const require$$0 = require("stripe");
10
10
  const require$$0$1 = require("mongoose");
11
11
  const require$$1 = require("bignumber.js");
@@ -4,7 +4,7 @@ import "axios";
4
4
  import "bcryptjs";
5
5
  import "crypto";
6
6
  import require$$2 from "qrcode";
7
- import { r as requireTickets_controller } from "./tickets.controller-Bbxe7kaF.mjs";
7
+ import { r as requireTickets_controller } from "./tickets.controller-BIhfgjNb.mjs";
8
8
  import require$$0 from "stripe";
9
9
  import require$$0$1 from "mongoose";
10
10
  import require$$1 from "bignumber.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/martyrs",
3
- "version": "0.2.444",
3
+ "version": "0.2.446",
4
4
  "description": "Fullstack framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -1,10 +1,7 @@
1
1
  <template>
2
2
  <section class="feed">
3
3
  <TransitionGroup tag="ul" name="scaleTransition" class="o-hidden bg-light radius-big">
4
- <SkeletonEvent
5
- v-if="isLoading"
6
- v-for="i in limit" :key="i"
7
- />
4
+ <Loader v-if="isLoading"/>
8
5
  </TransitionGroup>
9
6
 
10
7
  <transition
@@ -63,30 +63,29 @@ async function sendChatMessageTelegram(chatIds, text) {
63
63
  const telegramToken = process.env.TELEGRAM_BOT_TOKEN; // Токен Telegram Bot хранится в переменных окружения
64
64
  const telegramUrl = `https://api.telegram.org/bot${telegramToken}/sendMessage`;
65
65
 
66
- // Создание кнопок
67
- // const inlineKeyboard = JSON.stringify({
68
- // inline_keyboard: [
69
- // [
70
- // { text: 'Confirm', callback_data: `confirm_${application._id}` },
71
- // { text: 'Lost', callback_data: `lost_${application._id}` },
72
- // { text: 'Delete', callback_data: `delete_${application._id}` }
73
- // ]
74
- // ]
75
- // });
66
+ // Используем Promise.all для параллельной отправки сообщений
67
+ const sendPromises = chatIds.map(chatId => {
68
+ return axios.post(telegramUrl, {
69
+ chat_id: chatId,
70
+ text: text,
71
+ // reply_markup: inlineKeyboard
72
+ }).catch(error => {
73
+ // Логируем ошибку для конкретного чата, но не прерываем процесс
74
+ console.log(`Failed to send message to chat ${chatId}:`, error.message);
75
+ // Возвращаем false или null, чтобы Promise.all мог продолжить
76
+ return false;
77
+ });
78
+ });
76
79
 
77
80
  try {
78
- // Отправка сообщения каждому чату из массива
79
- for (const chatId of chatIds) {
80
- await axios.post(telegramUrl, {
81
- chat_id: chatId,
82
- text: text,
83
- // reply_markup: inlineKeyboard
84
- });
85
- }
86
- console.log('Telegram message sent');
81
+ // Ждем завершения всех промисов, но ошибки не прерывают выполнение
82
+ const results = await Promise.all(sendPromises);
83
+ console.log('Telegram messages processing completed');
84
+ // Возвращаем true, даже если некоторые сообщения не были отправлены
87
85
  return true;
88
86
  } catch (error) {
89
- console.log(error);
87
+ // Логируем общую ошибку, но не прерываем выполнение
88
+ console.log('Error in sending Telegram messages:', error.message);
90
89
  return false;
91
90
  }
92
91
  }
@@ -4,7 +4,7 @@ import { ref } from 'vue';
4
4
  import Checkbox from "@martyrs/src/components/Checkbox/Checkbox.vue";
5
5
  import Spoiler from "@martyrs/src/components/Spoiler/Spoiler.vue"
6
6
 
7
- import IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'
7
+ import IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'
8
8
 
9
9
  const props = defineProps({
10
10
  title: {
@@ -144,6 +144,7 @@
144
144
  v-if="router.hasRoute('Search') && route.meta.header_search"
145
145
  aria-label="search"
146
146
  class="pd-zero bg-transp"
147
+ :class="route.meta.header_search_class"
147
148
  :submit="() => router.push({name: 'Search'})"
148
149
  :showSucces="false"
149
150
  :showLoader="false"
@@ -116,7 +116,7 @@
116
116
  let categoriesFilter = await categories.actions.read(options);
117
117
 
118
118
  categoriesFilter = categoriesFilter.map(category => ({
119
- value: category.url,
119
+ value: category._id,
120
120
  label: category.name
121
121
  }));
122
122
 
@@ -13,10 +13,16 @@
13
13
  </p>
14
14
 
15
15
  <!-- VAT calculation (conditional) -->
16
- <p v-if="showVat" class="flex flex-nowrap br-black-transp-10 br-solid br-b pd-b-small pd-t-small">
16
+ <p v-if="showVat" class="flex flex-nowrap pd-t-small">
17
17
  <span class="w-100 t-transp">{{ t('vat', { rate: vatRate * 100 }) }}</span>
18
18
  <span class="w-100 t-right">{{currency}}{{vatAmount}}</span>
19
19
  </p>
20
+
21
+ <!-- Delivery fee (conditional) -->
22
+ <p v-if="showDeliveryFee" class="flex flex-nowrap br-black-transp-10 br-solid br-b pd-b-small pd-t-small">
23
+ <span class="w-100 t-transp">{{ t('delivery') }}</span>
24
+ <span class="w-100 t-right">{{currency}}{{deliveryAmount}}</span>
25
+ </p>
20
26
 
21
27
  <!-- Grand total -->
22
28
  <p class="p-big flex flex-nowrap pd-b-small pd-t-small">
@@ -55,6 +61,14 @@ const props = defineProps({
55
61
  vatRate: {
56
62
  type: Number,
57
63
  default: 0
64
+ },
65
+ showDeliveryFee: {
66
+ type: Boolean,
67
+ default: false
68
+ },
69
+ deliveryRate: {
70
+ type: Number,
71
+ default: 0
58
72
  }
59
73
  });
60
74
 
@@ -64,12 +78,14 @@ const text = {
64
78
  subtotal: 'Subtotal',
65
79
  feesRate: 'Platform Fee',
66
80
  vat: 'VAT ({rate}%)',
81
+ delivery: 'Delivery',
67
82
  intotal: 'In Total'
68
83
  },
69
84
  ru: {
70
85
  subtotal: 'Подытог',
71
86
  feesRate: 'Плата за платформу',
72
87
  vat: 'НДС ({rate}%)',
88
+ delivery: 'Доставка',
73
89
  intotal: 'Итого'
74
90
  }
75
91
  }
@@ -89,7 +105,17 @@ const feesRate = computed(() => {
89
105
  return formatPrice(props.totalPrice * props.feesRate);
90
106
  });
91
107
 
108
+ const deliveryAmount = computed(() => {
109
+ if (!props.showDeliveryFee) return 0;
110
+ return formatPrice(props.deliveryRate);
111
+ });
112
+
92
113
  const grandTotal = computed(() => {
93
- return formatPrice(parseFloat(props.totalPrice) + parseFloat(feesRate.value) + parseFloat(vatAmount.value));
114
+ return formatPrice(
115
+ parseFloat(props.totalPrice) +
116
+ parseFloat(feesRate.value) +
117
+ parseFloat(vatAmount.value) +
118
+ parseFloat(deliveryAmount.value)
119
+ );
94
120
  });
95
121
  </script>
@@ -176,7 +176,7 @@
176
176
  {{order.payment.type ? order.payment.type : 'Not specified'}}
177
177
  </p>
178
178
 
179
- <p @click="openPaymentPopup" class="w-max pd-thin radius-small bg-second t-white mn-l-thin cursor-pointer hover-bg-black t-right">
179
+ <p @click="route.meta.context !== 'user' && route.meta.context !== 'root' ? openPaymentPopup : console.log('hello')" class="w-max pd-thin radius-small bg-second t-white mn-l-thin cursor-pointer hover-bg-black t-right">
180
180
  {{order.payment.status ? order.payment.status : 'Unpaid'}}
181
181
  </p>
182
182
  </div>
@@ -184,7 +184,7 @@
184
184
 
185
185
  </div>
186
186
 
187
- <div v-if="route.meta.context !== 'user'" class="o-y-scroll bg-light pd-thin mn-b-thin pd-thin radius-medium flex-nowrap flex">
187
+ <div v-if="route.meta.context !== 'user' && route.meta.context !== 'root'" class="o-y-scroll bg-light pd-thin mn-b-thin pd-thin radius-medium flex-nowrap flex">
188
188
  <div class="flex-child-default mn-r-small w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-light-transp-20">
189
189
  <IconTime class="i-semi t-transp" fill="rgb(var(--black)" />
190
190
  <p class="t-medium mn-r-auto"><span class="p-small t-transp">Estimated Reaction</span><br>{{formatDate(order.deadline, { language: locale })}}</p>
@@ -239,11 +239,14 @@
239
239
 
240
240
  <PriceTotal
241
241
  :totalPrice="cartTotalPrice"
242
+ :deliveryRate="deliveryCost"
242
243
  :currency="returnCurrency()"
243
244
  :showFees="globals.state.options?.orders?.showFees"
244
245
  :feesRate="globals.state.options?.orders?.feesRate || 0"
245
246
  :showVat="globals.state.options?.orders?.showVat"
246
247
  :vatRate="globals.state.options?.orders?.vatRate || 0"
248
+ :showDeliveryFee="globals.state.options?.orders.showDeliveryFee"
249
+
247
250
  />
248
251
  </div>
249
252
 
@@ -345,6 +348,15 @@
345
348
 
346
349
  })
347
350
 
351
+
352
+ const deliveryCost = computed(() => {
353
+ const type = orders.state.current.delivery.type
354
+ const distance = orderOrganization.value[0]?.distance || 0
355
+ const config = globals.state.options?.orders?.delivery_formula || {}
356
+
357
+ return orders.getters.getDeliveryPrice(type, distance, config)
358
+ })
359
+
348
360
  let cartTotalPrice = computed(() => {
349
361
  return Number(order.value?.positions.reduce((total, product) => {
350
362
  // Проверяем тип листинга
@@ -58,16 +58,18 @@
58
58
  />
59
59
  </ul>
60
60
 
61
- <div
61
+ <div
62
62
  class="mn-b-thin"
63
63
  >
64
64
  <PriceTotal
65
65
  :totalPrice="cartTotalPrice"
66
+ :deliveryRate="deliveryCost"
66
67
  :currency="returnCurrency()"
67
- :showFees="globals.state.options?.showFees"
68
- :feesRate="globals.state.options?.feesRate || 0"
69
- :showVat="globals.state.options?.showVat"
70
- :vatRate="globals.state.options?.vatRate || 0"
68
+ :showFees="globals.state.options?.orders.showFees"
69
+ :feesRate="globals.state.options?.orders.feesRate || 0"
70
+ :showVat="globals.state.options?.orders.showVat"
71
+ :vatRate="globals.state.options?.orders.vatRate || 0"
72
+ :showDeliveryFee="globals.state.options?.orders.showDeliveryFee"
71
73
  />
72
74
  </div>
73
75
  <!-- Send order -->
@@ -143,22 +145,14 @@ const order = computed(() => orders.state.current)
143
145
  const user = computed(() => users.state.current)
144
146
 
145
147
  const cartTotalPrice = shopcart.getters.cartTotalPrice
146
-
147
-
148
148
  const deliveryCost = computed(() => {
149
- if (orders.state.current.delivery.type === 'pickup') return 0;
150
- if (orders.state.current.delivery.type === 'mail') return 350;
151
- if (orders.state.current.delivery.type === 'courier') {
152
- const distance = orderOrganization.value[0]?.distance || 0;
153
- return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));
154
- }
155
- return 0;
156
- });
149
+ const type = orders.state.current.delivery.type
150
+ const distance = orderOrganization.value[0]?.distance || 0
151
+ const config = globals.state.options?.orders?.delivery_formula || {}
152
+
153
+ return orders.getters.getDeliveryPrice(type, distance, config)
154
+ })
157
155
 
158
- // Computed property for total cost
159
- const totalCost = computed(() => {
160
- return deliveryCost.value + cartTotalPrice.value.value;
161
- });
162
156
  // Organization
163
157
  const orderOrganization = ref({})
164
158
 
@@ -36,10 +36,10 @@
36
36
  <PriceTotal
37
37
  :totalPrice="cartTotalPrice"
38
38
  :currency="returnCurrency()"
39
- :showFees="globals.state.options?.showFees"
40
- :feesRate="globals.state.options?.feesRate"
41
- :showVat="globals.state.options?.showVat"
42
- :vatRate="globals.state.options?.vatRate"
39
+ :showFees="globals.state.options?.orders.showFees"
40
+ :feesRate="globals.state.options?.orders.feesRate"
41
+ :showVat="globals.state.options?.orders.showVat"
42
+ :vatRate="globals.state.options?.orders.vatRate"
43
43
  />
44
44
  </div>
45
45
  <button v-if="shopcart.state.positions.length > 0" @click="openOrder()" class="bg-main t-black w-100 button">{{ t('fastorder') }}</button>
@@ -79,7 +79,6 @@
79
79
 
80
80
  import IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue';
81
81
 
82
-
83
82
  import * as globals from '@martyrs/src/modules/globals/views/store/globals';
84
83
  import * as auth from '@martyrs/src/modules/auth/views/store/auth';
85
84
  import * as shopcart from '@martyrs/src/modules/orders/store/shopcart';
@@ -133,6 +132,14 @@
133
132
  !globals.state.options.orders.allowUnauthenticatedOrders && !auth.state.user._id ? router.push({name: 'Sign In', query: { returnUrl: '/orders/form'}}) : router.push({name: 'CreateOrder'})
134
133
  shopcart.actions.toggleShopcart();
135
134
  }
135
+
136
+ onMounted(async()=> {
137
+ orderOrganization.value = await organizations.actions.read({
138
+ _id: shopcart.state.organization,
139
+ location: globals.state.position?.location,
140
+ lookup: ['spots']
141
+ })
142
+ })
136
143
  </script>
137
144
 
138
145
  <style lang="scss">
@@ -192,8 +192,8 @@ const controllerFactory = (db) => {
192
192
  await session.commitTransaction();
193
193
 
194
194
  // Send notification
195
- // sendOrderMessage(orderData);
196
-
195
+ sendOrderMessage(orderData).catch(console.error);
196
+
197
197
  // Return the created order
198
198
  res.status(201).send(createdOrder);
199
199
  } catch (err) {
@@ -182,6 +182,20 @@ const getters = {
182
182
  return total + product.price * (product.quantity || 1);
183
183
  }
184
184
  }, 0));
185
+ },
186
+ getDeliveryPrice(type, distance = 0, config = {}) {
187
+ if (type === 'pickup') return config.pickupCost || 0;
188
+ if (type === 'mail') return config.mailCost || 300;
189
+
190
+ if (type === 'courier') {
191
+ const base = config.courierBase || 100;
192
+ const perKm = config.courierPerKm || 20;
193
+ const discount = config.courierDiscountFactor || 7.5;
194
+
195
+ return Math.trunc(base + perKm * distance - discount * (distance / 10));
196
+ }
197
+
198
+ return 0;
185
199
  }
186
200
  }
187
201
 
@@ -60,10 +60,10 @@
60
60
  <PopupDateSelector
61
61
  :product="product"
62
62
  :isOpen="isPopupOpen"
63
- :showFees="globals.state.options?.showFees"
64
- :feesRate="globals.state.options?.feesRate || 0.15"
65
- :showVat="globals.state.options?.showVat"
66
- :vatRate="globals.state.options?.vatRate || 0"
63
+ :showFees="globals.state.options?.orders.showFees"
64
+ :feesRate="globals.state.options?.orders.feesRate || 0.15"
65
+ :showVat="globals.state.options?.orders.showVat"
66
+ :vatRate="globals.state.options?.orders.vatRate || 0"
67
67
  :onConfirm="selectedDates => addToCart(product, selectedDates)"
68
68
  @close="closePopup"
69
69
  />
@@ -102,6 +102,7 @@
102
102
  import { computed, ref, onMounted } from 'vue'
103
103
  import { useRoute, useRouter } from 'vue-router'
104
104
  import { useI18n } from 'vue-i18n'
105
+
105
106
  import * as auth from '@martyrs/src/modules/auth/views/store/auth'
106
107
  import * as globals from '@martyrs/src/modules/globals/views/store/globals'
107
108
  import * as products from '@martyrs/src/modules/products/store/products'
@@ -151,7 +152,7 @@ const pageProduct = ref(null)
151
152
  // products.mutations.resetProduct()
152
153
  onMounted(async () => {
153
154
 
154
- emits('page-loading');
155
+ emits('page-loading');
155
156
  await products.actions.read({ _id: route.params.product })
156
157
  emits('page-loaded');
157
158