"use strict";(self.webpackChunkkns_reports=self.webpackChunkkns_reports||[]).push([[74463],{24659:(e,n,i)=>{i.d(n,{A:()=>c});i(65043);var t=i(67784),a=i(4701),l=i(17392),s=i(10155),o=i(70579);const d=(0,a.A)({}),r=e=>{let{onClick:n}=e;return(0,o.jsx)(l.A,{onClick:n,children:(0,o.jsx)(s.A,{})})},c=e=>{const n=d();return(0,o.jsx)(t.A,{InputProps:{...n,endAdornment:(0,o.jsxs)(o.Fragment,{children:[" ",e.iscross&&(0,o.jsx)(r,{onClick:null!==e&&void 0!==e&&e.textclear?e.textclear:""})]})},...e})}},74463:(e,n,i)=>{i.r(n),i.d(n,{default:()=>N});var t=i(65043),a=i(68903),l=i(11906),s=i(96446),o=i(63516),d=i(24659),r=i(73216),c=i(14556),u=i(66675),m=i(11852),v=i(96801),h=i(73033),x=(i(10480),i(70579));const g={StageName:""},j=h.Ik().shape({StageName:h.Yj("Enter Stage Name ").required("Stage Name is required")}),A=[],S=(0,v.Gq)("enuseloc"),p=S&&Object.keys(S).length>0?S.user_id:null;const N=function(e){const n=t.useRef(null),[i,v]=(0,t.useState)(g),h=(0,c.wA)(),S=(0,r.Zp)(),[N,f]=(0,t.useState)([]),b=(0,c.d4)((e=>{var n;return null===(n=e.bd.getFunctionalityPermissionDetail)||void 0===n?void 0:n.data})),y=t.useRef("No"),k=t.useRef("No");return(0,t.useEffect)((()=>{const e={userID:p,functionalityID:106,functionalityItemIDs:A};return h((0,m.P8M)(e)),()=>{h((0,m.qo7)())}}),[]),(0,t.useEffect)((()=>(b&&106===(null===b||void 0===b?void 0:b.functionalityID)&&(f(b),y.current=null===b||void 0===b?void 0:b.permission_report,k.current=null===b||void 0===b?void 0:b.permission_admin),()=>{f([]),y.current="NO",k.current="NO"})),[b]),(0,x.jsxs)("div",{className:"component-list",children:[(0,x.jsx)(a.Ay,{container:!0,className:"d-flex justify-content-between align-items-center",py:1,children:(0,x.jsxs)(a.Ay,{item:!0,className:"common-header-label",children:[(0,x.jsx)(l.A,{onClick:()=>{S(-1)},children:(0,x.jsx)(u.A,{})}),"Add Land Lord Meeting Stage"]})}),N&&Object.keys(N).length>0&&106===(null===N||void 0===N?void 0:N.functionalityID)&&("YES"===(null===N||void 0===N?void 0:N.permission_admin)||"YES"===(null===N||void 0===N?void 0:N.AddLegalTask))?(0,x.jsx)(o.l1,{enableReinitialize:!0,innerRef:n,initialValues:i,validationSchema:j,onSubmit:async(e,n)=>{console.log(e,"nithish");const i={stageName:null!==e&&void 0!==e&&e.StageName?null===e||void 0===e?void 0:e.StageName:""};n.setSubmitting(!0),await h((0,m.j9b)(i)),n.resetForm({}),S("/bd-masters/LandLordMeetingStage")},children:e=>{let{errors:n,handleSubmit:i,handleChange:t,setFieldvalue:r,handleBlur:c,isSubmitting:u,isValid:m,touched:h,values:j}=e;return(0,x.jsx)(o.lV,{onSubmit:i,children:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(a.Ay,{container:!0,className:"component-form",children:(0,x.jsx)(a.Ay,{container:!0,children:(0,x.jsx)(a.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,p:1,children:(0,x.jsx)(d.A,{fullWidth:!0,name:"StageName",onBlur:c,onChange:t,value:null===j||void 0===j?void 0:j.StageName,error:(null===n||void 0===n?void 0:n.StageName)&&Boolean(null===n||void 0===n?void 0:n.StageName),helperText:(null===n||void 0===n?void 0:n.StageName)&&(null===n||void 0===n?void 0:n.StageName),id:"StageName",size:"small",label:"Stage Name *",variant:"outlined"})})})}),(0,x.jsxs)(a.Ay,{className:"d-flex justify-content-end",p:2,children:[(0,x.jsxs)(s.A,{mx:2,children:[" ",(0,x.jsx)(l.A,{text:"CANCEL",variant:"contained",size:"medium",type:"reset",color:"secondary",onClick:()=>{v(g)},children:"RESET"})]}),(0,x.jsx)(s.A,{children:(0,x.jsx)(l.A,{type:"submit",text:"SAVE",variant:"contained",size:"medium",disabled:u,children:"SAVE"})})]})]})})}}):(0,x.jsx)("div",{className:"common-header-label-bold",children:"You don't have permission to access this page!"})]})}},10155:(e,n,i)=>{var t=i(24994);n.A=void 0;var a=t(i(40039)),l=i(70579);n.A=(0,a.default)((0,l.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,n,i)=>{var t=i(24994);n.A=void 0;var a=t(i(40039)),l=i(70579);n.A=(0,a.default)((0,l.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=74463.1507dd1c.chunk.js.map