@ozdao/martyrs 0.2.453 → 0.2.455

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/{Media-BsgJlo-X.js → Media-1oukRVfv.js} +1 -1
  2. package/dist/{Media-CxRfrG2S.mjs → Media-q-XJSM_H.mjs} +3 -3
  3. package/dist/builder.js +5 -0
  4. package/dist/builder.mjs +5 -0
  5. package/dist/{main-Zocv7IVl.js → main-C7jGMDJC.js} +6 -6
  6. package/dist/{main-7FA_ai95.mjs → main-yXkgrjj8.mjs} +120 -133
  7. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.cjs +2 -2
  8. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.cjs.map +1 -1
  9. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js +2 -2
  10. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js.map +1 -1
  11. package/dist/martyrs/src/components/EmptyState/EmptyState.vue.cjs +1 -1
  12. package/dist/martyrs/src/components/EmptyState/EmptyState.vue.js +1 -1
  13. package/dist/martyrs/src/components/Media/Media.vue.cjs +2 -2
  14. package/dist/martyrs/src/components/Media/Media.vue.cjs.map +1 -1
  15. package/dist/martyrs/src/components/Media/Media.vue.js +2 -2
  16. package/dist/martyrs/src/components/Media/Media.vue.js.map +1 -1
  17. package/dist/martyrs/src/components/Popup/Popup.vue2.cjs +0 -8
  18. package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +1 -1
  19. package/dist/martyrs/src/components/Popup/Popup.vue2.js +0 -8
  20. package/dist/martyrs/src/components/Popup/Popup.vue2.js.map +1 -1
  21. package/dist/martyrs/src/components/Slider/Slider.native.vue.cjs +229 -0
  22. package/dist/martyrs/src/components/Slider/Slider.native.vue.cjs.map +1 -0
  23. package/dist/martyrs/src/components/Slider/Slider.native.vue.js +229 -0
  24. package/dist/martyrs/src/components/Slider/Slider.native.vue.js.map +1 -0
  25. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +29 -17
  26. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs.map +1 -1
  27. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +29 -17
  28. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js.map +1 -1
  29. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -22
  30. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  31. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +4 -25
  32. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  33. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +50 -132
  34. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  35. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +66 -148
  36. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +3 -33
  38. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -1
  39. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +3 -33
  40. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -1
  41. package/dist/martyrs/src/modules/events/components/pages/EventsSearch.vue.cjs +98 -0
  42. package/dist/martyrs/src/modules/events/components/pages/EventsSearch.vue.cjs.map +1 -0
  43. package/dist/martyrs/src/modules/events/components/pages/EventsSearch.vue.js +98 -0
  44. package/dist/martyrs/src/modules/events/components/pages/EventsSearch.vue.js.map +1 -0
  45. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +2 -4
  46. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs.map +1 -1
  47. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +2 -4
  48. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js.map +1 -1
  49. package/dist/martyrs/src/modules/events/components/sections/FeaturedEvents.vue.cjs +8 -7
  50. package/dist/martyrs/src/modules/events/components/sections/FeaturedEvents.vue.cjs.map +1 -1
  51. package/dist/martyrs/src/modules/events/components/sections/FeaturedEvents.vue.js +8 -7
  52. package/dist/martyrs/src/modules/events/components/sections/FeaturedEvents.vue.js.map +1 -1
  53. package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +3 -3
  54. package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs.map +1 -1
  55. package/dist/martyrs/src/modules/events/components/sections/List.vue.js +3 -3
  56. package/dist/martyrs/src/modules/events/components/sections/List.vue.js.map +1 -1
  57. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.cjs +190 -0
  58. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.cjs.map +1 -0
  59. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +190 -0
  60. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -0
  61. package/dist/martyrs/src/modules/events/router/events.cjs +15 -0
  62. package/dist/martyrs/src/modules/events/router/events.cjs.map +1 -1
  63. package/dist/martyrs/src/modules/events/router/events.js +15 -0
  64. package/dist/martyrs/src/modules/events/router/events.js.map +1 -1
  65. package/dist/martyrs/src/modules/globals/globals.client.cjs +2 -0
  66. package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
  67. package/dist/martyrs/src/modules/globals/globals.client.js +2 -0
  68. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  69. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs +4 -1
  70. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
  71. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js +3 -0
  72. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
  73. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -4
  74. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +0 -2
  76. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  77. package/dist/martyrs/src/modules/globals/views/plugins/AlertDialog.vue.cjs +43 -0
  78. package/dist/martyrs/src/modules/globals/views/plugins/AlertDialog.vue.cjs.map +1 -0
  79. package/dist/martyrs/src/modules/globals/views/plugins/AlertDialog.vue.js +43 -0
  80. package/dist/martyrs/src/modules/globals/views/plugins/AlertDialog.vue.js.map +1 -0
  81. package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.cjs +53 -0
  82. package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.cjs.map +1 -0
  83. package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.js +53 -0
  84. package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.js.map +1 -0
  85. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +0 -1
  86. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs.map +1 -1
  87. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +0 -1
  88. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
  89. package/dist/martyrs/src/modules/products/components/elements/Price.vue.cjs +5 -6
  90. package/dist/martyrs/src/modules/products/components/elements/Price.vue.cjs.map +1 -1
  91. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +5 -6
  92. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +1 -1
  93. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +61 -69
  94. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  95. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +62 -70
  96. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  97. package/dist/martyrs/src/modules/products/store/products.cjs +0 -1
  98. package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
  99. package/dist/martyrs/src/modules/products/store/products.js +0 -1
  100. package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
  101. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +0 -1
  102. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs.map +1 -1
  103. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +0 -1
  104. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
  105. package/dist/martyrs.cjs.js +1 -1
  106. package/dist/martyrs.css +1 -1
  107. package/dist/martyrs.es.js +1 -1
  108. package/dist/organizations.server.js +0 -1
  109. package/dist/organizations.server.mjs +0 -1
  110. package/dist/products.server.js +5 -0
  111. package/dist/products.server.mjs +5 -0
  112. package/dist/style.css +93 -6
  113. package/package.json +1 -1
  114. package/src/builder/rspack/rspack.config.client.js +5 -0
  115. package/src/components/DatePicker/DatePicker.vue +1 -1
  116. package/src/components/EmptyState/EmptyState.vue +1 -1
  117. package/src/components/Media/Media.vue +1 -1
  118. package/src/components/Popup/Popup.vue +2 -2
  119. package/src/components/Slider/Slider.native.vue +313 -0
  120. package/src/modules/events/components/blocks/CardEvent.vue +21 -7
  121. package/src/modules/events/components/pages/Event.vue +0 -20
  122. package/src/modules/events/components/pages/Events.vue +91 -141
  123. package/src/modules/events/components/pages/EventsBackoffice.vue +5 -3
  124. package/src/modules/events/components/pages/EventsSearch.vue +122 -0
  125. package/src/modules/events/components/sections/EventsHot.vue +3 -5
  126. package/src/modules/events/components/sections/FeaturedEvents.vue +44 -12
  127. package/src/modules/events/components/sections/List.vue +3 -3
  128. package/src/modules/events/components/sections/SelectDate.vue +217 -0
  129. package/src/modules/events/router/events.js +12 -0
  130. package/src/modules/globals/globals.client.js +5 -2
  131. package/src/modules/globals/views/components/layouts/App.vue +7 -1
  132. package/src/modules/globals/views/components/layouts/Client.vue +0 -3
  133. package/src/modules/globals/views/plugins/AlertDialog.vue +35 -0
  134. package/src/modules/globals/views/plugins/alert.plugin.js +65 -0
  135. package/src/modules/organizations/policies/organizations.policies.js +0 -1
  136. package/src/modules/products/components/elements/Price.vue +3 -4
  137. package/src/modules/products/components/pages/Product.old.vue +201 -0
  138. package/src/modules/products/components/pages/Product.vue +57 -38
  139. package/src/modules/products/controllers/products.controller.js +7 -0
  140. package/src/modules/products/store/products.js +0 -1
  141. package/src/styles/base/all.scss +1 -0
  142. package/src/styles/typography.scss +22 -0
