2 lines
4.8 KiB
JavaScript
2 lines
4.8 KiB
JavaScript
|
|
"use strict";(self["webpackChunkcomplexes"]=self["webpackChunkcomplexes"]||[]).push([[610],{16610:function(e,l,a){a.r(l),a.d(l,{default:function(){return F}});var t=a(90144),s=a(56768),r=a(69689),o=a(84305),i=a(24232),n=a(6095),c=a(51549),u=a(55234),d=a(92068),m=a(81387),p=a(50731),v=a(98470),k=(a(54279),a(22093)),g=a(6192);a(74143);const y={class:"flex justify-end gap-2"},P={class:"wrapper"};var x={__name:"ArchivedListItems",setup(e){const l=(0,m.lq)(),a=(0,m.rd)(),r=(0,t.KR)(!1),x=(0,o.D)(),{rowsComplex:C,archivedTotalRecords:f,totalRecords:L,archivedAllPages:_,activeType:R,archivedComplexes:h,activePage:b,complex_filter:A,loaders:F}=(0,u.bP)(x),K=(0,t.KR)(null),T=(0,t.KR)(!1),X=(0,t.KR)(null),q=(0,t.KR)(0),I=(0,g.K)();function D(){var e=parseInt(q.value/C.value+1);b.value=e,a.replace({query:{...l.query,page:b.value}})}const w=e=>{k.A.archiveComplex({complex_id:e.id,archive:!1}).then((e=>{var l=e.data;"done"==l.result&&(x.getArchivedListComplex(),L.value=L.value+1)}))},E=()=>{k.A.deleteComplex(K.value.id).then((e=>{var l=e.data;"done"==l.result&&(x.getArchivedListComplex(),K.value=null)}))};(0,s.wB)(A,(e=>{if(e){const l={selectedMetros:e.selectedMetros,selectedRayons:e.selectedRayons,selectedTypes:e.selectedTypes,complexes:e.complexes,rooms:e.rooms,useSquarePrice:e.useSquarePrice,rayons:e.rayons,squareKitchen_min:e.squareKitchen_min,squareKitchen_max:e.squareKitchen_max,selectedComplexes:e.selectedComplexes,selectedDecorations:e.selectedDecorations,selectedComplexTypes:e.selectedComplexTypes,address:e.address,period:e.period,area_from:e.area_from,area_to:e.area_to,floor_from:e.floor_from,floor_to:e.floor_to,price_from:e.price_from,price_to:e.price_to,selectedPaymentTypes:e.selectedPaymentTypes,selectedInstallments:e.selectedInstallments,initialPayment:e.initialPayment,paymentTerm:e.paymentTerm,installmentPrice_min:e.installmentPrice.min,installmentPrice_max:e.installmentPrice.max};(0,s.dY)((()=>{a.replace({query:l})}))}}),{deep:!0});return(0,s.sV)((()=>{q.value=(b.value-1)*C.value,I.refetchDecorationsList()})),(e,l)=>{const a=(0,s.g2)("Button"),o=(0,s.g2)("Dialog"),u=(0,s.g2)("Paginator");return(0,s.uX)(),(0,s.CE)(s.FK,null,[((0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[(0,s.bF)(o,{visible:K.value,"onUpdate:visible":l[1]||(l[1]=e=>K.value=e),modal:"",header:"Удалить Комплекс?",style:{width:"25rem"}},{default:(0,s.k6)((()=>[(0,s.Lk)("div",y,[(0,s.bF)(a,{type:"button",label:"Нет",severity:"secondary",onClick:l[0]||(l[0]=e=>K.value=null)}),(0,s.bF)(a,{type:"button",label:"Да",onClick:E,style:{"background-color":"#4caf50",border:"none"}})])])),_:1},8,["visible"])])),(0,s.Lk)("div",P,[(0,s.bF)((0,t.R1)(p.A),{collapsed:"",toggleable:""},{togglericon:(0,s.k6)((()=>[(0,s.Lk)("div",{onClick:l[2]||(l[2]=e=>r.value=!r.value),style:{color:"#757575"}},(0,i.v_)(r.value?"Свернуть форму":"Развернуть форму"),1),(0,s.bF)(d.A)])),default:(0,s.k6)((()=>[(0,s.bF)(n.A,{onClear:(0,t.R1)(x).clearFilters,filter:(0,t.R1)(A),onOnSubmit:l[3]||(l[3]=()=>(0,t.R1)(x).getArchivedListComplex(!1))},null,8,["onClear","filter"])])),_:1}),(0,s.Lk)("div",{class:(0,i.C4)(["listItems",`listItems--${(0,t.R1)(R)}`])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)((0,t.R1)(h),(e=>((0,s.uX)(),(0,s.Wv)(c.A,{complex:e,onComplexEdit:()=>{X.value=e,T.value=!0},onComplexArchive:()=>w(e),onComplexDelete:()=>K.value=e,key:e.id,class:(0,i.C4)(["tile"===(0,t.R1)(R)?"medium":"table"===(0,t.R1)(R)?"small":""])},null,8,["complex","onComplexEdit","onComplexArchive","onComplexDelete","class"])))),128))],2),(0,t.R1)(_)>1?((0,s.uX)(),(0,s.Wv)(u,{key:0,first:q.value,"onUpdate:first":[l[4]||(l[4]=e=>q.value=e),D],style:{margin:"20px 0"},template:{"640px":"PrevPageLink CurrentPageReport NextPageLink","960px":"FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink","1300px":"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink JumpToPageDropdown JumpToPageInput"},rows:10,totalRecords:(0,t.R1)(f)},null,8,["first","totalRecords"])):(0,s.Q3)("",!0),(
|
||
|
|
//# sourceMappingURL=1ae3b8a3babb4739.js.map
|