Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
57a1f1b
grant edit view
yumi520 Feb 27, 2026
07e9a06
Refactor import statement for useState
yumi520 Feb 27, 2026
e7fa658
Merge branch '332/grant-main-page' into 347-dev---add-grant
janekamata Mar 11, 2026
0fd1e14
Setting up basic connection and refresh to backend
janekamata Mar 11, 2026
9e4d88b
Formatting edit grant
janekamata Mar 11, 2026
451638c
Formatting cols
janekamata Mar 11, 2026
5068edc
Index default input and textarea styling
janekamata Mar 12, 2026
e0e7c6a
Spacing fixes
janekamata Mar 12, 2026
01244f5
Error format
janekamata Mar 12, 2026
04240f2
Outline format
janekamata Mar 13, 2026
07303e0
Contact card, profile picture styling
janekamata Mar 13, 2026
3af2f24
Updating styling and delete
janekamata Mar 13, 2026
333164f
Working on contacts popup
janekamata Mar 13, 2026
c5932cc
Working on adding contacts
janekamata Mar 13, 2026
d00ed13
Removing border
janekamata Mar 13, 2026
90db84f
Add documents and finishing contacts popups
janekamata Mar 14, 2026
e3dd8d9
Squashed commit of the following:
janekamata Mar 14, 2026
331c0f2
Adding delete grant
janekamata Mar 14, 2026
59fcf64
Fixing scolls
janekamata Mar 14, 2026
41e1a1e
Removing unused grant files, organizing into folders
janekamata Mar 14, 2026
ddbb6a7
Fixing spacing and delete
janekamata Mar 14, 2026
41d669e
Updating to clear all filters when page changes
janekamata Mar 15, 2026
e43e54d
Adding email error to contact popup
janekamata Mar 15, 2026
60d39f4
Squashed commit of the following:
janekamata Mar 15, 2026
c3c66f3
Baseline browser mapping
janekamata Mar 15, 2026
a2f962f
Merge branch 'main' into 347-dev---add-grant
janekamata Mar 15, 2026
4762d2a
Styling fixes
janekamata Mar 15, 2026
f09043e
Resolving html errors
janekamata Mar 15, 2026
1d972a2
Height fixes
janekamata Mar 15, 2026
0b2684c
Adding application date to grant type and edit/add
janekamata Mar 15, 2026
c4f12d4
Fixing calendar styling
janekamata Mar 15, 2026
bf05571
Scroll styling
janekamata Mar 16, 2026
c09495f
Squashed commit of the following:
janekamata Mar 17, 2026
4fa9d1d
Fixing styling
janekamata Mar 17, 2026
90cedb1
Merge branch 'main' of https://github.com/Code-4-Community/bcan into …
janekamata Mar 17, 2026
aaee615
Updating clear filters
janekamata Mar 17, 2026
09b2572
Styling fixes and organizing
janekamata Mar 17, 2026
5d3638e
Organizing
janekamata Mar 17, 2026
6fd1ac0
More organizing
janekamata Mar 17, 2026
401b4be
Fixing import
janekamata Mar 17, 2026
aae2b86
Fixing spacing
janekamata Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions backend/src/grant/types/grant.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down Expand Up @@ -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[];
Expand Down Expand Up @@ -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[];
Expand Down
18 changes: 10 additions & 8 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FooterText } from "./translations/general";

