Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.116.20.205
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/Header-Cr4VvgPa.js |
import{r as a,_ as Be,u as We,a as Z,c as N,p as me,w as Ae,b as fe,C as ge,d as R,e as pe,K as de,f as be,P as Ue,g as ve,h as Ve,i as xe,S as Xe,j as Ye,m as Ge,k as q,l as qe,n as Ze,o as Je,q as Qe,z as et,s as ye,I as tt,t as s,L as oe,v as nt,x as se,y as at,B as ke,A as ot}from"./index-D_3WEyIX.js";var we=a.createContext(null),$e=a.createContext({}),st=["prefixCls","className","containerRef"],rt=function(t){var n=t.prefixCls,o=t.className,r=t.containerRef,l=Be(t,st),i=a.useContext($e),c=i.panel,u=We(c,r);return a.createElement("div",Z({className:N("".concat(n,"-content"),o),role:"dialog",ref:u},me(t,{aria:!0}),{"aria-modal":"true"},l))};function Ce(e){return typeof e=="string"&&String(Number(e))===e?(Ae(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var Se={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function lt(e,t){var n,o,r,l=e.prefixCls,i=e.open,c=e.placement,u=e.inline,f=e.push,h=e.forceRender,g=e.autoFocus,$=e.keyboard,m=e.classNames,b=e.rootClassName,d=e.rootStyle,D=e.zIndex,I=e.className,M=e.id,k=e.style,S=e.motion,y=e.width,w=e.height,C=e.children,E=e.mask,L=e.maskClosable,P=e.maskMotion,J=e.maskClassName,A=e.maskStyle,T=e.afterOpenChange,H=e.onClose,F=e.onMouseEnter,Q=e.onMouseOver,ee=e.onMouseLeave,U=e.onClick,te=e.onKeyDown,ne=e.onKeyUp,p=e.styles,_=e.drawerRender,O=a.useRef(),z=a.useRef(),K=a.useRef();a.useImperativeHandle(t,function(){return O.current});var re=function(j){var X=j.keyCode,Y=j.shiftKey;switch(X){case de.TAB:{if(X===de.TAB){if(!Y&&document.activeElement===K.current){var G;(G=z.current)===null||G===void 0||G.focus({preventScroll:!0})}else if(Y&&document.activeElement===z.current){var ue;(ue=K.current)===null||ue===void 0||ue.focus({preventScroll:!0})}}break}case de.ESC:{H&&$&&(j.stopPropagation(),H(j));break}}};a.useEffect(function(){if(i&&g){var v;(v=O.current)===null||v===void 0||v.focus({preventScroll:!0})}},[i]);var le=a.useState(!1),ie=fe(le,2),ae=ie[0],V=ie[1],x=a.useContext(we),ce;typeof f=="boolean"?ce=f?{}:{distance:0}:ce=f||{};var B=(n=(o=(r=ce)===null||r===void 0?void 0:r.distance)!==null&&o!==void 0?o:x==null?void 0:x.pushDistance)!==null&&n!==void 0?n:180,Le=a.useMemo(function(){return{pushDistance:B,push:function(){V(!0)},pull:function(){V(!1)}}},[B]);a.useEffect(function(){if(i){var v;x==null||(v=x.push)===null||v===void 0||v.call(x)}else{var j;x==null||(j=x.pull)===null||j===void 0||j.call(x)}},[i]),a.useEffect(function(){return function(){var v;x==null||(v=x.pull)===null||v===void 0||v.call(x)}},[]);var He=E&&a.createElement(ge,Z({key:"mask"},P,{visible:i}),function(v,j){var X=v.className,Y=v.style;return a.createElement("div",{className:N("".concat(l,"-mask"),X,m==null?void 0:m.mask,J),style:R(R(R({},Y),A),p==null?void 0:p.mask),onClick:L&&i?H:void 0,ref:j})}),Te=typeof S=="function"?S(c):S,W={};if(ae&&B)switch(c){case"top":W.transform="translateY(".concat(B,"px)");break;case"bottom":W.transform="translateY(".concat(-B,"px)");break;case"left":W.transform="translateX(".concat(B,"px)");break;default:W.transform="translateX(".concat(-B,"px)");break}c==="left"||c==="right"?W.width=Ce(y):W.height=Ce(w);var Fe={onMouseEnter:F,onMouseOver:Q,onMouseLeave:ee,onClick:U,onKeyDown:te,onKeyUp:ne},Ke=a.createElement(ge,Z({key:"panel"},Te,{visible:i,forceRender:h,onVisibleChanged:function(j){T==null||T(j)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(v,j){var X=v.className,Y=v.style,G=a.createElement(rt,Z({id:M,containerRef:j,prefixCls:l,className:N(I,m==null?void 0:m.content),style:R(R({},k),p==null?void 0:p.content)},me(e,{aria:!0}),Fe),C);return a.createElement("div",Z({className:N("".concat(l,"-content-wrapper"),m==null?void 0:m.wrapper,X),style:R(R(R({},W),Y),p==null?void 0:p.wrapper)},me(e,{data:!0})),_?_(G):G)}),he=R({},d);return D&&(he.zIndex=D),a.createElement(we.Provider,{value:Le},a.createElement("div",{className:N(l,"".concat(l,"-").concat(c),b,pe(pe({},"".concat(l,"-open"),i),"".concat(l,"-inline"),u)),style:he,tabIndex:-1,ref:O,onKeyDown:re},He,a.createElement("div",{tabIndex:0,ref:z,style:Se,"aria-hidden":"true","data-sentinel":"start"}),Ke,a.createElement("div",{tabIndex:0,ref:K,style:Se,"aria-hidden":"true","data-sentinel":"end"})))}var it=a.forwardRef(lt),ct=function(t){var n=t.open,o=n===void 0?!1:n,r=t.prefixCls,l=r===void 0?"rc-drawer":r,i=t.placement,c=i===void 0?"right":i,u=t.autoFocus,f=u===void 0?!0:u,h=t.keyboard,g=h===void 0?!0:h,$=t.width,m=$===void 0?378:$,b=t.mask,d=b===void 0?!0:b,D=t.maskClosable,I=D===void 0?!0:D,M=t.getContainer,k=t.forceRender,S=t.afterOpenChange,y=t.destroyOnClose,w=t.onMouseEnter,C=t.onMouseOver,E=t.onMouseLeave,L=t.onClick,P=t.onKeyDown,J=t.onKeyUp,A=t.panelRef,T=a.useState(!1),H=fe(T,2),F=H[0],Q=H[1],ee=a.useState(!1),U=fe(ee,2),te=U[0],ne=U[1];be(function(){ne(!0)},[]);var p=te?o:!1,_=a.useRef(),O=a.useRef();be(function(){p&&(O.current=document.activeElement)},[p]);var z=function(ae){var V;if(Q(ae),S==null||S(ae),!ae&&O.current&&!((V=_.current)!==null&&V!==void 0&&V.contains(O.current))){var x;(x=O.current)===null||x===void 0||x.focus({preventScroll:!0})}},K=a.useMemo(function(){return{panel:A}},[A]);if(!k&&!F&&!p&&y)return null;var re={onMouseEnter:w,onMouseOver:C,onMouseLeave:E,onClick:L,onKeyDown:P,onKeyUp:J},le=R(R({},t),{},{open:p,prefixCls:l,placement:c,autoFocus:f,keyboard:g,width:m,mask:d,maskClosable:I,inline:M===!1,afterOpenChange:z,ref:_},re);return a.createElement($e.Provider,{value:K},a.createElement(Ue,{open:p||k||F,autoDestroy:!1,getContainer:M,autoLock:d&&(p||F)},a.createElement(it,le)))};const Ee=e=>{var t,n;const{prefixCls:o,title:r,footer:l,extra:i,loading:c,onClose:u,headerStyle:f,bodyStyle:h,footerStyle:g,children:$,classNames:m,styles:b}=e,{drawer:d}=a.useContext(ve),D=a.useCallback(y=>a.createElement("button",{type:"button",onClick:u,"aria-label":"Close",className:`${o}-close`},y),[u]),[I,M]=Ve(xe(e),xe(d),{closable:!0,closeIconRender:D}),k=a.useMemo(()=>{var y,w;return!r&&!I?null:a.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(y=d==null?void 0:d.styles)===null||y===void 0?void 0:y.header),f),b==null?void 0:b.header),className:N(`${o}-header`,{[`${o}-header-close-only`]:I&&!r&&!i},(w=d==null?void 0:d.classNames)===null||w===void 0?void 0:w.header,m==null?void 0:m.header)},a.createElement("div",{className:`${o}-header-title`},M,r&&a.createElement("div",{className:`${o}-title`},r)),i&&a.createElement("div",{className:`${o}-extra`},i))},[I,M,i,f,o,r]),S=a.useMemo(()=>{var y,w;if(!l)return null;const C=`${o}-footer`;return a.createElement("div",{className:N(C,(y=d==null?void 0:d.classNames)===null||y===void 0?void 0:y.footer,m==null?void 0:m.footer),style:Object.assign(Object.assign(Object.assign({},(w=d==null?void 0:d.styles)===null||w===void 0?void 0:w.footer),g),b==null?void 0:b.footer)},l)},[l,g,o]);return a.createElement(a.Fragment,null,k,a.createElement("div",{className:N(`${o}-body`,m==null?void 0:m.body,(t=d==null?void 0:d.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(n=d==null?void 0:d.styles)===null||n===void 0?void 0:n.body),h),b==null?void 0:b.body)},c?a.createElement(Xe,{active:!0,title:!1,paragraph:{rows:5},className:`${o}-body-skeleton`}):$),S)},ut=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Oe=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),De=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Oe({opacity:e},{opacity:1})),dt=(e,t)=>[De(.7,t),Oe({transform:ut(e)},{transform:"none"})],mt=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:De(0,n),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((o,r)=>Object.assign(Object.assign({},o),{[`&-${r}`]:dt(r,n)}),{})}}},ft=e=>{const{borderRadiusSM:t,componentCls:n,zIndexPopup:o,colorBgMask:r,colorBgElevated:l,motionDurationSlow:i,motionDurationMid:c,paddingXS:u,padding:f,paddingLG:h,fontSizeLG:g,lineHeightLG:$,lineWidth:m,lineType:b,colorSplit:d,marginXS:D,colorIcon:I,colorIconHover:M,colorBgTextHover:k,colorBgTextActive:S,colorText:y,fontWeightStrong:w,footerPaddingBlock:C,footerPaddingInline:E,calc:L}=e,P=`${n}-content-wrapper`;return{[n]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:y,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${n}-mask`]:{position:"absolute",inset:0,zIndex:o,background:r,pointerEvents:"auto"},[P]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${P}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${P}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${P}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${P}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${n}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${q(f)} ${q(h)}`,fontSize:g,lineHeight:$,borderBottom:`${q(m)} ${b} ${d}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:"none"},[`${n}-close`]:Object.assign({display:"inline-flex",width:L(g).add(u).equal(),height:L(g).add(u).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",marginInlineEnd:D,color:I,fontWeight:w,fontSize:g,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${c}`,textRendering:"auto","&:hover":{color:M,backgroundColor:k,textDecoration:"none"},"&:active":{backgroundColor:S}},qe(e)),[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:g,lineHeight:$},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:h,overflow:"auto",[`${n}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${n}-footer`]:{flexShrink:0,padding:`${q(C)} ${q(E)}`,borderTop:`${q(m)} ${b} ${d}`},"&-rtl":{direction:"rtl"}}}},vt=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),Ie=Ye("Drawer",e=>{const t=Ge(e,{});return[ft(t),mt(t)]},vt);var Me=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};const ht={distance:180},Pe=e=>{const{rootClassName:t,width:n,height:o,size:r="default",mask:l=!0,push:i=ht,open:c,afterOpenChange:u,onClose:f,prefixCls:h,getContainer:g,style:$,className:m,visible:b,afterVisibleChange:d,maskStyle:D,drawerStyle:I,contentWrapperStyle:M}=e,k=Me(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:S,getPrefixCls:y,direction:w,drawer:C}=a.useContext(ve),E=y("drawer",h),[L,P,J]=Ie(E),A=g===void 0&&S?()=>S(document.body):g,T=N({"no-mask":!l,[`${E}-rtl`]:w==="rtl"},t,P,J),H=a.useMemo(()=>n??(r==="large"?736:378),[n,r]),F=a.useMemo(()=>o??(r==="large"?736:378),[o,r]),Q={motionName:ye(E,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},ee=K=>({motionName:ye(E,`panel-motion-${K}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),U=Ze(),[te,ne]=Je("Drawer",k.zIndex),{classNames:p={},styles:_={}}=k,{classNames:O={},styles:z={}}=C||{};return L(a.createElement(Qe,{form:!0,space:!0},a.createElement(et.Provider,{value:ne},a.createElement(ct,Object.assign({prefixCls:E,onClose:f,maskMotion:Q,motion:ee},k,{classNames:{mask:N(p.mask,O.mask),content:N(p.content,O.content),wrapper:N(p.wrapper,O.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},_.mask),D),z.mask),content:Object.assign(Object.assign(Object.assign({},_.content),I),z.content),wrapper:Object.assign(Object.assign(Object.assign({},_.wrapper),M),z.wrapper)},open:c??b,mask:l,push:i,width:H,height:F,style:Object.assign(Object.assign({},C==null?void 0:C.style),$),className:N(C==null?void 0:C.className,m),rootClassName:T,getContainer:A,afterOpenChange:u??d,panelRef:U,zIndex:te}),a.createElement(Ee,Object.assign({prefixCls:E},k,{onClose:f}))))))},gt=e=>{const{prefixCls:t,style:n,className:o,placement:r="right"}=e,l=Me(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=a.useContext(ve),c=i("drawer",t),[u,f,h]=Ie(c),g=N(c,`${c}-pure`,`${c}-${r}`,f,h,o);return u(a.createElement("div",{className:g,style:n},a.createElement(Ee,Object.assign({prefixCls:c},l))))};Pe._InternalPanelDoNotUseOrYouWillBeFired=gt;var pt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},bt=function(t,n){return a.createElement(tt,Z({},t,{ref:n,icon:pt}))},xt=a.forwardRef(bt);const je=({submenus:e,dropdown:t,depthLevel:n})=>{n=n+1;const o=n>1?"dropdown-submenu":"";return s.jsx("ul",{className:`dropdown ${o} ${t?"show":""}`,children:e.map((r,l)=>s.jsx(Re,{items:r,depthLevel:n},l))})},Re=({items:e,depthLevel:t})=>{const[n,o]=a.useState(!1);let r=a.useRef();a.useEffect(()=>{const f=h=>{n&&r.current&&!r.current.contains(h.target)&&o(!1)};return document.addEventListener("mousedown",f),document.addEventListener("touchstart",f),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("touchstart",f)}},[n]);const l=()=>{o(!0)},i=()=>{o(!1)},c=()=>{o(f=>!f)},u=()=>{n&&o(!1)};return s.jsx("li",{className:"menu-items",ref:r,onMouseEnter:l,onMouseLeave:i,onClick:u,children:e.url&&e.submenu?s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":n?"true":"false",onClick:()=>c(),children:[s.jsx(oe,{to:e.url,children:e.title}),t>0?s.jsx("span",{children:"»"}):s.jsx("span",{className:"arrow"})]}),s.jsx(je,{depthLevel:t,submenus:e.submenu,dropdown:n})]}):!e.url&&e.submenu?s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":n?"true":"false",onClick:()=>c(),children:[e.title,t>0?s.jsx("span",{children:"»"}):s.jsx("span",{className:"arrow"})]}),s.jsx(je,{depthLevel:t,submenus:e.submenu,dropdown:n})]}):s.jsx(oe,{to:e.url,children:e.title})})},_e=()=>async(e,t)=>{try{let o=t().loginfo.userData.fusertype,r=localStorage.getItem("type"),l=localStorage.getItem("dbname");const i=await nt.get("/app.php?a=fetchMenuItems&usertype="+o+"&db="+l+"&type="+r);if(i.data.error_code===0){let c=[];i.data.data.menu.map((u,f)=>{let h={};h.title=u.title,h.url=u.url,u.submenu.length>0&&(h.submenu=u.submenu,u.submenu.map((g,$)=>{g.submenu.length===0&&delete g.submenu})),c.push(h)}),e({type:"MENUS",payload:c})}else e({type:"CLEAR_MENUS",payload:[]})}catch{}},yt=e=>(a.useEffect(()=>{e.fetchMenuItems()},[]),s.jsx("nav",{className:"desktop-nav",children:s.jsx("ul",{className:"menus",children:e.menuItems.map((n,o)=>s.jsx(Re,{items:n,depthLevel:0},o))})})),wt=e=>({menuItems:e.menuItems}),Ct=se(wt,{fetchMenuItems:_e})(yt),Ne=({submenus:e,dropdown:t,depthLevel:n})=>{n=n+1;const o=n>1?"dropdown-submenu":"";return s.jsx("ul",{className:`dropdown ${o} ${t?"show":""}`,children:e.map((r,l)=>s.jsx(ze,{items:r,depthLevel:n},l))})},ze=({items:e,depthLevel:t,showMenu:n,setShowMenu:o})=>{const[r,l]=a.useState(!1),i=()=>{r&&l(!1),n&&o(!1)},c=u=>{u.stopPropagation(),l(f=>!f)};return s.jsx("li",{className:"menu-items",onClick:i,children:e.url&&e.submenu?s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":r?"true":"false",children:[s.jsx(oe,{to:e.url,onClick:i,children:e.title}),s.jsx("div",{onClick:u=>c(u),children:r?s.jsx("span",{className:"arrow-close"}):s.jsx("span",{className:"arrow"})})]}),s.jsx(Ne,{depthLevel:t,submenus:e.submenu,dropdown:r})]}):!e.url&&e.submenu?s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":r?"true":"false",children:[e.title," ",s.jsx("div",{onClick:u=>c(u),children:r?s.jsx("span",{className:"arrow-close"}):s.jsx("span",{className:"arrow"})})]}),s.jsx(Ne,{depthLevel:t,submenus:e.submenu,dropdown:r})]}):s.jsx(oe,{to:e.url,children:e.title})})},St=e=>{const[n,o]=a.useState(!1);let r=a.useRef();a.useEffect(()=>{e.fetchMenuItems()},[]),a.useEffect(()=>{const i=c=>{n&&r.current&&!r.current.contains(c.target)&&o(!1)};return document.addEventListener("mousedown",i),document.addEventListener("touchstart",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}},[n]);const l={width:"35px",height:"4px",backgroundColor:"#8231d3",margin:"6px"};return s.jsxs("nav",{className:"mobile-nav",children:[s.jsxs("div",{className:"mobile-nav__menu-button",type:"button",onClick:()=>o(i=>!i),children:[s.jsx("div",{className:"bar1",style:l}),s.jsx("div",{className:"bar2",style:l}),s.jsx("div",{className:"bar3",style:l})]}),n&&s.jsx("ul",{className:"menus",ref:r,children:e.menuItemsData.map((i,c)=>s.jsx(ze,{items:i,depthLevel:0,showMenu:n,setShowMenu:o},c))})]})},jt=e=>({menuItemsData:e.menuItems}),Nt=se(jt,{fetchMenuItems:_e})(St),kt=e=>{const t=at(),n=()=>{e.logoutHandler(t)};return s.jsx(Pe,{title:"Profile",onClose:e.onClose,open:e.open,children:s.jsx(ke,{type:"primary",onClick:n,style:{width:"100%"},children:"Logout"})})},$t=e=>({}),Et=se($t,{logoutHandler:ot})(kt),Ot=e=>{const[t,n]=a.useState(!1),o=localStorage.getItem("univlogo"),r=()=>{n(!0)},l=()=>{n(!1)};return s.jsxs("div",{className:"nav-header",children:[s.jsxs("div",{style:{background:"#8231d3",color:"#fff",display:"flex",justifyContent:"space-between",padding:"5px",fontSize:"14px"},children:[s.jsx("span",{children:e.user.funivcode+" - "+e.user.funivname}),s.jsxs("span",{children:[e.user.fregno+" - "+e.user.fteachname," [",s.jsxs("span",{style:{color:"#FFF455"},children:[" ",e.user.fusertypedesc]})," ","]"]})]}),s.jsxs("header",{children:[s.jsxs("div",{className:"nav-area",children:[s.jsx(oe,{to:"/dashboard",children:s.jsx("img",{src:o,alt:"img",className:e.user.funivcode!=="061"?"logo":"n-logo"})}),s.jsx(Ct,{}),s.jsx(Nt,{})]}),s.jsx(ke,{onClick:r,className:"profile-btn",children:s.jsx(xt,{})}),s.jsx(Et,{onClose:l,open:t})]})]})},Dt=e=>({user:e.loginfo.userData}),Mt=se(Dt)(Ot);export{Mt as default};
|