@ozdao/prometheus-framework 0.1.62 → 0.1.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-30022293.js +1 -0
- package/dist/BackofficeGallery-f64daa0d.mjs +264 -0
- package/dist/BackofficeReports-cb4b180d.mjs +44 -0
- package/dist/BackofficeReports-d021871f.js +1 -0
- package/dist/BlockTags-8cddaef7.js +1 -0
- package/dist/BlockTags-ee310572.mjs +853 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Button-7643c9aa.js +1 -0
- package/dist/Button-9e1a9284.mjs +226 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/ButtonToggleMembership-7ee4dc8e.mjs +90 -0
- package/dist/ButtonToggleMembership-b9352cec.js +1 -0
- package/dist/CardBlogpost-3c92fbc9.mjs +246 -0
- package/dist/CardBlogpost-c7364b1e.js +1 -0
- package/dist/CardOrganization-647cb571.js +1 -0
- package/dist/CardOrganization-facb77f7.mjs +234 -0
- package/dist/CardProduct-92affca1.js +1 -0
- package/dist/CardProduct-fca53299.mjs +193 -0
- package/dist/Checkbox-5dbe7b23.mjs +62 -0
- package/dist/Checkbox-76f09248.js +1 -0
- package/dist/Chips-0fdb31c9.js +1 -0
- package/dist/Chips-f1a0d085.mjs +214 -0
- package/dist/Community-534d473c.mjs +132 -0
- package/dist/Community-e9aff969.js +1 -0
- package/dist/Dashboard-91d73bc5.js +1 -0
- package/dist/Dashboard-ea9035bc.mjs +152 -0
- package/dist/Dropdown-31115457.js +1 -0
- package/dist/Dropdown-cab3605b.mjs +146 -0
- package/dist/EULA-aba6a807.js +1 -0
- package/dist/EULA-e05236af.mjs +4210 -0
- package/dist/EditOrder-94bbebff.mjs +221 -0
- package/dist/EditOrder-c070d474.js +1 -0
- package/dist/EmptyState-d65bab5b.js +1 -0
- package/dist/EmptyState-e404b05d.mjs +36 -0
- package/dist/Events-46ae8fc6.mjs +123 -0
- package/dist/Events-813c8c7b.js +1 -0
- package/dist/Feed-2d443ad2.mjs +146 -0
- package/dist/Feed-3a4e7a9c.js +1 -0
- package/dist/Feed-8b554fc1.js +1 -0
- package/dist/Feed-98b47c6f.js +1 -0
- package/dist/Feed-a21d6007.mjs +124 -0
- package/dist/Feed-b39138c8.js +1 -0
- package/dist/Feed-c41ef736.mjs +361 -0
- package/dist/Feed-d114330c.mjs +112 -0
- package/dist/Field-e2a43424.js +1 -0
- package/dist/Field-e5ad88d3.mjs +75 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js +1 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs +1 -0
- package/dist/Gallery-46b5f939.js +1 -0
- package/dist/Gallery-762a9c2d.mjs +241 -0
- package/dist/IconChevronRight-a55f838e.js +1 -0
- package/dist/IconChevronRight-fae9d012.mjs +28 -0
- package/dist/IconCommunity-468dc457.mjs +65 -0
- package/dist/IconCommunity-b339e806.js +1 -0
- package/dist/IconCross-5bf93179.js +1 -0
- package/dist/IconCross-84cb1292.mjs +28 -0
- package/dist/IconEdit-9edfd74d.mjs +21 -0
- package/dist/IconEdit-c0469b45.js +1 -0
- package/dist/Image-4dcfddb8.js +9 -0
- package/dist/Image-e0da17ac.mjs +571 -0
- package/dist/LabelGooglePlay-24feb437.mjs +31 -0
- package/dist/LabelGooglePlay-f80e5ff0.js +1 -0
- package/dist/LeftoverAdd-5a8988d9.js +1 -0
- package/dist/LeftoverAdd-c4f37f47.mjs +227 -0
- package/dist/Leftovers-470a1689.js +1 -0
- package/dist/Leftovers-69c7dcd9.mjs +136 -0
- package/dist/Loader-21f016da.js +1 -0
- package/dist/Loader-cd422786.mjs +41 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Members-04273cd4.mjs +114 -0
- package/dist/Members-0685a15f.js +1 -0
- package/dist/Menu-b5d6a0c7.js +1 -0
- package/dist/Menu-dd7645c1.mjs +13 -0
- package/dist/MenuItem-56ae7f94.js +1 -0
- package/dist/MenuItem-6296d02f.mjs +63 -0
- package/dist/Orders-b64e8cb9.js +1 -0
- package/dist/Orders-ff30db05.mjs +75 -0
- package/dist/Organizations-46aab2c8.mjs +73 -0
- package/dist/Organizations-a8627bc5.js +1 -0
- package/dist/Payments-53e5fecf.js +1 -0
- package/dist/Payments-82e545e1.mjs +87 -0
- package/dist/PlaceholderUserpic-14c6ea7e.mjs +28 -0
- package/dist/PlaceholderUserpic-47f6f319.js +1 -0
- package/dist/Popup-0915427c.mjs +74 -0
- package/dist/Popup-795f5c88.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Product-7e001b81.js +7 -0
- package/dist/Product-f3f42158.mjs +653 -0
- package/dist/ProductEdit-959b3cd3.mjs +295 -0
- package/dist/ProductEdit-bae5e898.js +1 -0
- package/dist/ProductsBackoffice-0716123f.js +1 -0
- package/dist/ProductsBackoffice-a36ecbc6.mjs +85 -0
- package/dist/ProfileBlogposts-c790d1b2.js +1 -0
- package/dist/ProfileBlogposts-f43cf32e.mjs +79 -0
- package/dist/ProfileEvents-12f80fff.mjs +70 -0
- package/dist/ProfileEvents-585570a3.js +1 -0
- package/dist/ProfileOrganizations-bbc2cf40.mjs +73 -0
- package/dist/ProfileOrganizations-d7103514.js +1 -0
- package/dist/Publics-094f3c2c.mjs +45 -0
- package/dist/Publics-1032c0f4.js +1 -0
- package/dist/Select-11ddabf5.mjs +79 -0
- package/dist/Select-3ca5ab39.js +1 -0
- package/dist/SelectMulti-58704d69.mjs +1038 -0
- package/dist/SelectMulti-c25765cf.js +1 -0
- package/dist/SkeletonBlogpost-95db0fa9.js +1 -0
- package/dist/SkeletonBlogpost-e0621af7.mjs +16 -0
- package/dist/SkeletonEvent-8690422d.mjs +16 -0
- package/dist/SkeletonEvent-eb284de8.js +1 -0
- package/dist/SkeletonEventShort-6c9e3940.js +1 -0
- package/dist/SkeletonEventShort-f030e56f.mjs +16 -0
- package/dist/SkeletonOrganization-5c09cfc5.js +1 -0
- package/dist/SkeletonOrganization-8690422d.mjs +16 -0
- package/dist/Socials-31c06635.mjs +74 -0
- package/dist/Socials-cceaeaf2.js +1 -0
- package/dist/Tab-054b61f7.mjs +46 -0
- package/dist/Tab-2c1e4224.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Upload-06d93178.js +1 -0
- package/dist/Upload-23212d9d.mjs +74 -0
- package/dist/UploadImage-0f488170.js +1 -0
- package/dist/UploadImage-3c627d89.mjs +83 -0
- package/dist/UploadImageMultiple-cb6c7188.mjs +58 -0
- package/dist/UploadImageMultiple-eddaac87.js +1 -0
- package/dist/Wallet-2043b611.mjs +24682 -0
- package/dist/Wallet-8fa7386a.js +55 -0
- package/dist/_plugin-vue_export-helper-dad06003.mjs +9 -0
- package/dist/_plugin-vue_export-helper-f246444f.js +1 -0
- package/dist/auth-56dc2ba7.mjs +607 -0
- package/dist/auth-f018f5b3.js +7 -0
- package/dist/auth.client.cjs +7 -0
- package/dist/auth.client.js +3874 -0
- package/dist/auth.validation-c31a60e7.mjs +24 -0
- package/dist/auth.validation-d049b341.js +1 -0
- package/dist/backoffice.client.cjs +1 -0
- package/dist/backoffice.client.js +265 -0
- package/dist/carousel.es-44c501bc.mjs +383 -0
- package/dist/carousel.es-cdfb392c.js +5 -0
- package/dist/categories-5b08da53.mjs +121 -0
- package/dist/categories-7ccd6be9.js +1 -0
- package/dist/click-outside-0b0727d1.js +2 -0
- package/dist/click-outside-6101836c.mjs +19 -0
- package/dist/community.client.cjs +1 -0
- package/dist/community.client.js +692 -0
- package/dist/dribbble-8e8e169b.js +1 -0
- package/dist/dribbble-ae37c2ac.mjs +127 -0
- package/dist/events.client.cjs +2 -0
- package/dist/events.client.js +8885 -0
- package/dist/files.client.cjs +1 -0
- package/dist/files.client.js +1 -0
- package/dist/gallery-d4297191.mjs +54 -0
- package/dist/gallery-f92912df.js +1 -0
- package/dist/gallery.client.cjs +1 -0
- package/dist/gallery.client.js +18 -0
- package/dist/globals-928eb13c.js +1 -0
- package/dist/globals-96ba60e4.mjs +91 -0
- package/dist/globals.client.cjs +1 -0
- package/dist/globals.client.js +12 -0
- package/dist/icons.client.cjs +1 -0
- package/dist/icons.client.js +84 -0
- package/dist/index-a661083c.mjs +934 -0
- package/dist/index-b41aac19.js +2 -0
- package/dist/inputs.validation-d7cef32b.js +1 -0
- package/dist/inputs.validation-db65277a.mjs +83 -0
- package/dist/landing.client.cjs +1 -0
- package/dist/landing.client.js +111 -0
- package/dist/leftovers-5d1ff88b.mjs +67 -0
- package/dist/leftovers-b60180cf.js +1 -0
- package/dist/legal.client.cjs +1 -0
- package/dist/legal.client.js +8512 -0
- package/dist/memberships-12210953.mjs +68 -0
- package/dist/memberships-393765d8.js +1 -0
- package/dist/middlewares.client.cjs +1 -0
- package/dist/middlewares.client.js +1 -0
- package/dist/orders-13c10d49.mjs +85 -0
- package/dist/orders-37f041aa.js +1 -0
- package/dist/organizations-587d5a4d.mjs +122 -0
- package/dist/organizations-b4d902a2.js +1 -0
- package/dist/organizations.client-35b74e44.mjs +2997 -0
- package/dist/organizations.client-f982f55a.js +3 -0
- package/dist/organizations.client.cjs +1 -0
- package/dist/organizations.client.js +86 -0
- package/dist/products-3c43eb18.js +1 -0
- package/dist/products-943fb95e.mjs +107 -0
- package/dist/prometheus-framework.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +2208 -2198
- package/dist/reports-270f69df.js +1 -0
- package/dist/reports-79cd9459.mjs +91 -0
- package/dist/reports.client.cjs +1 -0
- package/dist/reports.client.js +8 -0
- package/dist/states.validation-3b70f83a.js +1 -0
- package/dist/states.validation-944e334c.mjs +13 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -0
- package/dist/users.client.js +632 -0
- package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
- package/dist/vue-draggable-next.esm-bundler-ff6e3f52.mjs +1557 -0
- package/dist/vuex.esm-bundler-57d8b6ba.mjs +750 -0
- package/dist/vuex.esm-bundler-685cf29f.js +5 -0
- package/package.json +1 -1
@@ -0,0 +1,68 @@
|
|
1
|
+
import { a as d } from "./index-a661083c.mjs";
|
2
|
+
import { reactive as u, watch as h } from "vue";
|
3
|
+
import { s as n } from "./globals-96ba60e4.mjs";
|
4
|
+
const c = d.create({
|
5
|
+
baseURL: process.env.API_URL,
|
6
|
+
withCredentials: !0
|
7
|
+
}), o = u({
|
8
|
+
memberships: [],
|
9
|
+
error: null
|
10
|
+
}), y = {
|
11
|
+
async read({ user: r, type: e, target: a, role: p }) {
|
12
|
+
try {
|
13
|
+
const s = await c.get("/api/memberships", { params: { user: r, type: e, target: a, role: p } });
|
14
|
+
return o.error = null, o.memberships = s.data, Promise.resolve(s.data);
|
15
|
+
} catch (s) {
|
16
|
+
return n(s), Promise.reject(s);
|
17
|
+
}
|
18
|
+
},
|
19
|
+
async create(r) {
|
20
|
+
try {
|
21
|
+
const e = await c.post("/api/memberships/create", r);
|
22
|
+
return o.error = null, Promise.resolve(e.data);
|
23
|
+
} catch (e) {
|
24
|
+
return n(e), Promise.reject(e);
|
25
|
+
}
|
26
|
+
},
|
27
|
+
async update(r) {
|
28
|
+
try {
|
29
|
+
const e = await c.post("/api/memberships/update", r);
|
30
|
+
return o.error = null, Promise.resolve(e.data);
|
31
|
+
} catch (e) {
|
32
|
+
return n(e), Promise.reject(e);
|
33
|
+
}
|
34
|
+
},
|
35
|
+
async delete(r) {
|
36
|
+
try {
|
37
|
+
const e = await c.post("/api/memberships/delete", r);
|
38
|
+
return o.error = null, Promise.resolve(e.data);
|
39
|
+
} catch (e) {
|
40
|
+
return n(e), Promise.reject(e);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}, b = {
|
44
|
+
handleMembershipUpdate(r, e, a, p, s, m) {
|
45
|
+
let t;
|
46
|
+
if (Array.isArray(r) ? t = r.find((i) => i._id === e.target) : typeof r == "object" && r._id === e.target && (t = r), t)
|
47
|
+
if (t[s] = a, a)
|
48
|
+
t.memberships.push(e), t[m] += 1;
|
49
|
+
else {
|
50
|
+
const i = t.memberships.findIndex((l) => l._id === e._id);
|
51
|
+
i !== -1 && (t.memberships.splice(i, 1), t[m] -= 1);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
};
|
55
|
+
h(o, (r) => {
|
56
|
+
});
|
57
|
+
const j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
58
|
+
__proto__: null,
|
59
|
+
actions: y,
|
60
|
+
mutations: b,
|
61
|
+
state: o
|
62
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
63
|
+
export {
|
64
|
+
y as a,
|
65
|
+
j as b,
|
66
|
+
b as m,
|
67
|
+
o as s
|
68
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const b=require("./index-b41aac19.js"),m=require("vue"),n=require("./globals-928eb13c.js"),c=b.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),s=m.reactive({memberships:[],error:null}),u={async read({user:r,type:e,target:i,role:p}){try{const o=await c.get("/api/memberships",{params:{user:r,type:e,target:i,role:p}});return s.error=null,s.memberships=o.data,Promise.resolve(o.data)}catch(o){return n.setError(o),Promise.reject(o)}},async create(r){try{const e=await c.post("/api/memberships/create",r);return s.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}},async update(r){try{const e=await c.post("/api/memberships/update",r);return s.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}},async delete(r){try{const e=await c.post("/api/memberships/delete",r);return s.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}}},d={handleMembershipUpdate(r,e,i,p,o,l){let t;if(Array.isArray(r)?t=r.find(a=>a._id===e.target):typeof r=="object"&&r._id===e.target&&(t=r),t)if(t[o]=i,i)t.memberships.push(e),t[l]+=1;else{const a=t.memberships.findIndex(h=>h._id===e._id);a!==-1&&(t.memberships.splice(a,1),t[l]-=1)}}};m.watch(s,r=>{});const y=Object.freeze(Object.defineProperty({__proto__:null,actions:u,mutations:d,state:s},Symbol.toStringTag,{value:"Module"}));exports.actions=u;exports.memberships=y;exports.mutations=d;exports.state=s;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import { reactive as i, watch as l } from "vue";
|
2
|
+
import { a as d } from "./index-a661083c.mjs";
|
3
|
+
import { s as o } from "./globals-96ba60e4.mjs";
|
4
|
+
const n = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = i({
|
5
|
+
all: [],
|
6
|
+
current: {
|
7
|
+
_id: "",
|
8
|
+
items: [],
|
9
|
+
status: !1,
|
10
|
+
comment: "",
|
11
|
+
user: {
|
12
|
+
_id: !1,
|
13
|
+
name: "",
|
14
|
+
phone: "",
|
15
|
+
messenger: {
|
16
|
+
type: "",
|
17
|
+
value: ""
|
18
|
+
}
|
19
|
+
},
|
20
|
+
payment: {
|
21
|
+
type: "",
|
22
|
+
status: ""
|
23
|
+
},
|
24
|
+
delivery: {
|
25
|
+
type: "",
|
26
|
+
address: "",
|
27
|
+
status: ""
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}), f = {
|
31
|
+
async create(e) {
|
32
|
+
try {
|
33
|
+
t.current.items = e, console.log(t.current);
|
34
|
+
const a = await n.post("/api/orders/create", t.current);
|
35
|
+
console.log(a), t.all.push(a.data);
|
36
|
+
} catch (a) {
|
37
|
+
o(a);
|
38
|
+
}
|
39
|
+
},
|
40
|
+
async read(e) {
|
41
|
+
try {
|
42
|
+
const a = await n.get("/api/orders/read");
|
43
|
+
console.log(a), t.all = a.data;
|
44
|
+
} catch (a) {
|
45
|
+
o(a);
|
46
|
+
}
|
47
|
+
},
|
48
|
+
async update(e, a) {
|
49
|
+
try {
|
50
|
+
const s = await n.post(`/api/orders/${e}`, a), r = t.all.findIndex((c) => c._id === e);
|
51
|
+
r !== -1 && (t.all[r] = s.data);
|
52
|
+
} catch (s) {
|
53
|
+
o(s);
|
54
|
+
}
|
55
|
+
},
|
56
|
+
async confirm(e) {
|
57
|
+
try {
|
58
|
+
const a = await n.post(`/api/orders/confirm/${e}`), s = t.all.findIndex((r) => r._id === e);
|
59
|
+
s !== -1 && (t.all[s] = a.data);
|
60
|
+
} catch (a) {
|
61
|
+
o(a);
|
62
|
+
}
|
63
|
+
},
|
64
|
+
async changePaymentStatus(e, a) {
|
65
|
+
try {
|
66
|
+
const s = await n.post(`/api/orders/payment/${e}`, { status: a }), r = t.all.findIndex((c) => c._id === e);
|
67
|
+
r !== -1 && (t.all[r] = s.data);
|
68
|
+
} catch (s) {
|
69
|
+
o(s);
|
70
|
+
}
|
71
|
+
},
|
72
|
+
async delete(e) {
|
73
|
+
try {
|
74
|
+
await n.delete(`/api/orders/${e}`), t.all = t.all.filter((a) => a._id !== e);
|
75
|
+
} catch (a) {
|
76
|
+
o(a);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
};
|
80
|
+
l(t, (e, a) => {
|
81
|
+
});
|
82
|
+
export {
|
83
|
+
f as a,
|
84
|
+
t as s
|
85
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const i=require("vue"),l=require("./index-b41aac19.js"),o=require("./globals-928eb13c.js"),n=l.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),r=i.reactive({all:[],current:{_id:"",items:[],status:!1,comment:"",user:{_id:!1,name:"",phone:"",messenger:{type:"",value:""}},payment:{type:"",status:""},delivery:{type:"",address:"",status:""}}}),d={async create(t){try{r.current.items=t,console.log(r.current);const e=await n.post("/api/orders/create",r.current);console.log(e),r.all.push(e.data)}catch(e){o.setError(e)}},async read(t){try{const e=await n.get("/api/orders/read");console.log(e),r.all=e.data}catch(e){o.setError(e)}},async update(t,e){try{const a=await n.post(`/api/orders/${t}`,e),s=r.all.findIndex(c=>c._id===t);s!==-1&&(r.all[s]=a.data)}catch(a){o.setError(a)}},async confirm(t){try{const e=await n.post(`/api/orders/confirm/${t}`),a=r.all.findIndex(s=>s._id===t);a!==-1&&(r.all[a]=e.data)}catch(e){o.setError(e)}},async changePaymentStatus(t,e){try{const a=await n.post(`/api/orders/payment/${t}`,{status:e}),s=r.all.findIndex(c=>c._id===t);s!==-1&&(r.all[s]=a.data)}catch(a){o.setError(a)}},async delete(t){try{await n.delete(`/api/orders/${t}`),r.all=r.all.filter(e=>e._id!==t)}catch(e){o.setError(e)}}};i.watch(r,(t,e)=>{});exports.actions=d;exports.state=r;
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import { a as i } from "./index-a661083c.mjs";
|
2
|
+
import { C as m } from "./auth-56dc2ba7.mjs";
|
3
|
+
import { reactive as u, watch as d } from "vue";
|
4
|
+
import { s as c } from "./globals-96ba60e4.mjs";
|
5
|
+
const t = i.create({ baseURL: process.env.API_URL, withCredentials: !0 }), s = u({
|
6
|
+
all: [],
|
7
|
+
current: {
|
8
|
+
_id: null,
|
9
|
+
profile: {
|
10
|
+
tags: [],
|
11
|
+
photo: "",
|
12
|
+
name: "",
|
13
|
+
description: ""
|
14
|
+
},
|
15
|
+
structure: [],
|
16
|
+
owner: null,
|
17
|
+
types: "",
|
18
|
+
contacts: {
|
19
|
+
email: "",
|
20
|
+
website: "",
|
21
|
+
phone: "",
|
22
|
+
address: ""
|
23
|
+
},
|
24
|
+
socials: {
|
25
|
+
telegram: "",
|
26
|
+
line: "",
|
27
|
+
facebook: "",
|
28
|
+
instagram: ""
|
29
|
+
},
|
30
|
+
rating: {
|
31
|
+
popularity: 0,
|
32
|
+
median: 0,
|
33
|
+
amount: 0
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}), g = {
|
37
|
+
// Create
|
38
|
+
async create(a, e) {
|
39
|
+
a.owner = e;
|
40
|
+
try {
|
41
|
+
const r = await t.post("/api/organizations/create", a);
|
42
|
+
return console.log("Organization created successfully"), s.current = r.data, r.data;
|
43
|
+
} catch (r) {
|
44
|
+
throw console.log("Organization creation failed"), c(r), r;
|
45
|
+
}
|
46
|
+
},
|
47
|
+
// Read
|
48
|
+
async read(a = {}) {
|
49
|
+
console.log(a), a.params = a.params || {}, a.location && (a.params.location = a.location), a.country && (a.params.country = a.country), a.state && (a.params.state = a.state), a.city && (a.params.city = a.city), a.categories && (a.params.categories = a.categories), a.prices && (a.params.prices = a.prices), a.delivery && (a.params.delivery = a.delivery), a._id && (a.params = a.params || {}, a.params._id = a._id), a.types && (a.params = a.params || [], a.params.types = a.types), a.owner && (a.params = a.params || {}, a.params.owner = a.owner), a.user && (a.params = a.params || {}, a.params.user = a.user), a.member && (a.params = a.params || {}, a.params.member = a.member), a.subscriber && (a.params = a.params || {}, a.params.subscriber = a.subscriber), a.postable && (a.params = a.params || {}, a.params.postable = a.postable), a.params = a.params || {}, a.params.skip = a.skip || 0, a.params.limit = a.limit || 9, a.params.sortParam = a.sort;
|
50
|
+
try {
|
51
|
+
console.log("Request params:" + a.params);
|
52
|
+
const e = await t.get("/api/organizations", { params: a.params });
|
53
|
+
return a._id ? (Object.assign(s.current || {}, e.data[0]), console.log(s.current)) : console.log(e.data), Promise.resolve(e.data);
|
54
|
+
} catch (e) {
|
55
|
+
return c(e), Promise.reject(e);
|
56
|
+
}
|
57
|
+
},
|
58
|
+
// Update
|
59
|
+
async update(a, e) {
|
60
|
+
return console.log(a, e), await t.post(`/api/organizations/${a}/update`, e).then(
|
61
|
+
(r) => (console.log("Organization updated successfully"), Promise.resolve(r.data)),
|
62
|
+
(r) => (console.log("Updating organization failed"), Promise.reject(r))
|
63
|
+
);
|
64
|
+
},
|
65
|
+
// Remove
|
66
|
+
async remove(a) {
|
67
|
+
await t.delete(`/api/organizations/${a}/delete`).then(
|
68
|
+
(e) => {
|
69
|
+
s.error = null;
|
70
|
+
let r = m.get("user"), l = JSON.parse(r);
|
71
|
+
return l.organization = null, m.set("user", JSON.stringify(l), { expires: 7, domain: ".osi.plus", sameSite: "none", secure: !0 }), Promise.resolve(e.data);
|
72
|
+
},
|
73
|
+
(e) => (c(e), Promise.reject(e))
|
74
|
+
).catch((e) => {
|
75
|
+
c(e);
|
76
|
+
});
|
77
|
+
},
|
78
|
+
// Reset
|
79
|
+
async reset() {
|
80
|
+
s.current = {
|
81
|
+
_id: null,
|
82
|
+
profile: {
|
83
|
+
categories: [],
|
84
|
+
photo: "",
|
85
|
+
name: "",
|
86
|
+
description: ""
|
87
|
+
},
|
88
|
+
structure: [],
|
89
|
+
owner: null,
|
90
|
+
types: "",
|
91
|
+
contacts: {
|
92
|
+
email: "",
|
93
|
+
website: "",
|
94
|
+
phone: "",
|
95
|
+
address: ""
|
96
|
+
},
|
97
|
+
socials: {
|
98
|
+
telegram: "",
|
99
|
+
line: "",
|
100
|
+
facebook: "",
|
101
|
+
instagram: ""
|
102
|
+
},
|
103
|
+
rating: {
|
104
|
+
popularity: 0,
|
105
|
+
median: 0,
|
106
|
+
amount: 0
|
107
|
+
}
|
108
|
+
};
|
109
|
+
}
|
110
|
+
};
|
111
|
+
d(s, (a, e) => {
|
112
|
+
});
|
113
|
+
const p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
114
|
+
__proto__: null,
|
115
|
+
actions: g,
|
116
|
+
state: s
|
117
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
118
|
+
export {
|
119
|
+
g as a,
|
120
|
+
p as o,
|
121
|
+
s
|
122
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const n=require("./index-b41aac19.js"),m=require("./auth-f018f5b3.js"),i=require("vue"),t=require("./globals-928eb13c.js"),c=n.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),s=i.reactive({all:[],current:{_id:null,profile:{tags:[],photo:"",name:"",description:""},structure:[],owner:null,types:"",contacts:{email:"",website:"",phone:"",address:""},socials:{telegram:"",line:"",facebook:"",instagram:""},rating:{popularity:0,median:0,amount:0}}}),u={async create(e,a){e.owner=a;try{const r=await c.post("/api/organizations/create",e);return console.log("Organization created successfully"),s.current=r.data,r.data}catch(r){throw console.log("Organization creation failed"),t.setError(r),r}},async read(e={}){console.log(e),e.params=e.params||{},e.location&&(e.params.location=e.location),e.country&&(e.params.country=e.country),e.state&&(e.params.state=e.state),e.city&&(e.params.city=e.city),e.categories&&(e.params.categories=e.categories),e.prices&&(e.params.prices=e.prices),e.delivery&&(e.params.delivery=e.delivery),e._id&&(e.params=e.params||{},e.params._id=e._id),e.types&&(e.params=e.params||[],e.params.types=e.types),e.owner&&(e.params=e.params||{},e.params.owner=e.owner),e.user&&(e.params=e.params||{},e.params.user=e.user),e.member&&(e.params=e.params||{},e.params.member=e.member),e.subscriber&&(e.params=e.params||{},e.params.subscriber=e.subscriber),e.postable&&(e.params=e.params||{},e.params.postable=e.postable),e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.sortParam=e.sort;try{console.log("Request params:"+e.params);const a=await c.get("/api/organizations",{params:e.params});return e._id?(Object.assign(s.current||{},a.data[0]),console.log(s.current)):console.log(a.data),Promise.resolve(a.data)}catch(a){return t.setError(a),Promise.reject(a)}},async update(e,a){return console.log(e,a),await c.post(`/api/organizations/${e}/update`,a).then(r=>(console.log("Organization updated successfully"),Promise.resolve(r.data)),r=>(console.log("Updating organization failed"),Promise.reject(r)))},async remove(e){await c.delete(`/api/organizations/${e}/delete`).then(a=>{s.error=null;let r=m.Cookies.get("user"),l=JSON.parse(r);return l.organization=null,m.Cookies.set("user",JSON.stringify(l),{expires:7,domain:".osi.plus",sameSite:"none",secure:!0}),Promise.resolve(a.data)},a=>(t.setError(a),Promise.reject(a))).catch(a=>{t.setError(a)})},async reset(){s.current={_id:null,profile:{categories:[],photo:"",name:"",description:""},structure:[],owner:null,types:"",contacts:{email:"",website:"",phone:"",address:""},socials:{telegram:"",line:"",facebook:"",instagram:""},rating:{popularity:0,median:0,amount:0}}}};i.watch(s,(e,a)=>{});const d=Object.freeze(Object.defineProperty({__proto__:null,actions:u,state:s},Symbol.toStringTag,{value:"Module"}));exports.actions=u;exports.organization=d;exports.state=s;
|