Skip to content

Commit 2bed1c5

Browse files
MnorbertViiIshimwe7
authored andcommitted
Fix/update trainee info (#137)
* add validations and work on edit * ensure birthdate is correctly set in formData * ensure all formData are populated correctly * fix codeclimate issue * update traineUpdate * update traineUpdate * update traineUpdate * update traineUpdate * update traineUpdate * update traineUpdate * fix traineUpdate * add loader * add sidebar link for trainee applicants * add redirection after updating
1 parent 6ce4387 commit 2bed1c5

File tree

10 files changed

+16630
-16805
lines changed

10 files changed

+16630
-16805
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"react-i18next": "^11.18.6",
116116
"react-icons": "^4.6.0",
117117
"react-js-pagination": "^3.0.3",
118+
"react-loader-spinner": "^6.1.6",
118119
"react-paginate": "^8.1.3",
119120
"react-redux": "^8.0.4",
120121
"react-render-html": "^0.6.0",

src/components/ReusableComponents/Select.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React from "react";
22

33
interface SelectFieldProps {
44
id?: string;
@@ -21,7 +21,7 @@ const SelectField: React.FC<SelectFieldProps> = ({
2121
ref,
2222
className = "",
2323
defaultValue,
24-
onBlur
24+
onBlur,
2525
}) => {
2626
return (
2727
<select

src/components/sidebar/sidebar.tsx

100755100644
File mode changed.

src/components/sidebar/sidebarItems.tsx

100755100644
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ export const sidebarItems1 = [
4444
icon: <Icon icon="game-icons:cycle"></Icon>,
4545
title: "Application Cycles",
4646
},
47-
47+
{
48+
path: 'Trainee-applicants',
49+
icon: <Icon icon="ic:round-people"></Icon>,
50+
title: 'Trainees/Applicants',
51+
},
52+
4853
{
4954
path: "grading",
5055
icon: <Icon icon="bxs:dashboard"></Icon>,

src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import * as ReactDOMClient from "react-dom/client";
33
import "./index.css";
44
import { ToastContainer } from "react-toastify";
5-
5+
import { Toaster } from "react-hot-toast";
66
const App = React.lazy(() => import("./App"));
77

88
import { HashRouter } from "react-router-dom";
@@ -18,6 +18,7 @@ const root = ReactDOMClient.createRoot(container).render(
1818
<ThemeContextProvider>
1919
<App />
2020
</ThemeContextProvider>
21+
<Toaster />
2122
<ToastContainer theme="colored" />
2223
</HashRouter>
2324
</Provider>

src/pages/TraineApplicant/Trainee.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const AddTrainee = (props: any) => {
228228
<div className="w-full">
229229
<div>
230230
<div className="bg-light-bg dark:bg-dark-frame-bg min-h-screen overflow-y-hidden overflow-x-hidden">
231-
<div className="flex items-left px-8 gap-2">
231+
<div className="flex items-left px-8 py-8 gap-2">
232232
<div className="flex py-2 pb-8 w-fit">
233233
<button
234234
onClick={Open}
@@ -346,7 +346,7 @@ const AddTrainee = (props: any) => {
346346
>
347347
<li>
348348
<Link
349-
to={`/trainee-applicant/${item._id}/edit`}
349+
to={`/admin/trainee-applicant/${item._id}/edit`}
350350
className="text-sm hover:bg-gray-100 text-gray-700 dark:hover:bg-gray-500 dark:text-white block px-4 py-2"
351351
>
352352
Edit

0 commit comments

Comments
 (0)