1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{34987:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/landlord/manage-rfta/List",function(){return n(19525)}])},19525:function(e,r,n){"use strict";n.r(r),n.d(r,{__N_SSP:function(){return b}});var t=n(15311),s=n(87944),a=n(70238),i=n(38239),l=n(67914),d=n(72155),o=n(77822),c=n(88207),u=n(88928),x=n(36809),m=n(13028),h=n(23262),f=n(57017),j=n(3497),p=n(54001),g=n(64344),_=n(19393),C=n(28500),P=n(5762),Z=n(17723),D=n(86541),A=n(47735),N=n(7762),O=n(99649),v=n(38382),y=n(33483),L=n(21236),R=n(85843),S=n.n(R),I=n(63161),T=n(33659),E=n(20132),w=n(970),F=n(92114),b=!0;r.default=()=>{var e;let r=(0,P.useRouter)(),{data:n}=(0,T.v$)(),[R,b]=E.useState(!1),[k,U]=E.useState(0),Q=(0,F.NL)(),{control:W,watch:q,setValue:V,getValues:z}=(0,Z.cI)({defaultValues:{sortOrder:"DESC",search:"",filter:0,sortColumn:"createdOn"},resolver:(0,f.F)(a.Zy)}),{data:G,isLoading:K,isError:X,isSuccess:Y,currentPage:B,pageSize:J,setPageSize:M,allRecords:$,setAllRecordsTrue:H,setCurrentPage:ee,numberOfItemsOnPage:er,refetch:en}=(0,m.y)({useQuery:s.EC,search:null===(e=q("search"))||void 0===e?void 0:e.trim(),sortOrder:q("sortOrder"),filter:q("filter"),sortColumn:q("sortColumn")}),{isLoading:et,isError:es,isSuccess:ea}=(0,i.gv)(),{data:ei,isLoading:el}=(0,L.g)(),ed=e=>{b(!0),U(e)},eo=async()=>{await Q.invalidateQueries({queryKey:["all_rftas"]}),b(!1),U(0),en()},ec=[22,24],eu=((null==G?void 0:G.data)||[]).filter(e=>!ec.includes(e.rftaProcessStatusID)).map(e=>{let r=null==ei?void 0:ei.filter(r=>r.id===(null==e?void 0:e.addressStateId));return{id:e.rftA_ID,propertyName:e.propertyName,rftaID:e.rftA_ID,tenantName:e.tenantName,createdOn:S()(null==e?void 0:e.createdOn).format(I.Jc),address:void 0!==r&&0!==r.length?"".concat(e.addressLine1?e.addressLine1:""," \n ").concat(e.addressLine2?e.addressLine2:""," \n\n ").concat(r[0].state," ").concat(e.addressCity?e.addressCity:""," \n ").concat(e.addressZipcode?e.addressZipcode:""," "):"".concat(e.addressLine1?e.addressLine1:"","\n ").concat(e.addressLine2?e.addressLine2:""," \n ").concat(e.addressCity?e.addressCity:""," \n ").concat(e.addressZipcode?e.addressZipcode:""," "),status:15===e.rftaProcessStatusID?"Submitted, Pending Tenant Approval":e.rftA_Process_Status,actions:null,rftaProcessStatusID:e.rftaProcessStatusID}});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Nm,{children:(0,t.jsxs)(N.Z,{navigation:(0,t.jsx)(c.X,{}),children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Z,{onClick:()=>{r.push("/landlord/manage-rfta")}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:"24px",color:"#26284e",fontWeight:700,alignItems:"center"},children:(0,t.jsx)("p",{children:" Request for Tenancy Approval (RFTA) "})}),(0,t.jsx)("div",{style:{margin:"1rem 0px 1rem 0px"},children:(0,t.jsx)(y.Z,{})})]}),(0,t.jsxs)(p.ZP,{container:!0,flexDirection:"column",flexWrap:"nowrap",children:[(0,t.jsx)(p.ZP,{item:!0,children:(0,t.jsxs)(p.ZP,{container:!0,alignItems:"center",flexDirection:{xs:"column",md:"row"},spacing:2,marginBottom:4,children:[(0,t.jsxs)(p.ZP,{item:!0,xs:12,md:2,children:[(0,t.jsx)(D.Z,{control:W,endpoint:"rfta",filterName:"filter",watch:q}),(0,t.jsx)(Z.Qr,{name:"sortOrder",control:W,render:e=>{let{field:r}=e;return(0,t.jsx)(_.Z,{className:"icon",onClick:()=>V("sortOrder","ASC"===z("sortOrder")?"DESC":"ASC"),...r,children:"ASC"===q("sortOrder")?(0,t.jsx)(l.oe,{}):(0,t.jsx)(l.gS,{})})}})]}),(0,t.jsx)(p.ZP,{item:!0,xs:12,md:6,children:(0,t.jsx)(Z.Qr,{name:"search",control:W,defaultValue:"",render:e=>{let{field:{onChange:r,...n}}=e;return(0,t.jsx)(d._l,{placeholder:"Search",InputProps:{endAdornment:(0,t.jsx)(j.Z,{})},onChange:e=>{r(e)},...n})}})}),(null==n?void 0:n.isImpersonatedUser)!==!0&&(0,t.jsx)(p.ZP,{item:!0,xs:12,md:4,children:(0,t.jsx)(d.MG,{size:"medium",sx:{minWidth:"225px"},onClick:()=>r.push(x.default.LANDLORD_RFTA_CREATE.ROUTE),children:(0,t.jsx)(C.Z,{i18nKey:"LANDLORD:RFTA_CREATE_NEW_RFTA"})})})]})}),(X||es)&&(0,t.jsx)("div",{children:(0,t.jsx)(C.Z,{i18nKey:"LANDLORD:RFTAS_NOT_FOUND"})}),(K||et||el)&&(0,t.jsx)(p.ZP,{item:!0,flexGrow:1,children:(0,t.jsx)(p.ZP,{container:!0,justifyContent:"center",alignItems:"center",height:"100%",children:(0,t.jsx)(g.Z,{})})}),Y&&ea&&(0,t.jsx)(p.ZP,{container:!0,flexGrow:1,marginBottom:"20px",children:(0,t.jsx)(O.Z,{columns:[{id:"actions",label:"Actions",minWidth:110,align:"center",render:e=>{let{id:s,rftaProcessStatusID:a}=e;return(0,t.jsxs)(p.ZP,{container:!0,justifyContent:"center",children:[(0,t.jsx)(A.Qh,{onClick:()=>r.push({pathname:x.default.LANDLORD_VIEW_RFTA.ROUTE,query:{id:s}}),children:(0,t.jsx)(l.ON,{})}),(null==n?void 0:n.isImpersonatedUser)?(0,t.jsx)(A.Qh,{onClick:()=>r.push({pathname:x.default.LANDLORD_EDIT_RFTA.ROUTE,query:{id:s}}),children:(0,t.jsx)(l.dY,{})}):(0,t.jsx)(t.Fragment,{children:(null==n?void 0:n.isImpersonatedUser)!==!0&&(26===a||28===a||5===a||11===a||12===a)?(0,t.jsx)(A.Qh,{onClick:()=>ed(s),disabled:!0,children:(0,t.jsx)(l.dY,{})}):(0,t.jsx)(A.Qh,{disabled:4!==a&&15!==a&&16!==a,onClick:()=>r.push({pathname:x.default.LANDLORD_EDIT_RFTA.ROUTE,query:{id:s}}),children:(0,t.jsx)(l.dY,{})})})]})}},{id:"rftaID",label:"RFTA ID",align:"left",render:e=>{let{value:r}=e;return r}},{id:"propertyName",label:"Property Name",align:"left",render:e=>{let{value:r}=e;return r}},{id:"address",label:"Address",align:"left",render:e=>{let{value:r}=e;return r}},{id:"tenantName",label:"Tenant Name",align:"left",render:e=>{let{value:r}=e;return r}},{id:"status",label:"Status",align:"left",render:e=>{var r;let{value:n}=e;return(0,t.jsxs)(p.ZP,{alignItems:"center",container:!0,spacing:1,children:[(0,t.jsx)(p.ZP,{item:!0,xs:2,children:(0,t.jsx)(A.ex,{color:null===(r=o.D.find(e=>e.name===n))||void 0===r?void 0:r.color})}),(0,t.jsx)(p.ZP,{item:!0,xs:10,children:(0,t.jsx)("span",{children:n})})]})}},{id:"createdOn",label:"Created Date",align:"left",render:e=>{let{value:r}=e;return r}}],rows:eu,control:W,watch:q,setValue:V,getValues:z})}),(0,t.jsx)(p.ZP,{item:!0,justifySelf:"flex-end",alignItems:"center",height:"70px",marginTop:"40px",children:(0,t.jsx)(u.Z,{allRecords:$,currentPage:B,isLoading:K,isSuccess:Y,numberOfItemsOnPage:er,pageSize:J,setAllRecordsTrue:H,setCurrentPage:ee,setPageSize:M,totalPages:null==G?void 0:G.totalPages,totalRows:null==G?void 0:G.totalRows})})]})]})}),(0,t.jsx)(w.Z,{rftaId:k,open:R,handleClose:eo,title:"Upload Lease Contract"})]})}}},function(e){e.O(0,[6637,8753,9912,7017,8830,4598,5262,608,8026,2978,2888,9774,179],function(){return e(e.s=34987)}),_N_E=e.O()}]);
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.