@ozdao/prometheus-framework 0.2.34 → 0.2.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) hide show
  1. package/dist/events.server.js +2 -1
  2. package/dist/events.server.mjs +2 -1
  3. package/dist/main.css +1 -1
  4. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_commonjsHelpers.cjs +1 -0
  5. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_commonjsHelpers.js +6 -0
  6. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_plugin-vue_export-helper.cjs +1 -0
  7. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  8. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/js.cookie.cjs +1 -0
  9. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/js.cookie.js +4 -0
  10. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.cjs +7 -0
  11. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.js +97 -0
  12. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -0
  13. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.js +173 -0
  14. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -0
  15. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +337 -0
  16. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.cjs +1 -0
  17. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.js +7 -0
  18. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.cjs +1 -0
  19. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.js +54 -0
  20. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.cjs +3 -0
  21. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.js +51 -0
  22. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.cjs +1 -0
  23. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.js +109 -0
  24. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -0
  25. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.js +47 -0
  26. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -0
  27. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +73 -0
  28. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.cjs +1 -0
  29. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.js +11 -0
  30. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.cjs +1 -0
  31. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.js +6 -0
  32. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -0
  33. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +117 -0
  34. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.cjs +1 -0
  35. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.js +54 -0
  36. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -0
  37. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +165 -0
  38. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.cjs +1 -0
  39. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.js +59 -0
  40. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.cjs +1 -0
  41. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.js +8 -0
  42. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.cjs +1 -0
  43. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.js +31 -0
  44. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.cjs +1 -0
  45. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.js +72 -0
  46. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/settle.cjs +1 -0
  47. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/settle.js +14 -0
  48. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/transformData.cjs +1 -0
  49. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/transformData.js +13 -0
  50. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -0
  51. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +88 -0
  52. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.cjs +1 -0
  53. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.js +8 -0
  54. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -0
  55. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/env/data.js +4 -0
  56. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.cjs +1 -0
  57. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
  58. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -0
  59. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
  60. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.cjs +1 -0
  61. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.js +8 -0
  62. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.cjs +1 -0
  63. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.js +19 -0
  64. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -0
  65. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +6 -0
  66. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.cjs +1 -0
  67. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.js +32 -0
  68. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -0
  69. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +30 -0
  70. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.cjs +1 -0
  71. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
  72. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.cjs +1 -0
  73. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
  74. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.cjs +1 -0
  75. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +37 -0
  76. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/null.cjs +1 -0
  77. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/null.js +4 -0
  78. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.cjs +2 -0
  79. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.js +30 -0
  80. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.cjs +1 -0
  81. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  82. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.cjs +1 -0
  83. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.js +19 -0
  84. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.cjs +1 -0
  85. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.js +8 -0
  86. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.cjs +1 -0
  87. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.js +84 -0
  88. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.cjs +1 -0
  89. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
  90. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.cjs +1 -0
  91. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.js +51 -0
  92. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.cjs +1 -0
  93. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  94. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.cjs +1 -0
  95. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  96. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.cjs +1 -0
  97. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
  98. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.cjs +1 -0
  99. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.js +15 -0
  100. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -0
  101. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +7 -0
  102. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/index.cjs +1 -0
  103. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/index.js +9 -0
  104. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -0
  105. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.js +224 -0
  106. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -0
  107. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.js +44 -0
  108. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -0
  109. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/twofa.js +19 -0
  110. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -0
  111. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.js +38 -0
  112. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -0
  113. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.js +16 -0
  114. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -0
  115. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.js +42 -0
  116. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -0
  117. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +22 -0
  118. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -0
  119. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/store/globals.js +59 -0
  120. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -0
  121. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +28 -0
  122. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.cjs +1 -0
  123. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.js +21 -0
  124. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.cjs +1 -0
  125. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.js +21 -0
  126. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -0
  127. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.js +21 -0
  128. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/line.vue.cjs +1 -0
  129. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/line.vue.js +23 -0
  130. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -0
  131. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.js +21 -0
  132. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.cjs +1 -0
  133. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +29 -0
  134. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -0
  135. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +21 -0
  136. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -0
  137. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +3 -0
  138. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -0
  139. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +35 -0
  140. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +1 -0
  141. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.js +60 -0
  142. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -0
  143. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +80 -0
  144. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -0
  145. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.js +34 -0
  146. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -0
  147. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.js +17 -0
  148. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -0
  149. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.js +16 -0
  150. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -0
  151. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.js +42 -0
  152. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -0
  153. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.js +20 -0
  154. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -0
  155. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.js +28 -0
  156. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -0
  157. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.js +28 -0
  158. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -0
  159. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.js +34 -0
  160. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +2 -61
  162. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  163. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +61 -2
  164. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.cjs +1 -0
  165. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.js +62 -0
  166. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  168. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  169. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  170. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +42 -34
  172. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  174. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  175. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +70 -2
  176. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -93
  178. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  179. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +93 -2
  180. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +99 -2
  182. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
  183. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +2 -73
  184. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +30 -28
  186. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  187. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +25 -24
  188. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  190. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  192. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  194. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +1 -1
  196. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  197. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  198. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  199. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +65 -2
  200. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  201. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +1 -1
  202. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +1 -1
  204. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  206. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  208. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +381 -140
  210. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +4 -1
  211. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +122 -48
  212. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  214. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -0
  215. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +116 -0
  216. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.cjs +1 -0
  217. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.js +4 -0
  218. package/dist/prometheus-framework/src/modules/events/components/sections/SectionLineup.vue.cjs +1 -0
  219. package/dist/prometheus-framework/src/modules/events/components/sections/SectionLineup.vue.js +29 -0
  220. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +3 -0
  221. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +117 -0
  222. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.cjs +1 -0
  223. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.js +4 -0
  224. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -0
  225. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +108 -0
  226. package/dist/prometheus-framework/src/modules/events/components/sections/SectionSpecialGuests.vue.cjs +1 -0
  227. package/dist/prometheus-framework/src/modules/events/components/sections/SectionSpecialGuests.vue.js +70 -0
  228. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  229. package/dist/prometheus-framework/src/modules/events/store/events.js +20 -16
  230. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  231. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  232. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  234. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  236. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  237. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  238. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  239. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  240. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  241. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  242. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  243. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  244. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  245. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +14 -14
  246. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  247. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  248. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  249. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  250. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  252. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  253. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  254. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  255. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  256. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  257. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  258. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  259. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  260. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  261. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  262. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  263. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  264. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  265. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  266. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  267. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  268. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  269. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  270. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  271. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  272. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  273. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  274. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  275. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  276. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  277. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  278. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  279. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +58 -55
  280. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  281. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +3 -3
  282. package/dist/prometheus-framework.cjs.js +13 -14
  283. package/dist/prometheus-framework.es.js +594 -805
  284. package/dist/style.css +1 -1
  285. package/package.json +1 -1
  286. package/src/components/Button/Button.vue +26 -19
  287. package/src/components/FieldBig/FieldBig.vue +1 -1
  288. package/src/components/FieldPhone/FieldPhone.vue +55 -304
  289. package/src/components/FieldPhone/FieldPhone2.vue +671 -0
  290. package/src/components/FieldPhone/click-outside.js +16 -11
  291. package/src/components/Footer/Footer.vue +4 -4
  292. package/src/components/Header/Header.vue +2 -1
  293. package/src/components/Select/Select.vue +2 -1
  294. package/src/modules/chats/components/sections/ChatWindow.vue +3 -1
  295. package/src/modules/chats/store/chat.store.js +1 -3
  296. package/src/modules/events/components/pages/EditEvent.vue +2 -1
  297. package/src/modules/events/components/pages/Event.vue +8 -2
  298. package/src/modules/events/components/sections/SectionMainGuest.vue +1 -1
  299. package/src/modules/events/components/sections/SectionSpecialGuests.vue +0 -1
  300. package/src/modules/events/store/events.js +23 -3
  301. package/src/modules/globals/mixins/mixins.js +33 -2
  302. package/src/modules/globals/store/globals.js +1 -0
  303. package/src/modules/landing/components/sections/HeroGovernance.vue +156 -0
  304. package/src/modules/marketplace/components/sections/Filters.vue +3 -0
  305. package/src/modules/marketplace/router/marketplace.js +1 -0
  306. package/src/modules/orders/components/blocks/StatusHistory.vue +8 -3
  307. package/src/modules/orders/components/pages/EditOrder.vue +9 -11
  308. package/src/modules/orders/components/pages/FormOrder.vue +58 -46
  309. package/src/modules/orders/components/pages/Order.vue +63 -42
  310. package/src/modules/orders/components/sections/FormOrderDetails.vue +50 -18
  311. package/src/modules/orders/controllers/orders.controller.js +10 -1
  312. package/src/modules/orders/models/order.model.js +1 -0
  313. package/src/modules/orders/store/orders.js +21 -27
  314. package/src/modules/orders/store/shopcart.js +14 -2
  315. package/src/modules/organizations/components/sections/DetailsTab.vue +2 -2
  316. package/src/modules/products/components/sections/FilterProducts.vue +3 -4
  317. package/src/modules/products/components/sections/HeroRecommendation.vue +29 -2
  318. package/src/modules/products/components/sections/SectionProduct.vue +14 -9
  319. package/src/modules/products/controllers/products.controller.js +26 -17
  320. package/src/modules/products/routes/products.routes.js +6 -6
  321. package/src/modules/products/store/products.js +10 -10
  322. package/src/styles/config.scss +10 -3
