1"use strict";(self.webpackChunkwm_core_front=self.webpackChunkwm_core_front||[]).push([[1734],{31573:(e,a,t)=>{t.d(a,{A:()=>g});var n=t(65043),s=t(62582),r=t(44963),o=t(72926),i=t(83910),l=t(97929),d=t(71036),c=t(74117),h=t(98139),m=t.n(h),p=t(23967),x=t(87076),u=t(70579);const b=()=>(0,u.jsx)(n.Fragment,{children:(0,u.jsxs)(p.A,{children:[(0,u.jsx)(x.A,{children:(0,u.jsx)(s.N_,{to:"/dashboard",children:(0,u.jsx)(i.g,{icon:l.v02,color:"primary"})})}),(0,u.jsx)(x.A,{active:!0})]})});var j=t(13438);const g=e=>{const{t:a}=(0,c.Bd)(),{heading:t,icon:h,subheading:p}=e,x=(0,r.d4)((e=>e.ThemeOptions.enablePageTitleIcon)),g=(0,r.d4)((e=>e.ThemeOptions.enablePageTitleSubheading)),{passwordExpirationDays:A}=(0,n.useContext)(j.A);let N=null,f=null;return null!==A&&A<=d.dxB.SEVEN_DAYS_EXPIRATION&&A>d.dxB.ULTIMATE_DAY_EXPIRATION&&(N=(0,u.jsx)("div",{className:"content-alert expiration-days-header",children:(0,u.jsxs)(o.A,{color:"info",className:"expiration-days-alert",children:[(0,u.jsx)("span",{className:"pr-2 text-bold",children:(0,u.jsx)(i.g,{icon:l.zpE,className:"mr-2 "})}),(0,u.jsx)(s.N_,{to:"/renew-password",children:(0,u.jsxs)("p",{children:[a("password.expiration.label1"),"\n",A," ",a("password.expiration.label2")]})})]})})),A===d.dxB.ULTIMATE_DAY_EXPIRATION&&(f=(0,u.jsx)("div",{className:"content-alert expiration-days-header",children:(0,u.jsxs)(o.A,{color:"danger",className:"expiration-days-alert",children:[(0,u.jsx)("span",{className:"pr-2 text-bold",children:(0,u.jsx)(i.g,{icon:l.zpE,className:"mr-2 "})}),(0,u.jsx)("p",{children:(0,u.jsx)(s.N_,{to:"/renew-password",className:"expiration-days-link",children:a("password.expiration.label3")})})]})})),(0,u.jsxs)("div",{className:"app-page-title",children:[N,f,(0,u.jsx)("div",{className:"page-title-wrapper",children:(0,u.jsxs)("div",{className:"page-title-heading",children:[(0,u.jsx)("div",{className:m()("page-title-icon rounded-circle",{"d-none":!x}),children:(0,u.jsx)("i",{className:h})}),(0,u.jsxs)("div",{children:[t,(0,u.jsxs)("div",{className:m()("page-title-subheading",{"d-none":!g}),children:[p,(0,u.jsx)(b,{})]})]})]})})]})}},57092:(e,a,t)=>{t.d(a,{A:()=>g});var n=t(65043),s=t(91688),r=t(44963),o=t(74117),i=t(98139),l=t.n(i),d=t(82937),c=t(75188),h=t.n(c),m=t(64150),p=t(31573),x=t(93122),u=t(26842),b=t(36295),j=t(70579);const g=(0,s.withRouter)((0,r.Ng)((e=>({colorScheme:e.ThemeOptions.colorScheme,enableFixedHeader:e.ThemeOptions.enableFixedHeader,enableMobileMenu:e.ThemeOptions.enableMobileMenu,enableFixedFooter:e.ThemeOptions.enableFixedFooter,enableFixedSidebar:e.ThemeOptions.enableFixedSidebar,enableClosedSidebar:e.ThemeOptions.enableClosedSidebar,enablePageTabsAlt:e.ThemeOptions.enablePageTabsAlt})))((e=>{const{t:a}=(0,o.Bd)();let{colorScheme:t,enableFixedHeader:r,enableFixedSidebar:i,enableFixedFooter:c,enableClosedSidebar:g,closedSmallerSidebar:A,enableMobileMenu:N,enablePageTabsAlt:f}=e;const v=(0,s.useHistory)(),{isLogged:T}=(0,m.A)();return(0,n.useEffect)((()=>{T||v.push("/")}),[T,v]),(0,j.jsx)(d.Ay,{handleWidth:!0,render:s=>{let{width:o}=s;return(0,j.jsx)(n.Fragment,{children:(0,j.jsxs)("div",{className:l()("app-container app-theme-"+t,{"fixed-header":r},{"fixed-sidebar":i||o<1250},{"fixed-footer":c},{"closed-sidebar":g||o<1250},{"closed-sidebar-mobile":A||o<1250},{"sidebar-mobile-open":N},{"body-tabs-shadow-btn":f}),children:[(0,j.jsx)(x.A,{}),(0,j.jsxs)("div",{className:"app-main",children:[(0,j.jsx)(u.A,{}),(0,j.jsxs)("div",{className:"app-main__outer",children:[(0,j.jsx)("div",{className:"app-main__inner",children:(0,j.jsxs)(h(),{component:"div",transitionName:"TabsAnimation",transitionAppear:!0,transitionAppearTimeout:0,transitionEnter:!1,transitionLeave:!1,children:[(0,j.jsx)(p.A,{heading:a(e.heading),subheading:a(e.subheading),icon:"pe-7s-".concat(e.icon," text-blue")}),e.children]})}),(0,j.jsx)(b.A,{})]})]})]})})}})})))},81734:(e,a,t)=>{t.r(a),t.d(a,{default:()=>B});var n=t(65043),s=t(57092),r=t(74117),o=t(75188),i=t.n(o),l=t(27947),d=t(36505),c=t(28979),h=t(75304),m=t(44864),p=t(45056),x=t(8586),u=t(13718),b=t(83407),j=t(87382),g=t(86431),A=t(94834),N=t(69979),f=t(91688),v=t(62582),T=t(78974),E=t(71036),D=t(36085),_=t(73023),y=t.n(_),w=t(70579);const R=()=>{const{t:e}=(0,r.Bd)(),a=(0,f.useHistory)(),{id:t}=(0,f.useParams)(),{createRole:s,getRole:o,editRole:_}
1=(0,l.A)(),[R,B]=(0,n.useState)(!1),[S,F]=(0,n.useState)({name:""});let M=null,I=null;I=!1===(0,A.hX)(t)?e("createusers.createButton3"):e("createusers.createButton"),M=!1===(0,A.hX)(t)?e("createRoles.TittleEdit"):e("createRoles.Tittle");const O=(0,n.useCallback)((()=>{B(!0),o(t).then((e=>{!1===(0,A.hX)(e.data.name)?F({name:e.data.name}):(0,g.pW)()})).catch((e=>{!e.response||(e.response.status,E.t3V.UNAUTHORIZED)})).finally((()=>{B(!1)}))}),[t]);(0,n.useEffect)((()=>{!1===(0,A.hX)(t)&&O()}),[]);return(0,w.jsxs)(n.Fragment,{children:[(0,N.EW)(R),(0,w.jsx)(i(),{component:"div",transitionName:"TabsAnimation",transitionAppear:!0,transitionAppearTimeout:0,transitionEnter:!1,transitionLeave:!1,children:(0,w.jsx)(c.A,{fluid:!0,children:(0,w.jsx)(h.A,{className:"main-card mb-3",children:(0,w.jsxs)(m.A,{children:[(0,w.jsx)(p.A,{children:M}),(0,w.jsxs)(d.kv,{onSubmit:(n,r)=>{if(n.preventDefault(),0===r.length){B(!0);const n=S.name.replace(/\s+/g," ").trim();if(t){_(t,{name:n}).then((t=>{202===t.status?y()({title:e("modal.DoneError.header"),text:e("createRoles.Alert.Edit"),icon:"success",button:e("modal.Done.footerButton")}):(0,g.pW)(),a.push("/user/roles")})).catch((a=>{a.response&&a.response.status===E.t3V.UNAUTHORIZED||("10014"===a.response.data.code&&y()({title:e("modal.DoneError.header"),text:e("10014"),icon:"error",button:e("modal.Done.footerButton")}),"10015"===a.response.data.code&&y()({title:e("modal.DoneError.header"),text:e("10015"),icon:"error",button:e("modal.Done.footerButton")}))})).finally((()=>{B(!1)}))}else{s({name:n}).then((t=>{201===t.status?y()({title:e("modal.DoneError.header"),text:e("createRoles.alert.subHead"),icon:"success",button:e("modal.Done.footerButton")}):(0,g.pW)(),a.push("/user/roles")})).catch((a=>{a.response&&a.response.status===E.t3V.UNAUTHORIZED||("10014"===a.response.data.code&&y()({title:e("modal.DoneError.header"),text:e("10014"),icon:"error",button:e("modal.Done.footerButton")}),"10015"===a.response.data.code&&y()({title:e("modal.DoneError.header"),text:e("10015"),icon:"error",button:e("modal.Done.footerButton")}))})).finally((()=>{B(!1)}))}}},autoComplete:"off",children:[(0,w.jsx)(D.A,{id:"name",place:"bottom",type:"dark",effect:"solid",children:e("trd.Tooltip4")}),(0,w.jsxs)(d.l0,{row:!0,children:[(0,w.jsx)(x.A,{for:"name",className:"is-required",sm:2,children:e("createRoles.label1")}),(0,w.jsx)(u.A,{md:10,children:(0,w.jsx)(d.eh,{id:"name",name:"name",type:"text",onChange:e=>{F({...S,[e.target.name]:e.target.value})},onKeyPress:e=>{"Enter"===e.key&&e.preventDefault()},"data-tip":!0,"data-for":"name",validate:{pattern:{value:T.sr,errorMessage:"".concat(e("createRoles.InputInvalid"))},required:{value:!0,errorMessage:"".concat(e("createRoles.fieldRequired"))},minLength:{value:E.Dng.MIN_LENGTH_NAME,errorMessage:"".concat(e("fieldValidateLengthBetween")," 4 ").concat(e("and")," 70 ").concat(e("characters"))},maxLength:{value:E.Dng.MAX_LENGTH_NAME,errorMessage:"".concat(e("fieldValidateLengthBetween")," 4 ").concat(e("and")," 70 ").concat(e("characters"))}},autoComplete:"off",value:S.name})})]}),(0,w.jsxs)(b.A,{className:"d-block text-right",children:[(0,w.jsx)(v.N_,{to:"/user/roles",children:(0,w.jsx)(j.A,{size:"lg",className:"col-mt-3 mr-3",color:"gray",children:e("createusers.createButton2")})}),(0,w.jsx)(j.A,{type:"submit",size:"lg",disabled:R,className:"col-mt-3",color:"cyan",children:I})]})]})]})})})})]})},B=()=>{const{t:e}=(0,r.Bd)();return(0,w.jsx)(n.Fragment,{children:(0,w.jsx)(s.A,{heading:e("dashboard.label19"),subheading:e("createRoles.subHeading"),icon:"note2",children:(0,w.jsx)(R,{})})})}}}]); 2//# sourceMappingURL=1734.e247b0a1.chunk.js.map
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.