@ozdao/prometheus-framework 0.2.36 → 0.2.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +42 -52
  4. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  6. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +39 -242
  8. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -0
  9. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -0
  10. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -0
  11. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -0
  12. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.cjs +1 -2
  13. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.js +13 -13
  14. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +111 -2
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
  18. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +43 -42
  20. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  21. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +61 -56
  22. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +1 -1
  24. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/events/store/events.js +59 -39
  26. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +31 -31
  28. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +85 -55
  30. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/store/orders.js +30 -38
  32. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +31 -21
  34. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +95 -92
  36. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +54 -74
  38. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +58 -48
  40. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/products/store/products.js +26 -26
  42. package/dist/prometheus-framework.cjs.js +18 -18
  43. package/dist/prometheus-framework.es.js +507 -493
  44. package/dist/style.css +1 -1
  45. package/package.json +1 -1
  46. package/src/modules/globals/store/globals.js +0 -1
@@ -1,25 +1,26 @@
1
- import { computed as y, openBlock as e, createElementBlock as r, createElementVNode as o, createBlock as l, createCommentVNode as i, createVNode as h, toDisplayString as n, unref as u, Fragment as w, renderList as k } from "vue";
2
- import x from "../blocks/Images360.vue.js";
3
- import z from "../blocks/ImagesThumbnails.vue.js";
4
- import I from "../../../icons/navigation/IconEdit.vue.js";
5
- import "../elements/THC.vue2.js";
6
- import C from "../elements/Price.vue.js";
1
+ import { computed as y, openBlock as e, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as i, createVNode as l, toDisplayString as s, unref as u, Fragment as w, renderList as k, withCtx as x, createTextVNode as z } from "vue";
2
+ import I from "../../../../components/Button/Button.vue2.js";
3
+ import C from "../../../icons/navigation/IconEdit.vue.js";
7
4
  import E from "../../../icons/placeholders/PlaceholderImage.vue.js";
