@ozdao/prometheus-framework 0.2.51 → 0.2.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. package/dist/main-482dc398.mjs +13626 -0
  2. package/dist/main-b2JI9sFg.js +91 -0
  3. package/dist/main-c56d4c09.js +91 -0
  4. package/dist/main-x-9D8zvb.mjs +13604 -0
  5. package/dist/main.css +1 -1
  6. package/dist/organizations.server.js +2 -2
  7. package/dist/organizations.server.mjs +2 -2
  8. package/dist/products.server.js +20 -7
  9. package/dist/products.server.mjs +20 -7
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.js +223 -2
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
  14. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +19 -19
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
  20. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  22. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
  24. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
  26. package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
  28. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  30. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  32. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  56. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
  63. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
  64. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
  68. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
  69. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
  70. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  74. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
  84. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -48
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +134 -129
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +117 -146
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +44 -44
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +64 -51
  125. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +22 -23
  133. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
  137. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  139. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  143. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  147. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
  151. package/dist/prometheus-framework.cjs.js +1 -1
  152. package/dist/prometheus-framework.es.js +1 -1
  153. package/dist/style.css +1 -1
  154. package/dist/web-6dcbb74b.mjs +55 -0
  155. package/dist/web-caJAdsxy.js +1 -0
  156. package/dist/web-ee302c1d.js +1 -0
  157. package/dist/web-i08OVMw9.mjs +55 -0
  158. package/package.json +1 -1
  159. package/src/components/Button/Button.vue +3 -3
  160. package/src/components/Feed/Feed.vue +2 -1
  161. package/src/components/LocationMarker/LocationMarker.vue +1 -0
  162. package/src/modules/applications/applications.client.js +0 -1
  163. package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
  164. package/src/modules/icons/entities/IconProfile.vue +10 -1
  165. package/src/modules/icons/entities/IconShopcart.vue +12 -2
  166. package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
  167. package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +27 -7
  168. package/src/modules/orders/components/partials/ShopCart.vue +4 -1
  169. package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
  170. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
  171. package/src/modules/organizations/components/blocks/User.vue +18 -9
  172. package/src/modules/organizations/components/pages/Department.vue +19 -3
  173. package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
  174. package/src/modules/organizations/components/pages/Organization.vue +38 -71
  175. package/src/modules/organizations/components/sections/Feed.vue +1 -1
  176. package/src/modules/organizations/controllers/memberships.controller.js +2 -2
  177. package/src/modules/organizations/controllers/organizations.controller.js +0 -1
  178. package/src/modules/products/components/pages/EditLeftover.vue +6 -4
  179. package/src/modules/products/components/pages/Products.vue +58 -38
  180. package/src/modules/products/components/sections/FilterProducts.vue +5 -5
  181. package/src/modules/products/controllers/leftovers.controller.js +12 -5
  182. package/src/modules/products/controllers/products.controller.js +18 -0
  183. package/src/modules/products/store/products.js +4 -0
@@ -3,17 +3,26 @@
3
3
  class="pos-sticky w-100 z-index-4 br-b br-solid br-black-transp flex-center flex t-center pd-medium bg-white"
4
4
  >
5
5
 
6
+ <Button
7
+ v-if="route.meta.title_hide"
8
+ :submit="a => store.shopcart.actions.toggleShopcart()"
9
+ :counter="store.shopcart.getters.cartTotalAmount"
10
+ :showSucces="false"
11
+ :showLoader="false"
12
+ class="header-shopcart pd-zero mn-l-auto"
13
+ >
14
+ <IconShopcart class="i-semi" fill="#00ff88" />
15
+ </Button>
16
+
17
+
6
18
  <transition name="slideIn" mode="out-in">
7
19
 
8
- <svg
20
+ <IconProfile
9
21
  v-if="route.meta.title_hide"
10
22
  @click="handleToggle()"
