Skip to content

Commit

Permalink
Merge pull request #98 from atlp-rwanda/ft-admin-update-status
Browse files Browse the repository at this point in the history
ft-admin-update-candidate-status
  • Loading branch information
Anguandia authored Nov 22, 2023
2 parents 624c744 + 70f0777 commit 6a83bf8
Show file tree
Hide file tree
Showing 6 changed files with 645 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"react-datepicker": "^4.8.0",
"react-hook-form": "^7.45.4",
"react-hooks-useform": "^0.1.86",
"react-hot-toast": "^2.4.1",
"react-i18next": "^11.18.6",
"react-icons": "^4.6.0",
"react-js-pagination": "^3.0.3",
Expand Down
57 changes: 57 additions & 0 deletions src/dummyData/Candidate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"id": 1,
"firstname": "Leanne",
"lastname": "Graham",
"email": "[email protected]",
"availability": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"status": "submitted",
"zipcode": "92998-3874"
},
{
"id": 2,
"firstname": "Clementine ",
"lastname": "Bauch",
"email": "[email protected]",
"availability": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"status": "submitted",
"zipcode": "92998-3874"
},
{
"id": 3,
"firstname": "Patricia",
"lastname": "Lebsack",
"email": "[email protected]",
"availability": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"status": "submitted",
"zipcode": "92998-3874"
},
{
"id": 4,
"firstname": "Chelsey",
"lastname": "Dietrich",
"email": "[email protected]",
"availability": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"status": "submitted",
"zipcode": "92998-3874"
},
{
"id": 5,
"name": "Mrs. Dennis Schulist",
"username": "Leopoldo_Corkery",
"email": "[email protected]",
"availability": "Kulas Light",
"status": "submitted",
"suite": "Apt. 556",
"city": "Gwenborough",
"zipcode": "92998-3874"
}
]
12 changes: 6 additions & 6 deletions src/pages/Applications/AdminViewApplications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ const ListApplications = () => {
const [activePage, setActivePage] = useState(1);
const [itemsCountPerPage, setItemsCountPerPage] = useState(10);

const [moredrop, setmoredrop] = useState('');
const onSubmitHandler = (userid: any) => {
if (!moredrop) setmoredrop(userid);
if (moredrop) setmoredrop('');
const [isDrop, setDrop] = useState<String | Number>("");

const onSubmitHandler = (appId: any) => {
if (!isDrop) setDrop(appId);
if (isDrop) setDrop("");
};

useEffect(() => {
Expand All @@ -40,7 +41,6 @@ const ListApplications = () => {
};

const totalApplications = applications?.length;
console.log(totalApplications);

return (
<>
Expand Down Expand Up @@ -136,7 +136,7 @@ const ListApplications = () => {
/>
<div
className={`${
moredrop === item._id
isDrop === item._id
? 'block'
: 'hidden'
} absolute bg-white dark:bg-dark-tertiary dark:text-white text-base z-50 list-none divide-y divide-gray-100 rounded shadow my-4`}
Expand Down
Loading

0 comments on commit 6a83bf8

Please sign in to comment.