1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6457],{77957:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var i=r(n(64938)),o=n(85893),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=a},64938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(58372)},58372:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return i.Z},createChainedFunction:function(){return o.Z},createSvgIcon:function(){return a.Z},debounce:function(){return u.Z},deprecatedPropType:function(){return l},isMuiElement:function(){return c.Z},ownerDocument:function(){return d.Z},ownerWindow:function(){return s.Z},requirePropFactory:function(){return p},setRef:function(){return m},unstable_ClassNameGenerator:function(){return y},unstable_useEnhancedEffect:function(){return h.Z},unstable_useId:function(){return f.Z},unsupportedProp:function(){return Z},useControlled:function(){return g.Z},useEventCallback:function(){return v.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return x.Z}});var r=n(37078),i=n(98216),o=n(35893),a=n(82066),u=n(57144);var l=function(e,t){return()=>null},c=n(71579),d=n(8038),s=n(5340);n(87462);var p=function(e,t){return()=>null},m=n(7960).Z,h=n(58974),f=n(27909);var Z=function(e,t,n,r,i){return null},g=n(49299),v=n(2068),b=n(51705),x=n(18791);const y={configure:e=>{console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join("\n")),r.Z.configure(e)}}},61291:function(e,t,n){"use strict";n.d(t,{Mm:function(){return d},NI:function(){return m},a2:function(){return s},dF:function(){return f},oA:function(){return h},rr:function(){return Z},un:function(){return p}});var r=n(59499),i=n(11496),o=n(86886),a=n(99226),u=n(83321),l=n(15861),c=n(4059),d=((0,i.ZP)(o.ZP)({maxWidth:"1300px",padding:"32px 0",paddingTop:"0px !important",margin:"auto",width:"100%"}),(0,i.ZP)("p")({fontSize:"16px",margin:0,paddingTop:"10px",marginBottom:"10px"}),(0,i.ZP)(c.k)((function(e){var t=e.theme;return{background:t.palette.secondary.main,color:"white",fontWeight:"bold",width:300,":hover":{background:t.palette.secondary.main}}}))),s=(0,i.ZP)(o.ZP)((function(e){var t=e.theme;return(0,r.Z)({margin:"auto",textAlign:"center",width:"100%",maxWidth:850,marginTop:"0"},t.breakpoints.up("sm"),{marginTop:"3rem"})})),p=(0,i.ZP)(a.Z)((function(e){e.theme;return{width:140,height:140,margin:"auto",position:"relative",cursor:"pointer"}})),m=(0,i.ZP)("img")({width:140,height:140,objectFit:"cover",borderRadius:"50%"}),h=(0,i.ZP)(u.Z)((function(e){var t=e.theme,n=e.hasimage,r=void 0!==n&&n;return{minWidth:35,padding:0,height:35,borderRadius:"14px",backgroundColor:"#DA70D6",border:"unset",position:"absolute",right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:t.palette.common.white,"&:hover":{backgroundColor:"#DA70D6"},":after":{content:"true"===r?"unset":'""',position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"20px",height:"1px",backgroundColor:t.palette.common.white},":before":{content:"true"===r?"unset":'""',position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",height:"20px",width:"1px",backgroundColor:t.palette.common.white}}})),f=(0,i.ZP)(d)({borderRadius:18,margin:"2rem auto"}),Z=((0,i.ZP)(c.k)((function(e){var t=e.theme;return{color:t.palette.common.black,border:"1px solid ".concat(t.palette.common.black)}})),(0,i.ZP)(c.k)((function(e){var t=e.theme;return{background:t.palette.secondary.main,color:"white",":hover":{background:t.palette.secondary.main}}})));(0,i.ZP)(l.Z)({fontSize:14,maxWidth:342,textAlign:"justify"})},10438:function(e,t,n){"use strict";n.d(t,{X:function(){return j}});var r=n(27812),i=n(74231),o=n(75806),a=n(49793),u=n(99226),l=n(86886),c=n(15861),d=n(82175),s=n(67294),p=n(84888),m=n(61291),h=n(88767),f=n(80793),Z=n(64016),g=n(2734),v=n(98456),b=n(92177),x=n(25567),y=n(77957),P=n(35944),O=function(e){var t=e.setFieldValue,n=e.photo,r=e.hasImage,i=void 0!==r&&r,o=(0,g.Z)(),a=(0,x.wj)(),l=a.uploadOnFile,c=a.state,d=(0,x.QV)(l),p=d.InputComponent,h=d.onFilePick;return(0,s.useEffect)((function(){c.items.length>0&&!c.items[0].uploading&&t("photoUrl",c.items[0].url)}),[c]),(0,P.BX)(u.Z,{children:[(0,P.BX)(m.un,{sx:{border:"none"},onClick:h,children:[c.items.length&&c.items[0].uploading?(0,P.tZ)(v.Z,{sx:{width:"2rem",color:o.palette.primary.main}}):!n&&(0,P.tZ)(b.L,{}),n&&(0,P.tZ)(m.NI,{src:(0,Z.h)(n)}),(0,P.tZ)(m.oA,{type:"button",hasimage:i.toString(),children:i&&(0,P.tZ)(y.Z,{})})]}),p]})},w=n(11163),k=n(73124),S=n(74088),C=n(69500),_=n(7504),N=n(76342),j=function(e){var t=e.user,n=e.isEdit,s=void 0!==n&&n,Z=(0,h.useQueryClient)(),g=(0,w.useRouter)(),v=(0,k.Ds)().enqueueSnackbar,b={language:(null===t||void 0===t?void 0:t.language)||"English",gender:(null===t||void 0===t?void 0:t.gender)||"gender",photoUrl:(null===t||void 0===t?void 0:t.photoUrl)||"",fullName:(null===t||void 0===t?void 0:t.fullName)||"",occupation:(null===t||void 0===t?void 0:t.occupation)||"",address:(null===t||void 0===t?void 0:t.address)||"",yearsOfExperience:(null===t||void 0===t?void 0:t.yearsOfExperience)||0,phoneNumber:(null===t||void 0===t?void 0:t.phoneNumber)||"",zipCode:(null===t||void 0===t?void 0:t.zipCode)||"",state:(null===t||void 0===t?void 0:t.state)||"state",city:(null===t||void 0===t?void 0:t.city)||""},x=(0,p.kDo)(),y=x.mutateAsync,j=x.isLoading,I=(0,p.StM)(),E=I.mutateAsync,z=I.isLoading;return(0,P.tZ)(d.J9,{initialValues:b,validationSchema:i.Ry({language:i.Z_(),fullName:i.Z_().required("Your name is required"),gender:i.Z_().oneOf([p.Y0t.Male,p.Y0t.N
1onBinary,p.Y0t.Other,p.Y0t.PreferNotToSay,p.Y0t.Female],"Gender muset be selected"),occupation:i.Z_().required("Your Occupation is required"),address:i.Z_(),yearsOfExperience:i.Z_(),city:i.Z_(),state:i.Z_(),zipCode:i.Z_().matches(S.hN,"Zip code is not valid").required("This field is required"),phoneNumber:i.Z_().matches(C.Oj,"Phone number is not valid").required("This field is required"),photoUrl:i.Z_()}),enableReinitialize:!0,onSubmit:function(e){var n={language:e.language,fullName:e.fullName,occupation:e.occupation,gender:e.gender,address:e.address,yearsOfExperience:+e.yearsOfExperience,city:e.city,state:"state"===e.state?"":e.state,zipCode:e.zipCode,phoneNumber:e.phoneNumber,photoUrl:e.photoUrl,isSocial:!1};e.gender&&(n.gender=e.gender),s?(n.id=null===t||void 0===t?void 0:t.id,y({input:n},{onSuccess:function(){Z.refetchQueries(["user_getUsers",{where:{user:{id:{eq:null===t||void 0===t?void 0:t.id}}}}]),g.back(),v("User Successfully updated!",{variant:"success"})}})):E({input:n},{onSuccess:function(){Z.refetchQueries("user_getUsers"),g.back(),v("User Successfully created!",{variant:"success"})}})},children:function(e){var n=e.setFieldValue,i=e.values;return(0,P.tZ)(d.l0,{children:(0,P.tZ)(u.Z,{padding:4,paddingTop:"0",alignItems:"center",justifyContent:"center",minHeight:"100vh",children:(0,P.BX)(m.a2,{container:!0,flexDirection:"column",children:[(0,P.tZ)(l.ZP,{item:!0,children:(0,P.tZ)(O,{hasImage:!(null===t||void 0===t||!t.photoUrl),setFieldValue:n,photo:i.photoUrl})}),(0,P.tZ)(l.ZP,{item:!0,mt:3,mb:1,children:(0,P.tZ)(c.Z,{color:"grey.text",children:null===t||void 0===t?void 0:t.email})}),(0,P.BX)(l.ZP,{sx:{textAlign:"left"},item:!0,container:!0,marginTop:5,columnSpacing:3.75,children:[(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(o.Ii,{label:"Full name",name:"fullName",placeholder:"Full name",fullWidth:!0})}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(a.N,{rounded:!0,options:(0,_.mb)(),holder:!0,label:"Gender",name:"gender"})}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(o.Ii,{label:"Occupation",name:"occupation",placeholder:"Occupation",fullWidth:!0})}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(o.Ii,{label:"Address",name:"address",placeholder:"Address",fullWidth:!0})}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(o.Ii,{label:"Years of experience",name:"yearsOfExperience",placeholder:"Years of experience",fullWidth:!0,type:"number"})}),(0,P.BX)(l.ZP,{item:!0,container:!0,sm:6,xs:12,spacing:3.75,children:[(0,P.tZ)(l.ZP,{xs:6,item:!0,children:(0,P.tZ)(a.N,{options:[{option:"State",value:"state",disabled:!0}].concat((0,r.Z)((0,f.Pz)("United States").map((function(e){return{option:e,value:e}})))),holder:!0,label:"State",name:"state",rounded:!0})}),(0,P.tZ)(l.ZP,{xs:6,item:!0,children:(0,P.tZ)(o.Ii,{label:"City",name:"city",placeholder:"City",fullWidth:!0})})]}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(o.Ii,{label:"Phone number",name:"phoneNumber",placeholder:"+1234567890",fullWidth:!0})}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:12,children:(0,P.tZ)(o.Ii,{name:"zipCode",label:"Zip code",placeholder:"Zip code",fullWidth:!0})}),(0,P.tZ)(l.ZP,{item:!0,sm:6,xs:1,children:(0,P.tZ)(a.N,{rounded:!0,name:"language",placeholder:"Language",options:Object.keys(N.SA).map((function(e){return{option:e,value:e}}))})})]}),(0,P.tZ)(m.dF,{loading:j||z,disabled:j||z,type:"submit",children:s?"Save":"Create"})]})})})}})}},48013:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(59499),i=n(55319),o=n(67294),a=n(50709),u=n(25171),l=n(89944),c=n(31434),d=n(11163),s=n(23337),p=n(14416),m=n(99226),h=n(15861),f=n(35944);function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=(0,i.Z)("div",{target:"eazrcdz0"})({name:"1m721wh",styles:"background:white;padding:20px 20px;@media(max-width: 570px){margin-top:115px;}padding-top:80px;flex:1"});function b(e){e.sidebarItems;var t=e.children,n=e.isSearch,r=e.SearchComponent,i=void 0===r?(0,f.tZ)("div",{}):r;return function(){var e=(0,p.I0)(),t=(0,p.v9)((function(e){var t=e.pageData;return null===t||void 0===t?void 0:t.path})),n=(0,d.useRouter)(),r=(0,s.RU)(n.pathname);(0,o.useEffect)((function(){r!==t&&e((0,l.wR)(g(g({},c.n),{},{path:r})))}),[t,r])}(),(0,f.BX)(f.HY,{children:[(0,f.tZ)(a.Z,{isSearch:n,isAdmin:!0,SearchComponent:i}),(0,f.BX)(m.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh","@media(max-width: 570px)":{minHeight:"calc(100vh - 115px)"}},children:[(0,f.tZ)(v,{children:t}),(0,f.tZ)(m.Z,{sx:{textAlign:"left",padding:3,marginLeft:10},children:(0,f.tZ)(h.Z,{fontSize:"14px",children:"Developed by APSY"})})]}),(0,f.tZ)(u.Z,{})]})}},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.