11
- class="header-profile" width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path fill="rgb(var(--main))" d="M13.0005 1.3116e-05C10.3952 -0.0036893 7.84916 0.776533 5.6933 2.23923C3.53744 3.70193 1.87154 5.77943 0.912205 8.20159C-0.0471263 10.6238 -0.255503 13.2785 0.31417 15.8207C0.883843 18.3629 2.20521 20.6749 4.10645 22.456C4.16716 22.5296 4.23824 22.5939 4.31745 22.647C6.69461 24.8048 9.79003 26.0001 13.0005 26.0001C16.2109 26.0001 19.3063 24.8048 21.6835 22.647C21.7624 22.5939 21.8331 22.5295 21.8935 22.456C23.7946 20.6749 25.116 18.363 25.6857 15.821C26.2554 13.2789 26.0471 10.6242 25.0879 8.20206C24.1287 5.77994 22.4629 3.70243 20.3072 2.23965C18.1515 0.77688 15.6056 -0.0034882 13.0005 1.3116e-05ZM5.96345 21.445C6.30727 20.174 7.05858 19.0509 8.10211 18.248C9.14565 17.445 10.4238 17.0066 11.7405 17H14.2605C15.5774 17.006 16.856 17.444 17.8999 18.2468C18.9439 19.0496 19.6955 20.1728 20.0395 21.444C18.0658 23.095 15.5746 23.9996 13.0015 23.9996C10.4283 23.9996 7.93709 23.096 5.96345 21.445ZM21.6005 19.837C20.9791 18.4049 19.9541 17.1848 18.6506 16.3258C17.3471 15.4668 15.8215 15.0061 14.2605 15H11.7405C10.1789 15.0059 8.65303 15.4669 7.34941 16.3265C6.04579 17.1861 5.02101 18.4071 4.40045 19.84C3.10942 18.2212 2.30151 16.2708 2.06964 14.2132C1.83777 12.1556 2.19136 10.0744 3.08975 8.20883C3.98813 6.34326 5.39482 4.76915 7.14805 3.66751C8.90128 2.56587 10.9298 1.98144 13.0005 1.98144C15.0711 1.98144 17.0996 2.56587 18.8529 3.66751C20.6061 4.76915 22.0128 6.34326 22.9112 8.20883C23.8095 10.0744 24.1631 12.1556 23.9313 14.2132C23.6994 16.2708 22.8915 18.2212 21.6005 19.84V19.837Z"/>
14
- <path fill="rgb(var(--main))" d="M13.0005 4C12.0116 4 11.0449 4.29324 10.2226 4.84265C9.40039 5.39206 8.75953 6.17295 8.38109 7.08658C8.00265 8.00021 7.90364 9.00555 8.09656 9.97545C8.28949 10.9454 8.76569 11.8363 9.46496 12.5355C10.1642 13.2348 11.0551 13.711 12.025 13.9039C12.9949 14.0969 14.0003 13.9978 14.9139 13.6194C15.8275 13.241 16.6084 12.6001 17.1578 11.7779C17.7072 10.9556 18.0005 9.98891 18.0005 9C17.9989 7.67441 17.4716 6.40356 16.5343 5.46622C15.5969 4.52888 14.3261 4.00159 13.0005 4ZM13.0005 12C12.4071 12 11.8271 11.8241 11.3338 11.4944C10.8404 11.1648 10.4559 10.6962 10.2289 10.1481C10.0018 9.59987 9.94238 8.99667 10.0581 8.41473C10.1739 7.83279 10.4596 7.29824 10.8792 6.87868C11.2987 6.45912 11.8333 6.1734 12.4152 6.05764C12.9972 5.94189 13.6004 6.0013 14.1485 6.22836C14.6967 6.45542 15.1653 6.83994 15.4949 7.33329C15.8245 7.82664 16.0005 8.40666 16.0005 9C16.0005 9.79565 15.6844 10.5587 15.1218 11.1213C14.5592 11.6839 13.7961 12 13.0005 12Z"/>
15
- </svg>
16
-
23
+ class="header-profile i-semi"
24
+ fill="#00ff88"
25
+ />
17
26
 
