@ozdao/prometheus-framework 0.2.52 → 0.2.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. package/dist/main-0a2437f4.js +91 -0
  2. package/dist/main-180a9315.js +91 -0
  3. package/dist/main-3b7bd446.mjs +13631 -0
  4. package/dist/main-4fnApBsF.js +91 -0
  5. package/dist/main-Im8ovDCi.mjs +13609 -0
  6. package/dist/main-MjvO1l5U.js +91 -0
  7. package/dist/main-cdd0be68.mjs +13628 -0
  8. package/dist/main-kjbLXQEa.mjs +13606 -0
  9. package/dist/main.css +1 -1
  10. package/dist/organizations.server.js +17 -3
  11. package/dist/organizations.server.mjs +17 -3
  12. package/dist/products.server.js +62 -50
  13. package/dist/products.server.mjs +62 -50
  14. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -223
  16. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +223 -2
  18. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +20 -20
  20. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  22. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +81 -2
  24. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  26. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
  28. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
  30. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
  32. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
  34. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  36. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  38. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  52. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +57 -77
  54. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
  56. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
  60. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
  66. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +100 -96
  74. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +59 -52
  78. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  84. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +8 -13
  90. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  92. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  94. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +54 -78
  98. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/store/orders.js +42 -32
  104. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  106. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  114. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  116. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  120. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  122. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  124. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +5 -3
  126. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.js +20 -5
  128. package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +22 -0
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -0
  131. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +45 -0
  132. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.cjs +1 -0
  133. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.js +4 -0
  134. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -0
  143. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +79 -0
  144. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -0
  145. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +193 -0
  146. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.cjs +1 -0
  147. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.js +4 -0
  148. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  150. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +68 -58
  154. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  156. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  160. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +21 -18
  162. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/products/products.client.js +2 -2
  166. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/products/store/categories.js +39 -27
  168. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  170. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +63 -77
  172. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  174. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  176. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  178. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +3 -3
  180. package/dist/prometheus-framework.cjs.js +1 -1
  181. package/dist/prometheus-framework.es.js +1 -1
  182. package/dist/style.css +1 -1
  183. package/dist/web-0066fd51.mjs +55 -0
  184. package/dist/web-6b9fa713.js +1 -0
  185. package/dist/web-8b404cc2.js +1 -0
  186. package/dist/web-e9b09dc6.mjs +55 -0
  187. package/dist/web-i-suCpLM.mjs +55 -0
  188. package/dist/web-ngl7bNhF.js +1 -0
  189. package/dist/web-t91TrxXa.mjs +55 -0
  190. package/dist/web-vB7UhMOt.js +1 -0
  191. package/package.json +1 -1
  192. package/src/components/Button/Button.vue +1 -3
  193. package/src/components/EditImages/EditImages.vue +1 -1
  194. package/src/components/Field/Field.vue +8 -1
  195. package/src/components/LocationSelection/LocationSelection.vue +2 -2
  196. package/src/modules/backoffice/components/pages/Dashboard.vue +4 -25
  197. package/src/modules/backoffice/router/admin.js +0 -14
  198. package/src/modules/backoffice/router/backoffice.js +1 -1
  199. package/src/modules/events/components/pages/EditEvent.vue +10 -6
  200. package/src/modules/events/components/sections/HeroEvent.vue +12 -2
  201. package/src/modules/events/components/sections/SectionPreviousEvents.vue +1 -1
  202. package/src/modules/landing/components/sections/MobileApp.vue +2 -6
  203. package/src/modules/marketplace/components/sections/Filters.vue +7 -1
  204. package/src/modules/orders/components/blocks/StatusHistory.vue +91 -31
  205. package/src/modules/orders/components/pages/EditOrder.vue +4 -21
  206. package/src/modules/orders/components/pages/FormOrder.vue +53 -15
  207. package/src/modules/orders/components/pages/Order.vue +2 -2
  208. package/src/modules/orders/components/sections/FormClientDetails.vue +63 -0
  209. package/src/modules/orders/components/sections/FormDelivery.vue +72 -0
  210. package/src/modules/orders/components/sections/FormPayment.vue +27 -0
  211. package/src/modules/orders/controllers/orders.controller.js +63 -49
  212. package/src/modules/orders/models/order.model.js +9 -13
  213. package/src/modules/orders/routes/orders.routes.js +6 -20
  214. package/src/modules/orders/store/orders.js +24 -12
  215. package/src/modules/organizations/controllers/organizations.controller.js +28 -9
  216. package/src/modules/organizations/router/organizations.js +4 -1
  217. package/src/modules/organizations/router/organizations.router.js +18 -2
  218. package/src/modules/organizations/router/products.router.js +24 -4
  219. package/src/modules/products/components/blocks/CardCategory.vue +53 -0
  220. package/src/modules/products/components/pages/Categories.vue +90 -0
  221. package/src/modules/products/components/pages/CategoryEdit.vue +214 -0
  222. package/src/modules/products/components/pages/ProductEdit.vue +9 -1
  223. package/src/modules/products/components/sections/FilterProducts.vue +4 -1
  224. package/src/modules/products/controllers/categories.controller.js +30 -13
  225. package/src/modules/products/controllers/products.controller.js +3 -2
  226. package/src/modules/products/models/category.model.js +42 -32
  227. package/src/modules/products/products.client.js +4 -2
  228. package/src/modules/products/store/categories.js +17 -3
  229. package/src/modules/users/components/pages/Profile.vue +2 -2
  230. package/src/modules/backoffice/components/admin/Categories.vue +0 -53
  231. package/src/modules/backoffice/components/admin/CategoryEdit.vue +0 -98
  232. package/src/modules/orders/components/sections/FormOrderDetails.vue +0 -220
  233. package/src/modules/products/components/blocks/CategoryCard.vue +0 -42
  234. package/src/modules/products/router/products.router.js +0 -48
  235. /package/src/modules/{products → organizations}/components/pages/OrganizationCreate.vue +0 -0
  236. /package/src/modules/{products → organizations}/components/pages/OrganizationDetails.vue +0 -0
  237. /package/src/modules/{products → organizations}/components/pages/OrganizationDocuments.vue +0 -0
  238. /package/src/modules/{products → organizations}/components/pages/OrganizationPeople.vue +0 -0
