@ozdao/prometheus-framework 0.2.118 → 0.2.120

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/community.server.js +1 -1
  2. package/dist/community.server.mjs +1 -1
  3. package/dist/events.server.js +1 -1
  4. package/dist/events.server.mjs +1 -1
  5. package/dist/gallery.server.js +13 -3
  6. package/dist/gallery.server.mjs +13 -3
  7. package/dist/main-DL3vRQCi.js +92 -0
  8. package/dist/main-Ds3Z5x5d.mjs +14206 -0
  9. package/dist/main.css +1 -1
  10. package/dist/orders.server.js +1 -1
  11. package/dist/orders.server.mjs +1 -1
  12. package/dist/organizations.server.js +1 -1
  13. package/dist/organizations.server.mjs +1 -1
  14. package/dist/products.server.js +1 -1
  15. package/dist/products.server.mjs +1 -1
  16. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
  18. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
  20. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +116 -117
  22. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +123 -109
  24. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
  26. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
  28. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  30. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +32 -26
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +30 -26
  34. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  52. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +16 -17
  54. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  64. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +44 -69
  66. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +1 -0
  67. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.js +64 -0
  68. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.cjs +1 -0
  69. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.js +1 -0
  70. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +101 -14
  72. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +166 -103
  74. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  78. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +38 -1
  80. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -21
  84. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +3 -3
  86. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +5 -5
  90. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  94. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  96. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  132. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +31 -32
  134. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  136. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  142. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  144. package/dist/prometheus-framework.cjs.js +1 -1
  145. package/dist/prometheus-framework.es.js +1 -1
  146. package/dist/queryProcessor-g8208K6g.mjs +178 -0
  147. package/dist/queryProcessor-haY_gPGg.js +177 -0
  148. package/dist/style.css +1 -1
  149. package/dist/wallet.server.js +1 -1
  150. package/dist/wallet.server.mjs +1 -1
  151. package/dist/web-B8tq3Fda.mjs +54 -0
  152. package/dist/web-ByJkgGrt.js +1 -0
  153. package/package.json +1 -1
  154. package/src/components/DatePicker/Calendar.vue +82 -55
  155. package/src/components/Feed/Feed.vue +45 -16
  156. package/src/components/FieldTags/BlockTags.vue +30 -23
  157. package/src/components/Popup/Popup.vue +2 -2
  158. package/src/modules/events/components/pages/Events.vue +2 -48
  159. package/src/modules/gallery/components/blocks/PhotoViewer.vue +115 -0
  160. package/src/modules/gallery/components/pages/Gallery.vue +103 -6
  161. package/src/modules/gallery/components/sections/BackofficeGallery.vue +100 -32
  162. package/src/modules/gallery/controllers/gallery.controller.js +45 -38
  163. package/src/modules/gallery/models/photo.model.js +4 -0
  164. package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
  165. package/src/modules/globals/components/elements/ButtonDate.vue +37 -43
  166. package/src/modules/globals/components/layouts/Client.vue +1 -1
  167. package/src/modules/globals/components/sections/SectionPageTitle.vue +1 -1
  168. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -2
  169. package/src/modules/globals/services/globals.store.js +13 -17
  170. package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
  171. package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
  172. package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
  173. package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
  174. package/src/modules/products/components/sections/FilterProducts.vue +2 -1
  175. package/src/modules/gallery/components/sections/GalleryWithCategories.vue +0 -176
@@ -1,68 +1,92 @@
1
- import { ref as l, onMounted as A, openBlock as i, createElementBlock as c, createVNode as r, unref as d, withCtx as h, Fragment as E, renderList as I, createElementVNode as P, createBlock as N, createCommentVNode as w, createTextVNode as V, toDisplayString as B } from "vue";
2
- import { useRoute as F } from "vue-router";
3
- import "../../../../components/Field/Field.vue.js";
4
- import O from "../../../../components/Button/Button.vue2.js";
1
+ import { ref as s, openBlock as d, createElementBlock as h, createVNode as o, unref as b, isRef as C, withCtx as c, Fragment as F, renderList as S, createElementVNode as m, toDisplayString as T, createBlock as L, createCommentVNode as A, createTextVNode as I } from "vue";
2
+ import { useRoute as j } from "vue-router";
3
+ import "../../../../components/Field/Field.vue2.js";
4
+ import O from "../../../../components/Button/Button.vue.js";
5
5
  import "../../../../components/Select/Select.vue2.js";