18
27
  <svg
19
28
  v-else
@@ -47,6 +56,11 @@
47
56
  import { useI18n } from 'vue-i18n';
48
57
  import { useStore } from '@/store';
49
58
 
59
+ import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'
60
+ import IconProfile from '@pf/src/modules/icons/entities/IconProfile.vue'
61
+
62
+ import Button from '@pf/src/components/Button/Button.vue'
63
+
50
64
 
51
65
  const router = useRouter()
52
66
  const route = useRoute()
@@ -100,6 +114,12 @@
100
114
  height: 2rem;
101
115
  }
102
116
 
117
+ .header-shopcart {
118
+ position: absolute;
119
+ right: 4.25rem;
120
+ height: 2rem;
121
+ }
122
+
103
123
  .header-title {
104
124
  pointer-events: none;
105
125
  }
@@ -8,7 +8,7 @@
8
8
  <h4 class="mn-b-thin p-big">{{t('title')}}</h4>
9
9
  <p class="t-transp p-small">{{t('subtitle')}} {{ t('positions', { count: StoreCartAmount }) }}</p>
10
10
  </div>
11
- <button @click="shopcart.actions.toggleShopcart" class="button-icon"><img src="@/assets/icons/cross.svg"></button>
11
+ <IconCross @click="shopcart.actions.toggleShopcart" class="button-icon"/>
12
12
  </div>
13
13
  <!-- ---------------------------------------------------------------- -->
14
14
  <!-- 02. Popup Content -->
@@ -57,6 +57,9 @@
57
57
  // Components
58
58
  import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';
59
59
 
60
+ import IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';
61
+
62
+
60
63
  import * as shopcart from '@pf/src/modules/orders/store/shopcart';
61
64
  /////////////////////////////
62
65
  // CREATED
@@ -1,77 +1,45 @@
1
1
  <template>
2
2
  <div class="radius-big o-hidden cols-2-1_3">
3
- <!-- <Map :location="{lat: department.location.coordinates[1] ,lng: department.location.coordinates[0]}" class=""/> -->
4
3
 
5
4
  <div class="pd-medium w-100">
6
- <svg @click="$router.push(`/organizations/${props.organization}/departments/${department._id}/edit`)" class="i-regular pos-absolute pos-r-0 pos-t-0 t-transp" width="652" height="652" viewBox="0 0 652 652" fill="none" xmlns="http://www.w3.org/2000/svg">
7
- <path d="M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z" fill="rgb(var(--black))"/>
8
- </svg>
9
-
5
+
6
+ <router-link
7
+ :to="{
8
+ name: 'Department Edit',
9
+ params: {
10
+ _id: props.organization,
11
+ department: department._id
12
+ }
13
+ }"
14
+ class="
15
+ cursor-pointer
16
+ pos-absolute pos-t-regular pos-r-regular
17
+ radius-extra pd-thin bg-second
18
+ "
19
+ >
20
+ <IconEdit
21
+ class="i-regular"
22
+ classes="fill-white"
23
+ />
24
+ </router-link>
25
+
10
26
  <h3
11
27
  @click="$router.push(`/organizations/${props.organization}/departments/${department._id}`)"
12
28
  class="mn-b-small w-100"
13
29
  v-html="department.profile.name"
14
30
  />
15
31
 
