diff --git a/frontend/src/custom/ActionConfirmation.tsx b/frontend/src/custom/ActionConfirmation.tsx index 7c56b65..0c1abda 100644 --- a/frontend/src/custom/ActionConfirmation.tsx +++ b/frontend/src/custom/ActionConfirmation.tsx @@ -31,7 +31,7 @@ import { IoIosWarning } from "react-icons/io"; borderColor: 'black', borderWidth: '2px' }} - className=" bg-white rounded-lg shadow-2xl p-8 max-w-xl w-full mx-4 transform transition-all duration-300" + className=" bg-white rounded-md shadow-2xl p-8 max-w-xl w-full mx-4 transform transition-all duration-300" onClick={(e) => e.stopPropagation()} > diff --git a/frontend/src/main-page/grants/GrantPage.tsx b/frontend/src/main-page/grants/GrantPage.tsx index 05bc399..98566e2 100644 --- a/frontend/src/main-page/grants/GrantPage.tsx +++ b/frontend/src/main-page/grants/GrantPage.tsx @@ -17,7 +17,8 @@ import { import { toJS } from "mobx"; import { fetchGrants } from "./filter-bar/processGrantData.ts"; - +import { UserStatus } from "../../../../middle-layer/types/UserStatus.ts"; +import { Navigate } from "react-router-dom"; interface GrantPageProps { showOnlyMyGrants?: boolean; //if true, filters grants by user email @@ -50,38 +51,50 @@ function GrantPage({ showOnlyMyGrants = false }: GrantPageProps) { } }, [showNewGrantModal, wasGrantSubmitted]); - return ( -
-
-
+ return user ? ( + user?.position !== UserStatus.Inactive ? ( +
+
setShowNewGrantModal(true)} />
-
-
- +
+
+ +
+
+
+ setSelectedGrant(null)} + currentUserEmail={currentUserEmail} + showOnlyMyGrants={showOnlyMyGrants} + /> +
+
-
-
- setSelectedGrant(null)} - currentUserEmail={currentUserEmail} - showOnlyMyGrants={showOnlyMyGrants} +
+ {showNewGrantModal && ( + { + setShowNewGrantModal(false); + setWasGrantSubmitted(true); + }} + isOpen={showNewGrantModal} /> -
+ )}
-
- {showNewGrantModal && ( - {setShowNewGrantModal(false); setWasGrantSubmitted(true);} } isOpen={showNewGrantModal} /> - )} -
-
+ ) : ( + + ) + ) : ( + ); -} +} export default GrantPage; diff --git a/frontend/src/main-page/grants/grant-list/GrantItem.tsx b/frontend/src/main-page/grants/grant-list/GrantItem.tsx index 3360955..36694c2 100644 --- a/frontend/src/main-page/grants/grant-list/GrantItem.tsx +++ b/frontend/src/main-page/grants/grant-list/GrantItem.tsx @@ -217,7 +217,7 @@ const GrantItem: React.FC = observer( {/*Left column of gray labels */}
{/*Application date and grant start date row*/} -
+
{/*Application date*/}
= observer( className="w-4/5 border-l border-black bg-[#FFCEB6] rounded-r-md" >

{" "} {curGrant.bcan_poc?.POC_name ?? "Unknown"}{" "}

= observer( className="w-4/5 border-l border-black bg-[#FFCEB6] rounded-r-md" >

{" "} {curGrant.grantmaker_poc?.POC_name ?? "Unknown"}

= observer( Scope Documents