6
- import R from "../../../../components/Chips/Chips.vue.js";
6
+ import G from "../../../../components/Chips/Chips.vue.js";
7
7
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
8
- import D from "../../../../components/Popup/Popup.vue.js";
9
- import L from "../../../../components/Feed/Feed.vue.js";
10
- import { state as k } from "../../../auth/store/auth.js";
8
+ import V from "../../../../components/Popup/Popup.vue.js";
9
+ import z from "../../../../components/Feed/Feed.vue.js";
10
+ import { state as $ } from "../../../auth/store/auth.js";
11
11
  import "../../../organizations/store/organizations.js";
12
- import n from "../../store/gallery.js";
13
- import T from "../../../globals/components/blocks/CardHeader.vue.js";
14
- import j from "../../../globals/components/sections/SectionPageTitle.vue.js";
15
- import G from "../../../../components/EditImages/EditImages.vue.js";
12
+ import r from "../../store/gallery.js";
13
+ import q from "../../../globals/components/blocks/CardHeader.vue.js";
14
+ import H from "../../../globals/components/sections/SectionPageTitle.vue.js";
15
+ import J from "../blocks/PhotoViewer.vue.js";
16
+ import K from "../../../../components/EditImages/EditImages.vue.js";
16
17
  import M from "../../../../components/FieldTags/BlockTags.vue.js";
