@ozdao/prometheus-framework 0.2.35 → 0.2.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework.cjs.js +18 -19
  3. package/dist/prometheus-framework.es.js +803 -1028
  4. package/package.json +1 -1
  5. package/src/components/Button/Button.vue +26 -19
  6. package/src/components/FieldBig/FieldBig.vue +1 -1
  7. package/src/components/FieldPhone/FieldPhone.vue +55 -304
  8. package/src/components/FieldPhone/FieldPhone2.vue +671 -0
  9. package/src/components/FieldPhone/click-outside.js +16 -11
  10. package/src/components/Footer/Footer.vue +4 -4
  11. package/src/components/Header/Header.vue +2 -1
  12. package/src/components/Select/Select.vue +2 -1
  13. package/src/modules/chats/components/sections/ChatWindow.vue +3 -1
  14. package/src/modules/chats/store/chat.store.js +1 -3
  15. package/src/modules/events/components/pages/EditEvent.vue +2 -1
  16. package/src/modules/events/components/pages/Event.vue +8 -2
  17. package/src/modules/events/components/sections/SectionMainGuest.vue +1 -1
  18. package/src/modules/events/components/sections/SectionSpecialGuests.vue +0 -1
  19. package/src/modules/events/store/events.js +23 -3
  20. package/src/modules/globals/mixins/mixins.js +33 -2
  21. package/src/modules/globals/store/globals.js +1 -0
  22. package/src/modules/landing/components/sections/HeroGovernance.vue +156 -0
  23. package/src/modules/marketplace/components/sections/Filters.vue +3 -0
  24. package/src/modules/marketplace/router/marketplace.js +1 -0
  25. package/src/modules/orders/components/blocks/StatusHistory.vue +8 -3
  26. package/src/modules/orders/components/pages/EditOrder.vue +9 -11
  27. package/src/modules/orders/components/pages/FormOrder.vue +58 -46
  28. package/src/modules/orders/components/pages/Order.vue +63 -42
  29. package/src/modules/orders/components/sections/FormOrderDetails.vue +50 -18
  30. package/src/modules/orders/controllers/orders.controller.js +10 -1
  31. package/src/modules/orders/models/order.model.js +1 -0
  32. package/src/modules/orders/store/orders.js +21 -27
  33. package/src/modules/orders/store/shopcart.js +14 -2
  34. package/src/modules/organizations/components/sections/DetailsTab.vue +2 -2
  35. package/src/modules/products/components/sections/FilterProducts.vue +3 -4
  36. package/src/modules/products/components/sections/HeroRecommendation.vue +29 -2
  37. package/src/modules/products/components/sections/SectionProduct.vue +14 -9
  38. package/src/modules/products/controllers/products.controller.js +26 -17
  39. package/src/modules/products/routes/products.routes.js +6 -6
  40. package/src/modules/products/store/products.js +10 -10
  41. package/src/styles/config.scss +10 -3
@@ -68,13 +68,13 @@
68
68
  </h1>
69
69
 
70
70
  <p class="mn-b-medium p-big">
71
- <Text :text="organization.profile.description ? organization.profile.description : ''" :maxLen="240" />
71
+ <Text :text="organization.profile.description || ''" :maxLen="240" />
72
72
  </p>
73
73
 
74
74
 
75
75
 
76
76
  <Chips
77
- v-if="organization.profile.tags.length > 0"
77
+ v-if="organization.profile?.tags?.length > 0"
78
78
  :chips="organization.profile.tags"
79
79
  class="mn-b-semi"
80
80
  />
@@ -41,7 +41,7 @@
41
41
  :value="price.value"
42
42
  class="w-100 mn-t-small bg-white radius-small pd-small"
43
43
  :radio="marketplace.state.filter.prices"
44
- @update:radio="event => marketplace.state.filter.prices = event"
44
+ @update:radio="event => marketplace.state.filter.prices = event"
45
45
  />
46
46
  </template>
47
47
  </Spoiler>
@@ -49,13 +49,12 @@
49
49
  <hr class="mn-b-small">
50
50
 
51
51
  <!-- Delivery Filter -->
52
- <Spoiler
52
+ <!-- <Spoiler
53
53
  class="radius-small o-hidden br-1px br-solid br-grey mn-b-small"
54
54
  :status="false"
55
55
  >
56
56
  <template #header>
57
57
  <p class="cursor-pointer mn-r-auto t-medium p-big">Delivery</p>
58
- <!-- SVG Icon -->
59
58
  </template>
60
59
  <template #content>