8
- import { useI18n as P } from "vue-i18n";
9
- import { state as g, actions as $ } from "../../../orders/store/shopcart.js";
10
- const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-column flex pos-relative" }, S = { class: "h-100 h-max-50vh bg-grey radius-big o-hidden" }, T = ["src"], V = { class: "pos-relative w-100 h-100 flex-column flex-justify flex col" }, A = {
5
+ import P from "../blocks/Images360.vue.js";
6
+ import T from "../blocks/ImagesThumbnails.vue.js";
7
+ import "../elements/THC.vue2.js";
8
+ import V from "../elements/Price.vue.js";
9
+ import { useI18n as $ } from "vue-i18n";
10
+ import { state as g, actions as j } from "../../../orders/store/shopcart.js";
11
+ const A = { class: "cols-2-1_2 w-100 gap-big" }, N = { class: "flex-nowrap flex-column flex pos-relative" }, R = { class: "h-100 h-max-50vh bg-grey radius-big o-hidden" }, S = ["src"], B = { class: "pos-relative w-100 h-100 flex-column flex-justify flex col" }, F = {
11
12
  key: 0,
12
13
  class: "t-main t-semi p-big"
13
- }, B = { class: "w-100 h1-product mn-b-thin" }, F = {
14
+ }, L = { class: "w-100 h1-product mn-b-thin" }, q = {
14
15
  key: 1,
15
16
  class: "mn-b-semi"
16
- }, L = {
17
+ }, O = {
17
18
  key: 2,
18
19
  class: "w-100 mn-b-medium t-transp"
19
- }, N = {
20
+ }, D = {
20
21
  key: 3,
21
22
  class: "w-100 mn-b-medium t-transp"
22
- }, q = { class: "cols-2 w-100 gap-small mn-b-semi" }, O = { class: "w-100 pd-small radius-small bg-grey-transp-30 product-information" }, D = { class: "t-demi" }, U = { class: "max-w-33rem mobile-w-100 t-white gap-small cols-2" }, Y = ["disabled"], _ = {
23
+ }, U = { class: "cols-2 w-100 gap-small mn-b-semi" }, Y = { class: "w-100 pd-small radius-small bg-grey-transp-30 product-information" }, G = { class: "t-demi" }, H = { class: "max-w-33rem mobile-w-100 t-white gap-small cols-2" }, ot = {
23
24
  __name: "SectionProduct",
24
25
  props: {
25
26
  product: {
@@ -31,7 +32,7 @@ const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-
31
32
  }
32
33
  },
33
34
  setup(t) {
34
- const f = t, s = y(() => f.product.images), p = {
35
+ const f = t, n = y(() => f.product.images), b = {
35
36
  messages: {
36
37
  en: {
37
38
  airecommend: "AI Recommends You",
@@ -46,43 +47,43 @@ const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-
46
47
  fastorder: "Быстрый заказ"
47
48
  }
48
49
  }
49
- }, { t: m } = P(p);
50
- function b(a) {
51
- return !(a.quantity > 0);
50
+ }, { t: c } = $(b);
51
+ function p(o) {
52
+ return !(o.quantity > 0);
52
53
  }
53
- function v(a) {
54
- g.organization !== a.organization && (g.positions = [], g.organization = a.organization), $.addProductToCart(a);
54
+ function v(o) {
55
+ g.organization !== o.organization && (g.positions = [], g.organization = o.organization), j.addProductToCart(o, o.organization);
55
56
  }
56
- return (a, d) => (e(), r("div", j, [
57
- o("div", R, [
58
- o("div", S, [
59
- t.product && t.product.image3d ? (e(), l(x, {
57
+ return (o, h) => (e(), a("div", A, [
58
+ r("div", N, [
59
+ r("div", R, [
60
+ t.product && t.product.image3d ? (e(), m(P, {
60
61
  key: 0,
61
62
  class: "h-100 w-100",
62
63
  imagePath: `/assets/images/products/${t.product.image3d}`,
63
64
  imageCount: 36
64
65
  }, null, 8, ["imagePath"])) : i("", !0),
65
- s.value[0] && !t.product.image3d ? (e(), r("img", {
66
+ n.value[0] && !t.product.image3d ? (e(), a("img", {
66
67
  key: 1,
67
68
  class: "h-100 bg-grey w-100",
68
69
  style: { "object-fit": "contain" },
69
- src: (a.FILE_SERVER_URL || "") + s.value[0]
70
- }, null, 8, T)) : i("", !0),
71
- !s.value[0] && !t.product.image3d ? (e(), l(E, {
70
+ src: (o.FILE_SERVER_URL || "") + n.value[0]
71
+ }, null, 8, S)) : i("", !0),
72
+ !n.value[0] && !t.product.image3d ? (e(), m(E, {
72
73
  key: 2,
73
74
  class: "h-100 w-100",
74
75
  style: { "object-fit": "cover" }
75
76
  })) : i("", !0)
76
77
  ]),
77
- s.value.length > 1 ? (e(), l(z, {
78
+ n.value.length > 1 ? (e(), m(T, {
78
79
  key: 0,
79
- images: s.value,
80
+ images: n.value,
80
81
  class: "mn-t-medium"
81
82
  }, null, 8, ["images"])) : i("", !0)
82
83
  ]),
83
- o("div", V, [
84
- h(I, {
85
- onClick: d[0] || (d[0] = (c) => a.$router.push({
84
+ r("div", B, [
85
+ l(C, {
86
+ onClick: h[0] || (h[0] = (d) => o.$router.push({
86
87
  name: "ProductEdit",
87
88
  params: {
88
89
  _id: t.product.organization,
@@ -91,33 +92,42 @@ const j = { class: "cols-2-1_2 w-100 gap-big" }, R = { class: "flex-nowrap flex-
91
92
  })),
92
93
  class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
93
94
  }),
94
- t.recommendation ? (e(), r("h2", A, n(u(m)("airecommend")), 1)) : i("", !0),
95
- o("h1", B, n(t.product.name), 1),
96
- h(C, {
95
+ t.recommendation ? (e(), a("h2", F, s(u(c)("airecommend")), 1)) : i("", !0),
96
+ r("h1", L, s(t.product.name), 1),
97
+ l(V, {
97
98
  product: t.product,
98
99
  size: "big",
99
100
  class: "mn-b-semi"
100
101
  }, null, 8, ["product"]),
101
- t.recommendation ? (e(), r("h3", F, n(t.recommendation), 1)) : i("", !0),
102
- t.product.description && !t.product.localization < 1 && !t.recommendation ? (e(), r("p", L, n(t.product.description), 1)) : i("", !0),
103
- t.product.localization && t.product.localization.length > 1 && !t.recommendation ? (e(), r("p", N, n(u(m)("description")), 1)) : i("", !0),
104
- o("div", q, [
105
- t.product.information.length > 0 ? (e(!0), r(w, { key: 0 }, k(t.product.information, (c) => (e(), r("div", O, [
106
- o("p", D, n(c.name), 1),
107
- o("p", null, n(c.value), 1)
102
+ t.recommendation ? (e(), a("h3", q, s(t.recommendation), 1)) : i("", !0),
103
+ t.product.description && !t.product.localization < 1 && !t.recommendation ? (e(), a("p", O, s(t.product.description), 1)) : i("", !0),
104
+ t.product.localization && t.product.localization.length > 1 && !t.recommendation ? (e(), a("p", D, s(u(c)("description")), 1)) : i("", !0),
105
+ r("div", U, [
106
+ t.product.information.length > 0 ? (e(!0), a(w, { key: 0 }, k(t.product.information, (d) => (e(), a("div", Y, [
107
+ r("p", G, s(d.name), 1),
108
+ r("p", null, s(d.value), 1)
108
109
  ]))), 256)) : i("", !0)
109
110
  ]),
110
- o("div", U, [
111
- o("button", {
112
- disabled: b(t.product),
113
- onClick: d[1] || (d[1] = (c) => v(t.product)),
111
+ r("div", H, [
112
+ l(I, {
113
+ submit: (d) => v(t.product),
114
+ disabled: p(t.product),
115
+ text: {
116
+ success: " ✔ Added",
117
+ error: "error"
118
+ },
114
119
  class: "w-100 mn-r-small bg-main button"
115
- }, n(u(m)("addtoorder")), 9, Y)
120
+ }, {
121
+ default: x(() => [
122
+ z(s(u(c)("addtoorder")), 1)
123
+ ]),
124
+ _: 1
125
+ }, 8, ["submit", "disabled"])
116
126
  ])
117
127
  ])
118
128
  ]));
119
129
  }
120
130
  };
121
131
  export {
122
- _ as default
132
+ ot as default
123
133
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),c=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingridients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await c.post("/products/create",a).then(i=>(d(i.data,"current"),Promise.resolve(i.data)),i=>(s.setError(i),Promise.reject(i)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),r.sort="createdAt",r.skip=e.skip||0,r.limit=e.limit||10,console.log(r);try{const a=await c.get("/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await c.post("/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await c.delete("/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return console.log(e),c.post("/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(console.log(r),s.setError(r),Promise.reject(r)))},async fetchProducts(){return await c.get("/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await c.get("/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await c.get("/products").then(e=>{let r=e.data.filter(function(a,i){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,i){return a[t.sort.current]>i[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<i[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await c.get("/products/"+e);return console.log(r),t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await c.get("/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function d(e,r){t[r]=e}n.watch(t,(e,r)=>{});exports.actions=u;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),i=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingridients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(d(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),r.sort="createdAt",r.skip=e.skip||0,r.limit=e.limit||10,console.log(r);try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return console.log(e),i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(console.log(r),s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return console.log(r),t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function d(e,r){t[r]=e}n.watch(t,(e,r)=>{});exports.actions=u;exports.state=t;
@@ -1,7 +1,7 @@
1
1
  import { reactive as n, watch as o } from "vue";
2
2
  import u from "../../../../node_modules/axios/lib/axios.js";
3
- import { setError as c } from "../../globals/store/globals.js";
4
- const s = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
3
+ import { setError as i } from "../../globals/store/globals.js";
4
+ const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
5
5
  all: [],
6
6
  current: {
7
7
  recommendation: !1,
@@ -26,76 +26,76 @@ const s = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n
26
26
  ...t,
27
27
  organization: e
28
28
  };
29
- return await s.post("/products/create", a).then(
30
- (i) => (d(i.data, "current"), Promise.resolve(i.data)),
31
- (i) => (c(i), Promise.reject(i))
29
+ return await c.post("/api/products/create", a).then(
30
+ (s) => (d(s.data, "current"), Promise.resolve(s.data)),
31
+ (s) => (i(s), Promise.reject(s))
32
32
  );
33
33
  },
34
34
  async read(e = {}) {
35
35
  let t = {};
36
36
  e._id && (t._id = e._id), e.category && (t.category = e.category), e.organization && (t.organization = e.organization), e.count && (t.count = e.count), e.categories && (t.categories = e.categories), e.prices && (t.prices = e.prices), e.delivery && (t.delivery = e.delivery), e.status && (t.status = e.status), t.sort = "createdAt", t.skip = e.skip || 0, t.limit = e.limit || 10, console.log(t);
37
37
  try {
38
- const a = await s.get("/products/read", { params: t });
38
+ const a = await c.get("/api/products/read", { params: t });
39
39
  return e._id ? (r.current = { ...a.data[0] }, Promise.resolve(a.data[0])) : Promise.resolve(a.data);
40
40
  } catch (a) {
41
- return c(a), Promise.reject(a);
41
+ return i(a), Promise.reject(a);
42
42
  }
43
43
  },
44
44
  async update(e, t) {
45
- return await s.post("/products/" + e, t).then(
45
+ return await c.post("/api/products/" + e, t).then(
46
46
  (a) => Promise.resolve(a.data),
47
- (a) => (c(a), Promise.reject(a))
47
+ (a) => (i(a), Promise.reject(a))
48
48
  );
49
49
  },
50
50
  async deleteProduct(e) {
51
- return await s.delete("/products/" + e).then(
51
+ return await c.delete("/api/products/" + e).then(
52
52
  (t) => Promise.resolve(t.data),
53
- (t) => (c(t), Promise.reject(t))
53
+ (t) => (i(t), Promise.reject(t))
54
54
  );
55
55
  },
56
56
  async submitMood(e = null) {
57
- return console.log(e), s.post("/product/recommended", { mood: e }).then(
57
+ return console.log(e), c.post("/api/product/recommended", { mood: e }).then(
58
58
  (t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
59
- (t) => (console.log(t), c(t), Promise.reject(t))
59
+ (t) => (console.log(t), i(t), Promise.reject(t))
60
60
  );
61
61
  },
62
62
  async fetchProducts() {
63
- return await s.get("/products/read").then(
63
+ return await c.get("/api/products/read").then(
64
64
  (e) => (r.all = e.data, Promise.resolve(e.data)),
65
- (e) => (c(e), Promise.reject(e))
65
+ (e) => (i(e), Promise.reject(e))
66
66
  );
67
67
  },
68
68
  async fetchProductsPopular() {
69
- return await s.get("/products/popular").then(
69
+ return await c.get("/api/products/popular").then(
70
70
  (e) => (r.popular = e.data, Promise.resolve(e.data)),
71
- (e) => (c(e), Promise.reject(e))
71
+ (e) => (i(e), Promise.reject(e))
72
72
  );
73
73
  },
74
74
  async fetchProductsPublished() {
75
- return await s.get("/products").then(
75
+ return await c.get("/api/products").then(
76
76
  (e) => {
77
- let t = e.data.filter(function(a, i) {
77
+ let t = e.data.filter(function(a, s) {
78
78
  return a.status !== "unpublished";
79
79
  });
80
- return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, i) {
81
- return a[r.sort.current] > i[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < i[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
80
+ return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, s) {
81
+ return a[r.sort.current] > s[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < s[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
82
82
  }), Promise.resolve(e.data);
83
83
  },
84
- (e) => (c(e), Promise.reject(e))
84
+ (e) => (i(e), Promise.reject(e))
85
85
  );
86
86
  },
87
87
  async fetchProduct(e) {
88
88
  try {
89
- const t = await s.get("/products/" + e);
89
+ const t = await c.get("/api/products/" + e);
90
90
  return console.log(t), r.current = t.data[0], Promise.resolve(t.data[0]);
91
91
  } catch (t) {
92
- return c(t), Promise.reject(t);
92
+ return i(t), Promise.reject(t);
93
93
  }
94
94
  },
95
95
  async fetchProductPopular() {
96
- return await s.get("/products").then(
96
+ return await c.get("/api/products").then(
97
97
  (e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
98
- (e) => (c(e), Promise.reject(e))
98
+ (e) => (i(e), Promise.reject(e))
99
99
  );
100
100
  }
101
101
  };