"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[34691],{69875:(e,t,s)=>{s.d(t,{A:()=>a});s(65043);const a=s.p+"static/media/Upload.4216d61323e67ba8fcaf839d79ad9d80.svg"},24659:(e,t,s)=>{s.d(t,{A:()=>u});s(65043);var a=s(67784),i=s(4701),n=s(17392),l=s(10155),r=s(70579);const o=(0,i.A)({}),d=e=>{let{onClick:t}=e;return(0,r.jsx)(n.A,{onClick:t,children:(0,r.jsx)(l.A,{})})},u=e=>{const t=o();return(0,r.jsx)(a.A,{InputProps:{...t,endAdornment:(0,r.jsxs)(r.Fragment,{children:[" ",e.iscross&&(0,r.jsx)(d,{onClick:null!==e&&void 0!==e&&e.textclear?e.textclear:""})]})},...e})}},34691:(e,t,s)=>{s.r(t),s.d(t,{default:()=>f});var a=s(65043),i=s(11906),n=s(68903),l=s(38624),r=s(96446),o=s(24659),d=(s(69875),s(63516)),u=s(14556),m=s(73033),c=s(73216),h=s(66675),v=s(11852),g=s(96801),x=(s(17115),s(70579));const I=(0,g.Gq)("enuseloc"),p=I&&Object.keys(I).length>0?I.user_id:null;console.log("LoginuserId",p);const j={itemName:"",statusID:""},A=m.Ik().shape({statusID:m.Ik().nullable().required("Status is required"),itemName:m.Yj("Enter Item Name").required("Item Name is required")});const f=function(e){const t=(0,c.zy)().state,s=t._original;console.log("liaisonProcessCategoryData",s),(0,u.d4)((e=>e.bd.getProjectTask));const[m,g]=(0,a.useState)(!1),I=a.useRef(null),p=(a.useRef(null),a.useRef(null),(0,u.d4)((e=>e.bd.getLiaisonProcessCategoryMaster)));console.log("getLiaisonProcessCategoryMaster",p);const[f,D]=(0,a.useState)(j),N=(0,u.wA)(),b=(0,c.Zp)();return(0,a.useEffect)((()=>{if(t){const e={status:"",generalSearch:"",sortOrder:"",iDisplayStart:0,iDisplayLength:-1};N((0,v.mL2)(e))}}),[t,m]),(0,a.useEffect)((()=>{s&&D({...f,itemName:null===s||void 0===s?void 0:s.item_name,statusID:{id:null===s||void 0===s?void 0:s.status,name:null===s||void 0===s?void 0:s.status}})}),[s]),(0,a.useEffect)((()=>{N((0,v.cUq)({taskCategoryID:"",taskStatus:"",taskOwnerID:"",generalSearch:"",sortOrder:"",iDisplayStart:0,iDisplayLength:"-1"}))}),[]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"common-header-label-bold",children:[(0,x.jsx)(i.A,{onClick:()=>{b(-1)},children:(0,x.jsx)(h.A,{})}),"Update Fee Item"]}),(0,x.jsx)("div",{className:"component-list",children:(0,x.jsx)(d.l1,{enableReinitialize:!0,innerRef:I,validationSchema:A,initialValues:f,onSubmit:async(e,t)=>{var a,i;console.log("values",e);const n={feesItemID:null!==s&&void 0!==s&&s.id?null===s||void 0===s?void 0:s.id:"",itemName:null!==e&&void 0!==e&&e.itemName?null===e||void 0===e?void 0:e.itemName:"",status:null!==e&&void 0!==e&&null!==(a=e.statusID)&&void 0!==a&&a.id?null===e||void 0===e||null===(i=e.statusID)||void 0===i?void 0:i.id:""};t.setSubmitting(!0),await N((0,v.pBM)(n)),b("/liaison-master/GovernmentFeesItem")},children:e=>{let{errors:t,handleSubmit:s,handleChange:a,handleBlur:u,setFieldValue:m,isSubmitting:c,isValid:h,touched:v,values:g}=e;return(0,x.jsx)(d.lV,{onSubmit:s,children:(0,x.jsxs)(x.Fragment,{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)(o.A,{fullWidth:!0,label:"Item Name*",name:"itemName",onBlur:u,value:g.itemName,onChange:(e,t)=>{m("itemName",t),D({...f,itemName:e.target.value})},variant:"outlined",size:"small",helperText:v.itemName&&t.itemName,error:v.itemName&&Boolean(t.itemName)})}),(0,x.jsx)(n.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,x.jsx)(l.A,{name:"statusID",value:g.statusID,fullWidth:!0,options:[{id:"Active",name:"Active"},{id:"InActive",name:"In Active"}],onBlur:u,size:"small",getOptionLabel:e=>e.name||"",onChange:(e,t)=>{m("statusID",t),D({...f,statusID:t})},renderInput:e=>(0,x.jsx)(o.A,{...e,fullWidth:!0,label:"Status *",name:"statusID",variant:"outlined",helperText:v.statusID&&t.statusID,error:v.statusID&&Boolean(t.statusID)})})})]})}),(0,x.jsx)(n.Ay,{className:"d-flex justify-content-center",p:2,children:(0,x.jsx)(r.A,{children:(0,x.jsx)(i.A,{type:"submit",text:"SAVE",variant:"contained",size:"medium",disabled:c,children:"SAVE"})})})]})})}})})]})}}}]);
//# sourceMappingURL=34691.f00b97d7.chunk.js.map