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