(this["webpackJsonpmatx-react"]=this["webpackJsonpmatx-react"]||[]).push([[42],{1133:function(e,t,a){"use strict";var n=a(23),c=a(22),r=a(29),s=a(30),i=function(e){Object(r.a)(a,e);var t=Object(s.a)(a);function a(){var e;return Object(c.a)(this,a),(e=t.call(this,"/api/admin/companyUsers")).getSingleRecord=function(t){return e.get("/api/admin/companyUsers/getSingle/"+t)},e.changePassword=function(t){return e.post("/api/admin/companyUsers/changePassword",t)},e.multipleDelete=function(t){return e.post("/api/admin/companyUsers/multipleDelete",t)},e}return Object(n.a)(a)}(a(196).a);t.a=new i},1650:function(e,t,a){"use strict";a.r(t);var n,c=a(6),r=a(5),s=a(9),i=a(45),o=a(322),l=a(532),d=a(526),j=a(313),b=a(60),u=a(194),p=a(1),m=a.n(p),O=a(95),h=a(208),g=(a(707),a(27)),v=a(75),x=a(1133),f=a(2),w=(Object(v.css)(n||(n=Object(i.a)(["\n    display: block;\n    margin: 0 auto;\n    border-color: red;\n"]))),Object(b.a)("div")((function(e){var t,a=e.theme;return t={margin:"30px"},Object(s.a)(t,a.breakpoints.down("sm"),{margin:"16px"}),Object(s.a)(t,"& .breadcrumb",Object(s.a)({marginBottom:"30px"},a.breakpoints.down("sm"),{marginBottom:"16px"})),t})));t.default=function(){var e=Object(g.f)(),t=Object(g.g)().id,a=Object(p.useState)({approved:!0}),n=Object(r.a)(a,2),i=n[0],b=n[1],v=Object(p.useState)(!1),y=Object(r.a)(v,2),k=y[0],S=y[1],B=Object(p.useState)(""),D=Object(r.a)(B,2),P=D[0],U=(D[1],m.a.useState()),C=Object(r.a)(U,2),R=(C[0],C[1],i.password);return k?Object(f.jsx)(O.f,{}):Object(f.jsx)("div",{children:Object(f.jsx)(w,{children:Object(f.jsxs)(O.m,{children:[P&&Object(f.jsx)("p",{style:{color:"red"},children:P}),Object(f.jsx)(o.a,{variant:"contained",color:"secondary",style:{marginBottom:"2rem"},onClick:function(t){t.preventDefault(),e(-1)},children:"Go Back"}),Object(f.jsx)(l.a,{container:!0,spacing:2,children:Object(f.jsx)(l.a,{item:!0,lg:6,md:6,sm:12,xs:12,children:Object(f.jsx)(d.a,{label:"New Password",onChange:function(e){e.persist(),b(Object(c.a)(Object(c.a)({},i),{},Object(s.a)({},e.target.name,e.target.value)))},fullWidth:!0,type:"text",name:"password",id:"password",variant:"outlined",value:R||""})})}),Object(f.jsx)(u.a,{mt:3,children:Object(f.jsxs)(o.a,{color:"primary",variant:"contained",onClick:function(){console.log("state",t,R);try{S(!0),x.a.changePassword({id:t,password:R}).then((function(t){h.b.success("Data Saved"),e(-1)})).catch((function(e){var t,a;console.log("ERR : ",e),h.b.error(null===e||void 0===e||null===(t=e.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.error),S(!1)}))}catch(P){S(!1)}},children:[Object(f.jsx)(j.a,{children:"send"}),Object(f.jsx)("span",{className:"pl-2 capitalize",children:"Submit"})]})})]})})})}}}]);
//# sourceMappingURL=42.553eab58.chunk.js.map