Skip to content

Comments

[SSF-134]: Update FM Management Frontend#104

Open
dburkhart07 wants to merge 40 commits intomainfrom
ddb/SSF-134-update-fm-management-frontend
Open

[SSF-134]: Update FM Management Frontend#104
dburkhart07 wants to merge 40 commits intomainfrom
ddb/SSF-134-update-fm-management-frontend

Conversation

@dburkhart07
Copy link

ℹ️ Issue

Closes #134

📝 Description

  • Created frontend design for the FM Management, including the page and new donation modal
  • Adjusted the backend to add a food rescue field, which is now available in the modal
  • Used some specific date calculations to ensure that a UI-friendly date picker is easily converted to an understandable format in our donation entity for recurring donations.

✔️ Verification

Took screenshots of the pages:
image
image
image

Verified each updated endpoint worked on Postman

🏕️ (Optional) Future Work / Notes

We will need to update this later on when we go to finish up the Action Required tab.

Copy link
Author

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

Leaving comment for PR reviewer

@amywng amywng self-requested a review February 15, 2026 22:45
@dburkhart07 dburkhart07 requested a review from amywng February 16, 2026 20:04
};
setCurrentPages(initialPages);
} catch (error) {
alert('Error fetching donations: ' + error);
Copy link
Member

Choose a reason for hiding this comment

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

might need to change depending on when justin's alert pr goes in

Copy link
Author

Choose a reason for hiding this comment

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

will keep this comment unresolved till then.

Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

and frontend things! 💐

@dburkhart07 dburkhart07 requested a review from amywng February 18, 2026 05:51
@maxn990 maxn990 self-requested a review February 18, 2026 15:19
@dburkhart07 dburkhart07 requested a review from amywng February 19, 2026 00:50
Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

replied to some of the other comments as well

@dburkhart07 dburkhart07 requested a review from amywng February 19, 2026 06:55
@Yurika-Kan
Copy link
Collaborator

agree on moving recurrence logic to backend, makes sense to have the logic on frontend for rendering the designed next donation scheduled line (without calling backend) and on backend for actually setting the recurring donations.

to add to the 56 comments! +1!

Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

like lowk i feel bad but also i feel bad for myself... anyway keep up the great work!

import { Test, TestingModule } from '@nestjs/testing';
import { mock } from 'jest-mock-extended';
import { Donation } from './donations.entity';
import { FoodManufacturer } from '../foodManufacturers/manufacturers.entity';
Copy link
Member

Choose a reason for hiding this comment

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

unnecessary import. also, need test for service propagating not found exception for findOne

<Dialog.Body>
<Text mb="1.5em">
Log a new donation by filling out the form below.
<Text mb={8} mt={-4} color="neutral.700">
Copy link
Member

Choose a reason for hiding this comment

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

think too much mb

Copy link
Author

Choose a reason for hiding this comment

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

what do you think it should be? this seems to match the figma to me.

padding={0}
>
<Box color="neutral.300">
<Minus size={16} />
Copy link
Member

Choose a reason for hiding this comment

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

tad too big still

});
});

describe('GET /:foodManufacturerId/donations', () => {
Copy link
Member

Choose a reason for hiding this comment

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

need test for service propagating not found exception

foodRescue: boolean;
}

export type DayOfWeek =
Copy link
Member

Choose a reason for hiding this comment

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

can we move to this and RepeatOnState to types.ts so utils imports from there and not a component file

import { RecurrenceEnum } from '../types';
import { Type } from 'class-transformer';

export class RepeatOnDaysDto {
Copy link
Member

Choose a reason for hiding this comment

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

any way we can check that at least one is true if the recurrence is weekly?


const next = new Date(today);
// Date clamp back to 28 for monthly and yearly
if (next.getDate() > 28) next.setDate(28);
Copy link
Member

Choose a reason for hiding this comment

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

can we only do this when necessary (e.g. check if the month rolled over, and then set the day to the last day of the correct month)? if u think it's a good idea can u also implement in the backend function

expect(timestamps).toEqual([...timestamps].sort((a, b) => a - b));
});

it('WEEKLY - does not include today even if today is selected', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

maybe a better descriptor would be if today's DOW is selected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants