@ozdao/prometheus-framework 0.2.126 โ 0.2.128
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +54 -2
- package/dist/auth.server.mjs +54 -2
- package/dist/gallery.server.js +55 -3
- package/dist/gallery.server.mjs +55 -3
- package/dist/main-CF35oB7q.js +92 -0
- package/dist/main-CmL_j3wv.mjs +14223 -0
- package/dist/organizations.server.js +112 -184
- package/dist/organizations.server.mjs +112 -184
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -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/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -77
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -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/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +57 -50
- 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 +68 -62
- 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/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 +3 -3
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +4 -4
- 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/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/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 +3 -3
- 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/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +14 -14
- 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 +116 -94
- 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/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +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 +3 -3
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +9 -4
- 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/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 +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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-BDaOF322.js +1 -0
- package/dist/web-DtWmpLE-.mjs +54 -0
- package/package.json +1 -1
- package/src/modules/auth/controllers/auth.controller.js +54 -2
- package/src/modules/auth/routes/auth.routes.js +8 -1
- package/src/modules/auth/store/auth.js +21 -9
- package/src/modules/backoffice/components/pages/Dashboard.vue +6 -0
- package/src/modules/gallery/gallery.client.js +1 -1
- package/src/modules/gallery/routes/gallery.routes.js +7 -3
- package/src/modules/globals/mixins/mixins.js +17 -0
- package/src/modules/middlewares/server/verifyAccesses.js +100 -23
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +24 -2
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/models/department.model.js +42 -2
- package/src/modules/organizations/routes/departments.routes.js +1 -8
- package/src/modules/organizations/store/departments.js +5 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../../node_modules/axios/lib/axios.cjs");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const l=require("vue"),n=require("../../globals/store/globals.cjs"),s=o.default.create({baseURL:process.env.API_URL,withCredentials:!0});s.defaults.withCredentials=!0;const a=l.reactive({departments:[],department:{organization:"",profile:{photo:"",name:"",description:"",categories:[]},address:"",location:{lat:null,lng:null},worktime:[],delivery:[],payment:[],members:[],subdepartments:[],hidden:!1,accesses:{gallery:{read:!1,edit:!1,delete:!1},products:{read:!1,edit:!1,delete:!1},orders:{read:!1,confirm:!1,delete:!1},departments:{read:!1,edit:!1,delete:!1}}},error:null}),d={async readOne(r){try{const e=await s.get(`/api/departments/get/${r}`);return a.department=e.data,a.error=null,e.data}catch(e){return n.setError(e),null}},async read(r={}){try{const e=await s.get("/api/departments/read",{params:r});return console.log("Response:",e),a.departments=e.data,a.error=null,e.data}catch(e){return console.log(e),n.setError(e),null}},async create(r,e){try{const t=await s.post(`/api/departments/${r}/create`,e);return a.error=null,t.data}catch(t){return n.setError(t),null}},async update(r,e){try{const t=await s.post(`/api/departments/${r}/update`,e);return a.error=null,t}catch(t){return n.setError(t),null}},async delete(r,e){try{return await s.delete(`/api/departments/${r}/delete`,{data:{_id:e}}),a.error=null,!0}catch(t){return n.setError(t),!1}}};l.watch(a,(r,e)=>{});exports.actions=d;exports.state=a;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import l from "../../../../node_modules/axios/lib/axios.js";
|
2
2
|
import "../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
3
|
-
import { reactive as
|
3
|
+
import { reactive as o, watch as d } from "vue";
|
4
4
|
import { setError as n } from "../../globals/store/globals.js";
|
5
|
-
const s =
|
5
|
+
const s = l.create({ baseURL: process.env.API_URL, withCredentials: !0 });
|
6
6
|
s.defaults.withCredentials = !0;
|
7
|
-
const a =
|
7
|
+
const a = o({
|
8
8
|
departments: [],
|
9
9
|
department: {
|
10
10
|
organization: "",
|
@@ -27,6 +27,11 @@ const a = l({
|
|
27
27
|
// Accesses
|
28
28
|
hidden: !1,
|
29
29
|
accesses: {
|
30
|
+
gallery: {
|
31
|
+
read: !1,
|
32
|
+
edit: !1,
|
33
|
+
delete: !1
|
34
|
+
},
|
30
35
|
products: {
|
31
36
|
read: !1,
|
32
37
|
edit: !1,
|
package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Field/Field.vue2.cjs"),c=require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const y=require("../../../icons/navigation/IconAdd.vue.cjs"),k=require("../../../icons/navigation/IconDelete.vue.cjs"),h={class:"gap-thin"},w={class:"gap-thin mn-b-thin flex-nowrap flex"},g={class:"bg-white w-100 w-min-15r br-solid br-1px br-black-transp-5 pd-small radius-small"},x=["disabled"],V={key:0,class:"gap-thin flex-nowrap flex"},N={__name:"CardPosition",props:{product:Object,products:Array,array:Array,showPrice:{type:Boolean,default:!0}},emits:["add","delete","update"],setup(s,{emit:p}){const l=s,n=p,u=e.ref(null),t=e.ref(1),a=e.ref("pcs"),d=e.ref(0),m=e.computed(()=>u.value&&t.value>0&&d.value>=0);e.watch(l.array,()=>{u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type}),l.product&&(u.value=l.product,t.value=l.product.quantity||1,d.value=l.product.price,a.value=l.product.type),e.watch([u,t,d,a],()=>{n("update",{...u.value,price:d.value,quantity:t.value||1,type:a.value})});function v(){n("add",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}function b(){n("delete",{...u.value,price:d.value,quantity:t.value||1,type:a.value})}return(f,r)=>(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",w,[e.createElementVNode("div",g,e.toDisplayString(u.value.name||u.value._id.name),1),s.showPrice?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:0,field:t.value,"onUpdate:field":r[1]||(r[1]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 w-max-10r br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(c.default,{select:a.value,"onUpdate:select":r[0]||(r[0]=o=>a.value=o),options:["pcs","g","ml"],class:"bg-light pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])),s.product?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,disabled:!m.value,onClick:v,class:"bg-main aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(y.default),{class:"i-semi"})],8,x)),s.product?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:b,class:"bg-red aspect-1x1 radius-small pd-small"},[e.createVNode(e.unref(k.default),{class:"i-semi"})])):e.createCommentVNode("",!0)]),s.showPrice?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(i.default,{field:d.value,"onUpdate:field":r[2]||(r[2]=o=>d.value=o),type:"number",label:"Price",symbol:f.returnCurrency(),class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},null,8,["field","symbol"]),e.createVNode(i.default,{field:t.value,"onUpdate:field":r[4]||(r[4]=o=>t.value=o),type:"number",label:"Qty",class:"bg-white w-100 br-solid br-1px br-black-transp-5 pd-small radius-small"},{default:e.withCtx(()=>[e.createVNode(c.default,{select:a.value,"onUpdate:select":r[3]||(r[3]=o=>a.value=o),options:["pcs","g","ml"],class:"bg-light pd-r-thin pd-l-thin pd-t-nano pd-b-nano radius-thin"},null,8,["select"])]),_:1},8,["field"])])):e.createCommentVNode("",!0)]))}};exports.default=N;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as n, computed as q, watch as v, openBlock as o, createElementBlock as p, createElementVNode as y, toDisplayString as U, createBlock as B, withCtx as f, createVNode as i, createCommentVNode as c, unref as h } from "vue";
|
2
|
-
import b from "../../../../components/Field/Field.
|
2
|
+
import b from "../../../../components/Field/Field.vue2.js";
|
3
3
|
import w from "../../../../components/Select/Select.vue2.js";
|
4
4
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
5
5
|
import Q from "../../../icons/navigation/IconAdd.vue.js";
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Popup/Popup.vue2.cjs"),c=require("../../../../components/Magnifier/Magnifier.vue.cjs");require("./ImagesThumbnails.vue2.cjs");const d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),p={class:"product-images"},m={class:"no-responsive cols-4 gap-thin"},_=["src","onClick"],g={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(o){const t=e.ref(!1),n=e.ref(0),a=s=>{n.value=s,t.value=!0},i=()=>{t.value=!1};return(s,v)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,(l,r)=>(e.openBlock(),e.createElementBlock("img",{key:r,src:(s.FILE_SERVER_URL||"")+l,onClick:h=>a(r),class:"radius-medium bg-white o-hidden thumbnail"},null,8,_))),128))]),e.createVNode(u.default,{onClosePopup:i,isPopupOpen:t.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(c.default,{imageSrc:(s.FILE_SERVER_URL||"")+o.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},f=d.default(g,[["__scopeId","data-v-5058c750"]]);exports.default=f;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as r, openBlock as o, createElementBlock as i, createElementVNode as p, Fragment as d, renderList as _, createVNode as c, withCtx as g } from "vue";
|
2
|
-
import f from "../../../../components/Popup/Popup.
|
2
|
+
import f from "../../../../components/Popup/Popup.vue2.js";
|
3
3
|
import h from "../../../../components/Magnifier/Magnifier.vue.js";
|
4
4
|
import "./ImagesThumbnails.vue2.js";
|
5
5
|
import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.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"),s=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"),s=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../store/leftovers.cjs");require("./LeftoverPositions.vue2.cjs");const u={class:"flex-column flex-wrap block"},m={key:0,class:"w-100"},f={class:"mn-r-regular w-100"},p=["onClick"],y={__name:"LeftoverPositions",props:{order:Object},setup(o){r.useRouter(),r.useRoute();const i=o;function a(n){d.actions.deleteItemFromLeftover(i.order.positions[n])}return(n,b)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("ul",u,[o.order.positions.length===0?(e.openBlock(),e.createElementBlock("span",m," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.order.positions,(t,c)=>(e.openBlock(),e.createElementBlock("li",{key:t._id,class:"w-100 flex-center flex-nowrap flex"},[e.createElementVNode("span",f,e.toDisplayString(t.name),1),e.createVNode(s.default,{field:t.price,"onUpdate:field":l=>t.price=l,type:"number",label:"Price",symbol:n.returnCurrency(),class:"bg-light pd-medium radius-small"},null,8,["field","onUpdate:field","symbol"]),e.createVNode(s.default,{field:t.quantity,"onUpdate:field":l=>t.quantity=l,type:"number",label:"Quantity",class:"bg-light pd-medium radius-small",symbol:t.type},null,8,["field","onUpdate:field","symbol"]),e.createElementVNode("a",{class:"button",onClick:l=>a(c)}," Delete ",8,p)]))),128))])]))}};exports.default=y;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { openBlock as l, createElementBlock as o, createElementVNode as i, createCommentVNode as u, Fragment as f, renderList as p, toDisplayString as y, createVNode as r } from "vue";
|
2
2
|
import { useRouter as b, useRoute as _ } from "vue-router";
|
3
|
-
import a from "../../../../components/Field/Field.
|
3
|
+
import a from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import { actions as g } from "../../store/leftovers.js";
|
5
5
|
import "./LeftoverPositions.vue2.js";
|
6
6
|
const h = { class: "flex-column flex-wrap block" }, k = {
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const i=require("./CardPosition.vue.cjs"),u=require("../../store/leftovers.cjs");require("./ListPositions.vue2.cjs");const a={class:"flex-column flex-wrap"},d={key:0,class:"w-100"},m={class:"flex-v-center flex radius-medium pd-small bg-white w-100"},p={__name:"ListPositions",props:{order:Object},setup(t){n.useRouter(),n.useRoute();const l=t;function s(r){u.actions.deleteItemFromLeftover(l.order.positions[r])}return(r,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("ul",a,[t.order.positions.length===0?(e.openBlock(),e.createElementBlock("span",d," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.order.positions,(o,c)=>(e.openBlock(),e.createElementBlock("li",{key:o._id,class:"w-100 gap-small flex-stretch flex-center flex-nowrap flex"},[e.createElementVNode("span",m,e.toDisplayString(o.name),1),e.createVNode(i.default,{products:[],product:o,onAdd:_=>s(c)},null,8,["product","onAdd"])]))),128))])]))}};exports.default=p;
|
package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { openBlock as e, createElementBlock as t, createElementVNode as n, createCommentVNode as d, Fragment as a, renderList as m, toDisplayString as p, createVNode as u } from "vue";
|
2
2
|
import { useRouter as f, useRoute as _ } from "vue-router";
|
3
|
-
import "../../../../components/Field/Field.
|
3
|
+
import "../../../../components/Field/Field.vue.js";
|
4
4
|
import x from "./CardPosition.vue.js";
|
5
5
|
import { actions as h } from "../../store/leftovers.js";
|
6
6
|
import "./ListPositions.vue2.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),l=require("vue-router"),t=require("../../store/categories.cjs"),d=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),l=require("vue-router"),t=require("../../store/categories.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),m=require("../../../../components/Block/Block.vue.cjs"),g=require("../blocks/CardCategory.vue.cjs"),f={class:"pd-thin"},p=e.createElementVNode("h1",{class:"mn-r-auto"}," Product Categories ",-1),_={__name:"Categories",setup(C){l.useRoute(),l.useRouter(),e.onMounted(async()=>{await t.actions.fetchCategories()});function s(){t.state.all.forEach((r,a)=>{r.order=a}),o()}async function o(){await t.actions.updateCategories(t.state.all)}async function i(r){confirm(`Are you sure you want to delete the category "${r.name}"?`)?await t.actions.deleteCategory(r.url):alert("Category deletion cancelled")}return(r,a)=>{const u=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",f,[e.createVNode(m.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[p,e.createVNode(u,{to:{name:"CategoryAdd",params:{_id:r.$route.params._id}},class:"mn-r-medium uppercase t-medium pd-small radius-big bg-white nav-link"},{default:e.withCtx(()=>[e.createTextVNode(" Add category ")]),_:1},8,["to"]),e.createVNode(d.default,{onClick:o,class:"pd-small radius-big bg-black t-white uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Change Order ")]),_:1})]),_:1}),e.createVNode(e.unref(c.VueDraggableNext),{class:"dragArea list-group w-full",list:t.state.all,"item-key":"order",onEnd:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.all,(n,h)=>(e.openBlock(),e.createBlock(g.default,{key:n.id,category:n,onDelete:i,class:"pd-medium bg-light radius-medium mn-b-thin"},null,8,["category"]))),128))]),_:1},8,["list"])])}}};exports.default=_;
|
@@ -2,7 +2,7 @@ import { onMounted as p, resolveComponent as _, openBlock as i, createElementBlo
|
|
2
2
|
import { VueDraggableNext as k } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
|
3
3
|
import { useRoute as w, useRouter as x } from "vue-router";
|
4
4
|
import { actions as n, state as a } from "../../store/categories.js";
|
5
|
-
import $ from "../../../../components/Button/Button.
|
5
|
+
import $ from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import v from "../../../../components/Block/Block.vue.js";
|
7
7
|
import A from "../blocks/CardCategory.vue.js";
|
8
8
|
const E = { class: "pd-thin" }, N = /* @__PURE__ */ b("h1", { class: "mn-r-auto" }, " Product Categories ", -1), T = {
|
package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.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"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),i=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/Select/Select.vue2.cjs"),d=require("../../../../components/Field/Field.vue2.cjs"),n=require("../../../../components/Block/Block.vue.cjs"),l=require("../../store/categories.cjs");require("./CategoryEdit.vue2.cjs");const b={class:"mn-r-auto"},h={class:"mn-b-medium w-100 flex-nowrap gap-thin flex"},w={class:"flex-v-center flex-nowrap flex"},x=e.createElementVNode("h4",{class:"mn-r-thin t-medium"},"Localization",-1),N=["onClick"],k=["onClick"],V=["onClick"],y={__name:"CategoryEdit",setup(C){const o=c.useRoute(),u=c.useRouter();o.params.category?l.actions.fetchCategory(o.params.category):l.actions.resetCategory(),e.computed(()=>l.state.current),e.computed(()=>o.name);function m(){o.params.category?l.actions.updateCategory(o.params.category):l.actions.addCategory()}function p(){u.push({name:"Categories Organization",params:{_id:o.params._id}})}return(_,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(n.default,{class:"radius-big mn-b-thin flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",b,e.toDisplayString(e.unref(o).params.category?"Edit Category":"Add Category"),1),e.createVNode(f.default,{submit:m,callback:p,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Save Category ")]),_:1})]),_:1}),e.createVNode(n.default,{title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",h,[e.createVNode(d.default,{field:l.state.current.order,"onUpdate:field":r[0]||(r[0]=t=>l.state.current.order=t),label:"Order",disabled:!0,class:"w-25 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.url,"onUpdate:field":r[1]||(r[1]=t=>l.state.current.url=t),label:"URL",placeholder:"Enter category URL",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.default,{field:l.state.current.name,"onUpdate:field":r[2]||(r[2]=t=>l.state.current.name=t),label:"Name",placeholder:"Enter category name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),e.createVNode(g.default,{select:l.state.current.status,"onUpdate:select":r[3]||(r[3]=t=>l.state.current.status=t),label:"Status",options:["draft","internal","published","removed"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),e.createElementVNode("div",w,[x,e.createElementVNode("button",{onClick:r[4]||(r[4]=()=>l.state.current.localization.push({locale:"",text:""})),class:"i-small pd-thin button-delete button"}," + ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.localization,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.locale,"onUpdate:field":a=>t.locale=a,placeholder:"Locale",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.text,"onUpdate:field":a=>t.text=a,placeholder:"Text",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.localization.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,N)]))),128))]),_:1}),e.createVNode(n.default,{title:"Subcategories",placeholder:"No subcategories added yet",actions:[{label:"+",function:()=>l.state.current.subcategories.push({name:"",url:""})}],class:"mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.subcategories,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Subcategory name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.url,"onUpdate:field":a=>t.url=a,placeholder:"Subcategory",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.subcategories.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,k)]))),128))]),_:1},8,["actions"]),e.createVNode(n.default,{title:"Filters",placeholder:"No filters added yet",actions:[{label:"+",function:()=>l.state.current.filters.push({name:"",url:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.current.filters,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:s},[e.createVNode(d.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"Filter name",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:t.options,"onUpdate:field":a=>t.options=a,placeholder:"Filter options divided by ,",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",{onClick:()=>l.state.current.filters.splice(s,1),class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},[e.createVNode(i.default,{class:"i-medium"})],8,V)]))),128))]),_:1},8,["actions"])],64))}};exports.default=y;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { computed as h, openBlock as o, createElementBlock as c, Fragment as m, createVNode as l, withCtx as u, createElementVNode as d, toDisplayString as _, unref as U, createTextVNode as C, renderList as b } from "vue";
|
2
2
|
import { useRoute as k, useRouter as v } from "vue-router";
|
3
3
|
import g from "../../../icons/navigation/IconDelete.vue.js";
|
4
|
-
import S from "../../../../components/Button/Button.
|
4
|
+
import S from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import E from "../../../../components/Select/Select.vue2.js";
|
6
|
-
import i from "../../../../components/Field/Field.
|
6
|
+
import i from "../../../../components/Field/Field.vue2.js";
|
7
7
|
import p from "../../../../components/Block/Block.vue.js";
|
8
8
|
import { actions as f, state as t } from "../../store/categories.js";
|
9
9
|
import "./CategoryEdit.vue2.js";
|
package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue2.cjs"),q=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const P=require("../blocks/CardPosition.vue.cjs"),x=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),V=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const B={class:"pd-thin"},E={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},L={class:"gap-thin flex-v-center flex-nojustify flex"},R={class:"mn-r-auto"},F={__name:"EditLeftover",setup(O){const r=v.useRoute(),i=v.useRouter(),f=e.ref(m.state.all);e.ref(null);const b=e.computed(()=>Number(t.state.current.positions.reduce((a,s)=>Number(a)+Number(s.price),0))),c=e.ref(!1);function g(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{if(r.params.leftover)try{await t.actions.fetch(r.params.leftover)}catch{console.error("error")}else t.state.current={type:"",order:"",positions:[]};try{const a=await m.actions.read({organization:r.params._id,limit:100});f.value=a}catch{console.error("error")}});function _(){r.params.leftover?t.actions.fetch(r.params.leftover):t.state.current={type:"",order:"",positions:[]}}function y(){t.state.current.organization=r.params._id,r.params.leftover?t.actions.update(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")):(t.state.current.creator={type:"user",target:V.state.user._id},t.state.current.owner={type:"organization",target:r.params._id},console.log("leftover state is",t.state.current),t.actions.create(t.state.current).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error")))}function k(){t.actions.delete(r.params.leftover).then(()=>i.push({name:"Leftovers",params:{_id:r.params._id}}),a=>console.error("error"))}return(a,s)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("header",E,[e.createElementVNode("h2",S,e.toDisplayString(e.unref(r).params.leftover?"Edit ":"Add ")+" Inventory",1),e.createVNode(C.default,{select:t.state.current.type,"onUpdate:select":s[0]||(s[0]=o=>t.state.current.type=o),options:["stock-in","stock-out"],placeholder:"Select type",class:"bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"},null,8,["select"])]),e.createVNode(q.default,{title:"Add position",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:o=>m.actions.read(o),state:null},options:{organization:e.unref(r).params._id},class:""},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(n,l)=>(e.openBlock(),e.createBlock(x.default,{key:n._id,editable:!1,product:n,onClick:()=>{let u={...n};u.quantity=1,u.type="pcs",p.actions.add(t.state.current.positions,u),h()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(d.default,{title:"Invetory Sheet",actions:[{label:"+",function:()=>g()}],placeholder:"No positions added yet",class:"mn-b-semi"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(o,n)=>(e.openBlock(),e.createBlock(P.default,{key:o._id,product:o,array:t.state.current.positions,products:f.value,onUpdate:l=>p.actions.update(t.state.current.positions,l,n),onDelete:l=>p.actions.delete(t.state.current.positions,l,n),class:"mn-b-small radius-medium bg-white pd-small"},null,8,["product","array","products","onUpdate","onDelete"]))),128))]),_:1},8,["actions"]),e.createVNode(d.default,{title:"Comment",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(w.default,{field:t.state.current.comment,"onUpdate:field":s[1]||(s[1]=o=>t.state.current.comment=o),label:"Comment",type:"textarea",class:"w-100 bg-white radius-small pd-medium"},null,8,["field"])]),_:1}),e.createVNode(d.default,{class:""},{default:e.withCtx(()=>[e.createElementVNode("section",L,[e.createElementVNode("h3",R," In total: "+e.toDisplayString(a.formatPrice(b.value)),1),e.createElementVNode("a",{onClick:s[2]||(s[2]=o=>y()),class:"bg-main button"}," Save "),e.createElementVNode("a",{class:"t-white bg-second button",onClick:s[3]||(s[3]=o=>_())}," Reset "),e.unref(r).params.leftover?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s[4]||(s[4]=o=>k()),class:"t-white bg-red button"}," Delete ")):e.createCommentVNode("",!0)])]),_:1})]))}};exports.default=F;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ref as h, computed as z, onMounted as E, openBlock as l, createElementBlock as m, createElementVNode as n, toDisplayString as k, unref as b, createVNode as a, withCtx as c, Fragment as P, renderList as x, createBlock as $, createCommentVNode as U } from "vue";
|
2
2
|
import v from "../../../../components/Block/Block.vue.js";
|
3
|
-
import B from "../../../../components/Field/Field.
|
3
|
+
import B from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import F from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import I from "../../../../components/Select/Select.vue2.js";
|
6
|
-
import O from "../../../../components/Popup/Popup.
|
6
|
+
import O from "../../../../components/Popup/Popup.vue2.js";
|
7
7
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
8
8
|
import V from "../blocks/CardPosition.vue.js";
|
9
9
|
import A from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const o=require("../../../../components/Block/Block.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),y=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");require("./ProductEdit.vue2.cjs");const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),h=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});h.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function g(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(q.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(y.default,{key:a._id,product:a,array:t.state.current.ingredients,products:h.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐัะฐะผะตััะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"ะะฝะฐัะตะฝะธะต ะฟะฐัะฐะผะตััะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐัะฐะผะตััะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"ะะฝะฐัะตะฝะธะต ะฟะฐัะฐะผะตััะฐ",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
|
@@ -5,10 +5,10 @@ import "../../../globals/localization/vue-i18n.js";
|
|
5
5
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
6
6
|
import d from "../../../../components/Block/Block.vue.js";
|
7
7
|
import "../../../../components/Tab/Tab.vue.js";
|
8
|
-
import v from "../../../../components/Field/Field.
|
8
|
+
import v from "../../../../components/Field/Field.vue2.js";
|
9
9
|
import S from "../../../../components/Checkbox/Checkbox.vue.js";
|
10
|
-
import N from "../../../../components/Button/Button.
|
11
|
-
import T from "../../../../components/Popup/Popup.
|
10
|
+
import N from "../../../../components/Button/Button.vue2.js";
|
11
|
+
import T from "../../../../components/Popup/Popup.vue2.js";
|
12
12
|
import A from "../../../../components/Feed/Feed.vue.js";
|
13
13
|
import L from "../../../../components/EditImages/EditImages.vue.js";
|
14
14
|
import D from "../../../icons/navigation/IconDelete.vue.js";
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Field/Field.vue2.cjs"),L={key:0,class:"mn-b-small w-100"},k={class:"w-100 flex-nowrap flex"},w=["onClick"],E=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),g=[E],N=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),V=["onClick"],B=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z",fill:"rgb(var(--white))"})],-1),x=[B],C=e.createElementVNode("hr",{class:"mn-b-medium"},null,-1),U=["onClick"],y={__name:"EditModifications",props:{product:Object},emits:["add-modification","delete-modification","add-characteristic","delete-characteristic","submit"],setup(u,{emit:m}){const o=m,f=u,{product:r}=e.toRefs(f);function p(){o("add-modification")}function h(l){o("delete-modification",l)}function b(l){o("add-characteristic",l)}function _(l,d){o("delete-characteristic",{modIndex:l,charIndex:d})}function v(){o("submit")}return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.unref(r).modifications.length==0?(e.openBlock(),e.createElementBlock("p",L,"ะฃ ะฟัะพะดัะบัะฐ ะตัะต ะฝะต ะทะฐะดะฐะฝั ะผะพะดะธัะธะบะฐัะธะธ.")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).modifications,(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small flex-column flex-wrap block",key:i},[e.createElementVNode("div",k,[e.createVNode(c.default,{field:n.quantity,"onUpdate:field":t=>n.quantity=t,disabled:!0,placeholder:"ะะพะปะธัะตััะฒะพ",class:"mn-b-medium input-text input",type:"number"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:n.name,"onUpdate:field":t=>n.name=t,placeholder:"ะะพะฒะฐั ะผะพะดะธัะธะบะฐัะธั",class:"mn-b-medium input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:t=>h(i),class:"mn-l-small i-normal pd-regular button-delete button"},g,8,w)]),N,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.characteristics,(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-medium w-100 flex-nowrap flex variants-wrapper",key:s},[e.createVNode(c.default,{field:t.name,"onUpdate:field":a=>t.name=a,placeholder:"ะะฐะทะฒะฐะฝะธะต ะฟะฐัะฐะผะตััะฐ",class:"input-text input"},null,8,["field","onUpdate:field"]),e.createVNode(c.default,{field:t.value,"onUpdate:field":a=>t.value=a,placeholder:"ะะฝะฐัะตะฝะธะต ะฟะฐัะฐะผะตััะฐ",class:"mn-l-small input-text input"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:a=>_(i,s),class:"mn-l-small i-normal pd-regular button-delete button"},x,8,V)]))),128)),C,e.createElementVNode("button",{onClick:t=>b(i),class:"button"},"ะะพะฑะฐะฒะธัั ั
ะฐัะฐะบัะตัะธััะธะบั",8,U)]))),128)),e.createElementVNode("div",{class:"mn-b-big t-center flex-center flex block"},[e.createElementVNode("button",{onClick:p,class:"w-100"},"ะะพะฑะฐะฒะธัั ะผะพะดะธัะธะบะฐัั")]),e.createElementVNode("button",{onClick:d[0]||(d[0]=n=>v()),class:"button"},"ะกะพั
ัะฐะฝะธัั ะผะพะดะธัะธะบะฐัะธะธ")]))}};exports.default=y;
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { toRefs as U, openBlock as i, createElementBlock as o, unref as p, createCommentVNode as y, Fragment as h, renderList as b, createElementVNode as e, createVNode as r } from "vue";
|
2
|
-
import u from "../../../../components/Field/Field.
|
2
|
+
import u from "../../../../components/Field/Field.vue2.js";
|
3
3
|
const M = {
|
4
4
|
key: 0,
|
5
5
|
class: "mn-b-small w-100"
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const r=require("../../../../components/Field/Field.vue2.cjs"),i=require("../../../../components/Select/Select.vue2.cjs"),u={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,t)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(i.default,{select:e.product.status,"onUpdate:select":t[0]||(t[0]=l=>e.product.status=l),label:"Status",options:["unpublished","published","archivied"],placeholder:"Display product",class:"pos-relative w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["select"]),d.createVNode(r.default,{field:e.product.name,"onUpdate:field":t[1]||(t[1]=l=>e.product.name=l),label:"Name",placeholder:"Enter product name",class:"w-100 mn-b-small bg-white radius-small pd-medium"},null,8,["field"]),d.createVNode(r.default,{field:e.product.price,"onUpdate:field":t[3]||(t[3]=l=>e.product.price=l),label:"Price",placeholder:"Enter product price",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(i.default,{select:e.product.price.currency,"onUpdate:select":t[2]||(t[2]=l=>e.product.price.currency=l),placeholder:"เธฟ",options:["เธฟ"],class:"pos-relative bg-light pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":t[4]||(t[4]=l=>e.product.description=l),label:"Description",placeholder:"Enter product description",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=u;
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { openBlock as u, createElementBlock as a, Fragment as o, createVNode as d, withCtx as n } from "vue";
|
2
2
|
import "../../../../components/Loader/Loader.vue.js";
|
3
|
-
import "../../../../components/Button/Button.
|
4
|
-
import i from "../../../../components/Field/Field.
|
3
|
+
import "../../../../components/Button/Button.vue.js";
|
4
|
+
import i from "../../../../components/Field/Field.vue2.js";
|
5
5
|
import r from "../../../../components/Select/Select.vue2.js";
|
6
6
|
const w = {
|
7
7
|
__name: "EditProductInfo",
|
package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},b={class:"flex-nowrap flex-column flex pos-relative"},y={class:"h-100 h-max-50vh bg-light radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-light-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI ะ ะตะบะพะผะตะฝะดัะตั ะฒะฐะผ",description:"",addtoorder:"ะะพะฑะฐะฒะธัั ะฒ ะบะพัะทะธะฝั",fastorder:"ะัััััะน ะทะฐะบะฐะท"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",b,[e.createElementVNode("div",y,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-light w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" โ Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
|
package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { computed as v, openBlock as e, createElementBlock as a, createElementVNode as s, createBlock as m, createCommentVNode as o, toDisplayString as n, unref as l, createVNode as g, Fragment as y, renderList as w, withCtx as x, createTextVNode as k } from "vue";
|
2
|
-
import z from "../../../../components/Button/Button.
|
2
|
+
import z from "../../../../components/Button/Button.vue2.js";
|
3
3
|
import I from "../../../icons/placeholders/PlaceholderImage.vue.js";
|
4
4
|
import C from "../blocks/Images360.vue.js";
|
5
5
|
import E from "../blocks/ImagesThumbnails.vue.js";
|
package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),m=require("../../../../components/Select/Select.vue2.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:o[1]||(o[1]=n=>u())},[e.renderSlot(p.$slots,"default"),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[0]||(o[0]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { reactive as d, ref as f, openBlock as b, createElementBlock as g, renderSlot as h, createVNode as s, withCtx as l, createTextVNode as y, createElementVNode as a } from "vue";
|
2
|
-
import _ from "../../../../components/Popup/Popup.
|
3
|
-
import v from "../../../../components/Button/Button.
|
2
|
+
import _ from "../../../../components/Popup/Popup.vue2.js";
|
3
|
+
import v from "../../../../components/Button/Button.vue2.js";
|
4
4
|
import w from "../../../../components/Select/Select.vue2.js";
|
5
5
|
import { actions as S } from "../../store/reports.js";
|
6
6
|
const k = /* @__PURE__ */ a("h3", { class: "mn-b-small" }, " Report Content ", -1), P = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), R = /* @__PURE__ */ a("p", { class: "p-medium mn-b-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), O = {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const h=require("../../../../components/Dropdown/Dropdown.vue.cjs"),g=require("../../../../components/Completion/Completion.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),B=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),v=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const x={key:0,class:"for-transition w-100"},y={key:0,class:"flex-center flex pd-medium radius-big bg-light uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-light"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={key:4,class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},O={key:6,class:"mn-t-small mn-b-thin"},L=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{v.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",x,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",y," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(g.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(B.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1})):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo&&t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," ๐จโ๐จโ๐งโ๐ง "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:5,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",O," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(V.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),L]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as U, onMounted as C, openBlock as i, createElementBlock as c, unref as s, createBlock as d, createCommentVNode as m, createElementVNode as l, withCtx as u, createVNode as a, toDisplayString as _, Fragment as E, renderList as S, normalizeClass as P } from "vue";
|
2
|
-
import "../../../../components/Field/Field.
|
2
|
+
import "../../../../components/Field/Field.vue.js";
|
3
3
|
import "../../../../components/Loader/Loader.vue.js";
|
4
|
-
import "../../../../components/Button/Button.
|
4
|
+
import "../../../../components/Button/Button.vue.js";
|
5
5
|
import B from "../../../../components/Dropdown/Dropdown.vue.js";
|
6
6
|
import M from "../../../../components/Completion/Completion.vue.js";
|
7
7
|
import k from "../../../mobile/components/Menu/Menu.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");const i=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");const i=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),v=require("../../../../components/UploadImage/UploadImage.vue.cjs"),g=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),n=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},U=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),_={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},k=e.createElementVNode("h4",null,"Upload userpic",-1),q=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),y=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let r,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[r,d]=e.withAsyncContext(()=>s.actions.read({_id:n.state.user._id})),await r,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),n.actions.logout())}function h(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,t)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===n.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,user:n.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":t[0]||(t[0]=a=>l.value.username=a),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-light pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),U,e.createElementVNode("div",_,[e.createVNode(v.default,{photo:l.value.profile.photo,"onUpdate:photo":t[1]||(t[1]=a=>l.value.profile.photo=a),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),k]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":t[2]||(t[2]=a=>l.value.profile.name=a),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-light pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":t[3]||(t[3]=a=>l.value.profile.description=a),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-light pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),q,y,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":t[4]||(t[4]=a=>l.value.socials.instagram=a),label:"Instagram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":t[5]||(t[5]=a=>l.value.socials.twitter=a),label:"Twitter",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":t[6]||(t[6]=a=>l.value.socials.facebook=a),label:"Facebook",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":t[7]||(t[7]=a=>l.value.socials.telegram=a),label:"Telegram",placeholder:"",class:"mn-b-semi bg-light pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":t[8]||(t[8]=a=>l.value.phone=a),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-light pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":t[9]||(t[9]=a=>l.value.email=a),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-light pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:h,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as f, withAsyncContext as k, openBlock as c, createElementBlock as y, unref as b, createBlock as P, createCommentVNode as S, createVNode as a, createElementVNode as s, toDisplayString as z, withCtx as h, createTextVNode as g } from "vue";
|
2
2
|
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
3
3
|
import "../../../../components/Tab/Tab.vue.js";
|
4
|
-
import t from "../../../../components/Field/Field.
|
5
|
-
import v from "../../../../components/Button/Button.
|
4
|
+
import t from "../../../../components/Field/Field.vue2.js";
|
5
|
+
import v from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import A from "../../../../components/UploadImage/UploadImage.vue.js";
|
7
7
|
import R from "../sections/ProfileCompletion.vue.js";
|
8
8
|
import { useRoute as $, useRouter as D } from "vue-router";
|