@ozdao/prometheus-framework 0.1.81 → 0.1.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
  2. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
  3. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  4. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
  5. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
  6. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
  7. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  8. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
  9. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
  10. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
  11. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  12. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
  13. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
  14. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
  15. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  16. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  17. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
  19. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
  21. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
  23. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
  25. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
  27. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +32 -32
  29. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
  31. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  32. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
  34. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +32 -32
  36. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +21 -21
  38. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +8 -8
  40. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +12 -12
  42. package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
  44. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
  46. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
  48. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +41 -40
  52. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/store/auth.js +17 -18
  54. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
  56. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
  58. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
  59. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
  60. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
  62. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
  66. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
  68. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +3 -3
  69. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +25 -25
  70. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
  72. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
  74. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -10
  77. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
  79. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
  81. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +23 -23
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
  91. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +18 -18
  93. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
  96. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
  98. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +20 -20
  100. package/dist/prometheus-framework.cjs.js +27 -27
  101. package/dist/prometheus-framework.es.js +1949 -1937
  102. package/dist/style.css +1 -1
  103. package/package.json +2 -4
  104. package/src/modules/auth/components/pages/SignIn.vue +1 -0
  105. package/src/modules/auth/store/auth.js +2 -7
@@ -1,54 +1,55 @@
1
- import { ref as x, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as D, unref as u, createElementVNode as c, createCommentVNode as a, createBlock as T, withModifiers as E, toDisplayString as d, renderSlot as p } from "vue";
2
- import $ from "../../../../components/Chips/Chips.vue.js";
3
- import I from "../../../icons/navigation/IconEdit.vue.js";
4
- import M from "../../../globals/components/blocks/CardHeader.vue.js";
1
+ import { ref as b, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as x, createElementVNode as c, createCommentVNode as a, createBlock as w, withModifiers as D, toDisplayString as d, renderSlot as E } from "vue";
2
+ import p from "../../../../components/Chips/Chips.vue.js";
3
+ import $ from "../../../icons/navigation/IconEdit.vue.js";
4
+ import I from "../../../globals/components/blocks/CardHeader.vue.js";
5
5
  import "../../../community/store/reactions.js";
6
- import { useRouter as F } from "vue-router";
7
- const S = {
6
+ import { useRouter as M } from "vue-router";
7
+ const F = {
8
8
  key: 0,
9
9
  class: "o-hidden pos-relative bg-grey mn-small w-100"
10
- }, R = ["src"], N = ["src"], z = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, L = {
10
+ }, S = ["src"], R = ["src"], N = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, z = {
11
11
  key: 0,
12
12
  class: "t-semi"
13
- }, V = { class: "t-semi" }, B = {
13
+ }, L = { class: "t-semi" }, V = {
14
14
  key: 0,
15
15
  class: "t-semi uppercase"
16
- }, H = {
16
+ }, B = {
17
17
  key: 1,
18
18
  class: "cursor-pointer mn-thin flex-nowrap flex w-100"
19
- }, P = {
19
+ }, H = {
20
20
  key: 0,
21
21
  class: ""
22
- }, Y = {
22
+ }, P = {
23
23
  key: 1,
24
24
  class: "pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"
25
- }, O = {
25
+ }, Y = {
26
26
  key: 2,
27
27
  class: "mn-small p-big"
28
- }, Q = {
28
+ }, K = {
29
29
  __name: "CardEvent",
30
30
  props: ["event", "user", "short", "type"],
31
31
  setup(e) {
32
+ b(/* @__PURE__ */ new Date()), M();
32
33
  const s = e;
33
- x(/* @__PURE__ */ new Date()), F(), l(() => s.event.content.find((t) => t.type.name === "ImageUpload")), l(() => s.event.content.find((t) => t.type.name === "Textarea"));
34
- const C = l(() => {
35
- const t = /* @__PURE__ */ new Date(), o = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds()), r = new Date(s.event.date.start), f = Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate(), r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds()) - o;
36
- if (f < 0)
34
+ l(() => s.event.content.find((t) => t.type.name === "ImageUpload")), l(() => s.event.content.find((t) => t.type.name === "Textarea"));
35
+ const T = l(() => {
36
+ const t = /* @__PURE__ */ new Date(), o = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds()), r = new Date(s.event.date.start), u = Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate(), r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds()) - o;
37
+ if (u < 0)
37
38
  return "Finished";
38
- if (f === 0)
39
+ if (u === 0)
39
40
  return "Starting Now";
40
41
  {
41
- const y = Math.floor(f / 1e3), h = Math.floor(y / 60), v = Math.floor(h / 60), w = Math.floor(v / 24);
42
- return w > 0 ? `${w} days until event` : v > 0 ? `${v} hours until event` : h > 0 ? `${h} minutes until event` : `${y} seconds until event`;
42
+ const g = Math.floor(u / 1e3), f = Math.floor(g / 60), h = Math.floor(f / 60), y = Math.floor(h / 24);
43
+ return y > 0 ? `${y} days until event` : h > 0 ? `${h} hours until event` : f > 0 ? `${f} minutes until event` : `${g} seconds until event`;
43
44
  }
44
- }), U = l(() => {
45
+ }), C = l(() => {
45
46
  const t = new Date(s.event.date.start), o = { day: "2-digit", month: "2-digit" };
46
47
  return t.toLocaleDateString(void 0, o);
47
- }), k = l(() => {
48
+ }), U = l(() => {
48
49
  console.log(s.event.date.start), console.log(s.event.date.end);
49
- const t = new Date(s.event.date.start), o = new Date(s.event.date.end), r = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(t), g = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(o);
50
- return `${r}-${g}`;
51
- }), b = l(() => {
50
+ const t = new Date(s.event.date.start), o = new Date(s.event.date.end), r = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(t), v = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(o);
51
+ return `${r}-${v}`;
52
+ }), k = l(() => {
52
53
  const t = s.event.name;
53
54
  return t.length > 26 ? `${t.substring(0, 22)}…` : t;
54
55
  });
@@ -57,7 +58,7 @@ const S = {
57
58
  "flex-nowrap flex-v-center flex": e.type === "short"
58
59
  }, "pos-relative"])