@@ -27,7 +27,11 @@
27
27
  <p class="p-big mn-b-small">Your Order</p>
28
28
 
29
29
  <ul class="mn-b-semi">
30
- <CardOrderItem v-for="product in shopcart.state.positions" :key="product._id" editable="true" :product="product"
30
+ <CardOrderItem
31
+ v-for="product in shopcart.state.positions"
32
+ :key="product._id"
33
+ editable="true"
34
+ :product="product"
31
35
  :increase="product => shopcart.actions.incrementItemQuantity(product._id)"
32
36
  :decrease="product => shopcart.actions.decrementItemQuantity(product._id)"
33
37
  :remove="product => shopcart.actions.removeProduct(product._id)"
@@ -36,13 +40,13 @@
36
40
 
37
41
  <div
38
42
  style="border-bottom: 1px solid #f7f7f7; border-top: 1px solid #f7f7f7;" class="pd-b-medium pd-t-medium mn-b-medium"
39
- >
43
+ >
40
44
  <p class="mn-b-thin">Subtotal: {{returnCurrency()}} {{ cartTotalPrice }} </p>
41
- <p class="mn-b-thin">Delivery: {{ order.delivery.type === 'pickup' ? 'Free' : '30'}} </p>
42
- <p class="h3">Total: {{returnCurrency()}} {{ cartTotalPrice }} </p>
45
+ <p class="mn-b-thin">Delivery: {{returnCurrency()}} {{ Math.trunc(100 + 20 * orderOrganization[0]?.distance - 7,5 * (orderOrganization[0]?.distance / 10))}} </p>
46
+ <p class="h3">Total: {{returnCurrency()}} {{ Math.trunc(100 + 20 * orderOrganization[0]?.distance - 7,5 * (orderOrganization[0]?.distance / 10)) + cartTotalPrice.value }} </p>
43
47
  </div>