const Footer: React.FC = () => {
return (
<div className="footer flex flex-col items-center justify-center py-10 px-4 text-base text-grey-700">
<div className="footer flex flex-col items-center justify-center py-12 pt-16 px-4 text-base text-grey-700">
<Group className="flex flex-col p-2">
<Text>
{FooterText.C4C_Motto}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { IoIosWarning } from "react-icons/io";
onClick={onCloseDelete}
>
<div
className=" bg-white border-2 rounded-md 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()}
>

Expand All @@ -53,7 +53,7 @@ import { IoIosWarning } from "react-icons/io";
<IoIosWarning size={24} className="text-red"/>
<p className="font-bold px-1 text-lg text-red"> Warning </p>
</div>
<p className=" text-left text-lg font-semibold text-red">
<p className=" text-left font-semibold text-red">
{warningMessage}
</p>

Expand Down
71 changes: 45 additions & 26 deletions frontend/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<button onClick={onClick} disabled={disabled || false} type={type || "button"}
className={`
px-4 py-2 rounded-3xl font-medium text-black border-2 active:bg-primary-900 active:border-primary-900 active:text-white
flex items-center justify-center transition-opacity
${className} ${disabled
? "cursor-not-allowed opacity-50"
: "hover:opacity-90"}
<button
onClick={onClick}
disabled={disabled || false}
type={type || "button"}
className={`
px-4 py-2 rounded-3xl font-medium text-black border-2
active:bg-primary-900 active:border-primary-900 active:text-white
w-fit h-fit flex-grow-0 items-center justify-center
transition-opacity flex whitespace-nowrap
${className} ${
disabled ? "cursor-not-allowed opacity-50" : "hover:opacity-90"
}
`}
>
{logo && logoPosition === 'left' &&
<span className="mr-2">
<FontAwesomeIcon icon={logo} className="text-lg w-4 h-4" />
</span>}
{logo && logoPosition === "left" && (
<span className="mr-2">
<FontAwesomeIcon icon={logo} className="" />
</span>
)}
{text}
{logo && logoPosition === 'right' &&
<span className="ml-2">
<FontAwesomeIcon icon={logo} className="text-lg w-4 h-4" />
</span>}
{logo && logoPosition === "right" && (
<span className="ml-2">
<FontAwesomeIcon icon={logo} className="" />
</span>
)}
{logo && logoPosition === "center" && (
<span className="">
<FontAwesomeIcon icon={logo} className="" />
</span>
)}
</button>
);
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function SearchBar({
/>
<input
placeholder={`Search for a ${text}...`}
className="w-full px-4 py-2 rounded-3xl font-medium text-black border-2 flex items-center justify-center border-grey-500"
className="w-full px-4 py-2 rounded-3xl font-medium text-sm lg:text-base text-black border-2 flex items-center justify-center border-grey-500"
onChange={handleInputChange}
value={userInput}
style={{ paddingLeft: "2rem" }} // make room for the icon
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/external/bcanSatchel/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const logoutUser = action("logoutUser");
*/
export const removeProfilePic = action("removeProfilePic");

export const clearAllFilters = action("clearAllFilters");

/**
* Moves along the all grants that are fetched from back end to mutator.
*/
Expand Down
78 changes: 54 additions & 24 deletions frontend/src/external/bcanSatchel/mutators.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { mutator } from 'satcheljs';
import { mutator } from "satcheljs";
import {
setAuthState,
updateUserProfile,
logoutUser,
fetchAllGrants,
updateFilter,
updateStartDateFilter, updateEndDateFilter,
updateStartDateFilter,
updateEndDateFilter,
updateSearchQuery,
updateYearFilter,
updateUserEmailFilter,
Expand All @@ -15,23 +16,23 @@ import {
updateSort,
updateUserQuery,
updateUserSort,
removeProfilePic,
} from './actions';
import { getAppStore, persistToSessionStorage } from './store';
import { setActiveUsers, setInactiveUsers } from './actions';
clearAllFilters,
} from "./actions";
import { getAppStore, persistToSessionStorage } from "./store";
import { setActiveUsers, setInactiveUsers, removeProfilePic } from "./actions";

/**
/**
* setActiveUsers mutator
*/
*/
mutator(setActiveUsers, (actionMessage) => {
const store = getAppStore();
store.activeUsers = actionMessage.users;
persistToSessionStorage();
});

/**
/**
* setInactiveUsers mutator
*/
*/
mutator(setInactiveUsers, (actionMessage) => {
const store = getAppStore();
store.inactiveUsers = actionMessage.users;
Expand All @@ -42,13 +43,13 @@ mutator(setInactiveUsers, (actionMessage) => {
* setAuthState mutator
*/
mutator(setAuthState, (actionMessage) => {
console.log('=== setAuthState MUTATOR CALLED ===');
console.log("=== setAuthState MUTATOR CALLED ===");
const store = getAppStore();
console.log('Setting user:', actionMessage.user);
console.log("Setting user:", actionMessage.user);
store.isAuthenticated = actionMessage.isAuthenticated;
store.user = actionMessage.user;
store.accessToken = actionMessage.accessToken;
console.log('Calling persistToSessionStorage...');
console.log("Calling persistToSessionStorage...");
persistToSessionStorage();
});

Expand Down Expand Up @@ -99,9 +100,23 @@ mutator(logoutUser, () => {
store.isAuthenticated = false;
store.user = null;
store.accessToken = null;
sessionStorage.removeItem('bcanAppStore');
sessionStorage.removeItem("bcanAppStore");
});

// Clears all store filters
mutator(clearAllFilters, () => {
const store = getAppStore();
store.filterStatus = null;
store.startDateFilter = null;
store.endDateFilter = null;
store.searchQuery = "";
store.yearFilter = [];
store.userQuery = "";
store.emailFilter = false;
store.eligibleOnly = false;
store.amountMinFilter = null;
store.amountMaxFilter = null;
});

/**
* Reassigns all grants to new grants from the backend.
Expand All @@ -117,16 +132,32 @@ mutator(fetchAllGrants, (actionMessage) => {
mutator(updateFilter, (actionMessage) => {
const store = getAppStore();
store.filterStatus = actionMessage.status;
})
});

mutator(updateStartDateFilter, (actionMessage) => {
const store = getAppStore();
store.startDateFilter = actionMessage.startDateFilter;
})
});

mutator(updateEndDateFilter, (actionMessage) => {
const store = getAppStore();
store.endDateFilter = actionMessage.endDateFilter;
});

mutator(updateUserEmailFilter, (actionMessage) => {
const store = getAppStore();
store.emailFilter = actionMessage.userEmailFilter;
})

mutator(updateEligibleOnly, (actionMessage) => {
const store = getAppStore();
store.eligibleOnly = actionMessage.eligibleOnly;
})

mutator(updateAmountRange, (actionMessage) => {
const store = getAppStore();
store.amountMinFilter = actionMessage.amountMinFilter;
store.amountMaxFilter = actionMessage.amountMaxFilter;
})

mutator(updateUserEmailFilter, (actionMessage) => {
Expand All @@ -148,33 +179,32 @@ mutator(updateAmountRange, (actionMessage) => {
mutator(updateSearchQuery, (actionMessage) => {
const store = getAppStore();
store.searchQuery = actionMessage.searchQuery;
})
});

mutator(updateYearFilter, (actionMessage) => {
const store = getAppStore();
store.yearFilter = actionMessage.yearFilter;
})
});

mutator(setNotifications, (actionMessage) => {
const store = getAppStore();
store.notifications = actionMessage.notifications;
})
});

mutator(updateSort, (actionMessage) => {
const store = getAppStore();
store.sort = actionMessage.sort;
})
});

mutator(updateUserQuery, (actionMessage) => {
const store = getAppStore();
store.userQuery = actionMessage.userQuery;
console.log('Updated userQuery:', store.userQuery);
})
});

mutator(updateUserSort, (actionMessage) => {
const store = getAppStore();
store.userSort = actionMessage.sort;
})
});

mutator(removeProfilePic, () => {
const store = getAppStore();
Expand All @@ -192,4 +222,4 @@ mutator(removeProfilePic, () => {
}

persistToSessionStorage();
});
});
Loading
Loading