@ozdao/prometheus-framework 0.2.91 → 0.2.93

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/dist/events.server.js +19 -9
  2. package/dist/events.server.mjs +19 -9
  3. package/dist/main-CX2ISR43.mjs +13629 -0
  4. package/dist/main-cffh4bbv.js +92 -0
  5. package/dist/main.css +1 -1
  6. package/dist/orders.server.js +32 -18
  7. package/dist/orders.server.mjs +32 -18
  8. package/dist/organizations.server.js +2 -1
  9. package/dist/organizations.server.mjs +2 -1
  10. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
  12. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
  14. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
  16. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  18. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  20. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
  32. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +14 -48
  36. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +85 -25
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +74 -63
  46. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -0
  47. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.js +74 -0
  48. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/landing/landing.client.js +4 -2
  50. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  51. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
  54. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
  55. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
  56. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
  62. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
  64. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
  70. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +7 -9
  74. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
  76. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
  78. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
  80. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
  84. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
  86. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
  88. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
  90. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +37 -26
  104. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
  110. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
  112. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
  116. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
  120. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
  122. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  124. package/dist/prometheus-framework.cjs.js +1 -1
  125. package/dist/prometheus-framework.es.js +1 -1
  126. package/dist/style.css +1 -1
  127. package/dist/web-CQQEUA9l.js +1 -0
  128. package/dist/web-D2Em-p-C.mjs +54 -0
  129. package/package.json +1 -1
  130. package/src/components/Address/Address.vue +23 -34
  131. package/src/components/LocationMarker/LocationMarker.vue +6 -1
  132. package/src/components/LocationSelection/LocationSelection.vue +4 -0
  133. package/src/components/Map/Map.vue +29 -15
  134. package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
  135. package/src/modules/events/components/layouts/layoutEvents.vue +2 -59
  136. package/src/modules/events/components/pages/Events.vue +106 -23
  137. package/src/modules/events/controllers/events.controller.js +10 -7
  138. package/src/modules/globals/components/blocks/CardHeader.vue +31 -6
  139. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
  140. package/src/modules/landing/components/pages/Farming.vue +226 -0
  141. package/src/modules/landing/components/pages/Governance.vue +3 -5
  142. package/src/modules/landing/components/pages/Home.vue +0 -3
  143. package/src/modules/landing/components/pages/Hotel.vue +1 -3
  144. package/src/modules/landing/components/pages/Page.vue +0 -3
  145. package/src/modules/landing/components/sections/Examples.vue +4 -56
  146. package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
  147. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
  148. package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
  149. package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
  150. package/src/modules/landing/landing.client.js +3 -1
  151. package/src/modules/landing/router/landing.js +11 -0
  152. package/src/modules/marketplace/components/sections/Filters.vue +26 -23
  153. package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
  154. package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
  155. package/src/modules/orders/components/pages/Order.vue +2 -6
  156. package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
  157. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  158. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
  159. package/src/modules/orders/components/pages/Orders.vue +60 -11
  160. package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
  161. package/src/modules/orders/components/sections/SubscribeNewsletter.vue +2 -2
  162. package/src/modules/orders/controllers/orders.controller.js +29 -18
  163. package/src/modules/orders/models/order.model.js +8 -2
  164. package/src/modules/orders/router/orders.backoffice.router.js +3 -5
  165. package/src/modules/orders/router/orders.router.js +2 -2
  166. package/src/modules/orders/store/orders.js +3 -7
  167. package/src/modules/orders/store/shopcart.js +1 -1
  168. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
  169. package/src/modules/organizations/components/pages/Department.vue +5 -1
  170. package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
  171. package/src/modules/organizations/components/pages/Members.vue +2 -1
  172. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  173. package/src/modules/organizations/controllers/memberships.controller.js +3 -1
  174. package/src/modules/organizations/store/memberships.js +1 -1
  175. package/src/modules/products/components/blocks/CardProduct.vue +32 -22
  176. package/src/modules/products/components/pages/ProductEdit.vue +10 -13
  177. package/src/modules/products/components/pages/Products.vue +2 -0
  178. package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
  179. package/src/modules/products/store/products.js +25 -2
  180. package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
  181. package/src/modules/users/components/blocks/CardUser.vue +1 -0
  182. package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -1,12 +1,18 @@
