PageSourceSearch

https://www.thestudyias.com/_next/static/chunks/2903.2aab1e9761fac67e.js

js thestudyias.com collected 2026-09-24 11:38:08 UTC 9,591 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2903],{79399:function(e,s,i){var r=i(57437),o=i(2265),a=i(25876);s.Z=()=>{let[e,s]=(0,o.useState)(0);return((0,o.useEffect)(()=>{let e=(0,a.Ld)(e=>s(e));return()=>e()},[]),e<=0)?null:(0,r.jsx)("div",{className:"admin-loader-overlay",role:"status","aria-live":"polite",children:(0,r.jsxs)("div",{className:"admin-loader-box",children:[(0,r.jsx)("div",{className:"admin-spinner"}),(0,r.jsx)("div",{className:"admin-loader-text",children:"Loading..."})]})})}},26550:function(e,s,i){i.d(s,{$:function(){return o}});var r=i(57437);i(2265);let o=e=>{let{size:s="medium",fullPage:i=!1}=e;return i?(0,r.jsx)("div",{className:"employee-spinner-fullpage",children:(0,r.jsx)("div",{className:`employee-spinner employee-spinner-${s}`})}):(0,r.jsx)("div",{className:`employee-spinner employee-spinner-${s}`})}},22551:function(e,s,i){i.d(s,{Z:function(){return v}});var r=i(57437),o=i(2265),a=i(28784),n=i(14573),l=i(79399),t=i(55605),m=i(22992),d=i(99001);let c=()=>{let{toasts:e,removeToast:s}=(0,d.p)();return(0,r.jsx)("div",{className:"employee-toast-container",children:e.map(e=>(0,r.jsxs)("div",{className:`employee-toast employee-toast-${e.type}`,role:"alert",children:[(0,r.jsxs)("div",{className:"employee-toast-content",children:[(0,r.jsxs)("span",{className:"employee-toast-icon",children:["success"===e.type&&"✓","error"===e.type&&"✕","warning"===e.type&&"!","info"===e.type&&"ℹ"]}),(0,r.jsx)("span",{className:"employee-toast-message",children:e.message})]}),(0,r.jsx)("button",{className:"employee-toast-close",onClick:()=>s(e.id),"aria-label":"Close notification",children:"\xd7"})]},e.id))})},p=()=>(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,r.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"})}),h=()=>(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"}),(0,r.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"}),(0,r.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"}),(0,r.jsx)("rect",{x:"14",y:"14",width:"6",height:"6",rx:"1.2",stroke:"currentColor",strokeWidth:"1.8"})]}),u=()=>(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M15 16l4-4-4-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 12h10",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.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"})]}),y=()=>(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,r.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"})}),x=()=>(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,r.jsx)("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,r.jsx)("path",{d:"M7 11V8a5 5 0 0 1 10 0v3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),j=(e,s,i)=>{if(!e)return i;for(let i of s){let s=e[i];if(null!=s&&""!==s)return String(s)}return i};var v=e=>{let{title:s,children:i}=e,d=(0,a.TH)(),v=(0,a.s0)(),{employeeUser:N,logout:f}=(0,m.T)(),[k,b]=(0,o.useState)(!1);(0,o.useEffect)(()=>{b("true"===localStorage.getItem("employeeSidebarCollapsed"))},[]);let g=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)}f(),v("/employee/login",{replace:!0})}},w=j(N,["name","fullName","username","email"],"Employee"),C=j(N,["role","designation"],"Team Member");return(0,r.jsxs)("div",{className:`employee-dashboard-container employee-layout ${k?"collapsed":""}`,children:[(0,r.jsx)(l.Z,{}),(0,r.jsx)(c,{}),(0,r.jsxs)("div",{className:"employee-grid",children:[(0,r.jsxs)("aside",{className:"employee-sidebar",children:[(0,r.jsxs)("div",{className:"employee-sidebar-top",children:[(0,r.jsx)("div",{className:"employee-sidebar-brand",children:"Employee Panel"}),(0,r.jsxs)("div",{className:"employee-sidebar-profile",children:[(0,r.jsx)("div",{className:"employee-sidebar-avatar",children:(0,r.jsx)(p,{})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"employee-sidebar-name",children:w}),(0,r.jsx)("div",{className:"employee-sidebar-role",children:C})]})]})]}),(0,r.jsxs)("nav",{className:"employee-sidebar-nav",children:[(0,r.jsxs)(n.rU,{to:"/employee/dashboard",className:`employee-nav-item ${"/employee/dashboard"===d.pathname?"active":""}`,children:[(0,r.jsx)(h,{})," ",(0,r.jsx)("span",{children:"Overview"})]}),(0,r.jsxs)(n.rU,{to:"/employee/employees",className:`employee-nav-item ${d.pathname.startsWith("/employee/employees")?"active":""}`,children:[(0,r.jsx)(p,{})," ",(0,r.jsx)("span",{children:"Employees"})]}),(0,r.jsxs)(n.rU,{to:"/employee/roles-permissions",className:`employee-nav-item ${"/employee/roles-permissions"===d.pathname?"active":""}`,children:[(0,r.jsx)(y,{})," ",(0,r.jsx)("span",{children:"Roles & Permissions"})]}),(0,r.jsxs)(n.rU,{to:"/employee/my-access",className:`employee-nav-item ${"/employee/my-access"===d.pathname?"active":""}`,children:[(0,r.jsx)(p,{}
1)," ",(0,r.jsx)("span",{children:"My Access"})]}),(0,r.jsxs)(n.rU,{to:"/employee/change-password",className:`employee-nav-item ${"/employee/change-password"===d.pathname?"active":""}`,children:[(0,r.jsx)(x,{})," ",(0,r.jsx)("span",{children:"Change Password"})]})]}),(0,r.jsxs)("button",{onClick:g,className:"employee-sidebar-logout",children:[(0,r.jsx)(u,{})," ",(0,r.jsx)("span",{children:"Logout"})]})]}),(0,r.jsxs)("main",{className:"employee-main-content",children:[(0,r.jsxs)("header",{className:"employee-dashboard-header",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"employee-dashboard-eyebrow",children:"Internal Workspace"}),(0,r.jsx)("h1",{children:s})]}),(0,r.jsxs)("div",{className:"employee-dashboard-user-chip",children:["Signed in as ",(0,r.jsx)("strong",{children:w})]})]}),i]})]})]})}},62903:function(e,s,i){i.r(s);var r=i(57437),o=i(2265),a=i(28784),n=i(22551),l=i(55605),t=i(99001),m=i(26550);s.default=()=>{let{permissionKey:e}=(0,a.UO)(),s=(0,a.s0)(),{showToast:i}=(0,t.p)(),d=!!e,[c,p]=(0,o.useState)(d),[h,u]=(0,o.useState)(!1),[y,x]=(0,o.useState)(),[j,v]=(0,o.useState)({permissionKey:"",permissionName:"",moduleName:"",description:"",isActive:!0});(0,o.useEffect)(()=>{(async()=>{if(!d||!e)return p(!1);try{let s=await (0,l.BM)(e),i=s?.responseObject||{};x(i.id||i.permissionId||void 0),v({permissionKey:i.permissionKey||i.key||"",permissionName:i.permissionName||i.name||"",moduleName:i.moduleName||"",description:i.description||"",isActive:void 0===i.isActive||!!i.isActive})}catch(e){console.error("Failed to load permission:",e),i("Failed to load permission details","error")}finally{p(!1)}})()},[e,d,i]);let N=e=>{let{name:s,value:i,type:r,checked:o}=e.target;v(e=>({...e,[s]:"checkbox"===r?o:i}))},f=async e=>{e.preventDefault(),u(!0);try{let e={permissionKey:j.permissionKey,permissionName:j.permissionName,moduleName:j.moduleName,description:j.description};d&&y?(e.permissionId=y,await (0,l.kY)(e),i("Permission updated successfully","success")):(await (0,l.J$)(e),i("Permission created successfully","success")),s("/employee/roles-permissions")}catch(e){console.error("Failed to save permission:",e),i(e instanceof Error?e.message:"Failed to save permission","error")}finally{u(!1)}};return c?(0,r.jsx)(m.$,{fullPage:!0}):(0,r.jsx)(n.Z,{title:d?"Edit Permission":"Create Permission",children:(0,r.jsx)("section",{className:"employee-dashboard-section",children:(0,r.jsxs)("form",{onSubmit:f,className:"employee-form",noValidate:!0,children:[(0,r.jsxs)("div",{className:"employee-form-group",children:[(0,r.jsx)("label",{htmlFor:"permissionKey",children:"Permission Key"}),(0,r.jsx)("input",{id:"permissionKey",name:"permissionKey",value:j.permissionKey||"",onChange:N,className:"employee-input",disabled:d})]}),(0,r.jsxs)("div",{className:"employee-form-group",children:[(0,r.jsx)("label",{htmlFor:"permissionName",children:"Permission Name"}),(0,r.jsx)("input",{id:"permissionName",name:"permissionName",value:j.permissionName||"",onChange:N,className:"employee-input"})]}),(0,r.jsxs)("div",{className:"employee-form-group",children:[(0,r.jsx)("label",{htmlFor:"moduleName",children:"Module Name"}),(0,r.jsx)("input",{id:"moduleName",name:"moduleName",value:j.moduleName||"",onChange:N,className:"employee-input"})]}),(0,r.jsxs)("div",{className:"employee-form-group",children:[(0,r.jsx)("label",{htmlFor:"description",children:"Description"}),(0,r.jsx)("textarea",{id:"description",name:"description",value:j.description||"",onChange:N,className:"employee-input"})]}),(0,r.jsxs)("div",{className:"employee-form-actions",children:[(0,r.jsx)("button",{type:"button",className:"employee-btn employee-btn-secondary",onClick:()=>s("/employee/roles-permissions"),children:"Cancel"}),(0,r.jsx)("button",{type:"submit",className:"employee-btn employee-btn-primary",disabled:h,children:h?"Saving...":d?"Update Permission":"Create Permission"})]})]})})})}}}]);

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.