created the hooks for getting sponsors, sponsor-tasks, deleting a spo…#3386
Merged
walker-sean merged 7 commits intofeature/finance-redesignfrom Apr 14, 2025
Merged
Conversation
…nsor and editing a sponsor-tier
dreifusjack
reviewed
Apr 9, 2025
src/frontend/src/apis/finance.api.ts
Outdated
| @@ -404,3 +406,53 @@ export const getAllOtherProductReason = () => { | |||
| transformResponse: (data) => JSON.parse(data) as OtherProductReason[] | |||
Contributor
There was a problem hiding this comment.
i know you didn't do this but can you remove the as OtherProductReason[], I think its redundant here
Contributor
There was a problem hiding this comment.
same with as IndexCode above
dreifusjack
reviewed
Apr 9, 2025
src/frontend/src/apis/finance.api.ts
Outdated
| * @returns the list of tasks for a given sponsor | ||
| */ | ||
|
|
||
| export const getsponsorTasks = (sponsorId: string) => { |
Contributor
There was a problem hiding this comment.
should be 'getSponsorTasks'
dreifusjack
reviewed
Apr 9, 2025
src/frontend/src/apis/finance.api.ts
Outdated
| * | ||
| * @returns the edited sponosor tier | ||
| */ | ||
| export const editSponsorTier = (sponsorTierId: string, sponsorTierData: EditSponsorTierPayload) => { |
Contributor
There was a problem hiding this comment.
we don't have this endpoint, it should be calling an api to editSponsorTask. That is totally my bad, i miswrote the ticket. Should be a quick change tho
dreifusjack
requested changes
Apr 9, 2025
Contributor
dreifusjack
left a comment
There was a problem hiding this comment.
Looks great! Just a few quick fixes. Sorry about the typo in your ticket
dreifusjack
reviewed
Apr 10, 2025
src/frontend/src/utils/urls.ts
Outdated
| const getAllOtherProductReasons = () => `${financeEndpoints()}/other-reimbursement-product-reasons`; | ||
| const financeRoutesEndpoints = () => `${API_URL}/finance`; | ||
| const getAllSponsors = () => `${financeRoutesEndpoints()}/sponsors`; | ||
| const getSponsorTasks = (sponsorId: string) => `${financeRoutesEndpoints()}/sponsors/${sponsorId}/tasks`; |
Contributor
There was a problem hiding this comment.
route should end with '/sponsorTasks'
2d21f28 to
dbeedf7
Compare
walker-sean
approved these changes
Apr 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…nsor and editing a sponsor-tier
Changes
made the api's for getting sponsors, sponsor tasks, deleting a sponsor, and editing a sponsor tier. Also made the hooks for each corresponding API.
Notes
Test Cases
Screenshots
To Do
Any remaining things that need to get done
Checklist
It can be helpful to check the
ChecksandFiles changedtabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
yarn.lockchanges (unless dependencies have changed)Closes #3376