@@ -1,130 +1,106 @@
1
- import { reactive as D, toRefs as S, ref as m, onMounted as T, computed as P, openBlock as o, createElementBlock as r, Fragment as C, createElementVNode as e, createTextVNode as i, toDisplayString as a, unref as n, createVNode as l, withCtx as N, createCommentVNode as d, renderList as U, createBlock as z } from "vue";
2
- import { useRoute as F } from "vue-router";
1
+ import { reactive as C, toRefs as D, ref as l, onMounted as S, computed as x, openBlock as e, createElementBlock as o, Fragment as w, createVNode as u, withCtx as N, createCommentVNode as s, renderList as T, createBlock as U, createElementVNode as i, createTextVNode as p, unref as n, toDisplayString as d } from "vue";
2
+ import { useRoute as z } from "vue-router";
3
3
  import E from "../../../../components/Block/Block.vue.js";
4
- import "../../../../components/Field/Field.vue2.js";
4
+ import "../../../../components/Field/Field.vue.js";
5
5
  import V from "../../../products/components/blocks/CardPosition.vue.js";
6
6
  import "../../../products/store/leftovers.js";
7
7
  import "../../../products/components/blocks/ListPositions.vue2.js";
8
- import I from "../sections/FormOrderDetails.vue.js";
9
- import { actions as _, state as u } from "../../store/orders.js";
10
- import { actions as L } from "../../../products/store/products.js";
8
+ import { actions as m, state as _ } from "../../store/orders.js";
9
+ import { actions as F } from "../../../products/store/products.js";
11
10
  import "./EditOrder.vue2.js";
