@ozdao/prometheus-framework 0.2.112 → 0.2.114

Sign up to get free protection for your applications and to get access to all the features.
Files changed (529) hide show
  1. package/dist/common.schema-BFhpUXUt.js +12 -0
  2. package/dist/common.schema-ChBVARrs.mjs +13 -0
  3. package/dist/community.server.js +6 -4
  4. package/dist/community.server.mjs +4 -2
  5. package/dist/engagement.schema-CI2ifjXN.mjs +28 -0
  6. package/dist/engagement.schema-fdLNO2_6.js +27 -0
  7. package/dist/events.server.js +6 -4
  8. package/dist/events.server.mjs +4 -2
  9. package/dist/files.server.js +81 -29
  10. package/dist/files.server.mjs +81 -29
  11. package/dist/gallery.server.js +66 -39
  12. package/dist/gallery.server.mjs +66 -39
  13. package/dist/main-8APITHuW.mjs +14201 -0
  14. package/dist/main-8N2Jmsuk.js +2 -2
  15. package/dist/main-BJvlNekm.mjs +5 -5
  16. package/dist/main-BQisDfLk.js +2 -2
  17. package/dist/main-BV1Yv9Hy.js +2 -2
  18. package/dist/main-Bw0PvTs-.mjs +5 -5
  19. package/dist/main-ByCtZbHD.mjs +5 -5
  20. package/dist/main-CX2ISR43.mjs +5 -5
  21. package/dist/main-CXObXjv-.js +2 -2
  22. package/dist/main-CkeuHuCY.mjs +5 -5
  23. package/dist/main-CnfcBov2.mjs +5 -5
  24. package/dist/main-D50VqYhy.js +2 -2
  25. package/dist/main-D8gNZLSa.js +2 -2
  26. package/dist/main-DPsHxX0l.mjs +5 -5
  27. package/dist/main-DTlUA63C.mjs +5 -5
  28. package/dist/main-DfD5hLQo.mjs +5 -5
  29. package/dist/main-Dh6Zfei9.js +2 -2
  30. package/dist/main-DmNP-t33.mjs +5 -5
  31. package/dist/main-DwyUYWFX.js +2 -2
  32. package/dist/main-VcxO-jAt.js +92 -0
  33. package/dist/main-cffh4bbv.js +2 -2
  34. package/dist/main-pGo7JpSP.js +2 -2
  35. package/dist/main.css +1 -1
  36. package/dist/metadata.schema-6slGhpQS.js +40 -0
  37. package/dist/metadata.schema-CK5e2O3f.mjs +41 -0
  38. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  39. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +410 -407
  40. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -3
  41. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +469 -456
  42. package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
  43. package/dist/node_modules/web3/lib/esm/accounts.js +5 -2
  44. package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
  45. package/dist/node_modules/web3/lib/esm/index.js +45 -42
  46. package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
  47. package/dist/node_modules/web3/lib/esm/version.js +1 -1
  48. package/dist/node_modules/web3/lib/esm/web3.cjs +1 -1
  49. package/dist/node_modules/web3/lib/esm/web3.js +40 -37
  50. package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -1
  51. package/dist/node_modules/web3-core/lib/esm/web3_config.js +28 -18
  52. package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
  53. package/dist/node_modules/web3-core/lib/esm/web3_context.js +56 -53
  54. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
  55. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +100 -87
  56. package/dist/node_modules/web3-errors/lib/esm/error_codes.cjs +1 -1
  57. package/dist/node_modules/web3-errors/lib/esm/error_codes.js +97 -95
  58. package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.cjs +1 -1
  59. package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.js +8 -8
  60. package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.cjs +1 -1
  61. package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.js +20 -20
  62. package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.cjs +4 -4
  63. package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.js +2 -2
  64. package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.cjs +1 -1
  65. package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.js +33 -27
  66. package/dist/node_modules/web3-errors/lib/esm/web3_error_base.cjs +1 -1
  67. package/dist/node_modules/web3-errors/lib/esm/web3_error_base.js +33 -12
  68. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
  69. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +183 -179
  70. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
  71. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +10 -10
  72. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -1
  73. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +45 -44
  74. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
  75. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +59 -57
  76. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -1
  77. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +43 -43
  78. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -1
  79. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +31 -31
  80. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -1
  81. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +26 -26
  82. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
  83. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +53 -51
  84. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -1
  85. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +25 -23
  86. package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -1
  87. package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +103 -101
  88. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +2 -2
  89. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +159 -156
  90. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
  91. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +11 -8
  92. package/dist/node_modules/web3-eth-contract/lib/esm/index.cjs +1 -1
  93. package/dist/node_modules/web3-eth-contract/lib/esm/index.js +3 -0
  94. package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.cjs +1 -1
  95. package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.js +5 -2
  96. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  97. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +19 -16
  98. package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -1
  99. package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +5 -2
  100. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -1
  101. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +50 -47
  102. package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -1
  103. package/dist/node_modules/web3-net/lib/esm/net.js +27 -27
  104. package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
  105. package/dist/node_modules/web3-utils/lib/esm/converters.js +100 -83
  106. package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -1
  107. package/dist/node_modules/web3-utils/lib/esm/formatter.js +123 -104
  108. package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
  109. package/dist/node_modules/web3-validator/lib/esm/utils.js +21 -21
  110. package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -1
  111. package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +10 -10
  112. package/dist/node_modules/web3-validator/lib/esm/validation/numbers.cjs +1 -1
  113. package/dist/node_modules/web3-validator/lib/esm/validation/numbers.js +30 -28
  114. package/dist/orders.server.js +1 -1
  115. package/dist/orders.server.mjs +1 -1
  116. package/dist/organizations.server.js +56 -59
  117. package/dist/organizations.server.mjs +56 -59
  118. package/dist/products.server.js +1 -1
  119. package/dist/products.server.mjs +1 -1
  120. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  121. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +17 -17
  122. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/components/Block/Block.vue.js +5 -5
  124. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +33 -30
  126. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +9 -9
  128. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue.cjs +1 -0
  129. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue.js +1 -0
  130. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -0
  131. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +165 -0
  132. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +22 -19
  134. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +132 -64
  136. package/dist/prometheus-framework/src/components/Feed/Feed.vue2.cjs +1 -0
  137. package/dist/prometheus-framework/src/components/Feed/Feed.vue2.js +1 -0
  138. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +9 -9
  140. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +12 -12
  142. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  143. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +16 -16
  144. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/components/Map/Map.vue.js +14 -13
  146. package/dist/prometheus-framework/src/components/Marquee/Marquee.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/components/Marquee/Marquee.vue.js +8 -8
  148. package/dist/prometheus-framework/src/components/Radio/Radio.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/components/Radio/Radio.vue.js +29 -36
  150. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  152. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  153. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  154. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  156. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +6 -6
  158. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +17 -17
  160. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +6 -6
  162. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  164. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +24 -24
  166. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +24 -24
  168. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +11 -11
  170. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +26 -26
  172. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -14
  174. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +6 -6
  176. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +46 -46
  178. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +13 -13
  180. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +5 -5
  182. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +19 -16
  184. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +3 -3
  186. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  187. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  188. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  189. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  190. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +13 -13
  192. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  196. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +214 -214
  198. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +8 -8
  200. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  201. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +23 -23
  202. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +9 -9
  204. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +3 -3
  206. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +9 -9
  208. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +8 -8
  209. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +167 -202
  211. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +73 -165
  213. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +3 -47
  215. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSorting.vue.cjs +1 -0
  218. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSorting.vue.js +75 -0
  219. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +96 -77
  221. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -0
  222. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +1 -0
  223. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.cjs +1 -0
  224. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.js +27 -0
  225. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonSort.vue.cjs +1 -0
  226. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonSort.vue.js +31 -0
  227. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
  228. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -19
  229. package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/globals/store/globals.js +10 -4
  231. package/dist/prometheus-framework/src/modules/icons/navigation/IconCalendar.vue.cjs +1 -0
  232. package/dist/prometheus-framework/src/modules/icons/navigation/IconCalendar.vue.js +31 -0
  233. package/dist/prometheus-framework/src/modules/icons/navigation/IconFilter.vue.cjs +1 -0
  234. package/dist/prometheus-framework/src/modules/icons/navigation/IconFilter.vue.js +31 -0
  235. package/dist/prometheus-framework/src/modules/icons/navigation/IconSort.vue.cjs +1 -0
  236. package/dist/prometheus-framework/src/modules/icons/navigation/IconSort.vue.js +59 -0
  237. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -0
  238. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +80 -0
  239. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue2.cjs +1 -0
  240. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue2.js +1 -0
  241. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  242. package/dist/prometheus-framework/src/modules/landing/landing.client.js +8 -6
  243. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  244. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +5 -5
  245. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.cjs +1 -1
  246. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.js +1 -1
  247. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.cjs +1 -1
  248. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.js +1 -1
  249. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.cjs +1 -1
  250. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.js +1 -1
  251. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.cjs +1 -1
  252. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.js +30 -30
  253. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  254. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +21 -45
  255. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  256. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  257. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  258. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  259. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
  260. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +36 -36
  261. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +1 -1
  262. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +1 -1
  263. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  264. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +53 -53
  265. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  266. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +33 -33
  267. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  268. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  269. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  270. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +10 -10
  271. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  272. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +5 -5
  273. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +1 -1
  274. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
  275. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  276. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +24 -24
  277. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  278. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +5 -5
  279. package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -0
  280. package/dist/prometheus-framework/src/modules/orders/store/applications.js +37 -0
  281. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  282. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +5 -5
  283. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  284. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +11 -11
  285. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  286. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  287. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  288. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +16 -16
  289. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  290. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +41 -41
  291. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  292. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +11 -11
  293. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  294. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +17 -17
  295. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  296. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +36 -36
  297. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  298. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +8 -8
  299. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  300. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  301. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  302. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +20 -20
  303. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  304. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +12 -12
  305. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  306. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +13 -13
  307. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  308. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +33 -34
  309. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  310. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +16 -16
  311. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  312. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +15 -15
  313. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  314. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +8 -8
  315. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  316. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +8 -8
  317. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  318. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +9 -9
  319. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  320. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
  321. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  322. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +22 -22
  323. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  324. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +6 -6
  325. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  326. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -8
  327. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +14 -14
  328. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  329. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +51 -56
  330. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  331. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +4 -4
  332. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  333. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +32 -32
  334. package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.cjs +1 -1
  335. package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.js +1 -1
  336. package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
  337. package/dist/prometheus-framework/src/modules/products/products.client.js +28 -30
  338. package/dist/prometheus-framework/src/modules/reports/components/pages/BackofficeReports.vue.cjs +1 -1
  339. package/dist/prometheus-framework/src/modules/reports/components/pages/BackofficeReports.vue.js +12 -12
  340. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  341. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +30 -26
  342. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  343. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +35 -35
  344. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  345. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +11 -11
  346. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  347. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +41 -41
  348. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  349. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +13 -13
  350. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.cjs +1 -1
  351. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.js +19 -19
  352. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  353. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +8 -8
  354. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  355. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +14 -11
  356. package/dist/prometheus-framework.cjs.js +1 -1
  357. package/dist/prometheus-framework.es.js +1 -1
  358. package/dist/queryProcessor-BJoJAetd.mjs +162 -0
  359. package/dist/queryProcessor-DWf9tsis.js +161 -0
  360. package/dist/style.css +1 -1
  361. package/dist/wallet.server.js +1 -1
  362. package/dist/wallet.server.mjs +1 -1
  363. package/dist/web-TGdVOTnw.js +1 -0
  364. package/dist/web-_W9a_nWD.mjs +54 -0
  365. package/package.json +1 -1
  366. package/src/components/Address/Address.vue +1 -1
  367. package/src/components/AskToLogin/AskToLogin.vue +1 -1
  368. package/src/components/Block/Block.vue +1 -1
  369. package/src/components/Checkbox/Checkbox.vue +40 -43
  370. package/src/components/Chips/Chips.vue +2 -2
  371. package/src/components/DatePicker/Calendar.vue +29 -31
  372. package/src/components/Dropdown/Dropdown.vue +5 -11
  373. package/src/components/Feed/Feed.vue +98 -15
  374. package/src/components/FieldTags/BlockTags.vue +3 -3
  375. package/src/components/FieldTags/FieldTags.vue +1 -1
  376. package/src/components/FieldTags/vue-tags-input.scss +1 -1
  377. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  378. package/src/components/LocationSelection/LocationSelection.vue +5 -30
  379. package/src/components/Map/LoaderGMaps.js +66 -0
  380. package/src/components/Map/Map.vue +2 -1
  381. package/src/components/Marquee/Marquee.vue +1 -1
  382. package/src/components/Radio/Radio.vue +36 -13
  383. package/src/configurator/components/pages/Styles.vue +1 -1
  384. package/src/modules/auth/components/layouts/Auth.vue +1 -1
  385. package/src/modules/auth/components/pages/EnterCode.vue +4 -4
  386. package/src/modules/auth/components/pages/EnterPassword.vue +2 -2
  387. package/src/modules/auth/components/pages/Invite.vue +2 -2
  388. package/src/modules/auth/components/pages/ResetPassword.vue +3 -3
  389. package/src/modules/auth/components/pages/SignIn.vue +4 -4
  390. package/src/modules/auth/components/pages/SignUp.vue +3 -3
  391. package/src/modules/backoffice/components/admin/Backcalls.vue +1 -1
  392. package/src/modules/backoffice/components/admin/FastOrders.vue +1 -1
  393. package/src/modules/backoffice/components/admin/Pages.vue +1 -1
  394. package/src/modules/backoffice/components/admin/ProductEdit.vue +1 -1
  395. package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
  396. package/src/modules/backoffice/components/admin/Users.vue +1 -1
  397. package/src/modules/backoffice/components/pages/Dashboard.vue +3 -3
  398. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  399. package/src/modules/community/components/layouts/Community.vue +2 -2
  400. package/src/modules/community/components/pages/BlogPost.vue +2 -2
  401. package/src/modules/community/components/pages/CreateBlogPost.vue +4 -4
  402. package/src/modules/community/components/sections/Comments.vue +2 -2
  403. package/src/modules/community/components/sections/Feed.vue +1 -1
  404. package/src/modules/community/components/sections/HotPosts.vue +1 -1
  405. package/src/modules/constructor/components/elements/Image.vue +1 -1
  406. package/src/modules/constructor/components/elements/Video.vue +2 -2
  407. package/src/modules/events/components/blocks/CardEvent.vue +1 -1
  408. package/src/modules/events/components/pages/EditEvent.vue +32 -32
  409. package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
  410. package/src/modules/events/components/pages/Event.vue +3 -3
  411. package/src/modules/events/components/pages/Events.vue +4 -3
  412. package/src/modules/events/components/sections/Feed.vue +3 -3
  413. package/src/modules/events/components/sections/List.vue +2 -2
  414. package/src/modules/files/controllers/files.controller.js +8 -6
  415. package/src/modules/files/middlewares/server/middlewareBusboy.js +79 -14
  416. package/src/modules/files/routes/files.routes.js +11 -9
  417. package/src/modules/gallery/components/sections/BackofficeGallery.vue +158 -355
  418. package/src/modules/gallery/components/sections/GalleryWithCategories.vue +26 -244
  419. package/src/modules/gallery/controllers/gallery.controller.js +57 -38
  420. package/src/modules/gallery/models/photo.model.js +20 -11
  421. package/src/modules/gallery/routes/gallery.routes.js +3 -3
  422. package/src/modules/gallery/store/gallery.js +3 -78
  423. package/src/modules/globals/components/blocks/BlockSearch.vue +1 -1
  424. package/src/modules/globals/components/blocks/BlockSorting.vue +77 -0
  425. package/src/modules/globals/components/blocks/CardHeader.vue +27 -25
  426. package/src/modules/globals/components/elements/ButtonDate.vue +66 -0
  427. package/src/modules/globals/components/elements/ButtonSort.vue +41 -0
  428. package/src/modules/globals/components/layouts/Client.vue +273 -0
  429. package/src/{components/Footer → modules/globals/components/partials}/Footer.vue +1 -1
  430. package/src/{components/Header → modules/globals/components/partials}/Header.vue +98 -84
  431. package/src/modules/globals/controllers/utils/queryProcessor.js +3 -3
  432. package/src/modules/globals/models/common.schema.js +1 -1
  433. package/src/modules/globals/services/globals.store.js +11 -6
  434. package/src/modules/globals/store/globals.js +12 -10
  435. package/src/modules/icons/logos/Logotype.vue +23 -19
  436. package/src/modules/icons/navigation/IconCalendar.vue +18 -0
  437. package/src/modules/icons/navigation/IconFilter.vue +18 -0
  438. package/src/modules/icons/navigation/IconSearch.vue +1 -3
  439. package/src/modules/icons/navigation/IconSort.vue +21 -0
  440. package/src/modules/landing/components/pages/Home.vue +4 -4
  441. package/src/modules/landing/components/sections/FeatureSection.vue +5 -5
  442. package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -2
  443. package/src/modules/landing/components/sections/SectionFeature.vue +2 -2
  444. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
  445. package/src/modules/landing/components/sections/SectionsSection.vue +4 -4
  446. package/src/modules/{orders → landing}/components/sections/SubscribeNewsletter.vue +0 -2
  447. package/src/modules/landing/components/sections/WhatIsWDRSection.vue +6 -6
  448. package/src/modules/landing/landing.client.js +2 -0
  449. package/src/modules/landing/router/landing.js +1 -1
  450. package/src/modules/legal/components/pages/Legal.vue +2 -2
  451. package/src/modules/legal/components/pages/legal/Cookies.vue +1 -1
  452. package/src/modules/legal/components/pages/legal/EULA.vue +1 -1
  453. package/src/modules/legal/components/pages/legal/Privacy.vue +1 -1
  454. package/src/modules/legal/components/pages/legal/Terms.vue +1 -1
  455. package/src/modules/marketplace/components/layouts/Marketplace.vue +37 -49
  456. package/src/modules/marketplace/components/pages/Catalog.vue +43 -131
  457. package/src/modules/marketplace/components/sections/Filters.vue +63 -115
  458. package/src/modules/marketplace/store/marketplace.js +22 -167
  459. package/src/modules/mobile/components/Walkthrough/Walkthrough.vue +1 -1
  460. package/src/modules/orders/components/blocks/CardOrderItem.vue +6 -6
  461. package/src/modules/orders/components/blocks/CardOrderVar1.vue +1 -1
  462. package/src/modules/orders/components/blocks/StatusHistory.vue +1 -1
  463. package/src/modules/orders/components/pages/Order.vue +8 -8
  464. package/src/modules/orders/components/pages/OrderBackoffice.vue +7 -7
  465. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  466. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +3 -3
  467. package/src/modules/orders/components/pages/Orders.vue +3 -5
  468. package/src/modules/orders/components/partials/ShopCart.vue +5 -1
  469. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  470. package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
  471. package/src/modules/orders/store/applications.js +1 -1
  472. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  473. package/src/modules/organizations/components/blocks/Contacts.vue +4 -4
  474. package/src/modules/organizations/components/pages/Department.vue +3 -3
  475. package/src/modules/organizations/components/pages/DepartmentEdit.vue +6 -6
  476. package/src/modules/organizations/components/pages/Members.vue +4 -4
  477. package/src/modules/organizations/components/pages/Organization.vue +3 -3
  478. package/src/modules/organizations/components/pages/OrganizationCreate.vue +2 -2
  479. package/src/modules/organizations/components/pages/OrganizationDetails.vue +1 -1
  480. package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
  481. package/src/modules/organizations/components/pages/OrganizationEdit.vue +9 -9
  482. package/src/modules/organizations/components/pages/OrganizationPeople.vue +1 -1
  483. package/src/modules/organizations/components/pages/Organizations.vue +1 -1
  484. package/src/modules/organizations/components/sections/DetailsTab.vue +4 -4
  485. package/src/modules/organizations/components/sections/Feed.vue +2 -2
  486. package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
  487. package/src/modules/organizations/components/sections/Publics.vue +1 -1
  488. package/src/modules/organizations/controllers/organizations.controller.js +103 -93
  489. package/src/modules/organizations/models/organization.model.js +10 -7
  490. package/src/modules/organizations/store/organizations.js +3 -34
  491. package/src/modules/products/components/blocks/CardPosition.vue +2 -2
  492. package/src/modules/products/components/blocks/LeftoverPositions.vue +2 -2
  493. package/src/modules/products/components/pages/Categories.vue +1 -1
  494. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  495. package/src/modules/products/components/pages/Leftovers.vue +4 -4
  496. package/src/modules/products/components/pages/Product.vue +1 -5
  497. package/src/modules/products/components/pages/ProductEdit.vue +1 -1
  498. package/src/modules/products/components/pages/Products.vue +2 -2
  499. package/src/modules/products/components/sections/EditProductInfo.vue +1 -1
  500. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  501. package/src/modules/products/components/sections/HeroRecommendation.vue +67 -74
  502. package/src/modules/products/components/sections/MenuSection.vue +2 -2
  503. package/src/modules/products/components/sections/PopularProducts.vue +2 -2
  504. package/src/modules/products/components/sections/SectionProduct.vue +3 -3
  505. package/src/modules/products/products.client.js +0 -2
  506. package/src/modules/reports/components/pages/BackofficeReports.vue +4 -4
  507. package/src/modules/spots/components/blocks/CardSpot.vue +9 -1
  508. package/src/modules/spots/components/blocks/SpotMemberModify.vue +2 -2
  509. package/src/modules/spots/components/layouts/Spots.vue +0 -2
  510. package/src/modules/spots/components/pages/Spot.vue +4 -4
  511. package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
  512. package/src/modules/spots/components/sections/PlaceModify.vue +1 -1
  513. package/src/modules/spots/components/sections/Places.vue +1 -1
  514. package/src/modules/users/components/pages/Profile.vue +5 -5
  515. package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
  516. package/src/modules/users/components/pages/ProfileComments.vue +1 -1
  517. package/src/modules/users/components/pages/ProfileEdit.vue +11 -11
  518. package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
  519. package/src/modules/users/components/pages/ProfileLikes.vue +1 -1
  520. package/src/modules/users/components/sections/FeaturedUsers.vue +3 -3
  521. package/src/modules/wallet/views/components/pages/Payments.vue +2 -2
  522. package/src/modules/wallet/views/components/pages/Wallet.vue +3 -3
  523. package/src/styles/base/borders.scss +4 -0
  524. package/src/styles/base/shadow_transitions_hover_refactor.scss +4 -0
  525. package/src/styles/config.scss +15 -9
  526. package/src/styles/layout.scss +37 -8
  527. package/src/styles/typography.scss +24 -24
  528. package/src/modules/products/components/sections/SortProducts.vue +0 -74
  529. /package/src/{components/Navigation → modules/globals/components/partials}/Navigation.vue +0 -0