44
48
 
45
- <p class='mn-b-thin'>By making this purchase you agree to our terms and conditions.</p>
49
+ <p class='mn-b-thin'>By making this purchase you agree to the General Terms and Conditions.</p>
46
50
  <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.</p>
47
51
  <!-- Send order -->
48
52
  <button
@@ -51,7 +55,7 @@
51
55
  errorName
52
56
  || errorPhoneOrMessenger
53
57
  || errorCity
54
- || errorAdress
58
+ || errorAddress
55
59
  || errorDelivery
56
60
  || errorPayment
57
61
  "
@@ -76,78 +80,86 @@
76
80
  // Import components
77
81
  ///////////////////////////////////////////////////////////////////////////////////////////////////
78
82
  // Block
79
- import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'
83
+ import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'
80
84
  // Sections
81
- import AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'
82
- import Succes from '@pf/src/modules/orders/components/sections/Succes.vue'
83
- import EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'
84
- import FormOrderDetails from '@pf/src/modules/orders/components/sections/FormOrderDetails.vue'
85
+ import AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'
86
+ import Succes from '@pf/src/modules/orders/components/sections/Succes.vue'
87
+ import EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'
88
+ import FormOrderDetails from '@pf/src/modules/orders/components/sections/FormOrderDetails.vue'
85
89
  ///////////////////////////////////////////////////////////////////////////////////////////////////
86
90
  // Import libs
87
91
  ///////////////////////////////////////////////////////////////////////////////////////////////////
88
- import { computed, onMounted } from 'vue'
92
+ import { ref, computed, onMounted, watch } from 'vue'
89
93
  import { useRoute,useRouter } from 'vue-router'
90
-
94
+ // Store
95
+ import * as globals from '@pf/src/modules/globals/store/globals';
91
96
  import * as auth from '@pf/src/modules/auth/store/auth';
92
97
  import * as shopcart from '@pf/src/modules/orders/store/shopcart';
98
+ import * as organizations from '@pf/src/modules/organizations/store/organizations';
93
99
  import * as orders from '@pf/src/modules/orders/store/orders';