@@ -13,41 +13,43 @@
13
13
  @click="$router.push({ name: 'ProductEdit', params: { _id: product.owner.target, product: product._id } })"
14
14
  class="pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
15
15
  />
16
+
17
+
18
+
16
19
  <h2 class="w-100 h1-product mn-b-small">{{ product.name }}</h2>
20
+
17
21
  <Price :product="product" size="big" class="flex gap-micro flex-center pd-small br-solid br-1px br-black-transp-10 w-max mn-b-medium" />
18
22
 
19
- <div v-if="product.description || product.specification" class="h-min-5r o-hidden radius-small bg-light mn-b-medium pos-relative">
20
- <Tab
21
- v-model:selected="tabProduct"
22
- :tabs="[
23
- {name: 'Description', value: 'description'},
24
- {name: 'Specifications', value: 'specifications'}
25
- ]"
26
- tabClass="pd-thin bg-white radius-thin p-small uppercase t-medium"
27
- class="gap-micro bg-light pos-relative z-index-2 pd-thin br-solid br-b br-black-transp-10"
28
- />
29
- <transition name="slide-fade">
30
- <div v-if="tabProduct === 'description'" class="pd-medium">
31
- <p v-if="product.description && !product.localization < 1 && !recommendation" class="w-100 t-transp">
32
- {{ product.description }}
33
- </p>
34
- <p v-if="product.localization && product.localization.length > 1 && !recommendation" class="w-100 t-transp">
35
- {{ t('description') }}
36
- </p>
37
- </div>
38
- <div v-else class="cols-2 pd-medium w-100 gap-small">
39
- <div
40
- v-if="product.information.length > 0"
41
- v-for="information in product.information"
42
- class="w-100 pd-small radius-small bg-white product-information"
43
- >
44
- <p class="t-demi">{{ information.name }}</p>
45
- <p>{{ information.value }}</p>
46
- </div>
47
- </div>
48
- </transition>
23
+ <p v-if="product.description && !product.localization < 1 && !recommendation" class="w-100 t-transp mn-b-small">
24
+ {{ product.description }}
25
+ </p>
26
+ <p v-if="product.localization && product.localization.length > 1 && !recommendation" class="w-100 t-transp mn-b-small">
27
+ {{ t('description') }}
28
+ </p>
29
+
30
+ <div class="cols-2 mn-b-small w-100 gap-small">
31
+ <div
32
+ v-if="product.information.length > 0"
33
+ v-for="information in product.information"
34
+ class="w-100 pd-small radius-small bg-light product-information"
35
+ >
36
+ <p class="t-demi">{{ information.name }}</p>
37
+ <p>{{ information.value }}</p>
38
+ </div>
49
39
  </div>