@@ -1,87 +1,87 @@
1
- import { ref as g, onMounted as V, computed as f, openBlock as d, createElementBlock as m, createElementVNode as e, toDisplayString as a, normalizeClass as v, createTextVNode as A, createCommentVNode as u, createBlock as y, unref as p, Fragment as B, renderList as U, createVNode as q, pushScopeId as H, popScopeId as W } from "vue";
1
+ import { ref as g, onMounted as V, computed as f, 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
2
  import { useRouter as Y, useRoute as L } from "vue-router";
3
3
  import j from "../blocks/CardOrderItem.vue.js";
4
4
  import G from "../../../organizations/components/blocks/CardOrganization.vue.js";
5
5
  import J from "../../../chats/components/pages/ChatPage.vue.js";
6
6
  import K from "../blocks/StatusHistory.vue.js";
7
7
  import { state as Q } from "../../../globals/store/globals.js";
8
- import { actions as X, state as w } from "../../store/orders.js";
8
+ import { actions as X, state as y } from "../../store/orders.js";
9
9
  import { actions as Z } from "../../../products/store/products.js";
10
10
  import { actions as ee } from "../../../organizations/store/organizations.js";
11
11
  import "./Order.vue2.js";
12
12
  import se from "../../../../../../_virtual/_plugin-vue_export-helper.js";
13
- const l = (b) => (H("data-v-150d7ff5"), b = b(), W(), b), te = {
13
+ const n = (h) => (H("data-v-804d49cd"), h = h(), W(), h), te = {
14
14
  key: 0,
15
15
  class: "pd-thin"
16
16
  }, ae = {
17
17
  key: 0,
18
18
  class: "mn-b-thin pos-relative w-100 bg-main radius-big pd-big"
19
- }, re = { class: "mn-b-small" }, ie = /* @__PURE__ */ l(() => /* @__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)), ne = { class: "radius-extra mn-b-medium flex-nowrap flex h-1r pos-relativew-40r" }, le = { class: "pos-absolute pos-t-medium pos-r-medium t-medium p-medium" }, oe = { class: "p-small t-transp" }, de = {
19
+ }, ie = { class: "mn-b-small" }, re = /* @__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
20
  key: 1,
21
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__ */ l(() => /* @__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__ */ l(() => /* @__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__ */ l(() => /* @__PURE__ */ e("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), fe = { class: "w-100 t-right" }, ye = {
22
+ }, ue = { class: "w-100" }, ce = { class: "mn-b-thin bg-light 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" }, he = /* @__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)), be = { 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" }, we = {
23
23
  key: 0,
24
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__ */ l(() => /* @__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__ */ l(() => /* @__PURE__ */ e("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Ne = { class: "w-100 t-right mn-b-small" }, Me = {
25
+ }, ye = { 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
26
  key: 2,
27
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__ */ l(() => /* @__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__ */ l(() => /* @__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__ */ l(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), Ve = { class: "pd-small flex-bottom flex" }, Ae = /* @__PURE__ */ l(() => /* @__PURE__ */ e("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Be = { class: "p-big t-semi" }, Ue = /* @__PURE__ */ l(() => /* @__PURE__ */ e("h3", { class: "mn-b-small" }, "Chat With Us", -1)), qe = {
28
+ }, Se = { class: "bg-light 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
29
  __name: "Order",
30
- setup(b) {
30
+ setup(h) {
31
31
  Y();
32
- const h = L(), s = g(null), k = g(null), i = g(null);
32
+ const b = L(), s = g(null), k = g(null), r = g(null);
33
33
  V(async () => {
34
- var t, n, r;
35
- s.value = await X.read({ _id: h.params.order }), s.value = s.value[0], k.value = await Z.read({
34
+ var t, l, i;
35
+ s.value = await X.read({ _id: b.params.order }), s.value = s.value[0], k.value = await Z.read({
36
36
  organization: (t = s.value) == null ? void 0 : t.owner.target._id
37
- }), i.value = await ee.read({
38
- _id: (n = s.value) == null ? void 0 : n.owner.target._id,
39
- location: (r = Q.position) == null ? void 0 : r.location
37
+ }), r.value = await ee.read({
38
+ _id: (l = s.value) == null ? void 0 : l.owner.target._id,
39
+ location: (i = Q.position) == null ? void 0 : i.location
40
40
  });
41
41
  });
42
42
  let x = f(() => {
43
43
  var t;
44
- return Number((t = s.value) == null ? void 0 : t.positions.reduce((n, r) => n + r.price * r.quantity, 0));
44
+ return Number((t = s.value) == null ? void 0 : t.positions.reduce((l, i) => l + i.price * i.quantity, 0));
45
45
  });
46
46
  f(() => {
47
47
  var t;
48
- return Number((t = s.value) == null ? void 0 : t.positions.reduce((n, r) => n + r.quantity, 0));
48
+ return Number((t = s.value) == null ? void 0 : t.positions.reduce((l, i) => l + i.quantity, 0));
49
49
  });
50
50
  let F = f(() => {
51
51
  var t;
52
- return (t = s.value) == null ? void 0 : t.positions.map(({ _id: n, quantity: r }) => {
53
- const o = k.value.find((c) => c._id === n);
52
+ return (t = s.value) == null ? void 0 : t.positions.map(({ _id: l, quantity: i }) => {
53
+ const o = k.value.find((c) => c._id === l);
54
54
  return {
55
55
  name: o.name,
56
56
  images: o.images,
57
57
  price: o.price,
58
58
  _id: o._id,
59
- quantity: r
59
+ quantity: i
60
60
  };
61
61
  });
62
62
  });
63
- function R(t, n) {
63
+ function R(t, l) {
64
64
  if (!t)
65
65
  return null;
66
- const r = 10 * 60 * 1e3, o = Math.ceil((20 + 3 * t) / 5) * 5 * 60 * 1e3, c = new Date(n).getTime(), _ = new Date(c + r + o);
67
- return console.log(n), console.log(_), _;
66
+ const i = 10 * 60 * 1e3, o = Math.ceil((20 + 3 * t) / 5) * 5 * 60 * 1e3, c = new Date(l).getTime(), _ = new Date(c + i + o);
67
+ return console.log(l), console.log(_), _;
68
68
  }
69
- return (t, n) => {
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, [
69
+ return (t, l) => {
70
+ var i, o, c, _, O, D, I, C, N, M, S, T, $, z, P;
71
+ return s.value && r.value ? (d(), m("div", te, [
72
72
  s.value ? (d(), m("div", ae, [
73
- e("h2", re, "Order is " + a(s.value.status), 1),
74
- ie,
75
- e("div", ne, [
73
+ e("h2", ie, "Order is " + a(s.value.status), 1),
74
+ re,
75
+ e("div", le, [
76
76
  e("div", {
77
77
  class: v([
78
- "bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",
78
+ "bg-light br-anim br-glow radius-extra mn-r-thin h-100 w-20",
79
79
  { "br-anim br-glow br-glow-anim": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 }
80
80
  ])
81
81
  }, null, 2),
82
82
  e("div", {
83
83
  class: v([
84
- "bg-grey br-anim br-glow radius-extra mn-r-thin h-100 w-20",
84
+ "bg-light br-anim br-glow radius-extra mn-r-thin h-100 w-20",
85
85
  { "br-anim br-glow br-glow-anim": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
86
86
  { "t-transp": ["created", "confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
87
87
  { blink: s.value.status === "created" }
@@ -92,12 +92,12 @@ const l = (b) => (H("data-v-150d7ff5"), b = b(), W(), b), te = {
92
92
  { "br-anim br-glow br-glow-anim": ["confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
93
93
  { "t-transp": ["confirmed", "packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
94
94
  { blink: s.value.status === "confirmed" },
95
- "bg-grey radius-extra mn-r-thin h-100 w-40"
95
+ "bg-light radius-extra mn-r-thin h-100 w-40"
96
96
  ])
97
97
  }, null, 2),
98
98
  e("div", {
99
99
  class: v([
100
- "bg-grey radius-extra mn-r-thin h-100 w-40",
100
+ "bg-light radius-extra mn-r-thin h-100 w-40",
101
101
  { "br-anim br-glow br-glow-anim": ["packing", "in delivery", "delivered"].indexOf(s.value.status) === 0 },
102
102
  { "t-transp": ["packing", "in delivery", "delivered"].indexOf(s.value.status) === -1 },
103
103
  { blink: s.value.status === "packing" }
@@ -105,44 +105,44 @@ const l = (b) => (H("data-v-150d7ff5"), b = b(), W(), b), te = {
105
105
  }, null, 2),
106
106
  e("div", {
107
107
  class: v([
108
- "bg-grey radius-extra h-100 w-20",
108
+ "bg-light radius-extra h-100 w-20",
109
109
  { "br-anim br-glow br-glow-anim": ["in delivery", "delivered"].indexOf(s.value.status) === 0 },
110
110
  { "t-transp": ["in delivery", "delivered"].indexOf(s.value.status) === -1 },
111
111
  { blink: s.value.status === "in delivery" }
112
112
  ])
113
113
  }, null, 2)
114
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", le, [
115
+ e("p", null, "Estimated Arrival " + a(t.formatDate(R((i = r.value[0]) == null ? void 0 : i.distance, s.value.createdAt))), 1),
116
+ e("h3", null, a((o = r.value[0]) != null && o.distance ? Math.ceil((10 + 3 * ((c = r.value[0]) == null ? void 0 : c.distance)) / 5) * 5 + "-" + Math.ceil((20 + 3 * ((_ = r.value[0]) == null ? void 0 : _.distance)) / 5) * 5 + " MIN" : "Unavailable"), 1),
117
+ e("p", ne, [
118
118
  A(" Order No: "),
119
119
  e("span", oe, "#" + a(s.value._id), 1)
120
120
  ])
121
121
  ])) : u("", !0),
122
122
  s.value ? (d(), m("div", de, [
123
123
  e("div", ue, [
124
- i.value[0] ? (d(), y(G, {
124
+ r.value[0] ? (d(), w(G, {
125
125
  key: 0,
126
- organization: i.value[0],
126
+ organization: r.value[0],
127
127
  showRating: !0,
128
128
  showFollowers: !1,
129
129
  showProducts: !1,
130
- class: "bg-grey mn-b-thin w-100 o-hidden radius-big pd-small"
130
+ class: "bg-light mn-b-thin w-100 o-hidden radius-big pd-small"
131
131
  }, null, 8, ["organization"])) : u("", !0),
132
132
  e("div", ce, [
133
133
  e("div", me, [
134
134
  e("div", pe, [
135
135
  _e,
136
136
  e("span", ve, a(s.value.status), 1),
137
- be
137
+ he
138
138
  ])
139
139
  ]),
140
- e("div", he, [
140
+ e("div", be, [
141
141
  ge,
142
142
  e("p", fe, a((O = s.value.user) == null ? void 0 : O.number), 1)
143
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),
144
+ (D = s.value.user) != null && D.messenger.type ? (d(), m("div", we, [
145
+ e("p", ye, a((I = s.value.user) == null ? void 0 : I.messenger.type), 1),
146
146
  e("p", ke, a((C = s.value.user) == null ? void 0 : C.messenger.value), 1)
147
147
  ])) : u("", !0),
148
148
  e("div", xe, [
@@ -154,18 +154,18 @@ const l = (b) => (H("data-v-150d7ff5"), b = b(), W(), b), te = {
154
154
  e("p", Ne, a((M = s.value.delivery) == null ? void 0 : M.type), 1)
155
155
  ])
156
156
  ]),
157
- w.current.status_history ? (d(), y(K, {
157
+ y.current.status_history ? (d(), w(K, {
158
158
  key: 1,
159
- statusHistory: w.current.status_history,
160
- statusCurrent: w.current.status,
161
- edit: p(h).name === "Order Edit"
159
+ statusHistory: y.current.status_history,
160
+ statusCurrent: y.current.status,
161
+ edit: p(b).name === "Order Edit"
162
162
  }, null, 8, ["statusHistory", "statusCurrent", "edit"])) : u("", !0),
163
163
  t.payment && t.payment.Status === "CONFIRMED" ? (d(), m("span", Me, "Paid")) : u("", !0)
164
164
  ]),
165
165
  e("div", Se, [
166
166
  Te,
167
167
  e("ul", $e, [
168
- (d(!0), m(B, null, U(p(F), (E, He) => (d(), y(j, {
168
+ (d(!0), m(B, null, U(p(F), (E, He) => (d(), w(j, {
169
169
  key: E._id,
170
170
  editable: !1,
171
171
  product: E
@@ -178,17 +178,17 @@ const l = (b) => (H("data-v-150d7ff5"), b = b(), W(), b), te = {
178
178
  ]),
179
179
  e("div", Fe, [
180
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)
181
+ e("p", null, a(t.returnCurrency()) + " " + a(Math.trunc(100 + 20 * ((S = r.value[0]) == null ? void 0 : S.distance) - 7, 5 * (((T = r.value[0]) == null ? void 0 : T.distance) / 10))), 1)
182
182
  ]),
183
183
  e("div", Ve, [
184
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)
185
+ e("p", Be, a(t.returnCurrency()) + " " + a(Math.trunc(100 + 20 * (($ = r.value[0]) == null ? void 0 : $.distance) - 7, 5 * (((z = r.value[0]) == null ? void 0 : z.distance) / 10)) + p(x)), 1)
186
186
  ])
187
187
  ]),
188
188
  Ue,
189
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,
190
+ username: p(b).name === "Order Status" ? ((P = s.value.user) == null ? void 0 : P.name) || "User" : "Weeder Support",
191
+ chatID: p(b).params.order,
192
192
  class: "radius-semi bg-white o-hidden"
193
193
  }, null, 8, ["username", "chatID"])
194
194
  ])
@@ -196,7 +196,7 @@ const l = (b) => (H("data-v-150d7ff5"), b = b(), W(), b), te = {
196
196
  ])) : u("", !0);
197
197
  };
198
198
  }
199
- }, ts = /* @__PURE__ */ se(qe, [["__scopeId", "data-v-150d7ff5"]]);
199
+ }, ts = /* @__PURE__ */ se(qe, [["__scopeId", "data-v-804d49cd"]]);
200
200
  export {
201
201
  ts as default
202
202
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router"),O=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");require("../../../../components/Tab/Tab.vue.cjs");const P=require("../../../../components/Popup/Popup.vue2.cjs"),I=require("../../../icons/entities/IconTime.vue.cjs"),B=require("../blocks/CardOrderItem.vue.cjs"),z=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),M=require("../../../chats/components/pages/ChatPage.vue.cjs"),F=require("../blocks/StatusHistory.vue.cjs"),L=require("../../../globals/store/globals.cjs"),d=require("../../store/orders.cjs"),R=require("../../../products/store/products.cjs"),T=require("../../../organizations/store/organizations.cjs");require("./OrderBackoffice.vue2.cjs");const A=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),r=b=>(e.pushScopeId("data-v-ec5fc79c"),b=b(),e.popScopeId(),b),H={key:0,class:"pd-thin"},U={key:0,class:"mn-b-thin pos-relative w-100 bg-main radius-big pd-medium"},W={class:"mn-b-small flex-nowrap flex"},j={class:"t-medium p-medium"},G={class:"p-small t-transp"},J={class:"flex-nowrap flex gap-thin pos-relative"},K={class:"bg-grey mn-b-thin pd-thin radius-extra flex-nowrap flex"},Q={class:"w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20"},X={class:"t-medium mn-r-auto"},Y=r(()=>e.createElementVNode("span",{class:"p-small t-transp"},"Estimated Arrival",-1)),Z=r(()=>e.createElementVNode("br",null,null,-1)),$=r(()=>e.createElementVNode("p",{class:"t-medium p-medium mn-b-thin"}," Positions ",-1)),ee={class:"bg-grey pd-small radius-small flex gap-thin flex-column mn-b-semi"},te={key:1,class:"gap-thin cols-2"},se={class:"w-100"},ae={class:"mn-b-thin bg-grey w-100 o-hidden radius-medium"},re={class:"pd-small flex-nowrap flex"},le={class:"mn-r-auto"},ne=r(()=>e.createElementVNode("span",{class:"d-block t-medium p-medium"},"Order is",-1)),oe=r(()=>e.createElementVNode("span",{class:"t-lh-075 h2 d-block mn-b-small"},"created",-1)),ie={class:"pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max"},ce={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},de=r(()=>e.createElementVNode("p",{class:"w-100 t-medium p-medium"}," Phone ",-1)),ue={class:"w-100 t-right"},me={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},pe=r(()=>e.createElementVNode("p",{class:"t-medium p-medium"}," Address ",-1)),_e={class:"w-100 t-right"},he={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},be=r(()=>e.createElementVNode("p",{class:"mn-b-small t-medium p-medium"}," Delivery ",-1)),ve={class:"w-100 t-right mn-b-small"},ge={key:2,class:"t-transp"},fe={class:"bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100"},Ne=r(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Order Summary",-1)),Ve={class:"flex gap-thin flex-column mn-b-semi"},ye={class:"mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100"},Ee={class:"pd-small br-solid br-b br-black-transp-10 flex"},ke=r(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total",-1)),we={class:"pd-small br-solid br-b br-black-transp-10 flex"},Se=r(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"Delivery",-1)),xe={class:"pd-small flex-bottom flex"},Ce=r(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total to pay",-1)),Be={class:"p-big t-semi"},De=r(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Chat With Us",-1)),qe={__name:"OrderBackoffice",setup(b){C.useRouter();const _=C.useRoute(),s=e.ref(null),v=e.ref(null),n=e.ref(null),o=["created","confirmed","packing","in delivery","delivered"],V=["Created","Confirmed","Packing","In Delivery","Delivered"],g=t=>o.slice(t).includes(s.value.status),f=e.ref(!1),y=e.ref(null),N=e.ref([]);function D(t){f.value=!0,typeof t=="number"&&(y.value=t)}function E(){f.value=!1,y.value=null}e.onMounted(async()=>{var a,l;s.value=await d.actions.read({_id:_.params.order}),s.value=s.value[0],v.value=await R.actions.read({organization:s.value.owner.target._id,limit:1e3}),console.log(v.value);const t=v.value.reduce((u,m)=>(u[m._id]=m,u),{});console.log(t),N.value=s.value.positions.map(({_id:u,quantity:m})=>{const p=t[u];return{name:p.name,images:p.images,price:p.price,_id:p._id,quantity:m}}),n.value=await T.actions.read({_id:(a=s.value)==null?void 0:a.owner.target._id,location:(l=L.state.position)==null?void 0:l.location})});let k=e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,l)=>a+l.price*l.quantity,0))});e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,l)=>a+l.quantity,0))});function h(t){const a=o.indexOf(t);return a!==-1&&a+1<o.length?o[a+1]:null}function w(t){const a=o.indexOf(t);return t?V[a]:""}async function q(){const t=h(d.state.current.status);t?(d.state.current.status=t,await d.actions.update(d.state.current)):console.error("Next status is void. Must handle somehow."),E()}return(t,a)=>{var l,u,m,p,S,x;return s.value&&n.value?(e.openBlock(),e.createElementBlock("div",H,[s.value?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",W,[e.createElementVNode("p",j,[e.createTextVNode(" Order No: "),e.createElementVNode("span",G,"#"+e.toDisplayString(s.value._id),1)])]),e.createElementVNode("div",J,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(i,c)=>e.createElementVNode("div",{key:c,class:"w-20"},[e.createElementVNode("div",{class:e.normalizeClass(["bg-grey br-anim br-glow radius-extra h-1r w-100",{"br-glow-anim":g(c)},{"t-transp":!g(c)},{blink:s.value.status===o[c]&&h(s.value.status)}])},null,2),e.createElementVNode("div",{class:e.normalizeClass([{"t-transp":!g(c)},"mn-t-thin p-small t-medium uppercase"])},e.toDisplayString(V[c]),3)])),64))])])):e.createCommentVNode("",!0),e.createElementVNode("div",K,[e.createElementVNode("div",Q,[e.createVNode(I.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",X,[Y,Z,e.createTextVNode(e.toDisplayString(t.formatDate(s.value.deadline)),1)])]),h(s.value.status)&&e.unref(_).name==="Order Edit"?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:D,class:"mn-l-auto bg-black t-white button"}," Mark as "+e.toDisplayString(w(h(s.value.status))),1)):e.createCommentVNode("",!0)]),e.createVNode(P.default,{title:"Change status",onClosePopup:E,isPopupOpen:f.value,class:"bg-white w-min-30r w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.default),{modelValue:s.value.deadline,"onUpdate:modelValue":a[0]||(a[0]=i=>s.value.deadline=i),"hide-navigation":["calendar"],flow:["time"],class:"z-index-3 bg-grey radius-small pd-small mn-b-thin mn-b-semi"},null,8,["modelValue"]),$,e.createElementVNode("ul",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("button",{onClick:q,class:"w-100 bg-black-small t-white button"},e.toDisplayString("Confirm Changing to "+w(h(s.value.status))),1)]),_:1},8,["isPopupOpen"]),s.value?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",se,[n.value[0]?(e.openBlock(),e.createBlock(z.default,{key:0,organization:n.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",ae,[e.createElementVNode("div",re,[e.createElementVNode("div",le,[ne,oe,e.createElementVNode("p",ie,e.toDisplayString(t.formatDate(s.value.createdAt)),1)])]),e.createElementVNode("div",ce,[de,e.createElementVNode("p",ue,e.toDisplayString(((l=s.value.customer.target)==null?void 0:l.number)||"Not specified"),1)]),e.createElementVNode("div",me,[pe,e.createElementVNode("p",_e,e.toDisplayString(s.value.delivery.address?s.value.delivery.address.slice(0,64):"Not specified"),1)]),e.createElementVNode("div",he,[be,e.createElementVNode("p",ve,e.toDisplayString(s.value.delivery.type?s.value.delivery.type:"Not specified"),1)])]),d.state.current.status_history?(e.openBlock(),e.createBlock(F.default,{key:1,statuses:o,statusHistory:d.state.current.status_history,statusCurrent:d.state.current.status,edit:e.unref(_).name==="Order Edit"},null,8,["statusHistory","statusCurrent","edit"])):e.createCommentVNode("",!0),t.payment&&t.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",ge,"Paid")):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[Ne,e.createElementVNode("ul",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("div",ye,[e.createElementVNode("div",Ee,[ke,e.createElementVNode("p",null,e.toDisplayString(e.unref(k))+" "+e.toDisplayString(t.returnCurrency()),1)]),e.createElementVNode("div",we,[Se,e.createElementVNode("p",null,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((u=n.value[0])==null?void 0:u.distance)-7,5*(((m=n.value[0])==null?void 0:m.distance)/10))),1)]),e.createElementVNode("div",xe,[Ce,e.createElementVNode("p",Be,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((p=n.value[0])==null?void 0:p.distance)-7,5*(((S=n.value[0])==null?void 0:S.distance)/10))+e.unref(k)),1)])]),De,e.createVNode(M.default,{username:e.unref(_).name==="Order Status"?((x=s.value.user)==null?void 0:x.name)||"User":"Weeder Support",chatID:e.unref(_).params.order,class:"radius-semi bg-white o-hidden"},null,8,["username","chatID"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oe=A.default(qe,[["__scopeId","data-v-ec5fc79c"]]);exports.default=Oe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router"),O=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");require("../../../../components/Tab/Tab.vue.cjs");const P=require("../../../../components/Popup/Popup.vue2.cjs"),I=require("../../../icons/entities/IconTime.vue.cjs"),B=require("../blocks/CardOrderItem.vue.cjs"),z=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),M=require("../../../chats/components/pages/ChatPage.vue.cjs"),F=require("../blocks/StatusHistory.vue.cjs"),L=require("../../../globals/store/globals.cjs"),d=require("../../store/orders.cjs"),R=require("../../../products/store/products.cjs"),T=require("../../../organizations/store/organizations.cjs");require("./OrderBackoffice.vue2.cjs");const A=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=b=>(e.pushScopeId("data-v-75357432"),b=b(),e.popScopeId(),b),H={key:0,class:"pd-thin"},U={key:0,class:"mn-b-thin pos-relative w-100 bg-main radius-big pd-medium"},W={class:"mn-b-small flex-nowrap flex"},j={class:"t-medium p-medium"},G={class:"p-small t-transp"},J={class:"flex-nowrap flex gap-thin pos-relative"},K={class:"bg-light mn-b-thin pd-thin radius-extra flex-nowrap flex"},Q={class:"w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20"},X={class:"t-medium mn-r-auto"},Y=l(()=>e.createElementVNode("span",{class:"p-small t-transp"},"Estimated Arrival",-1)),Z=l(()=>e.createElementVNode("br",null,null,-1)),$=l(()=>e.createElementVNode("p",{class:"t-medium p-medium mn-b-thin"}," Positions ",-1)),ee={class:"bg-light pd-small radius-small flex gap-thin flex-column mn-b-semi"},te={key:1,class:"gap-thin cols-2"},se={class:"w-100"},ae={class:"mn-b-thin bg-light w-100 o-hidden radius-medium"},le={class:"pd-small flex-nowrap flex"},re={class:"mn-r-auto"},ne=l(()=>e.createElementVNode("span",{class:"d-block t-medium p-medium"},"Order is",-1)),oe=l(()=>e.createElementVNode("span",{class:"t-lh-075 h2 d-block mn-b-small"},"created",-1)),ie={class:"pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max"},ce={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},de=l(()=>e.createElementVNode("p",{class:"w-100 t-medium p-medium"}," Phone ",-1)),ue={class:"w-100 t-right"},me={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},pe=l(()=>e.createElementVNode("p",{class:"t-medium p-medium"}," Address ",-1)),he={class:"w-100 t-right"},_e={class:"pd-small cols-2 br-t br-black-transp-10 br-solid"},be=l(()=>e.createElementVNode("p",{class:"mn-b-small t-medium p-medium"}," Delivery ",-1)),ve={class:"w-100 t-right mn-b-small"},ge={key:2,class:"t-transp"},fe={class:"bg-light radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100"},Ne=l(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Order Summary",-1)),Ve={class:"flex gap-thin flex-column mn-b-semi"},Ee={class:"mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100"},ke={class:"pd-small br-solid br-b br-black-transp-10 flex"},ye=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total",-1)),we={class:"pd-small br-solid br-b br-black-transp-10 flex"},Se=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"Delivery",-1)),xe={class:"pd-small flex-bottom flex"},Ce=l(()=>e.createElementVNode("p",{class:"mn-r-auto t-transp"},"In total to pay",-1)),Be={class:"p-big t-semi"},De=l(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Chat With Us",-1)),qe={__name:"OrderBackoffice",setup(b){C.useRouter();const h=C.useRoute(),s=e.ref(null),v=e.ref(null),n=e.ref(null),o=["created","confirmed","packing","in delivery","delivered"],V=["Created","Confirmed","Packing","In Delivery","Delivered"],g=t=>o.slice(t).includes(s.value.status),f=e.ref(!1),E=e.ref(null),N=e.ref([]);function D(t){f.value=!0,typeof t=="number"&&(E.value=t)}function k(){f.value=!1,E.value=null}e.onMounted(async()=>{var a,r;s.value=await d.actions.read({_id:h.params.order}),s.value=s.value[0],v.value=await R.actions.read({organization:s.value.owner.target._id,limit:1e3}),console.log(v.value);const t=v.value.reduce((u,m)=>(u[m._id]=m,u),{});console.log(t),N.value=s.value.positions.map(({_id:u,quantity:m})=>{const p=t[u];return{name:p.name,images:p.images,price:p.price,_id:p._id,quantity:m}}),n.value=await T.actions.read({_id:(a=s.value)==null?void 0:a.owner.target._id,location:(r=L.state.position)==null?void 0:r.location})});let y=e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,r)=>a+r.price*r.quantity,0))});e.computed(()=>{var t;return Number((t=s.value)==null?void 0:t.positions.reduce((a,r)=>a+r.quantity,0))});function _(t){const a=o.indexOf(t);return a!==-1&&a+1<o.length?o[a+1]:null}function w(t){const a=o.indexOf(t);return t?V[a]:""}async function q(){const t=_(d.state.current.status);t?(d.state.current.status=t,await d.actions.update(d.state.current)):console.error("Next status is void. Must handle somehow."),k()}return(t,a)=>{var r,u,m,p,S,x;return s.value&&n.value?(e.openBlock(),e.createElementBlock("div",H,[s.value?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",W,[e.createElementVNode("p",j,[e.createTextVNode(" Order No: "),e.createElementVNode("span",G,"#"+e.toDisplayString(s.value._id),1)])]),e.createElementVNode("div",J,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(i,c)=>e.createElementVNode("div",{key:c,class:"w-20"},[e.createElementVNode("div",{class:e.normalizeClass(["bg-light br-anim br-glow radius-extra h-1r w-100",{"br-glow-anim":g(c)},{"t-transp":!g(c)},{blink:s.value.status===o[c]&&_(s.value.status)}])},null,2),e.createElementVNode("div",{class:e.normalizeClass([{"t-transp":!g(c)},"mn-t-thin p-small t-medium uppercase"])},e.toDisplayString(V[c]),3)])),64))])])):e.createCommentVNode("",!0),e.createElementVNode("div",K,[e.createElementVNode("div",Q,[e.createVNode(I.default,{class:"i-semi t-transp",fill:"rgb(var(--black)"}),e.createElementVNode("p",X,[Y,Z,e.createTextVNode(e.toDisplayString(t.formatDate(s.value.deadline)),1)])]),_(s.value.status)&&e.unref(h).name==="Order Edit"?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:D,class:"mn-l-auto bg-black t-white button"}," Mark as "+e.toDisplayString(w(_(s.value.status))),1)):e.createCommentVNode("",!0)]),e.createVNode(P.default,{title:"Change status",onClosePopup:k,isPopupOpen:f.value,class:"bg-white w-min-30r w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.default),{modelValue:s.value.deadline,"onUpdate:modelValue":a[0]||(a[0]=i=>s.value.deadline=i),"hide-navigation":["calendar"],flow:["time"],class:"z-index-3 bg-light radius-small pd-small mn-b-thin mn-b-semi"},null,8,["modelValue"]),$,e.createElementVNode("ul",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("button",{onClick:q,class:"w-100 bg-black-small t-white button"},e.toDisplayString("Confirm Changing to "+w(_(s.value.status))),1)]),_:1},8,["isPopupOpen"]),s.value?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",se,[n.value[0]?(e.openBlock(),e.createBlock(z.default,{key:0,organization:n.value[0],showRating:!0,showFollowers:!1,showProducts:!1,class:"bg-light mn-b-thin w-100 o-hidden radius-big pd-small"},null,8,["organization"])):e.createCommentVNode("",!0),e.createElementVNode("div",ae,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[ne,oe,e.createElementVNode("p",ie,e.toDisplayString(t.formatDate(s.value.createdAt)),1)])]),e.createElementVNode("div",ce,[de,e.createElementVNode("p",ue,e.toDisplayString(((r=s.value.customer.target)==null?void 0:r.number)||"Not specified"),1)]),e.createElementVNode("div",me,[pe,e.createElementVNode("p",he,e.toDisplayString(s.value.delivery.address?s.value.delivery.address.slice(0,64):"Not specified"),1)]),e.createElementVNode("div",_e,[be,e.createElementVNode("p",ve,e.toDisplayString(s.value.delivery.type?s.value.delivery.type:"Not specified"),1)])]),d.state.current.status_history?(e.openBlock(),e.createBlock(F.default,{key:1,statuses:o,statusHistory:d.state.current.status_history,statusCurrent:d.state.current.status,edit:e.unref(h).name==="Order Edit"},null,8,["statusHistory","statusCurrent","edit"])):e.createCommentVNode("",!0),t.payment&&t.payment.Status==="CONFIRMED"?(e.openBlock(),e.createElementBlock("span",ge,"Paid")):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[Ne,e.createElementVNode("ul",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createBlock(B.default,{key:i._id,editable:!1,product:i},null,8,["product"]))),128))]),e.createElementVNode("div",Ee,[e.createElementVNode("div",ke,[ye,e.createElementVNode("p",null,e.toDisplayString(e.unref(y))+" "+e.toDisplayString(t.returnCurrency()),1)]),e.createElementVNode("div",we,[Se,e.createElementVNode("p",null,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((u=n.value[0])==null?void 0:u.distance)-7,5*(((m=n.value[0])==null?void 0:m.distance)/10))),1)]),e.createElementVNode("div",xe,[Ce,e.createElementVNode("p",Be,e.toDisplayString(t.returnCurrency())+" "+e.toDisplayString(Math.trunc(100+20*((p=n.value[0])==null?void 0:p.distance)-7,5*(((S=n.value[0])==null?void 0:S.distance)/10))+e.unref(y)),1)])]),De,e.createVNode(M.default,{username:e.unref(h).name==="Order Status"?((x=s.value.user)==null?void 0:x.name)||"User":"Weeder Support",chatID:e.unref(h).params.order,class:"radius-semi bg-white o-hidden"},null,8,["username","chatID"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oe=A.default(qe,[["__scopeId","data-v-75357432"]]);exports.default=Oe;
@@ -1,4 +1,4 @@
1
- import { ref as f, onMounted as W, computed as R, openBlock as i, createElementBlock as m, createElementVNode as t, createTextVNode as F, toDisplayString as l, Fragment as I, renderList as D, normalizeClass as L, createCommentVNode as b, createVNode as x, unref as v, withCtx as j, createBlock as C, pushScopeId as G, popScopeId as J } from "vue";
1
+ import { ref as f, onMounted as W, computed as R, openBlock as n, createElementBlock as m, createElementVNode as t, createTextVNode as F, toDisplayString as l, Fragment as I, renderList as D, normalizeClass as L, createCommentVNode as b, createVNode as x, unref as v, withCtx as j, createBlock as C, pushScopeId as G, popScopeId as J } from "vue";
2
2
  import { useRouter as K, useRoute as Q } from "vue-router";
3
3
  import X from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
4
4
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
@@ -12,26 +12,26 @@ import et from "../blocks/StatusHistory.vue.js";
12
12
  import { state as at } from "../../../globals/store/globals.js";
13
13
  import { actions as U, state as g } from "../../store/orders.js";
14
14
  import { actions as lt } from "../../../products/store/products.js";
15
- import { actions as rt } from "../../../organizations/store/organizations.js";
15
+ import { actions as it } from "../../../organizations/store/organizations.js";
16
16
  import "./OrderBackoffice.vue2.js";
17
- import it from "../../../../../../_virtual/_plugin-vue_export-helper.js";
18
- const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
17
+ import nt from "../../../../../../_virtual/_plugin-vue_export-helper.js";
18
+ const i = (k) => (G("data-v-75357432"), k = k(), J(), k), ot = {
19
19
  key: 0,
20
20
  class: "pd-thin"
21
- }, ot = {
21
+ }, rt = {
22
22
  key: 0,
23
23
  class: "mn-b-thin pos-relative w-100 bg-main radius-big pd-medium"
24
- }, dt = { class: "mn-b-small flex-nowrap flex" }, ut = { class: "t-medium p-medium" }, ct = { class: "p-small t-transp" }, mt = { class: "flex-nowrap flex gap-thin pos-relative" }, pt = { class: "bg-grey mn-b-thin pd-thin radius-extra flex-nowrap flex" }, _t = { class: "w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20" }, ht = { class: "t-medium mn-r-auto" }, bt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("span", { class: "p-small t-transp" }, "Estimated Arrival", -1)), vt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("br", null, null, -1)), ft = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium mn-b-thin" }, " Positions ", -1)), gt = { class: "bg-grey pd-small radius-small flex gap-thin flex-column mn-b-semi" }, wt = {
24
+ }, dt = { class: "mn-b-small flex-nowrap flex" }, ut = { class: "t-medium p-medium" }, ct = { class: "p-small t-transp" }, mt = { class: "flex-nowrap flex gap-thin pos-relative" }, pt = { class: "bg-light mn-b-thin pd-thin radius-extra flex-nowrap flex" }, _t = { class: "w-max flex-v-center gap-thin flex-nowrap flex pd-thin radius-small bg-white-transp-20" }, ht = { class: "t-medium mn-r-auto" }, bt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "p-small t-transp" }, "Estimated Arrival", -1)), vt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("br", null, null, -1)), ft = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium mn-b-thin" }, " Positions ", -1)), gt = { class: "bg-light pd-small radius-small flex gap-thin flex-column mn-b-semi" }, wt = {
25
25
  key: 1,
26
26
  class: "gap-thin cols-2"
27
- }, yt = { class: "w-100" }, kt = { class: "mn-b-thin bg-grey w-100 o-hidden radius-medium" }, xt = { class: "pd-small flex-nowrap flex" }, Ct = { class: "mn-r-auto" }, Ot = /* @__PURE__ */ r(() => /* @__PURE__ */ t("span", { class: "d-block t-medium p-medium" }, "Order is", -1)), St = /* @__PURE__ */ r(() => /* @__PURE__ */ t("span", { class: "t-lh-075 h2 d-block mn-b-small" }, "created", -1)), Nt = { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" }, Pt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, It = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), Dt = { class: "w-100 t-right" }, Mt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, $t = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium" }, " Address ", -1)), zt = { class: "w-100 t-right" }, Et = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Vt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Bt = { class: "w-100 t-right mn-b-small" }, At = {
27
+ }, yt = { class: "w-100" }, kt = { class: "mn-b-thin bg-light w-100 o-hidden radius-medium" }, xt = { class: "pd-small flex-nowrap flex" }, Ct = { class: "mn-r-auto" }, Ot = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "d-block t-medium p-medium" }, "Order is", -1)), St = /* @__PURE__ */ i(() => /* @__PURE__ */ t("span", { class: "t-lh-075 h2 d-block mn-b-small" }, "created", -1)), Nt = { class: "pd-t-nano pd-b-nano pd-r-thin pd-l-thin radius-extra bg-black t-white w-max" }, Pt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, It = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "w-100 t-medium p-medium" }, " Phone ", -1)), Dt = { class: "w-100 t-right" }, Mt = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, $t = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "t-medium p-medium" }, " Address ", -1)), zt = { class: "w-100 t-right" }, Et = { class: "pd-small cols-2 br-t br-black-transp-10 br-solid" }, Vt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-b-small t-medium p-medium" }, " Delivery ", -1)), Bt = { class: "w-100 t-right mn-b-small" }, At = {
28
28
  key: 2,
29
29
  class: "t-transp"
30
- }, Rt = { class: "bg-grey radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100" }, Ft = /* @__PURE__ */ r(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Order Summary", -1)), Lt = { class: "flex gap-thin flex-column mn-b-semi" }, Tt = { class: "mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100" }, Ut = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, qt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total", -1)), Ht = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Wt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), jt = { class: "pd-small flex-bottom flex" }, Gt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Jt = { class: "p-big t-semi" }, Kt = /* @__PURE__ */ r(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Chat With Us", -1)), Qt = {
30
+ }, Rt = { class: "bg-light radius-big pd-medium mn-r-bold pd-r-big br-right-dark w-100" }, Ft = /* @__PURE__ */ i(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Order Summary", -1)), Lt = { class: "flex gap-thin flex-column mn-b-semi" }, Tt = { class: "mn-b-medium radius-small br-solid br-1px br-black-transp-10 w-100" }, Ut = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, qt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total", -1)), Ht = { class: "pd-small br-solid br-b br-black-transp-10 flex" }, Wt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "Delivery", -1)), jt = { class: "pd-small flex-bottom flex" }, Gt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("p", { class: "mn-r-auto t-transp" }, "In total to pay", -1)), Jt = { class: "p-big t-semi" }, Kt = /* @__PURE__ */ i(() => /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Chat With Us", -1)), Qt = {
31
31
  __name: "OrderBackoffice",
32
32
  setup(k) {
33
33
  K();
34
- const w = Q(), e = f(null), O = f(null), o = f(null), d = ["created", "confirmed", "packing", "in delivery", "delivered"], M = ["Created", "Confirmed", "Packing", "In Delivery", "Delivered"], S = (s) => d.slice(s).includes(e.value.status), N = f(!1), $ = f(null), P = f([]);
34
+ const w = Q(), e = f(null), O = f(null), r = f(null), d = ["created", "confirmed", "packing", "in delivery", "delivered"], M = ["Created", "Confirmed", "Packing", "In Delivery", "Delivered"], S = (s) => d.slice(s).includes(e.value.status), N = f(!1), $ = f(null), P = f([]);
35
35
  function q(s) {
36
36
  N.value = !0, typeof s == "number" && ($.value = s);
37
37
  }
@@ -39,7 +39,7 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
39
39
  N.value = !1, $.value = null;
40
40
  }
41
41
  W(async () => {
42
- var a, n;
42
+ var a, o;
43
43
  e.value = await U.read({ _id: w.params.order }), e.value = e.value[0], O.value = await lt.read({
44
44
  organization: e.value.owner.target._id,
45
45
  limit: 1e3
@@ -54,18 +54,18 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
54
54
  _id: h._id,
55
55
  quantity: _
56
56
  };
57
- }), o.value = await rt.read({
57
+ }), r.value = await it.read({
58
58
  _id: (a = e.value) == null ? void 0 : a.owner.target._id,
59
- location: (n = at.position) == null ? void 0 : n.location
59
+ location: (o = at.position) == null ? void 0 : o.location
60
60
  });
61
61
  });
62
62
  let E = R(() => {
63
63
  var s;
64
- return Number((s = e.value) == null ? void 0 : s.positions.reduce((a, n) => a + n.price * n.quantity, 0));
64
+ return Number((s = e.value) == null ? void 0 : s.positions.reduce((a, o) => a + o.price * o.quantity, 0));
65
65
  });
66
66
  R(() => {
67
67
  var s;
68
- return Number((s = e.value) == null ? void 0 : s.positions.reduce((a, n) => a + n.quantity, 0));
68
+ return Number((s = e.value) == null ? void 0 : s.positions.reduce((a, o) => a + o.quantity, 0));
69
69
  });
70
70
  function y(s) {
71
71
  const a = d.indexOf(s);
@@ -80,9 +80,9 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
80
80
  s ? (g.current.status = s, await U.update(g.current)) : console.error("Next status is void. Must handle somehow."), z();
81
81
  }
82
82
  return (s, a) => {
83
- var n, p, _, h, B, A;
84
- return e.value && o.value ? (i(), m("div", nt, [
85
- e.value ? (i(), m("div", ot, [
83
+ var o, p, _, h, B, A;
84
+ return e.value && r.value ? (n(), m("div", ot, [
85
+ e.value ? (n(), m("div", rt, [
86
86
  t("div", dt, [
87
87
  t("p", ut, [
88
88
  F(" Order No: "),
@@ -90,13 +90,13 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
90
90
  ])
91
91
  ]),
92
92
  t("div", mt, [
93
- (i(), m(I, null, D(d, (u, c) => t("div", {
93
+ (n(), m(I, null, D(d, (u, c) => t("div", {
94
94
  key: c,
95
95
  class: "w-20"
96
96
  }, [
97
97
  t("div", {
98
98
  class: L([
99
- "bg-grey br-anim br-glow radius-extra h-1r w-100",
99
+ "bg-light br-anim br-glow radius-extra h-1r w-100",
100
100
  { "br-glow-anim": S(c) },
101
101
  { "t-transp": !S(c) },
102
102
  { blink: e.value.status === d[c] && y(e.value.status) }
@@ -120,7 +120,7 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
120
120
  F(l(s.formatDate(e.value.deadline)), 1)
121
121
  ])
122
122
  ]),
123
- y(e.value.status) && v(w).name === "Order Edit" ? (i(), m("button", {
123
+ y(e.value.status) && v(w).name === "Order Edit" ? (n(), m("button", {
124
124
  key: 0,
125
125
  onClick: q,
126
126
  class: "mn-l-auto bg-black t-white button"
@@ -138,11 +138,11 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
138
138
  "onUpdate:modelValue": a[0] || (a[0] = (u) => e.value.deadline = u),
139
139
  "hide-navigation": ["calendar"],
140
140
  flow: ["time"],
141
- class: "z-index-3 bg-grey radius-small pd-small mn-b-thin mn-b-semi"
141
+ class: "z-index-3 bg-light radius-small pd-small mn-b-thin mn-b-semi"
142
142
  }, null, 8, ["modelValue"]),
143
143
  ft,
144
144
  t("ul", gt, [
145
- (i(!0), m(I, null, D(P.value, (u, c) => (i(), C(T, {
145
+ (n(!0), m(I, null, D(P.value, (u, c) => (n(), C(T, {
146
146
  key: u._id,
147
147
  editable: !1,
148
148
  product: u
@@ -155,15 +155,15 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
155
155
  ]),
156
156
  _: 1
157
157
  }, 8, ["isPopupOpen"]),
158
- e.value ? (i(), m("div", wt, [
158
+ e.value ? (n(), m("div", wt, [
159
159
  t("div", yt, [
160
- o.value[0] ? (i(), C(tt, {
160
+ r.value[0] ? (n(), C(tt, {
161
161
  key: 0,
162
- organization: o.value[0],
162
+ organization: r.value[0],
163
163
  showRating: !0,
164
164
  showFollowers: !1,
165
165
  showProducts: !1,
166
- class: "bg-grey mn-b-thin w-100 o-hidden radius-big pd-small"
166
+ class: "bg-light mn-b-thin w-100 o-hidden radius-big pd-small"
167
167
  }, null, 8, ["organization"])) : b("", !0),
168
168
  t("div", kt, [
169
169
  t("div", xt, [
@@ -175,7 +175,7 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
175
175
  ]),
176
176
  t("div", Pt, [
177
177
  It,
178
- t("p", Dt, l(((n = e.value.customer.target) == null ? void 0 : n.number) || "Not specified"), 1)
178
+ t("p", Dt, l(((o = e.value.customer.target) == null ? void 0 : o.number) || "Not specified"), 1)
179
179
  ]),
180
180
  t("div", Mt, [
181
181
  $t,
@@ -186,19 +186,19 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
186
186
  t("p", Bt, l(e.value.delivery.type ? e.value.delivery.type : "Not specified"), 1)
187
187
  ])
188
188
  ]),
189
- g.current.status_history ? (i(), C(et, {
189
+ g.current.status_history ? (n(), C(et, {
190
190
  key: 1,
191
191
  statuses: d,
192
192
  statusHistory: g.current.status_history,
193
193
  statusCurrent: g.current.status,
194
194
  edit: v(w).name === "Order Edit"
195
195
  }, null, 8, ["statusHistory", "statusCurrent", "edit"])) : b("", !0),
196
- s.payment && s.payment.Status === "CONFIRMED" ? (i(), m("span", At, "Paid")) : b("", !0)
196
+ s.payment && s.payment.Status === "CONFIRMED" ? (n(), m("span", At, "Paid")) : b("", !0)
197
197
  ]),
198
198
  t("div", Rt, [
199
199
  Ft,
200
200
  t("ul", Lt, [
201
- (i(!0), m(I, null, D(P.value, (u, c) => (i(), C(T, {
201
+ (n(!0), m(I, null, D(P.value, (u, c) => (n(), C(T, {
202
202
  key: u._id,
203
203
  editable: !1,
204
204
  product: u
@@ -211,11 +211,11 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
211
211
  ]),
212
212
  t("div", Ht, [
213
213
  Wt,
214
- t("p", null, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((p = o.value[0]) == null ? void 0 : p.distance) - 7, 5 * (((_ = o.value[0]) == null ? void 0 : _.distance) / 10))), 1)
214
+ t("p", null, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((p = r.value[0]) == null ? void 0 : p.distance) - 7, 5 * (((_ = r.value[0]) == null ? void 0 : _.distance) / 10))), 1)
215
215
  ]),
216
216
  t("div", jt, [
217
217
  Gt,
218
- t("p", Jt, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((h = o.value[0]) == null ? void 0 : h.distance) - 7, 5 * (((B = o.value[0]) == null ? void 0 : B.distance) / 10)) + v(E)), 1)
218
+ t("p", Jt, l(s.returnCurrency()) + " " + l(Math.trunc(100 + 20 * ((h = r.value[0]) == null ? void 0 : h.distance) - 7, 5 * (((B = r.value[0]) == null ? void 0 : B.distance) / 10)) + v(E)), 1)
219
219
  ])
220
220
  ]),
221
221
  Kt,
@@ -229,7 +229,7 @@ const r = (k) => (G("data-v-ec5fc79c"), k = k(), J(), k), nt = {
229
229
  ])) : b("", !0);
230
230
  };
231
231
  }
232
- }, _s = /* @__PURE__ */ it(Qt, [["__scopeId", "data-v-ec5fc79c"]]);
232
+ }, _s = /* @__PURE__ */ nt(Qt, [["__scopeId", "data-v-75357432"]]);
233
233
  export {
234
234
  _s as default
235
235
  };
@@ -1 +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"),g=require("vue-router"),w=require("../../../globals/store/globals.cjs"),m=require("../../../auth/store/auth.cjs"),o=require("../../store/shopcart.cjs"),y=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"},z={key:2,class:"order-form col"},F={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),U=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),Y=["disabled"],$={__name:"OrderCreate",setup(H){g.useRoute();const _=g.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 y.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 y.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,i,a;const r=(c=t.state.current.customer.messenger)==null?void 0:c.type,s=((i=(u=t.state.current.customer.messenger)==null?void 0:u.value)==null?void 0:i.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:o.state.organization,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?(o.actions.resetShopcart(),_.push({name:"Order Status",params:{order:s._id}})):alert("something wrong")}return(r,s)=>{var d,c,u,i;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",z,[e.createVNode(S.default,{customer:t.state.current.customer},null,8,["customer"]),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",F,[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:l=>o.actions.incrementItemQuantity(l._id),decrease:l=>o.actions.decrementItemQuantity(l._id),remove:l=>o.actions.removeProduct(l._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*(((i=n.value[0])==null?void 0:i.distance)/10))+h.value.value),1)]),j,U,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,Y)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])}}};exports.default=$;
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"),g=require("vue-router"),w=require("../../../globals/store/globals.cjs"),m=require("../../../auth/store/auth.cjs"),o=require("../../store/shopcart.cjs"),y=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"},z={key:2,class:"order-form col"},F={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),U=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),Y=["disabled"],$={__name:"OrderCreate",setup(H){g.useRoute();const _=g.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 y.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 y.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,i,a;const r=(c=t.state.current.customer.messenger)==null?void 0:c.type,s=((i=(u=t.state.current.customer.messenger)==null?void 0:u.value)==null?void 0:i.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:o.state.organization,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?(o.actions.resetShopcart(),_.push({name:"Order Status",params:{order:s._id}})):alert("something wrong")}return(r,s)=>{var d,c,u,i;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",z,[e.createVNode(S.default,{customer:t.state.current.customer},null,8,["customer"]),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",F,[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:!0,product:a,increase:l=>o.actions.incrementItemQuantity(l._id),decrease:l=>o.actions.decrementItemQuantity(l._id),remove:l=>o.actions.removeProduct(l._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*(((i=n.value[0])==null?void 0:i.distance)/10))+h.value.value),1)]),j,U,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,Y)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])}}};exports.default=$;
@@ -96,7 +96,7 @@ const J = { class: "pd-thin" }, K = { class: "gap-small mn-b-thin cols-2" }, W =
96
96
  o("ul", ee, [
97
97
  (s(!0), h(N, null, D(t.positions, (u) => (s(), l(F, {
98
98
  key: u._id,
99
- editable: "true",
99
+ editable: !0,
100
100
  product: u,
101
101
  increase: (f) => y.incrementItemQuantity(f._id),
102
102
  decrease: (f) => y.decrementItemQuantity(f._id),
@@ -1 +1 @@
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 P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");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"),l=require("../../../globals/store/globals.cjs"),F=require("../../../auth/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");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:"bg-grey h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=h.useRoute(),y=h.useRouter();t.mutations.resetOrder(t.state.current);let g=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function v(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){y.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-grey mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let f={...o};f.quantity=1,l.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,["store","options"])])]),_:1},8,["isPopupOpen"]),s.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:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin 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,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(g))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const P=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Block/Block.vue.cjs"),b=require("../../../../components/Feed/Feed.vue.cjs"),_=require("../blocks/CardOrderItem.vue.cjs");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"),l=require("../../../globals/store/globals.cjs"),F=require("../../../auth/store/auth.cjs"),t=require("../../store/orders.cjs"),S=require("../../../products/store/products.cjs"),D=require("../../store/customers.store.cjs");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:"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big"},L={key:0,class:"w-100"},M={class:"h3 flex"},U=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),j={__name:"OrderCreateBackoffice",setup(G){const a=h.useRoute(),g=h.useRouter();t.mutations.resetOrder(t.state.current);let v=e.computed(()=>Number(t.state.current.positions.reduce((d,n)=>d+n.price*n.quantity,0)));const s=e.ref("positions"),c=e.ref(!1);function y(){c.value=!0}function m(){c.value=!1}const i=e.ref(!1);function B(){i.value=!0}function p(){i.value=!1}e.ref(null);function w(){t.state.current.creator={type:"User",target:F.state.user._id},t.state.current.owner={type:"Organization",target:a.params._id},t.state.current.customer={type:"Customer",target:t.state.current.customer._id||null},t.actions.create(t.state.current)}function x(){g.push({name:"Backoffice Orders",params:{_id:a.params._id}})}return e.onMounted(()=>{}),(d,n)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(u.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",T,[A,e.createVNode(P.default,{submit:w,callback:x,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(q.default,{selected:s.value,"onUpdate:selected":n[0]||(n[0]=r=>s.value=r),tabs:[{name:"Positions",value:"positions"},{name:"Customer",value:"customer"},{name:"Delivery",value:"delivery"},{name:"Payment",value:"payment"}],class:"t-medium radius-medium bg-light mn-b-small"},null,8,["selected"]),e.createVNode(k.default,{onClosePopup:m,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative"},{default:e.withCtx(()=>[I,e.createElementVNode("div",z,[e.createVNode(b.default,{search:{placeholder:"Search products...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>S.actions.read(r),state:null},options:{organization:e.unref(a).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(_.default,{key:o._id,editable:!1,product:o,onClick:()=>{let f={...o};f.quantity=1,l.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,["store","options"])])]),_:1},8,["isPopupOpen"]),s.value==="positions"?(e.openBlock(),e.createBlock(u.default,{key:0,title:"Positions",actions:[{label:"+",function:()=>y()}],class:"mn-b-small"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",L," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,o)=>(e.openBlock(),e.createBlock(_.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{l.actions.increment(t.state.current.positions,r)},onDecrease:()=>{l.actions.decrement(t.state.current.positions,r)},onRemove:()=>{l.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="customer"?(e.openBlock(),e.createBlock(u.default,{key:1,title:"Customer",class:"mn-b-semi",actions:[{label:"+",function:()=>B()}]},{default:e.withCtx(()=>[t.state.current.customer._id?(e.openBlock(),e.createBlock(C.default,{key:0,user:t.state.current.customer,photo:t.state.current.customer.profile.photo,name:t.state.current.customer.profile.name||t.state.current.customer.phone||t.state.current.customer.email,onClick:n[1]||(n[1]=()=>{t.mutations.resetCustomer(t.state.current.customer)}),class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name"])):(e.openBlock(),e.createBlock(b.default,{key:1,search:{placeholder:"Search customer...",class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>e.unref(D.default).read(r),state:null},options:{owner:e.unref(a).params._id},class:"bg-light h-max-20r o-scroll"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(o,N)=>(e.openBlock(),e.createBlock(C.default,{key:o._id,user:o,photo:o.profile.photo,name:o.profile.name||o.phone||o.email,onClick:()=>{t.state.current.customer=o},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"]))]),_:1},8,["actions"])):e.createCommentVNode("",!0),s.value==="delivery"?(e.openBlock(),e.createBlock(O.default,{key:2,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),s.value==="payment"?(e.openBlock(),e.createBlock(E.default,{key:3,order:t.state.current},null,8,["order"])):e.createCommentVNode("",!0),e.createVNode(k.default,{title:"Add customer",onClosePopup:p,isPopupOpen:i.value,class:e.normalizeClass("bg-white w-min-30r w-max-30r radius-big pd-medium")},{default:e.withCtx(()=>[e.createVNode(V.default,{onCallbackCustomer:p})]),_:1},8,["isPopupOpen"]),e.createVNode(u.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[U,e.createElementVNode("span",null,e.toDisplayString(e.unref(v))+" "+e.toDisplayString(d.returnCurrency()),1)])]),_:1})]))}};exports.default=j;