Skip to content

Conversation

@Jhonyel
Copy link
Contributor

@Jhonyel Jhonyel commented Apr 8, 2025

…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

  • item 1
  • ...

Checklist

It can be helpful to check the Checks and Files changed tabs.
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.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #3376

@Jhonyel Jhonyel requested a review from dreifusjack April 8, 2025 20:20
*/
export const getAllOtherProductReason = () => {
return axios.get<OtherProductReason[]>(apiUrls.getAllOtherProductReasons(), {
transformResponse: (data) => JSON.parse(data) as OtherProductReason[]
Copy link
Contributor

Choose a reason for hiding this comment

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

i know you didn't do this but can you remove the as OtherProductReason[], I think its redundant here

Copy link
Contributor

Choose a reason for hiding this comment

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

same with as IndexCode above

* @returns the list of tasks for a given sponsor
*/

export const getsponsorTasks = (sponsorId: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be 'getSponsorTasks'

*
* @returns the edited sponosor tier
*/
export const editSponsorTier = (sponsorTierId: string, sponsorTierData: EditSponsorTierPayload) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@dreifusjack dreifusjack left a comment

Choose a reason for hiding this comment

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

Looks great! Just a few quick fixes. Sorry about the typo in your ticket

const getAllOtherProductReasons = () => `${financeEndpoints()}/other-reimbursement-product-reasons`;
const financeRoutesEndpoints = () => `${API_URL}/finance`;
const getAllSponsors = () => `${financeRoutesEndpoints()}/sponsors`;
const getSponsorTasks = (sponsorId: string) => `${financeRoutesEndpoints()}/sponsors/${sponsorId}/tasks`;
Copy link
Contributor

Choose a reason for hiding this comment

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

route should end with '/sponsorTasks'

@Jhonyel Jhonyel force-pushed the #3376-JhonyelGalvis-HookUpGet/Put/Delete branch from 2d21f28 to dbeedf7 Compare April 10, 2025 22:23
Copy link
Contributor

@dreifusjack dreifusjack left a comment

Choose a reason for hiding this comment

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

LGTM

@walker-sean walker-sean merged commit bfef7fd into feature/finance-redesign Apr 14, 2025
4 checks passed
@walker-sean walker-sean deleted the #3376-JhonyelGalvis-HookUpGet/Put/Delete branch April 14, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants