Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
501e100
login UI cleaned
Yurika-Kan Jul 25, 2026
db39afa
Homepage UI
Yurika-Kan Jul 30, 2026
a22c5b6
Merge remote-tracking branch 'origin/main' into yk/admin-bugbash
Yurika-Kan Aug 10, 2026
186714d
UI flicker on page load/refresh
Yurika-Kan Aug 10, 2026
ddeb91c
bad deep-link id fix
Yurika-Kan Aug 10, 2026
52174c9
donation stats pagination
Yurika-Kan Aug 10, 2026
f64cffa
fix API failure on Application Review renders No Applications success…
Yurika-Kan Aug 12, 2026
bfb1d7e
better user promotion aws language
Yurika-Kan Aug 12, 2026
56e7f6b
fix Pagination arrows on Approve Food Manufacturers
Yurika-Kan Aug 12, 2026
3e4e762
fix Pantry assignee cell renders blank when every assigned volunteer …
Yurika-Kan Aug 12, 2026
711c863
User Management lists admins but has no Role label
Yurika-Kan Aug 12, 2026
104ee89
Filtering to zero results shows a bare table or wrong copy
Yurika-Kan Aug 12, 2026
77538f5
Order Management table is cut off on narrow windows with no horizonta…
Yurika-Kan Aug 12, 2026
7fc7298
remove all pages from navbars
Yurika-Kan Aug 12, 2026
ea2efd2
focus trap errors
Yurika-Kan Aug 12, 2026
518b29a
Admin order table does not refresh after editing allocations
Yurika-Kan Aug 12, 2026
d6561b2
cleanup & phone number wording
Yurika-Kan Aug 13, 2026
d21c358
fix: derive donationId from displayDonation, not donation
Yurika-Kan Aug 13, 2026
2427faf
fix fontStyle type error
Yurika-Kan Aug 14, 2026
0e61d39
fix(frontend): restore href semantics on pantry details link
Copilot Aug 14, 2026
dc06b91
secondary phone num wording
Yurika-Kan Aug 14, 2026
b3a4771
href > onclick
Yurika-Kan Aug 14, 2026
08ea5e9
phone num wording
Yurika-Kan Aug 14, 2026
0b21aa3
pagination ultimate form
Yurika-Kan Aug 14, 2026
4d67aff
double click submit buttons bug
Yurika-Kan Aug 15, 2026
05465c2
duplicate submit bugs & stale response race bug
Yurika-Kan Aug 15, 2026
30d87b6
remove home page
Yurika-Kan Aug 15, 2026
882fb16
refactor(auth): trim SignUpDto to fields adminCreateUser actually uses
Yurika-Kan Aug 23, 2026
5e2b722
fix(frontend): retry profile fetch instead of permanent "not found" o…
Yurika-Kan Aug 23, 2026
7e7d720
fix(frontend): reset isEditing state when donation details modal closes
Yurika-Kan Aug 23, 2026
0cc731f
docs(frontend): mark where protected routes start in the router config
Yurika-Kan Aug 23, 2026
f7fc1cf
feat(frontend): add search to manufacturer/pantry filter dropdowns
Yurika-Kan Aug 23, 2026
b4a3fab
fix(frontend): hide donation edit/delete when items have reserved qua…
Yurika-Kan Aug 23, 2026
f30fd84
fix(frontend): clear stale alert when volunteer modal closes
Yurika-Kan Aug 23, 2026
ac4e425
fix(frontend): let dashboard card badge wrap instead of overflowing card
Yurika-Kan Aug 23, 2026
8656806
fix(frontend): clear stale manufacturer filter when its last donation…
Yurika-Kan Aug 23, 2026
cc953a8
Potential fix for pull request finding
Yurika-Kan Aug 24, 2026
993f7f4
fix(frontend): preserve pagination on order refetch, init retry timeo…
Yurika-Kan Aug 24, 2026
ee013e4
Merge remote-tracking branch 'origin/yk/admin-bugbash' into yk/admin-…
Yurika-Kan Aug 24, 2026
73a5343
fix(frontend): close Pagination.NextTrigger tag
Yurika-Kan Aug 24, 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
19 changes: 14 additions & 5 deletions apps/backend/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ConflictException,
HttpException,
Injectable,
InternalServerErrorException,
Logger,
Expand All @@ -16,7 +17,6 @@ import {
import CognitoAuthConfig from './aws-exports';
import { SignUpDto } from './dtos/sign-up.dto';
import { createHmac } from 'crypto';
import { Role } from '../users/types';
import { validateEnv } from '../utils/validation.utils';

@Injectable()
Expand Down Expand Up @@ -52,7 +52,7 @@ export class AuthService {
lastName,
email,
role,
}: Omit<SignUpDto, 'password' | 'phone'> & { role: Role }): Promise<string> {
}: SignUpDto): Promise<string> {
const createUserCommand = new AdminCreateUserCommand({
UserPoolId: CognitoAuthConfig.userPoolId,
Username: email,
Expand All @@ -75,10 +75,18 @@ export class AuthService {

return sub ?? '';
} catch (error) {
if (error instanceof Error && error.name == 'UsernameExistsException') {
if (error instanceof HttpException) {
throw error;
} else if (
error instanceof Error &&
error.name == 'UsernameExistsException'
) {
throw new ConflictException('A user with this email already exists');
} else {
throw new InternalServerErrorException('Failed to create user');
const reason = error instanceof Error ? error.message : String(error);
throw new InternalServerErrorException(
`Failed to create user: ${reason}`,
);
}
}
}
Expand All @@ -97,8 +105,9 @@ export class AuthService {
`Failed to add user ${username} to group ${groupName}`,
error,
);
const reason = error instanceof Error ? error.message : String(error);
throw new InternalServerErrorException(
`Failed to add user to group ${groupName}`,
`Failed to add user to group ${groupName}: ${reason}`,
);
}
}
Expand Down
15 changes: 4 additions & 11 deletions apps/backend/src/auth/dtos/sign-up.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IsEmail, IsNotEmpty, IsString, IsPhoneNumber } from 'class-validator';
import { IsEmail, IsEnum, IsString } from 'class-validator';
import { Role } from '../../users/types';

