@ozdao/prometheus-framework 0.2.94 → 0.2.96
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +15 -14
- package/dist/auth.server.mjs +15 -14
- package/dist/main-BJvlNekm.mjs +13631 -0
- package/dist/main-pGo7JpSP.js +92 -0
- package/dist/orders.server.js +26 -22
- package/dist/orders.server.mjs +26 -22
- package/dist/organizations.server.js +31 -10
- package/dist/organizations.server.mjs +31 -10
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +2 -2
- 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/EditImages/EditImages.vue.js +19 -19
- 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/Popup/Popup.vue.js +12 -12
- 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/components/Upload/Upload.vue.js +21 -21
- 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/auth/router/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/router/auth.js +4 -0
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +8 -8
- 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 +2 -2
- 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/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 +60 -60
- 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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.js +22 -21
- 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 +48 -37
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +160 -167
- 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 +50 -49
- 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 +113 -110
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +14 -14
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/models/order.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/order.js +28 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +25 -43
- 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 +19 -19
- 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/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +47 -47
- 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 +143 -131
- 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 +1 -1
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +32 -34
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -32
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +155 -187
- 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 +19 -19
- 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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- 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 +26 -22
- 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 +68 -65
- 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 +2 -2
- 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-B2xhKZNK.js +1 -0
- package/dist/web-DTzbVshr.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Block/Block.vue +1 -1
- package/src/components/Completion/Completion.vue +2 -2
- package/src/modules/auth/controllers/auth.controller.js +19 -16
- package/src/modules/auth/router/auth.js +4 -0
- package/src/modules/backoffice/router/backoffice.js +3 -3
- package/src/modules/chats/routes/chats.routes.js +1 -2
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
- package/src/modules/globals/services/globals.crud.js +2 -0
- package/src/modules/icons/navigation/IconCross.vue +11 -7
- package/src/modules/orders/components/blocks/StatusHistory.vue +8 -11
- package/src/modules/orders/components/pages/OrderBackoffice.vue +37 -50
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +8 -4
- package/src/modules/orders/components/pages/Orders.vue +1 -1
- package/src/modules/orders/controllers/orders.controller.js +26 -25
- package/src/modules/orders/models/order.model.js +1 -1
- package/src/modules/orders/routes/orders.routes.js +9 -3
- package/src/modules/orders/store/customers.store.js +1 -1
- package/src/modules/orders/store/models/order.js +33 -0
- package/src/modules/orders/store/orders.js +7 -28
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -2
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +7 -5
- package/src/modules/organizations/components/pages/Members.vue +50 -38
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +2 -1
- package/src/modules/organizations/controllers/invites.controller.js +2 -0
- package/src/modules/organizations/controllers/memberships.controller.js +35 -11
- package/src/modules/organizations/controllers/organizations.controller.js +5 -4
- package/src/modules/organizations/models/invite.model.js +4 -0
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/organizations/router/members.router.js +1 -1
- package/src/modules/organizations/store/departments.js +0 -1
- package/src/modules/organizations/store/memberships.js +1 -8
- package/src/modules/products/components/pages/ProductEdit.vue +39 -33
- package/src/modules/products/components/sections/EditProductInfo.vue +3 -3
- package/src/modules/users/components/blocks/CardUser.vue +9 -5
- package/src/modules/users/components/pages/Profile.vue +5 -3
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/sections/ProfileCompletion.vue +2 -2
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +0 -126
- package/src/modules/users/components/pages/ProfileOrganizations.vue +0 -97
@@ -1,19 +1,19 @@
|
|
1
|
-
import { openBlock as r, createElementBlock as l, Fragment as
|
1
|
+
import { openBlock as r, createElementBlock as l, Fragment as m, createElementVNode as t, normalizeClass as d, toDisplayString as e, unref as o, createVNode as k, createCommentVNode as p, renderList as C, createBlock as S } from "vue";
|
2
2
|
import { useRoute as w, useRouter as x } from "vue-router";
|
3
3
|
import { useI18n as I } from "vue-i18n";
|
4
4
|
import z from "../blocks/CardOrderItem.vue.js";
|
5
5
|
import B from "../../../icons/navigation/IconCross.vue.js";
|
6
6
|
import { getters as h, state as i, actions as s } from "../../store/shopcart.js";
|
7
7
|
import "./ShopCart.vue2.js";
|
8
|
-
const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T = { class: "mn-b-thin p-big" }, V = { class: "t-transp p-small" }, Y = { class: "mn-b-big shopcart-content" },
|
8
|
+
const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T = { class: "mn-b-thin p-big" }, V = { class: "t-transp p-small" }, Y = { class: "mn-b-big shopcart-content" }, $ = {
|
9
9
|
key: 0,
|
10
10
|
class: "mn-t-medium"
|
11
|
-
},
|
11
|
+
}, A = { class: "shopcart-footer pd-b-medium pd-t-medium pd-big transition-cubic bg-black t-white" }, E = {
|
12
12
|
key: 0,
|
13
13
|
class: "mn-b-small total-price"
|
14
|
-
},
|
14
|
+
}, F = { class: "t-transp t-white mn-b-micro" }, O = { class: "t-demi t-white p-big" }, H = {
|
15
15
|
__name: "ShopCart",
|
16
|
-
setup(
|
16
|
+
setup(Q) {
|
17
17
|
w();
|
18
18
|
const _ = x(), b = h.cartTotalPrice, g = h.cartTotalAmount, f = {
|
19
19
|
messages: {
|
@@ -38,9 +38,9 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
|
|
38
38
|
function y() {
|
39
39
|
_.push({ name: "Form Order" }), s.toggleShopcart();
|
40
40
|
}
|
41
|
-
return (v, u) => (r(), l(
|
41
|
+
return (v, u) => (r(), l(m, null, [
|
42
42
|
t("section", {
|
43
|
-
class:
|
43
|
+
class: d(["z-index-4 transition-cubic pd-big bg-white shop-cart", { "shop-cart-active": i.currentState === !0 }])
|
44
44
|
}, [
|
45
45
|
t("div", N, [
|
46
46
|
t("div", P, [
|
@@ -53,10 +53,10 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
|
|
53
53
|
}, null, 8, ["onClick"])
|
54
54
|
]),
|
55
55
|
t("div", Y, [
|
56
|
-
i.positions.length > 0 ? p("", !0) : (r(), l("p",
|
56
|
+
i.positions.length > 0 ? p("", !0) : (r(), l("p", $, [
|
57
57
|
t("i", null, e(o(n)("emptystate")), 1)
|
58
58
|
])),
|
59
|
-
(r(!0), l(
|
59
|
+
(r(!0), l(m, null, C(i.positions, (c) => (r(), S(z, {
|
60
60
|
key: c._id,
|
61
61
|
editable: "true",
|
62
62
|
product: c,
|
@@ -65,10 +65,10 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
|
|
65
65
|
remove: (a) => s.removeProduct(a._id)
|
66
66
|
}, null, 8, ["product", "increase", "decrease", "remove"]))), 128))
|
67
67
|
]),
|
68
|
-
t("div",
|
69
|
-
i.positions.length > 0 ? (r(), l("div",
|
70
|
-
t("p",
|
71
|
-
t("p",
|
68
|
+
t("div", A, [
|
69
|
+
i.positions.length > 0 ? (r(), l("div", E, [
|
70
|
+
t("p", F, e(o(n)("intotal")), 1),
|
71
|
+
t("p", O, e(o(b)) + " " + e(v.returnCurrency()), 1)
|
72
72
|
])) : p("", !0),
|
73
73
|
i.positions.length > 0 ? (r(), l("button", {
|
74
74
|
key: 1,
|
@@ -79,7 +79,7 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
|
|
79
79
|
], 2),
|
80
80
|
t("div", {
|
81
81
|
onClick: u[1] || (u[1] = (...c) => s.toggleShopcart && s.toggleShopcart(...c)),
|
82
|
-
class:
|
82
|
+
class: d([{ active: i.currentState === !0 }, "color-overlay z-index-3"])
|
83
83
|
}, null, 2)
|
84
84
|
], 64));
|
85
85
|
}
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("vue-router"),k=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");const b=require("../../../../components/FieldPhone/click-outside.cjs");require("../../../../components/Select/Select.vue2.cjs");const g=require("../../../../components/Feed/Feed.vue.cjs"),v=require("../../../../components/Button/Button.vue.cjs"),C=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),n=require("../../../users/components/blocks/CardUser.vue.cjs"),q=require("./FormCustomerDetails.vue.cjs"),_=require("../../../users/store/users.cjs"),w=require("../../../auth/store/auth.cjs"),y=require("../../../globals/store/globals.cjs"),B=require("../../store/customers.store.cjs"),x=require("../../store/models/customer.cjs"),E={key:2,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-grey pd-small radius-small"},N={__name:"FormAddCustomer",props:{order:Object},emits:["callbackCustomer"],setup(V,{emit:i}){let c=b.default;const d=i,m=h.useRoute();let r=e.ref(x.default),u=e.ref(null),l=e.ref(!1);async function f(){let a={identity:{type:r.value.user?"User":"Visitor",target:r.value.user?r.value.user._id:null},owner:{type:"Organization",target:m.params._id},creator:{type:"User",target:w.state.user._id},phone:r.value.phone,email:r.value.email,profile:r.value.profile,socials:r.value.socials};try{let o=await B.default.create(a);r.value=o}catch(o){console.log(o)}}function p(){d("callbackCustomer",r.value)}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k.default,{class:"pos-relative mn-b-thin"},{default:e.withCtx(()=>[e.unref(r).user?(e.openBlock(),e.createBlock(n.default,{key:1,user:e.unref(r).user,photo:e.unref(r).user.profile.photo,name:e.unref(r).user.profile.name||e.unref(r).user.phone||e.unref(r).user.email,onClick:o[1]||(o[1]=()=>{e.unref(r).user=null}),class:"bg-white pd-thin radius-medium w-100"},null,8,["user","photo","name"])):e.withDirectives((e.openBlock(),e.createBlock(C.default,{key:0,onSearch:o[0]||(o[0]=s=>{e.isRef(u)?u.value=s:u=s,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-white"},null,512)),[[e.unref(c),()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(u)&&e.unref(l)&&!e.unref(r).user?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(g.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:s=>_.actions.read(s),state:null},options:{search:e.unref(u)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(t,F)=>(e.openBlock(),e.createBlock(n.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{e.unref(r).user=t,e.unref(r).profile=t.profile,e.unref(r).phone=t.phone,e.unref(r).email=t.email,e.unref(r).socials=t.socials},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(q.default,{customer:e.unref(r),class:"mn-b-thin bg-grey"},null,8,["customer"]),e.createVNode(v.default,{submit:f,callback:p,onError:e.unref(y.setError),class:"w-100 pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Customer ")]),_:1},8,["onError"])],64))}};exports.default=N;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ref as n, openBlock as l, createElementBlock as u, Fragment as h, createVNode as m, withCtx as c, unref as r, withDirectives as w, createBlock as p, isRef as d, renderList as x, createCommentVNode as $, createTextVNode as E } from "vue";
|
2
2
|
import { useRoute as U } from "vue-router";
|
3
3
|
import N from "../../../../components/Block/Block.vue.js";
|
4
|
-
import "../../../../components/Field/Field.
|
4
|
+
import "../../../../components/Field/Field.vue2.js";
|
5
5
|
import O from "../../../../components/FieldPhone/click-outside.js";
|
6
6
|
import "../../../../components/Select/Select.vue2.js";
|
7
7
|
import V from "../../../../components/Feed/Feed.vue.js";
|
8
|
-
import B from "../../../../components/Button/Button.
|
8
|
+
import B from "../../../../components/Button/Button.vue.js";
|
9
9
|
import F from "../../../globals/components/blocks/BlockSearch.vue.js";
|
10
10
|
import _ from "../../../users/components/blocks/CardUser.vue.js";
|
11
11
|
import S from "./FormCustomerDetails.vue.js";
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Field/Field.vue.cjs"),o=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={class:"gap-thin flex-justify-between flex-nowrap flex"},d={__name:"FormCustomerDetails",props:{customer:Object,title:{type:String,default:"Personal Data"}},setup(a){let s=e.ref("instagram");return(m,l)=>(e.openBlock(),e.createBlock(r.default,{title:a.title,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createVNode(n.default,{field:a.customer.profile.name,"onUpdate:field":l[0]||(l[0]=t=>a.customer.profile.name=t),label:"Name",placeholder:"Enter name",class:"bg-white pd-small radius-small mn-b-thin"},null,8,["field"]),e.createVNode(o.default,{modelValue:a.customer.phone,"onUpdate:modelValue":l[1]||(l[1]=t=>a.customer.phone=t),onCountry:l[2]||(l[2]=t=>{a.customer.number=t}),inputOptions:{placeholder:"Enter phone number",type:"tel"},defaultCountry:"TH",validCharactersOnly:!0,dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},mode:"national",class:"w-100 bg-white pd-small mn-b-thin radius-small"},null,8,["modelValue"]),e.createElementVNode("div",i,[e.createVNode(u.default,{select:e.unref(s),options:[{name:"Instagram",value:"instagram"},{name:"Telegram",value:"telegram"},{name:"WhatsApp",value:"whatsapp"}],"onUpdate:select":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),placeholder:"Messenger",size:"small",class:"bg-white pd-small radius-small"},null,8,["select"]),e.createVNode(n.default,{field:a.customer.socials[e.unref(s)],"onUpdate:field":l[4]||(l[4]=t=>a.customer.socials[e.unref(s)]=t),label:"@",placeholder:"Enter username",class:"bg-white pd-small radius-small w-100"},null,8,["field"])])]),_:1},8,["title"]))}};exports.default=d;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as r, openBlock as m, createBlock as i, withCtx as u, createVNode as s, createElementVNode as d, unref as n, isRef as f } from "vue";
|
2
2
|
import p from "../../../../components/Block/Block.vue.js";
|
3
|
-
import o from "../../../../components/Field/Field.
|
3
|
+
import o from "../../../../components/Field/Field.vue.js";
|
4
4
|
import c from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import h from "../../../../components/Select/Select.vue.js";
|
6
6
|
const g = { class: "gap-thin flex-justify-between flex-nowrap flex" }, V = {
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),t=require("../../../globals/store/globals.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Address/Address.vue2.cjs"),u=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),i=require("../../../../components/Radio/Radio.vue.cjs"),m=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),t=require("../../../globals/store/globals.cjs"),s=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Address/Address.vue2.cjs"),u=require("../../../../components/LocationMarker/LocationMarker.vue2.cjs"),i=require("../../../../components/Radio/Radio.vue.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),c=l.createElementVNode("h4",{class:"mn-b-thin"},"Spot",-1),y=l.createElementVNode("div",{class:"mn-b-small flex-nowrap flex"},null,-1),b=l.createElementVNode("h4",{class:"mn-b-thin"},"Select zone",-1),v={class:"mn-b-small flex-nowrap flex"},f=l.createElementVNode("h4",{class:"mn-b-thin"},"Address",-1),p={__name:"FormDelivery",props:{order:Object},setup(e){const o=e;return l.onMounted(()=>{t.state.position&&(o.order.delivery.address=t.state.position.address),t.state.position&&(o.order.delivery.location=t.state.position.location)}),(a,d)=>(l.openBlock(),l.createBlock(s.default,{title:"Delivery",class:"mn-b-thin",tooltip:"Delivery by mail takes 3-5 days."},{default:l.withCtx(()=>[c,y,b,l.createElementVNode("div",v,[l.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[0]||(d[0]=r=>e.order.delivery.type=r),label:"Pickup",value:"pickup",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),l.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[1]||(d[1]=r=>e.order.delivery.type=r),label:"Courier",value:"courier",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"]),l.createVNode(i.default,{radio:e.order.delivery.type,"onUpdate:radio":d[2]||(d[2]=r=>e.order.delivery.type=r),label:"Post",value:"mail",class:"bg-white pd-medium radius-small w-100 mn-r-small"},null,8,["radio"])]),f,l.createVNode(n.default,{label:"Location",apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium","onUpdate:location":d[3]||(d[3]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[4]||(d[4]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),l.createVNode(u.default,{apiKey:a.GOOGLE_MAPS_API_KEY,address:e.order.delivery.address,location:e.order.delivery.location,class:"mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:location":d[5]||(d[5]=r=>{e.order.delivery.location=r}),"onUpdate:address":d[6]||(d[6]=r=>{e.order.delivery.address=r})},null,8,["apiKey","address","location"]),l.createVNode(m.default,{field:e.order.comment,"onUpdate:field":d[7]||(d[7]=r=>e.order.comment=r),placeholder:"Comments regarding the address (apartment unit, floor level, building section)",type:"textarea",class:"bg-white pd-medium radius-small"},null,8,["field"])]),_:1}))}};exports.default=p;
|
package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js
CHANGED
@@ -4,7 +4,7 @@ import b from "../../../../components/Block/Block.vue.js";
|
|
4
4
|
import v from "../../../../components/Address/Address.vue2.js";
|
5
5
|
import f from "../../../../components/LocationMarker/LocationMarker.vue2.js";
|
6
6
|
import t from "../../../../components/Radio/Radio.vue.js";
|
7
|
-
import c from "../../../../components/Field/Field.
|
7
|
+
import c from "../../../../components/Field/Field.vue.js";
|
8
8
|
const p = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Spot", -1), w = /* @__PURE__ */ l("div", { class: "mn-b-small flex-nowrap flex" }, null, -1), g = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Select zone", -1), h = { class: "mn-b-small flex-nowrap flex" }, U = /* @__PURE__ */ l("h4", { class: "mn-b-thin" }, "Address", -1), G = {
|
9
9
|
__name: "FormDelivery",
|
10
10
|
props: {
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./customer.cjs"),t={_id:void 0,positions:[],status:null,comment:"",owner:{type:"Organization",target:null},creator:{type:"Customer",target:null},customer:{...e.default},payment:{type:"Cash",status:"Unpaid"},delivery:{type:null,address:null,status:""}};exports.default=t;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import t from "./customer.js";
|
2
|
+
const n = {
|
3
|
+
_id: void 0,
|
4
|
+
positions: [],
|
5
|
+
status: null,
|
6
|
+
comment: "",
|
7
|
+
owner: {
|
8
|
+
type: "Organization",
|
9
|
+
target: null
|
10
|
+
},
|
11
|
+
creator: {
|
12
|
+
type: "Customer",
|
13
|
+
target: null
|
14
|
+
},
|
15
|
+
customer: { ...t },
|
16
|
+
payment: {
|
17
|
+
type: "Cash",
|
18
|
+
status: "Unpaid"
|
19
|
+
},
|
20
|
+
delivery: {
|
21
|
+
type: null,
|
22
|
+
address: null,
|
23
|
+
status: ""
|
24
|
+
}
|
25
|
+
};
|
26
|
+
export {
|
27
|
+
n as default
|
28
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),d=require("./models/order.cjs"),n=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=i.reactive({all:[],current:{...d.default}}),p={async create(e){try{const t=await n.post("/api/orders/create",e);return r.all.push(t.data),t.data}catch(t){s.setError(t)}},async read(e={}){try{const t=await n.get("/api/orders/read",{params:e});return e._id?o(t.data[0],"current"):o(t.data,"all"),t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post("/api/orders/update",e),a=r.all.findIndex(c=>c._id===e._id);return a!==-1&&(r.all[a]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),r.all=r.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const a=await n.post(`/api/orders/payment/${e}`,{status:t}),c=r.all.findIndex(l=>l._id===e);c!==-1&&(r.all[c]=a.data)}catch(a){s.setError(a)}}},y={resetCustomer(e){Object.assign(e,customerInitState)},resetOrder(e){r.current={...d.default}}},f={getTotal(e){return e.reduce((t,a)=>t+a.price*a.quantity,0)}};function o(e,t){r[t]=e}i.watch(r,(e,t)=>{});exports.actions=p;exports.getters=f;exports.mutations=y;exports.state=r;
|
@@ -1,38 +1,17 @@
|
|
1
1
|
import { reactive as l, watch as p } from "vue";
|
2
2
|
import u from "../../../../node_modules/axios/lib/axios.js";
|
3
3
|
import { setError as s } from "../../globals/store/globals.js";
|
4
|
-
import
|
5
|
-
const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }),
|
4
|
+
import i from "./models/order.js";
|
5
|
+
const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = l({
|
6
6
|
all: [],
|
7
7
|
current: {
|
8
|
-
|
9
|
-
positions: [],
|
10
|
-
status: null,
|
11
|
-
comment: "",
|
12
|
-
owner: {
|
13
|
-
type: "Organization",
|
14
|
-
target: null
|
15
|
-
},
|
16
|
-
creator: {
|
17
|
-
type: "Customer",
|
18
|
-
target: null
|
19
|
-
},
|
20
|
-
customer: { ...c },
|
21
|
-
payment: {
|
22
|
-
type: "Cash",
|
23
|
-
status: "Unpaid"
|
24
|
-
},
|
25
|
-
delivery: {
|
26
|
-
type: null,
|
27
|
-
address: null,
|
28
|
-
status: ""
|
29
|
-
}
|
8
|
+
...i
|
30
9
|
}
|
31
10
|
}), w = {
|
32
11
|
async create(e) {
|
33
12
|
try {
|
34
13
|
const t = await n.post("/api/orders/create", e);
|
35
|
-
return
|
14
|
+
return a.all.push(t.data), t.data;
|
36
15
|
} catch (t) {
|
37
16
|
s(t);
|
38
17
|
}
|
@@ -40,51 +19,54 @@ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = l
|
|
40
19
|
async read(e = {}) {
|
41
20
|
try {
|
42
21
|
const t = await n.get("/api/orders/read", { params: e });
|
43
|
-
return e._id ?
|
22
|
+
return e._id ? c(t.data[0], "current") : c(t.data, "all"), t.data;
|
44
23
|
} catch (t) {
|
45
24
|
throw s(t), t;
|
46
25
|
}
|
47
26
|
},
|
48
27
|
async update(e) {
|
49
28
|
try {
|
50
|
-
const t = await n.post("/api/orders/update", e),
|
51
|
-
return
|
29
|
+
const t = await n.post("/api/orders/update", e), r = a.all.findIndex((o) => o._id === e._id);
|
30
|
+
return r !== -1 && (a.all[r] = t.data), t.data;
|
52
31
|
} catch (t) {
|
53
32
|
s(t);
|
54
33
|
}
|
55
34
|
},
|
56
35
|
async delete(e) {
|
57
36
|
try {
|
58
|
-
await n.delete(`/api/orders/${e}`),
|
37
|
+
await n.delete(`/api/orders/${e}`), a.all = a.all.filter((t) => t._id !== e);
|
59
38
|
} catch (t) {
|
60
39
|
s(t);
|
61
40
|
}
|
62
41
|
},
|
63
42
|
async changePaymentStatus(e, t) {
|
64
43
|
try {
|
65
|
-
const
|
66
|
-
o !== -1 && (
|
67
|
-
} catch (
|
68
|
-
s(
|
44
|
+
const r = await n.post(`/api/orders/payment/${e}`, { status: t }), o = a.all.findIndex((d) => d._id === e);
|
45
|
+
o !== -1 && (a.all[o] = r.data);
|
46
|
+
} catch (r) {
|
47
|
+
s(r);
|
69
48
|
}
|
70
49
|
}
|
71
|
-
},
|
50
|
+
}, x = {
|
72
51
|
resetCustomer(e) {
|
73
|
-
Object.assign(e,
|
52
|
+
Object.assign(e, customerInitState);
|
53
|
+
},
|
54
|
+
resetOrder(e) {
|
55
|
+
a.current = { ...i };
|
74
56
|
}
|
75
|
-
},
|
57
|
+
}, _ = {
|
76
58
|
getTotal(e) {
|
77
|
-
return e.reduce((t,
|
59
|
+
return e.reduce((t, r) => t + r.price * r.quantity, 0);
|
78
60
|
}
|
79
61
|
};
|
80
|
-
function
|
81
|
-
|
62
|
+
function c(e, t) {
|
63
|
+
a[t] = e;
|
82
64
|
}
|
83
|
-
p(
|
65
|
+
p(a, (e, t) => {
|
84
66
|
});
|
85
67
|
export {
|
86
68
|
w as actions,
|
87
|
-
|
88
|
-
|
89
|
-
|
69
|
+
_ as getters,
|
70
|
+
x as mutations,
|
71
|
+
a as state
|
90
72
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue2.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),d=require("../../../users/components/blocks/CardUser.vue.cjs");require("./CardDepartment.vue2.cjs");const c={class:""},p={class:"pd-medium w-100"},m=["innerHTML"],k={key:0},h={__name:"CardDepartment",props:{department:Object,organization:Object},setup(r){const n=r;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("div",p,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:r.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=t=>o.$router.push(`/organizations/${n.organization}/departments/${r.department._id}`)),class:"mn-b-small w-100",innerHTML:r.department.profile.name},null,8,m),e.createElementVNode("ul",null,[r.department.members.length<1?(e.openBlock(),e.createElementBlock("li",k,"No members in department")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.department.members,(t,l)=>(e.openBlock(),e.createBlock(d.default,{class:"pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin",key:l,user:t.user,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,position:t.position,onClick:f=>o.$router.push(`/app/profile/${t.user._id}`)},null,8,["user","photo","name","position","onClick"]))),128))])])])}}},_=u.default(h,[["__scopeId","data-v-4b7b1aaf"]]);exports.default=_;
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
import { resolveComponent as
|
2
|
-
import
|
1
|
+
import { resolveComponent as d, openBlock as r, createElementBlock as o, createElementVNode as n, createVNode as l, withCtx as u, createCommentVNode as c, Fragment as _, renderList as f, createBlock as h } from "vue";
|
2
|
+
import k from "../../../icons/navigation/IconEdit.vue.js";
|
3
3
|
import "../../../../components/Spoiler/Spoiler.vue2.js";
|
4
4
|
import "./DepartmentSub.vue2.js";
|
5
|
-
import
|
5
|
+
import g from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
6
6
|
import $ from "../../../users/components/blocks/CardUser.vue.js";
|
7
7
|
import "./CardDepartment.vue2.js";
|
8
|
-
const
|
8
|
+
const b = { class: "" }, C = { class: "pd-medium w-100" }, v = ["innerHTML"], w = { key: 0 }, x = {
|
9
9
|
__name: "CardDepartment",
|
10
10
|
props: {
|
11
11
|
department: Object,
|
12
12
|
organization: Object
|
13
13
|
},
|
14
14
|
setup(t) {
|
15
|
-
const
|
16
|
-
return (
|
17
|
-
const p =
|
18
|
-
return r(), o("div",
|
19
|
-
n("div",
|
15
|
+
const a = t;
|
16
|
+
return (s, i) => {
|
17
|
+
const p = d("router-link");
|
18
|
+
return r(), o("div", b, [
|
19
|
+
n("div", C, [
|
20
20
|
l(p, {
|
21
21
|
to: {
|
22
22
|
name: "Department Edit",
|
23
23
|
params: {
|
24
|
-
_id:
|
24
|
+
_id: a.organization,
|
25
25
|
department: t.department._id
|
26
26
|
}
|
27
27
|
},
|
28
28
|
class: "cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
|
29
29
|
}, {
|
30
30
|
default: u(() => [
|
31
|
-
l(
|
31
|
+
l(k, {
|
32
32
|
class: "i-regular",
|
33
33
|
classes: "fill-white"
|
34
34
|
})
|
@@ -36,27 +36,27 @@ const C = { class: "radius-semi o-hidden cols-2-1_3" }, v = { class: "pd-medium
|
|
36
36
|
_: 1
|
37
37
|
}, 8, ["to"]),
|
38
38
|
n("h3", {
|
39
|
-
onClick:
|
39
|
+
onClick: i[0] || (i[0] = (e) => s.$router.push(`/organizations/${a.organization}/departments/${t.department._id}`)),
|
40
40
|
class: "mn-b-small w-100",
|
41
41
|
innerHTML: t.department.profile.name
|
42
|
-
}, null, 8,
|
42
|
+
}, null, 8, v),
|
43
43
|
n("ul", null, [
|
44
44
|
t.department.members.length < 1 ? (r(), o("li", w, "No members in department")) : c("", !0),
|
45
|
-
(r(!0), o(_, null, f(t.department.members, (e,
|
46
|
-
class: "
|
47
|
-
key:
|
45
|
+
(r(!0), o(_, null, f(t.department.members, (e, m) => (r(), h($, {
|
46
|
+
class: "pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin",
|
47
|
+
key: m,
|
48
48
|
user: e.user,
|
49
49
|
photo: e.user.profile.photo,
|
50
50
|
name: e.user.profile.name || e.user.phone || e.user.email || e.user._id,
|
51
51
|
position: e.position,
|
52
|
-
onClick: (
|
52
|
+
onClick: (z) => s.$router.push(`/app/profile/${e.user._id}`)
|
53
53
|
}, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
|
54
54
|
])
|
55
55
|
])
|
56
56
|
]);
|
57
57
|
};
|
58
58
|
}
|
59
|
-
},
|
59
|
+
}, y = /* @__PURE__ */ g(x, [["__scopeId", "data-v-4b7b1aaf"]]);
|
60
60
|
export {
|
61
|
-
|
61
|
+
y as default
|
62
62
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock as m, createBlock as l, withCtx as g, createTextVNode as h, toDisplayString as y } from "vue";
|
2
|
-
import b from "../../../../components/Button/Button.
|
2
|
+
import b from "../../../../components/Button/Button.vue.js";
|
3
3
|
import "../../../auth/store/auth.js";
|
4
4
|
import { actions as i } from "../../store/memberships.js";
|
5
5
|
const M = {
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const x=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const u=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const f=require("../../../../components/Button/Button.vue2.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),D=require("../../../../components/Feed/Feed.vue.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");const w=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),P={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},U={key:0,class:"mn-r-auto"},O={key:1,class:"mn-r-auto"},M={class:"flex-nowrap flex gap-thin pd-thin"},R={class:"cols-2-fit-content"},S={class:"w-100 flex-child-grow-1 flex-child"},T={class:"cols-2 gap-thin"},A={class:"bg-grey pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),z=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j=e.createElementVNode("h4",null,"Products",-1),H={class:"bg-grey pd-medium o-hidden radius-big"},I=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),G=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Products",-1),Q=e.createElementVNode("h4",null,"Orders",-1),W=e.createElementVNode("h4",null,"Departments",-1),X={__name:"DepartmentEdit",setup(Y){const N=c.useRouter(),r=c.useRoute();async function _(){e.ref(g.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}_();const n=e.ref(!1),V=e.ref(null);function k(l){n.value=!0}function i(){n.value=!1,V.value=null}e.ref(!1),e.ref(null);async function q(){r.params.department&&await t.actions.update(r.params._id,t.state.department),r.params.department||await t.actions.create(r.params._id,t.state.department)}function E(){N.replace({name:"Department",params:{_id:r.params._id,department:t.state.department._id}})}async function v(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(r.params._id,t.state.department)}function y(l){confirm("Are you sure you want to remove this member?")&&w.actions.delete(t.state.department.members,{_id:l.user._id})}return(l,s)=>(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("header",C,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",U,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",O,"Create Department")),e.createElementVNode("section",M,[e.unref(r).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:v,callback:l.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:q,callback:E,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(x.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",S,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>k()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,d)=>(e.openBlock(),e.createBlock(b.default,{class:"bg-white pd-thin radius-medium w-100",key:d,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,action:{label:"x",method:()=>y(a)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(D.default,{search:{placeholder:"Search customer...",class:"bg-grey mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>g.actions.read(a),state:null},options:{target:e.unref(r).params._id},class:"bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,Z)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:d._id,user:d.user,photo:(m=d.user.profile)==null?void 0:m.photo,name:((p=d.user.profile)==null?void 0:p.name)||d.user.phone||d.user.email,onClick:()=>{w.actions.add(t.state.department.members,{_id:d.user._id,user:d.user,position:"Member"}),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",T,[e.createElementVNode("div",A,[F,z,e.createElementVNode("div",L,[j,e.createVNode(o.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":s[3]||(s[3]=a=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",H,[I,G,e.createElementVNode("div",J,[K,e.createVNode(o.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":s[4]||(s[4]=a=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":s[5]||(s[5]=a=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":s[6]||(s[6]=a=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),Q,e.createVNode(o.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":s[7]||(s[7]=a=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":s[8]||(s[8]=a=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":s[9]||(s[9]=a=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),W,e.createVNode(o.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":s[10]||(s[10]=a=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":s[11]||(s[11]=a=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":s[12]||(s[12]=a=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=X;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const x=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const u=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const f=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),D=require("../../../../components/Feed/Feed.vue.cjs"),P=require("../../../icons/navigation/IconDelete.vue.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),C={class:"for-transition pd-thin w-100"},U={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-grey pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-grey pd-medium o-hidden radius-big"},H=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),G=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Products",-1),Q=e.createElementVNode("h4",null,"Orders",-1),W=e.createElementVNode("h4",null,"Departments",-1),X={__name:"DepartmentEdit",setup(Y){const N=c.useRouter(),r=c.useRoute();async function V(){e.ref(w.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}V();const n=e.ref(!1),_=e.ref(null);function k(l){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function q(){r.params.department&&await t.actions.update(r.params._id,t.state.department),r.params.department||await t.actions.create(r.params._id,t.state.department)}function v(){N.push({name:"Organization Members",params:{_id:r.params._id}})}async function E(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(r.params._id,t.state.department)}function y(l){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:l.user._id})}return(l,s)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("header",U,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(r).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:E,callback:l.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:q,callback:v,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(x.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:l.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>k()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,d)=>(e.openBlock(),e.createBlock(b.default,{class:"bg-white pd-thin radius-medium w-100",key:d,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,action:{label:{is:P.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>y(a)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(D.default,{search:{placeholder:"Search customer...",class:"bg-grey mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>w.actions.read(a),state:null},options:{target:e.unref(r).params._id},class:"bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,Z)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:d._id,user:d.user,photo:(m=d.user.profile)==null?void 0:m.photo,name:((p=d.user.profile)==null?void 0:p.name)||d.user.phone||d.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:d.user._id,user:d.user,position:"Member"}),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(o.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":s[3]||(s[3]=a=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[H,G,e.createElementVNode("div",J,[K,e.createVNode(o.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":s[4]||(s[4]=a=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":s[5]||(s[5]=a=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":s[6]||(s[6]=a=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),Q,e.createVNode(o.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":s[7]||(s[7]=a=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":s[8]||(s[8]=a=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":s[9]||(s[9]=a=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),W,e.createVNode(o.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":s[10]||(s[10]=a=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":s[11]||(s[11]=a=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":s[12]||(s[12]=a=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=X;
|