import{r as t,j as e,L as d}from"./index-CxHdhPEA.js";import{U as h}from"./upload-M3jXX2G3.js";import"./createLucideIcon-BjWKJaOg.js";const j=()=>{const[n,r]=t.useState("PERSONAL DETAILS"),[l,i]=t.useState({employeeName:"",dateOfBirth:"",gender:"Male",nationality:"Indian",caste:"",religion:"",maritalStatus:"",mobileNo:"",emailId:"",fatherName:"",motherName:"",parentsMobileNo:"",permanentAddress:"",temporaryAddress:"",employeeCode:"",employeeLoginId:"",employeePassword:"",dateOfJoining:"",department:"",designation:"",accountNo:"",bankName:"",branchName:"",panNo:"",ifscCode:"",annualIncome:"",salaryGrade:"",salaryGradeCBSE:"",leavesPermitted:"",aadharNo:"",fullPartTime:"",qualification:"",universityBoard:"",state:"",passingYear:"",percentage:"",companyName:"",fromDate:"",toDate:"",jobNature:"",prevDesignation:"",salaryWithdrawn:"",leavingReason:""}),s=(a,c)=>{i(m=>({...m,[a]:c}))},o=["PERSONAL DETAILS","EMPLOYMENT DETAILS","ACADEMICS DETAILS","PREVIOUS EXPERIENCE"];return e.jsxs("div",{className:"container-fluid",children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center bg-white p-3 mb-4 shadow-sm",children:[e.jsx("h4",{className:"mb-0",children:"Add Employee"}),e.jsx(d,{to:"/admin/Total-Employee",className:"btn btn-outline-primary",children:"Back to EmployeeDetail List"})]}),e.jsx("div",{className:"card",children:e.jsxs("div",{className:"card-body",children:[e.jsx("ul",{className:"nav nav-tabs mb-4",children:o.map(a=>e.jsx("li",{className:"nav-item",children:e.jsx("button",{className:`nav-link ${n===a?"active":""}`,onClick:()=>r(a),children:a})},a))}),e.jsxs("div",{className:"tab-content",children:[n==="PERSONAL DETAILS"&&e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col-md-3 mb-4",children:e.jsxs("div",{className:"upload-container p-4 bg-white rounded",style:{boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.1)",height:"100%",minHeight:"300px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"1px solid #e0e0e0"},children:[e.jsx("h5",{className:"text-center mb-4",children:"Upload Employee Photo"}),e.jsx("div",{className:"rounded-circle bg-light d-flex align-items-center justify-content-center mb-4",style:{width:"150px",height:"150px",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.1)",border:"2px dashed #ccc"},children:e.jsx(h,{size:50,className:"text-secondary"})}),e.jsx("button",{className:"btn btn-outline-primary px-4",children:"Upload Photo"}),e.jsxs("small",{className:"text-muted mt-3 text-center",children:["Supported formats: JPG, PNG",e.jsx("br",{}),"Max size: 5MB"]})]})}),e.jsx("div",{className:"col-md-9",children:e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Employee Name"}),e.jsx("input",{type:"text",className:"form-control",value:l.employeeName,onChange:a=>s("employeeName",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Date of Birth"}),e.jsx("input",{type:"date",className:"form-control",value:l.dateOfBirth,onChange:a=>s("dateOfBirth",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Gender"}),e.jsxs("div",{children:[e.jsx("input",{type:"radio",id:"male",name:"gender",value:"Male",checked:l.gender==="Male",onChange:a=>s("gender",null,a.target.value)}),e.jsx("label",{htmlFor:"male",className:"ms-2",children:"Male"}),e.jsx("input",{type:"radio",id:"female",name:"gender",value:"Female",checked:l.gender==="Female",onChange:a=>s("gender",null,a.target.value),className:"ms-3"}),e.jsx("label",{htmlFor:"female",className:"ms-2",children:"Female"})]})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Nationality"}),e.jsxs("div",{children:[e.jsx("input",{type:"radio",id:"indian",name:"nationality",value:"Indian",checked:l.nationality==="Indian",onChange:a=>s("nationality",null,a.target.value)}),e.jsx("label",{htmlFor:"indian",className:"ms-2",children:"Indian"}),e.jsx("input",{type:"radio",id:"non-indian",name:"nationality",value:"Non-Indian",checked:l.nationality==="Non-Indian",onChange:a=>s("nationality",null,a.target.value),className:"ms-3"}),e.jsx("label",{htmlFor:"non-indian",className:"ms-2",children:"Non-Indian"})]})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Marital Status"}),e.jsxs("select",{className:"form-control",value:l.MaritalStatus,onChange:a=>s("MaritalStatus",null,a.target.value),children:[e.jsx("option",{value:"",children:"Select Marital Status"}),e.jsx("option",{value:"Single",children:"Single"}),e.jsx("option",{value:"Married",children:"Married"}),e.jsx("option",{value:"Divorced",children:"Divorced"}),e.jsx("option",{value:"Widowed",children:"Widowed"})]})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Mobile Number"}),e.jsx("input",{type:"tel",className:"form-control",value:l.MobileNumber,onChange:a=>s("MobileNumber",null,a.target.value),placeholder:"Enter mobile number",pattern:"[0-9]{10}"})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Email ID"}),e.jsx("input",{type:"email",className:"form-control",value:l.EmailID,onChange:a=>s("EmailID",null,a.target.value),placeholder:"Enter email address"})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Father Name"}),e.jsx("input",{type:"text",className:"form-control",value:l.FatherName,onChange:a=>s("Father Name",null,a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Mother Name"}),e.jsx("input",{type:"text",className:"form-control",value:l.MotherName,onChange:a=>s("Mother Name",null,a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Parents Mob No "}),e.jsx("input",{type:"text",className:"form-control",value:l.ParentsMobNo,onChange:a=>s("Parents Mob NO",null,a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Permananent Address "}),e.jsx("input",{type:"text",className:"form-control",value:l.PermananentAddress,onChange:a=>s("Permananent Address",null,a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Temporary Address "}),e.jsx("input",{type:"text",className:"form-control",value:l.TemporaryAddress,onChange:a=>s("Temporary Address",null,a.target.value)})]})]})})]}),n==="EMPLOYMENT DETAILS"&&e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Employee Code"}),e.jsx("input",{type:"text",className:"form-control",value:l.employeeCode,onChange:a=>s("employeeCode",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Employee Login ID"}),e.jsx("input",{type:"text",className:"form-control",value:l.employeeLoginId,onChange:a=>s("employeeLoginId",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Employee Password"}),e.jsx("input",{type:"password",className:"form-control",value:l.employeePassword,onChange:a=>s("employeePassword",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Date of Joining"}),e.jsx("input",{type:"date",className:"form-control",value:l.dateOfJoining,onChange:a=>s("dateOfJoining",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Department"}),e.jsx("input",{type:"text",className:"form-control",value:l.department,onChange:a=>s("department",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Designation"}),e.jsx("input",{type:"text",className:"form-control",value:l.designation,onChange:a=>s("designation",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Account No"}),e.jsx("input",{type:"text",className:"form-control",value:l.accountNo,onChange:a=>s("accountNo",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Bank Name"}),e.jsx("input",{type:"text",className:"form-control",value:l.bankName,onChange:a=>s("bankName",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Branch Name"}),e.jsx("input",{type:"text",className:"form-control",value:l.branchName,onChange:a=>s("branchName",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"PAN No"}),e.jsx("input",{type:"text",className:"form-control",value:l.panNo,onChange:a=>s("panNo",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"IFSC Code"}),e.jsx("input",{type:"text",className:"form-control",value:l.ifscCode,onChange:a=>s("ifscCode",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Annual Income"}),e.jsx("input",{type:"text",className:"form-control",value:l.annualIncome,onChange:a=>s("annualIncome",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Salary Grade"}),e.jsx("input",{type:"text",className:"form-control",value:l.salaryGrade,onChange:a=>s("salaryGrade",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Salary Grade (CBSE)"}),e.jsx("input",{type:"text",className:"form-control",value:l.salaryGradeCBSE,onChange:a=>s("salaryGradeCBSE",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Leaves Permitted"}),e.jsx("input",{type:"text",className:"form-control",value:l.leavesPermitted,onChange:a=>s("leavesPermitted",a.target.value)})]}),e.jsxs("div",{className:"col-md-4 mb-3",children:[e.jsx("label",{className:"form-label",children:"Aadhar No"}),e.jsx("input",{type:"text",className:"form-control",value:l.aadharNo,onChange:a=>s("aadharNo",a.target.value)})]})]}),n==="ACADEMICS DETAILS"&&e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Full/Part Time"}),e.jsxs("select",{className:"form-select",value:l.fullPartTime,onChange:a=>s("fullPartTime",a.target.value),children:[e.jsx("option",{value:"",children:"Select time"}),e.jsx("option",{value:"Full Time",children:"Full Time"}),e.jsx("option",{value:"Part Time",children:"Part Time"})]})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Qualification"}),e.jsxs("select",{className:"form-select",value:l.qualification,onChange:a=>s("qualification",a.target.value),children:[e.jsx("option",{value:"",children:"Select Qualification"}),e.jsx("option",{value:"10th",children:"10th"}),e.jsx("option",{value:"12th",children:"12th"}),e.jsx("option",{value:"BCA",children:"BCA"}),e.jsx("option",{value:"B.Tech",children:"B.Tech"}),e.jsx("option",{value:"MCA",children:"MCA"}),e.jsx("option",{value:"B.Sc IT",children:"B.Sc IT"}),e.jsx("option",{value:"BBA",children:"BBA"}),e.jsx("option",{value:"MBA",children:"MBA"}),e.jsx("option",{value:"Other",children:"Other (Specify Below)"})]})]}),l.qualification==="Other"&&e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Other Qualification"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Enter your qualification",value:l.customQualification||"",onChange:a=>s("customQualification",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"University/Board"}),e.jsxs("select",{className:"form-select",value:l.universityBoard,onChange:a=>s("universityBoard",a.target.value),children:[e.jsx("option",{value:"",children:"Select University/Board"}),e.jsx("option",{value:"IIT Bombay",children:"IIT Bombay"}),e.jsx("option",{value:"IIT Delhi",children:"IIT Delhi"}),e.jsx("option",{value:"IIT Madras",children:"IIT Madras"}),e.jsx("option",{value:"IIT Kanpur",children:"IIT Kanpur"}),e.jsx("option",{value:"IIT Kharagpur",children:"IIT Kharagpur"}),e.jsx("option",{value:"NIT Trichy",children:"NIT Trichy"}),e.jsx("option",{value:"NIT Surathkal",children:"NIT Surathkal"}),e.jsx("option",{value:"NIT Warangal",children:"NIT Warangal"}),e.jsx("option",{value:"BITS Pilani",children:"BITS Pilani"}),e.jsx("option",{value:"MIT Manipal",children:"MIT Manipal"}),e.jsx("option",{value:"Anna University",children:"Anna University"}),e.jsx("option",{value:"JNU Delhi",children:"JNU Delhi"}),e.jsx("option",{value:"Delhi University",children:"Delhi University"}),e.jsx("option",{value:"Calcutta University",children:"Calcutta University"}),e.jsx("option",{value:"Mumbai University",children:"Mumbai University"}),e.jsx("option",{value:"Pune University",children:"Pune University"}),e.jsx("option",{value:"Banaras Hindu University",children:"Banaras Hindu University"}),e.jsx("option",{value:"Osmania University",children:"Osmania University"}),e.jsx("option",{value:"Other",children:"Other (Specify Below)"})]})]}),l.universityBoard==="Other"&&e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Other University/Board"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Enter university or board",value:l.customUniversity||"",onChange:a=>s("customUniversity",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"State"}),e.jsxs("select",{className:"form-select",value:l.state,onChange:a=>s("state",a.target.value),children:[e.jsx("option",{value:"",children:"Select State"}),e.jsx("option",{value:"Andhra Pradesh",children:"Andhra Pradesh"}),e.jsx("option",{value:"Arunachal Pradesh",children:"Arunachal Pradesh"}),e.jsx("option",{value:"Assam",children:"Assam"}),e.jsx("option",{value:"Bihar",children:"Bihar"}),e.jsx("option",{value:"Chhattisgarh",children:"Chhattisgarh"}),e.jsx("option",{value:"Goa",children:"Goa"}),e.jsx("option",{value:"Gujarat",children:"Gujarat"}),e.jsx("option",{value:"Haryana",children:"Haryana"}),e.jsx("option",{value:"Himachal Pradesh",children:"Himachal Pradesh"}),e.jsx("option",{value:"Jharkhand",children:"Jharkhand"}),e.jsx("option",{value:"Karnataka",children:"Karnataka"}),e.jsx("option",{value:"Kerala",children:"Kerala"}),e.jsx("option",{value:"Madhya Pradesh",children:"Madhya Pradesh"}),e.jsx("option",{value:"Maharashtra",children:"Maharashtra"}),e.jsx("option",{value:"Manipur",children:"Manipur"}),e.jsx("option",{value:"Meghalaya",children:"Meghalaya"}),e.jsx("option",{value:"Mizoram",children:"Mizoram"}),e.jsx("option",{value:"Nagaland",children:"Nagaland"}),e.jsx("option",{value:"Odisha",children:"Odisha"}),e.jsx("option",{value:"Punjab",children:"Punjab"}),e.jsx("option",{value:"Rajasthan",children:"Rajasthan"}),e.jsx("option",{value:"Sikkim",children:"Sikkim"}),e.jsx("option",{value:"Tamil Nadu",children:"Tamil Nadu"}),e.jsx("option",{value:"Telangana",children:"Telangana"}),e.jsx("option",{value:"Tripura",children:"Tripura"}),e.jsx("option",{value:"Uttar Pradesh",children:"Uttar Pradesh"}),e.jsx("option",{value:"Uttarakhand",children:"Uttarakhand"}),e.jsx("option",{value:"West Bengal",children:"West Bengal"}),e.jsx("option",{value:"Other",children:"Other"})]})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Passing Year"}),e.jsx("input",{type:"number",className:"form-control",placeholder:"Enter passing year",value:l.passingYear,onChange:a=>s("passingYear",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Percentage"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Enter percentage",value:l.percentage,onChange:a=>s("percentage",a.target.value)})]})]}),n==="PREVIOUS EXPERIENCE"&&e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Company/Institute Name"}),e.jsx("input",{type:"text",className:"form-control",value:l.companyName,onChange:a=>s("companyName",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"From Date"}),e.jsx("input",{type:"date",className:"form-control",value:l.fromDate,onChange:a=>s("fromDate",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"To Date"}),e.jsx("input",{type:"date",className:"form-control",value:l.toDate,onChange:a=>s("toDate",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Job Nature"}),e.jsxs("select",{className:"form-select",value:l.jobNature,onChange:a=>s("jobNature",a.target.value),children:[e.jsx("option",{value:"",children:"Select Job Nature"}),e.jsx("option",{value:"Full Time",children:"Full Time"}),e.jsx("option",{value:"Part Time",children:"Part Time"}),e.jsx("option",{value:"Internship",children:"Internship"}),e.jsx("option",{value:"Contract",children:"Contract"}),e.jsx("option",{value:"Freelance",children:"Freelance"})]})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Previous Designation"}),e.jsx("input",{type:"text",className:"form-control",value:l.prevDesignation,onChange:a=>s("prevDesignation",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Salary Withdrawn"}),e.jsx("input",{type:"text",className:"form-control",value:l.salaryWithdrawn,onChange:a=>s("salaryWithdrawn",a.target.value)})]}),e.jsxs("div",{className:"col-md-6 mb-3",children:[e.jsx("label",{className:"form-label",children:"Reason for Leaving"}),e.jsx("textarea",{className:"form-control",value:l.leavingReason,onChange:a=>s("leavingReason",a.target.value),rows:"3"})]})]})]}),e.jsxs("div",{className:"d-flex justify-content-end mt-4",children:[e.jsx("button",{className:"btn btn-secondary me-2",children:"Cancel"}),e.jsx("button",{className:"btn btn-primary",children:"Save Details"})]})]})})]})};export{j as default};
|