1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3229],{88914:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/inspector/summary/[id]",function(){return t(25739)}])},58178:function(n,e,t){"use strict";var i=t(15311);t(20132);var o=t(81215);e.Z=function(n){return(0,i.jsx)(o.Z,{multiline:!0,height:"auto",...n})}},64289:function(n,e,t){"use strict";var i=t(3247),o=t(15311),r=t(64344);function s(){let n=(0,i._)(["\n width: 100%;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n"]);return s=function(){return n},n}let l=(0,t(84819).ZP)("div")(s());e.Z=function(){return(0,o.jsx)(l,{children:(0,o.jsx)(r.Z,{})})}},33483:function(n,e,t){"use strict";var i=t(3247),o=t(15311),r=t(84819);function s(){let n=(0,i._)(["\n width: 100%;\n height: 2px;\n background-color: ",";\n margin-bottom: 25px;\n"]);return s=function(){return n},n}t(20132);let l=(0,r.ZP)("div")(s(),n=>{let{theme:e}=n;return e.palette.grey[300]});e.Z=()=>(0,o.jsx)(l,{})},25739:function(n,e,t){"use strict";t.r(e),t.d(e,{StatusLabel:function(){return L},SummaryContentWrapper:function(){return T},SummaryLabel:function(){return E},SummaryValue:function(){return z},__N_SSP:function(){return D},default:function(){return F}});var i=t(3247),o=t(15311),r=t(20132),s=t(80185),l=t(54001),d=t(82570),a=t(10796),c=t(37637),u=t(84819),m=t(33483),p=t(64289),x=t(19828),h=t(33326),f=t.n(h),g=t(23262),j=t(72155),v=t(91054),y=t(8487),I=t(28500),Z=t(41953),w=t(85843),b=t.n(w),S=t(63161),C=t(6634),_=t(52691),k=t(58178);function N(){let n=(0,i._)(["\n font-size: 16px;\n color: #26284e;\n width: 30%;\n border-left: 1px solid #9f9ea7;\n border-top: 1px solid #9f9ea7;\n border-bottom: 1px solid #9f9ea7;\n text-align: right;\n maxwidth: 225px;\n background-color: #d9eeff;\n padding: 10px;\n font-weight: bold;\n line-height: inherit;\n "," {\n border: 1px solid #9f9ea7;\n width: 100%;\n }\n"]);return N=function(){return n},n}function P(){let n=(0,i._)(["\n font-size: 16px;\n width: 70%;\n border: 1px solid #9f9ea7;\n line-height: inherit;\n padding: 10px;\n "," {\n width: 100%;\n }\n"]);return P=function(){return n},n}function R(){let n=(0,i._)(["\n display: flex;\n"]);return R=function(){return n},n}function A(){let n=(0,i._)(["\n font-size: 24px;\n font-weight: 500;\n color: ",";\n margin-bottom: 20px;\n margin-top: 40px;\n width: 100%;\n span {\n font-size: 15px;\n font-weight: 500;\n color: ",";\n }\n span:hover {\n cursor: pointer;\n text-decoration: underline;\n }\n"]);return A=function(){return n},n}var D=!0;let E=(0,u.ZP)(s.Z)(N(),n=>{let{theme:e}=n;return e.breakpoints.down("lg")}),z=(0,u.ZP)(s.Z)(P(),n=>{let{theme:e}=n;return e.breakpoints.down("lg")}),T=(0,u.ZP)("div")(R()),L=(0,u.ZP)(s.Z)(A(),n=>{let{theme:e}=n;return e.palette.secondary.dark},n=>{let{theme:e}=n;return e.color.blue});function F(){var n,e,t,i,u,h,w,N;let P=(0,x.useRouter)(),{data:R,isLoading:A}=(0,Z.nZ)(),{data:D,isLoading:F}=(0,Z.a4)(P.query.id),[q,O]=(0,r.useState)({inspectionId:Number(P.query.id),inspectionStatusId:0,dueDate:null,notes:(()=>{let n={};null==D||D.forEach(e=>{let t=e.roomTypeName,i=" ".concat(e.roomAttributeName," ").concat(""!=e.itemComments?"-":""," ").concat(e.itemComments,"\n");n[e.unitInspectionSummaryRoomsId]||(n[e.unitInspectionSummaryRoomsId]={roomName:t,items:[]}),n[e.unitInspectionSummaryRoomsId].items.push(i)});let e="Failed Inspection Checklist\n\n";for(let t in n){let i=n[t];e+=" ".concat(i.roomName,":\n").concat(i.items.join(""),"\n ")}return e.trim()})()}),{data:G,isLoading:W}=(0,Z.A4)(),B=(0,C.Z)(_.r.breakpoints.down("sm")),H=()=>{M(q)},{mutate:M}=(0,Z.sS)(()=>{y.Am.dismiss(),P.push({pathname:"/inspector"})},()=>{y.Am.error((0,o.jsx)(v.Z,{text:(0,o.jsx)(I.Z,{i18nKey:"LANDLORD:RFTA_ERROR_ON_SAVE"})}))}),V=()=>{y.Am.info((0,o.jsxs)("div",{children:[(0,o.jsxs)(s.Z,{fontSize:"20px",marginBottom:"10px",color:"black",fontWeight:500,textAlign:"center",children:["Are you sure you want to finalize this inspection?"," "]}),(0,o.jsx)(j.MG,{size:"small",onClick:H,children:"Yes"}),(0,o.jsx)(j.MG,{style:{marginLeft:"10px"},size:"small",onClick:()=>{y.Am.dismiss()},children:"No"})]}),{position:"top-right",autoClose:!1})},X=n=>{O(e=>({...e,notes:n}))},J=n=>{O(e=>({...e,inspectionStatusId:n}))},U=R&&(null==R?void 0:null===(n=R.data)||void 0===n?void 0:n.filter(n=>n.inspectionScheduleId==P.query.id));return((0,r.useEffect)(()=>{void 0!=U&&0!=U.length&&O(n=>{var e,t;return{...n,inspectionStatusId:(null===(e=U[0])||void 0===e?void 0:e.statusId)==10?0:null===(t=U[0])||void 0===t?void 0:t.statusId}})},[R]),(0,r.useEffect)(()=>
1{if(D){let n={};null==D||D.forEach(e=>{let t=e.roomTypeName,i=" ".concat(e.roomAttributeName," ").concat(""!=e.itemComments?"-":""," ").concat(e.itemComments,"\n");n[e.unitInspectionSummaryRoomsId]||(n[e.unitInspectionSummaryRoomsId]={roomName:t,items:[]}),n[e.unitInspectionSummaryRoomsId].items.push(i)});let e=0!==D.length?"Failed Inspection Checklist\n\n":"";for(let t in n){let i=n[t];e+=" ".concat(i.roomName,":\n").concat(i.items.join(""),"\n ")}O(n=>({...n,notes:null==e?void 0:e.trim()}))}},[D]),W||A||F)?(0,o.jsx)(p.Z,{}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f(),{children:(0,o.jsx)("title",{children:"Inspector"})}),(0,o.jsx)(g.UU,{children:(0,o.jsx)(l.ZP,{container:!0,justifyContent:"center",alignItems:"center",flexDirection:"column",sx:{width:"100%",marginTop:"00px",padding:"20px",[_.r.breakpoints.down("sm")]:{margin:"20px"}},children:(0,o.jsx)(l.ZP,{item:!0,xs:12,sm:12,md:12,lg:12,style:{width:"100%"},children:(0,o.jsx)(d.Z,{sx:{width:"100%",borderRadius:4,backgroundColor:"unset",marginBottom:"60px"},children:(0,o.jsxs)(a.Z,{sx:{overflow:"auto",background:"#fff",borderRadius:"16px"},children:[(0,o.jsx)(j.pY,{onClick:()=>{P.push({pathname:"/inspector/view/[id]",query:{id:P.query.id}})}}),(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:"34px",color:"#26284e",fontWeight:700,alignItems:"center",marginTop:"20px",lineHeight:"2rem"},children:(0,o.jsxs)("p",{children:[" Inspection - ID-",P.query.id]})}),(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:B?"18px":"25px",color:"#26284e",alignItems:"center",marginTop:"10px"},children:(0,o.jsx)("p",{children:b()(Date.now()).format(S.$7)})}),(0,o.jsx)("div",{style:{margin:"1rem 0px 1rem 0px"},children:(0,o.jsx)(m.Z,{})}),(0,o.jsxs)(l.ZP,{style:{marginBottom:"20px"},children:[(0,o.jsx)(s.Z,{sx:{fontWeight:"bold"},children:"Inspection Summary/Comments"}),(0,o.jsxs)(T,{children:[(0,o.jsx)(E,{children:"PHA"}),(0,o.jsx)(z,{children:"Housing Authority of the City of El Paso, TX"})]}),(0,o.jsxs)(T,{children:[(0,o.jsx)(E,{children:"Date of Inspection"}),(0,o.jsx)(z,{children:b()(null===(e=U[0])||void 0===e?void 0:e.inspectionDate).format(S.Jc)})]}),(0,o.jsxs)(T,{children:[(0,o.jsx)(E,{children:"Date Last Inspection"}),(0,o.jsx)(z,{children:(null===(t=U[0])||void 0===t?void 0:t.lastInspectionDate)?(0,o.jsx)(o.Fragment,{children:b()(null===(i=U[0])||void 0===i?void 0:i.lastInspectionDate).format(S.Jc)}):""})]}),(0,o.jsxs)(T,{children:[(0,o.jsx)(E,{children:"Name of Family"}),(0,o.jsx)(z,{children:null===(u=U[0])||void 0===u?void 0:u.landlordName})]}),(0,o.jsxs)(T,{children:[(0,o.jsx)(E,{children:"Current Telephone of Family"}),(0,o.jsx)(z,{children:(n=>{if(""!=n&&null!=n){let e=n.replace(/\D/g,"").match(/^(\d{3})(\d{3})(\d{4})$/);if(e)return"(".concat(e[1],")").concat(e[2],"-").concat(e[3])}return n})(null===(h=U[0])||void 0===h?void 0:h.landLordPhone)})]})]})," ",(0,o.jsxs)(L,{sx:{margin:"18px 0 0px"},children:["Status",(0,o.jsx)("span",{style:{color:"red"},children:"*"})]}),(0,o.jsxs)(j.RG,{defaultValue:"0",value:null==q?void 0:q.inspectionStatusId,onChange:n=>J(n.target.value),children:[(0,o.jsx)(c.Z,{value:"0",children:"Select"}),null==G?void 0:null===(N=G.data)||void 0===N?void 0:null===(w=N.filter(n=>(null==n?void 0:n.id)!=10))||void 0===w?void 0:w.map(n=>(0,o.jsx)(c.Z,{value:n.id,disabled:void 0!=D&&0!=D.length&&8==n.id,children:n.description},n.id))]}),(0,o.jsx)(l.ZP,{item:!0,xs:12,sm:12,md:12,lg:12,style:{width:"100%"},children:(0,o.jsx)(k.Z,{minRows:10,onChange:n=>X(n.target.value),value:null==q?void 0:q.notes,style:{width:"100%"}})}),(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,o.jsx)(j.MG,{size:"small",onClick:()=>{(null==q?void 0:q.inspectionStatusId)!=0?V():y.Am.error((0,o.jsx)(v.Z,{text:"Please change the status"}))},style:{padding:"20px",marginTop:"20px"},children:"Save and Continue"})})]})})})})})]})}}},function(n){n.O(0,[6637,8753,6282,608,2888,9774,179],function(){return n(n.s=88914)}),_N_E=n.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.