94
100
  import * as users from '@pf/src/modules/users/store/users';
95
101
  ///////////////////////////////////////////////////////////////////////////////////////////////////
96
102
  // Variables and computed
97
103
  ///////////////////////////////////////////////////////////////////////////////////////////////////
98
104
  // Accessing router and store
99
-
100
105
  const route = useRoute()
101
106
  const router = useRouter()
102
- const cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)
103
-
107
+ // COMPUTED
104
108
  const order = computed(() => orders.state.current)
105
109
  const user = computed(() => users.state.current)
106
-
110
+ const cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)
111
+ // Organization
112
+ const orderOrganization = ref([])
113
+ onMounted(async()=> {
114
+ orderOrganization.value = await organizations.actions.read({
115
+ _id: shopcart.state.organization,
116
+ location: globals.state.position?.location,
117
+ })
118
+ })
119
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
120
+ // WATCHERS
121
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
122
+ watch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {
123
+ orderOrganization.value = await organizations.actions.read({
124
+ _id: shopcart.state.organization,
125
+ location: orders.state.current.delivery.location,
126
+ })
127
+ }, { deep: true })
107
128
  /////////////////////////////
108
129
  // Store Verification
109
130
  /////////////////////////////
110
131
  const errorName = computed(() => {
111
- return orders.state.current.user.name.length < 2 ? "Fill the name field" : false
112
- })
132
+ if (orders.state.current.user.name?.length < 2) { return true } else { return false }
133
+ });
113
134
 
114
135
  const errorPhoneOrMessenger = computed(() => {
115
- const phoneError = orders.state.current.user.phone.number;
116
- const messengerError = (orders.state.current.user.messenger.type && orders.state.current.user.messenger.value); // Пример
117
-
118
- if (!phoneError && messengerError) {
119
- return true;
120
- } else {
121
- return false ;
122
- }
136
+ const hasMessengerType = orders.state.current.user.messenger?.type;
137
+ const hasMessengerValue = orders.state.current.user.messenger?.value?.length > 2;
138
+ const hasPhone = orders.state.current.user.number?.length > 0;
139
+ // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера
140
+ return !hasPhone && !(hasMessengerType && hasMessengerValue);
123
141
  });
124
142
 
125
- const errorAdress = computed(() => {
126
- if (orders.state.current.delivery !== "Pickup") {
127
- return orders.state.current.delivery.address < 2 ? "Заполните поле адреса" : false
128
- } else {
129
- return false
130
- }
131
- })
143
+ const errorAddress = computed(() => {
144
+ let error = orders.state.current.delivery.type !== "Pickup" && orders.state.current.delivery.address < 2
145
+
146
+ if (error) { return true } else { return false }
147
+ });
132
148
 
133
149
  const errorDelivery = computed(() => {
134
- if (orders.state.current.delivery.type) {
135
- return false
136
- } else {
137
- return true
138
- }
150
+ if (orders.state.current.delivery.type) {return false } else {return true }
139
151
  })
140
152
 
141
153
  const errorPayment = computed(() => {
142
- if (orders.state.current.payment.type) {
143
- return false
144
- } else {
145
- return true
146
- }
154
+ if (orders.state.current.payment.type) { return false } else {return true }
147
155
  })
