@ozdao/prometheus-framework 0.2.91 → 0.2.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +19 -9
- package/dist/events.server.mjs +19 -9
- package/dist/main-CX2ISR43.mjs +13629 -0
- package/dist/main-cffh4bbv.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +32 -18
- package/dist/orders.server.mjs +32 -18
- package/dist/organizations.server.js +2 -1
- package/dist/organizations.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +14 -48
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +85 -25
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +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 +74 -63
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionFeatures.vue.js +74 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +4 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- 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 +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +7 -9
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +37 -26
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CQQEUA9l.js +1 -0
- package/dist/web-D2Em-p-C.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +23 -34
- package/src/components/LocationMarker/LocationMarker.vue +6 -1
- package/src/components/LocationSelection/LocationSelection.vue +4 -0
- package/src/components/Map/Map.vue +29 -15
- package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
- package/src/modules/events/components/layouts/layoutEvents.vue +2 -59
- package/src/modules/events/components/pages/Events.vue +106 -23
- package/src/modules/events/controllers/events.controller.js +10 -7
- package/src/modules/globals/components/blocks/CardHeader.vue +31 -6
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
- package/src/modules/landing/components/pages/Farming.vue +226 -0
- package/src/modules/landing/components/pages/Governance.vue +3 -5
- package/src/modules/landing/components/pages/Home.vue +0 -3
- package/src/modules/landing/components/pages/Hotel.vue +1 -3
- package/src/modules/landing/components/pages/Page.vue +0 -3
- package/src/modules/landing/components/sections/Examples.vue +4 -56
- package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
- package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
- package/src/modules/landing/landing.client.js +3 -1
- package/src/modules/landing/router/landing.js +11 -0
- package/src/modules/marketplace/components/sections/Filters.vue +26 -23
- package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
- package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
- package/src/modules/orders/components/pages/Order.vue +2 -6
- package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
- package/src/modules/orders/components/pages/Orders.vue +60 -11
- package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
- package/src/modules/orders/components/sections/SubscribeNewsletter.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +29 -18
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +3 -5
- package/src/modules/orders/router/orders.router.js +2 -2
- package/src/modules/orders/store/orders.js +3 -7
- package/src/modules/orders/store/shopcart.js +1 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
- package/src/modules/organizations/components/pages/Department.vue +5 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
- package/src/modules/organizations/components/pages/Members.vue +2 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +3 -1
- package/src/modules/organizations/store/memberships.js +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +32 -22
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/store/products.js +25 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
- package/src/modules/users/components/blocks/CardUser.vue +1 -0
- package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -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 s=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),m=require("../../../icons/navigation/IconDelete.vue.cjs"),b=require("../blocks/CardPosition.vue.cjs"),q=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 y={class:"for-transition w-100 cols-1 pd-thin gap-thin"},E={class:"mn-r-auto"},P={class:"cols-2 gap-thin"},U={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},D={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},z={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},I={class:"cols-1 gap-thin"},F={__name:"ProductEdit",setup(L){const n=k.useRoute(),g=k.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function N(c){f.value=!0}function d(){f.value=!1}e.onMounted(async()=>{await w.actions.fetchCategories();try{const c=await t.actions.read({organization:n.params._id,limit:100});p.value=c}catch{console.error("error")}
|
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 s=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),m=require("../../../icons/navigation/IconDelete.vue.cjs"),b=require("../blocks/CardPosition.vue.cjs"),q=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 y={class:"for-transition w-100 cols-1 pd-thin gap-thin"},E={class:"mn-r-auto"},P={class:"cols-2 gap-thin"},U={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},D={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},z={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},I={class:"cols-1 gap-thin"},F={__name:"ProductEdit",setup(L){const n=k.useRoute(),g=k.useRouter(),p=e.ref(t.state.all),f=e.ref(!1);function N(c){f.value=!0}function d(){f.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),n.params.product&&await t.actions.read({_id:n.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const c=await t.actions.read({organization:n.params._id,limit:100});p.value=c}catch{console.error("error")}});function v(){n.params.product?t.actions.update(n.params.product,t.state.current):t.actions.create(n.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function h(){g.push({name:"Organization",params:{_id:n.params._id}})}return(c,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",E,e.toDisplayString(e.unref(n).params.product?t.state.current.name:"Create Product"),1),e.unref(n).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:h,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:h,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(C.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":i[0]||(i[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",P,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(q.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(g).push({name:"Categories Organization",params:{_id:e.unref(n).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,r)=>(e.openBlock(),e.createBlock(V.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":l=>t.state.current.category=l},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,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",U,[e.createVNode(m.default,{onClick:()=>t.state.current.information.splice(r,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,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(m.default,{onClick:()=>t.state.current.localization.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]),e.createVNode(o.default,{title:"Quantity Discount",class:"mn-b-semi",actions:[{label:"+",function:()=>t.state.current.quantityDiscount.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.quantityDiscount,(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:r},[e.createVNode(s.default,{field:a.name,"onUpdate:field":l=>a.name=l,placeholder:"Quantity",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(s.default,{field:a.value,"onUpdate:field":l=>a.value=l,placeholder:"Discount",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",z,[e.createVNode(m.default,{onClick:()=>t.state.current.quantityDiscount.splice(r,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add ingredient",onClosePopup:d,isPopupOpen:f.value,class:"bg-white pd-big radius-big"},{default:e.withCtx(()=>[e.createVNode(b.default,{onAdd:i[1]||(i[1]=a=>u.actions.add(t.state.current.ingredients,a)),products:p.value,class:"flex-column"},null,8,["products"])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Ingredients",placeholder:"No positions added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,r)=>(e.openBlock(),e.createBlock(b.default,{key:a._id,product:a,array:t.state.current.ingredients,products:p.value,onAdd:i[2]||(i[2]=l=>{u.actions.add(t.state.current.ingredients,l),d()}),onUpdate:l=>{u.actions.update(t.state.current.ingredients,l,r),d()},onDelete:l=>{u.actions.delete(t.state.current.ingredients,l,r),d()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])]),_:1},8,["actions"])]))}};exports.default=F;
|
@@ -14,12 +14,12 @@ import k from "../../../icons/navigation/IconDelete.vue.js";
|
|
14
14
|
import z from "../blocks/CardPosition.vue.js";
|
15
15
|
import F from "../sections/EditProductInfo.vue.js";
|
16
16
|
import { actions as v } from "../../../globals/store/globals.js";
|
17
|
-
import { state as e, actions as g } from "../../store/products.js";
|
18
|
-
import { actions as
|
17
|
+
import { state as e, mutations as L, actions as g } from "../../store/products.js";
|
18
|
+
import { actions as Q, state as M } from "../../store/categories.js";
|
19
19
|
import "./ProductEdit.vue2.js";
|
20
|
-
const
|
20
|
+
const j = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, G = { class: "mn-r-auto" }, H = { class: "cols-2 gap-thin" }, J = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, K = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, W = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" }, X = { class: "cols-1 gap-thin" }, be = {
|
21
21
|
__name: "ProductEdit",
|
22
|
-
setup(
|
22
|
+
setup(Y) {
|
23
23
|
const o = B(), U = E(), w = P(e.all), x = P(!1);
|
24
24
|
function N(h) {
|
25
25
|
x.value = !0;
|
@@ -28,7 +28,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
28
28
|
x.value = !1;
|
29
29
|
}
|
30
30
|
V(async () => {
|
31
|
-
await
|
31
|
+
L.resetProduct(), o.params.product && await g.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []), await Q.fetchCategories();
|
32
32
|
try {
|
33
33
|
const h = await g.read({
|
34
34
|
organization: o.params._id,
|
@@ -38,7 +38,6 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
38
38
|
} catch {
|
39
39
|
console.error("error");
|
40
40
|
}
|
41
|
-
o.params.product && await g.read({ _id: o.params.product }), e.current.ingredients || (e.current.ingredients = []);
|
42
41
|
});
|
43
42
|
function O() {
|
44
43
|
o.params.product ? g.update(o.params.product, e.current) : g.create(o.params._id, e.current);
|
@@ -54,10 +53,10 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
54
53
|
}
|
55
54
|
});
|
56
55
|
}
|
57
|
-
return (h, u) => (i(), s("div",
|
56
|
+
return (h, u) => (i(), s("div", j, [
|
58
57
|
a(d, { class: "flex-nowrap flex-v-center flex" }, {
|
59
58
|
default: r(() => [
|
60
|
-
c("h1",
|
59
|
+
c("h1", G, q(b(o).params.product ? e.current.name : "Create Product"), 1),
|
61
60
|
b(o).params.product ? (i(), y($, {
|
62
61
|
key: 0,
|
63
62
|
submit: I,
|
@@ -97,7 +96,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
97
96
|
]),
|
98
97
|
_: 1
|
99
98
|
}),
|
100
|
-
c("div",
|
99
|
+
c("div", H, [
|
101
100
|
a(d, { title: "Profile" }, {
|
102
101
|
default: r(() => [
|
103
102
|
a(F, {
|
@@ -119,7 +118,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
119
118
|
}]
|
120
119
|
}, {
|
121
120
|
default: r(() => [
|
122
|
-
(i(!0), s(m, null, f(
|
121
|
+
(i(!0), s(m, null, f(M.all, (t, n) => (i(), y(R, {
|
123
122
|
label: t.name,
|
124
123
|
name: "categories",
|
125
124
|
value: t.url,
|
@@ -156,7 +155,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
156
155
|
placeholder: "Значение параметра",
|
157
156
|
class: "w-100 bg-white radius-small pd-medium"
|
158
157
|
}, null, 8, ["field", "onUpdate:field"]),
|
159
|
-
c("div",
|
158
|
+
c("div", J, [
|
160
159
|
a(k, {
|
161
160
|
onClick: () => e.current.information.splice(n, 1),
|
162
161
|
class: "i-medium"
|
@@ -191,7 +190,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
191
190
|
placeholder: "Значение параметра",
|
192
191
|
class: "w-100 bg-white radius-small pd-medium"
|
193
192
|
}, null, 8, ["field", "onUpdate:field"]),
|
194
|
-
c("div",
|
193
|
+
c("div", K, [
|
195
194
|
a(k, {
|
196
195
|
onClick: () => e.current.localization.splice(n, 1),
|
197
196
|
class: "i-medium"
|
@@ -227,7 +226,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
227
226
|
placeholder: "Discount",
|
228
227
|
class: "w-100 bg-white radius-small pd-medium"
|
229
228
|
}, null, 8, ["field", "onUpdate:field"]),
|
230
|
-
c("div",
|
229
|
+
c("div", W, [
|
231
230
|
a(k, {
|
232
231
|
onClick: () => e.current.quantityDiscount.splice(n, 1),
|
233
232
|
class: "i-medium"
|
@@ -264,7 +263,7 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
264
263
|
}]
|
265
264
|
}, {
|
266
265
|
default: r(() => [
|
267
|
-
c("div",
|
266
|
+
c("div", X, [
|
268
267
|
(i(!0), s(m, null, f(e.current.ingredients, (t, n) => (i(), y(z, {
|
269
268
|
key: t._id,
|
270
269
|
product: t,
|
@@ -288,5 +287,5 @@ const M = { class: "for-transition w-100 cols-1 pd-thin gap-thin" }, j = { class
|
|
288
287
|
}
|
289
288
|
};
|
290
289
|
export {
|
291
|
-
|
290
|
+
be as default
|
292
291
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/store/auth.cjs"),l=require("../../store/products.cjs"),f={class:"pd-thin"},y={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},g=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),q={class:"cols-2-1_3 bg-grey pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=c.useRoute(),n=c.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",y,[g,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>l.actions.read(o),state:l.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
|
@@ -1,28 +1,29 @@
|
|
1
|
-
import { ref as _, watch as
|
1
|
+
import { ref as _, watch as f, openBlock as i, createElementBlock as l, unref as t, createElementVNode as n, createCommentVNode as m, createBlock as p, createVNode as c, withCtx as b, Fragment as v, renderList as y } from "vue";
|
2
2
|
import { useRoute as g, useRouter as q } from "vue-router";
|
3
3
|
import P from "../../../../components/Tab/Tab.vue2.js";
|
4
|
-
import
|
5
|
-
import
|
4
|
+
import $ from "../../../../components/Feed/Feed.vue.js";
|
5
|
+
import k from "../sections/FilterProducts.vue.js";
|
6
6
|
import C from "../../../globals/components/blocks/BlockSearch.vue.js";
|
7
7
|
import w from "../blocks/CardProduct.vue.js";
|
8
|
-
import {
|
9
|
-
|
8
|
+
import { state as x } from "../../../auth/store/auth.js";
|
9
|
+
import { actions as z, state as N } from "../../store/products.js";
|
10
|
+
const A = { class: "pd-thin" }, B = {
|
10
11
|
key: 0,
|
11
12
|
class: "mn-b-medium flex-v-center flex-nowrap flex"
|
12
|
-
},
|
13
|
+
}, E = /* @__PURE__ */ n("h2", { class: "mn-r-medium" }, "Products", -1), O = { class: "cols-2-1_3 bg-grey pd-thin radius-big gap-thin" }, J = {
|
13
14
|
__name: "Products",
|
14
|
-
setup(
|
15
|
+
setup(V) {
|
15
16
|
const e = g(), d = q(), a = _(e.query.tabProducts ? e.query.tabProducts : "all");
|
16
|
-
e.query.tabProducts = a.value,
|
17
|
+
e.query.tabProducts = a.value, f(a, (s) => {
|
17
18
|
d.replace({ query: { ...e.query, tabProducts: s } });
|
18
19
|
});
|
19
20
|
function h(s) {
|
20
21
|
let r = { ...e.query };
|
21
22
|
r.search = s, d.push({ query: r });
|
22
23
|
}
|
23
|
-
return (s, r) => (i(), l("div",
|
24
|
-
t(e).name !== "Organization" ? (i(), l("header",
|
25
|
-
|
24
|
+
return (s, r) => (i(), l("div", A, [
|
25
|
+
t(e).name !== "Organization" ? (i(), l("header", B, [
|
26
|
+
E,
|
26
27
|
n("button", {
|
27
28
|
onClick: r[0] || (r[0] = (o) => s.$router.push({
|
28
29
|
name: "ProductAdd"
|
@@ -42,15 +43,15 @@ const N = { class: "pd-thin" }, A = {
|
|
42
43
|
],
|
43
44
|
class: "mn-b-small o-hidden h5 radius-big bg-grey"
|
44
45
|
}, null, 8, ["selected"])) : m("", !0),
|
45
|
-
n("div",
|
46
|
-
c(
|
46
|
+
n("div", O, [
|
47
|
+
c(k),
|
47
48
|
n("div", null, [
|
48
49
|
c(C, {
|
49
50
|
onSearch: h,
|
50
51
|
placeholder: "Enter product name",
|
51
52
|
class: "bg-white mn-b-thin"
|
52
53
|
}),
|
53
|
-
c(
|
54
|
+
c($, {
|
54
55
|
states: {
|
55
56
|
empty: {
|
56
57
|
title: "No Products Found",
|
@@ -58,8 +59,8 @@ const N = { class: "pd-thin" }, A = {
|
|
58
59
|
}
|
59
60
|
},
|
60
61
|
store: {
|
61
|
-
read: (o) =>
|
62
|
-
state:
|
62
|
+
read: (o) => z.read(o),
|
63
|
+
state: N
|
63
64
|
},
|
64
65
|
options: {
|
65
66
|
limit: 15,
|
@@ -73,21 +74,22 @@ const N = { class: "pd-thin" }, A = {
|
|
73
74
|
},
|
74
75
|
class: "cols-4 gap-thin"
|
75
76
|
}, {
|
76
|
-
default:
|
77
|
+
default: b(({
|
77
78
|
items: o
|
78
79
|
}) => [
|
79
80
|
(i(!0), l(v, null, y(o, (u) => (i(), p(w, {
|
80
81
|
key: u._id,
|
81
82
|
product: u,
|
83
|
+
user: x.access,
|
82
84
|
class: "h-max",
|
83
|
-
onClickCapture: (
|
85
|
+
onClickCapture: (F) => s.$router.push({
|
84
86
|
name: "Product Organization",
|
85
87
|
params: {
|
86
88
|
_id: t(e).params._id,
|
87
89
|
product: u._id
|
88
90
|
}
|
89
91
|
})
|
90
|
-
}, null, 8, ["product", "onClickCapture"]))), 128))
|
92
|
+
}, null, 8, ["product", "user", "onClickCapture"]))), 128))
|
91
93
|
]),
|
92
94
|
_: 1
|
93
95
|
}, 8, ["store", "options"])
|
@@ -97,5 +99,5 @@ const N = { class: "pd-thin" }, A = {
|
|
97
99
|
}
|
98
100
|
};
|
99
101
|
export {
|
100
|
-
|
102
|
+
J as default
|
101
103
|
};
|
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.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.
|
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.vue2.cjs");const r=require("../../../../components/Field/Field.vue.cjs"),u=require("../../../../components/Select/Select.vue.cjs"),i={__name:"EditProductInfo",props:{product:Object},setup(e){return(a,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(u.default,{select:e.product.status,"onUpdate:select":l[0]||(l[0]=t=>e.product.status=t),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":l[1]||(l[1]=t=>e.product.name=t),label:"Name",placeholder:"Введите название",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":l[3]||(l[3]=t=>e.product.price=t),label:"Price",placeholder:"Введите цену",class:"w-100 mn-b-small bg-white radius-small pd-medium",type:"number"},{default:d.withCtx(()=>[d.createVNode(u.default,{select:e.product.price.currency,"onUpdate:select":l[2]||(l[2]=t=>e.product.price.currency=t),placeholder:"฿",options:["฿"],class:"pos-relative bg-grey pd-thin radius-thin"},null,8,["select"])]),_:1},8,["field"]),d.createVNode(r.default,{field:e.product.description,"onUpdate:field":l[4]||(l[4]=t=>e.product.description=t),label:"Description",placeholder:"Введите описание",class:"w-100 bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])],64))}};exports.default=i;
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { openBlock as a, createElementBlock as u, Fragment as o, createVNode as
|
|
2
2
|
import "../../../../components/Loader/Loader.vue.js";
|
3
3
|
import "../../../../components/Button/Button.vue2.js";
|
4
4
|
import i from "../../../../components/Field/Field.vue.js";
|
5
|
-
import r from "../../../../components/Select/Select.
|
5
|
+
import r from "../../../../components/Select/Select.vue.js";
|
6
6
|
const w = {
|
7
7
|
__name: "EditProductInfo",
|
8
8
|
props: {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),i=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(l(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),e.search&&(r.search=e.search),r.sort="createdAt",r.skip=e.skip,r.limit=e.limit;try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}},d={resetProduct(e){t.current={recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}};function l(e,r){t[r]=e}const m={};n.watch(t,(e,r)=>{});exports.actions=u;exports.getters=m;exports.mutations=d;exports.state=t;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { reactive as n, watch as u } from "vue";
|
2
2
|
import o from "../../../../node_modules/axios/lib/axios.js";
|
3
3
|
import { setError as i } from "../../globals/store/globals.js";
|
4
|
-
const
|
4
|
+
const s = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
|
5
5
|
all: [],
|
6
6
|
current: {
|
7
7
|
recommendation: !1,
|
@@ -21,64 +21,64 @@ const c = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = n
|
|
21
21
|
description: ""
|
22
22
|
}
|
23
23
|
}), f = {
|
24
|
-
async create(e,
|
24
|
+
async create(e, t) {
|
25
25
|
const a = {
|
26
|
-
...
|
26
|
+
...t,
|
27
27
|
organization: e
|
28
28
|
};
|
29
|
-
return await
|
30
|
-
(
|
31
|
-
(
|
29
|
+
return await s.post("/api/products/create", a).then(
|
30
|
+
(c) => (d(c.data, "current"), Promise.resolve(c.data)),
|
31
|
+
(c) => (i(c), Promise.reject(c))
|
32
32
|
);
|
33
33
|
},
|
34
34
|
async read(e = {}) {
|
35
|
-
let
|
36
|
-
e._id && (
|
35
|
+
let t = {};
|
36
|
+
e._id && (t._id = e._id), e.category && (t.category = e.category), e.organization && (t.organization = e.organization), e.count && (t.count = e.count), e.categories && (t.categories = e.categories), e.prices && (t.prices = e.prices), e.delivery && (t.delivery = e.delivery), e.status && (t.status = e.status), e.search && (t.search = e.search), t.sort = "createdAt", t.skip = e.skip, t.limit = e.limit;
|
37
37
|
try {
|
38
|
-
const a = await
|
39
|
-
return e._id ? (
|
38
|
+
const a = await s.get("/api/products/read", { params: t });
|
39
|
+
return e._id ? (r.current = { ...a.data[0] }, Promise.resolve(a.data[0])) : Promise.resolve(a.data);
|
40
40
|
} catch (a) {
|
41
41
|
return i(a), Promise.reject(a);
|
42
42
|
}
|
43
43
|
},
|
44
|
-
async update(e,
|
45
|
-
return await
|
44
|
+
async update(e, t) {
|
45
|
+
return await s.post("/api/products/" + e, t).then(
|
46
46
|
(a) => Promise.resolve(a.data),
|
47
47
|
(a) => (i(a), Promise.reject(a))
|
48
48
|
);
|
49
49
|
},
|
50
50
|
async deleteProduct(e) {
|
51
|
-
return await
|
52
|
-
(
|
53
|
-
(
|
51
|
+
return await s.delete("/api/products/" + e).then(
|
52
|
+
(t) => Promise.resolve(t.data),
|
53
|
+
(t) => (i(t), Promise.reject(t))
|
54
54
|
);
|
55
55
|
},
|
56
56
|
async submitMood(e = null) {
|
57
|
-
return
|
58
|
-
(
|
59
|
-
(
|
57
|
+
return s.post("/api/product/recommended", { mood: e }).then(
|
58
|
+
(t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
|
59
|
+
(t) => (i(t), Promise.reject(t))
|
60
60
|
);
|
61
61
|
},
|
62
62
|
async fetchProducts() {
|
63
|
-
return await
|
64
|
-
(e) => (
|
63
|
+
return await s.get("/api/products/read").then(
|
64
|
+
(e) => (r.all = e.data, Promise.resolve(e.data)),
|
65
65
|
(e) => (i(e), Promise.reject(e))
|
66
66
|
);
|
67
67
|
},
|
68
68
|
async fetchProductsPopular() {
|
69
|
-
return await
|
70
|
-
(e) => (
|
69
|
+
return await s.get("/api/products/popular").then(
|
70
|
+
(e) => (r.popular = e.data, Promise.resolve(e.data)),
|
71
71
|
(e) => (i(e), Promise.reject(e))
|
72
72
|
);
|
73
73
|
},
|
74
74
|
async fetchProductsPublished() {
|
75
|
-
return await
|
75
|
+
return await s.get("/api/products").then(
|
76
76
|
(e) => {
|
77
|
-
let
|
77
|
+
let t = e.data.filter(function(a, c) {
|
78
78
|
return a.status !== "unpublished";
|
79
79
|
});
|
80
|
-
return
|
81
|
-
return a[
|
80
|
+
return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, c) {
|
81
|
+
return a[r.sort.current] > c[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < c[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
|
82
82
|
}), Promise.resolve(e.data);
|
83
83
|
},
|
84
84
|
(e) => (i(e), Promise.reject(e))
|
@@ -86,27 +86,48 @@ const c = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = n
|
|
86
86
|
},
|
87
87
|
async fetchProduct(e) {
|
88
88
|
try {
|
89
|
-
const
|
90
|
-
return
|
91
|
-
} catch (
|
92
|
-
return i(
|
89
|
+
const t = await s.get("/api/products/" + e);
|
90
|
+
return r.current = t.data[0], Promise.resolve(t.data[0]);
|
91
|
+
} catch (t) {
|
92
|
+
return i(t), Promise.reject(t);
|
93
93
|
}
|
94
94
|
},
|
95
95
|
async fetchProductPopular() {
|
96
|
-
return await
|
97
|
-
(e) => (
|
96
|
+
return await s.get("/api/products").then(
|
97
|
+
(e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
|
98
98
|
(e) => (i(e), Promise.reject(e))
|
99
99
|
);
|
100
100
|
}
|
101
|
+
}, g = {
|
102
|
+
resetProduct(e) {
|
103
|
+
r.current = {
|
104
|
+
recommendation: !1,
|
105
|
+
category: [],
|
106
|
+
status: "unpublished",
|
107
|
+
information: [],
|
108
|
+
images: [],
|
109
|
+
files: [],
|
110
|
+
image3d: !1,
|
111
|
+
name: "",
|
112
|
+
sale: 0,
|
113
|
+
price: 0,
|
114
|
+
localization: [],
|
115
|
+
modifications: [],
|
116
|
+
quantityDiscount: [],
|
117
|
+
ingredients: [],
|
118
|
+
description: ""
|
119
|
+
};
|
120
|
+
}
|
101
121
|
};
|
102
|
-
function d(e,
|
103
|
-
t
|
122
|
+
function d(e, t) {
|
123
|
+
r[t] = e;
|
104
124
|
}
|
105
|
-
const
|
106
|
-
u(
|
125
|
+
const p = {};
|
126
|
+
u(r, (e, t) => {
|
107
127
|
});
|
108
128
|
export {
|
109
129
|
f as actions,
|
110
|
-
|
111
|
-
|
130
|
+
p as getters,
|
131
|
+
g as mutations,
|
132
|
+
r as state
|
112
133
|
};
|
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.vue.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue.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,7 +1,7 @@
|
|
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
2
|
import _ from "../../../../components/Popup/Popup.vue.js";
|
3
3
|
import v from "../../../../components/Button/Button.vue.js";
|
4
|
-
import w from "../../../../components/Select/Select.
|
4
|
+
import w from "../../../../components/Select/Select.vue.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 = {
|
7
7
|
__name: "FormReport",
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue.cjs"),d=require("../../../../components/Map/Map.vue.cjs");require("./CardSpot.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue.cjs"),d=require("../../../../components/Map/Map.vue.cjs");require("./CardSpot.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-1208d443"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden pos-relative cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),y=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),v={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(o,n)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{apiKey:o.GOOGLE_MAPS_API_KEY,location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},class:""},null,8,["apiKey","location"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:n[0]||(n[0]=s=>o.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:n[1]||(n[1]=s=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:n[2]||(n[2]=s=>o.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,o.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(a.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),y,o.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(a.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},b=c.default(v,[["__scopeId","data-v-1208d443"]]);exports.default=b;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { openBlock as n, createElementBlock as u, createVNode as r, createElementVNode as
|
2
|
-
import
|
1
|
+
import { openBlock as n, createElementBlock as u, createVNode as r, createElementVNode as i, toDisplayString as l, createBlock as p, createCommentVNode as d, pushScopeId as h, popScopeId as g } from "vue";
|
2
|
+
import y from "../../../icons/navigation/IconEdit.vue.js";
|
3
3
|
import c from "../../../../components/Chips/Chips.vue.js";
|
4
|
-
import
|
4
|
+
import f from "../../../../components/Map/Map.vue.js";
|
5
5
|
import "./CardSpot.vue2.js";
|
6
|
-
import
|
7
|
-
const m = (t) => (h("data-v-
|
6
|
+
import v from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
7
|
+
const m = (t) => (h("data-v-1208d443"), t = t(), g(), t), $ = { class: "radius-big o-hidden pos-relative cols-2-1_3" }, b = { class: "pd-medium w-100" }, k = ["innerHTML"], S = { class: "d-block p-big mn-b-semi" }, z = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Delivery:", -1)), C = /* @__PURE__ */ m(() => /* @__PURE__ */ i("h4", null, "Accepted Payment:", -1)), w = {
|
8
8
|
__name: "CardSpot",
|
9
9
|
props: {
|
10
10
|
spot: Object,
|
@@ -12,14 +12,15 @@ const m = (t) => (h("data-v-5d50688e"), t = t(), g(), t), b = { class: "radius-b
|
|
12
12
|
},
|
13
13
|
setup(t) {
|
14
14
|
const s = t;
|
15
|
-
return (
|
16
|
-
r(
|
15
|
+
return (o, e) => (n(), u("div", $, [
|
16
|
+
r(f, {
|
17
|
+
apiKey: o.GOOGLE_MAPS_API_KEY,
|
17
18
|
location: { lat: t.spot.location.coordinates[1], lng: t.spot.location.coordinates[0] },
|
18
19
|
class: ""
|
19
|
-
}, null, 8, ["location"]),
|
20
|
-
|
21
|
-
r(
|
22
|
-
onClick:
|
20
|
+
}, null, 8, ["apiKey", "location"]),
|
21
|
+
i("div", b, [
|
22
|
+
r(y, {
|
23
|
+
onClick: e[0] || (e[0] = (a) => o.$router.push({
|
23
24
|
name: "Spot Edit",
|
24
25
|
params: {
|
25
26
|
_id: s.organization._id,
|
@@ -28,30 +29,30 @@ const m = (t) => (h("data-v-5d50688e"), t = t(), g(), t), b = { class: "radius-b
|
|
28
29
|
})),
|
29
30
|
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
30
31
|
}),
|
31
|
-
|
32
|
-
onClick:
|
32
|
+
i("p", {
|
33
|
+
onClick: e[1] || (e[1] = (a) => o.$router.push(`/app/organization/${s.organization._id}/spots/${t.spot._id}`)),
|
33
34
|
class: "pd-thin bg-white radius-small mn-b-thin p-small w-max"
|
34
35
|
}, l(t.spot.address), 1),
|
35
|
-
|
36
|
-
onClick:
|
36
|
+
i("h3", {
|
37
|
+
onClick: e[2] || (e[2] = (a) => o.$router.push(`/app/organization/${s.organization._id}/spots/${t.spot._id}`)),
|
37
38
|
class: "mn-b-thin w-100",
|
38
39
|
innerHTML: t.spot.profile.name
|
39
40
|
}, null, 8, k),
|
40
|
-
|
41
|
-
|
42
|
-
|
41
|
+
i("p", S, l(t.spot.profile.description), 1),
|
42
|
+
z,
|
43
|
+
o.type !== "short" && t.spot.delivery.length > 0 ? (n(), p(c, {
|
43
44
|
key: 0,
|
44
45
|
chips: t.spot.delivery
|
45
46
|
}, null, 8, ["chips"])) : d("", !0),
|
46
|
-
|
47
|
-
|
47
|
+
C,
|
48
|
+
o.type !== "short" && t.spot.payment.length > 0 ? (n(), p(c, {
|
48
49
|
key: 1,
|
49
50
|
chips: t.spot.payment
|
50
51
|
}, null, 8, ["chips"])) : d("", !0)
|
51
52
|
])
|
52
53
|
]));
|
53
54
|
}
|
54
|
-
},
|
55
|
+
}, K = /* @__PURE__ */ v(w, [["__scopeId", "data-v-1208d443"]]);
|
55
56
|
export {
|
56
|
-
|
57
|
+
K as default
|
57
58
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),r={class:"flex-v-center flex-nowrap flex"},a=["src"],
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),r={class:"flex-v-center flex-nowrap flex"},a=["src"],c={class:"h4"},d={class:"mn-r-small"},s={key:2,class:"mn-l-auto flex-v-center flex"},m={key:0,class:"flex-child flex-child-shrink-0 capitalize w-max t-medium radius-big pd-b-nano pd-t-nano pd-r-thin pd-l-thin bg-main"},u={__name:"CardUser",props:{_id:{type:String,default:null},user:{type:Object,required:!0},action:{type:Object},photo:{type:String,default:null},name:{type:String,default:"No name"},role:{type:String},phone:{type:String},email:{type:String}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",r,[t.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.photo,class:"radius-medium bg-white object-fit-cover mn-r-thin i-thin",onClick:i[0]||(i[0]=e.withModifiers(o=>n.$router.push({name:t.user.type==="user"?"User Profile":"Organization",params:{_id:t.user._id}}),["stop"]))},null,8,a)):e.createCommentVNode("",!0),t.photo?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:i[1]||(i[1]=e.withModifiers(o=>n.$router.push({name:"User Profile",params:{_id:t.user._id||t._id}}),["stop"]))})),e.createElementVNode("div",null,[e.createElementVNode("p",c,e.toDisplayString(t.name),1),e.createElementVNode("span",d,e.toDisplayString(t.phone||t.email),1)]),t.action||t.role?(e.openBlock(),e.createElementBlock("div",s,[t.role?(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(t.role),1)):e.createCommentVNode("",!0),t.action?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:i[2]||(i[2]=e.withModifiers((...o)=>t.action.method&&t.action.method(...o),["stop"])),class:"h-100 w-2r t-white mn-l-thin capitalize t-medium radius-big bg-red"},e.toDisplayString(t.action.label),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}};exports.default=u;
|