16
- <Spoiler
17
- class="
18
- radius-small
19
- o-hidden
20
- br-1px br-solid br-grey
21
- mn-b-thin
22
- "
23
- >
24
- <template #header>
25
- <div class="pd-small flex-v-center flex-nowrap flex">
26
- <h5 class="w-100" >Contacts </h5>
27
- <p class="mn-r-small">{{department.members.length}}&nbsp;человек</p>
28
- <svg width="14" height="9" viewBox="0 0 14 9" fill="none" xmlns="http://www.w3.org/2000/svg">
29
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z" fill="#8A8A8A"/>
30
- </svg>
31
-
32
- </div>
33
- </template>
34
- <template #content>
35
- <ul>
36
- <li v-if="department.members.length < 1">В отделе еще нет участников</li>
37
- <User
38
- class="br-b br-solid br-grey"
39
- v-for="(member, index) in department.members"
40
- :key="index"
41
- :user="member.user"
42
- :position="member.position"
43
- @click="$router.push(`/app/profile/${member.user._id}`)"
44
- />
45
- </ul>
46
- </template>
47
- </Spoiler>
48
-
49
- <Spoiler
50
- class="
51
- radius-small
52
- o-hidden
53
- br-1px br-solid br-grey
54
- mn-b-thin
55
- "
56
- >
57
- <template #header>
58
- <div class="pd-small flex-v-center flex-nowrap flex">
59
- <h5 class="w-100" >Working Hours </h5>
60
- <p class="mn-r-small">{{department.subdepartments ? department.subdepartments.length : 0}}&nbsp;отделов</p>
61
- <svg width="14" height="9" viewBox="0 0 14 9" fill="none" xmlns="http://www.w3.org/2000/svg">
62
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z" fill="#8A8A8A"/>
63
- </svg>
64
-
65
- </div>
66
- </template>
67
- <template #content>
68
- <ul>
69
- <li v-if="department.subdepartments.length < 1">В отделе еще нет подотделов</li>
70
- <DepartmentSub v-for="(subdepartmentsartment, index) in department.subdepartments" @click="$router.push(`/organization/departments/${subdepartmentsartment._id}`)" :key="index" class="br-b br-solid br-grey" :department="subdepartmentsartment" />
71
- </ul>
72
- </template>
73
- </Spoiler>
74
-
32
+ <ul>
33
+ <li v-if="department.members.length < 1">В отделе еще нет участников</li>
34
+ <User
35
+ class="br-b br-solid br-grey"
36
+ v-for="(member, index) in department.members"
37
+ :key="index"
38
+ :user="member.user"
39
+ :position="member.position"
40
+ @click="$router.push(`/app/profile/${member.user._id}`)"
41
+ />
42
+ </ul>
75
43
  </div>
76
44
  </div>
77
45
  </template>
@@ -79,9 +47,9 @@
79
47
  <script setup>
80
48
  import { ref } from 'vue';
81
49
 
82
- import Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';
83
- import Map from '@pf/src/components/Map/Map.vue';
50
+ import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
84
51
 
52
+ import Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';
85
53
  import DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';
86
54
  import User from '@pf/src/modules/organizations/components/blocks/User.vue';
87
55
 
@@ -2,10 +2,43 @@
2
2
  <div>
3
3
 
4
4
  <div class="br-grey radius-small mn-small">
5
- {{memberForm.id}}
5
+ <h3 class="mn-b-semi">Add to deparment</h3>
6
+
7
+ <div class="bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big">
8
+ <Feed
9
+ :states="{
10
+ empty: {
11
+ title: 'No Members Found',
12
+ description: 'Currently, there are no members available.'
13
+ }
14
+ }"
15
+ :store="{
16
+ read: (options) => memberships.actions.read(options),
17
+ state: null
18
+ }"
19
+ :options="{
20
+ target: $route.params._id
21
+ }"
22
+ v-slot="{
23
+ items
24
+ }"
25
+ >
26
+ <User
27
+ v-for="(item, index) in items"
28
+ :key="index"
29
+ :photo="item.user.profile.photo"
30
+ :name="item.user.profile.name || item.user.phone || item.user.email || item.user._id"
31
+ :user="item"
32
+ :position="item.position"
33
+ @click="$router.push(`/app/profile/${user._id}`)"
34
+ class="mn-b-thin"
35
+ />
36
+ </Feed>
37
+ </div>
38
+
6
39
  <SelectMulti