148
-
149
-
156
+ /////////////////////////////
157
+ // Methods
158
+ /////////////////////////////
150
159
  async function handleCreate() {
160
+
161
+ orders.state.current.status = 'created';
162
+
151
163
  let order = await orders.actions.create(shopcart.state.positions, shopcart.state.organization);
152
164
 
153
165
  if (order) {
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div class="pd-big">
2
+ <div v-if="order && orderOrganization" class="pd-big">
3
3
 
4
4
 
5
5
 
6
- <div class="mn-b-thin pos-relative w-100 bg-main radius-big pd-big">
6
+ <div v-if="order" class="mn-b-thin pos-relative w-100 bg-main radius-big pd-big">
7
7
 
8
8
  <h2 class="mn-b-small">Order is {{order.status}}</h2>
9
9
  <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.</p>
@@ -53,8 +53,15 @@
53
53
  </div>
54
54
 
55
55
  <!-- <div class="w-max pd-thin radius-small bg-white-transp-20"> -->
56
- <p>Estimated Arrival {{DateToFormattedString2(order.createdAt)}}</p>
57
- <h3>10-15 min</h3>
56
+ <p>Estimated Arrival {{formatDate(calculateDeliveryTime(orderOrganization[0]?.distance, order.createdAt))}}</p>
57
+ <!-- Estimated in minutes -->
58
+ <h3>{{
59
+ orderOrganization[0]?.distance ?
60
+ Math.ceil((5 + 5 + 3 * orderOrganization[0]?.distance) / 5) * 5
61
+ + '-'
62
+ + Math.ceil((15 + 5 + 3 * orderOrganization[0]?.distance) / 5) * 5
63
+ + ' MIN' : 'Unavailable'
64
+ }}</h3>
58
65
  <!-- </div> -->
59
66
 
60
67
 
@@ -65,11 +72,12 @@
65
72
 
66
73
 
67
74
 
68
- <div class="gap-thin cols-2">
75
+ <div v-if="order" class="gap-thin cols-2">
69
76
 
70
77
  <div class="w-100">
71
78
 
72
79
  <CardOrganization
80
+ v-if="orderOrganization"
73
81
  :organization="orderOrganization[0]"
74
82
  :showRating="true"
75
83
  :showFollowers="false"
@@ -80,19 +88,19 @@
80
88
  <div
81
89
  class="mn-b-thin bg-grey w-100 o-hidden radius-medium "
82
90
  >
83
- <div class="pd-small cols-2">
84
- <div>
91
+ <div class="pd-small flex-nowrap flex">
92
+ <div class="mn-r-auto">
85
93
  <span class="d-block t-medium p-medium">Your order is</span>
86
94
  <span class=" t-lh-075 h2 d-block mn-b-small">{{order.status}}</span>
87
95
  <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</p>
88
96
  </div>
89
- <div class="t-right">
97
+ <!-- <div class="t-right">
90
98
  Cancel order<br>
91
99
  Exchange item
92
100
  <hr class="mn-b-thin mn-t-thin">
93
101
  For Delivery Queries Contact Us
94
102
 
95
- </div>
103
+ </div> -->
96
104
  </div>
97
105
 
98
106
  <div class="pd-small cols-2 br-t br-black-transp-10 br-solid">
@@ -101,7 +109,17 @@
101
109
  </p>
102
110
 
103
111
  <p class="w-100 t-right ">
104
- {{order.user?.phone.number}}
112
+ {{order.user?.number}}
113
+ </p>
114
+ </div>
115
+
116
+ <div v-if="order.user?.messenger.type" class="pd-small cols-2 br-t br-black-transp-10 br-solid">
117
+ <p class="w-100 t-medium p-medium">
118
+ {{order.user?.messenger.type}}
119
+ </p>
120
+
121
+ <p class="w-100 t-right ">
122
+ {{order.user?.messenger.value}}
105
123
  </p>
106
124
  </div>
107
125
 
@@ -127,14 +145,11 @@
127
145
 
128
146
  </div>
129
147
 
130
- <div class="pd-big bg-red">
131
- {{orders.state.current.status_history}}
132
- </div>
133
-
134
148
  <StatusHistory
135
149
  v-if="orders.state.current.status_history"
136
150
  :statusHistory="orders.state.current.status_history"
137
151
  :statusCurrent="orders.state.current.status"
152
+ :edit="route.name === 'AdminOrderEdit'"
138
153
  />
139
154
 
140
155
  <!-- <button
@@ -167,11 +182,11 @@
167
182
  </div>
168
183
  <div class="pd-small br-solid br-b br-black-transp-10 flex">
169
184
  <p class="mn-r-auto t-transp">Delivery</p>
170
- <p>Free</p>
185
+ <p>{{returnCurrency()}} {{ Math.trunc(100 + 20 * orderOrganization[0]?.distance - 7,5 * (orderOrganization[0]?.distance / 10))}} </p>
171
186
  </div>
172
187
  <div class="pd-small flex-bottom flex">
173
188
  <p class="mn-r-auto t-transp">In total to pay</p>
174
- <p class="p-big t-semi">{{ cartTotalPrice }} {{returnCurrency()}} </p>
189
+ <p class="p-big t-semi">{{returnCurrency()}} {{ Math.trunc(100 + 20 * orderOrganization[0]?.distance - 7,5 * (orderOrganization[0]?.distance / 10)) + cartTotalPrice }}</p>
175
190
  </div>
176
191
  </div>
177
192
 
@@ -203,6 +218,7 @@
203
218
 
204
219
  import StatusHistory from '@pf/src/modules/orders/components/blocks/StatusHistory.vue'
205
220
 
221
+ import * as globals from '@pf/src/modules/globals/store/globals'
206
222
  import * as orders from '@pf/src/modules/orders/store/orders'
207
223
  import * as products from '@pf/src/modules/products/store/products'
208
224
  import * as organizations from '@pf/src/modules/organizations/store/organizations'
@@ -210,21 +226,24 @@
210
226
  const router = useRouter()
211
227
  const route = useRoute()
212
228
 
213
- await orders.actions.fetchOrder(route.params.order)
229
+ const order = ref(null)
230
+ const productsOrganization = ref(null)
231
+ const orderOrganization = ref(null)
214
232
 
215
- let order = ref(orders.state.current)
233
+ onMounted(async()=>{
234
+ order.value = await orders.actions.fetchOrder(route.params.order)
216
235
 
236
+ productsOrganization.value = await products.actions.read({
237
+ organization: order.value.organization
238
+ });
217
239
 
218
- const productsOrganization = ref([])
219
- const orderOrganization = ref([])
240
+ orderOrganization.value = await organizations.actions.read({
241
+ _id: order.value.organization,
242
+ location: globals.state.position?.location,
243
+ });
220
244
 
221
- productsOrganization.value = await products.actions.read({
222
- organization: order.value.organization
223
- });
245
+ })
224
246
 
225
- orderOrganization.value = await organizations.actions.read({
226
- _id: order.value.organization
227
- });
228
247
 
229
248
  let cartTotalPrice = computed(() => {
230
249
  return Number(order.value.positions.reduce((total, product) => {
@@ -266,22 +285,24 @@
266
285
  function requestPayment(order) {
267
286
  // store.dispatch("payments/newPayment", order);
268
287
  }
269
-
270
- function DateToFormattedString(d) {
271
- var fixedDate = new Date(d);
272
- var mm = (fixedDate.getMonth()+1).toString(); // getMonth() is zero-based
273
- var dd = (fixedDate.getDate() + 6).toString();
274
-
275
- return (dd[1]?dd:"0"+dd[0]) + '/' + (mm[1]?mm:"0"+mm[0]);
276
- }
277
-
278
- function DateToFormattedString2(d) {
279
- var fixedDate = new Date(d);
280
- var mm = (fixedDate.getMonth() + 1).toString(); // getMonth() is zero-based
281
- var dd = (fixedDate.getDate() + 1).toString();
282
-
283
- return (dd[1]?dd:"0"+dd[0]) + '/' + (mm[1]?mm:"0"+mm[0]);
284
- }
288
+
289
+ function calculateDeliveryTime(distance, date) {
290
+ if (!distance) {
291
+ return null;
292
+ }
293
+
294
+ const basePreparationTime = 10 * 60 * 1000; // Convert to milliseconds
295
+ const travelTime = Math.ceil((15 + 5 + 3 * distance) / 5) * 5 * 60 * 1000;
296
+
297
+ // Преобразование даты начала в миллисекунды и добавление времени подготовки и доставки
298
+ const startTime = new Date(date).getTime();
299
+ const estimatedDeliveryTime = new Date(startTime + basePreparationTime + travelTime);
300
+
301
+ console.log(date)
302
+ console.log(estimatedDeliveryTime)
303
+
304
+ return estimatedDeliveryTime;
305
+ }
285
306
 
286
307
 
287
308
  </script>
@@ -20,14 +20,19 @@
20
20
  <!-- Phone -->
21
21
  <FieldPhone
22
22
  v-model:modelValue="order.user.phone"
23
+ @country="(country) => { order.user.number = country }"
24
+ :inputOptions="{
25
+ placeholder: 'Enter contact phone number',
26
+ type: 'tel',
27
+ }"
28
+ :defaultCountry="'TH'"
29
+ :validCharactersOnly="true"
23
30
  :dropdownOptions="{
24
31
  showDialCodeInSelection: true,
25
32
  showFlags: true,
26
33
  showDialCodeInList: true
27
- }"
28
- :validation="phoneValidation"
34
+ }"
29
35
  mode="national"
30
- :inputOptions="{placeholder: 'Enter contact phone number'}"
31
36
  class="bg-white pd-small radius-small mn-b-thin"
32
37
  />
33
38
 
@@ -42,7 +47,7 @@
42
47
  {name: 'WhatsApp', value: 'whatsapp'},
43
48
  {name: 'Line', value: 'line'},
44
49
  ]"
45
- :select="order.user.messenger.type"
50
+ @update:select="(option) => order.user.messenger.type = option.value"
46
51
  placeholder="Messenger"
47
52
  size="small"
48
53
  class="
@@ -101,17 +106,41 @@
101
106
  </div>
102
107
  <!-- Adress-->
103
108
  <Address
104
- apiKey="AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI"
105
- v-model:address="order.delivery.address"
106
109
  label="Address"
107
- placeholder="Enter delivery address"
110
+
111
+ apiKey="AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI"
112
+
113
+ :address="order.delivery.address"
114
+ :location="order.delivery.location"
115
+
116
+ placeholder="Enter your address"
117
+
108
118
  class="
109
- bg-white
110
- pd-medium
111
- radius-small
112
- w-100
113
- mn-b-thin
119
+ bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium
114
120
  "
121
+
122
+ @update:location="newLocation => {
123
+ order.delivery.location = newLocation;
124
+ }"
125
+ @update:address="newAddress => {
126
+ order.delivery.address = newAddress;
127
+ }"
128
+ />
129
+
130
+ <LocationMarker
131
+ apiKey="AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI"
132
+
133
+ :address="order.delivery.address"
134
+ :location="order.delivery.location"
135
+
136
+ class="mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden"
137
+
138
+ @update:location="newLocation => {
139
+ order.delivery.location = newLocation;
140
+ }"
141
+ @update:address="newAddress => {
142
+ order.delivery.address = newAddress;
143
+ }"
115
144
  />
