@ozdao/prometheus-framework 0.2.35 → 0.2.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +42 -52
  4. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +61 -2
  6. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +2 -61
  8. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
  10. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
  12. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  14. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +39 -242
  16. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -0
  17. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -0
  18. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -0
  19. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -0
  20. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.cjs +1 -2
  21. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.js +13 -13
  22. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +111 -2
  24. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
  26. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
  28. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
  30. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  32. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +45 -44
  34. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  35. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +61 -56
  36. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  38. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/events/store/events.js +59 -39
  42. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +31 -31
  46. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +85 -55
  48. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/orders/store/orders.js +30 -38
  50. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +31 -21
  52. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  54. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +96 -93
  58. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  66. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +54 -74
  68. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +58 -48
  70. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/products/store/products.js +26 -26
  72. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  78. package/dist/prometheus-framework.cjs.js +13 -14
  79. package/dist/prometheus-framework.es.js +346 -557
  80. package/dist/style.css +1 -1
  81. package/package.json +1 -1
  82. package/src/components/Button/Button.vue +26 -19
  83. package/src/components/FieldBig/FieldBig.vue +1 -1
  84. package/src/components/FieldPhone/FieldPhone.vue +55 -304
  85. package/src/components/FieldPhone/FieldPhone2.vue +671 -0
  86. package/src/components/FieldPhone/click-outside.js +16 -11
  87. package/src/components/Footer/Footer.vue +4 -4
  88. package/src/components/Header/Header.vue +2 -1
  89. package/src/components/Select/Select.vue +2 -1
  90. package/src/modules/chats/components/sections/ChatWindow.vue +3 -1
  91. package/src/modules/chats/store/chat.store.js +1 -3
  92. package/src/modules/events/components/pages/EditEvent.vue +2 -1
  93. package/src/modules/events/components/pages/Event.vue +8 -2
  94. package/src/modules/events/components/sections/SectionMainGuest.vue +1 -1
  95. package/src/modules/events/components/sections/SectionSpecialGuests.vue +0 -1
  96. package/src/modules/events/store/events.js +23 -3
  97. package/src/modules/globals/mixins/mixins.js +33 -2
  98. package/src/modules/landing/components/sections/HeroGovernance.vue +156 -0
  99. package/src/modules/marketplace/components/sections/Filters.vue +3 -0
  100. package/src/modules/marketplace/router/marketplace.js +1 -0
  101. package/src/modules/orders/components/blocks/StatusHistory.vue +8 -3
  102. package/src/modules/orders/components/pages/EditOrder.vue +9 -11
  103. package/src/modules/orders/components/pages/FormOrder.vue +58 -46
  104. package/src/modules/orders/components/pages/Order.vue +63 -42
  105. package/src/modules/orders/components/sections/FormOrderDetails.vue +50 -18
  106. package/src/modules/orders/controllers/orders.controller.js +10 -1
  107. package/src/modules/orders/models/order.model.js +1 -0
  108. package/src/modules/orders/store/orders.js +21 -27
  109. package/src/modules/orders/store/shopcart.js +14 -2
  110. package/src/modules/organizations/components/sections/DetailsTab.vue +2 -2
  111. package/src/modules/products/components/sections/FilterProducts.vue +3 -4
  112. package/src/modules/products/components/sections/HeroRecommendation.vue +29 -2
  113. package/src/modules/products/components/sections/SectionProduct.vue +14 -9
  114. package/src/modules/products/controllers/products.controller.js +26 -17
  115. package/src/modules/products/routes/products.routes.js +6 -6
  116. package/src/modules/products/store/products.js +10 -10
  117. package/src/styles/config.scss +10 -3
@@ -1,18 +1,18 @@
1
- import { reactive as i, watch as l } from "vue";
2
- import d from "../../../../node_modules/axios/lib/axios.js";
1
+ import { reactive as i, watch as d } from "vue";
2
+ import l from "../../../../node_modules/axios/lib/axios.js";
3
3
  import { setError as s } from "../../globals/store/globals.js";