7
40
  v-if="props.member === null"
8
- v-model="memberForm.user"
41
+ v-model="userInput"
9
42
  :options="users"
10
43
  :multiple="false"
11
44
  :taggable="false"
@@ -13,11 +46,11 @@
13
46
  class="mn-b-semi bg-grey pd-medium radius-small"
14
47
  />
15
48
 
16
- <div v-else class="pd-small br-grey br-1px br-solid">
49
+ <!-- <div v-else class="pd-small br-grey br-1px br-solid">
17
50
  {{ memberForm.user.name ? memberForm.user.name : 'Безымянный' }}, {{memberForm.user.id}}
18
- </div>
51
+ </div> -->
19
52
  <Field
20
- v-model:field="memberForm.position"
53
+ v-model:field="roleInput"
21
54
  label="Должность"
22
55
  placeholder="Название должности"
23
56
  class="bg-white "
@@ -25,7 +58,7 @@
25
58
  />
26
59
  </div>
27
60
 
28
- <button :disabled="!memberForm.user._id || !memberForm.position" @click="submitForm" class="w-100 button bg-blue t-white">
61
+ <button :disabled="!userInput || !roleInput" @click="submitForm" class="w-100 button bg-blue t-white">
29
62
  {{ props.member !== null ? "Редактировать участника" : "Добавить участника" }}
30
63
  </button>
31
64
 
@@ -42,6 +75,11 @@ import SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue'
42
75
  import Field from "@pf/src/components/Field/Field.vue";
43
76
  import Select from "@pf/src/components/Select/Select.vue";
44
77
 
78
+ import Feed from '@pf/src/components/Feed/Feed.vue'
79
+ import User from '@pf/src/modules/organizations/components/blocks/User.vue';
80
+
81
+ import * as memberships from '@pf/src/modules/organizations/store/memberships'
82
+
45
83
  const props = defineProps({
46
84
  isPopupOpen: Boolean,
47
85
  member: Number,
@@ -51,13 +89,11 @@ const props = defineProps({
51
89
 
52
90
  const emits = defineEmits(['callback','remove'])
53
91
 
54
- const memberForm = ref({
55
- user: "",
56
- position: "",
57
- });
92
+ const userInput = ref(null);
93
+ const roleInput = ref(null);
58
94
 
59
95
  if (props.member !== null) {
60
- memberForm.value = props.members[props.member]
96
+ userInput.value = props.members[props.member]
61
97
  }
62
98
 
63
99
  import * as inputsValidation from '@pf/src/modules/middlewares/client/inputs.validation'
@@ -66,10 +102,11 @@ const placeValidation = ref(null)
66
102
 
67
103
  async function submitForm() {
68
104
  if (props.member !== null) {
69
- props.members[props.member] = memberForm.value
105
+ props.members[props.member] = userInput
106
+ props.members[props.member].role = roleInput.value
70
107
  emits("callback");
71
108
  } else {
72
- props.members.push(memberForm.value);
109
+ props.members.push({...userInput.value, role: roleInput.value});
73
110
  emits("callback");
74
111
  }
75
112
  }
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div class="">
2
+ <div class="flex-v-center flex-nowrap flex">
3
3
  <img
4
- v-if="user.profile?.photo.length > 0 && type !== 'short'"
5
- :src="(FILE_SERVER_URL || '') + member.profile.photo"
4
+ v-if="photo"
5
+ :src="(FILE_SERVER_URL || '') + photo"
6
6
  class="radius-medium object-fit-cover mn-r-thin i-thin"
7
7
 
8
8
  @click.stop="$router.push({
@@ -12,9 +12,9 @@
12
12
  }
13
13
  })"
14
14
  />
15
- {{user}}123
15
+ <!-- <pre>{{user}}</pre> -->
16
16
  <PlaceholderUserpic
17
- v-if="!user.profile?.photo && type !== 'short'"
17
+ v-if="!photo"
18
18
  class="radius-medium mn-r-thin i-thin"
19
19
 
20
20
  @click.stop="$router.push({
@@ -24,10 +24,11 @@
24
24
  }