61
60
  <Checkbox
@@ -70,7 +69,7 @@
70
69
  </template>
71
70
  </Spoiler>
72
71
 
73
- <hr class="mn-b-semi">
72
+ <hr class="mn-b-semi"> -->
74
73
 
75
74
  <!-- Reset filter -->
76
75
  <button @click="resetFilters" class="bg-main w-100 button">{{ t('filters.reset') }}</button>
@@ -302,11 +302,38 @@
302
302
 
303
303
  </div>
304
304
 
305
- <div class="w-100 h-100 pos-absolute pos-t-0 pos-r-0 z-index-0">
305
+ <div class="w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0">
306
+
307
+ <div style="background-image: url(/spiral.jpg)" class="spiral"></div>
306
308
  <!-- <canvas id="glcanvas" class="w-100 h-100"></canvas> -->
307
309
  </div>
308
310
 
309
311
  </div>
310
312
 
311
313
  </section>
312
- </template>
314
+ </template>
315
+
316
+ <style>
317
+ .spiral {
318
+
319
+ background-size: cover;
320
+ width: 100rem;
321
+ height: 100rem;
322
+ position: absolute;
323
+ top: 50%;
324
+ left: 50%;
325
+ opacity: 0.03;
326
+ transform: translate(-50%, -50%) rotate(0deg);
327
+ transform-origin: center center;
328
+ animation: spin 5s linear infinite;
329
+ }
330
+
331
+ @keyframes spin {
332
+ 0% {
333
+ transform: translate(-50%, -50%) rotate(0deg);
334
+ }
335
+ 100% {
336
+ transform: translate(-50%, -50%) rotate(360deg);
337
+ }
338
+ }
339
+ </style>
@@ -84,27 +84,32 @@
84
84
 
85
85
  <!-- Actions -->
86
86
  <div class="max-w-33rem mobile-w-100 t-white gap-small cols-2">
87
- <button
87
+ <Button
88
+ :submit="a => addToCart(product)"
88
89
  :disabled="validateToCard(product)"
89
- @click="addToCart(product)"
90
+ :text="{
91
+ success: ' ✔ Added',
92
+ error: 'error'
93
+ }"
90
94
  class="w-100 mn-r-small bg-main button"
91
- >
92
- {{ t('addtoorder') }}
93
- </button>
95
+ >
96
+ {{ t('addtoorder') }}
97
+ </Button>
94
98
  </div>
95
99
  </div>
96
100
  </div>
97
101
  </template>
98
102
 
99
103
  <script setup>
104
+ import Button from '@pf/src/components/Button/Button.vue'
105
+ import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
106
+ import PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'
107
+
100
108
  import Images360 from '@pf/src/modules/products/components/blocks/Images360.vue'
101
109
  import ImagesThumbnails from "@pf/src/modules/products/components/blocks/ImagesThumbnails.vue";
102
110
 
103
- import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
104
-
105
111
  import THC from '@pf/src/modules/products/components/elements/THC.vue'
106
112
  import Price from '@pf/src/modules/products/components/elements/Price.vue'
107
- import PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'
108
113
  // import SelectElement from '@/components/elements/SelectElement.vue'
109
114
 
110
115
  import { computed } from 'vue'
@@ -164,6 +169,6 @@ function addToCart(product) {
164
169
  shopcart.state.positions = []
165
170
  shopcart.state.organization = product.organization
166
171
  }
167
- shopcart.actions.addProductToCart(product)
172
+ shopcart.actions.addProductToCart(product, product.organization)
168
173
  }
169
174
  </script>
