PageSourceSearch

https://ripplemind.com/_next/static/chunks/4306-728d0a8c0474fcc2.js

js ripplemind.com collected 2026-10-06 13:18:05 UTC 10,926 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4306],{42689:function(e,a,t){t.r(a);var n=t(85893),s=t(67294),l=t(41664),i=t.n(l),r=t(11163),d=t(88446),o=t(86501);a.default=e=>{let{children:a}=e,t=(0,r.useRouter)(),{companyId:l}=t.query,[c,m]=(0,s.useState)(null),[u,g]=(0,s.useState)(!0),x=[{name:"Employees",path:"/salary-management/company/".concat(l,"/employees")},{name:"Departments",path:"/salary-management/company/".concat(l,"/department")},{name:"Attendance",path:"/salary-management/company/".concat(l,"/attendance")},{name:"Designations",path:"/salary-management/company/".concat(l,"/designation")},{name:"Salary List",path:"/salary-management/company/".concat(l,"/salary-list")},{name:"Holidays",path:"/salary-management/company/".concat(l,"/holidays")},{name:"Religion",path:"/salary-management/company/".concat(l,"/religion")}].sort((e,a)=>e.name.localeCompare(a.name));return(0,s.useEffect)(()=>{if(!l)return;let e=async()=>{var e,a,t;try{let a=await d.Z.post("/payroll/company/company-by-id",{company_id:l});m(null===(e=a.data)||void 0===e?void 0:e.data)}catch(e){o.ZP.error((null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.message)||"Error fetching company"),console.error("❌ Error fetching company:",e)}finally{g(!1)}};e()},[l]),(0,n.jsxs)("div",{className:"flex min-h-screen",children:[(0,n.jsxs)("aside",{className:"w-64 flex-shrink-0 bg-gray-900 text-white p-4",children:[u?(0,n.jsx)("h2",{className:"text-lg font-bold mb-6",children:"Loading..."}):(0,n.jsxs)("div",{className:"flex items-center gap-3 my-3",children:[(null==c?void 0:c.logo_url)&&(0,n.jsx)("img",{src:c.logo_url,alt:c.company_name,className:"w-12 h-12 rounded-full object-cover border border-gray-700"}),(0,n.jsx)("h2",{className:"text-lg font-bold truncate",children:(null==c?void 0:c.company_name)||"Company"})]}),(0,n.jsx)("ul",{className:"space-y-2 mb-6",children:x.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.path,children:(0,n.jsx)("span",{className:"block px-3 py-2 rounded-md cursor-pointer transition-colors ".concat(t.asPath.startsWith(e.path)?"bg-gray-700 font-semibold":"hover:bg-gray-800"),children:e.name})})},e.path))}),(0,n.jsx)(i(),{href:"/salary-management/company",children:(0,n.jsx)("span",{className:"block mt-6 text-sm text-gray-300 hover:text-white",children:"← Back to Companies"})})]}),(0,n.jsx)("main",{className:"flex-1 p-3 bg-gray-100 overflow-x-auto",children:(0,n.jsx)("div",{className:"min-w-[1200px]",children:a})})]})}},28646:function(e,a,t){var n=t(85893),s=t(41664),l=t.n(s),i=t(11163);t(67294),a.Z=()=>{let e=(0,i.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)(l(),{className:"text-blue-500",href:"/login?re_url=".concat(a),children:"Click here to Login"})]})}},27468:function(e,a,t){var n=t(85893),s=t(67294),l=t(88446),i=t(86501),r=t(41664),d=t.n(r),o=t(11163);a.Z=e=>{let{companyId:a,id:t}=e,r=(0,o.useRouter)(),[c,m]=(0,s.useState)({designation_id:"",designation_name:"",designation_description:"",designation_status:!0,department_id:-1}
1),[u,g]=(0,s.useState)([]),[x,p]=(0,s.useState)({designation_name:""}),[h,y]=(0,s.useState)({loading:!1,success:"",error:""}),f=async()=>{try{var e;let t=await l.Z.post("/payroll/department/dropdown-list",{page_enabled:"n",page:-1,limit:-1,sortDetails:{sortKey:"id",sortType:-1},searchDetails:[],searchDetailsAnd:[{basicSearchKey:"",basicSearchValue:"",basicSearchType:""}],searchQuery:"",company_id:a});g((null===(e=t.data)||void 0===e?void 0:e.data)||[])}catch(e){console.error("Failed to fetch Department list:",e)}};(0,s.useEffect)(()=>{f()},[]),(0,s.useEffect)(()=>{if(!t)return;let e=async()=>{y({loading:!0,success:"",error:""});try{var e;let n=await l.Z.post("/payroll/designation/designation-by-id",{designationId:t,company_id:a}),s=null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.data;s?m({designation_id:s.id,designation_description:s.description||"",designation_name:s.name||"",designation_status:!!s.is_active,department_id:s.department_id||-1}):y({loading:!1,success:"",error:"No data found"})}catch(e){y({loading:!1,success:"",error:e.message||"Something went wrong"})}finally{y(e=>({...e,loading:!1}))}};e()},[t]);let b=e=>{let{name:a,value:t}=e.target;m(e=>({...e,[a]:"designation_status"===a?"true"===t:"department_id"===a?parseInt(t):t})),p(e=>({...e,[a]:""}))},j=()=>{let e={};return c.designation_name||(e.designation_name="Designation name is required"),p(e),0===Object.keys(e).length},v=async()=>{if(!j()){i.ZP.error("Please update all required fields.");return}y({loading:!0,success:"",error:""});let e={name:c.designation_name,description:c.designation_description,designationId:c.designation_id,is_active:c.designation_status,departmentId:c.department_id,company_id:a};try{t?(await l.Z.put("/payroll/designation/update",e),i.ZP.success("Designation updated successfully!")):(await l.Z.post("/payroll/designation/create",e),i.ZP.success("Designation added successfully!")),r.push("/salary-management/company/".concat(a,"/designation"))}catch(e){y({loading:!1,success:"",error:t?"Failed to update designation!":"Failed to add designation!"})}};return(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"container mx-auto",children:(0,n.jsxs)("div",{className:"py-5 px-2 lg:px-8",children:[(0,n.jsx)("h2",{className:"font-bold mb-2",children:t?"Designation Edit":"Designation Add"}),(0,n.jsx)("div",{className:"container mx-auto py-1",children:(0,n.jsxs)("ul",{className:"flex flex-wrap items-center",children:[(0,n.jsxs)("li",{className:"inline-flex items-center",children:[(0,n.jsx)(d(),{href:"/salary-management/company/".concat(a,"/designation"),children:(0,n.jsx)("span",{className:"text-gray-600 hover:text-blue-500",children:"Designation List"})}),(0,n.jsx)("i",{className:"fa fa-angle-right mx-3 text-gray-400"})]}),(0,n.jsx)("li",{className:"inline-flex items-center",children:(0,n.jsx)("span",{className:"text-blue-500",children:t?"Edit":"Add"})})]})}),(0,n.jsx)("div",{className:"py-3",children:(0,n.jsx)(d(),{href:"/salary-management/company/".concat(a,"/designation"),children:(0,n.jsx)("button",{className:"shadow bg-slate-300 hover:bg-slate-400 text-black py-2 px-4 rounded",type:"button",children:"Back"})})}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row lg:flex-row items-center pb-3",children:[(0,n.jsx)("div",{className:"w-full md:w-[40%] lg:w-1/5",children:(0,n.jsx)("label",{className:"block text-black font-semibold text-sm mb-1",children:"Department*"})}),(0,n.jsx)("div",{className:"w-full lg:w-[40%]",children:(0,n.jsx)("div",{className:"md:ml-[-21%] md:w-[68%] lg:w-[119%] lg:ml-[-1%]",children:(0,n.jsxs)("select",{name:"department_id",value:c.department_id,className:"border-2 border-gray-200 rounded w-full md:ml-[26%] lg:ml-[0%] lg:w-3/4 py-2 px-4 text-gray-700 text-sm bg-slate-200",onChange:b,children:[(0,n.jsx)("option",{value:-1,children:"Select Department"}),u.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})})})]}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row lg:flex-row items-center pb-3",children:[(0,n.jsx)("div",{className:"w-full md:w-[40%] lg:w-1/5",children:(0,n.jsx)("label",{className:"block text-black font-semibold text-sm mb-1",children:"Name*"})}),(0,n.jsxs)("div",{className:"w-full lg:w-[40%]",children:[(0,n.jsx)("div",{className:"md:ml-[-21%] md:w-[68%] lg:w-[119%] lg:ml-[-1%]",children:(0,n.jsx)("input",{name:"designation_name",type:"text",value:c.designation_name,className:"border-2 border-gray-200 rounded w-full md:ml-[26%] lg:ml-[0%] lg:w-3/4 py-2 px-4 text-gray-700 text-sm bg-slate-200",placeholder:"Name",onChange:b,onKeyDown:e=>{(38===e.keyCode||40===e.keyCode)&&e.preventDefault()}})}),x.designation_name&&(0,n.jsx)("div",{className:"text-red-300 text-sm mt-1",children:x.designation_name})]})]}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row lg:flex-row items-center pb-3",children:[(0,n.jsx)("div",{className:"w-full md:w-[40%] lg:w-1/5",children:(0,n.jsx)("label",{className:"block text-black font-semibold text-sm mb-1",children:"Description"})}),(0,n.jsx)("div",{className:"w-full lg:w-[40%]",children:(0,n.jsx)("div",{className:"md:ml-[-21%] md:w-[68%] lg:w-[119%] lg:ml-[-1%]",children:(0,n.jsx)("input",{name:"designation_description",type:"text",value:c.designation_description,className:"border-2 border-gray-200 rounded w-full md:ml-[26%] lg:ml-[0%] lg:w-3/4 py-2 px-4 text-gray-700 text-sm bg-slate-200",placeholder:"Description",onChange:b,onKeyDown:e=>{(38===e.keyCode||40===e.keyCode)&&e.preventDefault()}})})})]}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row lg:flex-row items-center pb-3",children:[(0,n.jsx)("div",{className:"w-full md:w-[40%] lg:w-1/5",children:(0,n.jsx)("label",{className:"block text-black font-semibold text-sm mb-1",children:"Status*"})}),(0,n.jsx)("div",{className:"w-full lg:w-[40%]",children:(0,n.jsx)("div",{className:"md:ml-[-21%] md:w-[68%] lg:w-[119%] lg:ml-[-1%]",children:(0,n.jsxs)("select",{name:"designation_status",value:c.designation_status?"true":"false",className:"border-2 border-gray-200 rounded w-full md:ml-[26%] lg:ml-[0%] lg:w-3/4 py-2 px-4 text-gray-700 text-sm bg-slate-200",onChange:b,children:[(0,n.jsx)("option",{value:"true",children:"True"}),(0,n.jsx)("option",{value:"false",children:"False"})]})})})]}),(0,n.jsx)("div",{className:"pt-4",children:h.loading?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"pb-3",children:(0,n.jsx)("p",{className:"text-blue-400 text-sm bg-blue-100 p-2 rounded",children:"Loading..."})}),(0,n.jsx)("button",{className:"shadow bg-yellow-400 hover:bg-yellow-500 text-white py-2 px-4 roun
1ded",type:"button",children:"Loading..."})]}):(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{className:"shadow bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded",type:"button",onClick:v,children:t?"Update":"Add"}),(0,n.jsx)(d(),{href:"/salary-management/company/".concat(a,"/designation"),children:(0,n.jsx)("button",{className:"shadow bg-slate-300 hover:bg-slate-400 text-black py-2 px-4 rounded ml-3",type:"button",children:"Back"})})]})})]})})})}},11846:function(e,a,t){t.d(a,{Z:function(){return r}});var n=t(85893),s=t(48583),l=t(94543),i=t(28646);function r(e){let{children:a}=e,t=(0,s.Dv)(l.ZP);return t.isLoggedIn?a:(0,n.jsx)(i.Z,{})}},64270:function(e,a,t){t.d(a,{N:function(){return i},P:function(){return l}});var n=t(11163),s=t(67294);function l(e){let a=(0,n.useRouter)(),[t,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(a.isReady){let t=a.query[e];if("string"==typeof t){let e=Number(t);e>=1&&l(e)}}},[a.isReady,a.query,e]),t}function i(e){let a=(0,n.useRouter)(),[t,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(a.isReady){let t=a.query[e];"string"==typeof t&&""!==t.trim()&&l(t)}},[a.isReady,a.query,e]),t}}}]);

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.