@ozdao/prometheus-framework 0.2.93 → 0.2.95

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/dist/auth.server.js +15 -14
  2. package/dist/auth.server.mjs +15 -14
  3. package/dist/main-BJvlNekm.mjs +13631 -0
  4. package/dist/main-pGo7JpSP.js +92 -0
  5. package/dist/orders.server.js +31 -27
  6. package/dist/orders.server.mjs +31 -27
  7. package/dist/organizations.server.js +31 -10
  8. package/dist/organizations.server.mjs +31 -10
  9. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  11. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +19 -19
  12. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +12 -12
  13. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  15. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  17. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +21 -21
  18. package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/router/auth.js +4 -0
  20. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +8 -8
  22. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +58 -58
  24. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.js +22 -21
  26. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  27. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +48 -37
  28. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +160 -167
  30. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +49 -48
  32. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +113 -110
  34. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +14 -14
  35. package/dist/prometheus-framework/src/modules/orders/store/models/order.cjs +1 -0
  36. package/dist/prometheus-framework/src/modules/orders/store/models/order.js +28 -0
  37. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/orders/store/orders.js +25 -43
  39. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +20 -20
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +47 -47
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +143 -131
  49. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +32 -34
  55. package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -32
  61. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +155 -187
  63. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +18 -18
  65. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +26 -22
  69. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +66 -63
  71. package/dist/prometheus-framework.cjs.js +1 -1
  72. package/dist/prometheus-framework.es.js +1 -1
  73. package/dist/style.css +1 -1
  74. package/dist/web-B2xhKZNK.js +1 -0
  75. package/dist/web-DTzbVshr.mjs +54 -0
  76. package/package.json +1 -1
  77. package/src/components/Block/Block.vue +1 -1
  78. package/src/modules/auth/controllers/auth.controller.js +19 -16
  79. package/src/modules/auth/router/auth.js +4 -0
  80. package/src/modules/backoffice/router/backoffice.js +3 -3
  81. package/src/modules/chats/routes/chats.routes.js +1 -2
  82. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
  83. package/src/modules/icons/navigation/IconCross.vue +11 -7
  84. package/src/modules/orders/components/blocks/StatusHistory.vue +8 -11
  85. package/src/modules/orders/components/pages/OrderBackoffice.vue +37 -50
  86. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +7 -3
  87. package/src/modules/orders/components/pages/Orders.vue +1 -1
  88. package/src/modules/orders/controllers/orders.controller.js +25 -25
  89. package/src/modules/orders/models/order.model.js +1 -1
  90. package/src/modules/orders/routes/orders.routes.js +6 -0
  91. package/src/modules/orders/store/models/order.js +33 -0
  92. package/src/modules/orders/store/orders.js +7 -28
  93. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -2
  94. package/src/modules/organizations/components/pages/DepartmentEdit.vue +7 -5
  95. package/src/modules/organizations/components/pages/Members.vue +50 -38
  96. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  97. package/src/modules/organizations/controllers/invites.controller.js +2 -0
  98. package/src/modules/organizations/controllers/memberships.controller.js +35 -11
  99. package/src/modules/organizations/models/invite.model.js +4 -0
  100. package/src/modules/organizations/organizations.client.js +0 -2
  101. package/src/modules/organizations/router/members.router.js +1 -1
  102. package/src/modules/organizations/store/departments.js +0 -1
  103. package/src/modules/organizations/store/memberships.js +1 -8
  104. package/src/modules/products/components/pages/ProductEdit.vue +39 -33
  105. package/src/modules/products/components/sections/EditProductInfo.vue +3 -3
  106. package/src/modules/users/components/blocks/CardUser.vue +9 -5
  107. package/src/modules/users/components/pages/Profile.vue +5 -3
  108. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +0 -126