4
- const o = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = i({
4
+ const n = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = i({
5
5
  all: [],
6
6
  current: {
7
7
  _id: "",
8
8
  organization: "",
9
9
  positions: [],
10
- status: !1,
10
+ status: null,
11
11
  comment: "",
12
12
  user: {
13
- _id: !1,
13
+ _id: null,
14
14
  name: "",
15
- phone: "",
15
+ phone: null,
16
16
  messenger: {
17
17
  type: "",
18
18
  value: ""
@@ -28,67 +28,59 @@ const o = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = i
28
28
  status: ""
29
29
  }
30
30
  }
31
- }), m = {
32
- async create(e, t) {
31
+ }), h = {
32
+ async create(a, t) {
33
33
  try {
34
- a.current.positions = e, a.current.organization = t, console.log(a.current);
35
- const r = await o.post("/api/orders/create", a.current);
36
- return a.all.push(r.data), Promise.resolve(r.data);
34
+ e.current.positions = a, e.current.organization = t;
35
+ const r = await n.post("/api/orders/create", e.current);
36
+ return e.all.push(r.data), r.data;
37
37
  } catch (r) {
38
38
  s(r);
39
39
  }
40
40
  },
41
- async fetchOrder(e) {
41
+ async fetchOrder(a) {
42
42
  try {
43
- const t = await o.get(`/api/orders/${e}`);
44
- console.log(t), a.current = t.data;
43
+ const t = await n.get(`/api/orders/${a}`);
44
+ return e.current = t.data, console.log(t.data), t.data;
45
45
  } catch (t) {
46
- s(t);
46
+ throw s(t), err;
47
47
  }
48
48
  },
49
- async read(e) {
49
+ async read(a) {
50
50
  try {
51
- const t = await o.get("/api/orders/read");
52
- console.log(t), a.all = t.data;
51
+ const t = await n.get("/api/orders/read");
52
+ return e.all = t.data, t.data;
53
53
  } catch (t) {
54
- s(t);
54
+ throw s(t), t;
55
55
  }
56
56
  },
57
- async update(e) {
57
+ async update(a) {
58
58
  try {
59
- const t = await o.post(`/api/orders/${e._id}`, e), r = a.all.findIndex((n) => n._id === e._id);
60
- r !== -1 && (a.all[r] = t.data);
59
+ const t = await n.post(`/api/orders/${a._id}`, a), r = e.all.findIndex((o) => o._id === a._id);
60
+ return r !== -1 && (e.all[r] = t.data), t.data;
61
61
  } catch (t) {
62
62
  s(t);
63
63
  }
64
64
  },
65
- async confirm(e) {
65
+ async delete(a) {
66
66
  try {
67
- const t = await o.post(`/api/orders/confirm/${e}`), r = a.all.findIndex((n) => n._id === e);
68
- r !== -1 && (a.all[r] = t.data);
67
+ await n.delete(`/api/orders/${a}`), e.all = e.all.filter((t) => t._id !== a);
69
68
  } catch (t) {
70
69
  s(t);
71
70
  }
72
71
  },
73
- async changePaymentStatus(e, t) {
72
+ async changePaymentStatus(a, t) {
74
73
  try {
75
- const r = await o.post(`/api/orders/payment/${e}`, { status: t }), n = a.all.findIndex((c) => c._id === e);
76
- n !== -1 && (a.all[n] = r.data);
74
+ const r = await n.post(`/api/orders/payment/${a}`, { status: t }), o = e.all.findIndex((c) => c._id === a);
75
+ o !== -1 && (e.all[o] = r.data);
77
76
  } catch (r) {
78
77
  s(r);
79
78
  }
80
- },
81
- async delete(e) {
82
- try {
83
- await o.delete(`/api/orders/${e}`), a.all = a.all.filter((t) => t._id !== e);
84
- } catch (t) {
85
- s(t);
86
- }
87
79
  }
88
80
  };
89
- l(a, (e, t) => {
81
+ d(e, (a, t) => {
90
82
  });
91
83
  export {
92
- m as actions,
93
- a as state
84
+ h as actions,
85
+ e as state
94
86
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const e=s.reactive({organization:null,positions:[],currentState:!1}),n={toggleShopcart(){e.currentState=!e.currentState},setShopcart(){try{localStorage.getItem("shopcart")&&(e.positions=JSON.parse(localStorage.getItem("shopcart")))}catch(t){throw console.error(t),t}},addProductToCart(t,i){const o=e.positions.find(r=>r._id===t._id);o?o.quantity++:e.positions.push({_id:t._id,images:t.images,name:t.name,price:t.price,quantity:1}),localStorage.setItem("shopcart",JSON.stringify(e.positions))},removeProduct(t){const i=e.positions.find(r=>r._id===t),o=e.positions.indexOf(i);o>-1&&(e.positions.splice(o,1),localStorage.setItem("shopcart",JSON.stringify(e.positions)))},decrementItemQuantity(t){const i=e.positions.find(r=>r._id===t),o=e.positions.indexOf(i);o>-1&&(i.quantity--,i.quantity<1&&e.positions.splice(o,1),localStorage.setItem("shopcart",JSON.stringify(e.positions)))},incrementItemQuantity(t){const i=e.positions.find(o=>o._id===t);i&&(i.quantity++,localStorage.setItem("shopcart",JSON.stringify(e.positions)))},resetShopcart({state:t}){t.positions=[],localStorage.removeItem("shopcart")}};s.computed(()=>Number(e.positions.reduce((t,i)=>t+i.price*i.quantity,0))),s.computed(()=>Number(e.positions.reduce((t,i)=>t+i.quantity,0))),s.computed(()=>Number(e.currentState));s.watch(e,(t,i)=>{});exports.actions=n;exports.state=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const e=s.reactive({organization:null,positions:[],currentState:!1}),n={toggleShopcart(){e.currentState=!e.currentState},setShopcart(){try{const t=localStorage.getItem("shopcart");if(t){const o=JSON.parse(t);e.positions=o.positions,e.organization=o.organization}}catch(t){throw console.error(t),t}},addProductToCart(t,o){const i=e.positions.find(r=>r._id===t._id);i?i.quantity++:e.positions.push({_id:t._id,images:t.images,name:t.name,price:t.price,quantity:1,org_id:o}),localStorage.setItem("shopcart",JSON.stringify({positions:e.positions,organization:o}))},removeProduct(t){const o=e.positions.find(r=>r._id===t),i=e.positions.indexOf(o);i>-1&&(e.positions.splice(i,1),localStorage.setItem("shopcart",JSON.stringify(e.positions)))},decrementItemQuantity(t){const o=e.positions.find(r=>r._id===t),i=e.positions.indexOf(o);i>-1&&(o.quantity--,o.quantity<1&&e.positions.splice(i,1),localStorage.setItem("shopcart",JSON.stringify(e.positions)))},incrementItemQuantity(t){const o=e.positions.find(i=>i._id===t);o&&(o.quantity++,localStorage.setItem("shopcart",JSON.stringify(e.positions)))},resetShopcart({state:t}){t.positions=[],localStorage.removeItem("shopcart")}};s.computed(()=>Number(e.positions.reduce((t,o)=>t+o.price*o.quantity,0))),s.computed(()=>Number(e.positions.reduce((t,o)=>t+o.quantity,0))),s.computed(()=>Number(e.currentState));s.watch(e,(t,o)=>{});exports.actions=n;exports.state=e;
@@ -1,59 +1,69 @@
1
1
  import { reactive as n, computed as s, watch as a } from "vue";
2
2
  import "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import "../../globals/store/globals.js";
4
- const e = n({
4
+ const o = n({
5
5
  organization: null,
6
6
  positions: [],
7
7
  currentState: !1
8
- }), l = {
8
+ }), u = {
9
9
  toggleShopcart() {
10
- e.currentState = !e.currentState;
10
+ o.currentState = !o.currentState;
11
11
  },
12
12
  setShopcart() {
13
13
  try {
14
- localStorage.getItem("shopcart") && (e.positions = JSON.parse(localStorage.getItem("shopcart")));
14
+ const t = localStorage.getItem("shopcart");
15
+ if (t) {
16
+ const i = JSON.parse(t);
17
+ o.positions = i.positions, o.organization = i.organization;
18
+ }
15
19
  } catch (t) {
16
20
  throw console.error(t), t;
17
21
  }
18
22
  },
19
23
  addProductToCart(t, i) {
20
- const o = e.positions.find(
24
+ const e = o.positions.find(
21
25
  (r) => r._id === t._id
22
26
  );
23
- o ? o.quantity++ : e.positions.push({
27
+ e ? e.quantity++ : o.positions.push({
24
28
  _id: t._id,
25
29
  images: t.images,
26
30
  name: t.name,
27
31
  price: t.price,
28
- quantity: 1
29
- }), localStorage.setItem("shopcart", JSON.stringify(e.positions));
32
+ quantity: 1,
33
+ org_id: i
34
+ // Добавляем _id организации к каждому продукту
35
+ }), localStorage.setItem("shopcart", JSON.stringify({
36
+ positions: o.positions,
37
+ organization: i
38
+ // Сохраняем _id организации в корне объекта корзины
39
+ }));
30
40
  },
31
41
  removeProduct(t) {
32
- const i = e.positions.find(
42
+ const i = o.positions.find(
33
43
  (r) => r._id === t
34
- ), o = e.positions.indexOf(i);
35
- o > -1 && (e.positions.splice(o, 1), localStorage.setItem("shopcart", JSON.stringify(e.positions)));
44
+ ), e = o.positions.indexOf(i);
45
+ e > -1 && (o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify(o.positions)));
36
46
  },
37
47
  decrementItemQuantity(t) {
38
- const i = e.positions.find(
48
+ const i = o.positions.find(
39
49
  (r) => r._id === t
40
- ), o = e.positions.indexOf(i);
41
- o > -1 && (i.quantity--, i.quantity < 1 && e.positions.splice(o, 1), localStorage.setItem("shopcart", JSON.stringify(e.positions)));
50
+ ), e = o.positions.indexOf(i);
51
+ e > -1 && (i.quantity--, i.quantity < 1 && o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify(o.positions)));
42
52
  },
43
53
  incrementItemQuantity(t) {
44
- const i = e.positions.find(
45
- (o) => o._id === t
54
+ const i = o.positions.find(
55
+ (e) => e._id === t
46
56
  );
47
- i && (i.quantity++, localStorage.setItem("shopcart", JSON.stringify(e.positions)));
57
+ i && (i.quantity++, localStorage.setItem("shopcart", JSON.stringify(o.positions)));
48
58
  },
49
59
  resetShopcart({ state: t }) {
50
60
  t.positions = [], localStorage.removeItem("shopcart");
51
61
  }
52
62
  };
53
- s(() => Number(e.positions.reduce((t, i) => t + i.price * i.quantity, 0))), s(() => Number(e.positions.reduce((t, i) => t + i.quantity, 0))), s(() => Number(e.currentState));
54
- a(e, (t, i) => {
63
+ s(() => Number(o.positions.reduce((t, i) => t + i.price * i.quantity, 0))), s(() => Number(o.positions.reduce((t, i) => t + i.quantity, 0))), s(() => Number(o.currentState));
64
+ a(o, (t, i) => {
55
65
  });
56
66
  export {
57
- l as actions,
58
- e as state
67
+ u as actions,
68
+ o as state
59
69
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const p=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const m=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const s=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const r=require("../../../spots/store/spots.cjs"),i=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const _={class:"for-transition w-100"},f={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},h={class:"flex-nowrap flex bg-grey pd-medium radius-big"},b={key:0,class:"mn-r-auto"},w={key:1,class:"mn-r-auto"},g={class:"flex-nowrap flex pd-thin"},k={class:"flex-nowrap flex pd-thin"},x={__name:"DepartmentEdit",setup(V){const n=a.useRouter(),t=a.useRoute();e.ref("details"),e.ref(!1);async function o(){t.params.department&&await i.actions.read(t.params.department),e.ref(i.state.memberships),await r.actions.read(t.params._id),t.params.department&&await r.actions.readOne(t.params.department)}o(),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function c(){t.params.department&&await r.actions.update(t.params._id,r.state.department),t.params.department||await r.actions.create(t.params._id,r.state.department)}function d(){n.replace({name:"Department",params:{_id:t.params._id,department:r.state.department._id}})}async function u(){await r.actions.delete(t.params._id,r.state.department)}return(l,N)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",f,[e.createVNode(p.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",h,[e.unref(t).params.department?(e.openBlock(),e.createElementBlock("h1",b,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",w,"Create Spot")),e.createElementVNode("section",g,[e.createVNode(s.default,{submit:c,callback:d},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("section",k,[e.createVNode(s.default,{submit:u,callback:l.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},E=m.default(x,[["__scopeId","data-v-190683d5"]]);exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const p=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");const m=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Checkbox/Checkbox.vue2.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const s=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const r=require("../../../spots/store/spots.cjs"),i=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const _={class:"for-transition w-100"},f={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},h={class:"flex-nowrap flex bg-grey pd-medium radius-big"},b={key:0,class:"mn-r-auto"},w={key:1,class:"mn-r-auto"},g={class:"flex-nowrap flex pd-thin"},k={class:"flex-nowrap flex pd-thin"},x={__name:"DepartmentEdit",setup(V){const n=a.useRouter(),t=a.useRoute();e.ref("details"),e.ref(!1);async function o(){t.params.department&&await i.actions.read(t.params.department),e.ref(i.state.memberships),await r.actions.read(t.params._id),t.params.department&&await r.actions.readOne(t.params.department)}o(),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function c(){t.params.department&&await r.actions.update(t.params._id,r.state.department),t.params.department||await r.actions.create(t.params._id,r.state.department)}function d(){n.replace({name:"Department",params:{_id:t.params._id,department:r.state.department._id}})}async function u(){await r.actions.delete(t.params._id,r.state.department)}return(l,N)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",f,[e.createVNode(p.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",h,[e.unref(t).params.department?(e.openBlock(),e.createElementBlock("h1",b,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",w,"Create Spot")),e.createElementVNode("section",g,[e.createVNode(s.default,{submit:c,callback:d},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("section",k,[e.createVNode(s.default,{submit:u,callback:l.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},E=m.default(x,[["__scopeId","data-v-190683d5"]]);exports.default=E;
@@ -6,13 +6,13 @@ import "../../../../components/Tab/Tab.vue.js";
6
6
  import "../../../../components/Field/Field.vue.js";
7
7
  import y from "../../../../../../_virtual/_plugin-vue_export-helper.js";
8
8
  import "../../../../components/Select/Select.vue.js";
9
- import "../../../../components/Checkbox/Checkbox.vue.js";
9
+ import "../../../../components/Checkbox/Checkbox.vue2.js";
10
10
  import "../../../../components/Address/Address.vue.js";
11
11
  import "../../../../components/Loader/Loader.vue.js";
12
12
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
13
13
  import d from "../../../../components/Button/Button.vue2.js";
14
14
  import "vue-i18n";
15
- import "../../../../components/Popup/Popup.vue.js";
15
+ import "../../../../components/Popup/Popup.vue2.js";
16
16
  import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
17
17
  import "../blocks/EditArray.vue2.js";
18
18
  import "../blocks/DepartmentSub.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue2.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
@@ -10,7 +10,7 @@ import "../../../../components/Select/Select.vue.js";
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import k from "../../../../components/UploadImage/UploadImage.vue.js";
12
12
  import T from "../../../../components/Button/Button.vue2.js";
13
- import "../../../../components/Popup/Popup.vue.js";
13
+ import "../../../../components/Popup/Popup.vue2.js";
14
14
  import { state as z } from "../../../auth/store/auth.js";
15
15
  import { actions as s, state as e } from "../../store/organizations.js";
16
16
  import "../../store/memberships.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Dropdown/Dropdown.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs"),g=require("../../../../components/Chips/Chips.vue.cjs"),b=require("../../../icons/navigation/IconEdit.vue.cjs"),f=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),s=require("../elements/ButtonToggleMembership.vue.cjs"),k=require("../blocks/Socials.vue.cjs"),h=require("../../../reports/components/sections/FormReport.vue.cjs"),z=require("../../store/organizations.cjs"),B=require("../../store/memberships.cjs"),w={class:"t-center flex-center flex-column flex pd-medium radius-big bg-grey"},y={class:"bg-black pd-thin radius-small"},x=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),V=["src"],N={class:"mn-b-thin"},E={class:"mn-b-medium p-big"},q={class:"t-semi mn-b-small"},C={key:6,class:"mn-t-small mn-b-thin"},S={__name:"DetailsTab",props:{organization:Object,user:Object},setup(t){const n=u.useRoute(),r=({membership:a,status:o,target:i},l,c)=>{B.mutations.handleMembershipUpdate(z.state.current,a,o,i,l,c)};return(a,o)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("section",w,[t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(d.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",y,[e.createVNode(h.default,{user:t.user._id,type:"organization",target:t.organization._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[x]),_:1},8,["user","target"]),t.user._id&&t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(s.default,{key:0,user:t.user._id,type:"organization",role:"blocked",target:t.organization._id,status:t.organization.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:o[0]||(o[0]=i=>r(i,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),t.user._id===t.organization.owner?(e.openBlock(),e.createBlock(b.default,{key:1,onClick:o[1]||(o[1]=i=>a.$router.push({name:"Organization Edit",params:{_id:t.organization._id}})),class:"pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"})):e.createCommentVNode("",!0),t.organization.profile.photo?(e.openBlock(),e.createElementBlock("img",{key:2,src:(a.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"radius-big bg-grey flex-center flex mn-b-small i-extra"},null,8,V)):(e.openBlock(),e.createBlock(f.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h1",N,e.toDisplayString(t.organization.profile.name),1),e.createElementVNode("p",E,[e.createVNode(m.default,{text:t.organization.profile.description?t.organization.profile.description:"",maxLen:240},null,8,["text"])]),t.organization.profile.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:4,chips:t.organization.profile.tags,class:"mn-b-semi"},null,8,["chips"])):e.createCommentVNode("",!0),e.createElementVNode("p",q," 👨‍👨‍👧‍👧 "+e.toDisplayString(t.organization.numberOfSubscribers)+" followers ",1),t.user._id&&e.unref(n).params._id&&e.unref(n).params._id!==t.user._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(s.default,{key:5,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:o[2]||(o[2]=i=>r(i,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.organization.socials).some(i=>i)?(e.openBlock(),e.createElementBlock("h4",C," Find us in socials ")):e.createCommentVNode("",!0),e.createVNode(k.default,{telegram:t.organization.socials.telegram,facebook:t.organization.socials.facebook,instagram:t.organization.socials.instagram,twitter:t.organization.socials.twitter,youtube:t.organization.socials.youtube},null,8,["telegram","facebook","instagram","twitter","youtube"])])]),_:1}))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Dropdown/Dropdown.vue2.cjs"),m=require("../../../../components/Text/Text.vue.cjs"),g=require("../../../../components/Chips/Chips.vue.cjs"),b=require("../../../icons/navigation/IconEdit.vue.cjs"),k=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),c=require("../elements/ButtonToggleMembership.vue.cjs"),f=require("../blocks/Socials.vue.cjs"),h=require("../../../reports/components/sections/FormReport.vue.cjs"),z=require("../../store/organizations.cjs"),B=require("../../store/memberships.cjs"),w={class:"t-center flex-center flex-column flex pd-medium radius-big bg-grey"},y={class:"bg-black pd-thin radius-small"},x=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),V=["src"],N={class:"mn-b-thin"},E={class:"mn-b-medium p-big"},q={class:"t-semi mn-b-small"},C={key:6,class:"mn-t-small mn-b-thin"},S={__name:"DetailsTab",props:{organization:Object,user:Object},setup(t){const s=u.useRoute(),l=({membership:i,status:o,target:n},r,a)=>{B.mutations.handleMembershipUpdate(z.state.current,i,o,n,r,a)};return(i,o)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>{var n,r;return[e.createElementVNode("section",w,[t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(d.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",y,[e.createVNode(h.default,{user:t.user._id,type:"organization",target:t.organization._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[x]),_:1},8,["user","target"]),t.user._id&&t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"blocked",target:t.organization._id,status:t.organization.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:o[0]||(o[0]=a=>l(a,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),t.user._id===t.organization.owner?(e.openBlock(),e.createBlock(b.default,{key:1,onClick:o[1]||(o[1]=a=>i.$router.push({name:"Organization Edit",params:{_id:t.organization._id}})),class:"pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"})):e.createCommentVNode("",!0),t.organization.profile.photo?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"radius-big bg-grey flex-center flex mn-b-small i-extra"},null,8,V)):(e.openBlock(),e.createBlock(k.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h1",N,e.toDisplayString(t.organization.profile.name),1),e.createElementVNode("p",E,[e.createVNode(m.default,{text:t.organization.profile.description||"",maxLen:240},null,8,["text"])]),((r=(n=t.organization.profile)==null?void 0:n.tags)==null?void 0:r.length)>0?(e.openBlock(),e.createBlock(g.default,{key:4,chips:t.organization.profile.tags,class:"mn-b-semi"},null,8,["chips"])):e.createCommentVNode("",!0),e.createElementVNode("p",q," 👨‍👨‍👧‍👧 "+e.toDisplayString(t.organization.numberOfSubscribers)+" followers ",1),t.user._id&&e.unref(s).params._id&&e.unref(s).params._id!==t.user._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(c.default,{key:5,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:o[2]||(o[2]=a=>l(a,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.organization.socials).some(a=>a)?(e.openBlock(),e.createElementBlock("h4",C," Find us in socials ")):e.createCommentVNode("",!0),e.createVNode(f.default,{telegram:t.organization.socials.telegram,facebook:t.organization.socials.facebook,instagram:t.organization.socials.instagram,twitter:t.organization.socials.twitter,youtube:t.organization.socials.youtube},null,8,["telegram","facebook","instagram","twitter","youtube"])])]}),_:1}))}};exports.default=S;
@@ -1,11 +1,11 @@
1
- import { openBlock as e, createBlock as o, Transition as k, withCtx as l, createElementVNode as r, createVNode as m, createCommentVNode as n, createElementBlock as d, toDisplayString as g, unref as b } from "vue";
1
+ import { openBlock as e, createBlock as o, Transition as k, withCtx as u, createElementVNode as r, createVNode as c, createCommentVNode as n, createElementBlock as b, toDisplayString as f, unref as z } from "vue";
2
2
  import { useRoute as w } from "vue-router";
3
- import y from "../../../../components/Dropdown/Dropdown.vue.js";
3
+ import y from "../../../../components/Dropdown/Dropdown.vue2.js";
4
4
  import x from "../../../../components/Text/Text.vue.js";
5
5
  import E from "../../../../components/Chips/Chips.vue.js";
6
6
  import O from "../../../icons/navigation/IconEdit.vue.js";
7
7
  import U from "../../../icons/placeholders/PlaceholderOrganizationPic.vue.js";
8
- import f from "../elements/ButtonToggleMembership.vue.js";
8
+ import h from "../elements/ButtonToggleMembership.vue.js";
9
9
  import $ from "../blocks/Socials.vue.js";
10
10
  import B from "../../../reports/components/sections/FormReport.vue.js";
11
11
  import { state as R } from "../../store/organizations.js";
@@ -20,99 +20,102 @@ const v = { class: "t-center flex-center flex-column flex pd-medium radius-big b
20
20
  user: Object
21
21
  },
22
22
  setup(t) {
23
- const u = w(), c = ({ membership: s, status: i, target: a }, z, h) => {
24
- S.handleMembershipUpdate(R.current, s, i, a, z, h);
23
+ const d = w(), g = ({ membership: s, status: i, target: l }, m, a) => {
24
+ S.handleMembershipUpdate(R.current, s, i, l, m, a);
25
25
  };
26
26
  return (s, i) => (e(), o(k, { name: "slide-fade" }, {
27
- default: l(() => [
28
- r("section", v, [
29
- t.user._id !== t.organization.owner ? (e(), o(y, {
30
- key: 0,
31
- label: "...",
32
- align: "right",
33
- class: "cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"
34
- }, {
35
- default: l(() => [
36
- r("section", M, [
37
- m(B, {
38
- user: t.user._id,
39
- type: "organization",
40
- target: t.organization._id,
41
- text: "Report",
42
- class: "w-100"
43
- }, {
44
- default: l(() => [
45
- V
46
- ]),
47
- _: 1
48
- }, 8, ["user", "target"]),
49
- t.user._id && t.user._id !== t.organization.owner ? (e(), o(f, {
50
- key: 0,
51
- user: t.user._id,
52
- type: "organization",
53
- role: "blocked",
54
- target: t.organization._id,
55
- status: t.organization.isBlocked,
56
- text: { create: "Block", remove: "Unblock" },
57
- onUpdateMembership: i[0] || (i[0] = (a) => c(a, "isBlocked")),
58
- class: "t-white mn-t-thin bg-red"
59
- }, null, 8, ["user", "target", "status"])) : n("", !0)
60
- ])
61
- ]),
62
- _: 1
63
- }, 8, ["label"])) : n("", !0),
64
- t.user._id === t.organization.owner ? (e(), o(O, {
65
- key: 1,
66
- onClick: i[1] || (i[1] = (a) => s.$router.push({
67
- name: "Organization Edit",
68
- params: {
69
- _id: t.organization._id
70
- }
27
+ default: u(() => {
28
+ var l, m;
29
+ return [
30
+ r("section", v, [
31
+ t.user._id !== t.organization.owner ? (e(), o(y, {
32
+ key: 0,
33
+ label: "...",
34
+ align: "right",
35
+ class: "cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"
36
+ }, {
37
+ default: u(() => [
38
+ r("section", M, [
39
+ c(B, {
40
+ user: t.user._id,
41
+ type: "organization",
42
+ target: t.organization._id,
43
+ text: "Report",
44
+ class: "w-100"
45
+ }, {
46
+ default: u(() => [
47
+ V
48
+ ]),
49
+ _: 1
50
+ }, 8, ["user", "target"]),
51
+ t.user._id && t.user._id !== t.organization.owner ? (e(), o(h, {
52
+ key: 0,
53
+ user: t.user._id,
54
+ type: "organization",
55
+ role: "blocked",
56
+ target: t.organization._id,
57
+ status: t.organization.isBlocked,
58
+ text: { create: "Block", remove: "Unblock" },
59
+ onUpdateMembership: i[0] || (i[0] = (a) => g(a, "isBlocked")),
60
+ class: "t-white mn-t-thin bg-red"
61
+ }, null, 8, ["user", "target", "status"])) : n("", !0)
62
+ ])
63
+ ]),
64
+ _: 1
65
+ }, 8, ["label"])) : n("", !0),
66
+ t.user._id === t.organization.owner ? (e(), o(O, {
67
+ key: 1,
68
+ onClick: i[1] || (i[1] = (a) => s.$router.push({
69
+ name: "Organization Edit",
70
+ params: {
71
+ _id: t.organization._id
72
+ }
73
+ })),
74
+ class: "pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"
75
+ })) : n("", !0),
76
+ t.organization.profile.photo ? (e(), b("img", {
77
+ key: 2,
78
+ src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
79
+ class: "radius-big bg-grey flex-center flex mn-b-small i-extra"
80
+ }, null, 8, j)) : (e(), o(U, {
81
+ key: 3,
82
+ class: "radius-medium mn-b-small i-extra"
71
83
  })),
72
- class: "pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"
73
- })) : n("", !0),
74
- t.organization.profile.photo ? (e(), d("img", {
75
- key: 2,
76
- src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
77
- class: "radius-big bg-grey flex-center flex mn-b-small i-extra"
78
- }, null, 8, j)) : (e(), o(U, {
79
- key: 3,
80
- class: "radius-medium mn-b-small i-extra"
81
- })),
82
- r("h1", C, g(t.organization.profile.name), 1),
83
- r("p", D, [
84
- m(x, {
85
- text: t.organization.profile.description ? t.organization.profile.description : "",
86
- maxLen: 240
87
- }, null, 8, ["text"])
88
- ]),
89
- t.organization.profile.tags.length > 0 ? (e(), o(E, {
90
- key: 4,
91
- chips: t.organization.profile.tags,
92
- class: "mn-b-semi"
93
- }, null, 8, ["chips"])) : n("", !0),
94
- r("p", F, " 👨‍👨‍👧‍👧 " + g(t.organization.numberOfSubscribers) + " followers ", 1),
95
- t.user._id && b(u).params._id && b(u).params._id !== t.user._id && t.organization.owner !== t.user._id ? (e(), o(f, {
96
- key: 5,
97
- user: t.user._id,
98
- type: "organization",
99
- role: "subscriber",
100
- target: t.organization._id,
101
- status: t.organization.isSubscriber,
102
- text: { create: "Follow", remove: "Unfollow" },
103
- onUpdateMembership: i[2] || (i[2] = (a) => c(a, "isSubscriber", "numberOfSubscribers")),
104
- class: "w-min mn-b-medium mn-r-auto mn-l-auto"
105
- }, null, 8, ["user", "target", "status"])) : n("", !0),
106
- Object.values(t.organization.socials).some((a) => a) ? (e(), d("h4", L, " Find us in socials ")) : n("", !0),
107
- m($, {
108
- telegram: t.organization.socials.telegram,
109
- facebook: t.organization.socials.facebook,
110
- instagram: t.organization.socials.instagram,
111
- twitter: t.organization.socials.twitter,
112
- youtube: t.organization.socials.youtube
113
- }, null, 8, ["telegram", "facebook", "instagram", "twitter", "youtube"])
114
- ])
115
- ]),
84
+ r("h1", C, f(t.organization.profile.name), 1),
85
+ r("p", D, [
86
+ c(x, {
87
+ text: t.organization.profile.description || "",
88
+ maxLen: 240
89
+ }, null, 8, ["text"])
90
+ ]),
91
+ ((m = (l = t.organization.profile) == null ? void 0 : l.tags) == null ? void 0 : m.length) > 0 ? (e(), o(E, {
92
+ key: 4,
93
+ chips: t.organization.profile.tags,
94
+ class: "mn-b-semi"
95
+ }, null, 8, ["chips"])) : n("", !0),
96
+ r("p", F, " 👨‍👨‍👧‍👧 " + f(t.organization.numberOfSubscribers) + " followers ", 1),
97
+ t.user._id && z(d).params._id && z(d).params._id !== t.user._id && t.organization.owner !== t.user._id ? (e(), o(h, {
98
+ key: 5,
99
+ user: t.user._id,
100
+ type: "organization",
101
+ role: "subscriber",
102
+ target: t.organization._id,
103
+ status: t.organization.isSubscriber,
104
+ text: { create: "Follow", remove: "Unfollow" },
105
+ onUpdateMembership: i[2] || (i[2] = (a) => g(a, "isSubscriber", "numberOfSubscribers")),
106
+ class: "w-min mn-b-medium mn-r-auto mn-l-auto"
107
+ }, null, 8, ["user", "target", "status"])) : n("", !0),
108
+ Object.values(t.organization.socials).some((a) => a) ? (e(), b("h4", L, " Find us in socials ")) : n("", !0),
109
+ c($, {
110
+ telegram: t.organization.socials.telegram,
111
+ facebook: t.organization.socials.facebook,
112
+ instagram: t.organization.socials.instagram,
113
+ twitter: t.organization.socials.twitter,
114
+ youtube: t.organization.socials.youtube
115
+ }, null, 8, ["telegram", "facebook", "instagram", "twitter", "youtube"])
116
+ ])
117
+ ];
118
+ }),
116
119
  _: 1
117
120
  }));
118
121
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,x)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:P=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,x)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:P=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
@@ -3,7 +3,7 @@ import { useRouter as I, useRoute as g } from "vue-router";
3
3
  import D from "../../../../components/Field/Field.vue2.js";
4
4
  import "vue-i18n";
5
5
  import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
- import "../../../../components/Popup/Popup.vue.js";
6
+ import "../../../../components/Popup/Popup.vue2.js";
7
7
  import "../../../../components/Button/Button.vue.js";
8
8
  import "./Documents.vue2.js";
9
9
  const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "documents" }, F = /* @__PURE__ */ E(() => /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Список документов", -1)), N = { class: "mn-b-big cols-4" }, O = ["onClick"], R = { class: "mn-b-small" }, U = { class: "t-semi t-transp radius-small" }, V = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const p=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/EmptyState.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const b=require("../blocks/CardOrganization.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let q=n.query.tab?n.query.tab:"details";const i=e.ref(q);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(m.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(b.default,{key:l._id,organization:l,user:p.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");const p=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/EmptyState.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const b=require("../blocks/CardOrganization.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let q=n.query.tab?n.query.tab:"details";const i=e.ref(q);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(m.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(b.default,{key:l._id,organization:l,user:p.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
@@ -5,11 +5,11 @@ import "../../../../components/Tab/Tab.vue.js";
5
5
  import "../../../../components/Field/Field.vue.js";
6
6
  import "../../../../components/Select/Select.vue.js";
7
7
  import "../../../../components/Button/Button.vue.js";
8
- import "../../../../components/Dropdown/Dropdown.vue2.js";
8
+ import "../../../../components/Dropdown/Dropdown.vue.js";
9
9
  import { state as k } from "../../../auth/store/auth.js";
10
10
  import "../../store/memberships.js";
11
11
  import "vue-i18n";
12
- import "../../../../components/Popup/Popup.vue.js";
12
+ import "../../../../components/Popup/Popup.vue2.js";
13
13
  import "../../../reports/store/reports.js";
14
14
  import { actions as q } from "../../store/organizations.js";
15
15
  import B from "../blocks/EmptyState.vue.js";