12
- const M = /* @__PURE__ */ e("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
13
- /* @__PURE__ */ e("h2", { class: "mn-r-medium" }, "Edit Order")
14
- ], -1), j = { class: "gap-thin flex-nowrap flex mn-b-semi" }, q = { class: "w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium" }, G = { class: "mn-b-small p-big" }, H = /* @__PURE__ */ e("br", null, null, -1), J = /* @__PURE__ */ e("button", { class: "button" }, "Подтвердить заказ", -1), K = { class: "w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium" }, Q = { class: "mn-b-semi p-big" }, W = /* @__PURE__ */ e("br", null, null, -1), X = /* @__PURE__ */ e("button", { class: "button" }, "Изменить статус оплаты", -1), Y = {
11
+ const I = /* @__PURE__ */ i("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
12
+ /* @__PURE__ */ i("h2", { class: "mn-r-medium" }, "Edit Order")
13
+ ], -1), L = {
15
14
  key: 0,
16
15
  class: "w-100"
17
- }, Z = { class: "mn-thinw-100 flex-v-center flex block" }, ee = { class: "p-big" }, te = {
16
+ }, M = { class: "mn-thinw-100 flex-v-center flex block" }, j = { class: "p-big" }, q = {
18
17
  key: 0,
19
18
  class: "p-big t-semi"
20
- }, oe = {
19
+ }, G = {
21
20
  key: 1,
22
21
  class: "p-big t-semi"
23
- }, se = {
22
+ }, H = {
24
23
  key: 2,
25
24
  class: "p-big t-semi"
26
- }, re = { key: 3 }, ne = { key: 4 }, ie = { key: 5 }, de = /* @__PURE__ */ e("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ke = {
25
+ }, J = { key: 3 }, K = { key: 4 }, Q = { key: 5 }, W = /* @__PURE__ */ i("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ae = {
27
26
  __name: "EditOrder",
28
27
  props: ["showProduct"],
29
- setup($) {
30
- const A = F(), B = $;
31
- B.showProduct = [];
28
+ setup(A) {
29
+ const B = z(), O = A;
30
+ O.showProduct = [];
32
31
  function f(t) {
33
- _.addProduct(t);
32
+ m.addProduct(t);
34
33
  }
35
- function O(t) {
36
- _.deleteProduct(t);
34
+ function R(t) {
35
+ m.deleteProduct(t);
37
36
  }
38
- let R = D([]);
39
- S(R), m(!1);
40
- const p = m([]);
41
- let s = m({});
42
- T(async () => {
37
+ let $ = C([]);
38
+ D($), l(!1);
39
+ const a = l([]);
40
+ let r = l({});
41
+ S(async () => {
43
42
  try {
44
- const t = await L.read({
43
+ const t = await F.read({
45
44
  organization: "65141c476cf9860013b49f6d"
46
45
  });
47
- console.log(t), p.value = t;
46
+ console.log(t), a.value = t;
48
47
  } catch {
49
48
  console.error("error");
50
49
  }
51
- await _.fetchOrder(A.params.id), s.value = u.current;
50
+ await m.fetchOrder(B.params.id), r.value = _.current;
52
51
  });
53
- const c = P(() => 100);
54
- return P(() => []), (t, ae) => {
55
- var b, h, v, y, g, k, x;
56
- return o(), r(C, null, [
57
- M,
58
- e("section", j, [
59
- e("div", q, [
60
- e("p", G, [
61
- i(" Статус заказа:"),
62
- H,
63
- i(a(n(s).status), 1)
64
- ]),
65
- J
66
- ]),
67
- e("div", K, [
68
- e("p", Q, [
69
- i("Статус оплаты:"),
70
- W,
71
- i(a((b = n(s).payment) == null ? void 0 : b.status), 1)
72
- ]),
73
- X
74
- ])
75
- ]),
76
- l(E, {
52
+ const c = x(() => 100);
53
+ return x(() => []), (t, X) => {
54
+ var h, v, y, k, b, P;
55
+ return e(), o(w, null, [
56
+ I,
57
+ u(E, {
77
58
  title: "Add Position",
78
59
  class: "mn-b-semi"
79
60
  }, {
80
61
  default: N(() => [
81
- l(V, {
62
+ u(V, {
82
63
  onAdd: f,
83
- products: p.value
64
+ products: a.value
84
65
  }, null, 8, ["products"])
85
66
  ]),
86
67
  _: 1
87
68
  }),
88
- l(E, {
69
+ u(E, {
89
70
  title: "Invetory Sheet",
90
71
  class: "mn-b-semi"
91
72
  }, {
92
73
  default: N(() => [
93
- u.current.positions.length === 0 ? (o(), r("span", Y, " No positions added yet ")) : d("", !0),
94
- (o(!0), r(C, null, U(u.current.positions, (w, ce) => (o(), z(V, {
95
- key: w._id,
96
- product: w,
97
- products: p.value,
74
+ _.current.positions.length === 0 ? (e(), o("span", L, " No positions added yet ")) : s("", !0),
75
+ (e(!0), o(w, null, T(_.current.positions, (g, Y) => (e(), U(V, {
76
+ key: g._id,
77
+ product: g,
78
+ products: a.value,
98
79
  onAdd: f,
99
- onDelete: O,
80
+ onDelete: R,
100
81
  onUpdate: t.updateProduct
101
82
  }, null, 8, ["product", "products", "onUpdate"]))), 128))
102
83
  ]),
103
84
  _: 1
104
85
  }),
105
- l(I, {
106
- order: u.current,
107
- onCreate: t.handleCreate,
108
- class: "bg-grey pd-medium radius-big mn-b-semi"
109
- }, null, 8, ["order", "onCreate"]),
110
- e("div", Z, [
111
- e("p", ee, [
112
- i("Сумма к оплате: "),
113
- ((h = n(s).info) == null ? void 0 : h.delivery) === "Самовывоз" ? (o(), r("span", te, a(c.value / 100) + "", 1)) : d("", !0),
114
- ((v = n(s).info) == null ? void 0 : v.delivery) === "Курьером" ? (o(), r("span", oe, a(c.value / 100 + 350) + "", 1)) : d("", !0),
115
- ((y = n(s).info) == null ? void 0 : y.delivery) === "Почтой" ? (o(), r("span", se, a(c.value / 100 + 550) + " ", 1)) : d("", !0),
116
- i(" (Заказ " + a(c.value / 100) + " ₽ + доставка ", 1),
117
- ((g = n(s).info) == null ? void 0 : g.delivery) === "Самовывоз" ? (o(), r("span", re, "0")) : d("", !0),
118
- ((k = n(s).info) == null ? void 0 : k.delivery) === "Курьером" ? (o(), r("span", ne, "350")) : d("", !0),
119
- ((x = n(s).info) == null ? void 0 : x.delivery) === "Почтой" ? (o(), r("span", ie, "550")) : d("", !0),
120
- i(" ₽) ")
86
+ i("div", M, [
87
+ i("p", j, [
88
+ p("Сумма к оплате: "),
89
+ ((h = n(r).info) == null ? void 0 : h.delivery) === "Самовывоз" ? (e(), o("span", q, d(c.value / 100) + " ₽", 1)) : s("", !0),
90
+ ((v = n(r).info) == null ? void 0 : v.delivery) === "Курьером" ? (e(), o("span", G, d(c.value / 100 + 350) + "", 1)) : s("", !0),
91
+ ((y = n(r).info) == null ? void 0 : y.delivery) === "Почтой" ? (e(), o("span", H, d(c.value / 100 + 550) + " ₽", 1)) : s("", !0),
92
+ p(" (Заказ " + d(c.value / 100) + " ₽ + доставка ", 1),
93
+ ((k = n(r).info) == null ? void 0 : k.delivery) === "Самовывоз" ? (e(), o("span", J, "0")) : s("", !0),
94
+ ((b = n(r).info) == null ? void 0 : b.delivery) === "Курьером" ? (e(), o("span", K, "350")) : s("", !0),
95
+ ((P = n(r).info) == null ? void 0 : P.delivery) === "Почтой" ? (e(), o("span", Q, "550")) : s("", !0),
96
+ p(" ₽) ")
121
97
  ]),
122
- de
98
+ W
123
99
  ])
124
100
  ], 64);
125
101
  };
126
102
  }
127
103
  };
128
104
  export {
129
- ke as default
105
+ ae as default
130
106
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),l=require("../../store/orders.cjs");require("../blocks/CardOrder.vue.cjs");const c={class:"mn-b-medium flex-v-center flex-nowrap flex"},u=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),m={class:"cols-3 gap-thin"},p={class:"bg-grey pd-small radius-big"},_={class:"w-100 mn-b-thin p-big"},b=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),g={__name:"Orders",setup(h){const n=o.useRoute();o.useRouter();const r=e.ref(n.query.tab?n.query.tab:"posts");return e.onMounted(async()=>{await l.actions.read()}),(a,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",c,[u,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>a.$router.push({name:"AdminOrder"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(d.default,{selected:r.value,"onUpdate:selected":s[1]||(s[1]=t=>r.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.all,t=>(e.openBlock(),e.createElementBlock("div",p,[e.createTextVNode(" Status: "+e.toDisplayString(t.status)+" ",1),e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),b,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},[e.createTextVNode(" Order Created: "+e.toDisplayString(a.formatDate(t.createdAt))+" ",1),e.createVNode(i,{to:{name:"AdminOrderEdit",params:{order:t._id}},class:"i-small"},{default:e.withCtx(()=>[e.createTextVNode(" EDIT ")]),_:2},1032,["to"])],2)]))),256))])],64)}}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),l=require("../../store/orders.cjs");require("../blocks/CardOrder.vue.cjs");const c={class:"mn-b-medium flex-v-center flex-nowrap flex"},u=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),m={class:"cols-3 gap-thin"},p={class:"bg-grey pd-small radius-big"},_={class:"w-100 mn-b-thin p-big"},b=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),g={__name:"Orders",setup(h){const n=o.useRoute();o.useRouter();const r=e.ref(n.query.tab?n.query.tab:"posts");return e.onMounted(async()=>{await l.actions.read()}),(a,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",c,[u,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>a.$router.push({name:"AdminOrder"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(d.default,{selected:r.value,"onUpdate:selected":s[1]||(s[1]=t=>r.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.all,t=>(e.openBlock(),e.createElementBlock("div",p,[e.createTextVNode(" Status: "+e.toDisplayString(t.status)+" ",1),e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),b,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},[e.createTextVNode(" Order Created: "+e.toDisplayString(a.formatDate(t.createdAt))+" ",1),e.createVNode(i,{to:{name:"AdminOrderEdit",params:{order:t._id}},class:"i-small"},{default:e.withCtx(()=>[e.createTextVNode(" EDIT ")]),_:2},1032,["to"])],2)]))),256))])],64)}}};exports.default=g;
@@ -1,6 +1,6 @@
1
1
  import { ref as p, onMounted as _, resolveComponent as b, openBlock as n, createElementBlock as a, Fragment as d, createElementVNode as t, createVNode as u, renderList as f, createTextVNode as r, toDisplayString as o, normalizeClass as h, withCtx as g } from "vue";
2
2
  import { useRoute as v, useRouter as w } from "vue-router";
3
- import y from "../../../../components/Tab/Tab.vue.js";
3
+ import y from "../../../../components/Tab/Tab.vue2.js";
4
4
  import { actions as C, state as O } from "../../store/orders.js";
5
5
  import "../blocks/CardOrder.vue.js";
6
6
  const k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PURE__ */ t("h2", { class: "mn-r-medium" }, "Orders", -1), N = { class: "cols-3 gap-thin" }, A = { class: "bg-grey pd-small radius-big" }, E = { class: "w-100 mn-b-thin p-big" }, D = /* @__PURE__ */ t("p", { class: "mn-b-small t-transp w-100" }, null, -1), S = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("../../../globals/store/globals.cjs");require("../../store/orders.cjs");const a=require("../../../../components/Block/Block.vue.cjs"),o=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/FieldPhone/FieldPhone2.vue.cjs"),s=require("../../../../components/Select/Select.vue2.cjs"),m=require("../../../../components/Address/Address.vue2.cjs"),c=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),n=require("../../../../components/Radio/Radio.vue.cjs"),y={class:"order-form col"},f=t.createElementVNode("p",{class:"mn-b-small"}," Prefer to chat instead of calling? Just drop your messenger info here: ",-1),v={class:"flex-nowrap flex"},b={class:"mn-b-small flex-nowrap flex"},p={class:"mn-b-small flex-nowrap flex"},g={__name:"FormOrderDetails",props:{order:Object},setup(l){const i=l;return t.onMounted(()=>{r.state.position&&(i.order.delivery.address=r.state.position.address),r.state.position&&(i.order.delivery.location=r.state.position.location)}),(w,e)=>(t.openBlock(),t.createElementBlock("div",y,[t.createVNode(a.default,{title:"Personal Data",class:"mn-b-thin"},{default:t.withCtx(()=>[t.createVNode(o.default,{field:l.order.user.name,"onUpdate:field":e[0]||(e[0]=d=>l.order.user.name=d),label:"Name*",placeholder:"Enter your name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),t.createVNode(u.default,{modelValue:l.order.user.phone,"onUpdate:modelValue":e[1]||(e[1]=d=>l.order.user.phone=d),onCountry:e[2]||(e[2]=d=>{l.order.user.number=d}),inputOptions:{placeholder:"Enter contact phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["modelValue"]),f,t.createElementVNode("div",v,[t.createVNode(s.default,{options:[{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"},{name:"Line",value:"line"}],"onUpdate:select":e[3]||(e[3]=d=>l.order.user.messenger.type=d.value),placeholder:"Messenger",size:"small",class:"bg-white pd-medium radius-small mn-r-small"}),t.createVNode(o.default,{field:l.order.user.messenger.value,"onUpdate:field":e[4]||(e[4]=d=>l.order.user.messenger.value=d),placeholder:"Enter your contact here",class:"bg-white pd-medium radius-small w-100"},null,8,["field"])])]),_:1}),t.createVNode(a.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[t.createElementVNode("div",b,[t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[5]||(e[5]=d=>l.order.delivery.type=d),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[6]||(e[6]=d=>l.order.delivery.type=d),label:"Post",value:"Post",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),t.createVNode(m.default,{label:"Address",apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium","onUpdate:location":e[7]||(e[7]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[8]||(e[8]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(c.default,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":e[9]||(e[9]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[10]||(e[10]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(o.default,{field:l.order.comment,"onUpdate:field":e[11]||(e[11]=d=>l.order.comment=d),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1},8,["tooltip"]),t.createVNode(a.default,{title:"Payment"},{default:t.withCtx(()=>[t.createElementVNode("div",p,[t.createVNode(s.default,{select:l.order.payment.type,"onUpdate:select":e[12]||(e[12]=d=>l.order.payment.type=d),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1})]))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("../../../globals/store/globals.cjs");require("../../store/orders.cjs");const a=require("../../../../components/Block/Block.vue.cjs"),o=require("../../../../components/Field/Field.vue2.cjs"),u=require("../../../../components/FieldPhone/FieldPhone2.vue.cjs"),s=require("../../../../components/Select/Select.vue2.cjs"),m=require("../../../../components/Address/Address.vue2.cjs"),c=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),n=require("../../../../components/Radio/Radio.vue.cjs"),y={class:"order-form col"},f=t.createElementVNode("p",{class:"mn-b-small"}," Prefer to chat instead of calling? Just drop your messenger info here: ",-1),v={class:"flex-nowrap flex"},b={class:"mn-b-small flex-nowrap flex"},p={class:"mn-b-small flex-nowrap flex"},g={__name:"FormOrderDetails",props:{order:Object},setup(l){const i=l;return t.onMounted(()=>{r.state.position&&(i.order.delivery.address=r.state.position.address),r.state.position&&(i.order.delivery.location=r.state.position.location)}),(w,e)=>(t.openBlock(),t.createElementBlock("div",y,[t.createVNode(a.default,{title:"Personal Data",class:"mn-b-thin"},{default:t.withCtx(()=>[t.createVNode(o.default,{field:l.order.user.name,"onUpdate:field":e[0]||(e[0]=d=>l.order.user.name=d),label:"Name*",placeholder:"Enter your name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),t.createVNode(u.default,{modelValue:l.order.user.phone,"onUpdate:modelValue":e[1]||(e[1]=d=>l.order.user.phone=d),onCountry:e[2]||(e[2]=d=>{l.order.user.number=d}),inputOptions:{placeholder:"Enter contact phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["modelValue"]),f,t.createElementVNode("div",v,[t.createVNode(s.default,{options:[{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"},{name:"Line",value:"line"}],"onUpdate:select":e[3]||(e[3]=d=>l.order.user.messenger.type=d.value),placeholder:"Messenger",size:"small",class:"bg-white pd-medium radius-small mn-r-small"}),t.createVNode(o.default,{field:l.order.user.messenger.value,"onUpdate:field":e[4]||(e[4]=d=>l.order.user.messenger.value=d),placeholder:"Enter your contact here",class:"bg-white pd-medium radius-small w-100"},null,8,["field"])])]),_:1}),t.createVNode(a.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:t.withCtx(()=>[t.createElementVNode("div",b,[t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[5]||(e[5]=d=>l.order.delivery.type=d),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),t.createVNode(n.default,{radio:l.order.delivery.type,"onUpdate:radio":e[6]||(e[6]=d=>l.order.delivery.type=d),label:"Post",value:"Post",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),t.createVNode(m.default,{label:"Address",apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium","onUpdate:location":e[7]||(e[7]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[8]||(e[8]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(c.default,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:l.order.delivery.address,location:l.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":e[9]||(e[9]=d=>{l.order.delivery.location=d}),"onUpdate:address":e[10]||(e[10]=d=>{l.order.delivery.address=d})},null,8,["address","location"]),t.createVNode(o.default,{field:l.order.comment,"onUpdate:field":e[11]||(e[11]=d=>l.order.comment=d),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1},8,["tooltip"]),t.createVNode(a.default,{title:"Payment"},{default:t.withCtx(()=>[t.createElementVNode("div",p,[t.createVNode(s.default,{select:l.order.payment.type,"onUpdate:select":e[12]||(e[12]=d=>l.order.payment.type=d),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1})]))}};exports.default=g;
@@ -2,7 +2,7 @@ import { onMounted as y, openBlock as p, createElementBlock as f, createVNode as
2
2
  import { state as t } from "../../../globals/store/globals.js";
3
3
  import "../../store/orders.js";
4
4
  import i from "../../../../components/Block/Block.vue.js";
5
- import s from "../../../../components/Field/Field.vue.js";
5
+ import s from "../../../../components/Field/Field.vue2.js";
6
6
  import v from "../../../../components/FieldPhone/FieldPhone2.vue.js";
7
7
  import m from "../../../../components/Select/Select.vue2.js";
8
8
  import b from "../../../../components/Address/Address.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),n=l.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=c.reactive({all:[],current:{_id:"",organization:"",positions:[],status:null,comment:"",user:{_id:null,name:"",phone:null,messenger:{type:"",value:""}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),d={async create(e,t){try{r.current.positions=e,r.current.organization=t;const a=await n.post("/api/orders/create",r.current);return r.all.push(a.data),a.data}catch(a){s.setError(a)}},async fetchOrder(e){try{const t=await n.get(`/api/orders/${e}`);return r.current=t.data,console.log(t.data),t.data}catch(t){throw s.setError(t),err}},async read(e){try{const t=await n.get("/api/orders/read");return r.all=t.data,t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post(`/api/orders/${e._id}`,e),a=r.all.findIndex(o=>o._id===e._id);return a!==-1&&(r.all[a]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),r.all=r.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const a=await n.post(`/api/orders/payment/${e}`,{status:t}),o=r.all.findIndex(i=>i._id===e);o!==-1&&(r.all[o]=a.data)}catch(a){s.setError(a)}}};c.watch(r,(e,t)=>{});exports.actions=d;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),i=require("../../../../node_modules/axios/lib/axios.cjs"),n=require("../../globals/store/globals.cjs"),o=i.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=c.reactive({all:[],current:{_id:null,positions:[],status:null,comment:"",owner:{type:"organization",target:null},creator:{type:"client",target:null},client:{name:null,phone:null,messenger:{type:null,value:null}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),d={async create(e,t,a){try{let s={positions:e,owner:t,creator:a};const l=await o.post("/api/orders/create",s);return r.all.push(l.data),l.data}catch(s){n.setError(s)}},async fetchOrder(e){try{const t=await o.get(`/api/orders/${e}`);return r.current=t.data,console.log(t.data),t.data}catch(t){throw n.setError(t),err}},async read(e){try{const t=await o.get("/api/orders/read");return r.all=t.data,t.data}catch(t){throw n.setError(t),t}},async update(e){try{const t=await o.post(`/api/orders/${e._id}`,e),a=r.all.findIndex(s=>s._id===e._id);return a!==-1&&(r.all[a]=t.data),t.data}catch(t){n.setError(t)}},async delete(e){try{await o.delete(`/api/orders/${e}`),r.all=r.all.filter(t=>t._id!==e)}catch(t){n.setError(t)}},async changePaymentStatus(e,t){try{const a=await o.post(`/api/orders/payment/${e}`,{status:t}),s=r.all.findIndex(l=>l._id===e);s!==-1&&(r.all[s]=a.data)}catch(a){n.setError(a)}}};c.watch(r,(e,t)=>{});exports.actions=d;exports.state=r;
@@ -1,21 +1,27 @@
1
- import { reactive as i, watch as d } from "vue";
2
- import l from "../../../../node_modules/axios/lib/axios.js";
1
+ import { reactive as c, watch as i } from "vue";
2
+ import d from "../../../../node_modules/axios/lib/axios.js";
3
3
  import { setError as s } from "../../globals/store/globals.js";
4
- const n = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = i({
4
+ const o = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = c({
5
5
  all: [],
6
6
  current: {
7
- _id: "",
8
- organization: "",
7
+ _id: null,
9
8
  positions: [],
10
9
  status: null,
11
10
  comment: "",
12
- user: {
13
- _id: null,
14
- name: "",
11
+ owner: {
12
+ type: "organization",
13
+ target: null
14
+ },
15
+ creator: {
16
+ type: "client",
17
+ target: null
18
+ },
19
+ client: {
20
+ name: null,
15
21
  phone: null,
16
22
  messenger: {
17
- type: "",
18
- value: ""
23
+ type: null,
24
+ value: null
19
25
  }
20
26
  },
21
27
  payment: {
@@ -29,58 +35,62 @@ const n = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = i
29
35
  }
30
36
  }
31
37
  }), h = {
32
- async create(a, t) {
38
+ async create(e, t, r) {
33
39
  try {
34
- e.current.positions = a, e.current.organization = t;
35
- const r = await n.post("/api/orders/create", e.current);
36
- return e.all.push(r.data), r.data;
37
- } catch (r) {
38
- s(r);
40
+ let n = {
41
+ positions: e,
42
+ owner: t,
43
+ creator: r
44
+ };
45
+ const l = await o.post("/api/orders/create", n);
46
+ return a.all.push(l.data), l.data;
47
+ } catch (n) {
48
+ s(n);
39
49
  }
40
50
  },
41
- async fetchOrder(a) {
51
+ async fetchOrder(e) {
42
52
  try {
43
- const t = await n.get(`/api/orders/${a}`);
44
- return e.current = t.data, console.log(t.data), t.data;
53
+ const t = await o.get(`/api/orders/${e}`);
54
+ return a.current = t.data, console.log(t.data), t.data;
45
55
  } catch (t) {
46
56
  throw s(t), err;
47
57
  }
48
58
  },
49
- async read(a) {
59
+ async read(e) {
50
60
  try {
51
- const t = await n.get("/api/orders/read");
52
- return e.all = t.data, t.data;
61
+ const t = await o.get("/api/orders/read");
62
+ return a.all = t.data, t.data;
53
63
  } catch (t) {
54
64
  throw s(t), t;
55
65
  }
56
66
  },
57
- async update(a) {
67
+ async update(e) {
58
68
  try {
59
- const t = await n.post(`/api/orders/${a._id}`, a), r = e.all.findIndex((o) => o._id === a._id);
60
- return r !== -1 && (e.all[r] = t.data), t.data;
69
+ const t = await o.post(`/api/orders/${e._id}`, e), r = a.all.findIndex((n) => n._id === e._id);
70
+ return r !== -1 && (a.all[r] = t.data), t.data;
61
71
  } catch (t) {
62
72
  s(t);
63
73
  }
64
74
  },
65
- async delete(a) {
75
+ async delete(e) {
66
76
  try {
67
- await n.delete(`/api/orders/${a}`), e.all = e.all.filter((t) => t._id !== a);
77
+ await o.delete(`/api/orders/${e}`), a.all = a.all.filter((t) => t._id !== e);
68
78
  } catch (t) {
69
79
  s(t);
70
80
  }
71
81
  },
72
- async changePaymentStatus(a, t) {
82
+ async changePaymentStatus(e, t) {
73
83
  try {
74
- const r = await n.post(`/api/orders/payment/${a}`, { status: t }), o = e.all.findIndex((c) => c._id === a);
75
- o !== -1 && (e.all[o] = r.data);
84
+ const r = await o.post(`/api/orders/payment/${e}`, { status: t }), n = a.all.findIndex((l) => l._id === e);
85
+ n !== -1 && (a.all[n] = r.data);
76
86
  } catch (r) {
77
87
  s(r);
78
88
  }
79
89
  }
80
90
  };
81
- d(e, (a, t) => {
91
+ i(a, (e, t) => {
82
92
  });
83
93
  export {
84
94
  h as actions,
85
- e as state
95
+ a as state
86
96
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const v=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),h=require("../../../../components/Feed/Feed.vue.cjs"),k=require("./User.vue.cjs"),g=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const y=o=>(e.pushScopeId("data-v-7a0830c1"),o=o(),e.popScopeId(),o),_={class:"br-grey radius-small mn-small"},V=y(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Add to deparment",-1)),B={class:"bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big"},N=["disabled"],q={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(o,{emit:m}){const l=o,i=m,s=e.ref(null),n=e.ref(null);l.member!==null&&(s.value=l.members[l.member]),e.ref(null);async function d(){l.member!==null?(l.members[l.member]=s,l.members[l.member].role=n.value,i("callback")):(l.members.push({...s.value,role:n.value}),i("callback"))}async function c(){l.members.splice(l.member,1),i("callback")}return(u,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",_,[V,e.createElementVNode("div",B,[e.createVNode(h.default,{states:{empty:{title:"No Members Found",description:"Currently, there are no members available."}},store:{read:r=>g.actions.read(r),state:null},options:{target:u.$route.params._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,p)=>(e.openBlock(),e.createBlock(k.default,{key:p,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,user:t,position:t.position,onClick:a[0]||(a[0]=S=>u.$router.push(`/app/profile/${u.user._id}`)),class:"mn-b-thin"},null,8,["photo","name","user","position"]))),128))]),_:1},8,["states","store","options"])]),l.member===null?(e.openBlock(),e.createBlock(b.default,{key:0,modelValue:s.value,"onUpdate:modelValue":a[1]||(a[1]=r=>s.value=r),options:o.users,multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),e.createVNode(f.default,{field:n.value,"onUpdate:field":a[2]||(a[2]=r=>n.value=r),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:u.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!s.value||!n.value,onClick:d,class:"w-100 button bg-blue t-white"},e.toDisplayString(l.member!==null?"Редактировать участника":"Добавить участника"),9,N),l.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:c,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},M=v.default(q,[["__scopeId","data-v-7a0830c1"]]);exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const v=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),h=require("../../../../components/Feed/Feed.vue.cjs"),k=require("./User.vue.cjs"),g=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const y=o=>(e.pushScopeId("data-v-7a0830c1"),o=o(),e.popScopeId(),o),_={class:"br-grey radius-small mn-small"},V=y(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Add to deparment",-1)),B={class:"bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big"},N=["disabled"],q={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(o,{emit:m}){const l=o,i=m,s=e.ref(null),n=e.ref(null);l.member!==null&&(s.value=l.members[l.member]),e.ref(null);async function d(){l.member!==null?(l.members[l.member]=s,l.members[l.member].role=n.value,i("callback")):(l.members.push({...s.value,role:n.value}),i("callback"))}async function c(){l.members.splice(l.member,1),i("callback")}return(u,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",_,[V,e.createElementVNode("div",B,[e.createVNode(h.default,{states:{empty:{title:"No Members Found",description:"Currently, there are no members available."}},store:{read:r=>g.actions.read(r),state:null},options:{target:u.$route.params._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,p)=>(e.openBlock(),e.createBlock(k.default,{key:p,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,user:t,position:t.position,onClick:a[0]||(a[0]=S=>u.$router.push(`/app/profile/${u.user._id}`)),class:"mn-b-thin"},null,8,["photo","name","user","position"]))),128))]),_:1},8,["states","store","options"])]),l.member===null?(e.openBlock(),e.createBlock(b.default,{key:0,modelValue:s.value,"onUpdate:modelValue":a[1]||(a[1]=r=>s.value=r),options:o.users,multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),e.createVNode(f.default,{field:n.value,"onUpdate:field":a[2]||(a[2]=r=>n.value=r),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:u.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!s.value||!n.value,onClick:d,class:"w-100 button bg-blue t-white"},e.toDisplayString(l.member!==null?"Редактировать участника":"Добавить участника"),9,N),l.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:c,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},M=v.default(q,[["__scopeId","data-v-7a0830c1"]]);exports.default=M;
@@ -1,7 +1,7 @@
1
1
  import { ref as p, openBlock as m, createElementBlock as d, createElementVNode as i, createVNode as b, withCtx as k, Fragment as _, renderList as w, createBlock as c, createCommentVNode as f, toDisplayString as C, pushScopeId as I, popScopeId as M } from "vue";
2
2
  import N from "../../../../components/SelectMulti/SelectMulti.vue.js";
3
- import S from "../../../../components/Field/Field.vue.js";
4
- import "../../../../components/Select/Select.vue.js";
3
+ import S from "../../../../components/Field/Field.vue2.js";
4
+ import "../../../../components/Select/Select.vue2.js";
5
5
  import V from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  import $ from "../../../../components/Feed/Feed.vue.js";
7
7
  import B from "./User.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as m, createBlock as l, withCtx as g, createTextVNode as h, toDisplayString as y } from "vue";
2
- import b from "../../../../components/Button/Button.vue.js";
2
+ import b from "../../../../components/Button/Button.vue2.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as i } from "../../store/memberships.js";
5
5
  const M = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const N=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const S=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const V=require("../../../../components/Button/Button.vue.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),w=require("../../../../components/Block/Block.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");const O=require("../blocks/DepartmentSub.vue.cjs"),y=require("../blocks/DepartmentMemberModify.vue.cjs"),M=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),f=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const n=i=>(e.pushScopeId("data-v-7ec9277b"),i=i(),e.popScopeId(),i),T={class:"for-transition pd-thin w-100"},I={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},U={key:0,class:"mn-r-auto"},z={key:1,class:"mn-r-auto"},F={class:"flex-nowrap flex pd-thin"},R={class:"cols-2-fit-content"},$={class:"w-100 flex-child-grow-1 flex-child"},A={class:"cols-2 gap-thin"},H={class:"bg-grey pd-medium o-hidden radius-big"},L=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1)),j=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1)),G={class:"cols-1 gap-thin"},J=n(()=>e.createElementVNode("h4",null,"Products",-1)),K={class:"bg-grey pd-medium o-hidden radius-big"},Q=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1)),W=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1)),X={class:"cols-1 gap-thin"},Y=n(()=>e.createElementVNode("h4",null,"Products",-1)),Z=n(()=>e.createElementVNode("h4",null,"Orders",-1)),ee={key:1,class:"flex-nowrap flex pd-thin"},te={id:"dash",class:"pd-medium bg-white"},ae={class:"mn-b-regular flex-v-center flex-nowrap flex"},le=n(()=>e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1)),re={class:"mn-b-small"},se={key:0},ne={__name:"DepartmentEdit",setup(i){const E=g.useRouter(),l=g.useRoute();async function D(){l.params.department&&await f.actions.read({target:l.params._id}),e.ref(f.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}D();const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}const p=e.ref(!1),u=e.ref(null);function _(r){p.value=!0,typeof r=="number"&&(u.value=r)}function v(){p.value=!1,u.value=null}async function q(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function B(){E.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function x(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("header",I,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",U,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",z,"Create Department")),e.createElementVNode("section",F,[e.createVNode(V.default,{submit:q,callback:B,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(w.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",$,[e.createVNode(N.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(N.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(w.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>h()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,d)=>(e.openBlock(),e.createBlock(M.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:d,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:C=>h(d)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(k.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(y.default,{members:t.state.department.members,member:c.value,users:f.state.memberships,onCallback:b},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",A,[e.createElementVNode("div",H,[L,j,e.createElementVNode("div",G,[J,e.createVNode(o.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",K,[Q,W,e.createElementVNode("div",X,[Y,e.createVNode(o.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),Z,e.createVNode(o.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",ee,[e.createVNode(V.default,{submit:x,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",te,[e.createVNode(k.default,{title:"Добавить подотдел",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createVNode(y.default,{departments:t.state.department.subdepartments,department:u.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:v},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",ae,[le,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>_())},"+")])]),e.createElementVNode("ul",re,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",se,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,d)=>(e.openBlock(),e.createBlock(O.default,{key:d,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:C=>_(d)},null,8,["department","onClick"]))),128))])])]))}},oe=S.default(ne,[["__scopeId","data-v-7ec9277b"]]);exports.default=oe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const N=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const S=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const V=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),w=require("../../../../components/Block/Block.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");const O=require("../blocks/DepartmentSub.vue.cjs"),y=require("../blocks/DepartmentMemberModify.vue.cjs"),M=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),f=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const n=i=>(e.pushScopeId("data-v-7ec9277b"),i=i(),e.popScopeId(),i),T={class:"for-transition pd-thin w-100"},I={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},U={key:0,class:"mn-r-auto"},z={key:1,class:"mn-r-auto"},F={class:"flex-nowrap flex pd-thin"},R={class:"cols-2-fit-content"},$={class:"w-100 flex-child-grow-1 flex-child"},A={class:"cols-2 gap-thin"},H={class:"bg-grey pd-medium o-hidden radius-big"},L=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1)),j=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1)),G={class:"cols-1 gap-thin"},J=n(()=>e.createElementVNode("h4",null,"Products",-1)),K={class:"bg-grey pd-medium o-hidden radius-big"},Q=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1)),W=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1)),X={class:"cols-1 gap-thin"},Y=n(()=>e.createElementVNode("h4",null,"Products",-1)),Z=n(()=>e.createElementVNode("h4",null,"Orders",-1)),ee={key:1,class:"flex-nowrap flex pd-thin"},te={id:"dash",class:"pd-medium bg-white"},ae={class:"mn-b-regular flex-v-center flex-nowrap flex"},le=n(()=>e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1)),re={class:"mn-b-small"},se={key:0},ne={__name:"DepartmentEdit",setup(i){const E=g.useRouter(),l=g.useRoute();async function D(){l.params.department&&await f.actions.read({target:l.params._id}),e.ref(f.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}D();const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}const p=e.ref(!1),u=e.ref(null);function _(r){p.value=!0,typeof r=="number"&&(u.value=r)}function v(){p.value=!1,u.value=null}async function q(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function B(){E.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function x(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("header",I,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",U,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",z,"Create Department")),e.createElementVNode("section",F,[e.createVNode(V.default,{submit:q,callback:B,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(w.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",$,[e.createVNode(N.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(N.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(w.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>h()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,d)=>(e.openBlock(),e.createBlock(M.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:d,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:C=>h(d)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(k.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(y.default,{members:t.state.department.members,member:c.value,users:f.state.memberships,onCallback:b},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",A,[e.createElementVNode("div",H,[L,j,e.createElementVNode("div",G,[J,e.createVNode(o.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",K,[Q,W,e.createElementVNode("div",X,[Y,e.createVNode(o.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),Z,e.createVNode(o.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",ee,[e.createVNode(V.default,{submit:x,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",te,[e.createVNode(k.default,{title:"Добавить подотдел",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createVNode(y.default,{departments:t.state.department.subdepartments,department:u.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:v},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",ae,[le,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>_())},"+")])]),e.createElementVNode("ul",re,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",se,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,d)=>(e.openBlock(),e.createBlock(O.default,{key:d,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:C=>_(d)},null,8,["department","onClick"]))),128))])])]))}},oe=S.default(ne,[["__scopeId","data-v-7ec9277b"]]);exports.default=oe;
@@ -5,16 +5,16 @@ import "vue-i18n";
5
5
  import "../../../globals/localization/vue-i18n.js";
6
6
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
7
  import G from "../../../../components/UploadImage/UploadImage.vue.js";
8
- import "../../../../components/Tab/Tab.vue2.js";
9
- import O from "../../../../components/Field/Field.vue.js";
10
- import "../../../../components/Select/Select.vue.js";
8
+ import "../../../../components/Tab/Tab.vue.js";
9
+ import O from "../../../../components/Field/Field.vue2.js";
10
+ import "../../../../components/Select/Select.vue2.js";
11
11
  import J from "../../../../../../_virtual/_plugin-vue_export-helper.js";
12
12
  import d from "../../../../components/Checkbox/Checkbox.vue.js";
13
13
  import "../../../../components/Address/Address.vue.js";
14
14
  import "../../../../components/Loader/Loader.vue.js";
15
15
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
16
- import E from "../../../../components/Button/Button.vue.js";
17
- import M from "../../../../components/Popup/Popup.vue2.js";
16
+ import E from "../../../../components/Button/Button.vue2.js";
17
+ import M from "../../../../components/Popup/Popup.vue.js";
18
18
  import z from "../../../../components/Block/Block.vue.js";
19
19
  import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
20
20
  import "../blocks/EditArray.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
@@ -2,10 +2,10 @@ import { ref as p, onMounted as $, computed as k, openBlock as a, createBlock as
2
2
  import { useRoute as M, useRouter as I } from "vue-router";
3
3
  import "../../../../components/Loader/Loader.vue.js";
4
4
  import "vue-i18n";
5
- import S from "../../../../components/Tab/Tab.vue.js";
5
+ import S from "../../../../components/Tab/Tab.vue2.js";
6
6
  import "../../../../components/Tooltip/Tooltip.vue2.js";
7
7
  import z from "../sections/MembersAdd.vue.js";
8
- import "../../../mobile/components/Menu/Menu.vue.js";
8
+ import "../../../mobile/components/Menu/Menu.vue2.js";
9
9
  import "../../../mobile/components/Menu/MenuItem.vue.js";
10
10
  import B from "../blocks/User.vue.js";
11
11
  import { state as E } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;