@@ -1 +1,36 @@
1
-
1
+ import { ref as i, openBlock as s, createElementBlock as a, createElementVNode as p, renderSlot as n, createVNode as u, Transition as c, withCtx as d, createCommentVNode as f } from "vue";
2
+ import "./Spoiler.vue2.js";
3
+ const m = {
4
+ key: 0,
5
+ class: "spoiler"
6
+ }, x = {
7
+ __name: "Spoiler",
8
+ props: {
9
+ status: {
10
+ type: Boolean,
11
+ default: !1
12
+ }
13
+ },
14
+ setup(r) {
15
+ const t = r, e = i(!1);
16
+ return t.status && (e.value = t.status), (o, l) => (s(), a("div", null, [
17
+ p("div", {
18
+ onClick: l[0] || (l[0] = (v) => e.value = !e.value),
19
+ class: "flex-v-center flex-nowrap flex"
20
+ }, [
21
+ n(o.$slots, "header", { isOpen: e.value })
22
+ ]),
23
+ u(c, { name: "collapse" }, {
24
+ default: d(() => [
25
+ e.value ? (s(), a("div", m, [
26
+ n(o.$slots, "content")
27
+ ])) : f("", !0)
28
+ ]),
29
+ _: 3
30
+ })
31
+ ]));
32
+ }
33
+ };
34
+ export {
35
+ x as default
36
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Spoiler.vue.cjs");const n={key:0,class:"spoiler"},a={__name:"Spoiler",props:{status:{type:Boolean,default:!1}},setup(r){const l=r,t=e.ref(!1);return l.status&&(t.value=l.status),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{onClick:s[0]||(s[0]=u=>t.value=!t.value),class:"flex-v-center flex-nowrap flex"},[e.renderSlot(o.$slots,"header",{isOpen:t.value})]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(o.$slots,"content")])):e.createCommentVNode("",!0)]),_:3})]))}};exports.default=a;
1
+ "use strict";
@@ -1,36 +1 @@
1
- import { ref as i, openBlock as s, createElementBlock as a, createElementVNode as p, renderSlot as n, createVNode as u, Transition as c, withCtx as d, createCommentVNode as f } from "vue";
2
- import "./Spoiler.vue.js";
3
- const m = {
4
- key: 0,
5
- class: "spoiler"
6
- }, x = {
7
- __name: "Spoiler",
8
- props: {
9
- status: {
10
- type: Boolean,
11
- default: !1
12
- }
13
- },
14
- setup(r) {
15
- const t = r, e = i(!1);
16
- return t.status && (e.value = t.status), (o, l) => (s(), a("div", null, [
17
- p("div", {
18
- onClick: l[0] || (l[0] = (v) => e.value = !e.value),
19
- class: "flex-v-center flex-nowrap flex"
20
- }, [
21
- n(o.$slots, "header", { isOpen: e.value })
22
- ]),
23
- u(c, { name: "collapse" }, {
24
- default: d(() => [
25
- e.value ? (s(), a("div", m, [
26
- n(o.$slots, "content")
27
- ])) : f("", !0)
28
- ]),
29
- _: 3
30
- })
31
- ]));
32
- }
33
- };
34
- export {
35
- x as default
36
- };
1
+
@@ -1,18 +1,18 @@
1
- import { ref as m, watch as y, openBlock as a, createElementBlock as o, Fragment as w, createElementVNode as n, normalizeClass as b, toDisplayString as r, createCommentVNode as p, createVNode as h, Transition as C, withCtx as _ } from "vue";
2
- import k from "../../../node_modules/axios/lib/axios.js";
1
+ import { ref as m, watch as y, openBlock as t, createElementBlock as o, Fragment as _, createElementVNode as n, normalizeClass as w, toDisplayString as r, createCommentVNode as p, createVNode as h, Transition as b, withCtx as k } from "vue";
2
+ import C from "../../../node_modules/axios/lib/axios.js";
3
3
  import U from "../../modules/icons/navigation/IconCross.vue.js";
4
4
  import "./Upload.vue2.js";
5
- import F from "../../../../_virtual/_plugin-vue_export-helper.js";
6
- const I = {
5
+ import $ from "../../../../_virtual/_plugin-vue_export-helper.js";
6
+ const F = {
7
7
  key: 0,
8
8
  class: "t-transp mn-r-small"
9
9
  }, N = {
10
10
  key: 1,
11
11
  class: "flex-nowrap flex w-100 flex-v-center"
12
- }, R = ["href"], $ = {
12
+ }, R = ["href"], B = {
13
13
  key: 2,
14
14
  class: "w-100"
15
- }, B = ["placeholder", "multiple"], D = {
15
+ }, D = ["placeholder", "multiple"], I = {
16
16
  key: 0,
17
17
  class: "mn-t-thin mn-b-thin invalid-feedback"
18
18
  }, L = {
@@ -35,14 +35,14 @@ const I = {
35
35
  emits: ["update:field", "focus", "blur", "file-change"],
36
36
  setup(e, { emit: v }) {
37
37
  const i = v, s = e, l = m(s.field);
38
- m(null), y(() => s.field, (t) => {
39
- l.value = t;
38
+ m(null), y(() => s.field, (a) => {
39
+ l.value = a;
40
40
  });
41
- async function g(t) {
42
- let c = t.target.files[0], d = new FormData();
41
+ async function g(a) {
42
+ let c = a.target.files[0], d = new FormData();
43
43
  d.append("file", c);
44
44
  try {
45
- let u = await k.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(s.uploadPath)}`, d, {
45
+ let u = await C.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(s.uploadPath)}`, d, {
46
46
  headers: {
47
47
  "Content-Type": "multipart/form-data"
48
48
  }
@@ -55,14 +55,14 @@ const I = {
55
55
  const x = () => {
56
56
  l.value = null, i("update:field", null), i("file-change", null);
57
57
  };
58
- return (t, c) => (a(), o(w, null, [
58
+ return (a, c) => (t(), o(_, null, [
59
59
  n("div", {
60
- class: b([[t.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
60
+ class: w([[a.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
61
61
  }, [
62
- e.label ? (a(), o("div", I, [
62
+ e.label ? (t(), o("div", F, [
63
63
  n("span", null, r(e.label), 1)
64
64
  ])) : p("", !0),
65
- l.value ? (a(), o("div", N, [
65
+ l.value ? (t(), o("div", N, [
66
66
  n("a", {
67
67
  href: l.value,
68
68
  class: "w-100",
@@ -72,7 +72,7 @@ const I = {
72
72
  onClick: x,
73
73
  class: "cursor-pointer t-center flex-center flex radius-extra i-medium bg-red pd-micro"
74
74
  })
75
- ])) : (a(), o("div", $, [
75
+ ])) : (t(), o("div", B, [
76
76
  n("input", {
77
77
  onChange: g,
78
78
  type: "file",
@@ -81,21 +81,21 @@ const I = {
81
81
  multiple: e.multiple,
82
82
  id: "photo",
83
83
  name: "photo"
84
- }, null, 40, B)
84
+ }, null, 40, D)
85
85
  ]))
86
86
  ], 2),
87
- h(C, {
87
+ h(b, {
88
88
  mode: "out-in",
89
89
  name: "fade"
90
90
  }, {
91
- default: _(() => [
92
- e.validation ? (a(), o("div", D, " * " + r(e.validation.message), 1)) : p("", !0)
91
+ default: k(() => [
92
+ e.validation ? (t(), o("div", I, " * " + r(e.validation.message), 1)) : p("", !0)
93
93
  ]),
94
94
  _: 1
95
95
  })
96
96
  ], 64));
97
97
  }
98
- }, z = /* @__PURE__ */ F(L, [["__scopeId", "data-v-d8ca273c"]]);
98
+ }, z = /* @__PURE__ */ $(L, [["__scopeId", "data-v-d8ca273c"]]);
99
99
  export {
100
100
  z as default
101
101
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../components/layouts/Auth.vue.cjs"),e=require("../../middlewares/client/states.validation.cjs"),t=require("../../middlewares/client/auth.validation.cjs");function o(r){return[{path:"auth",name:"Authentication",meta:{title:{en:"Аутентификация",ru:"Authentication"},options:r},component:n.default,children:[{path:"signin",name:"Sign In",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Sign In",ru:"Вход"}},component:()=>Promise.resolve().then(()=>require("../components/pages/SignIn.vue.cjs"))},{path:"reset-password",name:"Reset Password",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Reset Password",ru:"Сбросить Пароль"}},component:()=>Promise.resolve().then(()=>require("../components/pages/ResetPassword.vue.cjs"))},{path:"signup",name:"Sign Up",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Sign Up",ru:"Регистрация"}},component:()=>Promise.resolve().then(()=>require("../components/pages/SignUp.vue.cjs"))},{path:"enter-code",name:"Enter Code",beforeEnter:[t.requiresNoAuth,e.checkUser],meta:{title:{en:"Enter Code",ru:"Введите Код"}},component:()=>Promise.resolve().then(()=>require("../components/pages/EnterCode.vue.cjs"))},{path:"enter-password",name:"Enter Password",beforeEnter:[t.requiresNoAuth,e.checkUser],meta:{title:{en:"Enter Password",ru:"Введите Пароль"}},component:()=>Promise.resolve().then(()=>require("../components/pages/EnterPassword.vue.cjs"))},{path:"invite",name:"Invite",meta:{title:{en:"Invite",ru:"Приглашение"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Invite.vue.cjs"))}]}]}exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../components/layouts/Auth.vue.cjs"),e=require("../../middlewares/client/states.validation.cjs"),t=require("../../middlewares/client/auth.validation.cjs");function o(r){return[{path:"auth",name:"Authentication",meta:{title:{en:"Аутентификация",ru:"Authentication"},options:r},component:n.default,children:[{path:"signin",name:"Sign In",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Sign In",ru:"Вход"}},component:()=>Promise.resolve().then(()=>require("../components/pages/SignIn.vue.cjs"))},{path:"reset-password",name:"Reset Password",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Reset Password",ru:"Сбросить Пароль"}},component:()=>Promise.resolve().then(()=>require("../components/pages/ResetPassword.vue.cjs"))},{path:"signup",name:"Sign Up",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Sign Up",ru:"Регистрация"}},component:()=>Promise.resolve().then(()=>require("../components/pages/SignUp.vue.cjs"))},{path:"enter-code",name:"Enter Code",beforeEnter:[t.requiresNoAuth,e.checkUser],meta:{title:{en:"Enter Code",ru:"Введите Код"}},component:()=>Promise.resolve().then(()=>require("../components/pages/EnterCode.vue.cjs"))},{path:"enter-password",name:"Enter Password",beforeEnter:[t.requiresNoAuth,e.checkUser],meta:{title:{en:"Enter Password",ru:"Введите Пароль"}},component:()=>Promise.resolve().then(()=>require("../components/pages/EnterPassword.vue.cjs"))},{path:"invite",name:"Invite",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Invite",ru:"Приглашение"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Invite.vue.cjs"))}]}]}exports.default=o;
@@ -102,6 +102,10 @@ function s(r) {
102
102
  }, {
103
103
  path: "invite",
104
104
  name: "Invite",
105
+ beforeEnter: [
106
+ e,
107
+ t
108
+ ],
105
109
  meta: {
106
110
  title: {
107
111
  en: "Invite",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("vue");require("../components/layouts/Backoffice.vue.cjs");const e=require("../../globals/components/layouts/Empty.vue.cjs"),t=require("../../middlewares/client/auth.validation.cjs"),o=[{path:"backoffice",component:e.default,beforeEnter:[t.requiresAdmin],children:[{path:"",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/Dashboard.vue.cjs"))},{path:"gallery",name:"Backoffice Gallery",meta:{title:{en:"Backoffice Gallery",ru:"Управление Галерей"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../gallery/components/sections/BackofficeGallery.vue.cjs"))},{path:"reports",name:"Backoffice Reports",meta:{title:{en:"Backoffice Reports",ru:"Управление Жалобами"}},component:()=>Promise.resolve().then(()=>require("../../reports/components/pages/BackofficeReports.vue.cjs"))},{path:"organizations",name:"Backoffice Organizations",meta:{title:{en:"Backoffice Organizations",ru:"Управление Организациями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../organizations/components/pages/Organizations.vue.cjs"))},{path:"events",name:"Backoffice Events",meta:{title:{en:"Backoffice Events",ru:"Управление Событиями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../events/components/pages/Events.vue.cjs"))},{path:"community",name:"Backoffice Community",meta:{title:{en:"Backoffice Community",ru:"Управление Сообществом"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../community/components/pages/Community.vue.cjs"))}]}];exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("vue");require("../components/layouts/Backoffice.vue.cjs");const e=require("../../globals/components/layouts/Empty.vue.cjs");require("../../auth/store/auth.cjs");const t=[{path:"backoffice",component:e.default,children:[{path:"",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/Dashboard.vue.cjs"))},{path:"gallery",name:"Backoffice Gallery",meta:{title:{en:"Backoffice Gallery",ru:"Управление Галерей"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../gallery/components/sections/BackofficeGallery.vue.cjs"))},{path:"reports",name:"Backoffice Reports",meta:{title:{en:"Backoffice Reports",ru:"Управление Жалобами"}},component:()=>Promise.resolve().then(()=>require("../../reports/components/pages/BackofficeReports.vue.cjs"))},{path:"organizations",name:"Backoffice Organizations",meta:{title:{en:"Backoffice Organizations",ru:"Управление Организациями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../organizations/components/pages/Organizations.vue.cjs"))},{path:"events",name:"Backoffice Events",meta:{title:{en:"Backoffice Events",ru:"Управление Событиями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../events/components/pages/Events.vue.cjs"))},{path:"community",name:"Backoffice Community",meta:{title:{en:"Backoffice Community",ru:"Управление Сообществом"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../community/components/pages/Community.vue.cjs"))}]}];exports.default=t;
@@ -1,13 +1,13 @@
1
1
  import "vue";
2
2
  import "../components/layouts/Backoffice.vue.js";
3
- import e from "../../globals/components/layouts/Empty.vue.js";
4
- import { requiresAdmin as t } from "../../middlewares/client/auth.validation.js";
5
- const m = [{
3
+ import t from "../../globals/components/layouts/Empty.vue.js";
4
+ import "../../auth/store/auth.js";
5
+ const n = [{
6
6
  path: "backoffice",
7
- component: e,
8
- beforeEnter: [
9
- t
10
- ],
7
+ component: t,
8
+ // beforeEnter: [
9
+ // validationAuth.requiresAdmin,
10
+ // ],
11
11
  children: [
12
12
  {
13
13
  path: "",
@@ -101,5 +101,5 @@ const m = [{
101
101
  ]
102
102
  }];
103
103
  export {
104
- m as default
104
+ n as default
105
105
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-c506f5e5"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-b-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-b-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(k.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-c506f5e5"]]);exports.default=ie;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-99e559ad"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},U={class:"mn-b-semi flex-v-center flex-nowrap flex"},D=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),T=["data-id"],F=["src","onClick"],L={key:1,class:"radius-small bg-white"},R=["src","onClick"],$={class:"t-black p-small mn-b-thin"},O=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),A=c(()=>e.createElementVNode("br",null,null,-1)),H={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],ae={key:0,class:"flex-v-center flex m modal pd-big"},oe={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=a=>{d.value=a},V=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(k.value))),w=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=a=>{console.log(r.value),r.value?N(a):(u.value="modal",t.value.image=a,b())},N=a=>{u.value="edit-modal",t.value=a||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async a=>{await s.actions.deletePhoto(a)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async a=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(v+=1,w())}).observe(f.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",U,[D,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:o[0]||(o[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,F)):(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,R),e.createElementVNode("p",$,[O,A,e.createElementVNode("span",H,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,T))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",oe,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-99e559ad"]]);exports.default=ie;
@@ -1,4 +1,4 @@
1
- import { ref as n, computed as q, onMounted as A, openBlock as a, createElementBlock as o, createElementVNode as t, createCommentVNode as f, Fragment as E, renderList as M, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as L, vShow as R, createTextVNode as H, pushScopeId as J, popScopeId as K } from "vue";
1
+ import { ref as n, computed as O, onMounted as T, openBlock as a, createElementBlock as o, createElementVNode as l, createCommentVNode as f, Fragment as P, renderList as M, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as q, vShow as A, createTextVNode as H, pushScopeId as J, popScopeId as K } from "vue";
2
2
  import Q from "../../../../components/Field/Field.vue.js";
3
3
  import W from "../../../../components/Button/Button.vue.js";
4
4
  import X from "../../../../components/Select/Select.vue.js";
@@ -6,28 +6,28 @@ import { state as G, actions as d } from "../../store/gallery.js";
6
6
  import Y from "../../../../components/EditImages/EditImages.vue.js";
7
7
  import "./BackofficeGallery.vue2.js";
8
8
  import Z from "../../../../../../_virtual/_plugin-vue_export-helper.js";
9
- const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-relative w-100" }, te = { class: "mn-b-semi flex-v-center flex-nowrap flex" }, le = /* @__PURE__ */ u(() => /* @__PURE__ */ t("h1", { class: "mn-r-small" }, "Manage Gallery", -1)), se = ["data-id"], ae = ["src", "onClick"], oe = {
9
+ const u = (m) => (J("data-v-99e559ad"), m = m(), K(), m), ee = { class: "pos-relative w-100" }, le = { class: "mn-b-semi flex-v-center flex-nowrap flex" }, te = /* @__PURE__ */ u(() => /* @__PURE__ */ l("h1", { class: "mn-r-small" }, "Manage Gallery", -1)), se = ["data-id"], ae = ["src", "onClick"], oe = {
10
10
  key: 1,
11
11
  class: "radius-small bg-white"
12
- }, ie = ["src", "onClick"], ne = { class: "t-black p-small mn-b-thin" }, ce = /* @__PURE__ */ u(() => /* @__PURE__ */ t("span", { class: "uppercase t-transp" }, "Size", -1)), re = /* @__PURE__ */ u(() => /* @__PURE__ */ t("br", null, null, -1)), de = { class: "pd-2px radius-big d-inline-block bg-grey" }, ue = { class: "t-black p-small mn-b-small uppe" }, me = /* @__PURE__ */ u(() => /* @__PURE__ */ t("span", { class: "uppercase t-transp" }, "Categories", -1)), pe = /* @__PURE__ */ u(() => /* @__PURE__ */ t("br", null, null, -1)), ve = { class: "pd-2px radius-big d-inline-block bg-grey t-semi" }, ge = { class: "flex-nowrap flex" }, he = ["onClick"], _e = { class: "modal pd-thin" }, fe = { class: "modal-content radius-big" }, be = { class: "" }, ye = ["src"], ke = {
12
+ }, ie = ["src", "onClick"], ne = { class: "t-black p-small mn-b-thin" }, ce = /* @__PURE__ */ u(() => /* @__PURE__ */ l("span", { class: "uppercase t-transp" }, "Size", -1)), re = /* @__PURE__ */ u(() => /* @__PURE__ */ l("br", null, null, -1)), de = { class: "pd-2px radius-big d-inline-block bg-grey" }, ue = { class: "t-black p-small mn-b-small uppe" }, me = /* @__PURE__ */ u(() => /* @__PURE__ */ l("span", { class: "uppercase t-transp" }, "Categories", -1)), pe = /* @__PURE__ */ u(() => /* @__PURE__ */ l("br", null, null, -1)), ve = { class: "pd-2px radius-big d-inline-block bg-grey t-semi" }, ge = { class: "flex-nowrap flex" }, he = ["onClick"], _e = { class: "modal pd-thin" }, fe = { class: "modal-content radius-big" }, be = { class: "" }, ye = ["src"], ke = {
13
13
  key: 0,
14
14
  class: "flex-v-center flex m modal pd-big"
15
- }, we = { class: "modal-content radius-small pd-medium bg-white" }, xe = ["src"], Ce = ["src"], $ = 10, ze = {
15
+ }, we = { class: "modal-content radius-small pd-medium bg-white" }, xe = ["src"], Ce = ["src"], U = 10, Se = {
16
16
  __name: "BackofficeGallery",
17
17
  setup(m) {
18
18
  const p = n(!0), C = n(null);
19
- let y = 1, z = n(null), S = n(!1);
20
- const v = n([]), j = (s) => {
19
+ let y = 1, S = n(null), z = n(!1);
20
+ const v = n([]), $ = (s) => {
21
21
  v.value = s;
22
- }, B = q(() => P.value === "all" ? G.gallery : G.gallery.filter((s) => s.categories.includes(P.value))), U = async () => {
23
- S.value = !0, await d.fetchGallery(y, $), S.value = !1;
22
+ }, j = O(() => E.value === "all" ? G.gallery : G.gallery.filter((s) => s.categories.includes(E.value))), B = async () => {
23
+ z.value = !0, await d.fetchGallery(y, U), z.value = !1;
24
24
  }, g = n(null), e = n({
25
25
  categories: "",
26
26
  size: "",
27
27
  image: !1
28
28
  }), h = n(null), k = (s) => {
29
- console.log(p.value), p.value ? N(s) : (g.value = "modal", e.value.image = s, I());
30
- }, N = (s) => {
29
+ console.log(p.value), p.value ? V(s) : (g.value = "modal", e.value.image = s, I());
30
+ }, V = (s) => {
31
31
  g.value = "edit-modal", e.value = s || {
32
32
  categories: "",
33
33
  size: "",
@@ -38,21 +38,21 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
38
38
  categories: "",
39
39
  size: "",
40
40
  image: !1
41
- }, h.value = null, V();
41
+ }, h.value = null, N();
42
42
  }, I = () => {
43
43
  document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden";
44
- }, V = () => {
44
+ }, N = () => {
45
45
  document.body.style.overflow = "", document.documentElement.style.overflow = "";
46
- }, D = [
46
+ }, R = [
47
47
  { name: "Small", value: "" },
48
48
  { name: "Regular", value: "grid-item--width1 grid-item--height1" },
49
49
  { name: "Medium", value: "grid-item--width2 grid-item--height2" },
50
50
  { name: "Big", value: "grid-item--width3 grid-item--height3" }
51
- ], F = async (s) => {
51
+ ], D = async (s) => {
52
52
  await d.deletePhoto(s);
53
- }, O = async () => {
53
+ }, F = async () => {
54
54
  await d.updatePhoto(e.value), r();
55
- }, T = async (s) => {
55
+ }, L = async (s) => {
56
56
  if (v.length < 1 || !e.value.categories || !e.value.size) {
57
57
  console.error("All fields are required.");
58
58
  return;
@@ -63,28 +63,28 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
63
63
  categories: typeof e.value.categories == "string" ? e.value.categories.split(",").map((i) => i.trim()) : e.value.categories
64
64
  }), r();
65
65
  };
66
- let P = n("all");
67
- return A(async () => {
68
- await d.fetchGallery(y, $), typeof window < "u" && new IntersectionObserver((i) => {
69
- i.some((l) => l.isIntersecting) && (y += 1, U());
70
- }).observe(z.value);
66
+ let E = n("all");
67
+ return T(async () => {
68
+ await d.fetchGallery(y, U), typeof window < "u" && new IntersectionObserver((i) => {
69
+ i.some((t) => t.isIntersecting) && (y += 1, B());
70
+ }).observe(S.value);
71
71
  }), (s, i) => (a(), o("div", ee, [
72
- t("div", te, [
73
- le,
72
+ l("div", le, [
73
+ te,
74
74
  p.value ? (a(), o("button", {
75
75
  key: 0,
76
- onClick: i[0] || (i[0] = (l) => k(null)),
76
+ onClick: i[0] || (i[0] = (t) => k(null)),
77
77
  class: "t-white t-black bg-second i-big radius-extra"
78
78
  }, "+")) : f("", !0)
79
79
  ]),
80
- t("div", {
80
+ l("div", {
81
81
  ref_key: "grid",
82
82
  ref: C,
83
83
  class: "cols-4 gap-thin"
84
84
  }, [
85
- (a(!0), o(E, null, M(B.value, (l, Se) => (a(), o("div", {
86
- key: l.id,
87
- "data-id": l.id
85
+ (a(!0), o(P, null, M(j.value, (t, ze) => (a(), o("div", {
86
+ key: t.id,
87
+ "data-id": t.id
88
88
  }, [
89
89
  c(w, {
90
90
  name: "scaleIn",
@@ -93,29 +93,29 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
93
93
  default: b(() => [
94
94
  !p.value && C.value ? (a(), o("img", {
95
95
  key: 0,
96
- src: "https://thecommunephuket.com/photos/" + l.cover,
96
+ src: "https://thecommunephuket.com/photos/" + t.cover,
97
97
  class: "w-100 h-100 o-hidden radius-medium object-fit-cover",
98
- onClick: (_) => k(l.image)
98
+ onClick: (_) => k(t.image)
99
99
  }, null, 8, ae)) : (a(), o("div", oe, [
100
- t("img", {
101
- src: "https://thecommunephuket.com/photos/" + l.cover,
100
+ l("img", {
101
+ src: "https://thecommunephuket.com/photos/" + t.cover,
102
102
  class: "w-100 radius-small mn-b-small h-10r object-fit-cover",
103
- onClick: (_) => k(l)
103
+ onClick: (_) => k(t)
104
104
  }, null, 8, ie),
105
- t("p", ne, [
105
+ l("p", ne, [
106
106
  ce,
107
107
  re,
108
- t("span", de, x(l.size.name), 1)
108
+ l("span", de, x(t.size.name), 1)
109
109
  ]),
110
- t("p", ue, [
110
+ l("p", ue, [
111
111
  me,
112
112
  pe,
113
- (a(!0), o(E, null, M(l.categories, (_) => (a(), o("span", ve, x(_), 1))), 256))
113
+ (a(!0), o(P, null, M(t.categories, (_) => (a(), o("span", ve, x(_), 1))), 256))
114
114
  ]),
115
- t("div", ge, [
116
- t("button", {
115
+ l("div", ge, [
116
+ l("button", {
117
117
  class: "button-small w-100 button",
118
- onClick: (_) => F(l._id)
118
+ onClick: (_) => D(t._id)
119
119
  }, "Delete", 8, he)
120
120
  ])
121
121
  ]))
@@ -123,27 +123,27 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
123
123
  _: 2
124
124
  }, 1024)
125
125
  ], 8, se))), 128)),
126
- t("div", {
126
+ l("div", {
127
127
  ref_key: "sentinel",
128
- ref: z,
128
+ ref: S,
129
129
  class: "sentinel"
130
130
  }, null, 512),
131
131
  c(w, { name: "modal" }, {
132
132
  default: b(() => [
133
- L(t("div", _e, [
134
- t("div", fe, [
135
- t("div", be, [
136
- t("span", {
133
+ q(l("div", _e, [
134
+ l("div", fe, [
135
+ l("div", be, [
136
+ l("span", {
137
137
  class: "close",
138
138
  onClick: r
139
139
  }, "×"),
140
- t("img", {
141
- src: "https://thecommunephuket.com/photos/" + e.value.image
140
+ l("img", {
141
+ src: (s.FILE_SERVER_URL || "") + e.value.image
142
142
  }, null, 8, ye)
143
143
  ])
144
144
  ])
145
145
  ], 512), [
146
- [R, e.value.image !== !1 && g.value === "modal"]
146
+ [A, e.value.image !== !1 && g.value === "modal"]
147
147
  ])
148
148
  ]),
149
149
  _: 1
@@ -151,8 +151,8 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
151
151
  c(w, { name: "modal" }, {
152
152
  default: b(() => [
153
153
  e.value.image !== !1 && g.value === "edit-modal" ? (a(), o("div", ke, [
154
- t("div", we, [
155
- t("span", {
154
+ l("div", we, [
155
+ l("span", {
156
156
  class: "close",
157
157
  onClick: r
158
158
  }, "×"),
@@ -167,16 +167,16 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
167
167
  src: "/photos/" + e.value.cover
168
168
  }, null, 8, Ce)) : f("", !0),
169
169
  c(X, {
170
- options: D,
170
+ options: R,
171
171
  label: "Size",
172
172
  select: e.value.size,
173
- "onUpdate:select": i[1] || (i[1] = (l) => e.value.size = l),
173
+ "onUpdate:select": i[1] || (i[1] = (t) => e.value.size = t),
174
174
  placeholder: "Select Size",
175
175
  class: "bg-grey pd-thin radius-small mn-b-thin t-black"
176
176
  }, null, 8, ["select"]),
177
177
  c(Q, {
178
178
  field: e.value.categories,
179
- "onUpdate:field": i[2] || (i[2] = (l) => e.value.categories = l),
179
+ "onUpdate:field": i[2] || (i[2] = (t) => e.value.categories = t),
180
180
  type: "text",
181
181
  label: "Categories",
182
182
  placeholder: "Enter categories for image (comma separated)",
@@ -184,12 +184,12 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
184
184
  }, null, 8, ["field"]),
185
185
  c(Y, {
186
186
  images: v.value,
187
- "onUpdate:images": j,
187
+ "onUpdate:images": $,
188
188
  uploadPath: "photos",
189
189
  class: "mn-b-semi"
190
190
  }, null, 8, ["images"]),
191
191
  c(W, {
192
- submit: e.value._id ? O : T,
192
+ submit: e.value._id ? F : L,
193
193
  callback: r,
194
194
  class: "mn-b-thin"
195
195
  }, {
@@ -206,7 +206,7 @@ const u = (m) => (J("data-v-c506f5e5"), m = m(), K(), m), ee = { class: "pos-rel
206
206
  ], 512)
207
207
  ]));
208
208
  }
209
- }, Ue = /* @__PURE__ */ Z(ze, [["__scopeId", "data-v-c506f5e5"]]);
209
+ }, Be = /* @__PURE__ */ Z(Se, [["__scopeId", "data-v-99e559ad"]]);
210
210
  export {
211
- Ue as default
211
+ Be as default
212
212
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../../../../_virtual/_plugin-vue_export-helper.cjs"),o={},n={width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l=e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"},null,-1),r=e.createElementVNode("path",{fill:"rgb(var(--black))","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"},null,-1),c=[l,r];function s(d,u){return e.openBlock(),e.createElementBlock("svg",n,c)}const i=t.default(o,[["render",s]]);exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t={width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o=["fill"],n={__name:"IconCross",props:{fill:{type:String,default:"rgb(var(--black))"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",t,[e.createElementVNode("path",{fill:l.fill,"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"},null,8,o)]))}};exports.default=n;
@@ -1,28 +1,29 @@
1
- import { openBlock as t, createElementBlock as o, createElementVNode as e } from "vue";
2
- import n from "../../../../../_virtual/_plugin-vue_export-helper.js";
3
- const r = {}, c = {
1
+ import { openBlock as l, createElementBlock as t, createElementVNode as o } from "vue";
2
+ const n = {
4
3
  width: "26",
5
4
  height: "26",
6
5
  viewBox: "0 0 26 26",
7
6
  fill: "none",
8
7
  xmlns: "http://www.w3.org/2000/svg"
9
- }, l = /* @__PURE__ */ e("rect", {
10
- width: "24",
11
- height: "24",
12
- transform: "translate(1 1)"
13
- }, null, -1), s = /* @__PURE__ */ e("path", {
14
- fill: "rgb(var(--black))",
15
- "fill-rule": "evenodd",
16
- "clip-rule": "evenodd",
17
- d: "M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"
18
- }, null, -1), i = [
19
- l,
20
- s
21
- ];
22
- function _(d, h) {
23
- return t(), o("svg", c, i);
24
- }
25
- const f = /* @__PURE__ */ n(r, [["render", _]]);
8
+ }, r = ["fill"], L = {
9
+ __name: "IconCross",
10
+ props: {
11
+ fill: {
12
+ type: String,
13
+ default: "rgb(var(--black))"
14
+ }
15
+ },
16
+ setup(e) {
17
+ return (i, c) => (l(), t("svg", n, [
18
+ o("path", {
19
+ fill: e.fill,
20
+ "fill-rule": "evenodd",
21
+ "clip-rule": "evenodd",
22
+ d: "M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"
23
+ }, null, 8, r)
24
+ ]));
25
+ }
26
+ };
26
27
  export {
27
- f as default
28
+ L as default
28
29
  };
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../icons/navigation/IconCheckmark.vue.cjs"),p={class:"bg-grey radius-medium w-100"},y=e.createElementVNode("h3",{class:"pd-medium"},"Tracking History",-1),k={class:"flex-center flex i-big radius-extra br-solid br-2px br-black-transp-10 mn-r-small"},_={class:"h4 w-8r"},b={key:0,class:"h5 w-8r"},f={class:"h5 w-8r"},h=["disabled","onClick"],g={__name:"StatusHistory",props:{statusHistory:{type:Array},statusCurrent:{type:String},edit:{type:Boolean},statuses:{type:Array}},setup(o){const n=o,i=n.statuses.map(s=>{const r=n.statusHistory.find(t=>t.status===s);return{status:s,timestamp:r?r.timestamp:"N/A",inHistory:!!r,_id:r?r._id:null}}),c=e.ref(n.statusCurrent),l=e.ref(n.statusHistory),u=s=>l.value.some(r=>r.status===s),d=s=>{const t=n.statuses.findIndex(a=>a===c.value)+1;return n.statuses[t]&&n.statuses[t]===s};return e.ref("192.168.1.197"),e.ref(9100),e.ref(`This is some text to print
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../icons/navigation/IconCheckmark.vue.cjs"),m={class:"bg-grey radius-medium w-100"},d=e.createElementVNode("h3",{class:"pd-medium"},"Tracking History",-1),p={class:"flex-center flex i-big radius-extra br-solid br-2px br-black-transp-10 mn-r-small"},k={class:"h4 w-8r"},_={key:0,class:"h5 w-8r"},f={__name:"StatusHistory",props:{statusHistory:{type:Array},statusCurrent:{type:String},edit:{type:Boolean},statuses:{type:Array}},setup(a){const o=a,l=o.statuses.map(s=>{const t=o.statusHistory.find(n=>n.status===s);return console.log(),{status:s,user:(t==null?void 0:t.user)||void 0,timestamp:t?t.timestamp:"N/A",inHistory:!!t,_id:t?t._id:null}});e.ref(o.statusCurrent);const c=e.ref(o.statusHistory),i=s=>c.value.some(t=>t.status===s);return e.ref("192.168.1.197"),e.ref(9100),e.ref(`This is some text to print
2
2
 
3
- `),(s,r)=>(e.openBlock(),e.createElementBlock("div",p,[y,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),t=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"w-100 br-t br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("div",k,[u(t.status)?(e.openBlock(),e.createBlock(m.default,{key:0,class:"i-medium"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createElementVNode("p",_,e.toDisplayString(t.status),1),t.timestamp?(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(s.formatDate(t.timestamp)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("p",f,e.toDisplayString(t._id),1),o.edit?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!d(t),onClick:a=>s.setStatus(t),class:"mn-l-auto bg-main button radius-big"},"Set status",8,h)):e.createCommentVNode("",!0)]))),128))]))}};exports.default=g;
3
+ `),(s,t)=>{const n=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",m,[d,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),r=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"w-100 br-t br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("div",p,[i(r.status)?(e.openBlock(),e.createBlock(u.default,{key:0,class:"i-medium"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createElementVNode("p",k,e.toDisplayString(r.status),1),r.timestamp?(e.openBlock(),e.createElementBlock("p",_,e.toDisplayString(s.formatDate(r.timestamp)),1)):e.createCommentVNode("",!0)]),r.user?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"User Profile",params:{_id:r.user}},class:"pd-small radius-extra bg-second t-white mn-l-auto flex-center uppercase t-semi"},{default:e.withCtx(()=>[e.createTextVNode("Check User")]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))])}}};exports.default=f;