@ozdao/prometheus-framework 0.2.92 → 0.2.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +14 -6
- package/dist/events.server.mjs +14 -6
- package/dist/main-CX2ISR43.mjs +13629 -0
- package/dist/main-cffh4bbv.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +32 -18
- package/dist/orders.server.mjs +32 -18
- package/dist/organizations.server.js +2 -1
- package/dist/organizations.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +46 -46
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +16 -17
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CQQEUA9l.js +1 -0
- package/dist/web-D2Em-p-C.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +23 -34
- package/src/components/LocationMarker/LocationMarker.vue +6 -1
- package/src/components/LocationSelection/LocationSelection.vue +4 -0
- package/src/components/Map/Map.vue +29 -15
- package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
- package/src/modules/events/controllers/events.controller.js +4 -4
- package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
- package/src/modules/landing/components/pages/Farming.vue +226 -0
- package/src/modules/landing/components/pages/Governance.vue +3 -5
- package/src/modules/landing/components/pages/Home.vue +0 -3
- package/src/modules/landing/components/pages/Hotel.vue +1 -3
- package/src/modules/landing/components/pages/Page.vue +0 -3
- package/src/modules/landing/components/sections/Examples.vue +4 -56
- package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
- package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
- package/src/modules/landing/router/landing.js +11 -0
- package/src/modules/marketplace/components/sections/Filters.vue +26 -23
- package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
- package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
- package/src/modules/orders/components/pages/Order.vue +2 -6
- package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
- package/src/modules/orders/components/pages/Orders.vue +60 -11
- package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +29 -18
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +1 -1
- package/src/modules/orders/router/orders.router.js +2 -2
- package/src/modules/orders/store/orders.js +3 -7
- package/src/modules/orders/store/shopcart.js +1 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
- package/src/modules/organizations/components/pages/Department.vue +5 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
- package/src/modules/organizations/components/pages/Members.vue +2 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +3 -1
- package/src/modules/organizations/store/memberships.js +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +2 -3
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- package/src/modules/products/store/products.js +25 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
- package/src/modules/users/components/blocks/CardUser.vue +1 -0
- package/src/modules/landing/components/sections/AboutSection.vue +0 -69
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js
CHANGED
@@ -1,307 +1,301 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRouter as
|
1
|
+
import { ref as p, openBlock as n, createElementBlock as c, createElementVNode as r, unref as b, createBlock as u, withCtx as m, createTextVNode as y, createCommentVNode as v, createVNode as s, Fragment as D, renderList as P } from "vue";
|
2
|
+
import { useRouter as T, useRoute as V } from "vue-router";
|
3
3
|
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
4
4
|
import "vue-i18n";
|
5
5
|
import "../../../globals/localization/vue-i18n.js";
|
6
6
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
7
|
-
import
|
7
|
+
import B from "../../../../components/UploadImage/UploadImage.vue.js";
|
8
8
|
import "../../../../components/Tab/Tab.vue.js";
|
9
|
-
import
|
10
|
-
import "../../../../components/Select/Select.
|
11
|
-
import
|
9
|
+
import x from "../../../../components/Field/Field.vue.js";
|
10
|
+
import "../../../../components/Select/Select.vue2.js";
|
11
|
+
import i from "../../../../components/Checkbox/Checkbox.vue.js";
|
12
12
|
import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
|
13
13
|
import "../../../../components/Address/Address.vue.js";
|
14
14
|
import "../../../../components/Loader/Loader.vue.js";
|
15
15
|
import "../../../../components/LocationMarker/LocationMarker.vue.js";
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import
|
16
|
+
import k from "../../../../components/Button/Button.vue.js";
|
17
|
+
import F from "../../../../components/Popup/Popup.vue.js";
|
18
|
+
import U from "../../../../components/Block/Block.vue.js";
|
19
|
+
import H from "../../../../components/Feed/Feed.vue.js";
|
19
20
|
import "../blocks/EditArray.vue2.js";
|
20
|
-
import
|
21
|
-
import
|
22
|
-
import
|
23
|
-
import {
|
24
|
-
import
|
25
|
-
|
21
|
+
import "../blocks/DepartmentSub.vue2.js";
|
22
|
+
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
23
|
+
import N from "../../../users/components/blocks/CardUser.vue.js";
|
24
|
+
import { actions as L, state as j } from "../../store/memberships.js";
|
25
|
+
import "../../../middlewares/client/inputs.validation.js";
|
26
|
+
import "../blocks/DepartmentMemberModify.vue2.js";
|
27
|
+
import { actions as C } from "../../../globals/store/globals.js";
|
28
|
+
import { state as e, actions as f } from "../../store/departments.js";
|
29
|
+
const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big" }, I = {
|
26
30
|
key: 0,
|
27
31
|
class: "mn-r-auto"
|
28
|
-
},
|
32
|
+
}, J = {
|
29
33
|
key: 1,
|
30
34
|
class: "mn-r-auto"
|
31
|
-
},
|
32
|
-
key: 1,
|
33
|
-
class: "flex-nowrap flex pd-thin"
|
34
|
-
}, ue = {
|
35
|
-
id: "dash",
|
36
|
-
class: "pd-medium bg-white"
|
37
|
-
}, fe = { class: "mn-b-regular flex-v-center flex-nowrap flex" }, be = /* @__PURE__ */ s("h3", { class: "mn-r-small" }, "Подотделы ", -1), he = { class: "mn-b-small" }, _e = { key: 0 }, je = {
|
35
|
+
}, K = { class: "flex-nowrap flex gap-thin pd-thin" }, Q = { class: "cols-2-fit-content" }, W = { class: "w-100 flex-child-grow-1 flex-child" }, X = { class: "cols-2 gap-thin" }, Y = { class: "bg-grey pd-medium o-hidden radius-big" }, Z = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Department Settings", -1), ee = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), te = { class: "cols-1 gap-thin" }, ae = /* @__PURE__ */ r("h4", null, "Products", -1), se = { class: "bg-grey pd-medium o-hidden radius-big" }, re = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Acessess", -1), de = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1), oe = { class: "cols-1 gap-thin" }, ie = /* @__PURE__ */ r("h4", null, "Products", -1), ne = /* @__PURE__ */ r("h4", null, "Orders", -1), le = /* @__PURE__ */ r("h4", null, "Departments", -1), Fe = {
|
38
36
|
__name: "DepartmentEdit",
|
39
|
-
setup(
|
40
|
-
const
|
41
|
-
async function
|
42
|
-
|
43
|
-
}
|
44
|
-
z();
|
45
|
-
const f = c(!1), b = c(null);
|
46
|
-
function v(o) {
|
47
|
-
f.value = !0, typeof o == "number" && (b.value = o);
|
37
|
+
setup(me) {
|
38
|
+
const $ = T(), d = V();
|
39
|
+
async function O() {
|
40
|
+
p(j.memberships), d.params.department && await f.readOne(d.params.department);
|
48
41
|
}
|
49
|
-
|
50
|
-
|
42
|
+
O();
|
43
|
+
const h = p(!1), E = p(null);
|
44
|
+
function M(l) {
|
45
|
+
h.value = !0;
|
51
46
|
}
|
52
|
-
|
53
|
-
|
54
|
-
h.value = !0, typeof o == "number" && (_.value = o);
|
47
|
+
function _() {
|
48
|
+
h.value = !1, E.value = null;
|
55
49
|
}
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
async function T() {
|
60
|
-
d.params.department && await u.update(
|
50
|
+
p(!1), p(null);
|
51
|
+
async function A() {
|
52
|
+
d.params.department && await f.update(
|
61
53
|
d.params._id,
|
62
54
|
e.department
|
63
|
-
), d.params.department || await
|
55
|
+
), d.params.department || await f.create(
|
64
56
|
d.params._id,
|
65
57
|
e.department
|
66
58
|
);
|
67
59
|
}
|
68
|
-
function
|
69
|
-
|
60
|
+
function R() {
|
61
|
+
$.replace({ name: "Department", params: { _id: d.params._id, department: e.department._id } });
|
70
62
|
}
|
71
|
-
async function
|
72
|
-
await
|
63
|
+
async function z() {
|
64
|
+
confirm("Are you sure you want to delete this department?") && await f.delete(
|
73
65
|
d.params._id,
|
74
66
|
e.department
|
75
67
|
);
|
76
68
|
}
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
69
|
+
function S(l) {
|
70
|
+
confirm("Are you sure you want to remove this member?") && C.delete(e.department.members, { _id: l.user._id });
|
71
|
+
}
|
72
|
+
return (l, a) => (n(), c("div", q, [
|
73
|
+
r("header", G, [
|
74
|
+
b(d).params.department ? (n(), c("h1", I, "Edit Department")) : (n(), c("h1", J, "Create Department")),
|
75
|
+
r("section", K, [
|
76
|
+
b(d).params.department ? (n(), u(k, {
|
77
|
+
key: 0,
|
78
|
+
submit: z,
|
79
|
+
callback: l.redirectToDash,
|
80
|
+
class: "bg-red"
|
81
|
+
}, {
|
82
|
+
default: m(() => [
|
83
|
+
y("Delete")
|
84
|
+
]),
|
85
|
+
_: 1
|
86
|
+
}, 8, ["callback"])) : v("", !0),
|
87
|
+
s(k, {
|
88
|
+
submit: A,
|
89
|
+
callback: R,
|
84
90
|
class: "bg-main"
|
85
91
|
}, {
|
86
92
|
default: m(() => [
|
87
|
-
|
93
|
+
y("Save")
|
88
94
|
]),
|
89
95
|
_: 1
|
90
96
|
})
|
91
97
|
])
|
92
98
|
]),
|
93
|
-
e.department.profile ? (n(),
|
99
|
+
e.department.profile ? (n(), u(U, {
|
94
100
|
key: 0,
|
95
101
|
title: "Profile",
|
96
102
|
class: "mn-b-thin"
|
97
103
|
}, {
|
98
104
|
default: m(() => [
|
99
|
-
|
100
|
-
|
105
|
+
r("div", Q, [
|
106
|
+
s(B, {
|
101
107
|
photo: e.department.profile.photo,
|
102
|
-
"onUpdate:photo":
|
108
|
+
"onUpdate:photo": a[0] || (a[0] = (t) => e.department.profile.photo = t),
|
103
109
|
uploadPath: "organizations/" + e.department.name + "/avatars",
|
104
110
|
class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
105
111
|
}, null, 8, ["photo", "uploadPath"]),
|
106
|
-
|
107
|
-
|
112
|
+
r("div", W, [
|
113
|
+
s(x, {
|
108
114
|
field: e.department.profile.name,
|
109
|
-
"onUpdate:field":
|
115
|
+
"onUpdate:field": a[1] || (a[1] = (t) => e.department.profile.name = t),
|
110
116
|
label: "Name",
|
111
117
|
placeholder: "Department Name",
|
112
118
|
class: "mn-b-small bg-white radius-small pd-medium",
|
113
|
-
validation:
|
119
|
+
validation: l.organizationName
|
114
120
|
}, null, 8, ["field", "validation"]),
|
115
|
-
|
121
|
+
s(x, {
|
116
122
|
field: e.department.profile.description,
|
117
|
-
"onUpdate:field":
|
123
|
+
"onUpdate:field": a[2] || (a[2] = (t) => e.department.profile.description = t),
|
118
124
|
label: "Description",
|
119
125
|
placeholder: "Department description (max 120 symbols)",
|
120
126
|
class: "bg-white radius-small pd-medium",
|
121
|
-
validation:
|
127
|
+
validation: l.organizationName
|
122
128
|
}, null, 8, ["field", "validation"])
|
123
129
|
])
|
124
130
|
])
|
125
131
|
]),
|
126
132
|
_: 1
|
127
|
-
})) :
|
128
|
-
|
133
|
+
})) : v("", !0),
|
134
|
+
s(U, {
|
129
135
|
title: "Team",
|
130
136
|
placeholder: "No members added yet",
|
131
137
|
actions: [{
|
132
138
|
label: "+",
|
133
|
-
function: () =>
|
139
|
+
function: () => M()
|
134
140
|
}],
|
135
141
|
class: "cols-1 gap-thin mn-b-thin"
|
136
142
|
}, {
|
137
143
|
default: m(() => [
|
138
|
-
(n(!0),
|
139
|
-
class: "bg-
|
140
|
-
key:
|
141
|
-
user:
|
142
|
-
photo:
|
143
|
-
name:
|
144
|
-
position:
|
145
|
-
|
146
|
-
|
144
|
+
(n(!0), c(D, null, P(e.department.members, (t, o) => (n(), u(N, {
|
145
|
+
class: "bg-white pd-thin radius-medium w-100",
|
146
|
+
key: o,
|
147
|
+
user: t.user,
|
148
|
+
photo: t.user.profile.photo,
|
149
|
+
name: t.user.profile.name || t.user.phone || t.user.email || t.user._id,
|
150
|
+
position: t.position,
|
151
|
+
action: {
|
152
|
+
label: "x",
|
153
|
+
method: () => S(t)
|
154
|
+
}
|
155
|
+
}, null, 8, ["user", "photo", "name", "position", "action"]))), 128))
|
147
156
|
]),
|
148
157
|
_: 1
|
149
158
|
}, 8, ["actions"]),
|
150
|
-
|
159
|
+
s(F, {
|
151
160
|
title: "Add member",
|
152
|
-
onClosePopup:
|
153
|
-
isPopupOpen:
|
161
|
+
onClosePopup: _,
|
162
|
+
isPopupOpen: h.value,
|
154
163
|
class: "bg-white w-max-30r radius-big pd-big"
|
155
164
|
}, {
|
156
165
|
default: m(() => [
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
166
|
+
s(H, {
|
167
|
+
search: {
|
168
|
+
placeholder: "Search customer...",
|
169
|
+
class: "bg-grey mn-b-thin"
|
170
|
+
},
|
171
|
+
states: {
|
172
|
+
empty: {
|
173
|
+
title: "No Products Found",
|
174
|
+
description: "Currently, there are no such products available."
|
175
|
+
}
|
176
|
+
},
|
177
|
+
store: {
|
178
|
+
read: (t) => L.read(t),
|
179
|
+
state: null
|
180
|
+
},
|
181
|
+
options: {
|
182
|
+
target: b(d).params._id
|
183
|
+
},
|
184
|
+
class: "bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"
|
185
|
+
}, {
|
186
|
+
default: m(({
|
187
|
+
items: t
|
188
|
+
}) => [
|
189
|
+
(n(!0), c(D, null, P(t, (o, pe) => {
|
190
|
+
var g, w;
|
191
|
+
return n(), u(N, {
|
192
|
+
key: o._id,
|
193
|
+
user: o.user,
|
194
|
+
photo: (g = o.user.profile) == null ? void 0 : g.photo,
|
195
|
+
name: ((w = o.user.profile) == null ? void 0 : w.name) || o.user.phone || o.user.email,
|
196
|
+
onClick: () => {
|
197
|
+
C.add(e.department.members, { _id: o.user._id, user: o.user, position: "Member" }), _();
|
198
|
+
},
|
199
|
+
class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
|
200
|
+
}, null, 8, ["user", "photo", "name", "onClick"]);
|
201
|
+
}), 128))
|
202
|
+
]),
|
203
|
+
_: 1
|
204
|
+
}, 8, ["store", "options"])
|
163
205
|
]),
|
164
206
|
_: 1
|
165
207
|
}, 8, ["isPopupOpen"]),
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
208
|
+
r("div", X, [
|
209
|
+
r("div", Y, [
|
210
|
+
Z,
|
211
|
+
ee,
|
212
|
+
r("div", te, [
|
213
|
+
ae,
|
214
|
+
s(i, {
|
173
215
|
label: "Hidden department",
|
174
216
|
name: "hidden",
|
175
217
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
176
|
-
"onUpdate:radio":
|
218
|
+
"onUpdate:radio": a[3] || (a[3] = (t) => e.department.hidden = !e.department.hidden),
|
177
219
|
radio: e.department.hidden
|
178
220
|
}, null, 8, ["radio"])
|
179
221
|
])
|
180
222
|
]),
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
223
|
+
r("div", se, [
|
224
|
+
re,
|
225
|
+
de,
|
226
|
+
r("div", oe, [
|
185
227
|
ie,
|
186
|
-
|
228
|
+
s(i, {
|
187
229
|
label: "Read products",
|
188
230
|
name: "readProducts",
|
189
231
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
190
232
|
radio: e.department.accesses.products.read,
|
191
|
-
"onUpdate:radio":
|
233
|
+
"onUpdate:radio": a[4] || (a[4] = (t) => e.department.accesses.products.read = !e.department.accesses.products.read)
|
192
234
|
}, null, 8, ["radio"]),
|
193
|
-
|
235
|
+
s(i, {
|
194
236
|
label: "Edit products",
|
195
237
|
name: "editProducts",
|
196
238
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
197
239
|
radio: e.department.accesses.products.edit,
|
198
|
-
"onUpdate:radio":
|
240
|
+
"onUpdate:radio": a[5] || (a[5] = (t) => e.department.accesses.products.edit = !e.department.accesses.products.edit)
|
199
241
|
}, null, 8, ["radio"]),
|
200
|
-
|
242
|
+
s(i, {
|
201
243
|
label: "Delete products",
|
202
244
|
name: "deleteProducts",
|
203
245
|
class: "w-100 bg-white radius-small pd-small",
|
204
246
|
radio: e.department.accesses.products.delete,
|
205
|
-
"onUpdate:radio":
|
247
|
+
"onUpdate:radio": a[6] || (a[6] = (t) => e.department.accesses.products.delete = !e.department.accesses.products.delete)
|
206
248
|
}, null, 8, ["radio"]),
|
207
|
-
|
208
|
-
|
249
|
+
ne,
|
250
|
+
s(i, {
|
209
251
|
label: "Read orders",
|
210
252
|
name: "readOrders",
|
211
253
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
212
254
|
radio: e.department.accesses.orders.read,
|
213
|
-
"onUpdate:radio":
|
255
|
+
"onUpdate:radio": a[7] || (a[7] = (t) => e.department.accesses.orders.read = !e.department.accesses.orders.read)
|
214
256
|
}, null, 8, ["radio"]),
|
215
|
-
|
257
|
+
s(i, {
|
216
258
|
label: "Confirm orders",
|
217
259
|
name: "confirmOrders",
|
218
260
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
219
261
|
radio: e.department.accesses.orders.confirm,
|
220
|
-
"onUpdate:radio":
|
262
|
+
"onUpdate:radio": a[8] || (a[8] = (t) => e.department.accesses.orders.confirm = !e.department.accesses.orders.confirm)
|
221
263
|
}, null, 8, ["radio"]),
|
222
|
-
|
264
|
+
s(i, {
|
223
265
|
label: "Delete orders",
|
224
266
|
name: "deleteOrders",
|
225
267
|
class: "w-100 bg-white radius-small pd-small",
|
226
268
|
radio: e.department.accesses.orders.delete,
|
227
|
-
"onUpdate:radio":
|
269
|
+
"onUpdate:radio": a[9] || (a[9] = (t) => e.department.accesses.orders.delete = !e.department.accesses.orders.delete)
|
228
270
|
}, null, 8, ["radio"]),
|
229
|
-
|
230
|
-
|
271
|
+
le,
|
272
|
+
s(i, {
|
231
273
|
label: "Read departments",
|
232
274
|
name: "readDepartments",
|
233
275
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
234
276
|
radio: e.department.accesses.departments.read,
|
235
|
-
"onUpdate:radio":
|
277
|
+
"onUpdate:radio": a[10] || (a[10] = (t) => e.department.accesses.departments.read = !e.department.accesses.departments.read)
|
236
278
|
}, null, 8, ["radio"]),
|
237
|
-
|
279
|
+
s(i, {
|
238
280
|
label: "Edit departments",
|
239
281
|
name: "editDepartments",
|
240
282
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
241
283
|
radio: e.department.accesses.departments.edit,
|
242
|
-
"onUpdate:radio":
|
284
|
+
"onUpdate:radio": a[11] || (a[11] = (t) => e.department.accesses.departments.edit = !e.department.accesses.departments.edit)
|
243
285
|
}, null, 8, ["radio"]),
|
244
|
-
|
286
|
+
s(i, {
|
245
287
|
label: "Delete departments",
|
246
288
|
name: "deleteDepartments",
|
247
289
|
class: "w-100 bg-white radius-small pd-small",
|
248
290
|
radio: e.department.accesses.departments.delete,
|
249
|
-
"onUpdate:radio":
|
291
|
+
"onUpdate:radio": a[12] || (a[12] = (t) => e.department.accesses.departments.delete = !e.department.accesses.departments.delete)
|
250
292
|
}, null, 8, ["radio"])
|
251
293
|
])
|
252
294
|
])
|
253
|
-
]),
|
254
|
-
k(d).params.department ? (n(), i("section", ce, [
|
255
|
-
r($, {
|
256
|
-
submit: A,
|
257
|
-
callback: o.redirectToDash,
|
258
|
-
class: "bg-grey"
|
259
|
-
}, {
|
260
|
-
default: m(() => [
|
261
|
-
x("Delete Department")
|
262
|
-
]),
|
263
|
-
_: 1
|
264
|
-
}, 8, ["callback"])
|
265
|
-
])) : w("", !0),
|
266
|
-
s("div", ue, [
|
267
|
-
r(N, {
|
268
|
-
title: "Добавить подотдел",
|
269
|
-
onClosePopup: P,
|
270
|
-
isPopupOpen: h.value
|
271
|
-
}, {
|
272
|
-
default: m(() => [
|
273
|
-
r(M, {
|
274
|
-
departments: e.department.subdepartments,
|
275
|
-
department: _.value,
|
276
|
-
maindepartment: e.department,
|
277
|
-
alldepartments: e.departments,
|
278
|
-
onCallback: P
|
279
|
-
}, null, 8, ["departments", "department", "maindepartment", "alldepartments"])
|
280
|
-
]),
|
281
|
-
_: 1
|
282
|
-
}, 8, ["isPopupOpen"]),
|
283
|
-
s("div", fe, [
|
284
|
-
be,
|
285
|
-
s("div", null, [
|
286
|
-
s("a", {
|
287
|
-
class: "t-main h5",
|
288
|
-
onClick: t[13] || (t[13] = (a) => y())
|
289
|
-
}, "+")
|
290
|
-
])
|
291
|
-
]),
|
292
|
-
s("ul", he, [
|
293
|
-
e.department.subdepartments.length < 1 ? (n(), i("li", _e, "В отделе еще нет подотделов")) : w("", !0),
|
294
|
-
(n(!0), i(C, null, U(e.department.subdepartments, (a, p) => (n(), g(j, {
|
295
|
-
key: p,
|
296
|
-
class: "bg-grey o-hidden radius-small mn-b-thin",
|
297
|
-
department: a,
|
298
|
-
onClick: (B) => y(p)
|
299
|
-
}, null, 8, ["department", "onClick"]))), 128))
|
300
|
-
])
|
301
295
|
])
|
302
296
|
]));
|
303
297
|
}
|
304
298
|
};
|
305
299
|
export {
|
306
|
-
|
300
|
+
Fe as default
|
307
301
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),c=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const B=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),q=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),M=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),N=require("../blocks/CardDepartment.vue.cjs"),m=require("../../../auth/store/auth.cjs"),l=require("../../store/invites.cjs"),p=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),_=require("../../store/departments.cjs"),x={class:"pd-thin"},P={class:"mn-b-big radius-medium bg-white"},V={key:0,class:"cols-1 gap-thin"},z={key:1},E={__name:"Members",setup(F){const o=f.useRoute();f.useRouter();const u=e.ref(null),s=e.ref("members"),d=e.ref(!1);function g(){d.value=!0}function v(){d.value=!1}e.onMounted(async()=>{u.value=(await h.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=_.state.departments,n=a.flatMap(r=>r.subdepartments.map(t=>t._id));return a.filter(r=>!n.includes(r._id))});async function k(a){await l.actions.create({owner:{type:"Organization",target:u.value._id},creator:{type:"User",target:m.state.user._id},invites:a})}async function y(a,n){confirm("Confirm remove of member")==!0&&(p.state.memberships.splice(a,1),await p.actions.delete(n._id))}async function w(a,n){confirm("Confirm remove of member")==!0&&(l.state.invites.splice(a,1),await l.actions.delete(n._id))}return(a,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(q.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${h.state.current.numberOfMembers})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:g,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(C.default,{title:"Add members",onClosePopup:v,isPopupOpen:d.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(M.default,{text:"Please enter your email or phone number to send an invitation link:",organization:u.value,onSendInvite:k},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(B.default,{key:0,class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(c.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>_.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id,hidden:!1}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(N.default,{key:i,department:t,organization:e.unref(o).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("section",P,[s.value==="members"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>p.actions.read(r)},options:{target:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:I=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:"x",method:()=>y(i,t)}:null,class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>l.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(b.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:"x",method:()=>w(a.index,t)},class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])]))}};exports.default=E;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),c=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const B=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),q=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),M=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),N=require("../blocks/CardDepartment.vue.cjs"),m=require("../../../auth/store/auth.cjs"),l=require("../../store/invites.cjs"),p=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),_=require("../../store/departments.cjs"),x={class:"pd-thin"},P={class:"mn-b-big radius-medium bg-white"},V={key:0,class:"cols-1 gap-thin"},z={key:1},E={__name:"Members",setup(F){const o=f.useRoute();f.useRouter();const u=e.ref(null),s=e.ref("members"),d=e.ref(!1);function g(){d.value=!0}function v(){d.value=!1}e.onMounted(async()=>{u.value=(await h.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=_.state.departments,n=a.flatMap(r=>r.subdepartments.map(t=>t._id));return a.filter(r=>!n.includes(r._id))});async function k(a){await l.actions.create({owner:{type:"Organization",target:u.value._id},creator:{type:"User",target:m.state.user._id},invites:a})}async function y(a,n){confirm("Confirm remove of member")==!0&&(p.state.memberships.splice(a,1),await p.actions.delete(n._id))}async function w(a,n){confirm("Confirm remove of member")==!0&&(l.state.invites.splice(a,1),await l.actions.delete(n._id))}return(a,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(q.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${h.state.current.numberOfMembers})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:g,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(C.default,{title:"Add members",onClosePopup:v,isPopupOpen:d.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(M.default,{text:"Please enter your email or phone number to send an invitation link:",organization:u.value,onSendInvite:k},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(B.default,{key:0,class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(c.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>_.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id,hidden:!1}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(N.default,{key:i,department:t,organization:e.unref(o).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("section",P,[s.value==="members"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>p.actions.read(r)},options:{target:e.unref(o).params._id,role:["member","owner"]},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:I=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:"x",method:()=>y(i,t)}:null,class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>l.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(b.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:"x",method:()=>w(a.index,t)},class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])]))}};exports.default=E;
|