"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[69427],{24659:(e,a,t)=>{t.d(a,{A:()=>o});t(65043);var l=t(67784),n=t(4701),s=t(17392),i=t(10155),d=t(70579);const u=(0,n.A)({}),r=e=>{let{onClick:a}=e;return(0,d.jsx)(s.A,{onClick:a,children:(0,d.jsx)(i.A,{})})},o=e=>{const a=u();return(0,d.jsx)(l.A,{InputProps:{...a,endAdornment:(0,d.jsxs)(d.Fragment,{children:[" ",e.iscross&&(0,d.jsx)(r,{onClick:null!==e&&void 0!==e&&e.textclear?e.textclear:""})]})},...e})}},69427:(e,a,t)=>{t.r(a),t.d(a,{default:()=>j});var l=t(65043),n=t(68903),s=t(11906),i=t(53193),d=t(38624),u=t(96446),r=t(24659),o=t(63516),m=t(14556),c=t(73216),v=t(11852),S=t(66675),h=t(73033),x=(t(10480),t(70579));const g={StageName:"",StatusValuesID:""},A=h.Ik().shape({StageName:h.Yj("Enter Stage Name ").required("Stage Name is required"),StatusValuesID:h.Ik().nullable().required("Select Status")});function j(){const e=[{id:"Active",name:"Active"},{id:"InActive",name:"In Active"}],[a,t]=(0,l.useState)(g),h=(0,m.wA)(),j=(0,c.Zp)(),p=l.useRef(null),I=(0,c.zy)(),N=null===I||void 0===I?void 0:I.state,V=null===N||void 0===N?void 0:N._original;(0,l.useEffect)((()=>{V&&t({StageName:null===V||void 0===V?void 0:V.stage_name,StatusValuesID:{id:null===V||void 0===V?void 0:V.status,name:null===V||void 0===V?void 0:V.status}})}),[V]);return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{className:"component-list",children:[(0,x.jsx)(n.Ay,{container:!0,className:"d-flex justify-content-between align-items-center",py:1,children:(0,x.jsxs)(n.Ay,{item:!0,className:"common-header-label",children:[(0,x.jsx)(s.A,{onClick:()=>{j(-1)},children:(0,x.jsx)(S.A,{})}),"Update Land Lord Meeting Stage"]})}),(0,x.jsx)(o.l1,{enableReinitialize:!0,innerRef:p,initialValues:a,validationSchema:A,onSubmit:async(e,a)=>{var t,l;const n={stageID:null!==V&&void 0!==V&&V.id?null===V||void 0===V?void 0:V.id:"",stageName:null!==e&&void 0!==e&&e.StageName?null===e||void 0===e?void 0:e.StageName:"",status:null!==e&&void 0!==e&&null!==(t=e.StatusValuesID)&&void 0!==t&&t.id?null===e||void 0===e||null===(l=e.StatusValuesID)||void 0===l?void 0:l.id:""};a.setSubmitting(!0),await h((0,v.e79)(n)),j("/bd-masters/LandLordMeetingStage")},children:a=>{let{errors:t,handleSubmit:m,handleChange:c,setFieldValue:v,handleBlur:S,isSubmitting:h,isValid:g,touched:A,values:j}=a;return(0,x.jsxs)(o.lV,{onSubmit:m,children:[(0,x.jsx)(n.Ay,{container:!0,className:"component-form",children:(0,x.jsxs)(n.Ay,{container:!0,children:[(0,x.jsx)(n.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,x.jsx)(r.A,{id:"StageName",name:"StageName",fullWidth:!0,onBlur:S,onChange:c,value:j.StageName,error:A.StageName&&Boolean(t.StageName),helperText:t.StageName&&t.StageName,size:"small",label:"Stage Name *",variant:"outlined"})}),(0,x.jsx)(n.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,x.jsx)(i.A,{fullWidth:!0,variant:"standard",children:(0,x.jsx)(d.A,{disablePortal:!0,id:"StatusValuesID",options:e||[],name:"StatusValuesID",value:j.StatusValuesID,size:"small",getOptionLabel:e=>e.name||"",renderOption:(e,a)=>(0,l.createElement)("li",{...e,style:{textAlign:"left"},key:a.id},a.name),onChange:(e,a)=>{v("StatusValuesID",a)},renderInput:e=>(0,x.jsx)(r.A,{...e,fullWidth:!0,label:"Status*",name:"StatusValuesID",variant:"outlined",helperText:t.StatusValuesID&&t.StatusValuesID,error:t.StatusValuesID&&Boolean(t.StatusValuesID)})})})})]})}),(0,x.jsx)(n.Ay,{className:"d-flex justify-content-center",p:2,children:(0,x.jsx)(u.A,{children:(0,x.jsx)(s.A,{type:"submit",text:"SAVE",variant:"contained",size:"medium",disabled:h,children:"SAVE"})})})]})}})]})})}},10155:(e,a,t)=>{var l=t(24994);a.A=void 0;var n=l(t(40039)),s=t(70579);a.A=(0,n.default)((0,s.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,a,t)=>{var l=t(24994);a.A=void 0;var n=l(t(40039)),s=t(70579);a.A=(0,n.default)((0,s.jsx)("path",{d:"M3 18h13v-2H3zm0-5h10v-2H3zm0-7v2h13V6zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5z"}),"MenuOpen")},10480:()=>{}}]);
//# sourceMappingURL=69427.a455e846.chunk.js.map