"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[54670],{69875:(e,t,a)=>{a.d(t,{A:()=>l});a(65043);const l=a.p+"static/media/Upload.4216d61323e67ba8fcaf839d79ad9d80.svg"},24659:(e,t,a)=>{a.d(t,{A:()=>o});a(65043);var l=a(67784),s=a(4701),i=a(17392),n=a(10155),r=a(70579);const u=(0,s.A)({}),c=e=>{let{onClick:t}=e;return(0,r.jsx)(i.A,{onClick:t,children:(0,r.jsx)(n.A,{})})},o=e=>{const t=u();return(0,r.jsx)(l.A,{InputProps:{...t,endAdornment:(0,r.jsxs)(r.Fragment,{children:[" ",e.iscross&&(0,r.jsx)(c,{onClick:null!==e&&void 0!==e&&e.textclear?e.textclear:""})]})},...e})}},54670:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var l=a(65043),s=a(11906),i=a(68903),n=a(38624),r=a(96446),u=a(24659),c=(a(69875),a(63516)),o=a(14556),d=a(73033),m=a(73216),p=a(66675),h=a(11852),v=a(96801),x=(a(17115),a(70579));const j=(0,v.Gq)("enuseloc"),A=j&&Object.keys(j).length>0?j.user_id:null;console.log("LoginuserId",A);const g={particular:"",statusID:""},I=d.Ik().shape({particular:d.Yj("Enter Particular").required("Particular is required"),statusID:d.Ik().nullable().required("Select Status")});const b=function(e){const t=(0,m.zy)(),a=(null===t||void 0===t?void 0:t.state)._original;console.log("milestoneTypeData",a);const[d,v]=(0,l.useState)(!1),j=[{id:"Active",name:"Active"},{id:"InActive",name:"In Active"}],A=l.useRef(null),[b,f]=(0,l.useState)(g),D=(0,o.wA)(),k=(0,m.Zp)();(0,l.useEffect)((()=>{a&&f({...b,particular:null===a||void 0===a?void 0:a.particular,statusID:{id:null===a||void 0===a?void 0:a.status,name:null===a||void 0===a?void 0:a.status}})}),[a]),console.log("milestoneTypeData",a);const y=()=>{const{particular:e,...t}=g;f({...b,...t})};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"common-header-label-bold",children:[(0,x.jsx)(s.A,{onClick:()=>{k(-1)},children:(0,x.jsx)(p.A,{})}),"Update Land Lord Meeting Particular"]}),(0,x.jsx)("div",{className:"component-list",children:(0,x.jsx)(c.l1,{enableReinitialize:!0,innerRef:A,validationSchema:I,initialValues:b,onSubmit:async(e,t)=>{var l,s;const i={particularID:null===a||void 0===a?void 0:a.id,particular:e.particular,status:null!==(l=e.statusID)&&void 0!==l&&l.id?null===(s=e.statusID)||void 0===s?void 0:s.id:""};console.log("finalPayload",i),t.setSubmitting(!0),await D((0,h.PK1)(i)),y(),k("/bd-masters/LandLordMeetingParticular")},children:e=>{let{errors:t,handleSubmit:a,handleChange:l,handleBlur:o,setFieldValue:d,isSubmitting:m,isValid:p,touched:h,values:v}=e;return(0,x.jsx)(c.lV,{onSubmit:a,children:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.Ay,{container:!0,className:"component-form",children:(0,x.jsxs)(i.Ay,{container:!0,children:[(0,x.jsx)(i.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,x.jsx)(u.A,{fullWidth:!0,label:"Particular*",name:"particular",onBlur:o,value:v.particular,onChange:(e,t)=>{d("particular",t),f({...b,particular:e.target.value})},variant:"outlined",size:"small",helperText:h.particular&&t.particular,error:h.particular&&Boolean(t.particular)})}),(0,x.jsx)(i.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,x.jsx)(n.A,{name:"statusID",value:v.statusID,fullWidth:!0,options:j||[],onBlur:o,size:"small",getOptionLabel:e=>e.name||"",onChange:(e,t)=>{d("statusID",t),f({...b,statusID:t})},renderInput:e=>(0,x.jsx)(u.A,{...e,fullWidth:!0,label:"Status *",name:"statusID",variant:"outlined",helperText:t.statusID&&t.statusID,error:t.statusID&&Boolean(t.statusID)})})})]})}),(0,x.jsx)(i.Ay,{className:"d-flex justify-content-center",p:2,children:(0,x.jsx)(r.A,{children:(0,x.jsx)(s.A,{type:"submit",text:"SAVE",variant:"contained",size:"medium",disabled:m,children:"SAVE"})})})]})})}})})]})}}}]);
//# sourceMappingURL=54670.1ff84b56.chunk.js.map