1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"59b4dbc6d7721f0d4cb828d5ed1569fc0614457a"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="025af926-e226-430f-9fa5-0d6bd38ade29",t._sentryDebugIdIdentifier="sentry-dbid-025af926-e226-430f-9fa5-0d6bd38ade29")}catch(a){}}();import{o as t,R as e,l as a,ch as o,J as s,bZ as l,ci as i,c6 as n,P as r,ca as d,c8 as h,bV as c,c1 as u}from"./CEW2-HRP.js";import{C as p}from"./CVt9TaoF.js";import{R as m}from"./CZtzqCgG.js";import{u as f}from"./s0GTzpf0.js";import{u as g}from"./Dv8WFlzz.js";import{a as y}from"./CeQ133ai.js";import{ax as v,am as k,n as b,k as P,aG as $,s as w,m as L,t as x,b1 as C,F as S,av as I,l as _,b2 as R,aU as D,a9 as U,aY as q,b4 as A,aX as F,aR as B,aS as O,au as j,a_ as M,ai as N,b0 as E,aO as T}from"./wm2RQbTu.js";import"./DWFaJ9M9.js";import"./BGeJ_7hy.js";import"./DManJ9cM.js";const Q={components:{RmBtn:e,RmField:m,Close:p},props:{lot:{type:Object,default:()=>{}}},emits:["update"],setup(){const t=i().isSuperAdmin,e=f().partners,{modalProps:a}=n();return{isSuperAdmin:t,partners:e,modalProps:a,lotForm:g(),lotAdmin:y(),tagAddLot:f().tagAddLot,tagRemoveLot:f().tagRemoveLot,fetchPartners:f().fetchPartners}},data(){return{hideStorePath:"lot/form/hide",deleteStorePath:"lot/form/delete",approveStorePath:"lot/form/approve",doNotRemoveStorePath:"lot/form/doNotRemove",searchRankStorePath:"lot/form/searchRank",partnerStorePath:"lot/form/partner",ownerFeeCoefficientStorePath:"lot/form/ownerFeeCoefficient",lotUpdateQuantityStorePath:"lot/form/quantity",pricesStorePath:`${this.lot.id}:lot/form/prices`}},computed:{breadcrumbs(){const t=[...this.lot.category.ancestorIds];return t.push(parseInt(this.lot.category.id)),t.sort(),t}},methods:{getCategoryById:t=>l().getCategoryById(t),handleClickRemoveLot(t){this.$modal.show("shared/modal/confirmation",{confirmationMethod:this.submitRemoveLot,tagId:t,lotId:this.lot.id})},handleRemovePartner(){this.$modal.show("shared/modal/confirmation",{confirmationMethod:this.submitRemovePartner,lotId:this.lot.id})},async submitRemovePartner(){await this.lotUpdatePartner()},async submitRemoveLot(){await this.tagRemoveLot({tagId:this.modalProps.tagId,lotId:this.modalProps.lotId})},hanldeAddTag(){this.$modal.show("shared/modal/add_tag",{confirmationMethod:this.tagAddLot,lotId:this.lot.id})},async confirmLotDelete(){const t=await this.lotForm.lotDelete({key:this.deleteStorePath,id:this.lot.id});this.$emit("update",{id:this.lot.id,result:t})},async confirmLotApprove(){const t=await this.lotForm.lotApprove({key:this.approveStorePath,id:this.lot.id});this.$emit("update",{id:this.lot.id,result:t})},async confirmLotBlock(){const t=await this.lotForm.lotBlock({key:this.approveStorePath,id:this.lot.id});this.$emit("update",{id:this.lot.id,result:t})},handleLotDelete(){this.$modal.show("shared/modal/confirmation",{confirmationMethod:this.confirmLotDelete,title:"lots.new.delete.title",text:"lots.new.delete.text"})},handleLotApprove(){this.$modal.show("shared/modal/confirmation",{confirmationMethod:this.confirmLotApprove})},handleLotBlock(){this.$modal.show("shared/modal/confirmation",{confirmationMethod:this.confirmLotBlock})},async confirmLotHide(){const t=await this.lotForm.lotHide({key:this.hideStorePath,id:this.lot.id});this.$emit("update",{id:this.lot.id,result:t})},handleLotHide(){this.$modal.show("shared/modal/confirmation",{confirmationMethod:this.confirmLotHide,title:"lots.new.hide.title",text:"lots.new.hide.text"})},handleChangeDeposit(){this.$modal.show("shared/modal/change_deposit",{confirmationMethod:this.confirmChangeDeposit,title:"ÐзмениÑÑ Ð·Ð°Ð»Ð¾Ð³?"})},async confirmChangeDeposit(t){const e=this.lot.id;if(t){const{result:a}=await this.$gql.request(s.lotUpdateDeposit,{lotId:e,deposit:t});this.lotAdmin.adminUpdateDepositLot({lotId:e,deposit:a.lot.deposit})}else{const{result:t}=await this.$gql.request(s.lotRemoveDeposit,{lotId:this.lot.id});this.lotAdmin.adminUpdateDepositLot({lotId:e,deposit:t.lot.deposit})}},async handleLotShow(){const t=await this.lotForm.lotShow({key:this.hideStorePath,id:this.lot.id});this.$emit("update",{id:this.lot.id,result:t})},async hanldeDoNotRemove(){const t=await this.lotForm.lotUpdateDoNotRemove({key:this.doNotRemoveStorePath,id:this.lot.id});this.$emit("update",{id:this.lot.id,result:t})},handleChangeSearchRank(){this.$modal.show("shared/modal/change_value",{confirmationMethod:this.lotUpdateSearchRank,title:"ÐзмениÑÑ Ð¿Ð¾Ð¸ÑковÑй Ñанг лоÑа?",value:this.lot.searchR
1ank,placeholder:"ÐоиÑковÑй Ñанг лоÑа"})},async lotUpdateSearchRank(t){const e=this.lot.id,a=`${this.searchRankStorePath}/${this.lot.id}`;o().startSubmitting(a);const{result:l}=await this.$gql.request(s.lotUpdateSearchRank,{lotId:e,searchRank:t});return o().finishSubmitting(a),0===l.errors.length&&(this.lotAdmin.adminUpdateSearchRank({lotId:e,searchRank:l.lot.searchRank}),!0)},handleChangeOwnerFeeCoefficient(){this.$modal.show("shared/modal/change_value",{confirmationMethod:this.lotUpdateOwnerFeeCoefficient,title:"ÐзмениÑÑ ÐºÐ¾Ð¼Ð¸ÑÑÐ¸Ñ Ð»Ð¾Ñа?",value:this.lot.ownerFeeCoefficient,placeholder:"ÐомиÑÑÐ¸Ñ Ð»Ð¾Ñа"})},handleChangeLotQuantity(){this.$modal.show("shared/modal/change_value",{confirmationMethod:this.lotUpdateQuantity,title:"ÐзмениÑÑ Ð¾Ð±Ñее колиÑеÑÑво",value:this.lot.quantity,placeholder:"ÐолиÑеÑÑво"})},async lotUpdateOwnerFeeCoefficient(t){const e=this.lot.id,a=`${this.ownerFeeCoefficientStorePath}/${this.lot.id}`;o().startSubmitting(a);const{result:l}=await this.$gql.request(s.lotUpdateOwnerFeeCoefficient,{lotId:e,...0!==t.length&&{coefficient:t}});return o().finishSubmitting(a),0===l.errors.length&&(this.lotAdmin.adminUpdateFeeCoefficient({lotId:e,ownerFeeCoefficient:l.lot.ownerFeeCoefficient}),!0)},async lotUpdateQuantity(t){const e=this.lot.id,a=`${this.lotUpdateQuantityStorePath}/${this.lot.id}`;o().startSubmitting(a);const{result:l}=await this.$gql.request(s.lotUpdateQuantity,{lotId:e,quantity:Number(t)});return o().finishSubmitting(a),0===l.errors.length&&(this.lotAdmin.adminUpdateQuantity({lotId:e,quantity:l.lot.quantity}),!0)},handleChangePrices(){this.lotForm.initNewLot(this.lot),this.$modal.show("lots/edit/hourly_prices",{showSaveButton:!0,confirmationMethod:this.lotUpdatePrices})},async lotUpdatePrices(t){this.$modal.hide(),this.$emit("update",{id:this.lot.id,result:t})},async lotUpdatePartner(t){const e=this.lot.id,a=`${this.partnerStorePath}/${this.lot.id}`;o().startSubmitting(a);const{result:l}=await this.$gql.request(s.lotUpdatePartner,{lotId:e,partner:t});return o().finishSubmitting(a),0===l.errors.length&&(this.lotAdmin.adminUpdatePartner({lotId:e,partner:l.lot.partner}),!0)},async handleLotUpdatePartner(){await this.fetchPartners(),this.$modal.show("shared/modal/change_select",{confirmationMethod:this.lotUpdatePartner,title:"ÐÑбеÑиÑе паÑÑнÑÑа, коÑоÑÐ¾Ð¼Ñ Ð¿ÑÐ¸Ð½Ð°Ð´Ð»ÐµÐ¶Ð¸Ñ Ð»Ð¾Ñ",value:this.lot.partner,options:this.partners,storePath:this.partnerStorePath})}}},H={class:"p-2 my-2 space-y-2 border border-gray-300 rounded-md"},V={key:0},K={key:1},Z={class:"text-blue-600"},W={key:0},Y={key:2},z={class:"mt-2"},G={key:3,class:"md:text-base w-full p-6 mt-6 mb-8 text-sm font-medium text-center bg-gray-100 rounded-[12px]"},J={key:4,class:"md:text-base w-full p-6 mt-6 mb-8 text-sm font-medium text-center bg-gray-100 rounded-[12px]"},X={class:"flex flex-row space-x-4"},tt={key:5,class:"flex flex-row space-x-4"},et={class:"flex flex-row space-x-4"},at={key:0,class:"flex gap-4 pt-4"},ot=["onClick"];const st=Object.assign(t(Q,[["render",function(t,e,o,s,l,i){const n=a,r=v("RmField"),d=v("RmBtn"),h=a,c=v("Close");return k(),b("div",H,[P("div",null,"Lot ID - "+$(o.lot.id),1),o.lot.partner?(k(),b("div",V,[w(" ÐаÑÑнÑÑ - "+$(o.lot.partner)+" ",1),P("button",{class:"text-blue-500",onClick:e[0]||(e[0]=(...t)=>i.handleRemovePartner&&i.handleRemovePartner(...t))},"УдалиÑÑ")])):L("",!0),o.lot.user?(k(),b("div",K,[e[6]||(e[6]=w(" ÐолÑзоваÑÐµÐ»Ñ - ",-1)),x(n,{to:t.$localePath(`/admin/users?id=${o.lot.user.id}`)},{default:C(()=>[P("span",Z,$(o.lot.user.id),1)]),_:1},8,["to"]),w(" "+$(o.lot.user.nameForAdmin)+" ",1),x(n,{to:t.$localePath(`/admin/lots?user=${o.lot.user.id}`),class:"text-blue-600"},{default:C(()=>[...e[5]||(e[5]=[w(" ÐоÑÑ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ ",-1)])]),_:1},8,["to"])])):L("",!0),P("div",null,"Ðазвание - "+$(o.lot.name),1),(k(!0),b(S,null,I(i.breadcrumbs,(t,e)=>(k(),b("div",{key:e,class:"inline-block mr-2"},[w($(i.getCategoryById(t).name)+" ",1),e<i.breadcrumbs.length-1?(k(),b("span",W," - ")):L("",!0)]))),128)),P("div",null,"ÐоÑод - "+$(o.lot.city.name),1),P("div",null,"СÑаÑÑÑ Ð»Ð¾Ñа - "+$(o.lot.state),1),o.lot.user?(k(),b("div",Y,"ÐоиÑковÑй Ñанг владелÑÑа - "+$(o.lot.user.searchR
1ank),1)):L("",!0),x(r,{field:`${l.searchRankStorePath}/${o.lot.id}`},{default:C(()=>[P("div",null,[w(" ÐоиÑковÑй Ñанг лоÑа - "+$(o.lot.searchRank)+" ",1),s.isSuperAdmin?(k(),b("span",{key:0,class:"text-sm text-red-500 cursor-pointer",onClick:e[1]||(e[1]=(...t)=>i.handleChangeSearchRank&&i.handleChangeSearchRank(...t))}," ÐзмениÑÑ ")):L("",!0)])]),_:1},8,["field"]),P("div",null,[o.lot.deposit?(k(),b(S,{key:1},[w(" Ðалог - "+$(o.lot.deposit),1)],64)):(k(),b(S,{key:0},[w(" Ðез залога ")],64)),P("span",{class:"text-sm text-red-500 cursor-pointer",onClick:e[2]||(e[2]=(...t)=>i.handleChangeDeposit&&i.handleChangeDeposit(...t))}," ÐзмениÑÑ ")]),x(r,{field:l.pricesStorePath},{default:C(()=>[o.lot.prices.hourlyRentAvailable?(k(!0),b(S,{key:0},I(o.lot.prices.hourlyRates,(e,a)=>(k(),b("div",{key:`hourly-${a}`}," Ð¾Ñ "+$(e.minHours)+" "+$(t.$t("common.hours",e.minHours))+" - "+$(e.price)+" "+$(o.lot.currency)+" / ÑÐ°Ñ ",1))),128)):L("",!0),(k(!0),b(S,null,I(o.lot.prices.dailyRates,(e,a)=>(k(),b("div",{key:`daily-${a}`}," Ð¾Ñ "+$(e.minDays)+" "+$(t.$t("common.day",e.minDays))+" - "+$(e.price)+" "+$(o.lot.currency)+" / Ð´ÐµÐ½Ñ ",1))),128))]),_:1},8,["field"]),x(r,{field:`${l.ownerFeeCoefficientStorePath}/${o.lot.id}`},{default:C(()=>[P("div",null,[w(" ÐомиÑÑÐ¸Ñ Ð»Ð¾Ñа - "+$(o.lot.ownerFeeCoefficient)+" ",1),s.isSuperAdmin?(k(),b("span",{key:0,class:"text-sm text-red-500 cursor-pointer",onClick:e[3]||(e[3]=(...t)=>i.handleChangeOwnerFeeCoefficient&&i.handleChangeOwnerFeeCoefficient(...t))},"ÐзмениÑÑ")):L("",!0)])]),_:1},8,["field"]),x(r,{field:`${l.lotUpdateQuantityStorePath}/${o.lot.id}`},{default:C(()=>[P("div",null,[w(" ÐолиÑеÑÑво - "+$(o.lot.quantity)+" ",1),P("span",{class:"text-sm text-red-500 cursor-pointer",onClick:e[4]||(e[4]=(...t)=>i.handleChangeLotQuantity&&i.handleChangeLotQuantity(...t))},"ÐзмениÑÑ")])]),_:1},8,["field"]),P("div",z,[x(n,{to:t.$localePath(`/lots/${o.lot.id}`),class:"text-blue-600"},{default:C(()=>[...e[7]||(e[7]=[w(" СÑаниÑа лоÑа на ÑайÑе ",-1)])]),_:1},8,["to"])]),o.lot.deleted?(k(),b("div",G,$(t.$t("lots.new.isDeleted")),1)):o.lot.hidden?(k(),b("div",J,$(t.$t("lots.new.isHidden")),1)):L("",!0),P("div",X,["MODERATED"!==o.lot.state?(k(),_(r,{key:0,ref:`${l.approveStorePath}/${o.lot.id}`,field:`${l.approveStorePath}/${o.lot.id}`},{default:C(()=>[x(d,{color:"blue",class:"px-10 rounded-[12px]",onClick:i.handleLotApprove},{default:C(()=>[...e[8]||(e[8]=[w(" ÐдобÑиÑÑ ",-1)])]),_:1},8,["onClick"])]),_:1},8,["field"])):L("",!0),"BLOCKED"!==o.lot.state?(k(),_(r,{key:1,ref:`${l.approveStorePath}/${o.lot.id}`,field:`${l.approveStorePath}/${o.lot.id}`},{default:C(()=>[x(d,{color:"red",class:"px-10 rounded-[12px]",onClick:i.handleLotBlock},{default:C(()=>[...e[9]||(e[9]=[w(" ÐаблокиÑоваÑÑ ",-1)])]),_:1},8,["onClick"])]),_:1},8,["field"])):L("",!0)]),o.lot.deleted?L("",!0):(k(),b("div",tt,[x(r,{ref:`${l.deleteStorePath}/${o.lot.id}`,field:`${l.deleteStorePath}/${o.lot.id}`},{default:C(()=>[x(d,{color:"red",class:"px-10 rounded-[12px]",onClick:i.handleLotDelete},{default:C(()=>[w($(t.$t("lots.new.deleteLot")),1)]),_:1},8,["onClick"])]),_:1},8,["field"]),x(r,{ref:`${l.hideStorePath}/${o.lot.id}`,field:`${l.hideStorePath}/${o.lot.id}`},{default:C(()=>[o.lot.hidden?(k(),_(d,{key:1,color:"black",class:"px-10 rounded-[12px]",onClick:i.handleLotShow},{default:C(()=>[w($(t.$t("lots.new.showLot")),1)]),_:1},8,["onClick"])):(k(),_(d,{key:0,color:"red",class:"px-10 rounded-[12px]",onClick:i.handleLotHide},{default:C(()=>[w($(t.$t("lots.new.hideLot")),1)]),_:1},8,["onClick"]))]),_:1},8,["field"])])),o.lot.doNotRemove?L("",!0):(k(),_(r,{key:6,ref:`${l.doNotRemoveStorePath}/${o.lot.id}`,field:`${l.doNotRemoveStorePath}/${o.lot.id}`},{default:C(()=>[x(d,{color:"red",class:"px-10 rounded-[12px]",onClick:i.hanldeDoNotRemove},{default:C(()=>[...e[10]||(e[10]=[w(" Ðе ÑкÑÑваÑÑ Ð»Ð¾Ñ ",-1)])]),_:1},8,["onClick"])]),_:1},8,["field"])),P("div",et,[x(d,{color:"gray",class:"px-10 rounded-[12px]",onClick:i.handleChangePrices},{default:C(()=>[...e[11]||(e[11]=[w(" ÐзмениÑÑ ÑÐµÐ½Ñ ",-1)])]),_:1},8,["onClick"]),x(d,{color:"gray",class:"px-10 rounded-[12px]",onClick:i.hanldeAddTag},{default:C(()=>[...e[12]||(e[12]=[w(" ÐобавиÑÑ Ñег ",-1)])]),_:1},8,["onClick"]),o.lot.partner?L("",!0):(k(),_(d,{key:0,color:"gray",class:"px-10 rounded-[12px]",onClick:i.handleLotUpdatePartner},{default:C(()=>[...e[13]||(e[13]=[w(" УказаÑÑ Ð¿Ð°ÑÑнÑÑа ",-1)])]),_:1},8,["onClick"]))]),o.lot.tags?(k(),b(S,{key:7},[o.lot.tags.length>0?(k(),b("div",at,[(k(!0),b(S,null,I(o.lot.tags,(e,a)=>(k(),b("div",{key:a,class:"relative"},[x(h,{to:t.$localePath(`/admin/tags/${e.id}`),class:"py-1 px-2 border border-green-400 rounded-md hover:border-green-600"},{default:C(()=>[w($(e.name),1)]),_:2},1032,["to"]),P("button",{class:"absolute -top-2 -right-2 z-10 cursor-pointer flex flex-none text-gray-800",onClick:t=>i.handleClickRemoveLot(e.id)},[x(c,{class:"w-4 h-4 hover:stroke-red-501 stroke-red-300 hover:scale-125"})],8,ot)]))),128))])):L("",!0)],64)):L("",!0)])}]]),{__name:"AdminLots"}),lt={props:{states:{type:Array,default:()=>[]}},setup:()=>({changeParams:f().changeParams}),data:()=>({checked:[]}),computed:{possibleState:()=>["NEW","MODERATED","BLOCKED"]},watch:{states:{handler(){this.checked=this.states,this.handleChange()},deep:!0}},mounted(){this.checked=this.states,this.handleChange()},methods:{handleChange(){this.changeParams({key:"states",value:this.checked})}}},it={class:"flex flex-col flex-wrap ml-4"},nt=["id","name","value"],rt=["for"];const dt=Object.assign(t(lt,[["render",function(t,e,a,o,s,l){return k(),b("div",it,[(k(!0),b(S,null,I(l.possibleState,t=>(k(),b("div",{key:t,class:"mr-4"},[R(P("input",{id:t,"onUpdate:modelValue":e[0]||(e[0]=t=>s.checked=t),name:t,value:t,type:"checkbox",onChange:e[1]||(e[1]=(...t)=>l.handleChange&&l.handleChange(...t))},null,40,nt),[[D,s.checked]]),P("label",{for:t},$(t),9,rt)]))),128))])}]]),{__name:"AdminLotsLotFilterByStatus"}),ht={props:{pageInfo:{type:Object,default:()=>{}}},setup:()=>({params:f().params,changeParams:f().changeParams,submitLotsFilters:f().submitLotsFilters}
1),computed:{visiblePageLinks(){const t=[...new Set([1,this.pageInfo.prevPage,this.pageInfo.currentPage,this.pageInfo.nextPage,this.pageInfo.totalPages])].filter(t=>null!==t);return this.pageInfo.currentPage>3&&t.splice(1,0,null),this.pageInfo.totalPages>this.pageInfo.currentPage+2&&t.splice(t.length-1,0,null),t}},methods:{generateLink(t){const e=Object.assign({},this.params);e.page=t;return`?${Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}`},handleChangePage(t){this.changeParams({key:"page",value:t}),this.submitLotsFilters()},prevPage(){this.changeParams({key:"page",value:this.pageInfo.prevPage}),this.submitLotsFilters()},nextPage(){this.changeParams({key:"page",value:this.pageInfo.nextPage}),this.submitLotsFilters()}}},ct={class:"pagination"};const ut=Object.assign(t(ht,[["render",function(t,e,o,s,l,i){const n=a;return k(),b("div",ct,[P("span",null,"ÐÑего: "+$(o.pageInfo.totalCount),1),o.pageInfo.prevPage?(k(),b("button",{key:0,class:"page-link",onClick:e[0]||(e[0]=(...t)=>i.prevPage&&i.prevPage(...t))},[...e[2]||(e[2]=[P("svg",{width:"5",height:"7",viewBox:"0 0 5 7"},[P("path",{d:"M3.72009 6.75L4.6543 5.8319L2.53588 3.75L4.6543 1.6681L3.72009 0.75L0.654297 3.75L3.72009 6.75Z",fill:"#B1B1B1"})],-1)])])):L("",!0),(k(!0),b(S,null,I(i.visiblePageLinks,(t,e)=>(k(),b(S,null,[t?(k(),_(n,{key:e,to:i.generateLink(t),class:U([{selected:Number(o.pageInfo.currentPage)===Number(t)},"page-link"]),event:"",onClick:e=>i.handleChangePage(t)},{default:C(()=>[w($(t),1)]),_:2},1032,["to","class","onClick"])):(k(),b("div",{key:`.${e}`,class:"page-link-dots"},"..."))],64))),256)),o.pageInfo.nextPage?(k(),b("button",{key:1,class:"page-link",onClick:e[1]||(e[1]=(...t)=>i.nextPage&&i.nextPage(...t))},[...e[3]||(e[3]=[P("svg",{width:"5",height:"7",viewBox:"0 0 5 7"},[P("path",{d:"M1.58851 6.75L0.654297 5.8319L2.77272 3.75L0.654297 1.6681L1.58851 0.75L4.6543 3.75L1.58851 6.75Z",fill:"#B1B1B1"})],-1)])])):L("",!0)])}],["__scopeId","data-v-07ec0eff"]]),{__name:"AdminLotsLotPagination"}),pt={components:{RmBtn:e},data(){return{lotId:(this._.provides[r]||this.$route).query.id}},watch:{"$route.query.user"(){this.lotId=(this._.provides[r]||this.$route).query.id}},methods:{handleSubmitSearchByOrderID(){this.lotId.length>1&&this.$router.push(this.$localePath(`/admin/lots?id=${this.lotId}`))}}};const mt=Object.assign(t(pt,[["render",function(t,e,a,o,s,l){const i=v("RmBtn");return k(),b("div",null,[e[3]||(e[3]=w(" Lot ID ",-1)),P("form",{class:"flex flex-row",onSubmit:e[1]||(e[1]=A((...t)=>l.handleSubmitSearchByOrderID&&l.handleSubmitSearchByOrderID(...t),["prevent"]))},[R(P("input",{id:"search-order","onUpdate:modelValue":e[0]||(e[0]=t=>s.lotId=t),type:"search",name:"search-order",class:"p-2 border border-gray-400 rounded-md min-w-[400px]",placeholder:"Lot ID"},null,512),[[q,s.lotId]]),x(i,{color:"super-light",type:"submit",disabled:!s.lotId,class:"p-2 mx-2 border border-gray-400 rounded-md"},{default:C(()=>[...e[2]||(e[2]=[w(" ÐоиÑк ",-1)])]),_:1},8,["disabled"])],32)])}]]),{__name:"AdminLotsLotSearchById"}),ft={setup:()=>({changeParams:f().changeParams,tags:f().tags}),data(){return{tagId:(this._.provides[r]||this.$route).query.tag,tag:""}}
1,watch:{tag(t){const e=t?t.id:void 0;this.changeParams({key:"tag",value:e})}},mounted(){this.tag=this.tags.find(t=>t.id===(this._.provides[r]||this.$route).query.tag),this.changeParams({key:"tag",value:this.tagId})}},gt=["value"];const yt=Object.assign(t(ft,[["render",function(t,e,a,o,s,l){return k(),b("div",null,[e[3]||(e[3]=P("div",null,"Tag",-1)),R(P("select",{"onUpdate:modelValue":e[0]||(e[0]=t=>s.tag=t),placeholder:"ÐÑбеÑиÑе Ñег",class:"px-2 py-3 border border-gray-500 rounded-md safari-class"},[e[1]||(e[1]=P("option",{value:"",disabled:"",selected:""},"ÐÑбеÑиÑе Ñег",-1)),e[2]||(e[2]=P("option",{value:void 0},null,-1)),(k(!0),b(S,null,I(o.tags,(t,e)=>(k(),b("option",{key:e,value:t},$(t.name),9,gt))),128))],512),[[F,s.tag]])])}],["__scopeId","data-v-de886a9b"]]),{__name:"AdminLotsLotSearchByTag"}),vt={__name:"AdminLotsLotSearchByUser",setup(t){const a=B(),o=O(),s=f().changeParams,l=j(a.query.user),i=()=>{l.value.length>1&&o.push(o.resolve(`/admin/lots?user=${l.value}`).href)},n=()=>{s({key:"user",value:l.value})};return M(()=>a.query.user,t=>{l.value=t,n()}),N(()=>{n()}),(t,a)=>(k(),b("div",null,[a[2]||(a[2]=w(" User ID ",-1)),P("form",{class:"flex flex-row",onSubmit:A(i,["prevent"])},[R(P("input",{id:"search-order","onUpdate:modelValue":a[0]||(a[0]=t=>l.value=t),type:"search",name:"search-order",class:"p-2 border border-gray-400 rounded-md min-w-[400px]",placeholder:"User ID"},null,512),[[q,l.value]]),x(e,{color:"super-light",type:"submit",disabled:!l.value,class:"p-2 mx-2 border border-gray-400 rounded-md"},{default:C(()=>[...a[1]||(a[1]=[w(" ÐоиÑк ",-1)])]),_:1},8,["disabled"])],32)]))}},kt={class:"flex gap-x-5"},bt={__name:"index",async setup(t){let e,a;const o=d(),{$gql:l}=h(),i=y(),n=f(),r=i.lotsCollection,p=i.pageInfo,{data:m,pending:g}=([e,a]=E(async()=>c("lots",async()=>{let t=["NEW","MODERATED","BLOCKED"];try{const{result:e}=await l.request(s.fetchTags,{showHidden:!1});n.setTags(e),o.query.states?.length>0&&(t=o.query.states.split(","));const a=parseInt(o.query.page)||1;return o.query.tag?.length>0?await i.fetchLotsByTagsId({page:a,tagId:parseInt(o.query.tag),states:t}):o.query.user?.length>0?await i.fetchlotsForAdminByUserId({page:a,states:t,id:parseInt(o.query.user)}):o.query.id?.length>0?await i.fetchlotForAdminByLotId({page:a,states:t,id:parseInt(o.query.id)}):await i.fetchlotsForAdmin({page:a,states:t}),{states:t}}catch{return{states:t}}},{watch:[()=>o.query]})),e=await e,a(),e);M(g,t=>{u().setLoading(t)});const v=t=>{t.result&&(t.result.lot.state&&i.adminSetState({id:t.id,lotState:t.result.lot.state}),!0===t.result.lot.hidden&&i.adminHideLot(t.id),!1===t.result.lot.hidden&&i.adminShowLot(t.id),!0===t.result.lot.deleted&&i.adminDeleteLot(t.id),!0===t.result.lot.doNotRemove&&i.adminDoNotDelete(t.id),t.result.lot.prices&&i.adminUpdatePrices({id:t.id,prices:t.result.lot.prices}))},$=()=>{n.submitLotFilters()};return(t,e)=>(k(),b("div",null,[e[0]||(e[0]=P("h2",null,"ÐоÑÑ",-1)),x(vt),x(mt),e[1]||(e[1]=P("hr",{class:"my-5"},null,-1)),P("div",kt,[x(yt),x(dt,{states:T(m)?.states},null,8,["states"])]),P("button",{class:"p-1 border border-gray-400 rounded-sm mt-5",onClick:$}," ÐÑимениÑÑ ÑилÑÑÑ "),T(p)&&T(p).totalPages>1?(k(),_(ut,{key:0,"page-info":T(p),class:"w-full"},null,8,["page-info"])):L("",!0),(k(!0),b(S,null,I(T(r),t=>(k(),_(st,{key:t.id,lot:t,onUpdate:v},null,8,["lot"]))),128)),T(p)&&T(p).totalPages>1?(k(),_(ut,{key:1,"page-info":T(p),class:"w-full"},null,8,["page-info"])):L("",!0)]))}};export{bt as default}; 2//# sourceMappingURL=bU1rxvZ9.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.