diff --git a/backend/src/grant/grant.controller.ts b/backend/src/grant/grant.controller.ts index b4638601..7996f3f6 100644 --- a/backend/src/grant/grant.controller.ts +++ b/backend/src/grant/grant.controller.ts @@ -64,7 +64,7 @@ export class GrantController { @ApiResponse({ status: 403, description: 'Forbidden - User does not have access to this resource' }) @ApiResponse({ status: 500, description: 'Internal Server Error', example: 'Internal Server Error' }) async addGrant( - @Body(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true })) + @Body() grant: AddGrantBody ): Promise { this.logger.log(`POST /grant/new-grant - Creating new grant for organization: ${grant.organization}`); diff --git a/backend/src/grant/grant.service.ts b/backend/src/grant/grant.service.ts index ac294ff5..89fdad2e 100644 --- a/backend/src/grant/grant.service.ts +++ b/backend/src/grant/grant.service.ts @@ -384,6 +384,7 @@ export class GrantService { amount: grant.amount, grant_start_date: grant.grant_start_date, application_deadline: grant.application_deadline, + application_date: grant.application_date, report_deadlines: grant.report_deadlines, description: grant.description, timeline: grant.timeline, diff --git a/backend/src/grant/types/grant.types.ts b/backend/src/grant/types/grant.types.ts index 2d090a29..a50cae4f 100644 --- a/backend/src/grant/types/grant.types.ts +++ b/backend/src/grant/types/grant.types.ts @@ -22,6 +22,9 @@ export class GrantResponseDto { @ApiProperty({ description: 'When grant submission is due', example: '2024-06-01T00:00:00.000Z' }) application_deadline!: string; + + @ApiProperty({ description: 'When grant was submitted', example: '2024-06-01T00:00:00.000Z' }) + application_date?: string; @ApiProperty({ description: 'Multiple report dates', type: [String], required: false }) report_deadlines?: string[]; @@ -75,6 +78,9 @@ export class AddGrantBody { @ApiProperty({ description: 'When grant submission is due', example: '2024-06-01T00:00:00.000Z' }) application_deadline!: string; + + @ApiProperty({ description: 'When grant was submitted', example: '2024-06-01T00:00:00.000Z' }) + application_date?: string; @ApiProperty({ description: 'Multiple report dates', type: [String], required: false, example: ['2024-12-01T00:00:00.000Z'] }) report_deadlines?: string[]; @@ -122,6 +128,9 @@ export class UpdateGrantBody { @ApiProperty({ description: 'When grant submission is due', required: false }) application_deadline?: string; + + @ApiProperty({ description: 'When grant was submitted', required: false }) + application_date?: string; @ApiProperty({ description: 'Multiple report dates', type: [String], required: false }) report_deadlines?: string[]; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e3fada70..c34185eb 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -45,7 +45,6 @@ "@types/react-transition-group": "^4.4.12", "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.20", - "baseline-browser-mapping": "^2.8.29", "eslint": "^9.9.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", @@ -6226,12 +6225,15 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.29.tgz", - "integrity": "sha512-sXdt2elaVnhpDNRDz+1BDx1JQoJRuNk7oVlAlbGiFkLikHCAQiccexF/9e91zVi6RCgqspl04aP+6Cnl9zRLrA==", + "version": "2.10.8", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.8.tgz", + "integrity": "sha512-PCLz/LXGBsNTErbtB6i5u4eLpHeMfi93aUv5duMmj6caNu6IphS4q6UevDnL36sZQv9lrP11dbPKGMaXPwMKfQ==", "license": "Apache-2.0", "bin": { - "baseline-browser-mapping": "dist/cli.js" + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/binary-extensions": { @@ -6515,9 +6517,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001743", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz", - "integrity": "sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw==", + "version": "1.0.30001779", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001779.tgz", + "integrity": "sha512-U5og2PN7V4DMgF50YPNtnZJGWVLFjjsN3zb6uMT5VGYIewieDj1upwfuVNXf4Kor+89c3iCRJnSzMD5LmTvsfA==", "funding": [ { "type": "opencollective", diff --git a/frontend/package.json b/frontend/package.json index c0e5558b..4f28f545 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -48,7 +48,6 @@ "@types/react-transition-group": "^4.4.12", "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.20", - "baseline-browser-mapping": "^2.8.29", "eslint": "^9.9.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", diff --git a/frontend/src/Footer.tsx b/frontend/src/Footer.tsx index ad2aa5d9..34927a24 100644 --- a/frontend/src/Footer.tsx +++ b/frontend/src/Footer.tsx @@ -4,7 +4,7 @@ import { FooterText } from "./translations/general"; const Footer: React.FC = () => { return ( -
+
{FooterText.C4C_Motto} diff --git a/frontend/src/custom/ActionConfirmation.tsx b/frontend/src/components/ActionConfirmation.tsx similarity index 91% rename from frontend/src/custom/ActionConfirmation.tsx rename to frontend/src/components/ActionConfirmation.tsx index 34dafc21..fd066ea8 100644 --- a/frontend/src/custom/ActionConfirmation.tsx +++ b/frontend/src/components/ActionConfirmation.tsx @@ -27,7 +27,7 @@ import { IoIosWarning } from "react-icons/io"; onClick={onCloseDelete} >
e.stopPropagation()} > @@ -53,7 +53,7 @@ import { IoIosWarning } from "react-icons/io";

Warning

-

+

{warningMessage}

diff --git a/frontend/src/components/Button.tsx b/frontend/src/components/Button.tsx index 26ee736f..dc5a300c 100644 --- a/frontend/src/components/Button.tsx +++ b/frontend/src/components/Button.tsx @@ -2,39 +2,58 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { IconProp } from "@fortawesome/fontawesome-svg-core"; type ButtonProps = { - text: string; - onClick: () => void; - className?: string; - logo?: IconProp; - logoPosition?: 'left' | 'right'; - disabled?: boolean; - type?: "button" | "submit" | "reset"; -} - + text: string; + onClick: () => void; + className?: string; + logo?: IconProp; + logoPosition?: "left" | "right" | "center"; + disabled?: boolean; + type?: "button" | "submit" | "reset"; +}; // Button component where you can pass in text, onClick handler, optional className // for styling, and an optional logo with its position. //Styling is default, but can be overridden by passing in a className prop -export default function Button({ text, onClick, className, logo, logoPosition, disabled, type }: ButtonProps) { +export default function Button({ + text, + onClick, + className, + logo, + logoPosition, + disabled, + type, +}: ButtonProps) { return ( - ); -} \ No newline at end of file +} diff --git a/frontend/src/components/InputField.tsx b/frontend/src/components/InputField.tsx index 61361037..4f850af5 100644 --- a/frontend/src/components/InputField.tsx +++ b/frontend/src/components/InputField.tsx @@ -21,7 +21,7 @@ export default function InputField({ }: InputFieldProps) { return (
-