@@ -63,21 +63,29 @@ const controllerFactory = (db) => {
63
63
  const prices = req.query.prices?.split(',') || [];
64
64
 
65
65
  console.log(prices)
66
- console.log(req.query.prices)
67
-
68
66
  if (prices.length) {
69
- query.price = {
70
- $or: prices.map(priceRange => {
71
- if (priceRange.startsWith('<')) return { $lt: parseInt(priceRange.slice(1)) }
72
- if (priceRange.startsWith('>')) return { $gt: parseInt(priceRange.slice(1)) }
73
-
74
- const [min, max] = priceRange.split('-').map(Number)
75
-
76
- return { $gte: min, $lte: max }
77
- })
67
+ const priceConditions = prices.map(priceRange => {
68
+ if (priceRange.startsWith('<')) {
69
+ return { price: { $lt: parseInt(priceRange.slice(1)) } };
70
+ }
71
+ if (priceRange.startsWith('>')) {
72
+ return { price: { $gt: parseInt(priceRange.slice(1)) } };
73
+ }
74
+
75
+ const [min, max] = priceRange.split('-').map(Number);
76
+
77
+ return { price: { $gte: min, $lte: max } };
78
+ });
79
+
80
+ console.log(priceConditions)
81
+ if (priceConditions.length) {
82
+ query = {
83
+ ...query,
84
+ ...{ $or: priceConditions }
85
+ }
78
86
  }
79
87
  }
80
-
88
+
81
89
  // Handle pagination and sorting
82
90
  options.skip = parseInt(req.query.skip) || 0;
83
91
  options.limit = parseInt(req.query.limit) || 10;
@@ -262,12 +270,13 @@ const controllerFactory = (db) => {
262
270
  `).join(', ');
263
271
 
264
272
  const prompt = `
265
- 1. На вопрос как клиент хочет себя почувствовать - он ответил "${mood}".
266
- 2. Вот список товаров в нашем магазине: ${productsList}.
267
- 3. На основе информации о товарах (сорт, количество THC) и желания пользователя выбери 1 товар который порекомендовать пользователю.
268
- 4. Ответ должен быть на языке который пользователь использовал в ${mood}.
269
- 5. Пожалуйста, форматируйте ваш ответ в виде json объекта '{"_id": "_id рекомендтованого товара (он должен соответсовать одному из _id товаров, которые я прислал ","recommendationText": Текст почему именно этот товар'. Напишите только json объект без какого либо еще текста вне него.
273
+ 1. When asked how the client wants to feel, they responded "${mood}".
274
+ 2. Here is a list of products in our store: ${productsList}.
275
+ 3. Based on the information about the products (strain, THC content) and the user's desires, choose 1 product to recommend to the user.
276
+ 4. The response should be in the language that the user used in mood (${mood}).
277
+ 5. Please format your response as a JSON object '{"_id": "ID of the recommended product (it must correspond to one of the product IDs I sent)", "recommendationText": "Text explaining why this particular product"'. Write only the JSON object without any other text outside of it.
270
278
  `
279
+
271
280
 
272
281
  console.log(prompt)
273
282
 
@@ -13,22 +13,22 @@ module.exports = function(app, db, allowedOrigins) {
13
13
  });
14
14
  // (C) Create product
15
15
  app.post(
16
- "/products/create",
16
+ "/api/products/create",
17
17
  controller.Create
18
18
  );
19
19
  // (R) Read products
20
20
  app.get(
21
- "/products/read",
21
+ "/api/products/read",
22
22
  controller.Read
23
23
  );
24
24
  // (U) Update product
25
25
  app.post(
26
- "/products/:_id",
26
+ "/api/products/:_id",
27
27
  controller.Update
28
28
  );
29
29
  // (D) Delete product
30
30
  app.delete(
31
- "/products/:_id",
31
+ "/api/products/:_id",
32
32
  controller.Delete
33
33
  );
34
34
  // Get products
@@ -42,12 +42,12 @@ module.exports = function(app, db, allowedOrigins) {
42
42
  // );
43
43
  // // Get recommendation
44
44
  app.post(
45
- "/product/recommended",
45
+ "/api/product/recommended",
46
46
  controller.getProductRecommendation
47
47
  );
48
48
  // // Get product
49
49
  app.get(
50
- "/products/:_id",
50
+ "/api/products/:_id",
51
51
  controller.getProduct
52
52
  );
53
53
  };
@@ -41,7 +41,7 @@ const actions = {
41
41
  ...product,
42
42
  organization: organization
43
43
  }
44
- return await $axios.post("/products/create", newProduct).then(
44
+ return await $axios.post("/api/products/create", newProduct).then(
45
45
  (response) => {
46
46
  set(response.data, 'current')
47
47
  return Promise.resolve(response.data);
@@ -99,7 +99,7 @@ const actions = {
99
99
 
100
100
  console.log(query)
101
101
  try {
102
- const response = await $axios.get('/products/read', { params: query });
102
+ const response = await $axios.get('/api/products/read', { params: query });
103
103
 
104
104
  if (options._id) {
105
105
  state.current = {...response.data[0]};
@@ -115,7 +115,7 @@ const actions = {
115
115
  },
116
116
 
117
117
  async update(_id, product) {
118
- return await $axios.post("/products/" + _id, product).then(
118
+ return await $axios.post("/api/products/" + _id, product).then(
119
119
  (response) => {
120
120
  return Promise.resolve(response.data);
121
121
  },
@@ -127,7 +127,7 @@ const actions = {
127
127
  },
128
128
 
129
129
  async deleteProduct(_id) {
130
- return await $axios.delete("/products/" + _id).then(
130
+ return await $axios.delete("/api/products/" + _id).then(
131
131
  (response) => {
132
132
  return Promise.resolve(response.data);
133
133
  },
@@ -140,7 +140,7 @@ const actions = {
140
140
 
141
141
  async submitMood(presetMood = null) {
142
142
  console.log(presetMood)
143
- return $axios.post('/product/recommended', {mood: presetMood}).then(
143
+ return $axios.post('/api/product/recommended', {mood: presetMood}).then(
144
144
  response => {
145
145
  state.current = response.data.product
146
146
  state.current.recommendation = response.data.recommendationText
@@ -154,7 +154,7 @@ const actions = {
154
154
  },
155
155
 
156
156
  async fetchProducts() {
157
- return await $axios.get(`/products/read`).then(
157
+ return await $axios.get(`/api/products/read`).then(
158
158
  products => {
159
159
  state.all = products.data;
160
160
  return Promise.resolve(products.data);
@@ -167,7 +167,7 @@ const actions = {
167
167
  },
168
168
 
169
169
  async fetchProductsPopular() {
170
- return await $axios.get(`/products/popular`).then(
170
+ return await $axios.get(`/api/products/popular`).then(
171
171
  (products) => {
172
172
  state.popular = products.data;
173
173
  return Promise.resolve(products.data);
@@ -180,7 +180,7 @@ const actions = {
180
180
  },
181
181
 
182
182
  async fetchProductsPublished() {
183
- return await $axios.get(`/products`).then(
183
+ return await $axios.get(`/api/products`).then(
184
184
  products => {
185
185
  let publishedProduct = products.data.filter(function (product, index) {
186
186
  return product.status !== "unpublished";
@@ -205,7 +205,7 @@ const actions = {
205
205
 
206
206
  async fetchProduct(_id) {
207
207
  try {
208
- const response = await $axios.get("/products/" + _id);
208
+ const response = await $axios.get("/api/products/" + _id);
209
209
 
210
210
  console.log(response)
211
211
  state.current = response.data[0];
@@ -217,7 +217,7 @@ const actions = {
217
217
  },
218
218
 
219
219
  async fetchProductPopular() {
220
- return await $axios.get(`/products`).then(
220
+ return await $axios.get(`/api/products`).then(
221
221
  (products) => {
222
222
  state.all = products.data.slice(1, 5);
223
223
  return Promise.resolve(products.data.slice(1, 5));
@@ -156,6 +156,9 @@ $variables: (
156
156
 
157
157
  $rem: (
158
158
  '50r': 50rem,
159
+ '45r': 45rem,
160
+ '40r': 40rem,
161
+ '35r': 35rem,
159
162
  '30r': 30rem,
160
163
  '20r': 20rem,
161
164
  '15r': 15rem,
@@ -189,6 +192,7 @@ $percent: (
189
192
  '70': 70%,
190
193
  '66': 66%,
191
194
  '50': 50%,
195
+ '45': 45%,
192
196
  '40': 40%,
193
197
  '33': 33%,
194
198
  '25': 25%,
@@ -223,12 +227,15 @@ body {
223
227
  @include generate-utility-classes('h-max', 'max-height', null, $combined);
224
228
  @include generate-utility-classes('h-min', 'min-height', null, $combined);
225
229
 
230
+ @include generate-utility-classes('w-max', 'max-width', null, $combined);
231
+ @include generate-utility-classes('w-min', 'min-width', null, $combined);
232
+
226
233
  @include generate-utility-classes('radius', 'border-radius', null, $combined);
227
234
 
228
235
  @include generate-utility-classes('radius-tl', 'border-top-left-radius', null, $combined);
229
- @include generate-utility-classes('radius-br', 'border-top-right-radius-radius', null, $combined);
230
- @include generate-utility-classes('radius-tr', 'border-bottom-right-radius', null, $combined);
231
- @include generate-utility-classes('radius-bl', 'border-bottom-left-radius-radius', null, $combined);
236
+ @include generate-utility-classes('radius-br', 'border-bottom-right-radius', null, $combined);
237
+ @include generate-utility-classes('radius-tr', 'border-top-right-radius', null, $combined);
238
+ @include generate-utility-classes('radius-bl', 'border-bottom-left-radius', null, $combined);
232
239
 
233
240
  @include generate-bg-classes('bg-main', 'main');
234
241
  @include generate-bg-classes('bg-second', 'second');