@ozdao/prometheus-framework 0.2.183 → 0.2.185
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/builder.js +60 -33
- package/dist/builder.mjs +60 -33
- package/dist/pages.server.js +150 -0
- package/dist/pages.server.mjs +151 -0
- 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/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- 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/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/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- 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 +2 -2
- 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/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.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 +2 -2
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- 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 +5 -5
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/globals/mixins/mixins.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/mixins/mixins.js +43 -0
- 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 +3 -3
- 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 +1 -1
- 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 +4 -4
- 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 +1 -1
- 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/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- 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 +4 -4
- 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 +3 -3
- 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/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.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 +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.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 +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 +6 -6
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +31 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +98 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +127 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +89 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +47 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +86 -0
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +53 -0
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.js +28 -0
- package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs +1 -0
- package/dist/prometheus-framework/src/modules/pages/views/store/pages.js +52 -0
- 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/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.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 +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 +3 -3
- 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 +3 -3
- 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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
- 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 +4 -4
- 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/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.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 +6 -6
- package/dist/style.css +1 -1
- package/package.json +9 -1
- package/src/builder/ssr/ssr-render-html.js +6 -24
- package/src/builder/templates/page.js +39 -0
- package/src/builder/webpack/webpack.config.spa.js +3 -4
- package/src/modules/pages/views/components/pages/Page.vue +0 -2
- package/src/builder/templates/page.html +0 -37
- package/src/builder/templates/screen.html +0 -33
package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js
CHANGED
@@ -5,12 +5,12 @@ import "../../../globals/localization/vue-i18n.js";
|
|
5
5
|
/* empty css */
|
6
6
|
import U from "../../../../components/FieldTags/BlockTags.vue.js";
|
7
7
|
/* empty css */
|
8
|
-
import s from "../../../../components/Field/Field.
|
9
|
-
/* empty css
|
8
|
+
import s from "../../../../components/Field/Field.vue2.js";
|
9
|
+
/* empty css */
|
10
10
|
import _ from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
11
11
|
import x from "../../../../components/UploadImage/UploadImage.vue.js";
|
12
|
-
import v from "../../../../components/Button/Button.
|
13
|
-
/* empty css
|
12
|
+
import v from "../../../../components/Button/Button.vue2.js";
|
13
|
+
/* empty css */
|
14
14
|
import { state as k } from "../../../auth/store/auth.js";
|
15
15
|
import { actions as o, state as e } from "../../store/organizations.js";
|
16
16
|
import "../../store/memberships.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Dropdown/Dropdown.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Dropdown/Dropdown.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs"),g=require("../../../../components/Chips/Chips.vue.cjs"),b=require("../../../icons/entities/IconFollowing.vue.cjs"),h=require("../../../icons/navigation/IconEdit.vue.cjs"),f=require("../../../icons/navigation/IconEllipsis.vue.cjs"),k=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),c=require("../elements/ButtonToggleMembership.vue.cjs"),z=require("../blocks/Socials.vue.cjs"),w=require("../../../reports/components/sections/FormReport.vue.cjs"),x=require("../../store/organizations.cjs"),B=require("../../store/memberships.cjs"),V={class:"flex-center flex flex-column t-center pd-medium radius-big bg-light"},y={class:"bg-black pd-thin radius-small"},N=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),E=["src"],q={class:"mn-b-thin"},p={class:"flex-center pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max"},C={class:"mn-t-thin p-medium t-medium uppercase mn-b-thin"},S={class:"w-max-50r mn-t-regular mn-b-medium p-big"},v={key:5,class:"mn-t-small mn-b-thin"},O={__name:"DetailsTab",props:{organization:Object,user:Object},setup(t){const s=u.useRoute(),l=({membership:o,status:i,target:r},n,a)=>{B.mutations.handleMembershipUpdate(x.state.current,o,i,r,n,a)};return(o,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>{var r,n;return[e.createElementVNode("section",V,[t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(d.default,{key:0,label:{component:f.default,class:"i-regular t-transp"},align:"right",class:"cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",y,[e.createVNode(w.default,{user:t.user._id,type:"organization",target:t.organization._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[N]),_:1},8,["user","target"]),t.user._id&&t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"blocked",target:t.organization._id,status:t.organization.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:i[0]||(i[0]=a=>l(a,"isBlocked")),class:"t-white w-100 mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),t.user._id===t.organization.owner?(e.openBlock(),e.createBlock(h.default,{key:1,onClick:i[1]||(i[1]=a=>o.$router.push({name:"Organization Edit",params:{_id:t.organization._id}})),class:"pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"})):e.createCommentVNode("",!0),t.organization.profile.photo?(e.openBlock(),e.createElementBlock("img",{key:2,src:(o.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"radius-big bg-light flex-center flex mn-b-small w-8r"},null,8,E)):(e.openBlock(),e.createBlock(k.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h1",q,e.toDisplayString(t.organization.profile.name),1),e.createElementVNode("div",p,[e.createVNode(b.default,{class:"i-medium mn-r-micro t-transp"}),e.createElementVNode("p",C,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),t.user._id&&e.unref(s).params._id&&e.unref(s).params._id!==t.user._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"+",remove:"-"},onUpdateMembership:i[2]||(i[2]=a=>l(a,"isSubscriber","numberOfSubscribers")),class:"mn-l-thin p-medium t-medium radius-extra i-semi"},null,8,["user","target","status"])):e.createCommentVNode("",!0)]),e.createElementVNode("p",S,[e.createVNode(m.default,{text:t.organization.profile.description||"",showToggleText:!0,maxLen:320},null,8,["text"])]),((n=(r=t.organization.profile)==null?void 0:r.tags)==null?void 0:n.length)>0?(e.openBlock(),e.createBlock(g.default,{key:4,chips:t.organization.profile.tags,class:"p-medium"},null,8,["chips"])):e.createCommentVNode("",!0),Object.values(t.organization.socials).some(a=>a)?(e.openBlock(),e.createElementBlock("h4",v," Find us in socials ")):e.createCommentVNode("",!0),e.createVNode(z.default,{telegram:t.organization.socials.telegram,facebook:t.organization.socials.facebook,instagram:t.organization.socials.instagram,twitter:t.organization.socials.twitter,youtube:t.organization.socials.youtube},null,8,["telegram","facebook","instagram","twitter","youtube"])])]}),_:1}))}};exports.default=O;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { openBlock as e, createBlock as r, Transition as x, withCtx as c, createElementVNode as n, createVNode as u, createCommentVNode as o, createElementBlock as b, toDisplayString as f, unref as h } from "vue";
|
2
2
|
import { useRoute as k } from "vue-router";
|
3
|
-
import w from "../../../../components/Dropdown/Dropdown.
|
3
|
+
import w from "../../../../components/Dropdown/Dropdown.vue.js";
|
4
4
|
import y from "../../../../components/Text/Text.vue.js";
|
5
|
-
import p from "../../../../components/Chips/Chips.
|
5
|
+
import p from "../../../../components/Chips/Chips.vue.js";
|
6
6
|
import $ from "../../../icons/entities/IconFollowing.vue.js";
|
7
7
|
import O from "../../../icons/navigation/IconEdit.vue.js";
|
8
8
|
import B from "../../../icons/navigation/IconEllipsis.vue.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");;/* empty css */;/* empty css */const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,q)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:x=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ref as r, watchEffect as y, resolveComponent as P, openBlock as t, createElementBlock as s, createElementVNode as o, Fragment as i, renderList as d, unref as _, toDisplayString as f, createVNode as h, withCtx as k, pushScopeId as w, popScopeId as C } from "vue";
|
2
2
|
import { useRouter as I, useRoute as g } from "vue-router";
|
3
|
-
import D from "../../../../components/Field/Field.
|
3
|
+
import D from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import "vue-i18n";
|
5
|
-
/* empty css
|
5
|
+
/* empty css */
|
6
6
|
/* empty css */
|
7
7
|
import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
8
|
-
/* empty css
|
8
|
+
/* empty css */
|
9
9
|
/* empty css */
|
10
10
|
const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "documents" }, F = /* @__PURE__ */ E(() => /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Список документов", -1)), N = { class: "mn-b-big cols-4" }, O = ["onClick"], R = { class: "mn-b-small" }, U = { class: "t-semi t-transp radius-small" }, V = {
|
11
11
|
__name: "Documents",
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const v=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),g=require("../../../users/components/blocks/CardUser.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");const w=require("../../../users/store/users.cjs"),x={class:"mn-b-thin t-transp p-medium"},E={class:"mn-b-thin pos-relative"},y={key:0,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={class:"cols-1 mn-b-small radius-medium pd-semi bg-light pos-relative"},V=["onClick"],q=e.createElementVNode("span",null,"Invite to organization",-1),C={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(c,{emit:d}){let r=e.ref(null),l=e.ref(!1);const u=e.ref(null),m=d,n=e.ref([{contact:""}]);async function p(){return new Promise((i,s)=>{m("send-invite",n.value,i,s)})}return(i,s)=>{const f=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",x,e.toDisplayString(c.text),1),e.createElementVNode("div",E,[e.withDirectives(e.createVNode(b.default,{onSearch:s[0]||(s[0]=o=>{e.isRef(r)?r.value=o:r=o,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-grey"},null,512),[[f,()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(r)&&e.unref(l)?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(k.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:o=>w.actions.read(o),state:null},options:{search:e.unref(r)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(t,a)=>(e.openBlock(),e.createBlock(g.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{n.value.push({contact:t.email||t.phone}),e.isRef(l)?l.value=!1:l=!1},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(o,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"},[e.createVNode(h.default,{field:o.contact,"onUpdate:field":a=>o.contact=a,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:u.value},{default:e.withCtx(()=>[t<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:s[1]||(s[1]=()=>n.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>n.value.splice(t,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(_.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,V))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(v.default,{submit:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[q]),_:1})])}}};exports.default=C;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as c, resolveDirective as C, openBlock as s, createElementBlock as l, createElementVNode as d, toDisplayString as $, withDirectives as U, createVNode as a, isRef as m, unref as p, withCtx as u, Fragment as _, renderList as v, createBlock as E, createCommentVNode as N } from "vue";
|
2
|
-
import S from "../../../../components/Field/Field.
|
3
|
-
/* empty css
|
4
|
-
import V from "../../../../components/Button/Button.
|
2
|
+
import S from "../../../../components/Field/Field.vue2.js";
|
3
|
+
/* empty css */
|
4
|
+
import V from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import z from "../../../../components/Feed/Feed.vue.js";
|
6
6
|
import B from "../../../globals/components/blocks/BlockSearch.vue.js";
|
7
7
|
import D from "../../../users/components/blocks/CardUser.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");;/* empty css */;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const q=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");;/* empty css */require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");;/* empty css */;/* empty css */const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js
CHANGED
@@ -2,16 +2,16 @@ import { ref as m, withAsyncContext as b, watch as _, openBlock as t, createElem
|
|
2
2
|
import { useRouter as v, useRoute as z } from "vue-router";
|
3
3
|
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
4
4
|
/* empty css */
|
5
|
-
/* empty css */
|
6
|
-
/* empty css */
|
7
|
-
/* empty css */
|
8
|
-
/* empty css */
|
9
|
-
/* empty css */
|
10
5
|
/* empty css */
|
6
|
+
/* empty css */
|
7
|
+
/* empty css */
|
8
|
+
/* empty css */
|
9
|
+
/* empty css */
|
10
|
+
/* empty css */
|
11
11
|
import { state as k } from "../../../auth/store/auth.js";
|
12
12
|
import "../../store/memberships.js";
|
13
13
|
import "vue-i18n";
|
14
|
-
/* empty css
|
14
|
+
/* empty css */
|
15
15
|
import "../../../reports/store/reports.js";
|
16
16
|
import { actions as q } from "../../store/organizations.js";
|
17
17
|
import $ from "../blocks/CardOrganization.vue.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./views/store/pages.cjs"),u=require("./views/router/pages.router.cjs"),d=require("./views/router/pages.backoffice.router.cjs"),g=require("./views/components/pages/Pages.vue.cjs"),n=require("./views/components/pages/Page.vue.cjs"),f=require("./views/components/pages/PageEdit.vue.cjs");function l(p,s,e,t={}){var o,a;const i=((o=t.route)==null?void 0:o.home)||"Home",c=((a=t.route)==null?void 0:a.backoffice)||"Backoffice Root";e.addRoute(i,u.default),e.addRoute(c,d.default),s.addStore("pages",r)}const P={initialize:l,views:{store:{storePages:r},router:{routerPages:u.default},components:{Pages:g.default,Page:n.default,PageEdit:f.default}}};exports.default=P;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import * as r from "./views/store/pages.js";
|
2
|
+
import i from "./views/router/pages.router.js";
|
3
|
+
import p from "./views/router/pages.backoffice.router.js";
|
4
|
+
import c from "./views/components/pages/Pages.vue.js";
|
5
|
+
import g from "./views/components/pages/Page.vue.js";
|
6
|
+
import n from "./views/components/pages/PageEdit.vue.js";
|
7
|
+
function u(d, s, o, e = {}) {
|
8
|
+
var t, a;
|
9
|
+
const m = ((t = e.route) == null ? void 0 : t.home) || "Home", f = ((a = e.route) == null ? void 0 : a.backoffice) || "Backoffice Root";
|
10
|
+
o.addRoute(m, i), o.addRoute(f, p), s.addStore("pages", r);
|
11
|
+
}
|
12
|
+
const k = {
|
13
|
+
initialize: u,
|
14
|
+
views: {
|
15
|
+
store: {
|
16
|
+
storePages: r
|
17
|
+
},
|
18
|
+
router: {
|
19
|
+
routerPages: i
|
20
|
+
},
|
21
|
+
components: {
|
22
|
+
// Pages
|
23
|
+
Pages: c,
|
24
|
+
Page: g,
|
25
|
+
PageEdit: n
|
26
|
+
}
|
27
|
+
}
|
28
|
+
};
|
29
|
+
export {
|
30
|
+
k as default
|
31
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../icons/navigation/IconEdit.vue.cjs"),m=require("../../../../icons/navigation/IconAdd.vue.cjs");;/* empty css */;/* empty css */;/* empty css */const g=require("vue-router");;/* empty css */const h={class:"flex flex-nowrap gap-thin card-page-title"},f={key:0,class:"mn-l-small br-t br-solid br-black-transp-10"},p={__name:"CardPage",props:{page:{type:Object,required:!0},hasAdminRights:{type:Boolean,default:!1},showChildren:{type:Boolean,default:!0}},emits:["createPage"],setup(t,{emit:i}){const l=g.useRouter(),c=i;e.ref({show:!1,name:null});async function n(a){c("createPage",a)}return(a,o)=>{const s=e.resolveComponent("router-link"),u=e.resolveComponent("CardPage",!0);return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(a.$attrs.class)},[e.createElementVNode("div",h,[e.createVNode(s,{to:e.unref(l).resolve({name:"Page",params:{url:t.page.url.split("/")}}).href,class:e.normalizeClass(["z-index-2 cursor-pointer mn-r-auto t-truncate",{"t-main":a.$route.params.url&&t.page.url===a.joinArrayToUrl(a.$route.params.url)}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.page.name),1)]),_:1},8,["to","class"]),t.hasAdminRights?(e.openBlock(),e.createBlock(s,{key:0,to:e.unref(l).resolve({name:"Backoffice Pages Edit",params:{url:t.page.url.split("/")}}).href,class:"z-index-2 cursor-pointer card-page-actions radius-extra pd-micro bg-second"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-small",classes:"fill-white"})]),_:1},8,["to"])):e.createCommentVNode("",!0),t.hasAdminRights?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[0]||(o[0]=r=>n(t.page)),class:"z-index-2 cursor-pointer card-page-actions radius-extra pd-micro bg-second"},[e.createVNode(m.default,{class:"i-small",fill:"white"})])):e.createCommentVNode("",!0)])],2),t.page.children&&t.page.children.length>0&&t.page.children[0].url&&t.showChildren?(e.openBlock(),e.createElementBlock("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.page.children,r=>(e.openBlock(),e.createBlock(u,{onCreatePage:n,key:r.url,page:r,hasAdminRights:t.hasAdminRights,class:e.normalizeClass(a.$attrs.class)},null,8,["page","hasAdminRights","class"]))),128))])):e.createCommentVNode("",!0)])}}};exports.default=p;
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { ref as b, resolveComponent as d, openBlock as t, createElementBlock as r, createElementVNode as g, normalizeClass as l, createVNode as n, unref as h, withCtx as f, createTextVNode as v, toDisplayString as P, createBlock as p, createCommentVNode as i, Fragment as w, renderList as A } from "vue";
|
2
|
+
import R from "../../../../icons/navigation/IconEdit.vue.js";
|
3
|
+
import $ from "../../../../icons/navigation/IconAdd.vue.js";
|
4
|
+
/* empty css */
|
5
|
+
/* empty css */
|
6
|
+
/* empty css */
|
7
|
+
import { useRouter as x } from "vue-router";
|
8
|
+
/* empty css */
|
9
|
+
const B = { class: "flex flex-nowrap gap-thin card-page-title" }, z = {
|
10
|
+
key: 0,
|
11
|
+
class: "mn-l-small br-t br-solid br-black-transp-10"
|
12
|
+
}, L = {
|
13
|
+
__name: "CardPage",
|
14
|
+
props: {
|
15
|
+
page: {
|
16
|
+
type: Object,
|
17
|
+
required: !0
|
18
|
+
},
|
19
|
+
hasAdminRights: {
|
20
|
+
type: Boolean,
|
21
|
+
default: !1
|
22
|
+
},
|
23
|
+
showChildren: {
|
24
|
+
type: Boolean,
|
25
|
+
default: !0
|
26
|
+
}
|
27
|
+
},
|
28
|
+
emits: [
|
29
|
+
"createPage"
|
30
|
+
],
|
31
|
+
setup(e, { emit: k }) {
|
32
|
+
const o = x(), C = k;
|
33
|
+
b({
|
34
|
+
show: !1,
|
35
|
+
name: null
|
36
|
+
});
|
37
|
+
async function c(a) {
|
38
|
+
C("createPage", a);
|
39
|
+
}
|
40
|
+
return (a, m) => {
|
41
|
+
const u = d("router-link"), y = d("CardPage", !0);
|
42
|
+
return t(), r("div", null, [
|
43
|
+
g("div", {
|
44
|
+
class: l(a.$attrs.class)
|
45
|
+
}, [
|
46
|
+
g("div", B, [
|
47
|
+
n(u, {
|
48
|
+
to: h(o).resolve({ name: "Page", params: { url: e.page.url.split("/") } }).href,
|
49
|
+
class: l(["z-index-2 cursor-pointer mn-r-auto t-truncate", {
|
50
|
+
"t-main": a.$route.params.url && e.page.url === a.joinArrayToUrl(a.$route.params.url)
|
51
|
+
}])
|
52
|
+
}, {
|
53
|
+
default: f(() => [
|
54
|
+
v(P(e.page.name), 1)
|
55
|
+
]),
|
56
|
+
_: 1
|
57
|
+
}, 8, ["to", "class"]),
|
58
|
+
e.hasAdminRights ? (t(), p(u, {
|
59
|
+
key: 0,
|
60
|
+
to: h(o).resolve({ name: "Backoffice Pages Edit", params: { url: e.page.url.split("/") } }).href,
|
61
|
+
class: "z-index-2 cursor-pointer card-page-actions radius-extra pd-micro bg-second"
|
62
|
+
}, {
|
63
|
+
default: f(() => [
|
64
|
+
n(R, {
|
65
|
+
class: "i-small",
|
66
|
+
classes: "fill-white"
|
67
|
+
})
|
68
|
+
]),
|
69
|
+
_: 1
|
70
|
+
}, 8, ["to"])) : i("", !0),
|
71
|
+
e.hasAdminRights ? (t(), r("button", {
|
72
|
+
key: 1,
|
73
|
+
onClick: m[0] || (m[0] = (s) => c(e.page)),
|
74
|
+
class: "z-index-2 cursor-pointer card-page-actions radius-extra pd-micro bg-second"
|
75
|
+
}, [
|
76
|
+
n($, {
|
77
|
+
class: "i-small",
|
78
|
+
fill: "white"
|
79
|
+
})
|
80
|
+
])) : i("", !0)
|
81
|
+
])
|
82
|
+
], 2),
|
83
|
+
e.page.children && e.page.children.length > 0 && e.page.children[0].url && e.showChildren ? (t(), r("div", z, [
|
84
|
+
(t(!0), r(w, null, A(e.page.children, (s) => (t(), p(y, {
|
85
|
+
onCreatePage: c,
|
86
|
+
key: s.url,
|
87
|
+
page: s,
|
88
|
+
hasAdminRights: e.hasAdminRights,
|
89
|
+
class: l(a.$attrs.class)
|
90
|
+
}, null, 8, ["page", "hasAdminRights", "class"]))), 128))
|
91
|
+
])) : i("", !0)
|
92
|
+
]);
|
93
|
+
};
|
94
|
+
}
|
95
|
+
};
|
96
|
+
export {
|
97
|
+
L as default
|
98
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),N=require("vue-i18n"),V=require("../../../../constructor/components/sections/Viewer.vue.cjs"),r=require("../blocks/CardPage.vue.cjs"),g=require("../../store/pages.cjs"),w=require("../../../../auth/store/auth.cjs"),B=require("../../../../globals/mixins/mixins.cjs"),E={key:0,style:{overflow:"clip"},class:"bg-light pos-relative"},y={class:"pd-medium pos-sticky mobile-only z-index-1 pos-t-0 bg-light w-100 br-b br-solid br-black-transp-10"},P={key:0,class:"z-index-0 pos-relative"},x={class:"transition-ease-in-out w-100 bg-light"},C={key:1,class:"cols-2-1_3 h-100 bg-light z-index-0 pos-relative"},R={key:0,class:"desktop-only h-100 bg-white o-scroll z-index-0 pos-relative"},q={class:"transition-ease-in-out w-100 bg-light"},M={class:"o-scroll pd-medium"},A={class:"gap-thin cols-2"},z={key:0,class:"bg-white pd-medium mn-b-thin radius-semi"},I=e.createElementVNode("h4",{class:"mn-b-small"},"Read Previous",-1),S={key:1,class:"bg-white pd-medium mn-b-thin radius-semi"},T=e.createElementVNode("h4",{class:"mn-b-small pd-micro"},"Table of Contents",-1),j={key:2,class:"bg-white pd-medium mn-b-thin radius-semi"},F=e.createElementVNode("h4",{class:"mn-b-small"},"Read Next",-1),O={__name:"Page",setup(U){const i=e.ref(!1);function p(){i.value=!i.value}function v(t){const l=[];function s(d,k=null){for(const u of d)l.push({...u,parent:k}),u.children.length>0&&s(u.children,u)}return s(t.children),l}const c=e.computed(()=>v(a.value)),o=e.computed(()=>{if(n.value._id===a.value._id)return{children:n.value.children,previousPage:null,nextPage:null};const t=c.value.findIndex(d=>d._id===n.value._id),l=t>0?c.value[t-1]:a.value,s=t<c.value.length-1?c.value[t+1]:null;return{previousPage:l,nextPage:s,children:[]}}),{normalizeUrlParam:D,joinArrayToUrl:_,isAdmin:b}=B.useGlobalMixins(),m=e.computed(()=>b(w.state.access.roles));N.useI18n();const h=f.useRoute(),a=e.ref(null),n=e.ref(null);return e.onMounted(async()=>{let t=h.params.url;t.length>0&&(t=t[0]),a.value=await g.actions.read({url:t});let l=h.params.url;l.length>0&&(l=_(l)),n.value=await g.actions.read({url:l})}),(t,l)=>n.value&&n.value.content?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",y,[e.createElementVNode("button",{onClick:p,class:"cursor-pointer"},e.toDisplayString(i.value===!1?"Show Menu":"Hide Menu"),1)]),i.value?(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("ul",x,[e.createVNode(r.default,{page:a.value,hasAdminRights:m.value,class:"pd-thin"},null,8,["page","hasAdminRights"])])])):e.createCommentVNode("",!0),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",C,[a.value.url!==n.value.url?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("ul",q,[e.createVNode(r.default,{page:a.value,hasAdminRights:m.value,class:"bg-white pd-thin"},null,8,["page","hasAdminRights"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[e.createVNode(V.default,{content:n.value.content,class:""},null,8,["content"]),e.createElementVNode("div",A,[o.value.previousPage?(e.openBlock(),e.createElementBlock("div",z,[I,e.createVNode(r.default,{page:o.value.previousPage,showChildren:!1,class:"h3 t-main bg-white mn-b-thin radius-semi"},null,8,["page"])])):e.createCommentVNode("",!0),o.value.children.length>0?(e.openBlock(),e.createElementBlock("div",S,[T,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.children,s=>(e.openBlock(),e.createBlock(r.default,{key:s.id,page:s,class:"bg-white pd-micro radius-semi"},null,8,["page"]))),128))])):e.createCommentVNode("",!0),o.value.nextPage?(e.openBlock(),e.createElementBlock("div",j,[F,e.createVNode(r.default,{page:o.value.nextPage,class:"h3 t-main bg-white mn-b-thin radius-semi",showChildren:!1},null,8,["page"])])):e.createCommentVNode("",!0)])])]))])):e.createCommentVNode("",!0)}};exports.default=O;
|
@@ -0,0 +1,127 @@
|
|
1
|
+
import { ref as v, computed as _, onMounted as A, openBlock as t, createElementBlock as i, createElementVNode as n, toDisplayString as M, createVNode as d, createCommentVNode as r, Fragment as z, renderList as C, createBlock as N } from "vue";
|
2
|
+
import { useRoute as B } from "vue-router";
|
3
|
+
import { useI18n as I } from "vue-i18n";
|
4
|
+
import T from "../../../../constructor/components/sections/Viewer.vue.js";
|
5
|
+
import h from "../blocks/CardPage.vue.js";
|
6
|
+
import { actions as w } from "../../store/pages.js";
|
7
|
+
import { state as V } from "../../../../auth/store/auth.js";
|
8
|
+
import { useGlobalMixins as E } from "../../../../globals/mixins/mixins.js";
|
9
|
+
const F = {
|
10
|
+
key: 0,
|
11
|
+
style: { overflow: "clip" },
|
12
|
+
class: "bg-light pos-relative"
|
13
|
+
}, S = { class: "pd-medium pos-sticky mobile-only z-index-1 pos-t-0 bg-light w-100 br-b br-solid br-black-transp-10" }, U = {
|
14
|
+
key: 0,
|
15
|
+
class: "z-index-0 pos-relative"
|
16
|
+
}, $ = { class: "transition-ease-in-out w-100 bg-light" }, j = {
|
17
|
+
key: 1,
|
18
|
+
class: "cols-2-1_3 h-100 bg-light z-index-0 pos-relative"
|
19
|
+
}, D = {
|
20
|
+
key: 0,
|
21
|
+
class: "desktop-only h-100 bg-white o-scroll z-index-0 pos-relative"
|
22
|
+
}, G = { class: "transition-ease-in-out w-100 bg-light" }, H = { class: "o-scroll pd-medium" }, L = { class: "gap-thin cols-2" }, O = {
|
23
|
+
key: 0,
|
24
|
+
class: "bg-white pd-medium mn-b-thin radius-semi"
|
25
|
+
}, q = /* @__PURE__ */ n("h4", { class: "mn-b-small" }, "Read Previous", -1), J = {
|
26
|
+
key: 1,
|
27
|
+
class: "bg-white pd-medium mn-b-thin radius-semi"
|
28
|
+
}, K = /* @__PURE__ */ n("h4", { class: "mn-b-small pd-micro" }, "Table of Contents", -1), Q = {
|
29
|
+
key: 2,
|
30
|
+
class: "bg-white pd-medium mn-b-thin radius-semi"
|
31
|
+
}, W = /* @__PURE__ */ n("h4", { class: "mn-b-small" }, "Read Next", -1), oe = {
|
32
|
+
__name: "Page",
|
33
|
+
setup(X) {
|
34
|
+
const c = v(!1);
|
35
|
+
function k() {
|
36
|
+
c.value = !c.value;
|
37
|
+
}
|
38
|
+
function y(e) {
|
39
|
+
const s = [];
|
40
|
+
function o(g, R = null) {
|
41
|
+
for (const p of g)
|
42
|
+
s.push({ ...p, parent: R }), p.children.length > 0 && o(p.children, p);
|
43
|
+
}
|
44
|
+
return o(e.children), s;
|
45
|
+
}
|
46
|
+
const m = _(() => y(a.value)), u = _(() => {
|
47
|
+
if (l.value._id === a.value._id)
|
48
|
+
return { children: l.value.children, previousPage: null, nextPage: null };
|
49
|
+
const e = m.value.findIndex((g) => g._id === l.value._id), s = e > 0 ? m.value[e - 1] : a.value, o = e < m.value.length - 1 ? m.value[e + 1] : null;
|
50
|
+
return { previousPage: s, nextPage: o, children: [] };
|
51
|
+
}), {
|
52
|
+
normalizeUrlParam: Y,
|
53
|
+
joinArrayToUrl: x,
|
54
|
+
isAdmin: P
|
55
|
+
} = E(), b = _(() => P(V.access.roles));
|
56
|
+
I();
|
57
|
+
const f = B(), a = v(null), l = v(null);
|
58
|
+
return A(async () => {
|
59
|
+
let e = f.params.url;
|
60
|
+
e.length > 0 && (e = e[0]), a.value = await w.read({ url: e });
|
61
|
+
let s = f.params.url;
|
62
|
+
s.length > 0 && (s = x(s)), l.value = await w.read({ url: s });
|
63
|
+
}), (e, s) => l.value && l.value.content ? (t(), i("div", F, [
|
64
|
+
n("div", S, [
|
65
|
+
n("button", {
|
66
|
+
onClick: k,
|
67
|
+
class: "cursor-pointer"
|
68
|
+
}, M(c.value === !1 ? "Show Menu" : "Hide Menu"), 1)
|
69
|
+
]),
|
70
|
+
c.value ? (t(), i("div", U, [
|
71
|
+
n("ul", $, [
|
72
|
+
d(h, {
|
73
|
+
page: a.value,
|
74
|
+
hasAdminRights: b.value,
|
75
|
+
class: "pd-thin"
|
76
|
+
}, null, 8, ["page", "hasAdminRights"])
|
77
|
+
])
|
78
|
+
])) : r("", !0),
|
79
|
+
c.value ? r("", !0) : (t(), i("div", j, [
|
80
|
+
a.value.url !== l.value.url ? (t(), i("div", D, [
|
81
|
+
n("ul", G, [
|
82
|
+
d(h, {
|
83
|
+
page: a.value,
|
84
|
+
hasAdminRights: b.value,
|
85
|
+
class: "bg-white pd-thin"
|
86
|
+
}, null, 8, ["page", "hasAdminRights"])
|
87
|
+
])
|
88
|
+
])) : r("", !0),
|
89
|
+
n("div", H, [
|
90
|
+
d(T, {
|
91
|
+
content: l.value.content,
|
92
|
+
class: ""
|
93
|
+
}, null, 8, ["content"]),
|
94
|
+
n("div", L, [
|
95
|
+
u.value.previousPage ? (t(), i("div", O, [
|
96
|
+
q,
|
97
|
+
d(h, {
|
98
|
+
page: u.value.previousPage,
|
99
|
+
showChildren: !1,
|
100
|
+
class: "h3 t-main bg-white mn-b-thin radius-semi"
|
101
|
+
}, null, 8, ["page"])
|
102
|
+
])) : r("", !0),
|
103
|
+
u.value.children.length > 0 ? (t(), i("div", J, [
|
104
|
+
K,
|
105
|
+
(t(!0), i(z, null, C(u.value.children, (o) => (t(), N(h, {
|
106
|
+
key: o.id,
|
107
|
+
page: o,
|
108
|
+
class: "bg-white pd-micro radius-semi"
|
109
|
+
}, null, 8, ["page"]))), 128))
|
110
|
+
])) : r("", !0),
|
111
|
+
u.value.nextPage ? (t(), i("div", Q, [
|
112
|
+
W,
|
113
|
+
d(h, {
|
114
|
+
page: u.value.nextPage,
|
115
|
+
class: "h3 t-main bg-white mn-b-thin radius-semi",
|
116
|
+
showChildren: !1
|
117
|
+
}, null, 8, ["page"])
|
118
|
+
])) : r("", !0)
|
119
|
+
])
|
120
|
+
])
|
121
|
+
]))
|
122
|
+
])) : r("", !0);
|
123
|
+
}
|
124
|
+
};
|
125
|
+
export {
|
126
|
+
oe as default
|
127
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),v=require("../../../../globals/mixins/mixins.cjs"),o=require("../../store/pages.cjs"),c=require("../../../../../components/Button/Button.vue2.cjs");;/* empty css */;/* empty css */;/* empty css */const b=require("../../../../constructor/components/sections/Constructor.vue.cjs"),g={key:0},k={key:0,class:"w-100 mn-b-thin bg-light pd-big radius-semi"},h={key:1,class:"pos-sticky pos-l-0 pos-b-0 w-100"},_={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},w={__name:"PageEdit",setup(y){const{normalizeUrlParam:s,joinArrayToUrl:i}=v.useGlobalMixins(),l=u.useRoute(),r=u.useRouter(),t=e.ref(null);e.onMounted(async()=>{let a;if(l.params.url&&(a=l.params.url,a.length>0&&(a=i(a))),a)try{t.value=await o.actions.read({url:a})}catch(n){console.log("error",n)}else t.value=o.state.current});async function m(){t.value.name=t.value.content[0].content,t.value.url||(t.value.url=s(t.value.name));try{l.params.url?await o.actions.update(t.value):await o.actions.create(t.value)}catch(a){console.log("error",a)}r.push(r.resolve({name:"Backoffice Pages Edit",params:{url:t.value.url.split("/")}}).href)}async function d(){try{await o.actions.delete(t.value)}catch(a){console.log("error",a)}}function p(){t.value.parent?r.push(r.resolve({name:"Backoffice Pages Edit",params:{url:t.value.parent.url.split("/")}}).href):r.push({name:"Backoffice Pages"})}return(a,n)=>t.value?(e.openBlock(),e.createElementBlock("div",g,[t.value?(e.openBlock(),e.createElementBlock("section",k,[e.createVNode(b.default,{content:t.value.content,onUpdate:n[0]||(n[0]=f=>t.value.content=f)},null,8,["content"])])):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("section",h,[e.createElementVNode("div",_,[e.unref(l).params.url?(e.openBlock(),e.createBlock(c.default,{key:0,submit:()=>d(),callback:()=>p(),class:"t-nowrap bg-second w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1},8,["submit","callback"])):e.createCommentVNode("",!0),e.createVNode(c.default,{submit:()=>m(),class:"mn-l-auto t-nowrap t-white bg-black w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}};exports.default=w;
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import { ref as h, onMounted as k, openBlock as l, createElementBlock as u, createVNode as c, createCommentVNode as n, createElementVNode as w, unref as y, createBlock as x, withCtx as i, createTextVNode as m } from "vue";
|
2
|
+
import { useRoute as B, useRouter as P } from "vue-router";
|
3
|
+
import { useGlobalMixins as E } from "../../../../globals/mixins/mixins.js";
|
4
|
+
import { actions as s, state as N } from "../../store/pages.js";
|
5
|
+
import p from "../../../../../components/Button/Button.vue2.js";
|
6
|
+
/* empty css */
|
7
|
+
/* empty css */
|
8
|
+
/* empty css */
|
9
|
+
import V from "../../../../constructor/components/sections/Constructor.vue.js";
|
10
|
+
const C = { key: 0 }, U = {
|
11
|
+
key: 0,
|
12
|
+
class: "w-100 mn-b-thin bg-light pd-big radius-semi"
|
13
|
+
}, D = {
|
14
|
+
key: 1,
|
15
|
+
class: "pos-sticky pos-l-0 pos-b-0 w-100"
|
16
|
+
}, M = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, H = {
|
17
|
+
__name: "PageEdit",
|
18
|
+
setup(R) {
|
19
|
+
const {
|
20
|
+
normalizeUrlParam: f,
|
21
|
+
joinArrayToUrl: d
|
22
|
+
} = E(), r = B(), a = P(), e = h(null);
|
23
|
+
k(async () => {
|
24
|
+
let t;
|
25
|
+
if (r.params.url && (t = r.params.url, t.length > 0 && (t = d(t))), t)
|
26
|
+
try {
|
27
|
+
e.value = await s.read({ url: t });
|
28
|
+
} catch (o) {
|
29
|
+
console.log("error", o);
|
30
|
+
}
|
31
|
+
else
|
32
|
+
e.value = N.current;
|
33
|
+
});
|
34
|
+
async function v() {
|
35
|
+
e.value.name = e.value.content[0].content, e.value.url || (e.value.url = f(e.value.name));
|
36
|
+
try {
|
37
|
+
r.params.url ? await s.update(e.value) : await s.create(e.value);
|
38
|
+
} catch (t) {
|
39
|
+
console.log("error", t);
|
40
|
+
}
|
41
|
+
a.push(a.resolve({ name: "Backoffice Pages Edit", params: { url: e.value.url.split("/") } }).href);
|
42
|
+
}
|
43
|
+
async function _() {
|
44
|
+
try {
|
45
|
+
await s.delete(e.value);
|
46
|
+
} catch (t) {
|
47
|
+
console.log("error", t);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
function b() {
|
51
|
+
e.value.parent ? a.push(a.resolve({ name: "Backoffice Pages Edit", params: { url: e.value.parent.url.split("/") } }).href) : a.push({ name: "Backoffice Pages" });
|
52
|
+
}
|
53
|
+
return (t, o) => e.value ? (l(), u("div", C, [
|
54
|
+
e.value ? (l(), u("section", U, [
|
55
|
+
c(V, {
|
56
|
+
content: e.value.content,
|
57
|
+
onUpdate: o[0] || (o[0] = (g) => e.value.content = g)
|
58
|
+
}, null, 8, ["content"])
|
59
|
+
])) : n("", !0),
|
60
|
+
e.value ? (l(), u("section", D, [
|
61
|
+
w("div", M, [
|
62
|
+
y(r).params.url ? (l(), x(p, {
|
63
|
+
key: 0,
|
64
|
+
submit: () => _(),
|
65
|
+
callback: () => b(),
|
66
|
+
class: "t-nowrap bg-second w-max"
|
67
|
+
}, {
|
68
|
+
default: i(() => [
|
69
|
+
m(" Delete ")
|
70
|
+
]),
|
71
|
+
_: 1
|
72
|
+
}, 8, ["submit", "callback"])) : n("", !0),
|
73
|
+
c(p, {
|
74
|
+
submit: () => v(),
|
75
|
+
class: "mn-l-auto t-nowrap t-white bg-black w-max"
|
76
|
+
}, {
|
77
|
+
default: i(() => [
|
78
|
+
m(" Save ")
|
79
|
+
]),
|
80
|
+
_: 1
|
81
|
+
}, 8, ["submit"])
|
82
|
+
])
|
83
|
+
])) : n("", !0)
|
84
|
+
])) : n("", !0);
|
85
|
+
}
|
86
|
+
};
|
87
|
+
export {
|
88
|
+
H as default
|
89
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router"),n=require("../../../../../components/Block/Block.vue.cjs"),o=require("../../../../globals/components/sections/SectionPageTitle.vue.cjs"),u=require("../blocks/CardPage.vue.cjs"),c=require("../../store/pages.cjs"),i=require("../../../../auth/store/auth.cjs"),d=require("../../../../globals/mixins/mixins.cjs"),g={__name:"Pages",setup(m){const{normalizeUrlParam:h,joinArrayToUrl:p,isAdmin:r}=d.useGlobalMixins(),l=e.computed(()=>r(i.state.access.roles));a.useRoute(),a.useRouter();const t=e.ref(null);return e.onMounted(async()=>{t.value=await c.actions.read()}),(k,_)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o.default,{title:"Pages",actions:[{to:{name:"Backoffice Pages Add"},label:"Create Page"}],class:"mn-b-small bg-light bg-light radius-big"}),t.value?(e.openBlock(),e.createBlock(n.default,{key:0,class:"mn-b-thin cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,s=>(e.openBlock(),e.createBlock(u.default,{page:s,hasAdminRights:l.value,class:"bg-white pd-thin radius-small"},null,8,["page","hasAdminRights"]))),256))]),_:1})):e.createCommentVNode("",!0)]))}};exports.default=g;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { computed as n, ref as l, onMounted as m, openBlock as e, createElementBlock as a, createVNode as c, createBlock as r, withCtx as u, Fragment as p, renderList as d, createCommentVNode as g } from "vue";
|
2
|
+
import { useRoute as f, useRouter as _ } from "vue-router";
|
3
|
+
import h from "../../../../../components/Block/Block.vue.js";
|
4
|
+
import b from "../../../../globals/components/sections/SectionPageTitle.vue.js";
|
5
|
+
import A from "../blocks/CardPage.vue.js";
|
6
|
+
import { actions as k } from "../../store/pages.js";
|
7
|
+
import { state as v } from "../../../../auth/store/auth.js";
|
8
|
+
import { useGlobalMixins as P } from "../../../../globals/mixins/mixins.js";
|
9
|
+
const E = {
|
10
|
+
__name: "Pages",
|
11
|
+
setup(R) {
|
12
|
+
const {
|
13
|
+
normalizeUrlParam: x,
|
14
|
+
joinArrayToUrl: B,
|
15
|
+
isAdmin: s
|
16
|
+
} = P(), o = n(() => s(v.access.roles));
|
17
|
+
f(), _();
|
18
|
+
const t = l(null);
|
19
|
+
return m(async () => {
|
20
|
+
t.value = await k.read();
|
21
|
+
}), (w, y) => (e(), a("div", null, [
|
22
|
+
c(b, {
|
23
|
+
title: "Pages",
|
24
|
+
actions: [
|
25
|
+
{ to: { name: "Backoffice Pages Add" }, label: "Create Page" }
|
26
|
+
],
|
27
|
+
class: "mn-b-small bg-light bg-light radius-big"
|
28
|
+
}),
|
29
|
+
t.value ? (e(), r(h, {
|
30
|
+
key: 0,
|
31
|
+
class: "mn-b-thin cols-1 gap-thin"
|
32
|
+
}, {
|
33
|
+
default: u(() => [
|
34
|
+
(e(!0), a(p, null, d(t.value, (i) => (e(), r(A, {
|
35
|
+
page: i,
|
36
|
+
hasAdminRights: o.value,
|
37
|
+
class: "bg-white pd-thin radius-small"
|
38
|
+
}, null, 8, ["page", "hasAdminRights"]))), 256))
|
39
|
+
]),
|
40
|
+
_: 1
|
41
|
+
})) : g("", !0)
|
42
|
+
]));
|
43
|
+
}
|
44
|
+
};
|
45
|
+
export {
|
46
|
+
E as default
|
47
|
+
};
|
package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),g=require("../../../../../components/Block/Block.vue.cjs"),h=require("../../../../../components/Popup/Popup.vue2.cjs"),P=require("../../../../../components/Button/Button.vue2.cjs"),b=require("../../../../constructor/components/sections/Constructor.vue.cjs"),_=require("../blocks/CardPage.vue.cjs"),c=require("../../store/pages.cjs"),w=require("../../../../auth/store/auth.cjs"),k=require("../../../../globals/mixins/mixins.cjs"),q={class:"h-max-20r o-scroll"},x={__name:"SidebarPages",setup(B){const{normalizeUrlParam:i,joinArrayToUrl:C,isAdmin:p}=k.useGlobalMixins(),d=e.computed(()=>p(w.state.access.roles));s.useRoute();const l=s.useRouter(),a=e.ref(null);e.onMounted(async()=>{a.value=await c.actions.read()});const t=e.ref({url:null,name:null,parent:null,content:[]}),n=e.ref(!1);function m(o){n.value=!0,t.value.parent=o}function v(){n.value=!1,t.value={url:null,name:null,parent:null,content:[]}}async function f(){t.value.name=t.value.content[0].content,t.value.url=t.value.parent.url+"/"+i(t.value.name),t.value.parent=t.value.parent._id,await c.actions.create(t.value),l.push(l.resolve({name:"Backoffice Pages Edit",params:{url:t.value.url.split("/")}}).href)}return(o,r)=>a.value?(e.openBlock(),e.createBlock(g.default,{key:0,class:"mn-b-thin pd-small radius-semi cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createBlock(_.default,{page:u,class:"radius-small pd-thin",hasAdminRights:d.value,onCreatePage:m},null,8,["page","hasAdminRights"]))),256)),e.createVNode(h.default,{onClosePopup:v,isPopupOpen:n.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(b.default,{content:t.value.content,onUpdate:r[0]||(r[0]=u=>t.value.content=u)},null,8,["content"])]),e.createVNode(P.default,{submit:()=>f(),class:"mn-l-auto t-nowrap t-white bg-black w-max"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1},8,["submit"])]),_:1},8,["isPopupOpen"])]),_:1})):e.createCommentVNode("",!0)}};exports.default=x;
|