25
25
  })"
26
26
  />
27
- <!-- <div class="user-card__info"> -->
28
- <!-- <p class="user-card__name">{{ user.profile?.name || 'Безымянный' }}</p> -->
27
+
28
+ <p>{{ name }}</p>
29
+
29
30
  <!-- </div> -->
30
- <div class="mn-r-auto">
31
+ <!-- <div class="mn-r-auto">
31
32
  <span class=" mn-r-small">{{user.profile?.email}} {{user.profile?.phone}}</span>
32
33
  <span class="t-transp">{{user.role}}</span>
33
34
  <br>
@@ -36,7 +37,7 @@
36
37
 
37
38
  <div v-if="user.position !== 'Основатель'" class="mn-l-medium flex-v-center flex">
38
39
  <button @click="removeMember(user)" class="button-small button">×</button>
39
- </div>
40
+ </div> -->
40
41
 
41
42
  </div>
42
43
  </template>
@@ -50,6 +51,14 @@
50
51
  user: {
51
52
  type: Object,
52
53
  required: true
54
+ },
55
+ photo: {
56
+ type: String,
57
+ default: null
58
+ },
59
+ name: {
60
+ type: String,
61
+ default: 'Anonymous'
53
62
  }
54
63
  // Define other props here
55
64
  });
@@ -7,9 +7,25 @@
7
7
 
8
8
  <h2 class="w-100">{{ departments.state.department.profile.name }}</h2>
9
9
 
10
- <svg @click="$router.push(`/organizations/${route.params._id}/departments/${route.params.department}/edit`)" class="i-regular t-transp" width="652" height="652" viewBox="0 0 652 652" fill="none" xmlns="http://www.w3.org/2000/svg">
11
- <path d="M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z" fill="rgb(var(--black))"/>
12
- </svg>
10
+ <router-link
11
+ :to="{
12
+ name: 'Department Edit',
13
+ params: {
14
+ _id: route.params._id,
15
+ department: route.params.department
16
+ }
17
+ }"
18
+ class="
19
+ cursor-pointer
20
+ pos-absolute pos-t-regular pos-r-regular
21
+ radius-extra pd-thin bg-second
22
+ "
23
+ >
24
+ <IconEdit
25
+ class="i-regular"
26
+ classes="fill-white"
27
+ />
28
+ </router-link>
13
29
 
14
30
  </div>
15
31
  <p class="t-transp p-big" v-html="departments.state.department.description"></p>
@@ -10,11 +10,15 @@
10
10
  </section>
11
11
 
12
12
  </header>
13
-
14
- <div class="mn-b-thin bg-grey pd-medium o-hidden radius-big">
15
- <h3 class="mn-b-semi">Profile</h3>
16
-
17
- <div v-if="departments.state.department.profile" class="radius-small flex-nowrap flex">
13
+
14
+ <Block
15
+ title="Profile"
16
+ v-if="departments.state.department.profile"
17
+ class="mn-b-thin"
18
+ >
19
+ <div
20
+ class="cols-2-fit-content"
21
+ >
18
22
  <UploadImage
19
23
  v-model:photo="departments.state.department.profile.photo"
20
24
  :uploadPath="'organizations/' + departments.state.department.name + '/avatars'"
@@ -37,7 +41,7 @@
37
41
  />
38
42
  </div>
39
43
  </div>
40
- </div>
44
+ </Block>
41
45
 
42
46
  <Block
43
47
  title="Team"
@@ -48,11 +52,14 @@
48
52
  }]"
