@ozdao/prometheus-framework 0.1.67 → 0.1.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-59a591ab.js +1 -0
- package/dist/BackofficeGallery-be6f69a9.mjs +307 -0
- package/dist/BackofficeReports-06166952.js +1 -0
- package/dist/BackofficeReports-50fd799c.mjs +44 -0
- package/dist/BlockTags-00325fa0.mjs +853 -0
- package/dist/BlockTags-58f95c8a.js +1 -0
- package/dist/ButtonToggleMembership-84d0e018.mjs +90 -0
- package/dist/ButtonToggleMembership-b905812f.js +1 -0
- package/dist/CardBlogpost-1b81b54e.mjs +246 -0
- package/dist/CardBlogpost-7107e04a.js +1 -0
- package/dist/CardOrganization-49ab5190.mjs +234 -0
- package/dist/CardOrganization-e6ac27f1.js +1 -0
- package/dist/CardProduct-4c0cb9a1.js +1 -0
- package/dist/CardProduct-ea0e1f84.mjs +192 -0
- package/dist/Chips-817cf959.js +1 -0
- package/dist/Chips-8c836ba6.mjs +213 -0
- package/dist/Community-8c4e011b.js +1 -0
- package/dist/Community-bd6f0cbb.mjs +131 -0
- package/dist/Dashboard-73b50724.js +1 -0
- package/dist/Dashboard-bc81b5f6.mjs +151 -0
- package/dist/Dropdown-60e3dc6c.js +1 -0
- package/dist/Dropdown-d1c81d45.mjs +169 -0
- package/dist/EditOrder-2b746caf.mjs +221 -0
- package/dist/EditOrder-e632f0cc.js +1 -0
- package/dist/Events-999cc8ed.js +1 -0
- package/dist/Events-ad8bbf27.mjs +134 -0
- package/dist/Feed-35e13c22.mjs +156 -0
- package/dist/Feed-53d96b18.mjs +361 -0
- package/dist/Feed-694a2fad.js +1 -0
- package/dist/Feed-ac4bb6ea.js +1 -0
- package/dist/Feed-d1d01771.js +1 -0
- package/dist/Feed-f7c04014.mjs +124 -0
- package/dist/Image-61cfd52d.js +9 -0
- package/dist/Image-e8be4acc.mjs +480 -0
- package/dist/LeftoverAdd-a268a95c.js +1 -0
- package/dist/LeftoverAdd-e4d93760.mjs +229 -0
- package/dist/Leftovers-6976802d.mjs +135 -0
- package/dist/Leftovers-d8f1d152.js +1 -0
- package/dist/Members-aeb2bca1.mjs +109 -0
- package/dist/Members-b9664e83.js +1 -0
- package/dist/Menu-93d34d9f.js +1 -0
- package/dist/Menu-eaf6b44c.mjs +13 -0
- package/dist/MenuItem-4a5881bd.mjs +85 -0
- package/dist/MenuItem-f35cad93.js +1 -0
- package/dist/Orders-8bc8963c.js +1 -0
- package/dist/Orders-eb262d8c.mjs +75 -0
- package/dist/Organizations-9926aa51.mjs +72 -0
- package/dist/Organizations-c653d814.js +1 -0
- package/dist/Payments-98328000.js +1 -0
- package/dist/Payments-a9066cdf.mjs +11 -0
- package/dist/Popup-0d8e1392.mjs +96 -0
- package/dist/Popup-eb11fa82.js +1 -0
- package/dist/Product-15043af7.mjs +651 -0
- package/dist/Product-82c022a4.js +7 -0
- package/dist/ProductEdit-05da9866.mjs +258 -0
- package/dist/ProductEdit-2f075296.js +1 -0
- package/dist/ProductsBackoffice-8462f626.js +1 -0
- package/dist/ProductsBackoffice-8d0f0ee8.mjs +85 -0
- package/dist/ProfileBlogposts-43855cb9.js +1 -0
- package/dist/ProfileBlogposts-f32170a3.mjs +78 -0
- package/dist/ProfileEvents-54be2d43.mjs +69 -0
- package/dist/ProfileEvents-ab69e27e.js +1 -0
- package/dist/ProfileOrganizations-0787cf34.mjs +72 -0
- package/dist/ProfileOrganizations-eb62dde4.js +1 -0
- package/dist/Publics-8e726d20.mjs +45 -0
- package/dist/Publics-ae589bf1.js +1 -0
- package/dist/Select-95f4701a.js +1 -0
- package/dist/Select-dab17282.mjs +80 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js +1 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Socials-8193477c.mjs +189 -0
- package/dist/UploadImage-0e8e4278.mjs +83 -0
- package/dist/UploadImage-8c71bda6.js +1 -0
- package/dist/UploadImageMultiple-c34a6c6f.mjs +58 -0
- package/dist/UploadImageMultiple-d1316df5.js +1 -0
- package/dist/Wallet-727195d9.mjs +21700 -0
- package/dist/Wallet-f4dda407.js +10 -0
- package/dist/auth-04684a60.js +7 -0
- package/dist/auth-7e39361f.mjs +633 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +5 -5
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/auth.validation-d614130d.js +1 -0
- package/dist/auth.validation-f4bf1deb.mjs +24 -0
- package/dist/axios-33aeb810.mjs +1435 -0
- package/dist/axios-ceccf20e.js +5 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +20 -20
- package/dist/categories-7e17a7eb.js +1 -0
- package/dist/categories-b7f9e8c0.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +209 -202
- package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +24 -27
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +64 -40
- package/dist/leftovers-86e7d438.mjs +67 -0
- package/dist/leftovers-c9f70579.js +1 -0
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +6 -7
- package/dist/main.css +1 -1
- package/dist/memberships-559590ad.mjs +68 -0
- package/dist/memberships-58af22e0.js +1 -0
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
- package/dist/modules/products/components/sections/EditProductInfo.vue.d.ts +1 -5
- package/dist/orders-1325c51b.js +1 -0
- package/dist/orders-c7cbe706.mjs +85 -0
- package/dist/organizations-71777b32.js +1 -0
- package/dist/organizations-93f7b610.mjs +122 -0
- package/dist/organizations.client-6ca27fb3.js +3 -0
- package/dist/organizations.client-bd63a7b2.mjs +2997 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +56 -61
- package/dist/products-61d83d74.js +1 -0
- package/dist/products-7f1e5a75.mjs +108 -0
- 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 +67 -65
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +682 -690
- package/dist/reports-a67b4fb4.js +1 -0
- package/dist/reports-c579b02a.mjs +91 -0
- package/dist/reports.client.cjs +1 -1
- package/dist/reports.client.js +2 -2
- package/dist/states.validation-3b4604bc.mjs +13 -0
- package/dist/states.validation-9b43a097.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +279 -208
- package/package.json +30 -35
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Sidebar/Sidebar.vue +10 -8
- package/src/components/Upload/Upload.vue +8 -28
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/auth/controllers/auth.controller.js +1 -1
- package/src/modules/auth/store/auth.js +21 -24
- package/src/modules/backoffice/components/admin/ProductEdit.vue +2 -0
- package/src/modules/constructor/components/sections/Constructor.vue +7 -54
- package/src/modules/gallery/components/pages/Gallery.vue +7 -1
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +24 -8
- package/src/modules/gallery/gallery.client.js +5 -1
- package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -0
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +4 -3
- package/src/modules/products/components/blocks/CardLeftover.vue +0 -1
- package/src/modules/products/components/blocks/CardProduct.vue +15 -1
- package/src/modules/products/components/sections/EditProductInfo.vue +16 -14
- package/src/modules/products/components/sections/FilterProducts.vue +0 -2
- package/src/modules/products/components/sections/SectionProduct.vue +1 -0
- package/src/modules/products/components/sections/SortProducts.vue +2 -0
- package/src/modules/products/store/categories.js +9 -9
- package/src/modules/products/store/leftovers.js +6 -9
- package/src/modules/products/store/products.js +2 -0
- package/src/modules/users/components/pages/Profile.vue +3 -5
- package/src/modules/wallet/components/pages/Wallet.vue +1 -1
- package/src/styles/components/button.scss +253 -0
- package/src/styles/theme.scss +1 -0
- package/src/modules/constructor/components/elements/Audio.vue +0 -82
- package/src/modules/constructor/components/elements/Embed.vue +0 -85
- package/src/modules/globals/mixins/mixins.js +0 -52
- package/src/modules/globals/router/routerGuards.js +0 -28
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("./categories-7e17a7eb.js"),V=require("vue-router"),E=require("vue-i18n"),S=require("./carousel.es-cdfb392c.js"),b=require("./CardProduct-4c0cb9a1.js"),f=require("./products-61d83d74.js"),I=require("./Loader-21f016da.js"),w=require("./_plugin-vue_export-helper-f246444f.js"),M=require("./Popup-eb11fa82.js"),L=require("./IconEdit-c0469b45.js");require("./auth-04684a60.js");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./axios-ceccf20e.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");/**
|
2
|
+
* vue-meta v3.0.0-alpha.10
|
3
|
+
* (c) 2022
|
4
|
+
* - Pim (@pimlie)
|
5
|
+
* - All the amazing contributors
|
6
|
+
* @license MIT
|
7
|
+
*/const q=t=>t!==null&&typeof t=="object";function $(t,o,n){for(const a in o)a in n?q(t[a])?$(t[a],o[a],n[a]):o[a]!==n[a]&&(t[a]=o[a]):t[a]=o[a];for(const a in n)o&&a in o||delete t[a]}function x(t){if(t||(t=e.getCurrentInstance()||void 0),t)return t.appContext.config.globalProperties.$metaManager}function P(t,o){const n=e.getCurrentInstance()||void 0;if(!o&&n&&(o=x(n)),!o)throw new Error("No manager or current instance");e.isProxy(t)&&(e.watch(t,(s,r)=>{$(a.meta,s,r)}),t=t.value);const a=o.addMeta(t,n);return a}e.defineComponent({name:"Metainfo",inheritAttrs:!1,setup:(t,{slots:o})=>()=>{const n=x();if(n)return n.render({slots:o})}});const T={id:"popularProducts",class:"pd-thin"},D={class:"bg-grey radius-big pd-t-big pd-b-big"},R={class:"mn-semi t-center title"},z={class:""},O={__name:"PopularProducts",async setup(t){let o,n;V.useRouter(),[o,n]=e.withAsyncContext(()=>f.actions.read({limit:10})),await o,n();const a={messages:{en:{title:"Explore Hot Products 🔥",subtitle:"We attach great importance to high quality and customer satisfaction"},ru:{title:"Самое Горячее 🔥",subtitle:"Мы придаем большое значение высокому качеству товаров и удовлетворенности клиентов"}}},{t:s}=E.useI18n(a),r=e.ref(null),m={320:{itemsToShow:1},640:{itemsToShow:3},1024:{itemsToShow:3}};return e.onMounted(async()=>{setTimeout(()=>{r.value.updateSlideWidth()},500)}),(d,i)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",D,[e.createElementVNode("div",R,[e.createElementVNode("h2",z,e.toDisplayString(e.unref(s)("title")),1)]),e.createVNode(e.unref(S.Carousel),{ref_key:"myCarousel",ref:r,"items-to-show":3,transition:330,wrapAround:!0,autoplay:3e3,pauseAutoplayOnHover:!0,breakpoints:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.state.all,(l,u,h)=>(e.openBlock(),e.createBlock(e.unref(S.Slide),{class:"pd-thin",key:u},{default:e.withCtx(()=>[e.createVNode(b._sfc_main,{class:"carousel__item h-100 w-100",product:l},null,8,["product"])]),_:2},1024))),128))]),_:1},512)])]))}};const F={class:"product-360-viewer"},H=e.createStaticVNode('<svg class="pos-absolute z-index-2 pos-b-0 pd-small" width="73" height="50" viewBox="0 0 73 50" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6accd1fb><path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path><path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path><path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path><path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path></svg>',1),A={key:0,class:"h-100 w-100 transition-ease"},Z=["src"],j={__name:"Images360",props:{imagePath:{type:String,required:!0},imageCount:{type:Number,default:36},autoRotateSpeed:{type:Number,default:100}},setup(t){const o=t,n=e.ref(0),a=e.ref(!1),s=e.ref(0),r=e.ref(0);e.ref(!0);const m=async()=>{const p=[];for(let _=1;_<=o.imageCount;_++){const v=new Image;v.src=`${o.imagePath}/${_}.jpg`;try{await v.decode(),r.value++}catch(N){console.warn(`Failed to decode ${o.imagePath}/${_}.jpg:`,N)}p.push(v)}return p},d=e.computed(()=>Math.round(r.value/o.imageCount*100)),i=e.ref([]),l=e.ref(""),u=e.ref(null);e.watch(n,p=>{l.value=i.value[p]||""});function h(p){a.value=!0,s.value=p.clientX||p.touches[0].clientX}function C(p){if(!a.value)return;const _=p.clientX||p.touches[0].clientX,v=_-s.value;if(Math.abs(v)>=5){const N=v>0?1:-1;n.value=(n.value+N)%o.imageCount,n.value<0&&(n.value=o.imageCount-1),s.value=_}}function y(){a.value=!1}let g=null;const k=()=>{i.value=[]};return e.onMounted(async()=>{i.value=await m(),l.value=i.value[0]||""}),e.onUnmounted(()=>{clearInterval(g),k()}),(p,_)=>(e.openBlock(),e.createElementBlock("div",F,[H,e.createVNode(e.Transition,{name:"scale5",css:!u.value,appear:""},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",A,[l.value?(e.openBlock(),e.createElementBlock("img",{key:l.value,class:"h-100 w-100 transition-ease",src:(p.FILE_SERVER_URL||"")+l.value.src,alt:"360 product view",onMousedown:h,onMousemove:C,onMouseup:y,onMouseleave:y,onTouchstart:h,onTouchmove:C,onTouchend:y,onDragstart:_[0]||(_[0]=e.withModifiers(()=>{},["prevent"]))},null,40,Z)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1},8,["css"]),e.createVNode(e.Transition,{name:"scale5"},{default:e.withCtx(()=>[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I.Loader,{key:0,progress:e.unref(d),class:"center z-index-5"},null,8,["progress"]))]),_:1})]))}},X=w._export_sfc(j,[["__scopeId","data-v-6accd1fb"]]);const U=["src"],W={__name:"Magnifier",props:{imageSrc:String,zoomFactor:{type:Number,default:2}},setup(t){const o=t,n=e.ref(!1),a=e.ref({});function s(u){const h=u.target.getBoundingClientRect(),C=u.clientX-h.left,y=u.clientY-h.top,g=100,k=Math.max(0,Math.min(C-g/2,h.width-g)),p=Math.max(0,Math.min(y-g/2,h.height-g));a.value={left:`${k}px`,top:`${p}px`,backgroundPosition:`-${k*o.zoomFactor}px -${p*o.zoomFactor}px`,backgroundImage:`url(${o.imageSrc})`,backgroundSize:`${h.width*o.zoomFactor}px ${h.height*o.zoomFactor}px`}}function r(u){n.value=!0,s(u)}function m(){n.value=!1}function d(u){u.preventDefault(),n.value=!0,s(u.touches[0])}function i(u){u.preventDefault(),s(u.touches[0])}function l(){n.value=!1}return(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:"w-100 image-container",onMousemove:r,onMouseleave:m,onTouchstart:d,onTouchmove:i,onTouchend:l},[e.createElementVNode("img",{src:(u.FILE_SERVER_URL||"")+t.imageSrc,class:"w-100"},null,8,U),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"zoom-lens",style:e.normalizeStyle(a.value)},null,4)):e.createCommentVNode("",!0)],32))}},J=w._export_sfc(W,[["__scopeId","data-v-c3815eaf"]]);const Y={class:"product-images"},G={class:"no-responsive cols-4 thumbnails"},Q=["src","onClick"],K={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(t){const o=e.ref(!1),n=e.ref(0),a=r=>{n.value=r,o.value=!0},s=()=>{o.value=!1};return(r,m)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.images,(d,i)=>(e.openBlock(),e.createElementBlock("img",{key:i,src:(r.FILE_SERVER_URL||"")+d,onClick:l=>a(i),class:"radius-medium bg-white o-hidden thumbnail"},null,8,Q))),128))]),e.createVNode(M._sfc_main,{onClosePopup:s,isPopupOpen:o.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(J,{imageSrc:r.path+t.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},ee=w._export_sfc(K,[["__scopeId","data-v-732c99c3"]]),c=e.reactive({items:[],currentState:!1}),te={toggleShopcart(){c.currentState=!c.currentState},setShopcart(){try{localStorage.getItem("shopcart")&&(c.items=JSON.parse(localStorage.getItem("shopcart")))}catch(t){throw console.error(t),t}},addProductToCart(t){const o=c.items.find(n=>n._id===t._id);o?o.quantity++:c.items.push({_id:t._id,images:t.images,name:t.name,price:t.price,quantity:1}),localStorage.setItem("shopcart",JSON.stringify(c.items))},removeProduct(t){const o=c.items.find(a=>a._id===t),n=c.items.indexOf(o);n>-1&&(c.items.splice(n,1),localStorage.setItem("shopcart",JSON.stringify(c.items)))},decrementItemQuantity(t){const o=c.items.find(a=>a._id===t),n=c.items.indexOf(o);n>-1&&(o.quantity--,o.quantity<1&&c.items.splice(n,1),localStorage.setItem("shopcart",JSON.stringify(c.items)))},incrementItemQuantity(t){const o=c.items.find(n=>n._id===t);o&&(o.quantity++,localStorage.setItem("shopcart",JSON.stringify(c.items)))},resetShopcart({state:t}){t.items=[],localStorage.removeItem("shopcart")}};e.computed(()=>Number(c.items.reduce((t,o)=>t+o.price*o.quantity,0))),e.computed(()=>Number(c.items.reduce((t,o)=>t+o.quantity,0))),e.computed(()=>Number(c.currentState));e.watch(c,(t,o)=>{});const oe={class:"cols-2-1_2 gap-big product-data-wrapper"},ne={class:"flex-nowrap flex-column flex"},ae={class:"h-100 bg-white radius-medium o-hidden"},se=["src"],re={key:2,width:"524",height:"345",viewBox:"0 0 524 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"h-100 w-100",style:{"object-fit":"cover"}},ce=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),ie=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),le=e.createElementVNode("circle",{cx:"262",cy:"172",r:"56",fill:"#00ff88","fill-opacity":"0.1"},null,-1),de=e.createElementVNode("path",{fill:"#00ff88",d:"M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"},null,-1),ue=[ce,ie,le,de],me={class:"h-100 flex-justify flex col"},pe={key:0,class:"t-main t-semi p-big"},he={class:"w-100 h1-product mn-thin"},_e={key:1,class:"mn-semi"},fe={key:2,class:"w-100 mn-medium t-transp"},ge={key:3,class:"w-100 mn-medium t-transp"},ve={class:"cols-2 w-100 gap-small mn-semi"},ye={class:"w-100 pd-small radius-small bg-white product-information"},Ce={class:"t-demi"},ke={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},Ve=["disabled"],Ee={__name:"SectionProduct",props:{product:{type:Object,required:!0},recommendation:{type:String}},setup(t){const o=t,n=e.computed(()=>o.product.images),a={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:s}=E.useI18n(a);function r(d){return!(d.quantity>0)}function m(d){te.addProductToCart(d)}return(d,i)=>(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("div",ae,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(X,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),e.unref(n)[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 w-100",style:{"object-fit":"cover"},src:(d.FILE_SERVER_URL||"")+e.unref(n)[0]},null,8,se)):e.createCommentVNode("",!0),!e.unref(n)[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("svg",re,ue)):e.createCommentVNode("",!0)]),e.unref(n).length>1?(e.openBlock(),e.createBlock(ee,{key:0,images:e.unref(n),class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",me,[e.createVNode(L.IconEdit,{onClick:i[0]||(i[0]=l=>d.$router.push({name:"ProductEdit",params:{_id:t.product.organization,product:t.product._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),t.recommendation?(e.openBlock(),e.createElementBlock("h2",pe,e.toDisplayString(e.unref(s)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",he,e.toDisplayString(t.product.name),1),e.createVNode(b._sfc_main$1,{product:t.product,size:"big",class:"mn-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&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",fe,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",ge,e.toDisplayString(e.unref(s)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ve,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,l=>(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("p",Ce,e.toDisplayString(l.name),1),e.createElementVNode("p",null,e.toDisplayString(l.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ke,[e.createElementVNode("button",{disabled:r(t.product),onClick:i[1]||(i[1]=l=>m(t.product)),class:"w-100 mn-r-small bg-main button"},e.toDisplayString(e.unref(s)("addtoorder")),9,Ve)])])]))}};const Ne={class:"pd-t-zero pd-thin"},we={class:"bg-black t-white radius-big footer"},Se={id:"top-footer",class:"cols-3 section"},be={href:"mailto:hello@weeder.delivery",class:"w-100 radius-small contact col"},$e={class:"t-transp"},xe={class:"h4 mn-small"},Be=e.createElementVNode("div",{class:"store-buttons"},null,-1),Ie={href:"https://t.me/weeder_support",target:"_blank",class:"w-100 radius-small contact col"},Me={class:"h4 mn-small"},Le=e.createElementVNode("div",{class:"socials flex-nojustify flex"},[e.createElementVNode("a",{class:"mn-r-small",href:"https://t.me/weederdelivery",target:"_blank"}),e.createElementVNode("a",{class:"mn-r-small",href:"https://t.me/weederdelivery",target:"_blank"}),e.createElementVNode("a",{class:"mn-r-small",href:"https://t.me/weederdelivery",target:"_blank"})],-1),qe={class:"cols-3 section"},Pe={class:"lh-semi nav-footer col"},Te={class:"mn-small t-semi h5"},De={class:"mn-medium ol"},Re=["innerHTML"],ze=e.createElementVNode("a",{href:"https://ozdao.dev",target:"_blank"},null,-1),Oe={class:"lh-semi nav-footer col"},Fe={class:"mn-small t-semi h5"},He={class:"lh-semi col"},Ae={class:"mn-small t-semi h5"},Ze=e.createElementVNode("div",{class:"mn-medium"},[e.createElementVNode("li",null,"Phuket,"),e.createElementVNode("li",null,"43 283 Soi Boathouse,"),e.createElementVNode("li",null,"Rawai")],-1),je={class:"pd-small t-center br-top-dark copyright"},Xe={__name:"Footer",async setup(t){let o,n;V.useRouter(),[o,n]=e.withAsyncContext(()=>f.actions.fetchCategories()),await o,n();const a={locale:"en",messages:{en:{store:"Online Store",information:"Information",description:"Weeder Delivery stocks a wide range of quality!",app:"Get Our App",adress:"Adress",support:"Get Online Support",socials:"Find Us in Socials",email:"Contact by email",time:"24 / 7 Seven days a week",copyright:"2022 © Weeder Delivery. Proudly created with OZ DAO.",pages:[],categories:[]},ru:{store:"Онлайн Каталог",information:"Информация",description:"Weeder Delivery предлагает широкий ассортимент качественных!",app:"Скачайте Наше Приложение",adress:"Адрес",support:"Онлайн Поддержка",socials:"Найдите Нас в Социальных Сетях",email:"Связаться по email",time:"24 / 7 без перерывов",copyright:"2022 © Weeder Delivery. С гордостью создано OZ DAO.",pages:[],categories:[]}}};f.state.all.forEach(r=>{r.localization.forEach(m=>{a.messages[m.locale].categories.push(m.text)})});const{t:s}=E.useI18n(a);return(r,m)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("footer",we,[e.createElementVNode("div",Se,[e.createElementVNode("a",be,[e.createElementVNode("p",$e,e.toDisplayString(e.unref(s)("description")),1)]),e.createElementVNode("div",{onClick:m[0]||(m[0]=d=>this.$router.push({name:"Home"})),class:"flex-v-center flex logo-link col"},[e.createElementVNode("p",xe,e.toDisplayString(e.unref(s)("app")),1),Be]),e.createElementVNode("a",Ie,[e.createElementVNode("p",Me,e.toDisplayString(e.unref(s)("socials")),1),Le])]),e.createElementVNode("div",qe,[e.createElementVNode("ul",Pe,[e.createElementVNode("li",Te,e.toDisplayString(e.unref(s)("store")),1),e.createElementVNode("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.state.all,(d,i)=>(e.openBlock(),e.createElementBlock("li",null,[e.createElementVNode("span",{innerHTML:e.unref(s)("categories["+i+"]")},null,8,Re)]))),256))]),ze]),e.createElementVNode("ul",Oe,[e.createElementVNode("li",Fe,e.toDisplayString(e.unref(s)("information")),1)]),e.createElementVNode("ul",He,[e.createElementVNode("li",Ae,e.toDisplayString(e.unref(s)("email")),1),Ze])]),e.createElementVNode("p",je,e.toDisplayString(e.unref(s)("copyright")),1)])]))}};const Ue={__name:"Product",async setup(t){let o,n;const a=V.useRoute();V.useRouter(),[o,n]=e.withAsyncContext(()=>f.actions.read({_id:a.params.product})),await o,n(),a.meta.title.en=f.state.current.name,a.meta.title.ru=f.state.current.name;const s=e.computed(()=>f.state.current),r={messages:{en:{},ru:{}}},{t:m}=E.useI18n(r),d=e.computed(()=>({title:f.state.current.name,description:m("description")}));return P(d),e.onMounted(()=>{}),(i,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(B._sfc_main,{class:"section"}),e.createVNode(Ee,{product:e.unref(s),class:"section"},null,8,["product"]),e.createVNode(O),e.createVNode(Xe)]))}};exports.default=Ue;
|
@@ -0,0 +1,258 @@
|
|
1
|
+
import { toRefs as B, openBlock as s, createElementBlock as n, createElementVNode as e, toDisplayString as w, unref as a, createCommentVNode as $, createBlock as I, withCtx as k, createTextVNode as L, Fragment as C, renderList as z, createVNode as l, withAsyncContext as N } from "vue";
|
2
|
+
import { useRoute as U, useRouter as V } from "vue-router";
|
3
|
+
import { a as R, _ as D, s as F } from "./categories-b7f9e8c0.mjs";
|
4
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
5
|
+
import "./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs";
|
6
|
+
import "./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs";
|
7
|
+
import { C as M } from "./Checkbox-5dbe7b23.mjs";
|
8
|
+
import { _ as A } from "./Button-9e1a9284.mjs";
|
9
|
+
import "vue-i18n";
|
10
|
+
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
11
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
12
|
+
import { F as P } from "./Field-e5ad88d3.mjs";
|
13
|
+
import { V as j } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
14
|
+
import { _ as O } from "./UploadImageMultiple-c34a6c6f.mjs";
|
15
|
+
import { s as o, a as x } from "./products-7f1e5a75.mjs";
|
16
|
+
import "./globals-96ba60e4.mjs";
|
17
|
+
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
18
|
+
import "./auth-7e39361f.mjs";
|
19
|
+
import "./axios-33aeb810.mjs";
|
20
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
21
|
+
const T = {
|
22
|
+
__name: "EditProductInfo",
|
23
|
+
setup(c) {
|
24
|
+
return (i, r) => null;
|
25
|
+
}
|
26
|
+
}, q = { class: "mn-big" }, G = { class: "mn-small flex-nowrap flex" }, H = { class: "mn-r-thin" }, J = { class: "flex-column flex" }, K = {
|
27
|
+
key: 0,
|
28
|
+
class: "w-100 mn-small"
|
29
|
+
}, Q = ["onClick"], W = /* @__PURE__ */ e("svg", {
|
30
|
+
class: "i-small",
|
31
|
+
fill: "none",
|
32
|
+
height: "20",
|
33
|
+
viewBox: "0 0 20 20",
|
34
|
+
width: "20",
|
35
|
+
xmlns: "http://www.w3.org/2000/svg"
|
36
|
+
}, [
|
37
|
+
/* @__PURE__ */ e("path", {
|
38
|
+
"clip-rule": "evenodd",
|
39
|
+
d: "m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",
|
40
|
+
fill: "#8a8a8a",
|
41
|
+
"fill-rule": "evenodd"
|
42
|
+
})
|
43
|
+
], -1), X = [
|
44
|
+
W
|
45
|
+
], E = {
|
46
|
+
__name: "EditParameters",
|
47
|
+
props: {
|
48
|
+
items: {
|
49
|
+
type: Array,
|
50
|
+
default: () => []
|
51
|
+
},
|
52
|
+
title: String,
|
53
|
+
addButtonLabel: String,
|
54
|
+
emptyMessage: String,
|
55
|
+
keyName: String,
|
56
|
+
valueName: String
|
57
|
+
},
|
58
|
+
emits: ["add-info", "delete-info"],
|
59
|
+
setup(c, { emit: i }) {
|
60
|
+
const r = c;
|
61
|
+
function t() {
|
62
|
+
i("add-info", {});
|
63
|
+
}
|
64
|
+
function _(u) {
|
65
|
+
i("delete-info", u);
|
66
|
+
}
|
67
|
+
const { items: d, title: p, emptyMessage: h, addButtonLabel: v, keyName: f, valueName: g } = B(r);
|
68
|
+
return (u, S) => (s(), n("div", q, [
|
69
|
+
e("div", G, [
|
70
|
+
e("h5", H, w(a(p)), 1),
|
71
|
+
e("button", {
|
72
|
+
onClick: t,
|
73
|
+
class: "i-small pd-thin button-delete button"
|
74
|
+
}, "+")
|
75
|
+
]),
|
76
|
+
e("div", J, [
|
77
|
+
a(d).length == 0 ? (s(), n("p", K, w(a(h)), 1)) : $("", !0),
|
78
|
+
a(d).length == 0 ? (s(), I(A, {
|
79
|
+
key: 1,
|
80
|
+
onClick: t,
|
81
|
+
class: "button"
|
82
|
+
}, {
|
83
|
+
default: k(() => [
|
84
|
+
L(w(a(v)), 1)
|
85
|
+
]),
|
86
|
+
_: 1
|
87
|
+
})) : $("", !0),
|
88
|
+
(s(!0), n(C, null, z(a(d), (m, y) => (s(), n("div", {
|
89
|
+
class: "mn-medium w-100 flex-nowrap flex",
|
90
|
+
key: y
|
91
|
+
}, [
|
92
|
+
l(P, {
|
93
|
+
field: m[a(f)],
|
94
|
+
"onUpdate:field": (b) => m[a(f)] = b,
|
95
|
+
placeholder: "Название параметра",
|
96
|
+
class: "w-100 mn-r-small bg-white radius-small pd-medium"
|
97
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
98
|
+
l(P, {
|
99
|
+
field: m[a(g)],
|
100
|
+
"onUpdate:field": (b) => m[a(g)] = b,
|
101
|
+
placeholder: "Значение параметра",
|
102
|
+
class: "w-100 bg-white radius-small pd-medium"
|
103
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
104
|
+
e("button", {
|
105
|
+
onClick: (b) => _(y),
|
106
|
+
class: "mn-l-small button"
|
107
|
+
}, X, 8, Q)
|
108
|
+
]))), 128))
|
109
|
+
])
|
110
|
+
]));
|
111
|
+
}
|
112
|
+
}, Y = {
|
113
|
+
key: 0,
|
114
|
+
class: "mn-big"
|
115
|
+
}, Z = { class: "flex-column block" }, ee = ["src"], te = ["onClick"], oe = {
|
116
|
+
__name: "EditProductImages",
|
117
|
+
props: {
|
118
|
+
product: Object
|
119
|
+
},
|
120
|
+
setup(c) {
|
121
|
+
function i(t) {
|
122
|
+
console.log(t), console.log(o.current.images), o.current.images.push(...t);
|
123
|
+
}
|
124
|
+
function r(t) {
|
125
|
+
o.current.images.splice(t, 1);
|
126
|
+
}
|
127
|
+
return (t, _) => (s(), n("div", null, [
|
128
|
+
c.product.images.length < 1 ? (s(), n("p", Y, " The product doesn't have any images yet. ")) : $("", !0),
|
129
|
+
l(a(j), {
|
130
|
+
class: "cols-4 dragArea list-group w-full",
|
131
|
+
list: c.product.images,
|
132
|
+
sort: !0,
|
133
|
+
onChange: t.log
|
134
|
+
}, {
|
135
|
+
default: k(() => [
|
136
|
+
(s(!0), n(C, null, z(c.product.images, (d, p) => (s(), n("div", Z, [
|
137
|
+
e("img", {
|
138
|
+
class: "w-100 mn-small",
|
139
|
+
src: (t.FILE_SERVER_URL || "") + d
|
140
|
+
}, null, 8, ee),
|
141
|
+
e("a", {
|
142
|
+
onClick: (h) => r(p),
|
143
|
+
class: "w-100 br-grey br-solid br-1px button"
|
144
|
+
}, "Удалить", 8, te)
|
145
|
+
]))), 256))
|
146
|
+
]),
|
147
|
+
_: 1
|
148
|
+
}, 8, ["list", "onChange"]),
|
149
|
+
l(O, {
|
150
|
+
"onUpdate:images": i,
|
151
|
+
uploadPath: "organizations/" + t.$route.params._id + "/products",
|
152
|
+
class: "mn-t-semi pd-small w-100 button bg-main"
|
153
|
+
}, null, 8, ["uploadPath"])
|
154
|
+
]));
|
155
|
+
}
|
156
|
+
};
|
157
|
+
const se = { class: "for-transition w-100" }, ae = { class: "pd-b-zero pd-t-zero pd-thin" }, ne = { class: "pd-thin" }, ie = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, le = {
|
158
|
+
key: 0,
|
159
|
+
class: "mn-r-auto"
|
160
|
+
}, re = {
|
161
|
+
key: 1,
|
162
|
+
class: "mn-r-auto"
|
163
|
+
}, ce = { class: "flex-nowrap flex pd-thin" }, de = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, ue = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, me = /* @__PURE__ */ e("h3", { class: "mn-semi" }, "Profile", -1), pe = { class: "mn-semi" }, _e = /* @__PURE__ */ e("h5", null, "Categories", -1), he = { class: "" }, fe = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, ge = /* @__PURE__ */ e("h3", { class: "mn-semi" }, "Images", -1), De = {
|
164
|
+
__name: "ProductEdit",
|
165
|
+
async setup(c) {
|
166
|
+
let i, r;
|
167
|
+
const t = U(), _ = V();
|
168
|
+
[i, r] = N(() => R.fetchCategories()), await i, r(), t.params.product && ([i, r] = N(() => x.read({ _id: t.params.product })), await i, r());
|
169
|
+
function d() {
|
170
|
+
o.current.information.push({ name: "", value: "" });
|
171
|
+
}
|
172
|
+
function p(u) {
|
173
|
+
o.current.information.splice(u, 1);
|
174
|
+
}
|
175
|
+
function h() {
|
176
|
+
o.current.localization.push({ locale: "", text: "" });
|
177
|
+
}
|
178
|
+
function v(u) {
|
179
|
+
o.current.localization.splice(u, 1);
|
180
|
+
}
|
181
|
+
function f() {
|
182
|
+
t.params.product ? x.update(t.params.product, o.current) : x.create(t.params._id, o.current);
|
183
|
+
}
|
184
|
+
function g() {
|
185
|
+
_.push({ name: "ProductEdit", params: { _id: t.params._id, product: o.current._id } });
|
186
|
+
}
|
187
|
+
return (u, S) => (s(), n("div", se, [
|
188
|
+
e("div", ae, [
|
189
|
+
l(D, { class: "pd-medium bg-grey radius-big" })
|
190
|
+
]),
|
191
|
+
e("div", ne, [
|
192
|
+
e("header", ie, [
|
193
|
+
a(t).params.product ? (s(), n("h1", le, "Edit Product")) : (s(), n("h1", re, "Create Product")),
|
194
|
+
e("section", ce, [
|
195
|
+
l(A, {
|
196
|
+
submit: f,
|
197
|
+
callback: g
|
198
|
+
}, {
|
199
|
+
default: k(() => [
|
200
|
+
L("Save Product")
|
201
|
+
]),
|
202
|
+
_: 1
|
203
|
+
})
|
204
|
+
])
|
205
|
+
])
|
206
|
+
]),
|
207
|
+
e("div", de, [
|
208
|
+
e("div", ue, [
|
209
|
+
me,
|
210
|
+
l(T, {
|
211
|
+
product: o.current
|
212
|
+
}, null, 8, ["product"]),
|
213
|
+
e("div", pe, [
|
214
|
+
_e,
|
215
|
+
(s(!0), n(C, null, z(F.all, (m, y) => (s(), I(M, {
|
216
|
+
label: m.name,
|
217
|
+
name: "categories",
|
218
|
+
value: m.url,
|
219
|
+
class: "w-100 mn-t-small bg-white radius-small pd-small",
|
220
|
+
radio: o.current.category
|
221
|
+
}, null, 8, ["label", "value", "radio"]))), 256))
|
222
|
+
]),
|
223
|
+
l(E, {
|
224
|
+
items: o.current.information,
|
225
|
+
title: "Parameters",
|
226
|
+
emptyMessage: "No parameters",
|
227
|
+
addButtonLabel: "Add parameter",
|
228
|
+
keyName: "name",
|
229
|
+
valueName: "value",
|
230
|
+
onAddInfo: d,
|
231
|
+
onDeleteInfo: p
|
232
|
+
}, null, 8, ["items"]),
|
233
|
+
l(E, {
|
234
|
+
items: o.current.localization,
|
235
|
+
title: "Localization",
|
236
|
+
emptyMessage: "No localizations",
|
237
|
+
addButtonLabel: "Add localization",
|
238
|
+
keyName: "locale",
|
239
|
+
valueName: "text",
|
240
|
+
onAddInfo: h,
|
241
|
+
onDeleteInfo: v
|
242
|
+
}, null, 8, ["items"])
|
243
|
+
]),
|
244
|
+
e("div", he, [
|
245
|
+
e("div", fe, [
|
246
|
+
ge,
|
247
|
+
l(oe, {
|
248
|
+
product: o.current
|
249
|
+
}, null, 8, ["product"])
|
250
|
+
])
|
251
|
+
])
|
252
|
+
])
|
253
|
+
]));
|
254
|
+
}
|
255
|
+
};
|
256
|
+
export {
|
257
|
+
De as default
|
258
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("vue-router"),g=require("./categories-7e17a7eb.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js");const V=require("./Checkbox-76f09248.js"),v=require("./Button-7643c9aa.js");require("vue-i18n");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const N=require("./Field-e2a43424.js"),y=require("./vue-draggable-next.esm-bundler-21a209c6.js"),B=require("./UploadImageMultiple-d1316df5.js"),o=require("./products-61d83d74.js");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./auth-04684a60.js");require("./axios-ceccf20e.js");require("./_plugin-vue_export-helper-f246444f.js");const w={__name:"EditProductInfo",setup(r){return(n,a)=>null}},x={class:"mn-big"},q={class:"mn-small flex-nowrap flex"},C={class:"mn-r-thin"},$={class:"flex-column flex"},z={key:0,class:"w-100 mn-small"},P=["onClick"],S=e.createElementVNode("svg",{class:"i-small",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),I=[S],b={__name:"EditParameters",props:{items:{type:Array,default:()=>[]},title:String,addButtonLabel:String,emptyMessage:String,keyName:String,valueName:String},emits:["add-info","delete-info"],setup(r,{emit:n}){const a=r;function t(){n("add-info",{})}function d(s){n("delete-info",s)}const{items:l,title:i,emptyMessage:u,addButtonLabel:h,keyName:m,valueName:p}=e.toRefs(a);return(s,E)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("div",q,[e.createElementVNode("h5",C,e.toDisplayString(e.unref(i)),1),e.createElementVNode("button",{onClick:t,class:"i-small pd-thin button-delete button"},"+")]),e.createElementVNode("div",$,[e.unref(l).length==0?(e.openBlock(),e.createElementBlock("p",z,e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0),e.unref(l).length==0?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,onClick:t,class:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)),1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(c,f)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-medium w-100 flex-nowrap flex",key:f},[e.createVNode(N.Field,{field:c[e.unref(m)],"onUpdate:field":_=>c[e.unref(m)]=_,placeholder:"Название параметра",class:"w-100 mn-r-small bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(N.Field,{field:c[e.unref(p)],"onUpdate:field":_=>c[e.unref(p)]=_,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:_=>d(f),class:"mn-l-small button"},I,8,P)]))),128))])]))}},L={key:0,class:"mn-big"},A={class:"flex-column block"},U=["src"],D=["onClick"],F={__name:"EditProductImages",props:{product:Object},setup(r){function n(t){console.log(t),console.log(o.state.current.images),o.state.current.images.push(...t)}function a(t){o.state.current.images.splice(t,1)}return(t,d)=>(e.openBlock(),e.createElementBlock("div",null,[r.product.images.length<1?(e.openBlock(),e.createElementBlock("p",L," The product doesn't have any images yet. ")):e.createCommentVNode("",!0),e.createVNode(e.unref(y.VueDraggableNext),{class:"cols-4 dragArea list-group w-full",list:r.product.images,sort:!0,onChange:t.log},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.product.images,(l,i)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("img",{class:"w-100 mn-small",src:(t.FILE_SERVER_URL||"")+l},null,8,U),e.createElementVNode("a",{onClick:u=>a(i),class:"w-100 br-grey br-solid br-1px button"},"Удалить",8,D)]))),256))]),_:1},8,["list","onChange"]),e.createVNode(B._sfc_main,{"onUpdate:images":n,uploadPath:"organizations/"+t.$route.params._id+"/products",class:"mn-t-semi pd-small w-100 button bg-main"},null,8,["uploadPath"])]))}};const R={class:"for-transition w-100"},M={class:"pd-b-zero pd-t-zero pd-thin"},T={class:"pd-thin"},j={class:"flex-nowrap flex bg-grey pd-medium radius-big"},O={key:0,class:"mn-r-auto"},G={key:1,class:"mn-r-auto"},H={class:"flex-nowrap flex pd-thin"},J={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},K={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},Q=e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1),W={class:"mn-semi"},X=e.createElementVNode("h5",null,"Categories",-1),Y={class:""},Z={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},ee=e.createElementVNode("h3",{class:"mn-semi"},"Images",-1),te={__name:"ProductEdit",async setup(r){let n,a;const t=k.useRoute(),d=k.useRouter();[n,a]=e.withAsyncContext(()=>g.actions.fetchCategories()),await n,a(),t.params.product&&([n,a]=e.withAsyncContext(()=>o.actions.read({_id:t.params.product})),await n,a());function l(){o.state.current.information.push({name:"",value:""})}function i(s){o.state.current.information.splice(s,1)}function u(){o.state.current.localization.push({locale:"",text:""})}function h(s){o.state.current.localization.splice(s,1)}function m(){t.params.product?o.actions.update(t.params.product,o.state.current):o.actions.create(t.params._id,o.state.current)}function p(){d.push({name:"ProductEdit",params:{_id:t.params._id,product:o.state.current._id}})}return(s,E)=>(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",M,[e.createVNode(g._sfc_main,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",T,[e.createElementVNode("header",j,[e.unref(t).params.product?(e.openBlock(),e.createElementBlock("h1",O,"Edit Product")):(e.openBlock(),e.createElementBlock("h1",G,"Create Product")),e.createElementVNode("section",H,[e.createVNode(v._sfc_main,{submit:m,callback:p},{default:e.withCtx(()=>[e.createTextVNode("Save Product")]),_:1})])])]),e.createElementVNode("div",J,[e.createElementVNode("div",K,[Q,e.createVNode(w,{product:o.state.current},null,8,["product"]),e.createElementVNode("div",W,[X,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.state.all,(c,f)=>(e.openBlock(),e.createBlock(V.Checkbox,{label:c.name,name:"categories",value:c.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:o.state.current.category},null,8,["label","value","radio"]))),256))]),e.createVNode(b,{items:o.state.current.information,title:"Parameters",emptyMessage:"No parameters",addButtonLabel:"Add parameter",keyName:"name",valueName:"value",onAddInfo:l,onDeleteInfo:i},null,8,["items"]),e.createVNode(b,{items:o.state.current.localization,title:"Localization",emptyMessage:"No localizations",addButtonLabel:"Add localization",keyName:"locale",valueName:"text",onAddInfo:u,onDeleteInfo:h},null,8,["items"])]),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[ee,e.createVNode(F,{product:o.state.current},null,8,["product"])])])])]))}};exports.default=te;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("vue-router"),s=require("./products-61d83d74.js"),c=require("./Feed-98b47c6f.js"),d=require("./CardProduct-4c0cb9a1.js"),m=require("./Tab-2c1e4224.js");require("./auth-04684a60.js");require("./axios-ceccf20e.js");require("./globals-928eb13c.js");require("vue-i18n");require("./SkeletonEvent-eb284de8.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./EmptyState-d65bab5b.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const p={class:"mn-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),b={__name:"ProductsBackoffice",setup(_){const r=i.useRoute(),l=i.useRouter(),u=e.ref(r.query.tab?r.query.tab:"posts");return r.query.tab=u.value,e.watch(u,a=>{l.replace({query:{...r.query,tab:a}})}),e.onMounted(async()=>{await s.actions.fetchProducts()}),(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",p,[q,e.createElementVNode("button",{onClick:o[0]||(o[0]=t=>a.$router.push({name:"AddProduct"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(m._sfc_main,{selected:u.value,"onUpdate:selected":o[1]||(o[1]=t=>u.value=t),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(c._sfc_main,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:t=>s.actions.read(t),state:s.state},options:{limit:15,organization:e.unref(r).params._id,status:u.value}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(d._sfc_main,{key:n._id,product:n,onClick:h=>a.$router.push({name:"Product Organization",params:{_id:e.unref(r).params._id,product:n._id}})},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])],64))}};exports.default=b;
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import { ref as _, watch as f, onMounted as h, openBlock as i, createElementBlock as u, Fragment as l, createElementVNode as n, createVNode as m, unref as d, withCtx as b, renderList as v, createBlock as y } from "vue";
|
2
|
+
import { useRoute as g, useRouter as k } from "vue-router";
|
3
|
+
import { a as c, s as P } from "./products-7f1e5a75.mjs";
|
4
|
+
import { _ as $ } from "./Feed-d114330c.mjs";
|
5
|
+
import { _ as q } from "./CardProduct-ea0e1f84.mjs";
|
6
|
+
import { _ as w } from "./Tab-054b61f7.mjs";
|
7
|
+
import "./auth-7e39361f.mjs";
|
8
|
+
import "./axios-33aeb810.mjs";
|
9
|
+
import "./globals-96ba60e4.mjs";
|
10
|
+
import "vue-i18n";
|
11
|
+
import "./SkeletonEvent-8690422d.mjs";
|
12
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
13
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
14
|
+
import "./EmptyState-e404b05d.mjs";
|
15
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
16
|
+
const C = { class: "mn-medium flex-v-center flex-nowrap flex" }, x = /* @__PURE__ */ n("h2", { class: "mn-r-medium" }, "Products", -1), J = {
|
17
|
+
__name: "ProductsBackoffice",
|
18
|
+
setup(B) {
|
19
|
+
const e = g(), p = k(), r = _(e.query.tab ? e.query.tab : "posts");
|
20
|
+
return e.query.tab = r.value, f(r, (o) => {
|
21
|
+
p.replace({ query: { ...e.query, tab: o } });
|
22
|
+
}), h(async () => {
|
23
|
+
await c.fetchProducts();
|
24
|
+
}), (o, a) => (i(), u(l, null, [
|
25
|
+
n("header", C, [
|
26
|
+
x,
|
27
|
+
n("button", {
|
28
|
+
onClick: a[0] || (a[0] = (t) => o.$router.push({
|
29
|
+
name: "AddProduct"
|
30
|
+
})),
|
31
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
32
|
+
}, " + ")
|
33
|
+
]),
|
34
|
+
m(w, {
|
35
|
+
selected: r.value,
|
36
|
+
"onUpdate:selected": a[1] || (a[1] = (t) => r.value = t),
|
37
|
+
tabs: [
|
38
|
+
{ name: "All", value: "all" },
|
39
|
+
{ name: "Published", value: "published" },
|
40
|
+
{ name: "Unpublished", value: "unpublished" },
|
41
|
+
{ name: "Archivied", value: "archivied" }
|
42
|
+
],
|
43
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
44
|
+
}, null, 8, ["selected"]),
|
45
|
+
m($, {
|
46
|
+
states: {
|
47
|
+
empty: {
|
48
|
+
title: "No Products Found",
|
49
|
+
description: "Currently, there are no products available."
|
50
|
+
}
|
51
|
+
},
|
52
|
+
store: {
|
53
|
+
read: (t) => c.read(t),
|
54
|
+
state: P
|
55
|
+
},
|
56
|
+
options: {
|
57
|
+
limit: 15,
|
58
|
+
organization: d(e).params._id,
|
59
|
+
status: r.value
|
60
|
+
// user: user
|
61
|
+
}
|
62
|
+
}, {
|
63
|
+
default: b(({
|
64
|
+
items: t
|
65
|
+
}) => [
|
66
|
+
(i(!0), u(l, null, v(t, (s) => (i(), y(q, {
|
67
|
+
key: s._id,
|
68
|
+
product: s,
|
69
|
+
onClick: (A) => o.$router.push({
|
70
|
+
name: "Product Organization",
|
71
|
+
params: {
|
72
|
+
_id: d(e).params._id,
|
73
|
+
product: s._id
|
74
|
+
}
|
75
|
+
})
|
76
|
+
}, null, 8, ["product", "onClick"]))), 128))
|
77
|
+
]),
|
78
|
+
_: 1
|
79
|
+
}, 8, ["states", "store", "options"])
|
80
|
+
], 64));
|
81
|
+
}
|
82
|
+
};
|
83
|
+
export {
|
84
|
+
J as default
|
85
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("vue-router"),d=require("./Tab-2c1e4224.js"),a=require("./Feed-ac4bb6ea.js"),u=require("./auth-04684a60.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Loader-21f016da.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./_plugin-vue_export-helper-f246444f.js");require("./EmptyState-d65bab5b.js");require("./CardBlogpost-7107e04a.js");require("./axios-ceccf20e.js");require("./globals-928eb13c.js");require("vue-i18n");require("./Chips-817cf959.js");require("./Dropdown-60e3dc6c.js");require("./Popup-eb11fa82.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button-7643c9aa.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-95f4701a.js");require("./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js");require("./reports-a67b4fb4.js");require("./click-outside-0b0727d1.js");require("./memberships-58af22e0.js");require("./IconEdit-c0469b45.js");const m={class:"pd-thin"},q={class:"mn-medium flex-v-center flex-nowrap flex"},p=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(f){const r=i.useRoute(),l=i.useRouter();let c=r.query.tab?r.query.tab:"posts";const t=e.ref(c);return r.query.tab=t.value,e.watch(t,s=>{l.replace({query:{...r.query,tab:s}})}),(s,o)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",q,[p,u.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:o[0]||(o[0]=n=>s.$router.push({name:"Create BlogPost"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),u.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,selected:t.value,"onUpdate:selected":o[1]||(o[1]=n=>t.value=n),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),t.value==="posts"?(e.openBlock(),e.createBlock(a._sfc_main,{key:1,user:u.state.user._id,creator:e.unref(r).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="drafts"?(e.openBlock(),e.createBlock(a._sfc_main,{key:2,user:u.state.user._id,creator:e.unref(r).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="following"?(e.openBlock(),e.createBlock(a._sfc_main,{key:3,user:u.state.user._id,following:e.unref(r).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import { ref as f, watch as g, openBlock as t, createElementBlock as n, createElementVNode as d, unref as o, createCommentVNode as s, createBlock as m } from "vue";
|
2
|
+
import { useRoute as v, useRouter as b } from "vue-router";
|
3
|
+
import { _ as y } from "./Tab-054b61f7.mjs";
|
4
|
+
import { _ as l } from "./Feed-f7c04014.mjs";
|
5
|
+
import { s as a } from "./auth-7e39361f.mjs";
|
6
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
7
|
+
import "./Loader-cd422786.mjs";
|
8
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
9
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
10
|
+
import "./EmptyState-e404b05d.mjs";
|
11
|
+
import "./CardBlogpost-1b81b54e.mjs";
|
12
|
+
import "./axios-33aeb810.mjs";
|
13
|
+
import "./globals-96ba60e4.mjs";
|
14
|
+
import "vue-i18n";
|
15
|
+
import "./Chips-8c836ba6.mjs";
|
16
|
+
import "./Dropdown-d1c81d45.mjs";
|
17
|
+
import "./Popup-0d8e1392.mjs";
|
18
|
+
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
19
|
+
import "./Button-9e1a9284.mjs";
|
20
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
21
|
+
import "./Select-dab17282.mjs";
|
22
|
+
import "./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs";
|
23
|
+
import "./reports-c579b02a.mjs";
|
24
|
+
import "./click-outside-6101836c.mjs";
|
25
|
+
import "./memberships-559590ad.mjs";
|
26
|
+
import "./IconEdit-9edfd74d.mjs";
|
27
|
+
const h = { class: "pd-thin" }, k = { class: "mn-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, "Posts", -1), W = {
|
28
|
+
__name: "ProfileBlogposts",
|
29
|
+
setup(q) {
|
30
|
+
const e = v(), c = b();
|
31
|
+
let _ = e.query.tab ? e.query.tab : "posts";
|
32
|
+
const r = f(_);
|
33
|
+
return e.query.tab = r.value, g(r, (u) => {
|
34
|
+
c.replace({ query: { ...e.query, tab: u } });
|
35
|
+
}), (u, i) => (t(), n("div", h, [
|
36
|
+
d("header", k, [
|
37
|
+
w,
|
38
|
+
a.user._id === o(e).params._id ? (t(), n("button", {
|
39
|
+
key: 0,
|
40
|
+
onClick: i[0] || (i[0] = (p) => u.$router.push({
|
41
|
+
name: "Create BlogPost"
|
42
|
+
})),
|
43
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
44
|
+
}, " + ")) : s("", !0)
|
45
|
+
]),
|
46
|
+
a.user._id === o(e).params._id ? (t(), m(y, {
|
47
|
+
key: 0,
|
48
|
+
selected: r.value,
|
49
|
+
"onUpdate:selected": i[1] || (i[1] = (p) => r.value = p),
|
50
|
+
tabs: [
|
51
|
+
{ name: "My posts", value: "posts" },
|
52
|
+
{ name: "Drafts", value: "drafts" },
|
53
|
+
{ name: "Following", value: "following" }
|
54
|
+
],
|
55
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
56
|
+
}, null, 8, ["selected"])) : s("", !0),
|
57
|
+
r.value === "posts" ? (t(), m(l, {
|
58
|
+
key: 1,
|
59
|
+
user: a.user._id,
|
60
|
+
creator: o(e).params._id
|
61
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
62
|
+
r.value === "drafts" ? (t(), m(l, {
|
63
|
+
key: 2,
|
64
|
+
user: a.user._id,
|
65
|
+
creator: o(e).params._id,
|
66
|
+
status: "draft"
|
67
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
68
|
+
r.value === "following" ? (t(), m(l, {
|
69
|
+
key: 3,
|
70
|
+
user: a.user._id,
|
71
|
+
following: o(e).params._id
|
72
|
+
}, null, 8, ["user", "following"])) : s("", !0)
|
73
|
+
]));
|
74
|
+
}
|
75
|
+
};
|
76
|
+
export {
|
77
|
+
W as default
|
78
|
+
};
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { ref as f, watch as v, openBlock as o, createElementBlock as u, createElementVNode as d, unref as a, createCommentVNode as i, createVNode as b, createBlock as c } from "vue";
|
2
|
+
import { useRoute as y, useRouter as h } from "vue-router";
|
3
|
+
import { _ as k } from "./Tab-054b61f7.mjs";
|
4
|
+
import { _ as l } from "./Feed-53d96b18.mjs";
|
5
|
+
import { s } from "./auth-7e39361f.mjs";
|
6
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
7
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
8
|
+
import "./EmptyState-e404b05d.mjs";
|
9
|
+
import "./Chips-8c836ba6.mjs";
|
10
|
+
import "./Dropdown-d1c81d45.mjs";
|
11
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
12
|
+
import "./Popup-0d8e1392.mjs";
|
13
|
+
import "vue-i18n";
|
14
|
+
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
15
|
+
import "./Button-9e1a9284.mjs";
|
16
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
17
|
+
import "./Select-dab17282.mjs";
|
18
|
+
import "./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs";
|
19
|
+
import "./reports-c579b02a.mjs";
|
20
|
+
import "./globals-96ba60e4.mjs";
|
21
|
+
import "./axios-33aeb810.mjs";
|
22
|
+
import "./click-outside-6101836c.mjs";
|
23
|
+
import "./memberships-559590ad.mjs";
|
24
|
+
import "./IconEdit-9edfd74d.mjs";
|
25
|
+
import "./SkeletonEvent-8690422d.mjs";
|
26
|
+
const g = { class: "pd-thin" }, w = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), W = {
|
27
|
+
__name: "ProfileEvents",
|
28
|
+
setup(x) {
|
29
|
+
const e = y(), m = h();
|
30
|
+
let _ = e.query.tab ? e.query.tab : "owner";
|
31
|
+
const r = f(_);
|
32
|
+
return e.query.tab = r.value, v(r, (n) => {
|
33
|
+
m.replace({ query: { ...e.query, tab: n } });
|
34
|
+
}), (n, t) => (o(), u("div", g, [
|
35
|
+
d("header", w, [
|
36
|
+
q,
|
37
|
+
s.user._id === a(e).params._id ? (o(), u("button", {
|
38
|
+
key: 0,
|
39
|
+
onClick: t[0] || (t[0] = (p) => a(m).push({ name: "Create Event" })),
|
40
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
41
|
+
}, " + ")) : i("", !0)
|
42
|
+
]),
|
43
|
+
b(k, {
|
44
|
+
selected: r.value,
|
45
|
+
"onUpdate:selected": t[1] || (t[1] = (p) => r.value = p),
|
46
|
+
tabs: [
|
47
|
+
{ name: "My", value: "owner" },
|
48
|
+
{ name: "Participant", value: "participant" }
|
49
|
+
],
|
50
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
51
|
+
}, null, 8, ["selected"]),
|
52
|
+
r.value === "owner" ? (o(), c(l, {
|
53
|
+
key: 0,
|
54
|
+
user: s.user._id,
|
55
|
+
creator: a(e).params._id,
|
56
|
+
sortOrder: "asc"
|
57
|
+
}, null, 8, ["user", "creator"])) : i("", !0),
|
58
|
+
r.value === "participant" ? (o(), c(l, {
|
59
|
+
key: 1,
|
60
|
+
user: s.user._id,
|
61
|
+
participant: a(e).params._id,
|
62
|
+
sortOrder: "desc"
|
63
|
+
}, null, 8, ["user", "participant"])) : i("", !0)
|
64
|
+
]));
|
65
|
+
}
|
66
|
+
};
|
67
|
+
export {
|
68
|
+
W as default
|
69
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),d=require("./Tab-2c1e4224.js"),c=require("./Feed-694a2fad.js"),a=require("./auth-04684a60.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./EmptyState-d65bab5b.js");require("./Chips-817cf959.js");require("./Dropdown-60e3dc6c.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Popup-eb11fa82.js");require("vue-i18n");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button-7643c9aa.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-95f4701a.js");require("./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js");require("./reports-a67b4fb4.js");require("./globals-928eb13c.js");require("./axios-ceccf20e.js");require("./click-outside-0b0727d1.js");require("./memberships-58af22e0.js");require("./IconEdit-c0469b45.js");require("./SkeletonEvent-eb284de8.js");const q={class:"pd-thin"},m={class:"mn-medium flex-v-center flex-nowrap flex"},p=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),_={__name:"ProfileEvents",setup(v){const r=o.useRoute(),i=o.useRouter();let l=r.query.tab?r.query.tab:"owner";const t=e.ref(l);return r.query.tab=t.value,e.watch(t,n=>{i.replace({query:{...r.query,tab:n}})}),(n,u)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("header",m,[p,a.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u[0]||(u[0]=s=>e.unref(i).push({name:"Create Event"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d._sfc_main,{selected:t.value,"onUpdate:selected":u[1]||(u[1]=s=>t.value=s),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="owner"?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,user:a.state.user._id,creator:e.unref(r).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="participant"?(e.openBlock(),e.createBlock(c._sfc_main,{key:1,user:a.state.user._id,participant:e.unref(r).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=_;
|