@ozdao/prometheus-framework 0.2.92 → 0.2.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +14 -6
- package/dist/events.server.mjs +14 -6
- package/dist/main-CX2ISR43.mjs +13629 -0
- package/dist/main-cffh4bbv.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +32 -18
- package/dist/orders.server.mjs +32 -18
- package/dist/organizations.server.js +2 -1
- package/dist/organizations.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +46 -46
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +16 -17
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CQQEUA9l.js +1 -0
- package/dist/web-D2Em-p-C.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +23 -34
- package/src/components/LocationMarker/LocationMarker.vue +6 -1
- package/src/components/LocationSelection/LocationSelection.vue +4 -0
- package/src/components/Map/Map.vue +29 -15
- package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
- package/src/modules/events/controllers/events.controller.js +4 -4
- package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
- package/src/modules/landing/components/pages/Farming.vue +226 -0
- package/src/modules/landing/components/pages/Governance.vue +3 -5
- package/src/modules/landing/components/pages/Home.vue +0 -3
- package/src/modules/landing/components/pages/Hotel.vue +1 -3
- package/src/modules/landing/components/pages/Page.vue +0 -3
- package/src/modules/landing/components/sections/Examples.vue +4 -56
- package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
- package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
- package/src/modules/landing/router/landing.js +11 -0
- package/src/modules/marketplace/components/sections/Filters.vue +26 -23
- package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
- package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
- package/src/modules/orders/components/pages/Order.vue +2 -6
- package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
- package/src/modules/orders/components/pages/Orders.vue +60 -11
- package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +29 -18
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +1 -1
- package/src/modules/orders/router/orders.router.js +2 -2
- package/src/modules/orders/store/orders.js +3 -7
- package/src/modules/orders/store/shopcart.js +1 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
- package/src/modules/organizations/components/pages/Department.vue +5 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
- package/src/modules/organizations/components/pages/Members.vue +2 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +3 -1
- package/src/modules/organizations/store/memberships.js +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +2 -3
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- package/src/modules/products/store/products.js +25 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
- package/src/modules/users/components/blocks/CardUser.vue +1 -0
- package/src/modules/landing/components/sections/AboutSection.vue +0 -69
package/dist/prometheus-framework/src/modules/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.vue.cjs"),g=require("../../../../components/Select/Select.vue.cjs"),d=require("../../../../components/Field/Field.vue.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.
|
5
|
-
import E from "../../../../components/Select/Select.
|
6
|
-
import i from "../../../../components/Field/Field.
|
4
|
+
import S from "../../../../components/Button/Button.vue.js";
|
5
|
+
import E from "../../../../components/Select/Select.vue.js";
|
6
|
+
import i from "../../../../components/Field/Field.vue.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"),N=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"),N=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/Feed/Feed.vue.cjs"),C=require("../../../../components/Select/Select.vue.cjs"),q=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const P=require("../blocks/CardPosition.vue.cjs"),V=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),v=require("vue-router"),p=require("../../../globals/store/globals.cjs"),x=require("../../../auth/store/auth.cjs"),t=require("../../store/leftovers.cjs"),m=require("../../store/products.cjs");require("./EditLeftover.vue2.cjs");const E={class:"pd-thin"},B={class:"mn-b-medium gap-small flex-v-center flex-nowrap flex"},S={class:""},D=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),L={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},R={class:"gap-thin flex-v-center flex-nojustify flex"},F={class:"mn-r-auto"},O={__name:"EditLeftover",setup(z){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 _(){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 g(){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:x.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",E,[e.createElementVNode("header",B,[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(()=>[D,e.createElementVNode("div",L,[e.createVNode(w.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(V.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:()=>_()}],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(N.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",R,[e.createElementVNode("h3",F," 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=>g())}," 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=O;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as h, computed as z, onMounted as E, openBlock as l, createElementBlock as p, 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 A from "../../../../components/Field/Field.
|
3
|
+
import A from "../../../../components/Field/Field.vue.js";
|
4
4
|
import B from "../../../../components/Feed/Feed.vue.js";
|
5
|
-
import F from "../../../../components/Select/Select.
|
5
|
+
import F from "../../../../components/Select/Select.vue.js";
|
6
6
|
import I from "../../../../components/Popup/Popup.vue.js";
|
7
7
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
8
8
|
import O from "../blocks/CardPosition.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 s=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 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;
|
@@ -5,21 +5,21 @@ 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 p from "../../../../components/Field/Field.
|
8
|
+
import p from "../../../../components/Field/Field.vue.js";
|
9
9
|
import R from "../../../../components/Checkbox/Checkbox.vue.js";
|
10
|
-
import $ from "../../../../components/Button/Button.
|
10
|
+
import $ from "../../../../components/Button/Button.vue.js";
|
11
11
|
import S from "../../../../components/Popup/Popup.vue.js";
|
12
12
|
import T from "../../../../components/EditImages/EditImages.vue.js";
|
13
13
|
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/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.vue.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.vue.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.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
@@ -1,8 +1,8 @@
|
|
1
1
|
import { openBlock as a, createElementBlock as u, Fragment as o, createVNode as d, withCtx as s } from "vue";
|
2
2
|
import "../../../../components/Loader/Loader.vue.js";
|
3
|
-
import "../../../../components/Button/Button.
|
4
|
-
import i from "../../../../components/Field/Field.
|
5
|
-
import r from "../../../../components/Select/Select.
|
3
|
+
import "../../../../components/Button/Button.vue2.js";
|
4
|
+
import i from "../../../../components/Field/Field.vue.js";
|
5
|
+
import r from "../../../../components/Select/Select.vue.js";
|
6
6
|
const w = {
|
7
7
|
__name: "EditProductInfo",
|
8
8
|
props: {
|
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.vue.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"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey 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-grey-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",y,[e.createElementVNode("div",b,[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-grey 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 y, openBlock as t, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as o, toDisplayString as s, unref as l, createVNode as g, Fragment as v, 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.vue.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";
|
@@ -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;
|