1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7585],{99572:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/salary-management/company",function(){return s(65077)}])},30279:function(e,a,s){"use strict";s.r(a);var n=s(85893),t=s(41664),r=s.n(t),l=s(11163);a.default=e=>{let{children:a}=e,s=(0,l.useRouter)();return(0,n.jsxs)("div",{className:"flex min-h-screen",children:[(0,n.jsxs)("aside",{className:"w-64 bg-gray-900 text-white p-4",children:[(0,n.jsx)("h2",{className:"text-lg font-bold mb-6",children:"Salary Management"}),(0,n.jsx)("ul",{className:"space-y-3",children:[{name:"Dashboard",path:"/salary-management"},{name:"Companies",path:"/salary-management/company"}].map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:e.path,children:(0,n.jsx)("span",{className:"block px-3 py-2 rounded-md cursor-pointer ".concat(s.pathname.startsWith(e.path)?"bg-gray-700 font-semibold":"hover:bg-gray-800"),children:e.name})})},e.path))})]}),(0,n.jsx)("main",{className:"flex-1 p-6 bg-gray-100",children:a})]})}},65077:function(e,a,s){"use strict";s.r(a);var n=s(85893),t=s(67294),r=s(30279),l=s(41664),c=s.n(l),i=s(88446),d=s(94543),o=s(48583),m=s(11846);a.default=()=>{var e;let a=(0,o.Dv)(d.ZP),s=null==a?void 0:null===(e=a.userDetails)||void 0===e?void 0:e.user_id,[l,x]=(0,t.useState)([]),[h,p]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{let e=async()=>{try{var e;let a=await i.Z.post("/payroll/company/list",{user_id:s});x((null===(e=a.data)||void 0===e?void 0:e.data)||[])}catch(e){console.error("â Error fetching companies:",e)}finally{p(!1)}};e()},[s]),(0,n.jsx)(m.Z,{children:(0,n.jsxs)(r.default,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,n.jsxs)("h1",{className:"text-3xl font-semibold text-gray-800",children:["Companies"," ",(0,n.jsxs)("span",{className:"text-gray-600",children:["(",l.length,")"]})]}),(0,n.jsx)(c(),{href:"/salary-management/company/add",className:"bg-gray-600 text-white px-5 py-2.5 rounded-xl shadow-md hover:bg-gray-700 transition",children:"+ Add Company"})]}),h?(0,n.jsx)("p",{className:"text-gray-500",children:"Loading companies..."}):0===l.length?(0,n.jsx)("p",{className:"text-gray-500",children:"No companies found. Add one to get started."}):(0,n.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:l.map(e=>(0,n.jsxs)("div",{className:"bg-white p-5 rounded-xl shadow hover:shadow-md transition flex flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,n.jsx)("img",{src:e.logo_url,alt:e.company_name,className:"w-12 h-12 rounded-full object-cover border"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-gray-800",children:e.company_name}),(0,n.jsx)("p",{className:"text-sm text-gray-500",children:e.company_email})]})]}),(0,n.jsxs)("div",{className:"text-sm text-gray-600 space-y-1 mb-4",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"font-medium",children:"Employees:"})," ",e.no_of_employees]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"font-medium",children:"Phone:"})," ",e.company_mobile_number]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"font-medium",children:"Address:"})," ",e.address]})]}),(0,n.jsxs)("div",{className:"mt-auto flex justify-between gap-2",children:[(0,n.jsx)(c(),{href:"/salary-management/company/".concat(e.company_id,"/employees"),className:"flex-1 bg-gray-600 text-white px-3 py-2 rounded-lg text-sm text-center hover:bg-gray-700 transition",children:"Manage"}),(0,n.jsx)(c(),{href:"/salary-management/company/".concat(e.company_id,"/edit"),className:"flex-1 bg-gray-100 text-gray-700 px-3 py-2 rounded-lg text-sm text-center hover:bg-gray-200 transition",children:"Edit"})]})]},e._id))})]})})}},28646:function(e,a,s){"use strict";var n=s(85893),t=s(41664),r=s.n(t),l=s(11163);s(67294),a.Z=()=>{let e=(0,l.useRouter)(),a=e.asPath;return(0,n.jsxs)("div",{className:"md:mx-28 text-center text-red-500 p-10 bg-gray-100 text-xl",children:["Your are not Logged in to use this functionality .......! ",(0,n.jsx)("br",{}),(0,n.jsx)(r(),{className:"text-blue-500",href:"/login?re_url=".concat(a),children:"Click here to Login"})]})}},11846:function(e,a,s){"use strict";s.d(a,{Z:function(){return c}});var n=s(85893),t=s(48583),r=s(94543),l=s(28646);function c(e){let{children:a}=e,s=(0,t.Dv)(r.ZP);return s.isLoggedIn?a:(0,n.jsx)(l.Z,{})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=99572)}),_N_E=e.O()}]);
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.