17
- const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-small" }, H = ["src"], ce = {
18
+ const Q = { class: "cols-1 gap-thin pd-thin" }, W = { class: "pos-relative" }, X = ["src", "onClick"], Y = { class: "pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra" }, Z = { class: "pd-small" }, ee = ["src"], te = { class: "flex-nowrap flex gap-thin" }, we = {
18
19
  __name: "BackofficeGallery",
19
- setup(J) {
20
- const v = F(), u = l("all"), p = l(!1);
21
- function _(a) {
22
- p.value = !0, b.value = a;
20
+ setup(ae) {
21
+ const x = j(), v = s("all");
22
+ let f = s({
23
+ param: "createdAt",
24
+ order: "desc",
25
+ options: [{
26
+ label: "Date",
27
+ value: "createdAt"
28
+ }, {
29
+ label: "Popularity",
30
+ value: "views"
31
+ }, {
32
+ label: "Creator",
33
+ value: "creator"
34
+ }]
35
+ }), g = s({
36
+ start: null,
37
+ end: null
38
+ });
39
+ const _ = s(!1);
40
+ function D(t) {
41
+ _.value = !0, i.value = t;
42
+ }
43
+ function E() {
44
+ _.value = !1, i.value = null;
45
+ }
46
+ const P = s(!1);
47
+ function N(t) {
48
+ P.value = !0, i.value = t;
23
49
  }
24
- function g() {
25
- p.value = !1, b.value = null;
50
+ function w() {
51
+ P.value = !1, i.value = null, u.value = [], n.value = { tags: null, image: null };
26
52
  }
27
- const b = l(null);
28
- l("all");
29
- const s = l({
53
+ const i = s(null);
54
+ s("all");
55
+ const n = s({
30
56
  tags: null,
31
57
  image: null
32
- }), m = l([]), U = (a) => {
33
- m.value = a;
34
- };
35
- l(null);
36
- const f = l([]), $ = async (a) => {
37
- await n.delete(a);
38
- }, C = async () => {
39
- await n.update(s.value), g();
40
- }, x = async () => {
41
- if (m.length < 1) {
58
+ }), u = s([]), R = (t) => {
59
+ u.value = t;
60
+ }, p = s([]), B = async (t) => {
61
+ await r.delete(t._id), r.removeItem(t, p.value);
62
+ }, y = async (t, l) => {
63
+ t.status = l, await r.update(t), r.updateItem(t, p.value);
64
+ }, k = async (t) => {
65
+ if (u.length < 1) {
42
66
  alert("Upload at least 1 image");
43
67
  return;
44
68
  }
45
- let a = await n.create({
46
- images: m.value,
47
- tags: s.value.tags,
69
+ let l = await r.create({
70
+ images: u.value,
71
+ tags: n.value.tags,
72
+ status: t,
48
73
  owner: {
49
74
  type: "Organization",
50
- target: v.params._id
75
+ target: x.params._id
51
76
  },
52
77
  creator: {
53
78
  type: "User",
54
- target: k.user._id
79
+ target: $.user._id
55
80
  }
56
81
  });
57
- for (let e of a)
58
- n.addItem(e, f.value);
82
+ for (let e of l)
83
+ r.addItem(e, p.value);
59
84
  };
60
- return A(async () => {
61
- }), (a, e) => (i(), c("div", S, [
62
- r(j, {
63
- title: "Manage Gallery",
64
- "onUpdate:tabs_current": e[0] || (e[0] = (t) => u.value = t),
65
- tabs_current: u.value,
85
+ return (t, l) => (d(), h("div", Q, [
86
+ o(H, {
87
+ title: "Gallery",
88
+ "onUpdate:tabs_current": l[0] || (l[0] = (e) => v.value = e),
89
+ tabs_current: v.value,
66
90
  tabs: [
67
91
  { name: "All", value: "all" },
68
92
  { name: "Featured", value: "featured" },
@@ -71,16 +95,17 @@ const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-sm
71
95
  { name: "Archived", value: "archived" }
72
96
  ],
73
97
  actions: [
74
- { method: () => _(null), label: "Add Photo" }
98
+ { method: () => N(null), label: "Add Photo" }
75
99
  ],
76
100
  class: "mn-b-small bg-light bg-light radius-big"
77
101
  }, null, 8, ["tabs_current", "actions"]),
78
- r(L, {
79
- items: f.value,
80
- "onUpdate:items": e[2] || (e[2] = (t) => f.value = t),
81
- sort: d(n).state.sort,
82
- "onUpdate:sort": e[3] || (e[3] = (t) => d(n).state.sort = t),
83
- search: !0,
102
+ o(z, {
103
+ items: p.value,
104
+ "onUpdate:items": l[1] || (l[1] = (e) => p.value = e),
105
+ sort: b(f),
106
+ "onUpdate:sort": l[2] || (l[2] = (e) => C(f) ? f.value = e : f = e),
107
+ date: b(g),
108
+ "onUpdate:date": l[3] || (l[3] = (e) => C(g) ? g.value = e : g = e),
84
109
  states: {
85
110
  empty: {
86
111
  title: "No Photos Found",
@@ -88,84 +113,122 @@ const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-sm
88
113
  }
89
114
  },
90
115
  store: {
91
- read: (t) => d(n).read(t)
116
+ read: (e) => b(r).read(e)
92
117
  },
93
118
  options: {
94
119
  limit: 15,
95
- owner: d(v).params._id,
96
- ...u.value !== "all" && { status: u.value }
120
+ owner: b(x).params._id,
121
+ ...v.value !== "all" && { status: v.value }
97
122
  },
98
123
  class: "cols-3 gap-thin"
99
124
  }, {
100
- default: h(({
101
- items: t
125
+ default: c(({
126
+ items: e
102
127
  }) => [
103
- (i(!0), c(E, null, I(t, (o) => {
104
- var y;
105
- return i(), c("div", {
106
- key: o._id,
128
+ (d(!0), h(F, null, S(e, (a) => {
129
+ var U;
130
+ return d(), h("div", {
131
+ key: a._id,
107
132
  class: "bg-light radius-small flex-column pos-relative flex-wrap"
108
133
  }, [
109
- r(T, {
110
- entity: o,
134
+ o(q, {
135
+ entity: a,
111
136
  entityType: "photo",
112
- user: k.user._id,
113
- owner: o.creator,
114
- creator: o.creator,
115
- date: o.createdAt,
137
+ user: $.user._id,
138
+ owner: a.creator,
139
+ creator: a.creator,
140
+ date: a.createdAt,
116
141
  actions: [
117
- { method: () => $(o._id), label: "Delete" }
142
+ { method: () => B(a), label: "Delete" },
143
+ { method: () => y(a, "archived"), label: "Archive" },
144
+ a.status === "draft" ? { method: () => y(a, "published"), label: "Publish" } : { method: () => y(a, "draft"), label: "Draft" }
118
145
  ],
119
146
  class: "pd-small mn-b-small"
120
147
  }, null, 8, ["entity", "user", "owner", "creator", "date", "actions"]),
121
- P("img", {
122
- src: (a.FILE_SERVER_URL || "") + o.cover,
123
- class: "w-100 h-20r object-fit-contain bg-black",
124
- onClick: e[1] || (e[1] = (K) => _(a.photo))
125
- }, null, 8, z),
126
- P("div", q, [
127
- ((y = o.tags) == null ? void 0 : y.length) > 0 ? (i(), N(R, {
148
+ m("div", W, [
149
+ m("img", {
150
+ src: (t.FILE_SERVER_URL || "") + a.cover,
151
+ class: "w-100 h-20r object-fit-contain bg-black",
152
+ onClick: (le) => D(a)
153
+ }, null, 8, X),
154
+ m("div", Y, T(a.status), 1)
155
+ ]),
156
+ m("div", Z, [
157
+ ((U = a.tags) == null ? void 0 : U.length) > 0 ? (d(), L(G, {
128
158
  key: 0,
129
- chips: o.tags
130
- }, null, 8, ["chips"])) : w("", !0)
159
+ chips: a.tags
160
+ }, null, 8, ["chips"])) : A("", !0)
131
161
  ])
132
162
  ]);
133
163
  }), 128))
134
164
  ]),
135
165
  _: 1
136
- }, 8, ["items", "sort", "store", "options"]),
137
- r(D, {
138
- title: "Add photo",
139
- onClosePopup: g,
140
- isPopupOpen: p.value,
166
+ }, 8, ["items", "sort", "date", "store", "options"]),
167
+ o(V, {
168
+ onClosePopup: E,
169
+ isPopupOpen: _.value,
170
+ class: "bg-black o-hidden w-100 h-100 radius-big"
171
+ }, {
172
+ default: c(() => [
173
+ o(J, {
174
+ photoUrl: i.value.image
175
+ }, null, 8, ["photoUrl"])
176
+ ]),
177
+ _: 1
178
+ }, 8, ["isPopupOpen"]),
179
+ o(V, {
180
+ title: "Add Photo",
181
+ onClosePopup: w,
182
+ isPopupOpen: P.value,
141
183
  class: "bg-white w-max-30r radius-big pd-big"
142
184
  }, {
143
- default: h(() => [
144
- s.value.cover ? (i(), c("img", {
185
+ default: c(() => [
186
+ n.value.cover ? (d(), h("img", {
145
187
  key: 0,
146
- src: s.value.cover,
188
+ src: n.value.cover,
147
189
  class: "radius-small w-100 mn-b-small h-20r object-fit-cover"
148
- }, null, 8, H)) : w("", !0),
149
- r(G, {
150
- images: m.value,
190
+ }, null, 8, ee)) : A("", !0),
191
+ o(K, {
192
+ images: u.value,
151
193
  uploadPath: "/photos",
152
- "onUpdate:images": U,
194
+ "onUpdate:images": R,
153
195
  class: "mn-b-semi bg-light radius-medium"
154
196
  }, null, 8, ["images"]),
155
- r(M, {
156
- onTagsChanged: e[4] || (e[4] = (t) => s.value.tags = t),
157
- tags: s.value.tags
197
+ o(M, {
198
+ onTagsChanged: l[4] || (l[4] = (e) => n.value.tags = e),
199
+ tags: n.value.tags,
200
+ tagsSuggested: [
201
+ { text: "people" },
202
+ { text: "events" },
203
+ { text: "place" },
204
+ { text: "food" },
205
+ { text: "drinks" },
206
+ { text: "special" }
207
+ ],
208
+ class: "mn-b-semi"
158
209
  }, null, 8, ["tags"]),
159
- r(O, {
160
- submit: s.value._id ? C : x,
161
- callback: g,
162
- class: "mn-b-thin bg-main w-100"
163
- }, {
164
- default: h(() => [
165
- V(B(s.value._id ? "Update" : "Publish"), 1)
166
- ]),
167
- _: 1
168
- }, 8, ["submit"])
210
+ m("div", te, [
211
+ o(O, {
212
+ submit: () => k("draft"),
213
+ callback: w,
214
+ class: "t-nowrap bg-second w-100"
215
+ }, {
216
+ default: c(() => [
217
+ I(" To drafts ")
218
+ ]),
219
+ _: 1
220
+ }, 8, ["submit"]),
221
+ o(O, {
222
+ submit: () => k("published"),
223
+ callback: w,
224
+ class: "bg-main w-100"
225
+ }, {
226
+ default: c(() => [
227
+ I(" Publish ")
228
+ ]),
229
+ _: 1
230
+ }, 8, ["submit"])
231
+ ])
169
232
  ]),
170
233
  _: 1
171
234
  }, 8, ["isPopupOpen"])
@@ -173,5 +236,5 @@ const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-sm
173
236
  }
174
237
  };
175
238
  export {
176
- ce as default
239
+ we as default
177
240
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../icons/navigation/IconSearch.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d={class:"flex-v-center flex-nowrap flex pd-small bg-light w-100 radius-big"},i={__name:"BlockSearch",props:{placeholder:{type:String,default:"Enter shop or product name"},button:{type:String,default:"Search"}},emits:["search"],setup(l,{emit:a}){const c=a;e.ref(null);const o=t=>{c("search",t)};return(t,r)=>(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(s.default,{class:"i-medium t-transp mn-r-thin"}),e.createVNode(u.default,{placeholder:l.placeholder,"onUpdate:field":r[0]||(r[0]=n=>o(n)),class:"w-100"},null,8,["placeholder"])]))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../icons/navigation/IconSearch.vue.cjs"),u=require("../../../../components/Field/Field.vue.cjs"),d={class:"flex-v-center flex-nowrap flex pd-small bg-light w-100 radius-big"},i={__name:"BlockSearch",props:{placeholder:{type:String,default:"Enter shop or product name"},button:{type:String,default:"Search"}},emits:["search"],setup(l,{emit:a}){const c=a;e.ref(null);const o=t=>{c("search",t)};return(t,r)=>(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(s.default,{class:"i-medium t-transp mn-r-thin"}),e.createVNode(u.default,{placeholder:l.placeholder,"onUpdate:field":r[0]||(r[0]=n=>o(n)),class:"w-100"},null,8,["placeholder"])]))}};exports.default=i;
@@ -1,6 +1,6 @@
1
1
  import { ref as s, openBlock as p, createElementBlock as i, createVNode as r } from "vue";
2
2
  import d from "../../../icons/navigation/IconSearch.vue.js";
3
- import m from "../../../../components/Field/Field.vue2.js";
3
+ import m from "../../../../components/Field/Field.vue.js";
4
4
  const f = { class: "flex-v-center flex-nowrap flex pd-small bg-light w-100 radius-big" }, g = {
5
5
  __name: "BlockSearch",
6
6
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("vue-router"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),x=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../components/Tooltip/Tooltip.vue.cjs"),v=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const $=require("../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"pos-relative"},F={key:2},P={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},T={key:0,class:"w-4r pos-relative i-thin"},U={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},L=["src"],I={class:"bg-black pd-thin radius-small"},O=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),j=["onClick"],A={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){V.useRouter();function E(n){const r=new Date,d=new Date(n),u=Math.abs(r-d),m=Math.floor(u/1e3),a=Math.floor(m/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var u,m,a,s,i,c,k,h,b,g,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(m=(u=t.owner.target)==null?void 0:u.profile)==null?void 0:m.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((g=(b=t.owner.target)==null?void 0:b.profile)==null?void 0:g.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(" · "+e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",F," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",P,[t.members?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",U,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,L)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",I,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(x.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[O]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,j)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),V=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../components/Tooltip/Tooltip.vue.cjs"),v=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const $=require("../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"pos-relative"},F={key:2},P={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},T={key:0,class:"w-4r pos-relative i-thin"},U={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},L=["src"],I={class:"bg-black flex-column flex gap-thin pd-thin radius-small"},O=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),j=["onClick"],A={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){x.useRouter();function E(n){const r=new Date,d=new Date(n),u=Math.abs(r-d),m=Math.floor(u/1e3),a=Math.floor(m/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var u,m,a,s,i,c,k,h,g,b,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(m=(u=t.owner.target)==null?void 0:u.profile)==null?void 0:m.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((b=(g=t.owner.target)==null?void 0:g.profile)==null?void 0:b.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(" · "+e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",F," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",P,[t.members?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",U,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,L)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",I,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(V.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[O]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,j)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=A;
@@ -5,7 +5,7 @@ import A from "../../../reports/components/sections/FormReport.vue.js";
5
5
  import B from "../../../../components/Tooltip/Tooltip.vue.js";
6
6
  import N from "../../../../components/Dropdown/Dropdown.vue2.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
- import "../../../../components/Button/Button.vue.js";
8
+ import "../../../../components/Button/Button.vue2.js";
9
9
  import "../../../auth/store/auth.js";
10
10
  import "../../../organizations/store/memberships.js";
11
11
  import O from "../../../icons/navigation/IconEllipsis.vue.js";
@@ -28,7 +28,7 @@ const j = {
28
28
  right: "0px"
29
29
  },
30
30
  class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
31
- }, Z = ["src"], _ = { class: "bg-black pd-thin radius-small" }, ee = /* @__PURE__ */ c("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), te = ["onClick"], he = {
31
+ }, Z = ["src"], _ = { class: "bg-black flex-column flex gap-thin pd-thin radius-small" }, ee = /* @__PURE__ */ c("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), te = ["onClick"], he = {
32
32
  __name: "CardHeader",
33
33
  props: [
34
34
  "user",
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),C=require("../../../icons/navigation/IconCalendar.vue.cjs"),M={class:"t-semi"},T={__name:"ButtonDate",props:{action:{type:Function},date:{type:Object}},setup(i){const d=i,{action:c,date:p}=t.toRefs(d),f=t.computed(()=>m(p.value)),D=()=>{c.value&&c.value()};function m(r){const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],{start:s,end:n}=r;if(s===null&&n===null)return"All Time";const a=new Date(s),l=a.getUTCDate(),u=e[a.getUTCMonth()],g=a.getUTCFullYear();if(!n)return`${l} ${u} ${g}`;const o=new Date(n),h=o.getUTCDate(),_=e[o.getUTCMonth()],v=o.getUTCFullYear();return`${l} ${u} - ${h} ${_} ${v}`}return(r,e)=>(t.openBlock(),t.createElementBlock("div",{onClick:D,class:"cursor-pointer flex-center flex"},[t.createVNode(C.default,{class:"w-1r mn-r-thin h-auto"}),t.createElementVNode("span",M,t.toDisplayString(f.value),1)]))}};exports.default=T;
@@ -1 +1,38 @@
1
-
1
+ import { toRefs as g, computed as C, openBlock as T, createElementBlock as v, createVNode as y, createElementVNode as M, toDisplayString as U } from "vue";
2
+ import k from "../../../icons/navigation/IconCalendar.vue.js";
3
+ const x = { class: "t-semi" }, w = {
4
+ __name: "ButtonDate",
5
+ props: {
6
+ action: {
7
+ type: Function
8
+ },
9
+ date: {
10
+ type: Object
11
+ }
12
+ },
13
+ setup(u) {
14
+ const i = u, { action: o, date: p } = g(i), m = C(() => f(p.value)), d = () => {
15
+ o.value && o.value();
16
+ };
17
+ function f(c) {
18
+ const t = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], { start: r, end: e } = c;
19
+ if (r === null && e === null)
20
+ return "All Time";
21
+ const n = new Date(r), s = n.getUTCDate(), l = t[n.getUTCMonth()], D = n.getUTCFullYear();
22
+ if (!e)
23
+ return `${s} ${l} ${D}`;
24
+ const a = new Date(e), h = a.getUTCDate(), _ = t[a.getUTCMonth()], $ = a.getUTCFullYear();
25
+ return `${s} ${l} - ${h} ${_} ${$}`;
26
+ }
27
+ return (c, t) => (T(), v("div", {
28
+ onClick: d,
29
+ class: "cursor-pointer flex-center flex"
30
+ }, [
31
+ y(k, { class: "w-1r mn-r-thin h-auto" }),
32
+ M("span", x, U(m.value), 1)
33
+ ]));
34
+ }
35
+ };
36
+ export {
37
+ w as default
38
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Tab/Tab.vue2.cjs"),i={class:"br-b br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"},u={class:"mn-r-auto"},d=["onClick"],m={__name:"SectionPageTitle",props:{title:String,actions:Array,tabs:Array,tabs_current:Object},emits:["update:tabs_current"],setup(r,{emit:l}){const n=l,s=o=>{n("update:tabs_current",o)};return(o,b)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("header",i,[e.createElementVNode("h1",u,e.toDisplayString(r.title),1),r.actions&&r.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.actions,t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.to?(e.openBlock(),e.createBlock(a,{key:t.to,to:t.to,class:e.normalizeClass(t.class||"radius-extra pd-thin uppercase t-medium hover-scale-1 transition-ease cursor-pointer t-white bg-second flex-center flex")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),t.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:t.method,class:e.normalizeClass(t.class||"radius-extra pd-thin uppercase t-medium hover-scale-1 transition-ease cursor-pointer t-white bg-second flex-center flex")},e.toDisplayString(t.label),11,d)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)]),r.tabs?(e.openBlock(),e.createBlock(c.default,{key:0,selected:r.tabs_current,"onUpdate:selected":s,tabs:r.tabs,class:"w-100 t-nowrap o-scroll h5"},null,8,["selected","tabs"])):e.createCommentVNode("",!0)])}}};exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Tab/Tab.vue2.cjs"),i={class:"br-b br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex"},u={class:"mn-r-auto"},d=["onClick"],m={__name:"SectionPageTitle",props:{title:String,actions:Array,tabs:Array,tabs_current:[Object,String]},emits:["update:tabs_current"],setup(r,{emit:l}){const n=l,s=o=>{n("update:tabs_current",o)};return(o,b)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("header",i,[e.createElementVNode("h1",u,e.toDisplayString(r.title),1),r.actions&&r.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.actions,t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.to?(e.openBlock(),e.createBlock(a,{key:t.to,to:t.to,class:e.normalizeClass(t.class||"radius-extra pd-thin uppercase t-medium hover-scale-1 transition-ease cursor-pointer t-white bg-second flex-center flex")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),t.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:t.method,class:e.normalizeClass(t.class||"radius-extra pd-thin uppercase t-medium hover-scale-1 transition-ease cursor-pointer t-white bg-second flex-center flex")},e.toDisplayString(t.label),11,d)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)]),r.tabs?(e.openBlock(),e.createBlock(c.default,{key:0,selected:r.tabs_current,"onUpdate:selected":s,tabs:r.tabs,class:"w-100 t-nowrap o-scroll h5"},null,8,["selected","tabs"])):e.createCommentVNode("",!0)])}}};exports.default=m;
@@ -1,12 +1,12 @@
1
1
  import { resolveComponent as p, openBlock as r, createElementBlock as s, createElementVNode as o, toDisplayString as n, Fragment as c, renderList as f, createBlock as i, normalizeClass as u, withCtx as x, createTextVNode as k, createCommentVNode as a } from "vue";
2
2
  import _ from "../../../../components/Tab/Tab.vue2.js";
3
- const g = { class: "br-b br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex" }, y = { class: "mn-r-auto" }, C = ["onClick"], N = {
3
+ const g = { class: "br-b br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex" }, y = { class: "mn-r-auto" }, C = ["onClick"], B = {
4
4
  __name: "SectionPageTitle",
5
5
  props: {
6
6
  title: String,
7
7
  actions: Array,
8
8
  tabs: Array,
9
- tabs_current: Object
9
+ tabs_current: [Object, String]
10
10
  },
11
11
  emits: [
12
12
  "update:tabs_current"
@@ -50,5 +50,5 @@ const g = { class: "br-b br-solid br-black-transp-10 pd-medium flex-v-center fle
50
50
  }
51
51
  };
52
52
  export {
53
- N as default
53
+ B as default
54
54
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue"),c=require("../store/globals.cjs");class u{constructor(e){this.state=d.reactive({items:[],current:{}}),this.apiUrl=e}async request(e,t={}){const r=e.startsWith("http")?e:`${this.apiUrl}${e}`,s={...{credentials:"include",headers:{}},...t};!s.headers["Content-Type"]&&t.body&&(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(t.body));try{const i=await fetch(r,s);if(!i.ok){const n=await i.json(),o=new Error(n.message||"Unknown error");throw o.errorCode=n.errorCode||"UNKNOWN_ERROR",o}return await i.json()}catch(i){throw console.error(i),c.setError(i),i}}async create(e){return await this.request("/create",{method:"POST",body:e})}async read(e={}){const t=new URLSearchParams(e).toString();return await this.request(`/read?${t}`)}async update(e){return await this.request("/update",{method:"POST",body:e})}async delete(e){return await this.request(`/delete/${e}`,{method:"DELETE"})}setItems(e,t){t||this.state.items,t.splice(0,t.length,...e)}addItem(e,t){const r=t||this.state.items,a=r.findIndex(s=>s._id===e._id);a===-1?r.splice(0,0,e):Object.assign(r[a],e)}updateItem(e,t){const r=t?t.items:this.state.items,a=r.findIndex(s=>s._id===e._id);a!==-1&&r.splice(a,1,e)}removeItem(e,t){const r=t?t.items:this.state.items,a=r.findIndex(s=>s._id===e._id);a!==-1&&r.splice(a,1)}}exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),d=require("../store/globals.cjs");class u{constructor(e){this.state=c.reactive({items:[],current:{}}),this.apiUrl=e}async request(e,t={}){const a=e.startsWith("http")?e:`${this.apiUrl}${e}`,s={...{credentials:"include",headers:{}},...t};!s.headers["Content-Type"]&&t.body&&(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(t.body));try{const r=await fetch(a,s);if(!r.ok){const i=await r.json(),o=new Error(i.message||"Unknown error");throw o.errorCode=i.errorCode||"UNKNOWN_ERROR",o}return await r.json()}catch(r){throw console.error(r),d.setError(r),r}}async create(e){return await this.request("/create",{method:"POST",body:e})}async read(e={}){const t=new URLSearchParams(e).toString();return await this.request(`/read?${t}`)}async update(e){return await this.request("/update",{method:"PUT",body:e})}async delete(e){return await this.request(`/delete/${e}`,{method:"DELETE"})}setItems(e,t){t||this.state.items,t.splice(0,t.length,...e)}addItem(e,t,a="_id"){const n=t||this.state.items,s=n.findIndex(r=>r[a]===e[a]);s===-1?n.splice(0,0,e):Object.assign(n[s],e)}updateItem(e,t,a="_id"){const n=t||this.state.items,s=n.findIndex(r=>r[a]===e[a]);s!==-1&&n.splice(s,1,e)}removeItem(e,t,a="_id"){const n=t||this.state.items,s=n.findIndex(r=>r[a]===e[a]);s!==-1&&n.splice(s,1)}}exports.default=u;
@@ -1,15 +1,15 @@
1
- import { reactive as d } from "vue";
2
- import { setError as c } from "../store/globals.js";
1
+ import { reactive as c } from "vue";
2
+ import { setError as d } from "../store/globals.js";
3
3
  class m {
4
4
  constructor(t) {
5
- this.state = d({
5
+ this.state = c({
6
6
  items: [],
7
7
  current: {}
8
8
  }), this.apiUrl = t;
9
9
  }
10
10
  // Simplified request method to avoid repetition and enhance maintainability
11
11
  async request(t, e = {}) {
12
- const r = t.startsWith("http") ? t : `${this.apiUrl}${t}`, s = {
12
+ const a = t.startsWith("http") ? t : `${this.apiUrl}${t}`, s = {
13
13
  ...{
14
14
  credentials: "include",
15
15
  // Assumes credentials needed for each request
@@ -19,14 +19,14 @@ class m {
19
19
  };
20
20
  !s.headers["Content-Type"] && e.body && (s.headers["Content-Type"] = "application/json", s.body = JSON.stringify(e.body));
21
21
  try {
22
- const i = await fetch(r, s);
23
- if (!i.ok) {
24
- const n = await i.json(), o = new Error(n.message || "Unknown error");
25
- throw o.errorCode = n.errorCode || "UNKNOWN_ERROR", o;
22
+ const r = await fetch(a, s);
23
+ if (!r.ok) {
24
+ const i = await r.json(), o = new Error(i.message || "Unknown error");
25
+ throw o.errorCode = i.errorCode || "UNKNOWN_ERROR", o;
26
26
  }
27
- return await i.json();
28
- } catch (i) {
29
- throw console.error(i), c(i), i;
27
+ return await r.json();
28
+ } catch (r) {
29
+ throw console.error(r), d(r), r;
30
30
  }
31
31
  }
32
32
  async create(t) {
@@ -41,7 +41,7 @@ class m {
41
41
  }
42
42
  async update(t) {
43
43
  return await this.request("/update", {
44
- method: "POST",
44
+ method: "PUT",
45
45
  body: t
46
46
  });
47
47
  }
@@ -54,17 +54,17 @@ class m {
54
54
  setItems(t, e) {
55
55
  e || this.state.items, e.splice(0, e.length, ...t);
56
56
  }
57
- addItem(t, e) {
58
- const r = e || this.state.items, a = r.findIndex((s) => s._id === t._id);
59
- a === -1 ? r.splice(0, 0, t) : Object.assign(r[a], t);
57
+ addItem(t, e, a = "_id") {
58
+ const n = e || this.state.items, s = n.findIndex((r) => r[a] === t[a]);
59
+ s === -1 ? n.splice(0, 0, t) : Object.assign(n[s], t);
60
60
  }
61
- updateItem(t, e) {
62
- const r = e ? e.items : this.state.items, a = r.findIndex((s) => s._id === t._id);
63
- a !== -1 && r.splice(a, 1, t);
61
+ updateItem(t, e, a = "_id") {
62
+ const n = e || this.state.items, s = n.findIndex((r) => r[a] === t[a]);
63
+ s !== -1 && n.splice(s, 1, t);
64
64
  }
65
- removeItem(t, e) {
66
- const r = e ? e.items : this.state.items, a = r.findIndex((s) => s._id === t._id);
67
- a !== -1 && r.splice(a, 1);
65
+ removeItem(t, e, a = "_id") {
66
+ const n = e || this.state.items, s = n.findIndex((r) => r[a] === t[a]);
67
+ s !== -1 && n.splice(s, 1);
68
68
  }
69
69
  }
70
70
  export {
@@ -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"),r={},i={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},c=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),a=[c];function l(h,n){return e.openBlock(),e.createElementBlock("svg",i,a)}const o=t.default(r,[["render",l]]);exports.default=o;
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"),r={},i={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},c=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--light))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),a=[c];function l(h,n){return e.openBlock(),e.createElementBlock("svg",i,a)}const o=t.default(r,[["render",l]]);exports.default=o;
@@ -4,11 +4,11 @@ const c = {}, a = {
4
4
  width: "100%",
5
5
  height: "20rem",
6
6
  xmlns: "http://www.w3.org/2000/svg"
7
- }, o = /* @__PURE__ */ e('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), h = [
8
- o
7
+ }, h = /* @__PURE__ */ e('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--light))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), o = [
8
+ h
9
9
  ];
10
10
  function l(n, s) {
11
- return t(), r("svg", a, h);
11
+ return t(), r("svg", a, o);
12
12
  }
13
13
  const d = /* @__PURE__ */ i(c, [["render", l]]);
14
14
  export {