@ozdao/prometheus-framework 0.2.81 → 0.2.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. package/dist/auth.server.js +1 -1
  2. package/dist/auth.server.mjs +1 -1
  3. package/dist/community.server.js +3 -3
  4. package/dist/community.server.mjs +3 -3
  5. package/dist/credentials.schema-B-KD_ozQ.js +9 -0
  6. package/dist/credentials.schema-C9dmNy7o.mjs +10 -0
  7. package/dist/credentials.schema-CDZCKfEI.mjs +106 -0
  8. package/dist/credentials.schema-CfhPcsuI.js +105 -0
  9. package/dist/events.server.js +4 -15
  10. package/dist/events.server.mjs +3 -14
  11. package/dist/files.server.js +1 -1
  12. package/dist/files.server.mjs +1 -1
  13. package/dist/gallery.server.js +1 -1
  14. package/dist/gallery.server.mjs +1 -1
  15. package/dist/index-B6a1mPgp.mjs +217 -0
  16. package/dist/index-BCCiEK_u.js +216 -0
  17. package/dist/main-8N2Jmsuk.js +91 -0
  18. package/dist/main-CkeuHuCY.mjs +13619 -0
  19. package/dist/main.css +1 -1
  20. package/dist/metadata.schema-Cu_mPkjE.js +77 -0
  21. package/dist/metadata.schema-cbFgazeK.mjs +78 -0
  22. package/dist/middlewares.server.js +1 -1
  23. package/dist/middlewares.server.mjs +1 -1
  24. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
  25. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
  26. package/dist/orders.server.js +592 -0
  27. package/dist/orders.server.mjs +593 -0
  28. package/dist/organizations.server.js +295 -131
  29. package/dist/organizations.server.mjs +295 -131
  30. package/dist/products.server.js +2 -2
  31. package/dist/products.server.mjs +2 -2
  32. package/dist/profile.schema-24ZpZQJe.mjs +25 -0
  33. package/dist/profile.schema-CkOhhf37.js +24 -0
  34. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
  36. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
  38. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -225
  40. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +102 -1
  42. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
  44. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  46. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  48. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  50. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
  52. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
  54. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
  56. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  57. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +41 -40
  58. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  59. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +37 -31
  60. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
  62. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -36
  64. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  65. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +36 -1
  66. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  68. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  69. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  70. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +30 -30
  78. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  84. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
  86. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +78 -103
  88. package/dist/prometheus-framework/src/modules/chats/components/blocks/ChatMessage.vue.cjs +1 -0
  89. package/dist/prometheus-framework/src/modules/chats/components/blocks/ChatMessage.vue.js +28 -0
  90. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue.cjs +1 -0
  91. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue.js +26 -0
  92. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue2.cjs +1 -0
  93. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue2.js +1 -0
  94. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue.cjs +1 -0
  95. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue.js +77 -0
  96. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue2.cjs +1 -0
  97. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue2.js +1 -0
  98. package/dist/prometheus-framework/src/modules/chats/store/chat.store.cjs +1 -0
  99. package/dist/prometheus-framework/src/modules/chats/store/chat.store.js +40 -0
  100. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  102. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +15 -15
  106. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  109. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  110. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  111. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  112. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +4 -4
  116. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  122. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +29 -27
  126. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  130. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  134. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +33 -26
  136. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
  138. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
  139. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
  140. package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
  141. package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
  142. package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
  143. package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
  144. package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
  145. package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
  146. package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
  147. package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
  148. package/dist/prometheus-framework/src/modules/icons/navigation/IconCheckmark.vue.cjs +1 -0
  149. package/dist/prometheus-framework/src/modules/icons/navigation/IconCheckmark.vue.js +29 -0
  150. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderChat.vue.cjs +1 -0
  151. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderChat.vue.js +30 -0
  152. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +63 -86
  154. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  156. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +121 -1
  158. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue2.cjs +1 -0
  159. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue2.js +1 -0
  160. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +3 -0
  161. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +92 -0
  162. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -0
  163. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +202 -0
  164. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue2.cjs +1 -0
  165. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue2.js +1 -0
  166. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -0
  167. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +127 -0
  168. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue2.cjs +1 -0
  169. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue2.js +1 -0
  170. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
  172. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +41 -41
  174. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +1 -0
  175. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +89 -0
  176. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue2.cjs +1 -0
  177. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue2.js +1 -0
  178. package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.cjs +1 -0
  179. package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.js +24 -0
  180. package/dist/prometheus-framework/src/modules/orders/components/sections/EmptyState.vue.cjs +1 -0
  181. package/dist/prometheus-framework/src/modules/orders/components/sections/EmptyState.vue.js +13 -0
  182. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
  183. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
  184. package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +1 -1
  186. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
  187. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
  188. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +46 -35
  190. package/dist/prometheus-framework/src/modules/orders/components/sections/Succes.vue.cjs +1 -0
  191. package/dist/prometheus-framework/src/modules/orders/components/sections/Succes.vue.js +25 -0
  192. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -0
  193. package/dist/prometheus-framework/src/modules/orders/orders.client.js +56 -0
  194. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -0
  195. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +58 -0
  196. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -0
  197. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
  198. package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
  199. package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
  200. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  201. package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
  202. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +5 -1
  204. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +16 -16
  206. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  208. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +38 -49
  210. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +6 -6
  214. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  215. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +161 -138
  216. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  217. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +198 -78
  218. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  219. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +82 -125
  220. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  221. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  222. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  223. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  224. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  225. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  226. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  227. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +59 -70
  228. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  229. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  230. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  231. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
  232. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
  234. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
  236. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  237. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  238. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  239. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
  240. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  241. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  242. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  243. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  244. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  245. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  246. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  247. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  248. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  249. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  250. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  252. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  253. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  254. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  255. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +3 -3
  256. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  257. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  258. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  259. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  260. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  261. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  262. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  263. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +24 -26
  264. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
  265. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
  266. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  267. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  268. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  269. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  270. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  271. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  272. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  273. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  274. package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
  275. package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
  276. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  277. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  278. package/dist/prometheus-framework.cjs.js +1 -1
  279. package/dist/prometheus-framework.es.js +1 -1
  280. package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
  281. package/dist/queryProcessor-DRMo_GWK.js +161 -0
  282. package/dist/reports.server.js +1 -1
  283. package/dist/reports.server.mjs +1 -1
  284. package/dist/style.css +1 -1
  285. package/dist/users.server.js +58 -47
  286. package/dist/users.server.mjs +58 -47
  287. package/dist/wallet.server.js +2 -2
  288. package/dist/wallet.server.mjs +2 -2
  289. package/dist/web-CtVocufd.js +1 -0
  290. package/dist/web-DNq1tHCE.mjs +54 -0
  291. package/package.json +1 -1
  292. package/src/components/Address/Address.vue +13 -2
  293. package/src/components/Block/Block.vue +3 -2
  294. package/src/components/Button/Button.vue +9 -12
  295. package/src/components/Feed/Feed.vue +28 -6
  296. package/src/components/FieldPhone/FieldPhone.vue +592 -558
  297. package/src/components/LocationMarker/LocationMarker.vue +26 -22
  298. package/src/components/Popup/Popup.vue +22 -23
  299. package/src/components/Select/Select.vue +43 -32
  300. package/src/components/Slider/Slider.vue +3 -4
  301. package/src/modules/auth/components/pages/Invite.vue +7 -7
  302. package/src/modules/auth/store/auth.js +1 -1
  303. package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
  304. package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
  305. package/src/modules/community/components/sections/HotPosts.vue +1 -1
  306. package/src/modules/events/components/blocks/CardEvent.vue +4 -3
  307. package/src/modules/events/components/pages/Events.vue +23 -6
  308. package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
  309. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
  310. package/src/modules/globals/localization/vue-i18n.js +3 -0
  311. package/src/modules/globals/models/credentials.schema.js +7 -0
  312. package/src/modules/globals/models/metadata.schema.js +17 -0
  313. package/src/modules/globals/models/profile.schema.js +23 -0
  314. package/src/modules/globals/models/socials.schema.js +22 -0
  315. package/src/modules/globals/router/routerGuards.js +1 -0
  316. package/src/modules/globals/services/globals.cashe.js +26 -0
  317. package/src/modules/globals/services/globals.crud.js +115 -0
  318. package/src/modules/globals/services/globals.logger.js +41 -0
  319. package/src/modules/globals/services/globals.store.js +114 -0
  320. package/src/modules/icons/entities/IconGallery.vue +14 -0
  321. package/src/modules/icons/entities/IconLeftovers.vue +14 -0
  322. package/src/modules/icons/entities/IconOrders.vue +15 -0
  323. package/src/modules/icons/entities/IconProducts.vue +14 -0
  324. package/src/modules/landing/components/sections/HeroSection.vue +1 -1
  325. package/src/modules/landing/components/sections/MobileApp.vue +4 -4
  326. package/src/modules/landing/router/landing.js +1 -1
  327. package/src/modules/marketplace/components/sections/Filters.vue +3 -3
  328. package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
  329. package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
  330. package/src/modules/middlewares/server/verifyAccesses.js +33 -0
  331. package/src/modules/middlewares/server/verifyInvites.js +4 -4
  332. package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
  333. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
  334. package/src/modules/orders/components/pages/Orders.vue +2 -2
  335. package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
  336. package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
  337. package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
  338. package/src/modules/orders/controllers/applications.controller.js +2 -0
  339. package/src/modules/orders/controllers/orders.controller.js +77 -52
  340. package/src/modules/orders/models/application.model.js +25 -25
  341. package/src/modules/orders/models/customer.model.js +54 -18
  342. package/src/modules/orders/models/order.model.js +1 -1
  343. package/src/modules/orders/models/testimonial.model.js +22 -23
  344. package/src/modules/orders/orders.client.js +51 -51
  345. package/src/modules/orders/orders.server.js +36 -12
  346. package/src/modules/orders/router/orders.router.js +36 -41
  347. package/src/modules/orders/routes/orders.routes.js +3 -21
  348. package/src/modules/orders/store/customers.store.js +5 -0
  349. package/src/modules/orders/store/models/customer.js +29 -0
  350. package/src/modules/orders/store/orders.js +14 -20
  351. package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
  352. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  353. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
  354. package/src/modules/organizations/components/pages/Department.vue +1 -1
  355. package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
  356. package/src/modules/organizations/components/pages/Members.vue +178 -64
  357. package/src/modules/organizations/components/pages/Organization.vue +1 -41
  358. package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
  359. package/src/modules/organizations/controllers/departments.controller.js +2 -4
  360. package/src/modules/organizations/controllers/invites.controller.js +24 -23
  361. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  362. package/src/modules/organizations/models/department.model.js +52 -2
  363. package/src/modules/organizations/models/invite.model.js +29 -32
  364. package/src/modules/organizations/models/membership.model.js +2 -0
  365. package/src/modules/organizations/models/organization.model.js +2 -1
  366. package/src/modules/organizations/organizations.client.js +0 -2
  367. package/src/modules/organizations/routes/departments.routes.js +18 -7
  368. package/src/modules/organizations/routes/invites.routes.js +2 -2
  369. package/src/modules/organizations/store/departments.js +22 -1
  370. package/src/modules/organizations/store/invites.js +74 -90
  371. package/src/modules/products/components/blocks/CardProduct.vue +24 -0
  372. package/src/modules/products/components/pages/Products.vue +1 -1
  373. package/src/modules/reports/components/sections/FormReport.vue +40 -40
  374. package/src/modules/spots/components/pages/Spot.vue +1 -1
  375. package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
  376. package/src/modules/users/components/blocks/CardUser.vue +85 -0
  377. package/src/modules/users/controllers/users.controller.js +36 -13
  378. package/src/modules/users/middlewares/visitor.logger.js +66 -0
  379. package/src/modules/users/models/request.model.js +18 -0
  380. package/src/modules/users/models/user.model.js +26 -55
  381. package/src/modules/users/models/visitor.model.js +14 -0
  382. package/src/modules/users/store/users.js +2 -11
  383. package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
  384. package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
  385. package/src/components/FieldPhone/FieldPhone2.vue +0 -671
  386. package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
  387. package/src/modules/organizations/components/blocks/User.vue +0 -69
  388. /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
