Skip to content

Commit

Permalink
Fix/update trainee info (#137)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
MnorbertVii authored Sep 26, 2024
1 parent 6568857 commit 5088aa5
Show file tree
Hide file tree
Showing 10 changed files with 16,630 additions and 16,805 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"react-i18next": "^11.18.6",
"react-icons": "^4.6.0",
"react-js-pagination": "^3.0.3",
"react-loader-spinner": "^6.1.6",
"react-paginate": "^8.1.3",
"react-redux": "^8.0.4",
"react-render-html": "^0.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReusableComponents/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React from "react";

interface SelectFieldProps {
id?: string;
Expand All @@ -21,7 +21,7 @@ const SelectField: React.FC<SelectFieldProps> = ({
ref,
className = "",
defaultValue,
onBlur
onBlur,
}) => {
return (
<select
Expand Down
Empty file modified src/components/sidebar/sidebar.tsx
100755 → 100644
Empty file.
7 changes: 6 additions & 1 deletion src/components/sidebar/sidebarItems.tsx
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ export const sidebarItems1 = [
icon: <Icon icon="game-icons:cycle"></Icon>,
title: "Application Cycles",
},

{
path: 'Trainee-applicants',
icon: <Icon icon="ic:round-people"></Icon>,
title: 'Trainees/Applicants',
},

{
path: "grading",
icon: <Icon icon="bxs:dashboard"></Icon>,
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import * as ReactDOMClient from "react-dom/client";
import "./index.css";
import { ToastContainer } from "react-toastify";

import { Toaster } from "react-hot-toast";
const App = React.lazy(() => import("./App"));

import { HashRouter } from "react-router-dom";
Expand All @@ -18,6 +18,7 @@ const root = ReactDOMClient.createRoot(container).render(
<ThemeContextProvider>
<App />
</ThemeContextProvider>
<Toaster />
<ToastContainer theme="colored" />
</HashRouter>
</Provider>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/TraineApplicant/Trainee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const AddTrainee = (props: any) => {
<div className="w-full">
<div>
<div className="bg-light-bg dark:bg-dark-frame-bg min-h-screen overflow-y-hidden overflow-x-hidden">
<div className="flex items-left px-8 gap-2">
<div className="flex items-left px-8 py-8 gap-2">
<div className="flex py-2 pb-8 w-fit">
<button
onClick={Open}
Expand Down Expand Up @@ -346,7 +346,7 @@ const AddTrainee = (props: any) => {
>
<li>
<Link
to={`/trainee-applicant/${item._id}/edit`}
to={`/admin/trainee-applicant/${item._id}/edit`}
className="text-sm hover:bg-gray-100 text-gray-700 dark:hover:bg-gray-500 dark:text-white block px-4 py-2"
>
Edit
Expand Down
Loading

0 comments on commit 5088aa5

Please sign in to comment.