49
53
  class="cols-1 gap-thin mn-b-thin"
50
54
  >
55
+ <!-- {{departments.state.department.members[0]}} -->
51
56
  <User
52
57
  class="bg-grey o-hidden radius-small mn-b-thin"
53
58
  v-for="(member, index) in departments.state.department.members"
54
59
  :key="index"
55
60
  :user="member.user"
61
+ :photo="member.user.profile.photo"
62
+ :name="member.user.profile.name || member.user.phone || member.user.email || member.user._id"
56
63
  :position="member.position"
57
64
  @click="openMemberPopup(index)"
58
65
  />
@@ -62,6 +69,7 @@
62
69
  title="Добавить участника"
63
70
  @close-popup="closeMemberPopup"
64
71
  :isPopupOpen="isOpenAddMemberPopup"
72
+ class="bg-white w-max-30r radius-big pd-big"
65
73
  >
66
74
  <DepartmentMemberModify
67
75
  :members="departments.state.department.members"
@@ -212,12 +220,8 @@ import User from '@pf/src/modules/organizations/components/blocks/User.vue';
212
220
  import * as departments from "@pf/src/modules/organizations/store/departments";
213
221
  import * as memberships from "@pf/src/modules/organizations/store/memberships";
214
222
 
215
-
216
-
217
223
  const router = useRouter();
218
224
  const route = useRoute();
219
- const tabOrganization = ref("details");
220
- const showAddNew = ref(false);
221
225
 
222
226
  async function fetchData() {
223
227
  if (route.params.department) {
@@ -10,76 +10,43 @@
10
10
  class="mn-b-semi"
11
11
  />
12
12
 
13
- <!-- MEMBERS TAB -->
14
- <Menu
15
- class="mn-b-regular bg-grey"
16
- >
17
- <MenuItem
18
- @click="router.push({
19
- name: 'Organization Members',
20
- params: {
21
- _id: route.params._id
22
- }
23
- })"
24
- class="cursor-pointer"
25
- theme="black"
26
- >
27
- <span>
28
- {{organization.state.current.numberOfMembers}} members
29
- </span>
30
- </MenuItem>
31
- </Menu>
32
-
33
- <div class="cols-2 pd-medium bg-grey radius-bg">
34
-
35
- <Block
36
- title="Departments"
37
- :actions="[{
38
- label: '+',
39
- function: () => $router.push(`/organizations/${route.params._id}/departments/create`)
40
- }]"
41
- >
42
- <Feed
43
- :states="{
44
- empty: {
45
- title: 'No Departments Found',
46
- description: 'Currently, there are no departments available.'
47
- }
48
- }"
49
- :store="{
50
- read: (options) => departments.actions.read(route.params._id),
51
- state: null
52
- }"
53
- :options="{
54
- user: auth.state.user._id,
55
- sort: 'numberOfMemberships',
56
- limit: 10
57
- }"
58
- v-slot="{
59
- items
60
- }"
61
- >
62
- <CardDepartment
63
- v-for="(department, index) in items"
64
- :key="index"
65
- :department="department"
66
- :organization="route.params._id"
67
- class="radius-big bg-white pos-relative mn-b-thin"
68
- />
69
- </Feed>
70
- </Block>
71
- <div>
72
- <User
73
- v-for="(member, index) in organization.state.current.memberships"
74
- :key="index"
75
- :user="member"
76
- :position="member.position"
77
- class="bg-grey radius-small flex-nowrap flex pd-medium"
78
- />
79
-
80
- </div>
81
- </div>
82
-
13
+ <Block
14
+ :title="`${organization.state.current.numberOfMembers} members`"
15
+ :actions="[{
16
+ label: '>',
17
+ function: () => $router.push(`/organizations/${route.params._id}/departments/create`)
18
+ }]"
19
+ class="mn-b-semi"
20
+ >
21
+ <Feed
22
+ :states="{
23
+ empty: {
24
+ title: 'No Departments Found',
25
+ description: 'Currently, there are no departments available.'
26
+ }
27
+ }"
28
+ :store="{
29
+ read: (options) => departments.actions.read(route.params._id),
30
+ state: null
31
+ }"
32
+ :options="{
33
+ user: auth.state.user._id,
34
+ sort: 'numberOfMemberships',
35
+ limit: 10
36
+ }"
37
+ v-slot="{
38
+ items
39
+ }"
40
+ >
41
+ <CardDepartment
42
+ v-for="(department, index) in items"
43
+ :key="index"
44
+ :department="department"
45
+ :organization="route.params._id"
46
+ class="radius-big bg-white pos-relative mn-b-thin"
47
+ />
48
+ </Feed>
49
+ </Block>
83
50
 
