@ozdao/prometheus-framework 0.0.79 → 0.0.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-451d2614.mjs +80 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-5ea8b4fa.js +1 -0
  3. package/dist/ButtonFollow-0d83a04a.mjs +130 -0
  4. package/dist/ButtonFollow-f9c5dc7a.js +1 -0
  5. package/dist/CardHeader-2d7e5d49.mjs +76 -0
  6. package/dist/CardHeader-dff9c71a.js +1 -0
  7. package/dist/Comments-b6e32958.js +1 -0
  8. package/dist/Comments-d2a8fd0f.mjs +76 -0
  9. package/dist/EditProductImages-1d4b44a9.mjs +236 -0
  10. package/dist/EditProductImages-d9228ad0.js +1 -0
  11. package/dist/EmptyState-34d85f10.mjs +36 -0
  12. package/dist/EmptyState-7658d7d6.js +1 -0
  13. package/dist/Feed-932d976d.js +1 -0
  14. package/dist/Feed-962e009b.js +1 -0
  15. package/dist/Feed-c93012c7.mjs +346 -0
  16. package/dist/Feed-d8e33aed.mjs +397 -0
  17. package/dist/PlaceholderUserpic-1a6cf257.mjs +28 -0
  18. package/dist/PlaceholderUserpic-3bf126ee.js +1 -0
  19. package/dist/Popup.vue_vue_type_style_index_0_lang-8981c189.mjs +280 -0
  20. package/dist/Popup.vue_vue_type_style_index_0_lang-931f265a.js +1 -0
  21. package/dist/Product-3c64a352.mjs +904 -0
  22. package/dist/Product-67efba5c.js +7 -0
  23. package/dist/ProductEdit-04760699.js +1 -0
  24. package/dist/ProductEdit-39adf62f.mjs +113 -0
  25. package/dist/ProfileBlogposts-00424109.js +1 -0
  26. package/dist/ProfileBlogposts-65a7a5e0.mjs +56 -0
  27. package/dist/ProfileComments-5884d09f.mjs +43 -0
  28. package/dist/ProfileComments-677731b3.js +1 -0
  29. package/dist/ProfileEvents-85a88674.mjs +55 -0
  30. package/dist/ProfileEvents-b5431cd6.js +1 -0
  31. package/dist/ProfileLikes-4a57f637.mjs +43 -0
  32. package/dist/ProfileLikes-8ccf6815.js +1 -0
  33. package/dist/ProfileOrganizations-5d681498.mjs +202 -0
  34. package/dist/ProfileOrganizations-c7688210.js +1 -0
  35. package/dist/Publics-889c25fc.js +1 -0
  36. package/dist/Publics-8bea4201.mjs +44 -0
  37. package/dist/UploadImage-34bc4a3f.mjs +99 -0
  38. package/dist/UploadImage-75b1a18a.js +1 -0
  39. package/dist/auth-18f80fef.mjs +1501 -0
  40. package/dist/auth-78fd9408.js +8 -0
  41. package/dist/auth.client.cjs +5 -5
  42. package/dist/auth.client.js +5 -5
  43. package/dist/auth.validation-6bccabd6.mjs +20 -0
  44. package/dist/auth.validation-a18510e8.js +1 -0
  45. package/dist/community.client.cjs +8 -9
  46. package/dist/community.client.js +568 -552
  47. package/dist/community.server.js +3 -2
  48. package/dist/community.server.mjs +3 -2
  49. package/dist/events.client.cjs +1 -1
  50. package/dist/events.client.js +10 -10
  51. package/dist/files.client.cjs +1 -0
  52. package/dist/files.client.js +1 -0
  53. package/dist/files.server.js +5 -2
  54. package/dist/files.server.mjs +5 -2
  55. package/dist/main.css +1 -1
  56. package/dist/organizations-0e9ff7ca.mjs +319 -0
  57. package/dist/organizations-c77ea9d0.js +1 -0
  58. package/dist/organizations.client.cjs +2 -2
  59. package/dist/organizations.client.js +26 -26
  60. package/dist/prometheus-framework.cjs.js +3 -3
  61. package/dist/prometheus-framework.es.js +8 -8
  62. package/dist/style.css +1 -1
  63. package/dist/users.client.cjs +1 -1
  64. package/dist/users.client.js +10 -10
  65. package/package.json +1 -1
  66. package/src/modules/community/components/elements/ImageUpload.vue +7 -5
  67. package/src/modules/community/components/pages/BlogPost.vue +12 -15
  68. package/src/modules/community/components/pages/CreateBlogPost.vue +14 -1
  69. package/src/modules/community/controllers/blog.controller.js +2 -1
  70. package/src/modules/files/controllers/files.controller.js +5 -1
  71. package/src/modules/files/routes/files.routes.js +3 -1