59
60
  }, [
60
- D(M, {
61
+ x(I, {
61
62
  class: m({
62
63
  "mn-small pd-medium": e.type !== "short",
63
64
  "flex-child-order-last flex-child mn-l-small": e.type === "short"
@@ -70,27 +71,27 @@ const S = {
70
71
  members: e.event.numberOfTickets,
71
72
  membersPhotos: e.event.participantsPhotos,
72
73
  type: e.type,
73
- dateFormatted: u(C)
74
+ dateFormatted: T.value
74
75
  }, null, 8, ["class", "entity", "user", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
75
- e.event.cover && e.type !== "short" ? (n(), i("div", S, [
76
+ e.event.cover && e.type !== "short" ? (n(), i("div", F, [
76
77
  c("img", {
77
78
  src: (t.FILE_SERVER_URL || "") + e.event.cover,
78
79
  alt: "Event image",
79
80
  class: "pos-relative z-index-1 d-block mn-auto h-20r"
80
- }, null, 8, R),
81
+ }, null, 8, S),
81
82
  c("img", {
82
83
  src: (t.FILE_SERVER_URL || "") + e.event.cover,
83
84
  alt: "Event Background",
84
85
  class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
85
86
  style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
86
- }, null, 8, N)
87
+ }, null, 8, R)
87
88
  ])) : a("", !0),
88
89
  c("section", {
89
90
  class: m(["pos-relative w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
90
91
  }, [
91
- e.user === e.event.creator.target._id ? (n(), T(I, {
92
+ e.user === e.event.creator.target._id ? (n(), w($, {
92
93
  key: 0,
93
- onClick: o[0] || (o[0] = E((r) => t.$router.push({
94
+ onClick: o[0] || (o[0] = D((r) => t.$router.push({
94
95
  name: "Edit Event",
95
96
  params: {
96
97
  url: e.event.url
@@ -101,19 +102,19 @@ const S = {
101
102
  c("div", {
102
103
  class: m([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
103
104
  }, [
104
- c("div", z, [
105
- e.type !== "short" ? (n(), i("span", L, d(u(U)) + " | ", 1)) : a("", !0),
106
- c("span", V, d(u(k)), 1)
105
+ c("div", N, [
106
+ e.type !== "short" ? (n(), i("span", z, d(C.value) + " | ", 1)) : a("", !0),
107
+ c("span", L, d(U.value), 1)
107
108
  ]),
108
- e.type === "short" ? (n(), i("span", B, d(u(b)), 1)) : a("", !0)
109
+ e.type === "short" ? (n(), i("span", V, d(k.value), 1)) : a("", !0)
109
110
  ], 2),
110
- e.type !== "short" ? (n(), i("div", H, [
111
- e.type !== "short" ? (n(), i("h3", P, d(e.event.name), 1)) : a("", !0),
112
- e.event.status === "draft" ? (n(), i("div", Y, d(e.event.status), 1)) : a("", !0)
111
+ e.type !== "short" ? (n(), i("div", B, [
112
+ e.type !== "short" ? (n(), i("h3", H, d(e.event.name), 1)) : a("", !0),
113
+ e.event.status === "draft" ? (n(), i("div", P, d(e.event.status), 1)) : a("", !0)
113
114
  ])) : a("", !0),
114
- e.type !== "short" ? (n(), i("p", O, d(e.event.description), 1)) : a("", !0),
115
- p(t.$slots, "default"),
116
- e.type !== "short" && e.event.tags.length > 0 ? (n(), T($, {
115
+ e.type !== "short" ? (n(), i("p", Y, d(e.event.description), 1)) : a("", !0),
116
+ E(t.$slots, "default"),
117
+ e.type !== "short" && e.event.tags.length > 0 ? (n(), w(p, {
117
118
  key: 3,
118
119
  chips: e.event.tags
119
120
  }, null, 8, ["chips"])) : a("", !0)
@@ -122,5 +123,5 @@ const S = {
122
123
  }
123
124
  };
124
125
  export {
125
- Q as default
126
+ K as default
126
127
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),l=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const c=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),g={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:n}){const t=o,s=async()=>{t.hasTicket?await d(t.targetId):await u(t.targetId)};async function u(i){try{const e={type:t.type,target:i,user:t.userId},r=await c.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function d(i){const e={type:t.type,target:i,user:t.userId};try{const r=await c.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(l.default,{submit:s,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},k=p.default(g,[["__scopeId","data-v-872ff798"]]);exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),p=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const s=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const g=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:c}){const n=c,t=o,u=async()=>{t.hasTicket?await l(t.targetId):await d(t.targetId)};async function d(i){try{const e={type:t.type,target:i,user:t.userId},r=await s.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function l(i){const e={type:t.type,target:i,user:t.userId};try{const r=await s.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(p.default,{submit:u,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},y=g.default(k,[["__scopeId","data-v-872ff798"]]);exports.default=y;
@@ -1,10 +1,10 @@
1
- import { openBlock as p, createBlock as d, withCtx as g, createTextVNode as l, toDisplayString as m } from "vue";
2
- import k from "../../../../components/Button/Button.vue2.js";
1
+ import { openBlock as d, createBlock as g, withCtx as m, createTextVNode as l, toDisplayString as k } from "vue";
2
+ import f from "../../../../components/Button/Button.vue2.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as c } from "../../store/tickets.js";
5
5
  import "./ButtonJoin.vue2.js";
6
- import f from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
- const y = {
6
+ import y from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
+ const h = {
8
8
  __name: "ButtonJoin",
9
9
  props: {
10
10
  type: {
@@ -26,11 +26,11 @@ const y = {
26
26
  }
27
27
  },
28
28
  emits: ["updateTicket"],
29
- setup(o, { emit: i }) {
30
- const t = o, n = async () => {
31
- t.hasTicket ? await u(t.targetId) : await s(t.targetId);
29
+ setup(o, { emit: n }) {
30
+ const i = n, t = o, s = async () => {
31
+ t.hasTicket ? await p(t.targetId) : await u(t.targetId);
32
32
  };
33
- async function s(a) {
33
+ async function u(a) {
34
34
  try {
35
35
  const e = {
36
36
  // Renamed membershipData to ticketData
@@ -43,7 +43,7 @@ const y = {
43
43
  throw console.log(e), e;
44
44
  }
45
45
  }
46
- async function u(a) {
46
+ async function p(a) {
47
47
  const e = {
48
48
  // Renamed membershipData to ticketData
49
49
  type: t.type,
@@ -57,17 +57,17 @@ const y = {
57
57
  throw console.log(r), r;
58
58
  }
59
59
  }
60
- return (a, e) => (p(), d(k, {
61
- submit: n,
60
+ return (a, e) => (d(), g(f, {
61
+ submit: s,
62
62
  class: "bg-main button-small radius-extra button"
63
63
  }, {
64
- default: g(() => [
65
- l(m(o.hasTicket ? "Leave" : "Join"), 1)
64
+ default: m(() => [
65
+ l(k(o.hasTicket ? "Leave" : "Join"), 1)
66
66
  ]),
67
67
  _: 1
68
68
  }));
69
69
  }
70
- }, v = /* @__PURE__ */ f(y, [["__scopeId", "data-v-872ff798"]]);
70
+ }, B = /* @__PURE__ */ y(h, [["__scopeId", "data-v-872ff798"]]);
71
71
  export {
72
- v as default
72
+ B as default
73
73
  };
@@ -10,12 +10,12 @@ import B from "../../../../components/Checkbox/Checkbox.vue.js";
10
10
  import F from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import M from "../../../../components/UploadImage/UploadImage.vue.js";
12
12
  import R from "../../../../components/Button/Button.vue2.js";
13
- import { useRoute as S, useRouter as H } from "vue-router";
14
- import { read as L, clean as j, state as q, update as y, create as k, remove as G } from "../../store/events.js";
13
+ import { useRoute as S, useRouter as j } from "vue-router";
14
+ import { read as H, clean as q, state as G, update as y, create as k, remove as J } from "../../store/events.js";
15
15
  import { state as c } from "../../../auth/store/auth.js";
16
- import { actions as J } from "../../../organizations/store/organizations.js";
16
+ import { actions as K } from "../../../organizations/store/organizations.js";
17
17
  import "./EditEvent.vue2.js";
18
- const K = {
18
+ const L = {
19
19
  key: 0,
20
20
  class: "h-100 pd-thin"
21
21
  }, Q = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, W = /* @__PURE__ */ i("h4", null, "Upload Event Cover", -1), X = /* @__PURE__ */ i("h3", { class: "mn-small" }, "Date", -1), Y = /* @__PURE__ */ i("h3", { class: "mn-small" }, "Description", -1), Z = {
@@ -33,17 +33,17 @@ const K = {
33
33
  }, xe = {
34
34
  __name: "EditEvent",
35
35
  setup(se) {
36
- const v = S(), f = H();
36
+ const v = S(), f = j();
37
37
  let e = u(null), g = u(null);
38
38
  const b = u([]), n = u(null), r = u(), x = () => ({ top: 0, left: 0 });
39
39
  $(async () => {
40
40
  if (v.params.url) {
41
- const t = await L({ user: c.user._id, url: v.params.url });
41
+ const t = await H({ user: c.user._id, url: v.params.url });
42
42
  e.value = t.pop();
43
43
  const o = e.value.date.start, U = e.value.date.end;
44
44
  r.value = [o, U];
45
45
  } else {
46
- j(), e.value = q.current;
46
+ q(), e.value = G.current;
47
47
  const t = /* @__PURE__ */ new Date(), o = /* @__PURE__ */ new Date();
48
48
  r.value = [t, o];
49
49
  }
@@ -59,7 +59,7 @@ const K = {
59
59
  name: e.value.owner.target.profile.name,
60
60
  photo: e.value.owner.target.profile.photo
61
61
  });
62
- const a = await J.read({
62
+ const a = await K.read({
63
63
  user: c.user._id,
64
64
  postable: c.user._id,
65
65
  limit: 100
@@ -109,13 +109,13 @@ const K = {
109
109
  });
110
110
  }
111
111
  function C() {
112
- confirm("Are you sure you want to delete this event?") && G(e.value._id).then((a) => {
112
+ confirm("Are you sure you want to delete this event?") && J(e.value._id).then((a) => {
113
113
  f.push({ name: "User Events", params: { _id: e.value.creator.target._id } });
114
114
  }).catch((a) => {
115
115
  console.error(a);
116
116
  });
117
117
  }
118
- return (a, t) => l(e) ? (d(), m("article", K, [
118
+ return (a, t) => l(e) ? (d(), m("article", L, [
119
119
  i("div", Q, [
120
120
  s(M, {
121
121
  photo: l(e).cover,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.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-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-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-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-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"],ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let g=1;const f=10;let _=e.ref(null),k=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>y.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(y.value))),V=async()=>{k.value=!0,await s.actions.fetchGallery(g,f),k.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),v=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 y=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(g,f),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(g+=1,V())}).observe(_.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=>v(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(e.unref(w),(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=>v(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-small h-10r object-fit-cover",onClick:p=>v(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:_,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-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-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-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-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-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-d6a1c805"]]);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.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.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-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-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-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-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(()=>b.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(b.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,k())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},k()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},k=()=>{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 b=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-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-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-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-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-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-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-d6a1c805"]]);exports.default=ie;
@@ -1,47 +1,45 @@
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 M, renderList as G, unref as L, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as R, vShow as H, createTextVNode as J, pushScopeId as K, popScopeId as Q } from "vue";
2
- import W from "../../../../components/Field/Field.vue2.js";
3
- import X from "../../../../components/Button/Button.vue2.js";
4
- import Y from "../../../../components/Select/Select.vue2.js";
5
- import { state as $, actions as d } from "../../store/gallery.js";
6
- import Z from "../../../../components/EditImages/EditImages.vue.js";
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";
2
+ import Q from "../../../../components/Field/Field.vue2.js";
3
+ import W from "../../../../components/Button/Button.vue2.js";
4
+ import X from "../../../../components/Select/Select.vue2.js";
5
+ import { state as G, actions as d } from "../../store/gallery.js";
6
+ import Y from "../../../../components/EditImages/EditImages.vue.js";
7
7
  import "./BackofficeGallery.vue2.js";
8
- import ee from "../../../../../../_virtual/_plugin-vue_export-helper.js";
9
- const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-relative w-100" }, le = { class: "mn-semi flex-v-center flex-nowrap flex" }, se = /* @__PURE__ */ u(() => /* @__PURE__ */ t("h1", { class: "mn-r-small" }, "Manage Gallery", -1)), ae = ["data-id"], oe = ["src", "onClick"], ie = {
8
+ import Z from "../../../../../../_virtual/_plugin-vue_export-helper.js";
9
+ const u = (m) => (J("data-v-d6a1c805"), m = m(), K(), m), ee = { class: "pos-relative w-100" }, te = { class: "mn-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 = {
10
10
  key: 1,
11
11
  class: "radius-small bg-white"
12
- }, ne = ["src", "onClick"], ce = { class: "t-black p-small mn-thin" }, re = /* @__PURE__ */ u(() => /* @__PURE__ */ t("span", { class: "uppercase t-transp" }, "Size", -1)), de = /* @__PURE__ */ u(() => /* @__PURE__ */ t("br", null, null, -1)), ue = { class: "pd-2px radius-big d-inline-block bg-grey" }, me = { class: "t-black p-small mn-small uppe" }, pe = /* @__PURE__ */ u(() => /* @__PURE__ */ t("span", { class: "uppercase t-transp" }, "Categories", -1)), ve = /* @__PURE__ */ u(() => /* @__PURE__ */ t("br", null, null, -1)), ge = { class: "pd-2px radius-big d-inline-block bg-grey t-semi" }, he = { class: "flex-nowrap flex" }, _e = ["onClick"], fe = { class: "modal pd-thin" }, be = { class: "modal-content radius-big" }, ye = { class: "" }, ke = ["src"], we = {
12
+ }, ie = ["src", "onClick"], ne = { class: "t-black p-small mn-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-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 = {
13
13
  key: 0,
14
14
  class: "flex-v-center flex m modal pd-big"
15
- }, xe = { class: "modal-content radius-small pd-medium bg-white" }, Ce = ["src"], ze = ["src"], Se = {
15
+ }, we = { class: "modal-content radius-small pd-medium bg-white" }, xe = ["src"], Ce = ["src"], $ = 10, ze = {
16
16
  __name: "BackofficeGallery",
17
17
  setup(m) {
18
18
  const p = n(!0), C = n(null);
19
- let y = 1;
20
- const z = 10;
21
- let S = n(null), I = n(!1);
19
+ let y = 1, z = n(null), S = n(!1);
22
20
  const v = n([]), j = (s) => {
23
21
  v.value = s;
24
- }, B = q(() => E.value === "all" ? $.gallery : $.gallery.filter((s) => s.categories.includes(E.value))), U = async () => {
25
- I.value = !0, await d.fetchGallery(y, z), I.value = !1;
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;
26
24
  }, g = n(null), e = n({
27
25
  categories: "",
28
26
  size: "",
29
27
  image: !1
30
28
  }), h = n(null), k = (s) => {
31
- console.log(p.value), p.value ? N(s) : (g.value = "modal", e.value.image = s, P());
29
+ console.log(p.value), p.value ? N(s) : (g.value = "modal", e.value.image = s, I());
32
30
  }, N = (s) => {
33
31
  g.value = "edit-modal", e.value = s || {
34
32
  categories: "",
35
33
  size: "",
36
34
  image: null
37
- }, P();
35
+ }, I();
38
36
  }, r = () => {
39
37
  e.value = {
40
38
  categories: "",
41
39
  size: "",
42
40
  image: !1
43
41
  }, h.value = null, V();
44
- }, P = () => {
42
+ }, I = () => {
45
43
  document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden";
46
44
  }, V = () => {
47
45
  document.body.style.overflow = "", document.documentElement.style.overflow = "";
@@ -65,14 +63,14 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
65
63
  categories: typeof e.value.categories == "string" ? e.value.categories.split(",").map((i) => i.trim()) : e.value.categories
66
64
  }), r();
67
65
  };
68
- let E = n("all");
66
+ let P = n("all");
69
67
  return A(async () => {
70
- await d.fetchGallery(y, z), typeof window < "u" && new IntersectionObserver((i) => {
68
+ await d.fetchGallery(y, $), typeof window < "u" && new IntersectionObserver((i) => {
71
69
  i.some((l) => l.isIntersecting) && (y += 1, U());
72
- }).observe(S.value);
73
- }), (s, i) => (a(), o("div", te, [
74
- t("div", le, [
75
- se,
70
+ }).observe(z.value);
71
+ }), (s, i) => (a(), o("div", ee, [
72
+ t("div", te, [
73
+ le,
76
74
  p.value ? (a(), o("button", {
77
75
  key: 0,
78
76
  onClick: i[0] || (i[0] = (l) => k(null)),
@@ -84,7 +82,7 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
84
82
  ref: C,
85
83
  class: "cols-4 gap-thin"
86
84
  }, [
87
- (a(!0), o(M, null, G(L(B), (l, Ie) => (a(), o("div", {
85
+ (a(!0), o(E, null, M(B.value, (l, Se) => (a(), o("div", {
88
86
  key: l.id,
89
87
  "data-id": l.id
90
88
  }, [
@@ -98,62 +96,62 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
98
96
  src: "https://thecommunephuket.com/photos/" + l.cover,
99
97
  class: "w-100 h-100 o-hidden radius-medium object-fit-cover",
100
98
  onClick: (_) => k(l.image)
101
- }, null, 8, oe)) : (a(), o("div", ie, [
99
+ }, null, 8, ae)) : (a(), o("div", oe, [
102
100
  t("img", {
103
101
  src: "https://thecommunephuket.com/photos/" + l.cover,
104
102
  class: "w-100 radius-small mn-small h-10r object-fit-cover",
105
103
  onClick: (_) => k(l)
106
- }, null, 8, ne),
107
- t("p", ce, [
104
+ }, null, 8, ie),
105
+ t("p", ne, [
106
+ ce,
108
107
  re,
109
- de,
110
- t("span", ue, x(l.size.name), 1)
108
+ t("span", de, x(l.size.name), 1)
111
109
  ]),
112
- t("p", me, [
110
+ t("p", ue, [
111
+ me,
113
112
  pe,
114
- ve,
115
- (a(!0), o(M, null, G(l.categories, (_) => (a(), o("span", ge, x(_), 1))), 256))
113
+ (a(!0), o(E, null, M(l.categories, (_) => (a(), o("span", ve, x(_), 1))), 256))
116
114
  ]),
117
- t("div", he, [
115
+ t("div", ge, [
118
116
  t("button", {
119
117
  class: "button-small w-100 button",
120
118
  onClick: (_) => F(l._id)
121
- }, "Delete", 8, _e)
119
+ }, "Delete", 8, he)
122
120
  ])
123
121
  ]))
124
122
  ]),
125
123
  _: 2
126
124
  }, 1024)
127
- ], 8, ae))), 128)),
125
+ ], 8, se))), 128)),
128
126
  t("div", {
129
127
  ref_key: "sentinel",
130
- ref: S,
128
+ ref: z,
131
129
  class: "sentinel"
132
130
  }, null, 512),
133
131
  c(w, { name: "modal" }, {
134
132
  default: b(() => [
135
- R(t("div", fe, [
136
- t("div", be, [
137
- t("div", ye, [
133
+ L(t("div", _e, [
134
+ t("div", fe, [
135
+ t("div", be, [
138
136
  t("span", {
139
137
  class: "close",
140
138
  onClick: r
141
139
  }, "×"),
142
140
  t("img", {
143
141
  src: "https://thecommunephuket.com/photos/" + e.value.image
144
- }, null, 8, ke)
142
+ }, null, 8, ye)
145
143
  ])
146
144
  ])
147
145
  ], 512), [
148
- [H, e.value.image !== !1 && g.value === "modal"]
146
+ [R, e.value.image !== !1 && g.value === "modal"]
149
147
  ])
150
148
  ]),
151
149
  _: 1
152
150
  }),
153
151
  c(w, { name: "modal" }, {
154
152
  default: b(() => [
155
- e.value.image !== !1 && g.value === "edit-modal" ? (a(), o("div", we, [
156
- t("div", xe, [
153
+ e.value.image !== !1 && g.value === "edit-modal" ? (a(), o("div", ke, [
154
+ t("div", we, [
157
155
  t("span", {
158
156
  class: "close",
159
157
  onClick: r
@@ -162,13 +160,13 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
162
160
  key: 0,
163
161
  src: h.value,
164
162
  class: "radius-small w-100 mn-small h-20r object-fit-cover"
165
- }, null, 8, Ce)) : f("", !0),
163
+ }, null, 8, xe)) : f("", !0),
166
164
  typeof h.value == "object" && e.value.image !== null ? (a(), o("img", {
167
165
  key: 1,
168
166
  class: "radius-small w-100 mn-small h-20r object-fit-cover",
169
167
  src: "/photos/" + e.value.cover
170
- }, null, 8, ze)) : f("", !0),
171
- c(Y, {
168
+ }, null, 8, Ce)) : f("", !0),
169
+ c(X, {
172
170
  options: D,
173
171
  label: "Size",
174
172
  select: e.value.size,
@@ -176,7 +174,7 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
176
174
  placeholder: "Select Size",
177
175
  class: "bg-grey pd-thin radius-small mn-thin t-black"
178
176
  }, null, 8, ["select"]),
179
- c(W, {
177
+ c(Q, {
180
178
  field: e.value.categories,
181
179
  "onUpdate:field": i[2] || (i[2] = (l) => e.value.categories = l),
182
180
  type: "text",
@@ -184,19 +182,19 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
184
182
  placeholder: "Enter categories for image (comma separated)",
185
183
  class: "bg-grey pd-thin radius-small mn-medium t-black"
186
184
  }, null, 8, ["field"]),
187
- c(Z, {
185
+ c(Y, {
188
186
  images: v.value,
189
187
  "onUpdate:images": j,
190
188
  uploadPath: "photos",
191
189
  class: "mn-semi"
192
190
  }, null, 8, ["images"]),
193
- c(X, {
191
+ c(W, {
194
192
  submit: e.value._id ? O : T,
195
193
  callback: r,
196
194
  class: "mn-thin"
197
195
  }, {
198
196
  default: b(() => [
199
- J(x(e.value._id ? "Update" : "Create"), 1)
197
+ H(x(e.value._id ? "Update" : "Create"), 1)
200
198
  ]),
201
199
  _: 1
202
200
  }, 8, ["submit"])
@@ -208,7 +206,7 @@ const u = (m) => (K("data-v-d6a1c805"), m = m(), Q(), m), te = { class: "pos-rel
208
206
  ], 512)
209
207
  ]));
210
208
  }
211
- }, Ne = /* @__PURE__ */ ee(Se, [["__scopeId", "data-v-d6a1c805"]]);
209
+ }, Ue = /* @__PURE__ */ Z(ze, [["__scopeId", "data-v-d6a1c805"]]);
212
210
  export {
213
- Ne as default
211
+ Ue as default
214
212
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("vue-router"),S=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),F=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const I=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),P={class:"pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},j=["onClick"],G=["data-id"],R=["src","onClick"],T={class:"modal pd-thin"},U={class:"modal-content radius-big"},D={class:""},L=["src"],O={key:0,class:"flex-v-center flex m modal pd-big"},$={class:"modal-content radius-small pd-medium bg-white"},A=["src"],W=["src"],H={__name:"GalleryWithCategories",setup(K){z.useRoute();const h=!1,m=e.ref(null),_=["all","place","drinks","people","events"];let d=1;const v=10;let g=e.ref(null),p=e.ref(!1);const k=e.computed(()=>c.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(c.value))),y=async()=>{p.value=!0,await s.actions.fetchGallery(d,v),p.value=!1},r=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),b=a=>{h.value?w(a):(r.value="modal",t.value.image=a,f())},w=a=>{r.value="edit-modal",t.value=a||{categories:"",size:"",image:null},f()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,V()},f=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},V=()=>{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"}],E=async()=>{await s.actions.updatePhoto(t.value),n()},N=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},B=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let c=e.ref("all");const x=a=>{c.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,v),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,y())}).observe(g.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",P,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,l=>e.createElementVNode("a",{key:l,onClick:u=>x(l),class:e.normalizeClass(["h3 uppercase mn-r-big",{"t-transp":e.unref(c)!==l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,j)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.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:Q=>b(l.image)},null,8,R)):e.createCommentVNode("",!0)]),_:2},1024)],8,G))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:g,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,L)])])],512),[[e.vShow,t.value.image!==!1&&r.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&r.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",$,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,A)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,W)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-thin",onFileChange:N,multiple:"true"})),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-thin t-black"},null,8,["select"]),e.createVNode(S.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-medium t-black"},null,8,["field"]),e.createVNode(q.default,{submit:t.value._id?E:B,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=I.default(H,[["__scopeId","data-v-34379ac8"]]);exports.default=J;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue2.cjs"),S=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Select/Select.vue2.cjs"),M=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const F=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),I={class:"pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},P=["onClick"],j=["data-id"],G=["src","onClick"],R={class:"modal pd-thin"},T={class:"modal-content radius-big"},U={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},$=["src"],A=["src"],W=!1,h=10,H={__name:"GalleryWithCategories",setup(K){x.useRoute();const m=e.ref(null),f=["all","place","drinks","people","events"];let d=1,v=e.ref(null),g=e.ref(!1);const _=e.computed(()=>c.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(c.value))),k=async()=>{g.value=!0,await s.actions.fetchGallery(d,h),g.value=!1},r=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),y=a=>{W.value?b(a):(r.value="modal",t.value.image=a,p())},b=a=>{r.value="edit-modal",t.value=a||{categories:"",size:"",image:null},p()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,w()},p=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},w=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},V=[{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"}],C=async()=>{await s.actions.updatePhoto(t.value),n()},E=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},N=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let c=e.ref("all");const B=a=>{c.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,h),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,k())}).observe(v.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(f,l=>e.createElementVNode("a",{key:l,onClick:u=>B(l),class:e.normalizeClass(["h3 uppercase mn-r-big",{"t-transp":e.unref(c)!==l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,P)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.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:Q=>y(l.image)},null,8,G)):e.createCommentVNode("",!0)]),_:2},1024)],8,j))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:v,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",R,[e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&r.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&r.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,$)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,A)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-thin",onFileChange:E,multiple:"true"})),e.createVNode(q.default,{options:V,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-thin t-black"},null,8,["select"]),e.createVNode(z.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-medium t-black"},null,8,["field"]),e.createVNode(S.default,{submit:t.value._id?C:N,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=F.default(H,[["__scopeId","data-v-34379ac8"]]);exports.default=J;