@@ -0,0 +1,92 @@
1
+ import { ref as t, openBlock as n, createElementBlock as o, Fragment as y, renderList as h, createElementVNode as c, createBlock as b, createCommentVNode as m, toDisplayString as k } from "vue";
2
+ import x from "../../../icons/navigation/IconCheckmark.vue.js";
3
+ const w = { class: "bg-grey radius-medium w-100" }, _ = /* @__PURE__ */ c("h3", { class: "pd-medium" }, "Tracking History", -1), C = { class: "flex-center flex i-big radius-extra br-solid br-2px br-black-transp-10 mn-r-small" }, S = { class: "h4 w-8r" }, Y = ["disabled", "onClick"], O = {
4
+ __name: "StatusHistory",
5
+ props: {
6
+ statusHistory: {
7
+ type: Array
8
+ },
9
+ statusCurrent: {
10
+ type: String
11
+ },
12
+ edit: {
13
+ type: Boolean
14
+ }
15
+ },
16
+ setup(u) {
17
+ const l = u, s = t([
18
+ {
19
+ value: "created",
20
+ name: "Received",
21
+ nextstatus: "Confirming order...",
22
+ description: "Your order has been successfully created. Our manager will contact you within five minutes to confirm your order."
23
+ },
24
+ {
25
+ value: "confirming",
26
+ name: "Confirming",
27
+ nextstatus: "Confirming order...",
28
+ description: "Your order has been confirmed. We are now processing your items and preparing them for shipment."
29
+ },
30
+ {
31
+ value: "confirmed",
32
+ name: "Confirmed",
33
+ nextstatus: "Order is confirmed. Packing order...",
34
+ description: "Your order has been confirmed. We are now processing your items and preparing them for shipment."
35
+ },
36
+ {
37
+ value: "packing",
38
+ name: "Packing",
39
+ nextstatus: "Packing order...",
40
+ description: "Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information."
41
+ },
42
+ {
43
+ value: "packed",
44
+ name: "Packed",
45
+ nextstatus: "Delivering order...",
46
+ description: "Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information."
47
+ },
48
+ {
49
+ value: "in delivery",
50
+ name: "Delivering",
51
+ description: "Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible."
52
+ },
53
+ {
54
+ value: "delivered",
55
+ name: "Delivered",
56
+ description: "Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us."
57
+ }
58
+ ]), a = t(l.statusCurrent), p = t(l.statusHistory), v = (r) => p.value.some((i) => i.status === r), f = (r) => {
59
+ const i = s.value.findIndex((d) => d.value === a.value);
60
+ console.log(status.status === a.value), console.log(a.value), console.log(status);
61
+ const e = i + 1;
62
+ return s.value[e] && s.value[e].value === r;
63
+ }, g = async (r) => {
64
+ };
65
+ return t("192.168.1.197"), t(9100), t(`This is some text to print
66
+
67
+ `), (r, i) => (n(), o("div", w, [
68
+ _,
69
+ (n(!0), o(y, null, h(s.value, (e) => (n(), o("div", {
70
+ key: e.value,
71
+ class: "w-100 br-t br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"
72
+ }, [
73
+ c("div", C, [
74
+ v(e.value) ? (n(), b(x, {
75
+ key: 0,
76
+ class: "i-medium"
77
+ })) : m("", !0)
78
+ ]),
79
+ c("p", S, k(e.name), 1),
80
+ u.edit ? (n(), o("button", {
81
+ key: 0,
82
+ disabled: !f(e.value),
83
+ onClick: (d) => g(),
84
+ class: "mn-l-auto bg-main button radius-big"
85
+ }, "Set status", 8, Y)) : m("", !0)
86
+ ]))), 128))
87
+ ]));
88
+ }
89
+ };
90
+ export {
91
+ O as default
92
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),D=require("vue-router"),C=require("../blocks/CardOrderItem.vue.cjs"),B=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),q=require("../../../chats/components/pages/ChatPage.vue.cjs"),z=require("../blocks/StatusHistory.vue.cjs"),I=require("../../../globals/store/globals.cjs"),m=require("../../store/orders.cjs"),M=require("../../../products/store/products.cjs"),T=require("../../../organizations/store/organizations.cjs");require("./Order.vue2.cjs");const P=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),n=c=>(e.pushScopeId("data-v-622bfaf9"),c=c(),e.popScopeId(),c),R={key:0,class:"pd-thin"},F={key:0,class:"mn-b-thin pos-relative w-100 bg-main radius-big pd-big"},H={class:"mn-b-small"},A=n(()=>e.createElementVNode("p",{class:"mn-b-medium w-m-40r p-medium"},"Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.",-1)),U={class:"radius-extra mn-b-medium flex-nowrap flex h-1r pos-relativew-40r"},W={class:"pos-absolute pos-t-medium pos-r-medium t-medium p-medium"},Y={class:"p-small t-transp"},j={key:1,class:"gap-thin cols-2"},L={class:"w-100"},G={class:"mn-b-thin bg-grey w-100 o-hidden radius-medium"},J={class:"pd-small flex-nowrap flex"},K={class:"mn-r-auto"},Q=n(()=>e.createElementVNode("span",{class:"d-block t-medium p-medium"},"Your order is",-1)),X={class:"t-lh-075 h2 d-block mn-b-small"},Z=n(()=>e.createElementVNode("p",{class:"pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max"},"as on 29 aug 2021, Friday",-1)),$={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},ee=n(()=>e.createElementVNode("p",{class:"w-100 t-medium p-medium"}," Phone ",-1)),te={class:"w-100 t-right"},ae={key:0,class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},re={class:"w-100 t-medium p-medium"},se={class:"w-100 t-right"},le={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},ne=n(()=>e.createElementVNode("p",{class:"t-medium p-medium"}," Address ",-1)),oe={class:"w-100 t-right"},ie={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},de=n(()=>e.createElementVNode("p",{class:"mn-b-small t-medium p-medium"}," Delivery ",-1)),ce={class:"w-100 t-right mn-b-small"},ue={key:2,class:"t-transp"},me={class:"bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100"},pe=n(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Order Summary",-1)),ve={class:"flex gap-thin flex-column mn-b-semi"},be={class:"mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100"},_e={class:"pd-small br-solid br-b br-black-transp-10 flex"},ge=n(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total",-1)),he={class:"pd-small br-solid br-b br-black-transp-10 flex"},ye=n(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"Delivery",-1)),Ne={class:"pd-small flex-bottom flex"},fe=n(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total to pay",-1)),Ve={class:"p-big t-semi"},Ee=n(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Chat With Us",-1)),we={__name:"Order",setup(c){D.useRouter();const u=D.useRoute(),t=e.ref(null),p=e.ref(null),s=e.ref(null);e.onMounted(async()=>{var a,l,r;t.value=await m.actions.read({_id:u.params.order}),t.value=t.value[0],p.value=await M.actions.read({organization:(a=t.value)==null?void 0:a.owner.target._id}),s.value=await T.actions.read({_id:(l=t.value)==null?void 0:l.owner.target._id,location:(r=I.state.position)==null?void 0:r.location})});let v=e.computed(()=>{var a;return Number((a=t.value)==null?void 0:a.positions.reduce((l,r)=>l+r.price*r.quantity,0))});e.computed(()=>{var a;return Number((a=t.value)==null?void 0:a.positions.reduce((l,r)=>l+r.quantity,0))});let S=e.computed(()=>{var a;return(a=t.value)==null?void 0:a.positions.map(({_id:l,quantity:r})=>{const o=p.value.find(i=>i._id===l);return console.log(o),console.log(p),{name:o.name,images:o.images,price:o.price,_id:o._id,quantity:r}})});function O(a,l){if(!a)return null;const r=10*60*1e3,o=Math.ceil((20+3*a)/5)*5*60*1e3,i=new Date(l).getTime(),d=new Date(i+r+o);return console.log(l),console.log(d),d}return(a,l)=>{var r,o,i,d,b,_,g,h,y,N,f,V,E,w,k;return t.value&&s.value?(e.openBlock(),e.createElementBlock("div",R,[t.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("h2",H,"Order is "+e.toDisplayString(t.value.status),1),A,e.createElementVNode("div",U,[e.createElementVNode("div",{class:e.normalizeClass(["bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",{"br-anim br-glow br-glow-anim":["created","confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===0}])},null,2),e.createElementVNode("div",{class:e.normalizeClass(["bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",{"br-anim br-glow br-glow-anim":["created","confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["created","confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="created"}])},null,2),e.createElementVNode("div",{class:e.normalizeClass([{"br-anim br-glow br-glow-anim":["confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["confirmed","packing","in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="confirmed"},"bg-grey radius-extra mn-r-thin h-100 w-40"])},null,2),e.createElementVNode("div",{class:e.normalizeClass(["bg-grey radius-extra mn-r-thin h-100 w-40",{"br-anim br-glow br-glow-anim":["packing","in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["packing","in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="packing"}])},null,2),e.createElementVNode("div",{class:e.normalizeClass(["bg-grey radius-extra h-100 w-20",{"br-anim br-glow br-glow-anim":["in delivery","delivered"].indexOf(t.value.status)===0},{"t-transp":["in delivery","delivered"].indexOf(t.value.status)===-1},{blink:t.value.status==="in delivery"}])},null,2)]),e.createElementVNode("p",null,"Estimated Arrival "+e.toDisplayString(a.formatDate(O((r=s.value[0])==null?void 0:r.distance,t.value.createdAt))),1),e.createElementVNode("h3",null,e.toDisplayString((o=s.value[0])!=null&&o.distance?Math.ceil((10+3*((i=s.value[0])==null?void 0:i.distance))/5)*5+"-"+Math.ceil((20+3*((d=s.value[0])==null?void 0:d.distance))/5)*5+" MIN":"Unavailable"),1),e.createElementVNode("p",W,[e.createTextVNode(" Order No: "),e.createElementVNode("span",Y,"#"+e.toDisplayString(t.value._id),1)])])):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",L,[s.value[0]?(e.openBlock(),e.createBlock(B.default,{key:0,organization:s.value[0],showRating:!0,showFollowers:!1,showProducts:!1,class:"bg-grey mn-b-thin w-100 o-hidden radius-big pd-small"},null,8,["organization"])):e.createCommentVNode("",!0),e.createElementVNode("div",G,[e.createElementVNode("div",J,[e.createElementVNode("div",K,[Q,e.createElementVNode("span",X,e.toDisplayString(t.value.status),1),Z])]),e.createElementVNode("div",$,[ee,e.createElementVNode("p",te,e.toDisplayString((b=t.value.user)==null?void 0:b.number),1)]),(_=t.value.user)!=null&&_.messenger.type?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("p",re,e.toDisplayString((g=t.value.user)==null?void 0:g.messenger.type),1),e.createElementVNode("p",se,e.toDisplayString((h=t.value.user)==null?void 0:h.messenger.value),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",le,[ne,e.createElementVNode("p",oe,e.toDisplayString((y=t.value.delivery)==null?void 0:y.address.slice(0,64)),1)]),e.createElementVNode("div",ie,[de,e.createElementVNode("p",ce,e.toDisplayString((N=t.value.delivery)==null?void 0:N.type),1)])]),m.state.current.status_history?(e.openBlock(),e.createBlock(z.default,{key:1,statusHistory:m.state.current.status_history,statusCurrent:m.state.current.status,edit:e.unref(u).name==="Order Edit"},null,8,["statusHistory","statusCurrent","edit"])):e.createCommentVNode("",!0),a.payment&&a.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",ue,"Paid")):e.createCommentVNode("",!0)]),e.createElementVNode("div",me,[pe,e.createElementVNode("ul",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(S),(x,xe)=>(e.openBlock(),e.createBlock(C.default,{key:x._id,editable:!1,product:x},null,8,["product"]))),128))]),e.createElementVNode("div",be,[e.createElementVNode("div",_e,[ge,e.createElementVNode("p",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(a.returnCurrency()),1)]),e.createElementVNode("div",he,[ye,e.createElementVNode("p",null,e.toDisplayString(a.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((f=s.value[0])==null?void 0:f.distance)-7,5*(((V=s.value[0])==null?void 0:V.distance)/10))),1)]),e.createElementVNode("div",Ne,[fe,e.createElementVNode("p",Ve,e.toDisplayString(a.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((E=s.value[0])==null?void 0:E.distance)-7,5*(((w=s.value[0])==null?void 0:w.distance)/10))+e.unref(v)),1)])]),Ee,e.createVNode(q.default,{username:e.unref(u).name==="Order Status"?((k=t.value.user)==null?void 0:k.name)||"User":"Weeder Support",chatID:e.unref(u).params.order,class:"radius-semi bg-white o-hidden"},null,8,["username","chatID"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},ke=P.default(we,[["__scopeId","data-v-622bfaf9"]]);exports.default=ke;
@@ -0,0 +1,202 @@
1
+ import { ref as f, onMounted as V, computed as y, openBlock as d, createElementBlock as m, createElementVNode as e, toDisplayString as a, normalizeClass as v, createTextVNode as A, createCommentVNode as u, createBlock as w, unref as p, Fragment as B, renderList as U, createVNode as q, pushScopeId as H, popScopeId as W } from "vue";
2
+ import { useRouter as Y, useRoute as L } from "vue-router";
3
+ import j from "../blocks/CardOrderItem.vue.js";
4
+ import G from "../../../organizations/components/blocks/CardOrganization.vue.js";
5
+ import J from "../../../chats/components/pages/ChatPage.vue.js";
6
+ import K from "../blocks/StatusHistory.vue.js";
7
+ import { state as Q } from "../../../globals/store/globals.js";
8
+ import { actions as X, state as k } from "../../store/orders.js";
9
+ import { actions as Z } from "../../../products/store/products.js";
10
+ import { actions as ee } from "../../../organizations/store/organizations.js";
11
+ import "./Order.vue2.js";
12
+ import se from "../../../../../../_virtual/_plugin-vue_export-helper.js";
13
+ const n = (b) => (H("data-v-622bfaf9"), b = b(), W(), b), te = {
14
+ key: 0,
15
+ class: "pd-thin"
16
+ }, ae = {
17
+ key: 0,
18
+ class: "mn-b-thin pos-relative w-100 bg-main radius-big pd-big"
19
+ }, re = { class: "mn-b-small" }, ie = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-b-medium w-m-40r p-medium" }, "Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.", -1)), le = { class: "radius-extra mn-b-medium flex-nowrap flex h-1r pos-relativew-40r" }, ne = { class: "pos-absolute pos-t-medium pos-r-medium t-medium p-medium" }, oe = { class: "p-small t-transp" }, de = {
20
+ key: 1,
21
+ class: "gap-thin cols-2"
22
+ }, ue = { class: "w-100" }, ce = { class: "mn-b-thin bg-grey w-100 o-hidden radius-medium" }, me = { class: "pd-small flex-nowrap flex" }, pe = { class: "mn-r-auto" }, _e = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "d-block t-medium p-medium" }, "Your order is", -1)), ve = { class: "t-lh-075 h2 d-block mn-b-small" }, be = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" }, "as on 29 aug 2021, Friday", -1)), he = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, ge = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), fe = { class: "w-100 t-right" }, ye = {
23
+ key: 0,
24
+ class: "pd-small cols-2 br-t br-black-transp-10 br-solid"
25
+ }, we = { class: "w-100 t-medium p-medium" }, ke = { class: "w-100 t-right" }, xe = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Oe = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "t-medium p-medium" }, " Address ", -1)), De = { class: "w-100 t-right" }, Ie = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Ce = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Ne = { class: "w-100 t-right mn-b-small" }, Me = {
26
+ key: 2,
27
+ class: "t-transp"
28
+ }, Se = { class: "bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100" }, Te = /* @__PURE__ */ n(() => /* @__PURE__ */ e("h3", { class: "mn-b-small" }, "Order Summary", -1)), $e = { class: "flex gap-thin flex-column mn-b-semi" }, ze = { class: "mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100" }, Pe = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Ee = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "In total", -1)), Fe = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Re = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), Ve = { class: "pd-small flex-bottom flex" }, Ae = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Be = { class: "p-big t-semi" }, Ue = /* @__PURE__ */ n(() => /* @__PURE__ */ e("h3", { class: "mn-b-small" }, "Chat With Us", -1)), qe = {
29
+ __name: "Order",
30
+ setup(b) {
31
+ Y();
32
+ const h = L(), s = f(null), g = f(null), i = f(null);
33
+ V(async () => {
34
+ var t, l, r;
35
+ s.value = await X.read({ _id: h.params.order }), s.value = s.value[0], g.value = await Z.read({
36
+ organization: (t = s.value) == null ? void 0 : t.owner.target._id
37
+ }), i.value = await ee.read({
38
+ _id: (l = s.value) == null ? void 0 : l.owner.target._id,
39
+ location: (r = Q.position) == null ? void 0 : r.location
40
+ });
41
+ });
42
+ let x = y(() => {
43
+ var t;
44
+ return Number((t = s.value) == null ? void 0 : t.positions.reduce((l, r) => l + r.price * r.quantity, 0));
45
+ });
46
+ y(() => {
47
+ var t;
48
+ return Number((t = s.value) == null ? void 0 : t.positions.reduce((l, r) => l + r.quantity, 0));
49
+ });
50
+ let F = y(() => {
51
+ var t;
52
+ return (t = s.value) == null ? void 0 : t.positions.map(({ _id: l, quantity: r }) => {
53
+ const o = g.value.find((c) => c._id === l);
54
+ return console.log(o), console.log(g), {
55
+ name: o.name,
56
+ images: o.images,
57
+ price: o.price,
58
+ _id: o._id,
59
+ quantity: r
60
+ };
61
+ });
62
+ });
63
+ function R(t, l) {
64
+ if (!t)
65
+ return null;
66
+ const r = 10 * 60 * 1e3, o = Math.ceil((20 + 3 * t) / 5) * 5 * 60 * 1e3, c = new Date(l).getTime(), _ = new Date(c + r + o);
67
+ return console.log(l), console.log(_), _;
68
+ }
69
+ return (t, l) => {
70
+ var r, o, c, _, O, D, I, C, N, M, S, T, $, z, P;
71
+ return s.value && i.value ? (d(), m("div", te, [
72
+ s.value ? (d(), m("div", ae, [
73
+ e("h2", re, "Order is " + a(s.value.status), 1),
74
+ ie,
75
+ e("div", le, [
76
+ e("div", {
77
+ class: v([
78
+ "bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",
79
+ { "br-anim br-glow br-glow-anim": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 }
80
+ ])
81
+ }, null, 2),
82
+ e("div", {
83
+ class: v([
84
+ "bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",
85
+ { "br-anim br-glow br-glow-anim": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
86
+ { "t-transp": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
87
+ { blink: s.value.status === "created" }
88
+ ])
89
+ }, null, 2),
90
+ e("div", {
91
+ class: v([
92
+ { "br-anim br-glow br-glow-anim": ["confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
93
+ { "t-transp": ["confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
94
+ { blink: s.value.status === "confirmed" },
95
+ "bg-grey radius-extra mn-r-thin h-100 w-40"
96
+ ])
97
+ }, null, 2),
98
+ e("div", {
99
+ class: v([
100
+ "bg-grey radius-extra mn-r-thin h-100 w-40",
101
+ { "br-anim br-glow br-glow-anim": ["packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
102
+ { "t-transp": ["packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
103
+ { blink: s.value.status === "packing" }
104
+ ])
105
+ }, null, 2),
106
+ e("div", {
107
+ class: v([
108
+ "bg-grey radius-extra h-100 w-20",
109
+ { "br-anim br-glow br-glow-anim": ["in delivery", "delivered"].indexOf(s.value.status) === 0 },
110
+ { "t-transp": ["in delivery", "delivered"].indexOf(s.value.status) === -1 },
111
+ { blink: s.value.status === "in delivery" }
112
+ ])
113
+ }, null, 2)
114
+ ]),
115
+ e("p", null, "Estimated Arrival " + a(t.formatDate(R((r = i.value[0]) == null ? void 0 : r.distance, s.value.createdAt))), 1),
116
+ e("h3", null, a((o = i.value[0]) != null && o.distance ? Math.ceil((10 + 3 * ((c = i.value[0]) == null ? void 0 : c.distance)) / 5) * 5 + "-" + Math.ceil((20 + 3 * ((_ = i.value[0]) == null ? void 0 : _.distance)) / 5) * 5 + " MIN" : "Unavailable"), 1),
117
+ e("p", ne, [
118
+ A(" Order No: "),
119
+ e("span", oe, "#" + a(s.value._id), 1)
120
+ ])
121
+ ])) : u("", !0),
122
+ s.value ? (d(), m("div", de, [
123
+ e("div", ue, [
124
+ i.value[0] ? (d(), w(G, {
125
+ key: 0,
126
+ organization: i.value[0],
127
+ showRating: !0,
128
+ showFollowers: !1,
129
+ showProducts: !1,
130
+ class: "bg-grey mn-b-thin w-100 o-hidden radius-big pd-small"
131
+ }, null, 8, ["organization"])) : u("", !0),
132
+ e("div", ce, [
133
+ e("div", me, [
134
+ e("div", pe, [
135
+ _e,
136
+ e("span", ve, a(s.value.status), 1),
137
+ be
138
+ ])
139
+ ]),
140
+ e("div", he, [
141
+ ge,
142
+ e("p", fe, a((O = s.value.user) == null ? void 0 : O.number), 1)
143
+ ]),
144
+ (D = s.value.user) != null && D.messenger.type ? (d(), m("div", ye, [
145
+ e("p", we, a((I = s.value.user) == null ? void 0 : I.messenger.type), 1),
146
+ e("p", ke, a((C = s.value.user) == null ? void 0 : C.messenger.value), 1)
147
+ ])) : u("", !0),
148
+ e("div", xe, [
149
+ Oe,
150
+ e("p", De, a((N = s.value.delivery) == null ? void 0 : N.address.slice(0, 64)), 1)
151
+ ]),
152
+ e("div", Ie, [
153
+ Ce,
154
+ e("p", Ne, a((M = s.value.delivery) == null ? void 0 : M.type), 1)
155
+ ])
156
+ ]),
157
+ k.current.status_history ? (d(), w(K, {
158
+ key: 1,
159
+ statusHistory: k.current.status_history,
160
+ statusCurrent: k.current.status,
161
+ edit: p(h).name === "Order Edit"
162
+ }, null, 8, ["statusHistory", "statusCurrent", "edit"])) : u("", !0),
163
+ t.payment && t.payment.Status === "CONFIRMED" ? (d(), m("span", Me, "Paid")) : u("", !0)
164
+ ]),
165
+ e("div", Se, [
166
+ Te,
167
+ e("ul", $e, [
168
+ (d(!0), m(B, null, U(p(F), (E, He) => (d(), w(j, {
169
+ key: E._id,
170
+ editable: !1,
171
+ product: E
172
+ }, null, 8, ["product"]))), 128))
173
+ ]),
174
+ e("div", ze, [
175
+ e("div", Pe, [
176
+ Ee,
177
+ e("p", null, a(p(x)) + " " + a(t.returnCurrency()), 1)
178
+ ]),
179
+ e("div", Fe, [
180
+ Re,
181
+ e("p", null, a(t.returnCurrency()) + " " + a(Math.trunc(100 + 20 * ((S = i.value[0]) == null ? void 0 : S.distance) - 7, 5 * (((T = i.value[0]) == null ? void 0 : T.distance) / 10))), 1)
182
+ ]),
183
+ e("div", Ve, [
184
+ Ae,
185
+ e("p", Be, a(t.returnCurrency()) + " " + a(Math.trunc(100 + 20 * (($ = i.value[0]) == null ? void 0 : $.distance) - 7, 5 * (((z = i.value[0]) == null ? void 0 : z.distance) / 10)) + p(x)), 1)
186
+ ])
187
+ ]),
188
+ Ue,
189
+ q(J, {
190
+ username: p(h).name === "Order Status" ? ((P = s.value.user) == null ? void 0 : P.name) || "User" : "Weeder Support",
191
+ chatID: p(h).params.order,
192
+ class: "radius-semi bg-white o-hidden"
193
+ }, null, 8, ["username", "chatID"])
194
+ ])
195
+ ])) : u("", !0)
196
+ ])) : u("", !0);
197
+ };
198
+ }
199
+ }, ts = /* @__PURE__ */ se(qe, [["__scopeId", "data-v-622bfaf9"]]);
200
+ export {
201
+ ts as default
202
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("../blocks/CardOrderItem.vue.cjs"),N=require("../sections/AskToLogin.vue.cjs"),q=require("../sections/Succes.vue.cjs"),E=require("../sections/EmptyState.vue.cjs"),S=require("../sections/FormCustomerDetails.vue.cjs"),P=require("../sections/FormDelivery.vue.cjs"),D=require("../sections/FormPayment.vue.cjs"),y=require("vue-router"),w=require("../../../globals/store/globals.cjs"),m=require("../../../auth/store/auth.cjs"),o=require("../../store/shopcart.cjs"),g=require("../../../organizations/store/organizations.cjs"),t=require("../../store/orders.cjs"),M=require("../../../users/store/users.cjs");require("./OrderCreate.vue2.cjs");const O={class:"pd-thin"},T={class:"gap-small mn-b-thin cols-2"},F={key:2,class:"order-form col"},z={key:3},I=e.createElementVNode("p",{class:"p-big mn-b-small"},"Your Order",-1),R={class:"mn-b-semi"},A={style:{"border-bottom":"1px solid #f7f7f7","border-top":"1px solid #f7f7f7"},class:"pd-b-medium pd-t-medium mn-b-medium"},G={class:"mn-b-thin"},L={class:"mn-b-thin"},Q={class:"h3"},j=e.createElementVNode("p",{class:"mn-b-thin"}," By making this purchase you agree to the General Terms and Conditions. ",-1),Y=e.createElementVNode("p",{class:"mn-b-small"}," I agree that placing the order places me under an obligation to make a payment in accordance with the General Terms and Conditions. ",-1),$=["disabled"],H={__name:"OrderCreate",setup(J){y.useRoute();const _=y.useRouter(),p=e.computed(()=>t.state.current);e.computed(()=>M.state.current);const h=e.computed(()=>o.getters.cartTotalPrice),n=e.ref({});e.onMounted(async()=>{var r;n.value=await g.actions.read({_id:o.state.organization,location:(r=w.state.position)==null?void 0:r.location})}),e.watch(()=>t.state.current.delivery.address,async(r,s)=>{n.value=await g.actions.read({_id:o.state.organization,location:t.state.current.delivery.location})},{deep:!0});const v=e.computed(()=>{var r;return((r=t.state.current.customer.name)==null?void 0:r.length)<2}),k=e.computed(()=>{var c,u,l,a;const r=(c=t.state.current.customer.messenger)==null?void 0:c.type,s=((l=(u=t.state.current.customer.messenger)==null?void 0:u.value)==null?void 0:l.length)>2;return!(((a=t.state.current.customer.number)==null?void 0:a.length)>0)&&!(r&&s)}),f=e.computed(()=>t.state.current.delivery.type!=="Pickup"&&t.state.current.delivery.address<2),b=e.computed(()=>!t.state.current.delivery.type),B=e.computed(()=>!t.state.current.payment.type);async function C(){t.state.current.status="created",t.state.current.owner={target:n.value[0]._id,type:"organization"},m.state.user._id&&(t.state.current.creator={target:m.state.user._id,type:"user"}),t.state.current.positions=o.state.positions;const r=localStorage.getItem("referalCode");r&&(t.state.current.referralCode=r);let s=await t.actions.create(t.state.current);s?_.push({name:"Order Status",params:{order:s._id}}):alert("something wrong")}return(r,s)=>{var d,c,u,l;return e.openBlock(),e.createElementBlock("section",O,[m.state.access.status===!1?(e.openBlock(),e.createBlock(N.default,{key:0,class:"mn-b-big"})):e.createCommentVNode("",!0),e.createElementVNode("div",T,[o.state.positions<1?(e.openBlock(),e.createBlock(E.default,{key:0})):e.createCommentVNode("",!0),p.value.status===!0&&o.state.positions.length>0?(e.openBlock(),e.createBlock(q.default,{key:1,order:p.value},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(S.default,{order:t.state.current},null,8,["order"]),t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createBlock(P.default,{key:0,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createBlock(D.default,{key:1,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),o.state.positions.length>0?(e.openBlock(),e.createElementBlock("div",z,[I,e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.state.positions,a=>(e.openBlock(),e.createBlock(V.default,{key:a._id,editable:"true",product:a,increase:i=>o.actions.incrementItemQuantity(i._id),decrease:i=>o.actions.decrementItemQuantity(i._id),remove:i=>o.actions.removeProduct(i._id)},null,8,["product","increase","decrease","remove"]))),128))]),e.createElementVNode("div",A,[e.createElementVNode("p",G," Subtotal: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(h.value),1),e.createElementVNode("p",L," Delivery: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((d=n.value[0])==null?void 0:d.distance)-7,5*(((c=n.value[0])==null?void 0:c.distance)/10))),1),e.createElementVNode("p",Q," Total: "+e.toDisplayString(r.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((u=n.value[0])==null?void 0:u.distance)-7,5*(((l=n.value[0])==null?void 0:l.distance)/10))+h.value.value),1)]),j,Y,t.state.current.status!==!0&&o.state.positions.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:v.value||k.value||r.errorCity||f.value||b.value||B.value,onClick:s[0]||(s[0]=a=>C()),class:"bg-main pd-small radius-big w-100 button"}," Place an Order ",8,$)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])}}};exports.default=H;
@@ -0,0 +1,127 @@
1
+ import { computed as a, ref as z, onMounted as B, watch as I, openBlock as t, createElementBlock as h, createBlock as l, createCommentVNode as i, createElementVNode as n, createVNode as N, Fragment as S, renderList as D, toDisplayString as d } from "vue";
2
+ import F from "../blocks/CardOrderItem.vue.js";
3
+ import E from "../sections/AskToLogin.vue.js";
4
+ import G from "../sections/Succes.vue.js";
5
+ import Q from "../sections/EmptyState.vue.js";
6
+ import R from "../sections/FormCustomerDetails.vue.js";
7
+ import A from "../sections/FormDelivery.vue.js";
8
+ import L from "../sections/FormPayment.vue.js";
9
+ import { useRoute as Y, useRouter as j } from "vue-router";
10
+ import { state as q } from "../../../globals/store/globals.js";
11
+ import { state as g } from "../../../auth/store/auth.js";
12
+ import { getters as x, state as s, actions as v } from "../../store/shopcart.js";
13
+ import { actions as $ } from "../../../organizations/store/organizations.js";
14
+ import { state as e, actions as H } from "../../store/orders.js";
15
+ import { state as J } from "../../../users/store/users.js";
16
+ import "./OrderCreate.vue2.js";
17
+ const K = { class: "pd-thin" }, U = { class: "gap-small mn-b-thin cols-2" }, W = {
18
+ key: 2,
19
+ class: "order-form col"
20
+ }, X = { key: 3 }, Z = /* @__PURE__ */ n("p", { class: "p-big mn-b-small" }, "Your Order", -1), ee = { class: "mn-b-semi" }, re = {
21
+ style: { "border-bottom": "1px solid #f7f7f7", "border-top": "1px solid #f7f7f7" },
22
+ class: "pd-b-medium pd-t-medium mn-b-medium"
23
+ }, te = { class: "mn-b-thin" }, se = { class: "mn-b-thin" }, ne = { class: "h3" }, oe = /* @__PURE__ */ n("p", { class: "mn-b-thin" }, " By making this purchase you agree to the General Terms and Conditions. ", -1), ae = /* @__PURE__ */ n("p", { class: "mn-b-small" }, " I agree that placing the order places me under an obligation to make a payment in accordance with the General Terms and Conditions. ", -1), ie = ["disabled"], Pe = {
24
+ __name: "OrderCreate",
25
+ setup(ue) {
26
+ Y();
27
+ const C = j(), b = a(() => e.current);
28
+ a(() => J.current);
29
+ const k = a(() => x.cartTotalPrice), u = z({});
30
+ B(async () => {
31
+ var r;
32
+ u.value = await $.read({
33
+ _id: s.organization,
34
+ location: (r = q.position) == null ? void 0 : r.location
35
+ });
36
+ }), I(() => e.current.delivery.address, async (r, o) => {
37
+ u.value = await $.read({
38
+ _id: s.organization,
39
+ location: e.current.delivery.location
40
+ });
41
+ }, { deep: !0 });
42
+ const w = a(() => {
43
+ var r;
44
+ return ((r = e.current.customer.name) == null ? void 0 : r.length) < 2;
45
+ }), P = a(() => {
46
+ var m, p, _, c;
47
+ const r = (m = e.current.customer.messenger) == null ? void 0 : m.type, o = ((_ = (p = e.current.customer.messenger) == null ? void 0 : p.value) == null ? void 0 : _.length) > 2;
48
+ return !(((c = e.current.customer.number) == null ? void 0 : c.length) > 0) && !(r && o);
49
+ }), M = a(() => e.current.delivery.type !== "Pickup" && e.current.delivery.address < 2), O = a(() => !e.current.delivery.type), T = a(() => !e.current.payment.type);
50
+ async function V() {
51
+ e.current.status = "created", e.current.owner = {
52
+ target: u.value[0]._id,
53
+ type: "organization"
54
+ }, g.user._id && (e.current.creator = {
55
+ target: g.user._id,
56
+ type: "user"
57
+ }), e.current.positions = s.positions;
58
+ const r = localStorage.getItem("referalCode");
59
+ r && (e.current.referralCode = r);
60
+ let o = await H.create(e.current);
61
+ o ? C.push({
62
+ name: "Order Status",
63
+ params: {
64
+ order: o._id
65
+ }
66
+ }) : alert("something wrong");
67
+ }
68
+ return (r, o) => {
69
+ var y, m, p, _;
70
+ return t(), h("section", K, [
71
+ g.access.status === !1 ? (t(), l(E, {
72
+ key: 0,
73
+ class: "mn-b-big"
74
+ })) : i("", !0),
75
+ n("div", U, [
76
+ s.positions < 1 ? (t(), l(Q, { key: 0 })) : i("", !0),
77
+ b.value.status === !0 && s.positions.length > 0 ? (t(), l(G, {
78
+ key: 1,
79
+ order: b.value
80
+ }, null, 8, ["order"])) : i("", !0),
81
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), h("div", W, [
82
+ N(R, {
83
+ order: e.current
84
+ }, null, 8, ["order"]),
85
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), l(A, {
86
+ key: 0,
87
+ order: e.current
88
+ }, null, 8, ["order"])) : i("", !0),
89
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), l(L, {
90
+ key: 1,
91
+ order: e.current
92
+ }, null, 8, ["order"])) : i("", !0)
93
+ ])) : i("", !0),
94
+ s.positions.length > 0 ? (t(), h("div", X, [
95
+ Z,
96
+ n("ul", ee, [
97
+ (t(!0), h(S, null, D(s.positions, (c) => (t(), l(F, {
98
+ key: c._id,
99
+ editable: "true",
100
+ product: c,
101
+ increase: (f) => v.incrementItemQuantity(f._id),
102
+ decrease: (f) => v.decrementItemQuantity(f._id),
103
+ remove: (f) => v.removeProduct(f._id)
104
+ }, null, 8, ["product", "increase", "decrease", "remove"]))), 128))
105
+ ]),
106
+ n("div", re, [
107
+ n("p", te, " Subtotal: " + d(r.returnCurrency()) + " " + d(k.value), 1),
108
+ n("p", se, " Delivery: " + d(r.returnCurrency()) + " " + d(Math.trunc(100 + 20 * ((y = u.value[0]) == null ? void 0 : y.distance) - 7, 5 * (((m = u.value[0]) == null ? void 0 : m.distance) / 10))), 1),
109
+ n("p", ne, " Total: " + d(r.returnCurrency()) + " " + d(Math.trunc(100 + 20 * ((p = u.value[0]) == null ? void 0 : p.distance) - 7, 5 * (((_ = u.value[0]) == null ? void 0 : _.distance) / 10)) + k.value.value), 1)
110
+ ]),
111
+ oe,
112
+ ae,
113
+ e.current.status !== !0 && s.positions.length > 0 ? (t(), h("button", {
114
+ key: 0,
115
+ disabled: w.value || P.value || r.errorCity || M.value || O.value || T.value,
116
+ onClick: o[0] || (o[0] = (c) => V()),
117
+ class: "bg-main pd-small radius-big w-100 button"
118
+ }, " Place an Order ", 8, ie)) : i("", !0)
119
+ ])) : i("", !0)
120
+ ])
121
+ ]);
122
+ };
123
+ }
124
+ };
125
+ export {
126
+ Pe as default
127
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-router"),x=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const V=require("../../../../components/Button/Button.vue.cjs"),f=require("../../../../components/Popup/Popup.vue2.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const y=require("../sections/FormClientDetails.vue.cjs"),P=require("../sections/FormDelivery.vue.cjs"),q=require("../sections/FormPayment.vue.cjs"),v=require("../../../auth/store/auth.cjs"),a=require("../../../globals/store/globals.cjs"),t=require("../../store/orders.cjs"),B=require("../../../products/store/products.cjs");require("./OrderCreateBackoffice.vue2.cjs");const E={class:"flex-v-center flex-nowrap flex"},O=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),F=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),D={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},S={key:0,class:"w-100"},R={class:"flex-nowrap flex"},A=e.createElementVNode("button",{class:"w-100 bg-main pd-small flex-center flex uppercase t-medium"},"Select",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add New Client",-1),T={class:"h3 flex"},M=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),z={__name:"OrderCreateBackoffice",setup(L){const l=p.useRoute(),h=p.useRouter();let b=e.computed(()=>Number(t.state.current.positions.reduce((u,n)=>u+n.price*n.quantity,0)));const c=e.ref(!1);function k(){c.value=!0}function d(){c.value=!1}const i=e.ref(!1);function N(){i.value=!0}function g(){i.value=!1}e.ref(null);function C(){t.state.current.creator={type:"user",target:v.state.user._id},t.state.current.owner={type:"organization",target:l.params._id},t.actions.create(t.state.current)}function w(){h.push({name:"Backoffice Orders",params:{_id:l.params._id}})}return e.onMounted(async()=>{}),(u,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",E,[O,e.createVNode(V.default,{submit:C,callback:w,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(f.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[F,e.createElementVNode("div",D,[e.createVNode(x.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>B.actions.read(r),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,j)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let m={...o};m.quantity=1,a.actions.add(t.state.current.positions,m),d()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(s.default,{title:"Positions",actions:[{label:"+",function:()=>k()}],class:"mn-b-semi"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",S," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{a.actions.increment(t.state.current.positions,r)},onDecrease:()=>{a.actions.decrement(t.state.current.positions,r)},onRemove:()=>{a.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"]),e.createVNode(s.default,{title:"Customer",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[A,e.createElementVNode("button",{onClick:n[0]||(n[0]=r=>N()),class:"w-100 bg-main pd-small flex-center flex uppercase t-medium"},"Add new")])]),_:1}),t.state.current.status!==!0?(e.openBlock(),e.createBlock(P.default,{key:0,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),t.state.current.status!==!0?(e.openBlock(),e.createBlock(q.default,{key:1,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(f.default,{title:"Добавить участника",onClosePopup:g,isPopupOpen:i.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[I,e.createVNode(y.default,{order:t.state.current,class:"bg-grey"},null,8,["order"])]),_:1},8,["isPopupOpen"]),e.createVNode(s.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",T,[M,e.createElementVNode("span",null,e.toDisplayString(e.unref(b))+" "+e.toDisplayString(u.returnCurrency()),1)])]),_:1})]))}};exports.default=z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const q=require("../../../../components/Button/Button.vue2.cjs"),x=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const C=require("../../../users/components/blocks/CardUser.vue.cjs"),V=require("../sections/FormAddCustomer.vue.cjs"),O=require("../sections/FormDelivery.vue.cjs"),E=require("../sections/FormPayment.vue.cjs"),c=require("../../../globals/store/globals.cjs"),F=require("../../../auth/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");require("./OrderCreateBackoffice.vue2.cjs");const R={class:"h-100 flex flex-column pd-thin"},T={class:"flex-v-center flex-nowrap flex"},A=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),I=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),z={class:"h-100 bg-grey mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=h.useRoute(),y=h.useRouter();let g=e.computed(()=>Number(t.state.current.positions.reduce((d,s)=>d+s.price*s.quantity,0)));const n=e.ref("positions"),l=e.ref(!1);function v(){l.value=!0}function m(){l.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"user",target:F.state.user._id},t.state.current.owner={type:"organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function N(){y.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(async()=>{}),(d,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(q.default,{submit:w,callback:N,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(x.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=r=>n.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-grey mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:l.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,P)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let f={...o};f.quantity=1,c.actions.add(t.state.current.positions,f),m()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["search","states","store","options"])])]),_:1},8,["isPopupOpen"]),n.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>v()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{c.actions.increment(t.state.current.positions,r)},onDecrease:()=>{c.actions.decrement(t.state.current.positions,r)},onRemove:()=>{c.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),n.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:s[1]||(s[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-grey h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,P)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["search","states","store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),n.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),n.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(g))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;