50
40
 
41
+ <p class="t-medium mn-b-small">Provided by</p>
42
+ <CardOrganization
43
+ v-if="product.owner"
44
+ :organization="product.owner.target"
45
+ :showRating="true"
46
+ :showFollowers="false"
47
+ :showProducts="false"
48
+ class="bg-light mn-b-thin w-100 o-hidden radius-medium pd-small "
49
+ />
50
+
51
+
52
+
51
53
  <div class="w-max-33r">
52
54
  <div class="w-max-33r">
53
55
  <div v-if="product.listing === 'rent'">
@@ -71,8 +73,8 @@
71
73
  <div v-else>
72
74
  <Button
73
75
  v-if="product.available > 0"
74
- @click="addToCart(product, null)"
75
- class="h-3r w-100 bg-main button"
76
+ :submit="() => addToCart(product, null)"
77
+ class="h-3r w-max mobile:w-100 bg-main button"
76
78
  >
77
79
  <div class="gap-thin flex flex-center flex-nowrap">
78
80
  <IconShopcartAdd class="i-semi" />
@@ -99,10 +101,11 @@
99
101
  </template>
100
102
 
101
103
  <script setup>
102
- import { computed, ref, onMounted } from 'vue'
104
+ import { computed, ref, onMounted, getCurrentInstance } from 'vue'
103
105
  import { useRoute, useRouter } from 'vue-router'
104
106
  import { useI18n } from 'vue-i18n'
105
107
 
108
+
106
109
  import * as auth from '@martyrs/src/modules/auth/views/store/auth'
107
110
  import * as globals from '@martyrs/src/modules/globals/views/store/globals'
108
111
  import * as products from '@martyrs/src/modules/products/store/products'
@@ -120,8 +123,11 @@ import ImagesThumbnails from '@martyrs/src/modules/products/components/blocks/Im
120
123
  import Price from '@martyrs/src/modules/products/components/elements/Price.vue'
121
124
  import PopularProducts from '@martyrs/src/modules/products/components/sections/PopularProducts.vue'
122
125
 
126
+ import CardOrganization from '@martyrs/src/modules/organizations/components/blocks/CardOrganization.vue'
127
+
123
128
  const route = useRoute()
124
129
  const router = useRouter()
130
+ const { proxy } = getCurrentInstance()
125
131
 
126
132
  const product = computed(() => products.state.current)
127
133
  const images = computed(() => products.state.current.images)
