1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9021],{79399:function(e,s,r){var o=r(57437),l=r(2265),i=r(25876);s.Z=()=>{let[e,s]=(0,l.useState)(0);return((0,l.useEffect)(()=>{let e=(0,i.Ld)(e=>s(e));return()=>e()},[]),e<=0)?null:(0,o.jsx)("div",{className:"admin-loader-overlay",role:"status","aria-live":"polite",children:(0,o.jsxs)("div",{className:"admin-loader-box",children:[(0,o.jsx)("div",{className:"admin-spinner"}),(0,o.jsx)("div",{className:"admin-loader-text",children:"Loading..."})]})})}},69021:function(e,s,r){r.r(s);var o=r(57437);r(2265);var l=r(22551),i=r(22992);let a=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,o.jsx)("path",{d:"M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm-7 8a7 7 0 0 1 14 0",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"m9.5 18 1.7 1.7L15 16",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),n=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,o.jsx)("path",{d:"M12 3 6 5.5V11c0 4.2 2.4 8 6 10 3.6-2 6-5.8 6-10V5.5L12 3Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"m9.5 11.5 1.7 1.7L14.8 9.6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),t=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,o.jsx)("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"1.8"}),(0,o.jsx)("path",{d:"M12 8v4l2.5 2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),d=(e,s)=>{if(e)for(let r of s){let s=e[r];if(null!=s&&""!==s)return s}},c=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Not available";return null==e||""===e?s:String(e)};s.default=()=>{let{employeeUser:e}=(0,i.T)(),s=[{label:"Employee Name",value:c(d(e,["fullName","name","username"]),"Employee"),renderIcon:()=>(0,o.jsx)(a,{})},{label:"Role",value:c(d(e,["roleName","role","designation","roleCode"]),"Team Member"),renderIcon:()=>(0,o.jsx)(n,{})},{label:"Session",value:"Active",renderIcon:()=>(0,o.jsx)(t,{})}];return(0,o.jsxs)(l.Z,{title:"Employee Dashboard",children:[(0,o.jsx)("section",{className:"employee-dashboard-section employee-card-grid",children:s.map(e=>{let{label:s,value:r,renderIcon:l}=e;return(0,o.jsxs)("article",{className:"employee-stat-card",children:[(0,o.jsx)("div",{className:"employee-stat-icon",children:l()}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{children:s}),(0,o.jsx)("h2",{children:r})]})]},s)})}),(0,o.jsx)("section",{className:"employee-dashboard-section employee-welcome-panel",children:(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"employee-panel-kicker",children:"Overview"}),(0,o.jsx)("h2",{children:"Welcome to the employee workspace"}),(0,o.jsx)("p",{children:"This module uses a dedicated employee session, isolated routes, and a separate API surface so employee access remains independent from the admin panel."})]})}),(0,o.jsxs)("section",{className:"employee-dashboard-section employee-details-grid",children:[(0,o.jsxs)("article",{className:"employee-detail-card",children:[(0,o.jsx)("h3",{children:"Account Information"}),(0,o.jsxs)("dl",{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Name"}),(0,o.jsx)("dd",{children:c(d(e,["fullName","name"]))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Email"}),(0,o.jsx)("dd",{children:c(d(e,["email"]))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Employee Code"}),(0,o.jsx)("dd",{children:c(d(e,["employeeCode","employee_id","id"]))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Username"}),(0,o.jsx)("dd",{children:c(d(e,["username"]))})]})]})]}),(0,o.jsxs)("article",{className:"employee-detail-card",children:[(0,o.jsx)("h3",{children:"Session Notes"}),(0,o.jsxs)("ul",{className:"employee-detail-list",children:[(0,o.jsx)("li",{children:"Employee authentication is stored under dedicated localStorage keys."}),(0,o.jsx)("li",{children:"Protected employee routes redirect unauthenticated users to the employee login page."}),(0,o.jsx)("li",{children:"Logout clears the employee session and calls the employee logout API endpoint."})]})]}),(0,o.jsxs)("article",{className:"employee-detail-card",children:[(0,o.jsx)("h3",{children:"Permissions"}),(0,o.jsx)("div",{children:Array.isArray(e&&e.permissions||[])&&(e&&e.permissions).length>0?(0,o.jsx)("ul",{className:"employee-permissions-list",children:(e&&e.permissions).map(e=>(0,o.jsx)("li",{children:e},e))}
1):(0,o.jsx)("p",{children:"No permissions found in session."})})]})]})]})}},22551:function(e,s,r){r.d(s,{Z:function(){return v}});var o=r(57437),l=r(2265),i=r(28784),a=r(14573),n=r(79399),t=r(55605),d=r(22992),c=r(99001);let h=()=>{let{toasts:e,removeToast:s}=(0,c.p)();return(0,o.jsx)("div",{className:"employee-toast-container",children:e.map(e=>(0,o.jsxs)("div",{className:`employee-toast employee-toast-${e.type}`,role:"alert",children:[(0,o.jsxs)("div",{className:"employee-toast-content",children:[(0,o.jsxs)("span",{className:"employee-toast-icon",children:["success"===e.type&&"â","error"===e.type&&"â","warning"===e.type&&"!","info"===e.type&&"â¹"]}),(0,o.jsx)("span",{className:"employee-toast-message",children:e.message})]}),(0,o.jsx)("button",{className:"employee-toast-close",onClick:()=>s(e.id),"aria-label":"Close notification",children:"\xd7"})]},e.id))})},m=()=>(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm-7 8a7 7 0 0 1 14 0",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),p=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,o.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"}),(0,o.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"}),(0,o.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"}),(0,o.jsx)("rect",{x:"14",y:"14",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"})]}),x=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,o.jsx)("path",{d:"M15 16l4-4-4-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M9 12h10",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M11 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),j=()=>(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M12 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-7 10a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h5v-3h2v3h5a3 3 0 0 0 3-3v-4a3 3 0 0 0-3-3h-9Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),u=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,o.jsx)("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,o.jsx)("path",{d:"M7 11V8a5 5 0 0 1 10 0v3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),y=(e,s,r)=>{if(!e)return r;for(let r of s){let s=e[r];if(null!=s&&""!==s)return String(s)}return r};var v=e=>{let{title:s,children:r}=e,c=(0,i.TH)(),v=(0,i.s0)(),{employeeUser:k,logout:N}=(0,d.T)(),[g,f]=(0,l.useState)(!1);(0,l.useEffect)(()=>{f("true"===localStorage.getItem("employeeSidebarCollapsed"))},[]);let b=async()=>{if(window.confirm("Are you sure you want to logout?")){try{await (0,t.ER)()}catch(e){console.warn("Employee logout API failed:",e)}N(),v("/employee/login",{replace:!0})}},w=y(k,["name","fullName","username","email"],"Employee"),L=y(k,["role","designation"],"Team Member");return(0,o.jsxs)("div",{className:`employee-dashboard-container employee-layout ${g?"collapsed":""}`,children:[(0,o.jsx)(n.Z,{}),(0,o.jsx)(h,{}),(0,o.jsxs)("div",{className:"employee-grid",children:[(0,o.jsxs)("aside",{className:"employee-sidebar",children:[(0,o.jsxs)("div",{className:"employee-sidebar-top",children:[(0,o.jsx)("div",{className:"employee-sidebar-brand",children:"Employee Panel"}),(0,o.jsxs)("div",{className:"employee-sidebar-profile",children:[(0,o.jsx)("div",{className:"employee-sidebar-avatar",children:(0,o.jsx)(m,{})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"employee-sidebar-name",children:w}),(0,o.jsx)("div",{className:"employee-sidebar-role",children:L})]})]})]}),(0,o.jsxs)("nav",{className:"employee-sidebar-nav",children:[(0,o.jsxs)(a.rU,{to:"/employee/dashboard",className:`employee-nav-item ${"/employee/dashboard"===c.pathname?"active":""}`,children:[(0,o.jsx)(p,{})," ",(0,o.jsx)("span",{children:"Overview"})]}),(0,o.jsxs)(a.rU,{to:"/employee/employees",className:`employee-nav-item ${c.pathname.startsWith("/employee/employees")?"active":""}`,children:[(0,o.jsx)(m,{})," ",(0,o.jsx)("span",{children:"Employees"})]}),(0,o.jsxs)(a.rU,{to:"/employee/roles-permissions",className:`employee-nav-item ${"/employee/roles-permissions"===c.pathname?"active":""}`,children:[(0,o.jsx)(j,{})," ",(0,o.jsx)("span",{children:"Roles & Permissions"})]}),(0,o.jsxs)(a.rU,{to:"/employee/my-access",className:`employee-nav-item ${"/employee/my-access"===c.pathname?"active":""}`,children:[(0,o.jsx)(m,{}
1)," ",(0,o.jsx)("span",{children:"My Access"})]}),(0,o.jsxs)(a.rU,{to:"/employee/change-password",className:`employee-nav-item ${"/employee/change-password"===c.pathname?"active":""}`,children:[(0,o.jsx)(u,{})," ",(0,o.jsx)("span",{children:"Change Password"})]})]}),(0,o.jsxs)("button",{onClick:b,className:"employee-sidebar-logout",children:[(0,o.jsx)(x,{})," ",(0,o.jsx)("span",{children:"Logout"})]})]}),(0,o.jsxs)("main",{className:"employee-main-content",children:[(0,o.jsxs)("header",{className:"employee-dashboard-header",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"employee-dashboard-eyebrow",children:"Internal Workspace"}),(0,o.jsx)("h1",{children:s})]}),(0,o.jsxs)("div",{className:"employee-dashboard-user-chip",children:["Signed in as ",(0,o.jsx)("strong",{children:w})]})]}),r]})]})]})}}}]);
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.