"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),v=s(66675),h=s(11852),x=s(96801),g=(s(17115),s(70579));const I=(0,x.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,x]=(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,h.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,h.cUq)({taskCategoryID:"",taskStatus:"",taskOwnerID:"",generalSearch:"",sortOrder:"",iDisplayStart:0,iDisplayLength:"-1"}))}),[]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"common-header-label-bold",children:[(0,g.jsx)(i.A,{onClick:()=>{b(-1)},children:(0,g.jsx)(v.A,{})}),"Update Fee Item"]}),(0,g.jsx)("div",{className:"component-list",children:(0,g.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,h.pBM)(n)),b("/liaison-master/GovernmentFeesItem")},children:e=>{let{errors:t,handleSubmit:s,handleChange:a,handleBlur:u,setFieldValue:m,isSubmitting:c,isValid:v,touched:h,values:x}=e;return(0,g.jsx)(d.lV,{onSubmit:s,children:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.Ay,{container:!0,className:"component-form",children:(0,g.jsxs)(n.Ay,{container:!0,children:[(0,g.jsx)(n.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,g.jsx)(o.A,{fullWidth:!0,label:"Item Name*",name:"itemName",onBlur:u,value:x.itemName,onChange:(e,t)=>{m("itemName",t),D({...f,itemName:e.target.value})},variant:"outlined",size:"small",helperText:h.itemName&&t.itemName,error:h.itemName&&Boolean(t.itemName)})}),(0,g.jsx)(n.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,g.jsx)(l.A,{name:"statusID",value:x.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,g.jsx)(o.A,{...e,fullWidth:!0,label:"Status *",name:"statusID",variant:"outlined",helperText:h.statusID&&t.statusID,error:h.statusID&&Boolean(t.statusID)})})})]})}),(0,g.jsx)(n.Ay,{className:"d-flex justify-content-center",p:2,children:(0,g.jsx)(r.A,{children:(0,g.jsx)(i.A,{type:"submit",text:"SAVE",variant:"contained",size:"medium",disabled:c,children:"SAVE"})})})]})})}})})]})}},10155:(e,t,s)=>{var a=s(24994);t.A=void 0;var i=a(s(40039)),n=s(70579);t.A=(0,i.default)((0,n.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")}}]);
//# sourceMappingURL=34691.4f214d33.chunk.js.map