@@ -148,15 +154,15 @@ function closePopup() {
148
154
  const emits = defineEmits(['page-loading', 'page-loaded']);
149
155
 
150
156
  const pageProduct = ref(null)
151
- products.state.current = null
152
- // products.mutations.resetProduct()
157
+ const orderOrganization = ref(null)
158
+
159
+ products.state.current = null
153
160
  onMounted(async () => {
154
161
 
155
162
  emits('page-loading');
156
163
  await products.actions.read({ _id: route.params.product })
157
164
  emits('page-loaded');
158
165
 
159
-
160
166
  // route.meta.title.en = product.value.name
161
167
  // route.meta.title.ru = roduct.value.name
162
168
 
@@ -170,14 +176,27 @@ function validateToCard(product) {
170
176
 
171
177
  async function addToCart(product, selectedDates = null) {
172
178
  try {
173
- if (shopcart.state.organization !== product.owner.target) {
179
+ // Если организация товара отличается от текущей в корзине
180
+ if (shopcart.state.organization && shopcart.state.organization !== product.owner.target) {
181
+ const result = await proxy.$alert({
182
+ title: 'Start a new order?',
183
+ message: `Your cart has items from another vendor. If you continue, we'll clear it so you can order from this one instead.`,
184
+ actions: [
185
+ { label: 'Cancel', value: false },
186
+ { label: 'Start New Order', value: true }
187
+ ]
188
+ })
189
+
190
+ if (!result) throw error
191
+
174
192
  shopcart.state.organization = product.owner.target
175
193
  shopcart.state.positions = []
176
194
  }
195
+
177
196
  await shopcart.actions.addProductToCart(product, product.owner.target, selectedDates)
178
197
  return true
179
198
  } catch (error) {
180
- console.error('Ошибка при добавлении товара в корзину:', error)
199
+ console.error('Error while adding product to cart:', error)
181
200
  throw error
182
201
  }
183
202
  }
@@ -10,6 +10,9 @@ const openai = new OpenAI({
10
10
  apiKey: process.env.OPENAI_API_KEY,
11
11
  });
12
12
 
13
+ const queryProcessorGlobals = require('@martyrs/src/modules/globals/controllers/utils/queryProcessor');
14
+
15
+
13
16
  // Factory
14
17
  const controllerFactory = (db) => {
15
18
  const Product = db.product;
@@ -253,6 +256,10 @@ const controllerFactory = (db) => {
253
256
  }
254
257
  }
255
258
  },
259
+ // For owner
260
+ queryProcessorGlobals.getOwnerUserLookupStage(),
261
+ queryProcessorGlobals.getOwnerOrganizationLookupStage(),
262
+ queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
256
263
  {
257
264
  $set: {
258
265
  available: {
@@ -24,7 +24,6 @@ const state = reactive({
24
24
  sale: 0,
25
25
  price: 0,
26
26
  price_cost: 0,
27
- price_currency: '$',
28
27
  localization: [],
29
28
  modifications: [],
30
29
  quantityDiscount: [],
@@ -159,6 +159,7 @@ body {
159
159
  .o-hidden {overflow: hidden; }
160
160
  .o-scroll {overflow: scroll; }
161
161
  .o-y-scroll {overflow-y: scroll; }
162
+ .o-x-scroll {overflow-y: scroll; }
162
163
  .o-x-hidden {overflow-x: hidden; touch-action: pan-y;}
163
164
  .o-auto {overflow: auto; }
164
165
  .o-visible {overflow: visible; }
@@ -59,6 +59,28 @@ a:hover { cursor: pointer;}
59
59
  .lh-medium { line-height: 1.250; }
60
60
  .lh-regular { line-height: 1.125; }
61
61
  .lh-light { line-height: 1.000; }
62
+ /*Text trim*/
63
+ .t-trim {
64
+ display: -webkit-box;
65
+ -webkit-box-orient: vertical;
66
+ overflow: hidden;
67
+ -webkit-line-clamp: 1;
68
+ }
69
+
70
+ .t-trim-2 {
71
+ display: -webkit-box;
72
+ -webkit-box-orient: vertical;
73
+ overflow: hidden;
74
+ -webkit-line-clamp: 2;
75
+ }
76
+
77
+ .t-trim-3 {
78
+ display: -webkit-box;
79
+ -webkit-box-orient: vertical;
80
+ overflow: hidden;
81
+ -webkit-line-clamp: 3;
82
+ }
83
+
62
84
 
63
85
 
64
86
  // Text decoration