Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added allfileshas.txt
Binary file not shown.
2,651 changes: 1,962 additions & 689 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
"@testing-library/user-event": "^13.5.0",
"axios": "^1.7.7",
"dayjs": "^1.11.13",
"json2csv": "^6.0.0-alpha.2",
"jspdf": "^2.5.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"react-router-dom": "^6.26.2",
"react-scripts": "5.0.1",
"tailwindcss": "^3.4.12",
"web-vitals": "^2.1.4"
"web-vitals": "^2.1.4",
"xlsx": "^0.18.5"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -44,5 +47,20 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"babel-loader": "^9.2.1",
"css-loader": "^7.1.2",
"html-webpack-plugin": "^5.6.0",
"os-browserify": "^0.3.0",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"style-loader": "^4.0.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0"
}
}
1 change: 1 addition & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import App from './App';
import './pages/PIMModule/PIM.css'

test('renders learn react link', () => {
render(<App />);
Expand Down
2 changes: 1 addition & 1 deletion src/Components/ApprovedLeave/ApprovedLeave.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const ApprovedLeave = () => {
};

return (
<div className="container mx-auto px-7 py-4 bg-customblue">
<div className="container mx-auto px-7 py-4 bg-customblue flex flex-col px-7 py-4 bg-ligreen">
<h2 className="text-[32px] font-normal font-lexend mb-4">Approved Leave</h2>

{Object.keys(approvedLeaves).map((date) => (
Expand Down
87 changes: 87 additions & 0 deletions src/Components/Dependentinfo/Dependentinfo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { BiAddToQueue } from "react-icons/bi";
import { FiEdit } from "react-icons/fi"

import React from 'react';

import { useState,useContext } from "react";

import Popups from "../Popups/Popups";

function Dependent_info({edit}){


const [showPopup, setShowPopup] = useState(false);

const closePopup = () => {
setShowPopup(false);
};
const dependants=[
{
name:"Dhruva Doe",
relation:"son"
},
{
name:"Samua Doe",
relation:"son"
},
{
name:"Samua Doe",
relation:"son"
}
]


return (
<>
<div class="table-container">
<h1 className="h2 font-manrope font-bold mt-2 text-2xl mb-3 ml-0">Dependant Information</h1>
<table>
<thead>
<tr className="headers">
<th>Dependent's Name</th>
<th>Relation to Employee</th>
{(edit===true)&&(
<th>
<button type="button" class="add-btn" onClick={()=>setShowPopup(true)}>
< BiAddToQueue className="icon1"/>
</button>
</th>
)}
</tr>

</thead>
<tbody className="raws">
{dependants.map(dependant=>(
<tr>
<td>{dependant.name}</td>
<td>{dependant.relation}</td>
{(edit===true)&&(
<td>

<button type="button" class="edit-btn" onClick={()=>setShowPopup(true)}>
< FiEdit className="icon"/>
</button>

</td>
)}

</tr>

))}

</tbody>
</table>

</div>

{showPopup && (
<div>
<Popups closePopup={closePopup} /> {/* Popup with a close function */}
</div>
)}

</>
);
};

export default Dependent_info
73 changes: 73 additions & 0 deletions src/Components/Emergancycontact_info/Emergancycontact_info.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { BiAddToQueue } from "react-icons/bi";
import { FiEdit } from "react-icons/fi"
import { useState } from "react";
import Popup2 from "../Popup2/Popup2";
function Emergency_contact_info({edit}){
const [showPopup, setShowPopup] = useState(false);
const closePopup = () => {
setShowPopup(false);
}
const Emergency_info=[
{
number:"+94716843128",
realtion:"son"
},
{
number:"+9471536447",
realtion:"spouse"
},
{
number:"+9471536447",
realtion:"spouse"
},


]
return (
<>
<div class="table-container">
<h1 className="h2 font-manrope font-bold mt-2 text-2xl mb-3 ml-0">Emergency Contact Information</h1>
<table>
<thead>
<tr className="headers">
<th>Emergency Contact Number</th>
<th>Relation to Employee</th>
{(edit===true)&&(
<th>
<button type="button" class="add-btn" onClick={()=>setShowPopup(true)}>
< BiAddToQueue className="icon1"/>
</button>
</th>
)}
</tr>
</thead>
<tbody className="raws">
{Emergency_info.map(item=>(
<tr>
<td>{item.number}</td>
<td>{item.realtion}</td>
{(edit===true)&&(
<td>
<button type="button" class="edit-btn" onClick={()=>setShowPopup(true)}>
< FiEdit className="icon"/>
</button>
</td>
)}
</tr>


))}

</tbody>
</table>
</div>
{showPopup && (
<div>
<Popup2 closePopup={closePopup} /> {/* Popup with a close function */}
</div>
)}

</>
);
}
export default Emergency_contact_info
Empty file.
Loading