116
145
  <Field
117
146
  v-model:field="order.comment"
@@ -156,22 +185,21 @@
156
185
  </template>
157
186
 
158
187
  <script setup="props">
159
- import { computed, onMounted } from 'vue'
188
+ import { computed, onMounted, watch } from 'vue'
160
189
 
190
+ import * as globals from '@pf/src/modules/globals/store/globals';
161
191
  import * as orders from '@pf/src/modules/orders/store/orders';
162
192
  /////////////////////////////
163
193
  // COMPONENT DEPENDENCIES
164
194
  /////////////////////////////
165
195
  import Block from '@pf/src/components/Block/Block.vue'
166
196
  import Field from '@pf/src/components/Field/Field.vue'
167
- import FieldPhone from '@pf/src/components/FieldPhone/FieldPhone.vue'
197
+ import FieldPhone from '@pf/src/components/FieldPhone/FieldPhone2.vue'
168
198
  import Select from '@pf/src/components/Select/Select.vue'
169
199
  import Address from '@pf/src/components/Address/Address.vue'
170
- import Radio from '@pf/src/components/Radio/Radio.vue'
171
- /////////////////////////////
172
- // HELPERS
173
- /////////////////////////////
174
200
 
201
+ import LocationMarker from "@pf/src/components/LocationMarker/LocationMarker.vue";
202
+ import Radio from '@pf/src/components/Radio/Radio.vue'
175
203
  /////////////////////////////
