"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[21884],{55093:(e,n,t)=>{t.d(n,{A:()=>a});t(65043);var i=t(67784),s=t(34535),r=t(70579);const l=(0,s.Ay)(i.A)((e=>{let{theme:n}=e;return{root:{"& .MuiTextField-root":{margin:n.spacing(1)}},textarea:{resize:"vertical",minHeight:"50px"}}})),a=e=>{const{name:n,value:t,onChange:i,error:s,touched:a,id:o,size:d,label:c,sx:u,rows:m,...v}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(l,{name:n||"name",fullWidth:!0,multiline:!0,rows:m||2,value:t,sx:u||{},onChange:i,error:a&&Boolean(s),helperText:a&&s,id:o||n,size:d||"small",label:c,variant:"outlined"})})}},24659:(e,n,t)=>{t.d(n,{A:()=>c});t(65043);var i=t(67784),s=t(4701),r=t(17392),l=t(10155),a=t(70579);const o=(0,s.A)({}),d=e=>{let{onClick:n}=e;return(0,a.jsx)(r.A,{onClick:n,children:(0,a.jsx)(l.A,{})})},c=e=>{const n=o();return(0,a.jsx)(i.A,{InputProps:{...n,endAdornment:(0,a.jsxs)(a.Fragment,{children:[" ",e.iscross&&(0,a.jsx)(d,{onClick:null!==e&&void 0!==e&&e.textclear?e.textclear:""})]})},...e})}},21884:(e,n,t)=>{t.r(n),t.d(n,{default:()=>j});var i=t(65043),s=t(11906),r=t(68903),l=t(85865),a=(t(24659),t(73033),t(14556)),o=t(73216),d=(t(31254),t(11852)),c=t(6994),u=(t(1266),t(30731),t(2448),t(66675)),m=t(96801),v=(t(55093),t(70579));const h={taskPlanOwnerId:null,changeRemark:""},x=(0,m.Gq)("enuseloc"),p=x&&Object.keys(x).length>0?x.user_id:null,f=[];const j=function(e){var n;i.useRef(null);const[t,m]=(0,i.useState)(h),x=(0,o.zy)().state,j=(0,a.d4)((e=>{var n;return null===(n=e.crm.getSiteVisitFeedbackDetail)||void 0===n?void 0:n.data})),[A,g]=i.useState(""),[k,y]=(0,i.useState)(!1),b=(0,a.wA)(),D=(0,o.Zp)(),[z,C]=(0,i.useState)([]),S=(0,a.d4)((e=>{var n;return null===(n=e.bd.getFunctionalityPermissionDetail)||void 0===n?void 0:n.data})),F=(0,i.useRef)("NO"),I=(0,i.useRef)("NO");return(0,i.useEffect)((()=>{const e={userID:p,functionalityID:262,functionalityItemIDs:f};return b((0,d.P8M)(e)),()=>{b((0,d.qo7)())}}),[]),(0,i.useEffect)((()=>(S&&262===(null===S||void 0===S?void 0:S.functionalityID)&&(C(S),F.current=null===S||void 0===S?void 0:S.permission_report,I.current=null===S||void 0===S?void 0:S.permission_admin),()=>{C([]),F.current="NO",I.current="NO"})),[S]),(0,i.useEffect)((()=>{if(x){var e;const n={feedbackID:null===x||void 0===x||null===(e=x._original)||void 0===e?void 0:e.id,generalSearch:"",sortOrder:"",iDisplayStart:0,iDisplayLength:-1};b((0,c.Y$0)(n))}}),[x,k]),console.log("getSiteVisitFeedbackDetail",j),(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{className:"component-list project-steps",children:[(0,v.jsxs)(s.A,{onClick:()=>{D(-1)},children:[" ",(0,v.jsx)(u.A,{})," Site Visit Feedback"]}),(0,v.jsx)(r.Ay,{container:!0,className:"component-form form-details",children:j&&(null===(n=j[0])||void 0===n?void 0:n.feedback.map((e=>(0,v.jsx)(r.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,v.jsx)(r.Ay,{container:!0,children:(0,v.jsxs)(r.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:[(0,v.jsxs)(l.A,{variant:"h6",sx:{fontWeight:"Medium"},children:[(0,v.jsxs)("span",{children:[e&&e.question_id," : "]}),e&&e.question_name]}),(0,v.jsx)(l.A,{variant:"h6",className:"info-header",sx:{ml:3},children:e&&e.answer})]})})},e.id))))})]})})}},10155:(e,n,t)=>{var i=t(24994);n.A=void 0;var s=i(t(40039)),r=t(70579);n.A=(0,s.default)((0,r.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},66675:(e,n,t)=>{var i=t(24994);n.A=void 0;var s=i(t(40039)),r=t(70579);n.A=(0,s.default)((0,r.jsx)("path",{d:"M3 18h13v-2H3zm0-5h10v-2H3zm0-7v2h13V6zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5z"}),"MenuOpen")},1266:()=>{}}]);
//# sourceMappingURL=21884.9d529352.chunk.js.map