Skip to content

Commit

Permalink
#118 fx: builtinSuperAdminCreateProgram (#126)
Browse files Browse the repository at this point in the history
* fix: remove placeholder property

* The built-in superadmin account cannot create a program

---------

Co-authored-by: ceelogre <[email protected]>
  • Loading branch information
2 people authored and Ishimwe7 committed Oct 10, 2024
1 parent 29c4858 commit 513e135
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions src/pages/programs/Programs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const Programs = (props: any) => {
};
if (validateForm(submitData, programSchema)) {
await dispatch(createProgramAction(obj));
removeModal();
}
} catch (error) {
console.log(error);
Expand Down Expand Up @@ -181,11 +182,11 @@ const Programs = (props: any) => {
<>
<ToastContainer />
<div
className={`w-[63.5rem] h-screen z-20 bg-black bg-opacity-30 backdrop-blur-sm absolute flex items-center justify-center overflow-y-hidden ${
className={`h-svh w-max z-20 bg-opacity-30 backdrop-blur-sm absolute flex justify-center ${
addNewProgramModal === true ? "block" : "hidden"
}`}
>
<div className="bg-white dark:bg-dark-bg w-full max-h-[900px] overflow-auto md_:w-[65%] md-sm:w-[95%] rounded-lg p-4 pb-8">
<div className="bg-white dark:bg-dark-bg w-full max-h-[500px] overflow-auto md_:w-[65%] md-sm:w-[95%] rounded-lg p-4 pb-8">
<div className="card-title w-full flex flex-wrap justify-center items-center">
<h3 className="font-bold text-sm dark:text-white text-center w-11/12 ">
<icons.AiOutlineClose
Expand All @@ -198,7 +199,7 @@ const Programs = (props: any) => {
<div className="flex flex-col w-full mt-14 md_:mt-5">
<form
onSubmit={handleSubmit}
className="flex flex-col md_:flex-row justify-center space-y-7 md_:space-x-7 md_:space-y-0"
className="flex flex-col md_:flex-row space-y-7 md_:space-x-7 md_:space-y-0"
>
<div className="flex flex-col w-full md_:w-[300px] space-y-3">
<div className="flex flex-col justify-center items-start space-y-2">
Expand Down Expand Up @@ -272,7 +273,10 @@ const Programs = (props: any) => {
</span>
)}
</div>
<div className="flex flex-col items-start space-y-2">

</div>
<div className="flex flex-col md_:justify-start md_:items-center w-full md_:w-[500px] space-y-3">
<div className="flex flex-col items-start space-y-2 mr-11">
<label className="font-bold text-black-text dark:text-white text-left">
Duration
</label>
Expand All @@ -290,8 +294,6 @@ const Programs = (props: any) => {
</span>
)}
</div>
</div>
<div className="flex flex-col md_:justify-start md_:items-center w-full md_:w-[300px] space-y-3">
<div className="flex flex-col items-start space-y-2">
<label className="font-bold text-black-text dark:text-white text-left">
Entry requirements
Expand Down Expand Up @@ -336,7 +338,7 @@ const Programs = (props: any) => {
</label>
<button
type="button"
className="flex items-center justify-center bg-white text-dark-frame-bg rounded transition-colors border border-black dark:border-transparent hover:bg-dark-frame-bg hover:text-white hover:border hover:border-white font-extrabold px-2 h-4"
className="bg-green-500 text-white px-4 py-2 rounded w-full md:w-auto self-start"
onClick={() => removeEntry(item)}
>
-
Expand Down
2 changes: 1 addition & 1 deletion src/pages/updateTrainee/traineUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -726,4 +726,4 @@ const mapState = (allCycles: any) => ({

export default connect(mapState, {
getAllCycles,
})(TraineeUpdate);
})(TraineeUpdate);

0 comments on commit 513e135

Please sign in to comment.