export class SignUpDto {
@IsString()
Expand All @@ -10,14 +11,6 @@ export class SignUpDto {
@IsEmail()
email!: string;

@IsString()
password!: string;

@IsString()
@IsNotEmpty()
@IsPhoneNumber('US', {
message:
'phone must be a valid phone number (make sure all the digits are correct)',
})
phone!: string;
@IsEnum(Role)
role!: Role;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export class FoodManufacturerApplicationDto {
@IsString()
@IsNotEmpty()
@IsPhoneNumber('US', {
message:
'contactPhone must be a valid phone number (make sure all the digits are correct)',
message: 'Phone must be a valid US phone number.',
})
contactPhone!: string;

Expand All @@ -67,8 +66,7 @@ export class FoodManufacturerApplicationDto {
@IsOptional()
@IsString()
@IsPhoneNumber('US', {
message:
'secondaryContactPhone must be a valid phone number (make sure all the digits are correct)',
message: 'Secondary phone must be a valid US phone number.',
})
Comment thread
Yurika-Kan marked this conversation as resolved.
@IsNotEmpty()
secondaryContactPhone?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export class UpdateFoodManufacturerApplicationDto {
@IsOptional()
@IsString()
@IsPhoneNumber('US', {
message:
'secondaryContactPhone must be a valid phone number (make sure all the digits are correct)',
message: 'Secondary phone contact must be a valid US phone number.',
})
Comment thread
Yurika-Kan marked this conversation as resolved.
@IsNotEmpty()
secondaryContactPhone?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class FoodManufacturersController {
type: 'string',
format: 'phone',
example: '(508) 508-6789',
description: 'Must be a valid US phone number',
description: 'Phone must be a valid US phone number',
},
secondaryContactFirstName: {
type: 'string',
Expand All @@ -178,7 +178,7 @@ export class FoodManufacturersController {
type: 'string',
format: 'phone',
example: '(508) 528-6789',
description: 'Must be a valid US phone number',
description: 'Phone must be a valid US phone number',
},
unlistedProductAllergens: {
type: 'array',
Expand Down
6 changes: 2 additions & 4 deletions apps/backend/src/pantries/dtos/pantry-application.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export class PantryApplicationDto {
@IsString()
@IsNotEmpty()
@IsPhoneNumber('US', {
message:
'contactPhone must be a valid phone number (make sure all the digits are correct)',
message: 'Phone must be a valid US phone number.',
})
contactPhone!: string;

Expand Down Expand Up @@ -74,8 +73,7 @@ export class PantryApplicationDto {
@IsOptional()
@IsString()
@IsPhoneNumber('US', {
message:
'secondaryContactPhone must be a valid phone number (make sure all the digits are correct)',
message: 'Secondary phone must be a valid US phone number.',
})
Comment thread
Yurika-Kan marked this conversation as resolved.
@IsNotEmpty()
secondaryContactPhone?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export class UpdatePantryApplicationDto {
@IsOptional()
@IsString()
@IsPhoneNumber('US', {
message:
'Secondary contact phone must be a valid phone number (make sure all the digits are correct)',
message: 'Secondary phone must be a valid US phone number.',
})
Comment thread
Yurika-Kan marked this conversation as resolved.
@IsNotEmpty()
secondaryContactPhone?: string;
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/src/pantries/pantries.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class PantriesController {
type: 'string',
format: 'phone',
example: '(508) 508-6789',
description: 'Must be a valid US phone number',
description: 'Phone must be a valid US phone number',
},
hasEmailContact: {
type: 'boolean',
Expand All @@ -198,7 +198,7 @@ export class PantriesController {
type: 'string',
format: 'phone',
example: '(508) 528-6789',
description: 'Must be a valid US phone number',
description: 'Phone must be a valid US phone number',
},
pantryName: {
type: 'string',
Expand Down
3 changes: 1 addition & 2 deletions apps/backend/src/users/dtos/update-user-info.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class UpdateUserInfoDto {
@IsString()
@IsNotEmpty()
@IsPhoneNumber('US', {
message:
'phone must be a valid phone number (make sure all the digits are correct)',
message: 'Phone must be a valid US phone number.',
})
phone?: string;
}
3 changes: 1 addition & 2 deletions apps/backend/src/users/dtos/userSchema.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export class userSchemaDto {
@IsString()
@IsNotEmpty()
@IsPhoneNumber('US', {
message:
'phone must be a valid phone number (make sure all the digits are correct)',
message: 'Phone must be a valid US phone number.',
})
phone!: string;

Expand Down
19 changes: 7 additions & 12 deletions apps/backend/src/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { validateId } from '../utils/validation.utils';
import { UpdateUserInfoDto } from './dtos/update-user-info.dto';
import { AuthService } from '../auth/auth.service';
import { userSchemaDto } from './dtos/userSchema.dto';
import { SignUpDto } from '../auth/dtos/sign-up.dto';
import { emailTemplates } from '../emails/emailTemplates';
import { EmailsService } from '../emails/email.service';
import { FoodRequest } from '../foodRequests/request.entity';
Expand Down Expand Up @@ -90,22 +91,16 @@ export class UsersService {
}

const applicationUser = usersWithEmail[0];
applicationUser.userCognitoSub = await this.authService.adminCreateUser({
firstName,
lastName,
email,
role,
});
const signUpDto: SignUpDto = { firstName, lastName, email, role };
applicationUser.userCognitoSub = await this.authService.adminCreateUser(
signUpDto,
);
return this.repo.save(applicationUser);
}

// Create Cognito user and save to DB
const userCognitoSub = await this.authService.adminCreateUser({
firstName,
lastName,
email,
role,
});
const signUpDto: SignUpDto = { firstName, lastName, email, role };
const userCognitoSub = await this.authService.adminCreateUser(signUpDto);
const user = this.repo.create({
role,
firstName,
Expand Down
10 changes: 7 additions & 3 deletions apps/frontend/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import {
createBrowserRouter,
Navigate,
RouterProvider,
} from 'react-router-dom';
import Root from '@containers/root';
import NotFound from '@containers/404';
import FormRequests from '@containers/formRequests';
Expand All @@ -9,7 +13,6 @@ import ApprovePantries from '@containers/approvePantries';
import PantryApplicationDetails from '@containers/pantryApplicationDetails';
import VolunteerManagement from '@containers/userManagement';
import AdminDonation from '@containers/adminDonation';
import Homepage from '@containers/homepage';
import AdminOrderManagement from '@containers/adminOrderManagement';
import { Amplify } from 'aws-amplify';
import CognitoAuthConfig from './aws-exports';
Expand Down Expand Up @@ -50,7 +53,7 @@ const router = createBrowserRouter([
// Public routes (no auth needed)
{
index: true,
element: <Homepage />,
element: <Navigate to={ROUTES.LOGIN} replace />,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have an issue that, if the user is already logged in, and is supposed to be brought straight to the profile page (one that depends entirely on backend data, unlike the homepage we used to have), itll take 30 seconds for the backend to startup before the user can actually see details on it (right now it just says No Profile Found until then). Im not sure if there is a workaround for this (or maybe its not a big deal since in theory the backend will be permanently running when its in production), but wanted to ask.

},
{
path: ROUTES.LOGIN,
Expand Down Expand Up @@ -82,6 +85,7 @@ const router = createBrowserRouter([
path: ROUTES.UNAUTHORIZED,
element: <Unauthorized />,
},
// Protected routes below (require auth)
{
path: ROUTES.REQUEST_FORM,
element: (
Expand Down
Binary file modified apps/frontend/src/assets/login_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 2 additions & 9 deletions apps/frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const Navbar: React.FC = () => {
ApiClient.getMe()
.then(setCurrentUser)
.catch(() => setCurrentUser(null));
} else {
} else if (authStatus === 'unauthenticated') {
setCurrentUser(null);
}
}, [authStatus]);
Expand Down Expand Up @@ -271,7 +271,6 @@ const Navbar: React.FC = () => {
navigate(ROUTES.LOGIN, { replace: true });
};

// Should be changed once other dashboards are implmented
const ROLE_DASHBOARD_ROUTE: Record<Role, string> = {
[Role.ADMIN]: ROUTES.ADMIN_DASHBOARD,
[Role.FOODMANUFACTURER]: ROUTES.FM_DASHBOARD,
Expand Down Expand Up @@ -330,7 +329,7 @@ const Navbar: React.FC = () => {
overflow="hidden"
style={{ whiteSpace: 'normal', wordBreak: 'break-word' }}
>
{roleLabel ? `${roleLabel} Dashboard` : 'Dashboard'}
{roleLabel ? `${roleLabel}` : 'Profile'}
</Text>
<Text
fontSize="10px"
Expand All @@ -345,12 +344,6 @@ const Navbar: React.FC = () => {
</RouterLink>

<VStack align="stretch" gap={2} flex={1} overflowY="auto">
<NavLink
Comment thread
Yurika-Kan marked this conversation as resolved.
to={ROUTES.HOME}
label="All Pages"
isActive={location.pathname === ROUTES.HOME}
/>

<NavLink
to={ROLE_DASHBOARD_ROUTE[currentUser.role]}
label="Dashboard"
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/components/dashboardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const DashboardCard: React.FC<DashboardCardProps> = ({
display="flex"
alignItems="flex-start"
justifyContent="space-between"
flexWrap="wrap"
gap={3}
>
<Box display="flex" alignItems="center" gap={4} mb={2}>
Expand Down
Loading
Loading