@@ -0,0 +1,80 @@
1
+ import { ref as p, watch as w, computed as S, openBlock as t, createElementBlock as l, Fragment as v, createElementVNode as i, normalizeClass as f, toDisplayString as u, createCommentVNode as r, withModifiers as x, createVNode as b, Transition as h, withCtx as y, renderList as C, unref as B } from "vue";
2
+ import { _ as M } from "./auth-18f80fef.mjs";
3
+ const N = {
4
+ key: 0,
5
+ class: "t-transp mn-r-small"
6
+ }, O = ["onClick"], V = ["onClick"], $ = {
7
+ key: 0,
8
+ class: "mn-t-thin invalid-feedback"
9
+ }, z = {
10
+ __name: "Select",
11
+ props: {
12
+ label: String,
13
+ select: [String, Object],
14
+ placeholder: { type: String, default: "Please select an item" },
15
+ options: { type: Array, default: () => [] },
16
+ validation: Boolean
17
+ },
18
+ emits: ["update:select", "focus", "blur"],
19
+ setup(a, { emit: d }) {
20
+ const s = a, n = p(s.select), o = p(!1);
21
+ w(() => s.select, (e) => {
22
+ n.value = e;
23
+ });
24
+ const g = S(() => s.select ? s.options.filter((e) => e !== s.select) : s.options), m = () => {
25
+ o.value = !o.value, d(o.value ? "focus" : "blur");
26
+ }, k = (e) => {
27
+ n.value = e, m(), d("update:select", n.value);
28
+ };
29
+ return (e, E) => {
30
+ var _;
31
+ return t(), l(v, null, [
32
+ i("div", {
33
+ class: f([e.$attrs.class, "flex-nowrap flex"])
34
+ }, [
35
+ a.label ? (t(), l("div", N, [
36
+ i("span", null, u(a.label), 1)
37
+ ])) : r("", !0),
38
+ i("li", {
39
+ onClick: x(m, ["stop"]),
40
+ class: "w-100"
41
+ }, [
42
+ i("span", null, u(((_ = n.value) == null ? void 0 : _.name) || n.value || a.placeholder), 1)
43
+ ], 8, O),
44
+ b(h, {
45
+ mode: "out-in",
46
+ name: "fade"
47
+ }, {
48
+ default: y(() => [
49
+ o.value ? (t(), l("ul", {
50
+ key: 0,
51
+ class: f([e.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
52
+ }, [
53
+ (t(!0), l(v, null, C(B(g), (c) => (t(), l("li", null, [
54
+ c ? (t(), l("span", {
55
+ key: 0,
56
+ onClick: (L) => k(c),
57
+ class: "w-100"
58
+ }, u(c.name || c), 9, V)) : r("", !0)
59
+ ]))), 256))
60
+ ], 2)) : r("", !0)
61
+ ]),
62
+ _: 1
63
+ })
64
+ ], 2),
65
+ b(h, {
66
+ mode: "out-in",
67
+ name: "fade"
68
+ }, {
69
+ default: y(() => [
70
+ a.validation ? (t(), l("div", $, " * " + u(a.validation.message), 1)) : r("", !0)
71
+ ]),
72
+ _: 1
73
+ })
74
+ ], 64);
75
+ };
76
+ }
77
+ }, D = /* @__PURE__ */ M(z, [["__scopeId", "data-v-a78dbba1"]]);
78
+ export {
79
+ D as S
80
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),m=require("./auth-78fd9408.js");const p={key:0,class:"t-transp mn-r-small"},_=["onClick"],k=["onClick"],v={key:0,class:"mn-t-thin invalid-feedback"},f={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(l,{emit:c}){const n=l,a=e.ref(n.select),o=e.ref(!1);e.watch(()=>n.select,t=>{a.value=t});const u=e.computed(()=>n.select?n.options.filter(t=>t!==n.select):n.options),r=()=>{o.value=!o.value,c(o.value?"focus":"blur")},d=t=>{a.value=t,r(),c("update:select",a.value)};return(t,g)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([t.$attrs.class,"flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(r,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((i=a.value)==null?void 0:i.name)||a.value||l.placeholder),1)],8,_),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([t.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),s=>(e.openBlock(),e.createElementBlock("li",null,[s?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:y=>d(s),class:"w-100"},e.toDisplayString(s.name||s),9,k)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},B=m._export_sfc(f,[["__scopeId","data-v-a78dbba1"]]);exports.Select=B;
@@ -0,0 +1,130 @@
1
+ import { reactive as d, watch as b, openBlock as h, createBlock as y, withCtx as _, createTextVNode as f, toDisplayString as g } from "vue";
2
+ import { a as w, _ as I, b as M } from "./auth-18f80fef.mjs";
3
+ import { s as p } from "./globals-f538c0ef.mjs";
4
+ const l = w.create({
5
+ baseURL: process.env.API_URL,
6
+ withCredentials: !0
7
+ }), i = d({
8
+ memberships: [],
9
+ error: null
10
+ }), u = {
11
+ async read({ user: r, type: e, target: t, role: s }) {
12
+ try {
13
+ const o = await l.get("/api/memberships", { params: { user: r, type: e, target: t, role: s } });
14
+ return i.error = null, i.memberships = o.data, Promise.resolve(o.data);
15
+ } catch (o) {
16
+ return p(o), Promise.reject(o);
17
+ }
18
+ },
19
+ async create(r) {
20
+ try {
21
+ const e = await l.post("/api/memberships/create", r);
22
+ return i.error = null, Promise.resolve(e.data);
23
+ } catch (e) {
24
+ return p(e), Promise.reject(e);
25
+ }
26
+ },
27
+ async update(r) {
28
+ try {
29
+ const e = await l.post("/api/memberships/update", r);
30
+ return i.error = null, Promise.resolve(e.data);
31
+ } catch (e) {
32
+ return p(e), Promise.reject(e);
33
+ }
34
+ },
35
+ async delete(r) {
36
+ try {
37
+ const e = await l.post("/api/memberships/delete", r);
38
+ return i.error = null, Promise.resolve(e.data);
39
+ } catch (e) {
40
+ return p(e), Promise.reject(e);
41
+ }
42
+ }
43
+ }, P = {
44
+ handleMembershipUpdate(r, e, t) {
45
+ let s;
46
+ if (Array.isArray(r) ? s = r.find((o) => o._id === e.target) : typeof r == "object" && r._id === e.target && (s = r), s)
47
+ if (s.isMember = t, t)
48
+ s.memberships.push(e), s.numberOfMemberships += 1;
49
+ else {
50
+ const o = s.memberships.findIndex((m) => m._id === e._id);
51
+ o !== -1 && (s.memberships.splice(o, 1), s.numberOfMemberships -= 1);
52
+ }
53
+ }
54
+ };
55
+ b(i, (r) => {
56
+ });
57
+ const S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ __proto__: null,
59
+ actions: u,
60
+ mutations: P,
61
+ state: i
62
+ }, Symbol.toStringTag, { value: "Module" }));
63
+ const v = {
64
+ __name: "ButtonFollow",
65
+ props: {
66
+ type: {
67
+ type: String,
68
+ required: !0
69
+ },
70
+ userId: {
71
+ type: String,
72
+ required: !0
73
+ },
74
+ isMember: {
75
+ type: Boolean,
76
+ required: !0
77
+ },
78
+ targetId: {
79
+ type: String,
80
+ required: !0
81
+ }
82
+ },
83
+ emits: ["updateMembership"],
84
+ setup(r, { emit: e }) {
85
+ const t = r, s = async () => {
86
+ t.isMember ? await m(t.targetId) : await o(t.targetId);
87
+ };
88
+ async function o(c) {
89
+ try {
90
+ const a = {
91
+ type: t.type,
92
+ target: c,
93
+ user: t.userId
94
+ }, n = await u.create(a);
95
+ e("updateMembership", { membership: n, isMember: !0, targetId: t.targetId });
96
+ } catch (a) {
97
+ throw console.log(a), a;
98
+ }
99
+ }
100
+ async function m(c) {
101
+ const a = {
102
+ type: t.type,
103
+ target: c,
104
+ user: t.userId
105
+ };
106
+ try {
107
+ const n = await u.delete(a);
108
+ e("updateMembership", { membership: n, isMember: !1, targetId: t.targetId });
109
+ } catch (n) {
110
+ throw console.log(n), n;
111
+ }
112
+ }
113
+ return (c, a) => (h(), y(M, {
114
+ submit: s,
115
+ class: "bg-main button-small button"
116
+ }, {
117
+ default: _(() => [
118
+ f(g(r.isMember ? "Unfollow" : "Follow"), 1)
119
+ ]),
120
+ _: 1
121
+ }));
122
+ }
123
+ }, F = /* @__PURE__ */ I(v, [["__scopeId", "data-v-c50e046c"]]);
124
+ export {
125
+ F as B,
126
+ u as a,
127
+ S as b,
128
+ P as m,
129
+ i as s
130
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),b=require("./auth-78fd9408.js"),u=require("./globals-d7a54bb4.js"),p=b.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),a=n.reactive({memberships:[],error:null}),m={async read({user:r,type:e,target:t,role:s}){try{const o=await p.get("/api/memberships",{params:{user:r,type:e,target:t,role:s}});return a.error=null,a.memberships=o.data,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async create(r){try{const e=await p.post("/api/memberships/create",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async update(r){try{const e=await p.post("/api/memberships/update",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async delete(r){try{const e=await p.post("/api/memberships/delete",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}}},h={handleMembershipUpdate(r,e,t){let s;if(Array.isArray(r)?s=r.find(o=>o._id===e.target):typeof r=="object"&&r._id===e.target&&(s=r),s)if(s.isMember=t,t)s.memberships.push(e),s.numberOfMemberships+=1;else{const o=s.memberships.findIndex(d=>d._id===e._id);o!==-1&&(s.memberships.splice(o,1),s.numberOfMemberships-=1)}}};n.watch(a,r=>{});const y=Object.freeze(Object.defineProperty({__proto__:null,actions:m,mutations:h,state:a},Symbol.toStringTag,{value:"Module"}));const _={__name:"ButtonFollow",props:{type:{type:String,required:!0},userId:{type:String,required:!0},isMember:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateMembership"],setup(r,{emit:e}){const t=r,s=async()=>{t.isMember?await d(t.targetId):await o(t.targetId)};async function o(l){try{const i={type:t.type,target:l,user:t.userId},c=await m.create(i);e("updateMembership",{membership:c,isMember:!0,targetId:t.targetId})}catch(i){throw console.log(i),i}}async function d(l){const i={type:t.type,target:l,user:t.userId};try{const c=await m.delete(i);e("updateMembership",{membership:c,isMember:!1,targetId:t.targetId})}catch(c){throw console.log(c),c}}return(l,i)=>(n.openBlock(),n.createBlock(b._sfc_main,{submit:s,class:"bg-main button-small button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.isMember?"Unfollow":"Follow"),1)]),_:1}))}},g=b._export_sfc(_,[["__scopeId","data-v-c50e046c"]]);exports.ButtonFollow=g;exports.actions=m;exports.memberships=y;exports.mutations=h;exports.state=a;
@@ -0,0 +1,76 @@
1
+ import { openBlock as t, createElementBlock as r, createElementVNode as n, withModifiers as w, createCommentVNode as o, createBlock as y, toDisplayString as m, Fragment as b, renderList as x, normalizeStyle as k } from "vue";
2
+ import { useRouter as p } from "vue-router";
3
+ import { P as $ } from "./PlaceholderUserpic-1a6cf257.mjs";
4
+ const v = {
5
+ key: 0,
6
+ class: "pd-b-zero"
7
+ }, M = { class: "w-100 flex-v-center flex-nojustify flex" }, z = ["src"], P = {
8
+ key: 2,
9
+ class: "t-semi"
10
+ }, D = { key: 0 }, F = { key: 1 }, B = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, C = {
11
+ key: 0,
12
+ class: "w-4r i-thin"
13
+ }, E = {
14
+ style: { position: "absolute", top: "0px", right: "0px" },
15
+ class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small mn-r-small t-semi"
16
+ }, N = ["src"], j = {
17
+ __name: "CardHeader",
18
+ props: [
19
+ "date",
20
+ "dateFormatted",
21
+ "owner",
22
+ "creator",
23
+ "members",
24
+ "membersPhotos",
25
+ "type"
26
+ ],
27
+ setup(e) {
28
+ p();
29
+ function f(h) {
30
+ const i = /* @__PURE__ */ new Date(), a = new Date(h), s = Math.abs(i - a), g = Math.floor(s / 1e3), l = Math.floor(g / 60), c = Math.floor(l / 60), d = Math.floor(c / 24), u = Math.floor(d / 7);
31
+ return u > 0 ? `${u} week${u > 1 ? "s" : ""} ago` : d > 0 ? `${d} day${d > 1 ? "s" : ""} ago` : c > 0 ? `${c} hour${c > 1 ? "s" : ""} ago` : l > 0 ? `${l} minute${l > 1 ? "s" : ""} ago` : "Just now";
32
+ }
33
+ return (h, i) => e.owner ? (t(), r("header", v, [
34
+ n("div", M, [
35
+ n("div", {
36
+ onClick: i[0] || (i[0] = w((a) => h.$router.push({
37
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
38
+ params: {
39
+ _id: e.owner.target._id
40
+ }
41
+ }), ["stop"])),
42
+ class: "w-100 flex-nowrap flex-v-center flex"
43
+ }, [
44
+ e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (t(), r("img", {
45
+ key: 0,
46
+ src: e.owner.target.profile.photo,
47
+ class: "radius-medium mn-r-thin i-thin"
48
+ }, null, 8, z)) : o("", !0),
49
+ !e.owner.target.profile.photo && e.type !== "short" ? (t(), y($, {
50
+ key: 1,
51
+ class: "radius-medium mn-r-thin i-thin"
52
+ })) : o("", !0),
53
+ e.type !== "short" ? (t(), r("span", P, [
54
+ n("span", null, m(e.owner.target.profile.name), 1),
55
+ e.date ? (t(), r("span", D, " · " + m(f(e.date)), 1)) : o("", !0),
56
+ e.dateFormatted ? (t(), r("span", F, " · " + m(e.dateFormatted), 1)) : o("", !0)
57
+ ])) : o("", !0),
58
+ n("div", B, [
59
+ e.members ? (t(), r("div", C, [
60
+ n("span", E, m(e.members), 1),
61
+ (t(!0), r(b, null, x(e.membersPhotos.slice(0, 2), (a, s) => (t(), r("img", {
62
+ key: s,
63
+ src: a,
64
+ style: k({ position: "absolute", top: "0px", right: s * 20 + 40 + "%", zIndex: 1 - s }),
65
+ class: "br-solid br-2px br-white i-thin bg-grey radius-big"
66
+ }, null, 12, N))), 128))
67
+ ])) : o("", !0)
68
+ ])
69
+ ])
70
+ ])
71
+ ])) : o("", !0);
72
+ }
73
+ };
74
+ export {
75
+ j as _
76
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),u=require("vue-router"),h=require("./PlaceholderUserpic-3bf126ee.js"),f={key:0,class:"pd-b-zero"},k={class:"w-100 flex-v-center flex-nojustify flex"},g=["src"],y={key:2,class:"t-semi"},w={key:0},b={key:1},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},B={key:0,class:"w-4r i-thin"},x={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small mn-r-small t-semi"},E=["src"],N={__name:"CardHeader",props:["date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){u.useRouter();function m(c){const r=new Date,n=new Date(c),o=Math.abs(r-n),d=Math.floor(o/1e3),s=Math.floor(d/60),l=Math.floor(s/60),a=Math.floor(l/24),i=Math.floor(a/7);return i>0?`${i} week${i>1?"s":""} ago`:a>0?`${a} day${a>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:s>0?`${s} minute${s>1?"s":""} ago`:"Just now"}return(c,r)=>t.owner?(e.openBlock(),e.createElementBlock("header",f,[e.createElementVNode("div",k,[e.createElementVNode("div",{onClick:r[0]||(r[0]=e.withModifiers(n=>c.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"])),class:"w-100 flex-nowrap flex-v-center flex"},[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin"},null,8,g)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.PlaceholderUserpic,{key:1,class:"radius-medium mn-r-thin i-thin"})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",y,[e.createElementVNode("span",null,e.toDisplayString(t.owner.target.profile.name),1),t.date?(e.openBlock(),e.createElementBlock("span",w," · "+e.toDisplayString(m(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",b," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",x,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(n,o)=>(e.openBlock(),e.createElementBlock("img",{key:o,src:n,style:e.normalizeStyle({position:"absolute",top:"0px",right:o*20+40+"%",zIndex:1-o}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,E))),128))])):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0)}};exports._sfc_main=N;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),d=require("./auth-78fd9408.js"),u=require("./CardHeader-dff9c71a.js"),p={class:"mn-small"},g=e.createElementVNode("p",{class:"t-semi uppercase"},"Please log in to leave a comment.",-1),v=[g],_={key:1,class:"mn-small"},b=["onSubmit"],y=e.createElementVNode("button",{type:"submit",class:"mn-l-auto bg-main button"},"Send",-1),h={class:"pd-t-zero"},k={class:"p-big"},w={__name:"Comments",props:["target","owner","type"],setup(l){const o=l,c=d.axios.create({baseURL:process.env.API_URL}),s=e.ref([]),r=e.ref(""),m=async()=>{const{data:t}=await c.get(`/comments/read?type=${o.type}&target=${o.target}`);s.value=t},i=async()=>{if(r.value)try{const t=await c.post("/comments/create",{target:o.target,user:o.owner,type:o.type,content:r.value});t.data.owner=o.owner,s.value.push(t.data),r.value=""}catch(t){console.error(t)}};return m(),(t,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createElementVNode("h3",p,e.toDisplayString(s.value.length)+" comments",1),l.owner?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a[0]||(a[0]=n=>t.$router.push({name:"Sign In"})),class:"cursor-pointer mn-small section bg-black t-white flex-center flex radius-big"},v)),l.owner?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("form",{onSubmit:e.withModifiers(i,["prevent"]),class:"bg-grey radius-big pd-medium"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":a[1]||(a[1]=n=>r.value=n),placeholder:"Enter your comment",class:"pd-small p-big w-100 radius-small mn-r-small"},null,512),[[e.vModelText,r.value]]),y],40,b)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n._id,class:"comment mn-small radius-big pd-medium bg-grey"},[e.createVNode(u._sfc_main,{class:"mn-medium",owner:{target:n.user},creator:{target:n.user},date:n.createdAt},null,8,["owner","creator","date"]),e.createElementVNode("div",h,[e.createElementVNode("p",k,e.toDisplayString(n.content),1)])]))),128))]))}};exports._sfc_main=w;
@@ -0,0 +1,76 @@
1
+ import { ref as u, openBlock as a, createElementBlock as r, createElementVNode as s, toDisplayString as d, createCommentVNode as p, withModifiers as _, withDirectives as b, vModelText as y, Fragment as h, renderList as w, createVNode as f } from "vue";
2
+ import { a as k } from "./auth-18f80fef.mjs";
3
+ import { _ as x } from "./CardHeader-2d7e5d49.mjs";
4
+ const C = { class: "mn-small" }, $ = /* @__PURE__ */ s("p", { class: "t-semi uppercase" }, "Please log in to leave a comment.", -1), S = [
5
+ $
6
+ ], V = {
7
+ key: 1,
8
+ class: "mn-small"
9
+ }, E = ["onSubmit"], L = /* @__PURE__ */ s("button", {
10
+ type: "submit",
11
+ class: "mn-l-auto bg-main button"
12
+ }, "Send", -1), N = { class: "pd-t-zero" }, U = { class: "p-big" }, I = {
13
+ __name: "Comments",
14
+ props: ["target", "owner", "type"],
15
+ setup(m) {
16
+ const o = m, c = k.create({ baseURL: process.env.API_URL }), l = u([]), n = u(""), g = async () => {
17
+ const { data: e } = await c.get(`/comments/read?type=${o.type}&target=${o.target}`);
18
+ l.value = e;
19
+ }, v = async () => {
20
+ if (n.value)
21
+ try {
22
+ const e = await c.post("/comments/create", {
23
+ target: o.target,
24
+ user: o.owner,
25
+ type: o.type,
26
+ content: n.value
27
+ });
28
+ e.data.owner = o.owner, l.value.push(e.data), n.value = "";
29
+ } catch (e) {
30
+ console.error(e);
31
+ }
32
+ };
33
+ return g(), (e, i) => (a(), r("div", null, [
34
+ s("div", null, [
35
+ s("h3", C, d(l.value.length) + " comments", 1),
36
+ m.owner ? p("", !0) : (a(), r("div", {
37
+ key: 0,
38
+ onClick: i[0] || (i[0] = (t) => e.$router.push({ name: "Sign In" })),
39
+ class: "cursor-pointer mn-small section bg-black t-white flex-center flex radius-big"
40
+ }, S)),
41
+ m.owner ? (a(), r("div", V, [
42
+ s("form", {
43
+ onSubmit: _(v, ["prevent"]),
44
+ class: "bg-grey radius-big pd-medium"
45
+ }, [
46
+ b(s("textarea", {
47
+ "onUpdate:modelValue": i[1] || (i[1] = (t) => n.value = t),
48
+ placeholder: "Enter your comment",
49
+ class: "pd-small p-big w-100 radius-small mn-r-small"
50
+ }, null, 512), [
51
+ [y, n.value]
52
+ ]),
53
+ L
54
+ ], 40, E)
55
+ ])) : p("", !0)
56
+ ]),
57
+ (a(!0), r(h, null, w(l.value, (t) => (a(), r("div", {
58
+ key: t._id,
59
+ class: "comment mn-small radius-big pd-medium bg-grey"
60
+ }, [
61
+ f(x, {
62
+ class: "mn-medium",
63
+ owner: { target: t.user },
64
+ creator: { target: t.user },
65
+ date: t.createdAt
66
+ }, null, 8, ["owner", "creator", "date"]),
67
+ s("div", N, [
68
+ s("p", U, d(t.content), 1)
69
+ ])
70
+ ]))), 128))
71
+ ]));
72
+ }
73
+ };
74
+ export {
75
+ I as _
76
+ };
@@ -0,0 +1,236 @@
1
+ import { toRefs as $, openBlock as n, createElementBlock as r, createTextVNode as U, toDisplayString as w, unref as e, createVNode as p, createElementVNode as o, createCommentVNode as y, createBlock as P, withCtx as N, Fragment as D, renderList as S, ref as C, withModifiers as B } from "vue";
2
+ import { F as _, b as E, a as V } from "./auth-18f80fef.mjs";
3
+ import { S as z } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-451d2614.mjs";
4
+ import { u as A } from "./vuex.esm-bundler-57d8b6ba.mjs";
5
+ import { V as F } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
6
+ import { s as x } from "./Popup.vue_vue_type_style_index_0_lang-8981c189.mjs";
7
+ const L = { class: "mn-big flex-column flex" }, ne = {
8
+ __name: "EditProductInfo",
9
+ props: {
10
+ product: Object
11
+ },
12
+ setup(i) {
13
+ const c = i, t = A();
14
+ return $(c), (s, a) => (n(), r("div", L, [
15
+ U(w(e(t).products.current) + " ", 1),
16
+ p(z, {
17
+ options: [
18
+ "unpublished",
19
+ "published",
20
+ "archivied"
21
+ ],
22
+ select: e(t).products.state.current.status,
23
+ "onUpdate:select": a[0] || (a[0] = (l) => e(t).products.state.current.status = l),
24
+ placeholder: "Display product",
25
+ class: "w-100 mn-small bg-white radius-small pd-medium"
26
+ }, null, 8, ["select"]),
27
+ p(_, {
28
+ field: e(t).products.state.current.name,
29
+ "onUpdate:field": a[1] || (a[1] = (l) => e(t).products.state.current.name = l),
30
+ placeholder: "Введите название",
31
+ class: "w-100 mn-small bg-white radius-small pd-medium"
32
+ }, null, 8, ["field"]),
33
+ p(_, {
34
+ field: e(t).products.state.current.price,
35
+ "onUpdate:field": a[2] || (a[2] = (l) => e(t).products.state.current.price = l),
36
+ placeholder: "Введите цену",
37
+ class: "w-100 mn-small bg-white radius-small pd-medium",
38
+ type: "number"
39
+ }, null, 8, ["field"]),
40
+ p(_, {
41
+ field: e(t).products.state.current.description,
42
+ "onUpdate:field": a[3] || (a[3] = (l) => e(t).products.state.current.description = l),
43
+ placeholder: "Введите описание",
44
+ class: "w-100 mn-small bg-white radius-small pd-medium",
45
+ type: "textarea"
46
+ }, null, 8, ["field"])
47
+ ]));
48
+ }
49
+ }, j = { class: "mn-big" }, M = { class: "mn-small flex-nowrap flex" }, O = { class: "mn-r-thin" }, R = { class: "flex-column flex" }, T = {
50
+ key: 0,
51
+ class: "w-100 mn-small"
52
+ }, q = ["onClick"], G = /* @__PURE__ */ o("svg", {
53
+ class: "i-small",
54
+ fill: "none",
55
+ height: "20",
56
+ viewBox: "0 0 20 20",
57
+ width: "20",
58
+ xmlns: "http://www.w3.org/2000/svg"
59
+ }, [
60
+ /* @__PURE__ */ o("path", {
61
+ "clip-rule": "evenodd",
62
+ d: "m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",
63
+ fill: "#8a8a8a",
64
+ "fill-rule": "evenodd"
65
+ })
66
+ ], -1), H = [
67
+ G
68
+ ], oe = {
69
+ __name: "EditParameters",
70
+ props: {
71
+ items: {
72
+ type: Array,
73
+ default: () => []
74
+ },
75
+ title: String,
76
+ addButtonLabel: String,
77
+ emptyMessage: String,
78
+ keyName: String,
79
+ valueName: String
80
+ },
81
+ emits: ["add-info", "delete-info"],
82
+ setup(i, { emit: c }) {
83
+ const t = i;
84
+ function s() {
85
+ c("add-info", {});
86
+ }
87
+ function a(d) {
88
+ c("delete-info", d);
89
+ }
90
+ const { items: l, title: f, emptyMessage: v, addButtonLabel: m, keyName: u, valueName: g } = $(t);
91
+ return (d, I) => (n(), r("div", j, [
92
+ o("div", M, [
93
+ o("h5", O, w(e(f)), 1),
94
+ o("button", {
95
+ onClick: s,
96
+ class: "i-small pd-thin button-delete button"
97
+ }, "+")
98
+ ]),
99
+ o("div", R, [
100
+ e(l).length == 0 ? (n(), r("p", T, w(e(v)), 1)) : y("", !0),
101
+ e(l).length == 0 ? (n(), P(E, {
102
+ key: 1,
103
+ onClick: s,
104
+ class: "button"
105
+ }, {
106
+ default: N(() => [
107
+ U(w(e(m)), 1)
108
+ ]),
109
+ _: 1
110
+ })) : y("", !0),
111
+ (n(!0), r(D, null, S(e(l), (h, k) => (n(), r("div", {
112
+ class: "mn-medium w-100 flex-nowrap flex",
113
+ key: k
114
+ }, [
115
+ p(_, {
116
+ field: h[e(u)],
117
+ "onUpdate:field": (b) => h[e(u)] = b,
118
+ placeholder: "Название параметра",
119
+ class: "w-100 mn-r-small bg-white radius-small pd-medium"
120
+ }, null, 8, ["field", "onUpdate:field"]),
121
+ p(_, {
122
+ field: h[e(g)],
123
+ "onUpdate:field": (b) => h[e(g)] = b,
124
+ placeholder: "Значение параметра",
125
+ class: "w-100 bg-white radius-small pd-medium"
126
+ }, null, 8, ["field", "onUpdate:field"]),
127
+ o("button", {
128
+ onClick: (b) => a(k),
129
+ class: "mn-l-small button"
130
+ }, H, 8, q)
131
+ ]))), 128))
132
+ ])
133
+ ]));
134
+ }
135
+ }, J = /* @__PURE__ */ o("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), K = {
136
+ __name: "UploadImageMultiple",
137
+ props: [
138
+ "uploadPath"
139
+ ],
140
+ emits: ["update:images"],
141
+ setup(i, { emit: c }) {
142
+ const t = i, s = C([]), a = C(null);
143
+ function l() {
144
+ a.value.click();
145
+ }
146
+ async function f(m) {
147
+ let u = m.target.files, g = new FormData();
148
+ for (let d = 0; d < u.length; d++)
149
+ g.append("file", u[d]);
150
+ try {
151
+ (await V.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(t.uploadPath)}`, g, {
152
+ headers: {
153
+ "Content-Type": "multipart/form-data"
154
+ }
155
+ })).data.forEach((h) => {
156
+ s.value.push(h.filepath);
157
+ }), c("update:images", s.value);
158
+ } catch (d) {
159
+ console.error(d);
160
+ }
161
+ }
162
+ function v(m) {
163
+ m.preventDefault(), f({
164
+ target: {
165
+ files: m.dataTransfer.files
166
+ }
167
+ });
168
+ }
169
+ return (m, u) => (n(), r("div", {
170
+ onClick: l,
171
+ onDrop: v,
172
+ onDragover: u[0] || (u[0] = B(() => {
173
+ }, ["prevent"])),
174
+ class: "flex-v-center flex-h-center flex"
175
+ }, [
176
+ J,
177
+ o("input", {
178
+ type: "file",
179
+ ref_key: "fileInput",
180
+ ref: a,
181
+ onChange: f,
182
+ multiple: "",
183
+ style: { display: "none" }
184
+ }, null, 544)
185
+ ], 32));
186
+ }
187
+ }, Q = {
188
+ key: 0,
189
+ class: "mn-big"
190
+ }, W = { class: "flex-column block" }, X = ["src"], Y = ["onClick"], re = {
191
+ __name: "EditProductImages",
192
+ props: {
193
+ product: Object
194
+ },
195
+ setup(i) {
196
+ function c(s) {
197
+ console.log(s), console.log(x.current.images), x.current.images.push(...s);
198
+ }
199
+ function t(s) {
200
+ x.current.images.splice(s, 1);
201
+ }
202
+ return (s, a) => (n(), r("div", null, [
203
+ i.product.images.length < 1 ? (n(), r("p", Q, " The product doesn't have any images yet. ")) : y("", !0),
204
+ p(e(F), {
205
+ class: "cols-4 dragArea list-group w-full",
206
+ list: i.product.images,
207
+ sort: !0,
208
+ onChange: s.log
209
+ }, {
210
+ default: N(() => [
211
+ (n(!0), r(D, null, S(i.product.images, (l, f) => (n(), r("div", W, [
212
+ o("img", {
213
+ class: "w-100 mn-small",
214
+ src: l
215
+ }, null, 8, X),
216
+ o("a", {
217
+ onClick: (v) => t(f),
218
+ class: "w-100 br-grey br-solid br-1px button"
219
+ }, "Удалить", 8, Y)
220
+ ]))), 256))
221
+ ]),
222
+ _: 1
223
+ }, 8, ["list", "onChange"]),
224
+ p(K, {
225
+ "onUpdate:images": c,
226
+ uploadPath: "organizations/" + s.$route.params._id + "/products",
227
+ class: "mn-t-semi pd-small w-100 button bg-main"
228
+ }, null, 8, ["uploadPath"])
229
+ ]));
230
+ }
231
+ };
232
+ export {
233
+ ne as _,
234
+ oe as a,
235
+ re as b
236
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),d=require("./auth-78fd9408.js"),k=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-5ea8b4fa.js"),b=require("./vuex.esm-bundler-e8cf3cd2.js"),y=require("./vue-draggable-next.esm-bundler-80731ae0.js"),g=require("./Popup.vue_vue_type_style_index_0_lang-931f265a.js"),w={class:"mn-big flex-column flex"},x={__name:"EditProductInfo",props:{product:Object},setup(r){const a=r,t=b.useStore();return e.toRefs(a),(n,o)=>(e.openBlock(),e.createElementBlock("div",w,[e.createTextVNode(e.toDisplayString(e.unref(t).products.current)+" ",1),e.createVNode(k.Select,{options:["unpublished","published","archivied"],select:e.unref(t).products.state.current.status,"onUpdate:select":o[0]||(o[0]=l=>e.unref(t).products.state.current.status=l),placeholder:"Display product",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["select"]),e.createVNode(d.Field,{field:e.unref(t).products.state.current.name,"onUpdate:field":o[1]||(o[1]=l=>e.unref(t).products.state.current.name=l),placeholder:"Введите название",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.Field,{field:e.unref(t).products.state.current.price,"onUpdate:field":o[2]||(o[2]=l=>e.unref(t).products.state.current.price=l),placeholder:"Введите цену",class:"w-100 mn-small bg-white radius-small pd-medium",type:"number"},null,8,["field"]),e.createVNode(d.Field,{field:e.unref(t).products.state.current.description,"onUpdate:field":o[3]||(o[3]=l=>e.unref(t).products.state.current.description=l),placeholder:"Введите описание",class:"w-100 mn-small bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])]))}},N={class:"mn-big"},B={class:"mn-small flex-nowrap flex"},E={class:"mn-r-thin"},V={class:"flex-column flex"},C={key:0,class:"w-100 mn-small"},$=["onClick"],U=e.createElementVNode("svg",{class:"i-small",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),D=[U],S={__name:"EditParameters",props:{items:{type:Array,default:()=>[]},title:String,addButtonLabel:String,emptyMessage:String,keyName:String,valueName:String},emits:["add-info","delete-info"],setup(r,{emit:a}){const t=r;function n(){a("add-info",{})}function o(s){a("delete-info",s)}const{items:l,title:u,emptyMessage:f,addButtonLabel:i,keyName:c,valueName:p}=e.toRefs(t);return(s,v)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",B,[e.createElementVNode("h5",E,e.toDisplayString(e.unref(u)),1),e.createElementVNode("button",{onClick:n,class:"i-small pd-thin button-delete button"},"+")]),e.createElementVNode("div",V,[e.unref(l).length==0?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(f)),1)):e.createCommentVNode("",!0),e.unref(l).length==0?(e.openBlock(),e.createBlock(d._sfc_main,{key:1,onClick:n,class:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,_)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-medium w-100 flex-nowrap flex",key:_},[e.createVNode(d.Field,{field:m[e.unref(c)],"onUpdate:field":h=>m[e.unref(c)]=h,placeholder:"Название параметра",class:"w-100 mn-r-small bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.Field,{field:m[e.unref(p)],"onUpdate:field":h=>m[e.unref(p)]=h,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:h=>o(_),class:"mn-l-small button"},D,8,$)]))),128))])]))}},F=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),P={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(r,{emit:a}){const t=r,n=e.ref([]),o=e.ref(null);function l(){o.value.click()}async function u(i){let c=i.target.files,p=new FormData;for(let s=0;s<c.length;s++)p.append("file",c[s]);try{(await d.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(t.uploadPath)}`,p,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(m=>{n.value.push(m.filepath)}),a("update:images",n.value)}catch(s){console.error(s)}}function f(i){i.preventDefault(),u({target:{files:i.dataTransfer.files}})}return(i,c)=>(e.openBlock(),e.createElementBlock("div",{onClick:l,onDrop:f,onDragover:c[0]||(c[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[F,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:o,onChange:u,multiple:"",style:{display:"none"}},null,544)],32))}},I={key:0,class:"mn-big"},q={class:"flex-column block"},L=["src"],z=["onClick"],A={__name:"EditProductImages",props:{product:Object},setup(r){function a(n){console.log(n),console.log(g.state.current.images),g.state.current.images.push(...n)}function t(n){g.state.current.images.splice(n,1)}return(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[r.product.images.length<1?(e.openBlock(),e.createElementBlock("p",I," The product doesn't have any images yet. ")):e.createCommentVNode("",!0),e.createVNode(e.unref(y.VueDraggableNext),{class:"cols-4 dragArea list-group w-full",list:r.product.images,sort:!0,onChange:n.log},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.product.images,(l,u)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("img",{class:"w-100 mn-small",src:l},null,8,L),e.createElementVNode("a",{onClick:f=>t(u),class:"w-100 br-grey br-solid br-1px button"},"Удалить",8,z)]))),256))]),_:1},8,["list","onChange"]),e.createVNode(P,{"onUpdate:images":a,uploadPath:"organizations/"+n.$route.params._id+"/products",class:"mn-t-semi pd-small w-100 button bg-main"},null,8,["uploadPath"])]))}};exports._sfc_main=x;exports._sfc_main$1=S;exports._sfc_main$2=A;