176
204
  // CREATED
177
205
  /////////////////////////////
@@ -181,6 +209,10 @@ const props = defineProps({
181
209
  /////////////////////////////
182
210
  // MOUNTED
183
211
  /////////////////////////////
212
+ onMounted(() => {
213
+ if (globals.state.position) props.order.delivery.address = globals.state.position.address
214
+ if (globals.state.position) props.order.delivery.location = globals.state.position.location
215
+ })
184
216
  </script>
185
217
 
186
218
  <style lang="scss">
@@ -53,7 +53,16 @@ const controllerFactory = (db) => {
53
53
  const create = async (req, res) => {
54
54
  delete req.body._id;
55
55
 
56
- req.body.status = 'created'
56
+ req.body.status = 'created';
57
+ req.body.status_history = req.body.status_history || [];
58
+
59
+ // Добавление записи в историю изменений статусов
60
+ req.body.status_history.push({
61
+ status: req.body.status,
62
+ changedBy: req.userId,
63
+ timestamp: new Date(),
64
+ comment: ''
65
+ });
57
66
 
58
67
  try {
59
68
  const formattedMessage = formatOrderMessage(req.body);
@@ -9,6 +9,7 @@ module.exports = (db) => {
9
9
  _id: { type: Boolean },
10
10
  name: { type: String, trim: true },
11
11
  phone: { type: Object, trim: true },
12
+ number: { type: String, trim: true },
12
13
  messenger: {
13
14
  type: { type: String, trim: true },
14
15
  value: { type: String, trim: true }
@@ -13,13 +13,13 @@ const state = reactive({
13
13
  _id: '',
14
14
  organization: '',
15
15
  positions: [],
16
- status: false,
16
+ status: null,
17
17
  comment: '',
18
18
 
19
19
  user: {
20
- _id: false,
20
+ _id: null,
21
21
  name: '',
22
- phone: '',
22
+ phone: null,
23
23
  messenger: {
24
24
  type: '',
25
25
  value: ''
@@ -45,12 +45,11 @@ const actions = {
45
45
  state.current.positions = order
46
46
  state.current.organization = organization
47
47
 
48
- console.log(state.current)
49
-
50
48
  const response = await $axios.post('/api/orders/create', state.current);
51
49
 
52
50
  state.all.push(response.data);
53
- return Promise.resolve(response.data);
51
+
52
+ return response.data;
54
53
  } catch (error) {
55
54
  setError(error);
56
55
  }
@@ -59,20 +58,26 @@ const actions = {
59
58
  async fetchOrder(orderID) {
60
59
  try {
61
60
  const response = await $axios.get(`/api/orders/${orderID}`);
62
- console.log(response)
61
+
63
62
  state.current = response.data;
63
+ console.log(response.data)
64
+ return response.data;
64
65
  } catch (error) {
65
66
  setError(error);
67
+ throw err;
66
68
  }
67
69
  },
68
70
 
69
- async read(orderID) {
71
+ async read(orderID) {
70
72
  try {
71
73
  const response = await $axios.get(`/api/orders/read`);
72
- console.log(response)
74
+
73
75
  state.all = response.data;
74
- } catch (error) {
75
- setError(error);
76
+
77
+ return response.data;
78
+ } catch (err) {
79
+ setError(err)
80
+ throw err;
76
81
  }
77
82
  },
78
83
 
@@ -85,18 +90,17 @@ const actions = {
85
90
  if (index !== -1) {
86
91
  state.all[index] = response.data;
87
92
  }
93
+
94
+ return response.data;
88
95
  } catch (error) {
89
96
  setError(error);
90
97
  }
91
98
  },
92
99
 
93
- async confirm(orderID) {
100
+ async delete(orderID) {
94
101
  try {
95
- const response = await $axios.post(`/api/orders/confirm/${orderID}`);
96
- const index = state.all.findIndex(o => o._id === orderID);
97
- if (index !== -1) {
98
- state.all[index] = response.data;
99
- }
102
+ await $axios.delete(`/api/orders/${orderID}`);
103
+ state.all = state.all.filter(o => o._id !== orderID);
100
104
  } catch (error) {
101
105
  setError(error);
102
106
  }
@@ -113,18 +117,8 @@ const actions = {
113
117
  setError(error);
114
118
  }
115
119
  },
116
-
117
- async delete(orderID) {
118
- try {
119
- await $axios.delete(`/api/orders/${orderID}`);
120
- state.all = state.all.filter(o => o._id !== orderID);
121
- } catch (error) {
122
- setError(error);
123
- }
124
- },
125
120
  }
126
121
 
127
-
128
122
  const history = []
129
123
 
130
124
  history.push(state)
@@ -27,13 +27,19 @@ const actions = {
27
27
 
28
28
  setShopcart() {
29
29
  try {
30
- if (localStorage.getItem('shopcart')) state.positions = JSON.parse(localStorage.getItem('shopcart'))
30
+ const storedShopcart = localStorage.getItem('shopcart');
31
+ if (storedShopcart) {
32
+ const shopcartData = JSON.parse(storedShopcart);
33
+ state.positions = shopcartData.positions; // Восстанавливаем продукты
34
+ state.organization = shopcartData.organization; // Восстанавливаем _id организации
35
+ }
31
36
  } catch (error) {
32
37
  console.error(error);
33
38
  throw error;
34
39
  }
35
40
  },
36
41
 
42
+
37
43
  addProductToCart(product, organization) {
38
44
  const cartItem = state.positions.find(
39
45
  (item) => item._id === product._id
@@ -48,12 +54,18 @@ const actions = {
48
54
  name: product.name,
49
55
  price: product.price,
50
56
  quantity: 1,
57
+ org_id: organization, // Добавляем _id организации к каждому продукту
51
58
  });
52
59
  }
53
60
 
54
- localStorage.setItem('shopcart', JSON.stringify(state.positions));
61
+ // Обновляем объект корзины в localStorage, включая _id организации
62
+ localStorage.setItem('shopcart', JSON.stringify({
63
+ positions: state.positions,
64
+ organization: organization // Сохраняем _id организации в корне объекта корзины
65
+ }));
55
66
  },
56
67
 
68
+
57
69
  removeProduct(_id) {
58
70
  const cartItem = state.positions.find(
59
71
  (item) => item._id === _id