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