1
1
  <template>
2
2
  <div ref="gmap" class="gmap"></div>
3
+
3
4
  </template>
4
5
 
5
6
  <script setup>
6
7
  import { ref, onMounted, watch } from 'vue';
7
8
 
9
+
10
+ import { Loader as GMLoader } from "@googlemaps/js-api-loader";
11
+
12
+
8
13
  const props = defineProps({
9
14
  location: Object,
15
+ apiKey: String,
10
16
  });
11
17
 
12
18
  let gmap = ref(null);
@@ -14,25 +20,33 @@ let map = null;
14
20
  let marker = null;
15
21
 
16
22
  onMounted(async () => {
17
- // Инициализировать карту
18
- map = new google.maps.Map(gmap.value, {
19
- zoom: 13,
20
- center: {
21
- lat: props.location.lat,
22
- lng: props.location.lng,
23
- },
23
+ const loader = new GMLoader({
24
+ apiKey: props.apiKey,
25
+ version: "weekly",
26
+ libraries: ["places"]
24
27
  });
25
28
 
26
- // Добавить маркер
27
- marker = new google.maps.Marker({
28
- position: {
29
- lat: props.location.lat,
30
- lng: props.location.lng,
31
- },
32
- map: map,
29
+ loader.load().then(() => {
30
+ map = new google.maps.Map(gmap.value, {
31
+ zoom: 13,
32
+ center: {
33
+ lat: props.location.lat,
34
+ lng: props.location.lng,
35
+ },
36
+ });
37
+
38
+ // Добавить маркер
39
+ marker = new google.maps.Marker({
40
+ position: {
41
+ lat: props.location.lat,
42
+ lng: props.location.lng,
43
+ },
44
+ map: map,
45
+ });
46
+ }).catch(e => {
47
+ console.error(e);
33
48
  });
34
49
  });
35
-
36
50
  watch(() => props.location, () => {
37
51
  if (map && marker) {
38
52
  // Обновить позицию маркера
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div
3
- class="mn-b-thin w-100 pd-medium bg-white radius-medium"
3
+ class="mn-b-thin w-100 pd-medium bg-black radius-medium"
4
4
  >
5
5
 
6
6
  <div v-if="prop.content" class="flex-center flex">
7
- <video controls class="w-100">
7
+ <video controls class="w-100 h-max-30r">
8
8
  <source :src="prop.content" type="video/mp4">
9
9
  Your browser does not support the video tag.
10
10
  </video>
@@ -1,12 +1,5 @@
1
1
  <template>
2
-
3
2
  <div class="pd-thin h-min-100">
4
- <DatePicker
5
- v-model:date="events.state.filter.date"
6
- :locale="$i18n.locale"
7
- class="radius-semi o-hidden bg-grey mn-b-thin pd-l-zero pd-r-zero pd-medium"
8
- />
9
-
10
3
  <router-view v-slot="{ Component, route }">
11
4
  <transition name="scaleIn" mode="out-in">
12
5
  <component ref="page" :key="route.query" :is="Component" />
@@ -17,60 +10,10 @@
17
10
 
18
11
  <script setup="props">
19
12
  import { computed,onMounted, toRefs,ref, watch } from 'vue'
20
- import { useRoute,useRouter } from 'vue-router'
21
-
22
- import Select from '@pf/src/components/Select/Select.vue'
23
- import DatePicker from '@pf/src/components/DatePicker/DatePicker.vue'
24
- // Import state
25
- import * as events from '@pf/src/modules/events/store/events.js';
26
-
27
- // State
13
+ import { useRoute,useRouter } from 'vue-router';
14
+ // Router
28
15
  const route = useRoute();
29
16
  const router = useRouter()
30
-
31
- let baseDate = new Date();
32
- const formattedDate = formatDateForRouter(baseDate);
33
-
34
- function formatDateForRouter(date) {
35
- return `${date.getDate().toString().padStart(2, '0')}${(date.getMonth() + 1).toString().padStart(2, '0')}${date.getFullYear()}`;
36
- }
37
-
38
- if (route.query) {
39
- const query = route.query;
40
-
41
- const newFilterValue = {
42
- tags: query.tags ? query.tags.split(',') : null,
43
- date: query.date ? query.date : formattedDate,
44
- };
45
-
46
- events.state.filter = newFilterValue; // <-- Modified
47
- } else {
48
- const newFilterValue = {
49
- date: formattedDate,
50
- };
51
-
52
- events.state.filter = newFilterValue;
53
- }
54
-
55
- watch(() => events.state.filter, (newFilterValue, oldFilterValue) => { // <-- Modified
56
- const query = { ...route.query };
57
-
58
- Object.keys(oldFilterValue).forEach(key => {
59
- if (query[key]) {
60
- delete query[key];
61
- }
62
- });
63
-
64
- const newQueryValues = Object.fromEntries(
65
- Object.entries(newFilterValue)
66
- .filter(([key, value]) => (Array.isArray(value) && value.length > 0) || (typeof value === 'string' && value))
67
- .map(([key, value]) => [key, Array.isArray(value) ? value.join(',') : value])
68
- );
69
- Object.assign(query, newQueryValues);
70
-
71
- router.push({ query });
72
- }, { deep: true })
73
-
74
17
  </script>
75
18
 
76
19
  <style lang="scss">
@@ -1,34 +1,72 @@
1
1
  <template>
2
2
  <section class="pd-thin">
3
+ <header
4
+ class="mn-b-medium flex-v-center flex-nowrap flex"
5
+ >
6
+ <h2
7
+ class="mn-r-medium"
8
+ >
9
+ Featured
10
+ </h2>
11
+ </header>
3
12
  <List
4
13
  :user="auth.state.user._id"
5
- class="bg-grey mn-b-thin radius-big"
6
- :phase="'week'"
14
+ class="bg-grey mn-b-medium radius-big"
15
+ :phase="'planned'"
7
16
  />
8
17
  <header
9
18
  class="mn-b-medium flex-v-center flex-nowrap flex"
10
19
  >
11
- <h2
12
- class="mn-r-medium"
13
- >
14
- Events
15
- </h2>
16
-
17
- <button
18
- @click="router.push({name: 'Create Event'})"
19
- class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
20
- >
21
- +
22
- </button>
20
+ <h2
21
+ class="mn-r-medium"
22
+ >
23
+ All Events
24
+ </h2>
25
+
26
+ <button
27
+ @click="router.push({name: 'Create Event'})"
28
+ class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
29
+ >
30
+ +
31
+ </button>
23
32
  </header>
24
33
 
25
-
26
- <Feed
27
- :user="auth.state.user._id"
28
- :owner="route.params._id"
29
- :sortOrder="'desc'"
30
- :sortParam="'date.start'"
34
+ <DatePicker
35
+ v-model:date="events.state.filter.date"
36
+ :locale="$i18n.locale"
37
+ class="radius-semi o-hidden bg-grey mn-b-thin pd-l-zero pd-r-zero pd-medium"
31
38
  />
39
+
40
+ <Feed
41
+ :states="{
42
+ empty: {
43
+ title: 'No Events Found',
44
+ description: 'Currently, there are no events available.'
45
+ }
46
+ }"
47
+ :store="{
48
+ read: (options) => events.read(options),
49
+ state: events.state
50
+ }"
51
+ :options="{
52
+ user: auth.state.user._id,
53
+ date: events.state.filter.date,
54
+ limit: 10
55
+ }"
56
+ v-slot="{
57
+ items
58
+ }"
59
+ >
60
+ <CardEvent
61
+ @click="$router.push({name: 'Event', params: {url: event.url}})"
62
+ v-for="(event,index) in items"
63
+ :key="event._id"
64
+ :event="event"
65
+ :user="auth.state.user._id"
66
+ :type="'normal'"
67
+ class="bg-grey radius-big mn-b-medium"
68
+ />
69
+ </Feed>
32
70
  </section>
33
71
  </template>
34
72
 
@@ -37,16 +75,61 @@
37
75
  import { useRoute, useRouter } from 'vue-router';
38
76
 
39
77
  import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue';
40
- import Feed from '@pf/src/modules/events/components/sections/Feed.vue';
41
- import List from '@pf/src/modules/events/components/sections/List.vue';
78
+ import Feed from '@pf/src/components/Feed/Feed.vue'
79
+ import DatePicker from '@pf/src/components/DatePicker/DatePicker.vue'
42
80
 
81
+ import List from '@pf/src/modules/events/components/sections/List.vue';
82
+ import CardEvent from '@pf/src/modules/events/components/blocks/CardEvent.vue';
43
83
  // Import state
44
- import * as events from '@pf/src/modules/events/store/events.js'; // <-- Modified
84
+ import * as events from '@pf/src/modules/events/store/events.js';
45
85
  import * as auth from '@pf/src/modules/auth/store/auth'
46
86
 
47
87
  // State
48
88
  const route = useRoute();
49
89
  const router = useRouter();
90
+
91
+ let baseDate = new Date();
92
+ const formattedDate = formatDateForRouter(baseDate);
93
+
94
+ function formatDateForRouter(date) {
95
+ return `${date.getDate().toString().padStart(2, '0')}${(date.getMonth() + 1).toString().padStart(2, '0')}${date.getFullYear()}`;
96
+ }
97
+
98
+ if (route.query) {
99
+ const query = route.query;
100
+
101
+ const newFilterValue = {
102
+ tags: query.tags ? query.tags.split(',') : null,
103
+ date: query.date ? query.date : formattedDate,
104
+ };
105
+
106
+ events.state.filter = newFilterValue; // <-- Modified
107
+ } else {
108
+ const newFilterValue = {
109
+ date: formattedDate,
110
+ };
111
+
112
+ events.state.filter = newFilterValue;
113
+ }
114
+
115
+ watch(() => events.state.filter, (newFilterValue, oldFilterValue) => { // <-- Modified
116
+ const query = { ...route.query };
117
+
118
+ Object.keys(oldFilterValue).forEach(key => {
119
+ if (query[key]) {
120
+ delete query[key];
121
+ }
122
+ });
123
+
124
+ const newQueryValues = Object.fromEntries(
125
+ Object.entries(newFilterValue)
126
+ .filter(([key, value]) => (Array.isArray(value) && value.length > 0) || (typeof value === 'string' && value))
127
+ .map(([key, value]) => [key, Array.isArray(value) ? value.join(',') : value])
128
+ );
129
+ Object.assign(query, newQueryValues);
130
+
131
+ router.push({ query });
132
+ }, { deep: true })
50
133
  </script>
51
134
 
52
135
  <style lang="scss">
@@ -127,10 +127,13 @@ const middlewareFactory = (db) => {
127
127
  event = req.body
128
128
 
129
129
  // Update related product and payment link
130
- const { product, price, paymentLink } = await serviceStripe.updateProduct(event);
130
+ if (event.special) {
131
+ const { product, price, paymentLink } = await serviceStripe.updateProduct(event);
132
+
133
+ if (paymentLink) {
134
+ event.specialData.ticketLinkStripe = paymentLink.url; // Update with new payment link
135
+ }
131
136
 
132
- if (paymentLink) {
133
- event.specialData.ticketLinkStripe = paymentLink.url; // Update with new payment link
134
137
  }
135
138
 
136
139
  await Event.updateOne({ _id: event._id }, { $set: event });
@@ -148,7 +151,7 @@ const middlewareFactory = (db) => {
148
151
  const deleteMethod = async (req, res) => {
149
152
  try {
150
153
  const event = await Event.findOneAndDelete({
151
- id: req.body.id
154
+ _id: req.body._id
152
155
  }).exec();
153
156
 
154
157
  if (!event) {
@@ -156,9 +159,9 @@ const middlewareFactory = (db) => {
156
159
  message: "Event is not deleted."
157
160
  });
158
161
  }
159
-
160
- await serviceStripe.deactivateProduct(event);
161
-
162
+ if (event.special) {
163
+ await serviceStripe.deactivateProduct(event);
164
+ }
162
165
  res.status(200).send(event);
163
166
  } catch (err) {
164
167
  return res.status(500).send({
@@ -47,7 +47,7 @@
47
47
  }
48
48
  })"
49
49
  >
50
- {{owner.target?.profile?.name}}
50
+ {{owner.target?.profile?.name || creator.target?.username || 'Anonymous'}}
51
51
  </span>
52
52
 
53
53
  <span
@@ -59,7 +59,7 @@
59
59
  }
60
60
  })"
61
61
  >
62
- · by {{creator.target?.profile?.name}}
62
+ · by {{creator.target?.profile?.name || creator.target?.username || 'Anonymous'}}
63
63
  </span>
64
64
 
65
65
  <span v-if="date" class="pos-relative">
@@ -78,7 +78,7 @@
78
78
 
79
79
  <div class="d-block mn-l-auto flex-nowrap flex flex-v-center">
80
80
 
81
- <div v-if="members" class="w-4r i-thin">
81
+ <div v-if="members" class="w-4r pos-relative i-thin">
82
82
  <!-- Круг с числом участников -->
83
83
  <span
84
84
  :style="{
@@ -103,8 +103,12 @@
103
103
  </span>
104
104
 
105
105
  <!-- Аватарки -->
106
- <img
107
- v-for="(photo, index) in membersPhotos.slice(0,2)"
106
+ <template
107
+ v-for="(photo, index) in membersPhotos.slice(0,2)"
108
+ >
109
+ <img
110
+ v-if="photo"
111
+
108
112
  :key="index"
109
113
  :src="(FILE_SERVER_URL || '') + photo"
110
114
  :style="{
@@ -121,7 +125,28 @@
121
125
  bg-grey
122
126
  radius-big
123
127
  "
124
- />
128
+ />
129
+
130
+ <PlaceholderUserpic
131
+ v-else
132
+ :style="{
133
+ position: 'absolute',
134
+ top: '0px',
135
+ right: (index * 20 + 20) + '%',
136
+ zIndex: 1 - index
137
+ }"
138
+ class="
139
+ br-solid
140
+ br-2px
141
+ br-white
142
+ i-thin
143
+ bg-grey
144
+ radius-big
145
+ "
146
+ />
147
+ </template>
148
+
149
+
125
150
  </div>
126
151
  </div>
127
152
 
@@ -104,13 +104,24 @@ class servicePaymentStripe extends servicePayment {
104
104
  return { product, price: newPrice, paymentLink };
105
105
  }
106
106
 
107
- async deactivateProduct(event) {
108
- // Retrieve the default price and deactivate it
109
- const product = await stripe.products.retrieve(event._id);
107
+ async deactivateProduct(event) {
108
+ try {
109
+ // Попытка получить продукт по ID
110
+ const product = await stripe.products.retrieve(event._id.toString());
111
+
112
+ // Если продукт найден, деактивировать его цену
113
+ if (product && product.default_price) {
114
+ await stripe.prices.update(product.default_price, {
115
+ active: false
116
+ });
117
+ }
118
+ } catch (error) {
119
+ // Обработка ошибки, если продукт не найден или другая ошибка API
120
+ console.error("Ошибка при деактивации продукта:", error.message);
121
+ // Можно здесь добавить дополнительную логику, если нужно
110
122
 
111
- await stripe.prices.update(product.default_price, {
112
- active: false
113
- });
123
+ // Ошибка игнорируется, чтобы пропустить этот шаг
124
+ }
114
125
  }
115
126
 
116
127
  async createPaymentLink(event) {