84
51
  <Tab
85
52
  v-model:selected="tabOrganization"
@@ -265,7 +232,7 @@
265
232
  route.query.tab = tabOrganization.value
266
233
 
267
234
  watch(tabOrganization, (newValue) => {
268
- router.replace({ query: { ...route.query, tab: newValue } });
235
+ router.replace({ query: null});
269
236
  });
270
237
  </script>
271
238
 
@@ -129,7 +129,7 @@
129
129
 
130
130
  onMounted(async () => {
131
131
  isLoading.value = true;
132
- console.log(props.selectedDate)
132
+
133
133
  const data = await organizations.actions.read({
134
134
  skip: skip.value,
135
135
  limit: limit.value,
@@ -8,9 +8,9 @@ const controllerFactory = (db) => {
8
8
  const memberships = await Membership.aggregate([
9
9
  {
10
10
  $match: {
11
- ...(req.query.user && { user: req.query.user }),
11
+ ...(req.query.user && { user: new ObjectId(req.query.user) }),
12
12
  ...(req.query.type && { type: req.query.type }),
13
- ...(req.query.target && { target: req.query.target }),
13
+ ...(req.query.target && { target: new ObjectId(req.query.target) }),
14
14
  ...(req.query.role && { role: req.query.role }),
15
15
  },
16
16
  },
@@ -147,7 +147,6 @@ const controllerFactory = (db) => {
147
147
  });
148
148
  }
149
149
 
150
-
151
150
  if (location) {
152
151
 
153
152
  console.log(location)
@@ -112,7 +112,7 @@
112
112
 
113
113
  const totalPrice = computed(() => {
114
114
  return leftovers.state.current.positions.reduce((sum, position) => {
115
- return sum + (position.price * (position.quantity || 1));
115
+ return sum + position.price;
116
116
  }, 0);
117
117
  });
118
118
 
@@ -147,14 +147,16 @@
147
147
  }
148
148
 
149
149
  function onSubmit() {
150
+ leftovers.state.current.organization = route.params._id;
151
+
150
152
  if (route.params.leftover) {
151
153
  leftovers.actions.update(leftovers.state.current).then(
152
- () => router.push({ name: 'Backoffice Leftovers' }),
154
+ () => router.push({ name: 'Leftovers', params: {_id: route.params._id} }),
153
155
  (error) => console.error('error')
154
156
  );
155
157
  } else {
156
158
  leftovers.actions.create(leftovers.state.current).then(
157
- () => router.push({ name: 'Backoffice Leftovers' }),
159
+ () => router.push({ name: 'Leftovers', params: {_id: route.params._id} }),
158
160
  (error) => console.error('error')
159
161
  );
160
162
  }
@@ -162,7 +164,7 @@
162
164
 
163
165
  function onDelete() {
164
166
  leftovers.actions.delete(route.params.leftover).then(
165
- () => router.push({ name: 'Backoffice Leftovers' }),
167
+ () => router.push({ name: 'Leftovers', params: {_id: route.params._id} }),
166
168
  (error) => console.error('error')
167
169
  );
168
170
  }