Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Donor Lookup and Add Donation at Checkout #193

Closed
13 tasks done
jayrevolinskyjr opened this issue Apr 24, 2023 · 6 comments · Fixed by #217
Closed
13 tasks done

Donor Lookup and Add Donation at Checkout #193

jayrevolinskyjr opened this issue Apr 24, 2023 · 6 comments · Fixed by #217
Assignees
Labels
feature New feature or request Urgent Need everyone's attention

Comments

@jayrevolinskyjr
Copy link
Contributor

jayrevolinskyjr commented Apr 24, 2023

Update: 05/08/2023

Due to the size of the PR linked to this issue. The four remaining subtasks will be striken-through and split into new issues, especially given the capacity of the remaining subtasks to have advanced functionality.

Built off of original project requirements.

Construct a feature that returns the number of transactions and quantity of donations that correspond to a given donor.

Frontend

Donor Lookup Page Updates:

  • Donor Lookup Page populated by FindDonor(Name/Id) or Function/Query that returns all Donor Names, Emails, Location @ysiddhapura
  • 'Add Donor' Button linked to NewDonor(Name). @ysiddhapura
  • 'FindDonor(Name/Id)' has checkbox to flip a Bool for setting Anonymous donor with hardcoded values @ysiddhapura
  • Add 'Lookup Button' @Anoushka444
    'Lookup Button' linked to FindDonor(Name/Id) @Anoushka444
  • 'Donate' button routes to 'Donor View Page' @xl26

Donor View Page:

  • Design Donor View Page @xl26
  • Populate view with DonorJSON returned by FindDonor(Name/Id) or Function/Query that returns all Donor Names, Emails, Location @xl26
    'Edit' button calls "editDictValue(DonorJSON)" and updates DonorJSON by index. @jayrevolinskyjr
    'Scan' button calls "readScan(DonorJSON, ScanJSON)" to call "SKU Feature Lookup" scan() which returns ScanJSON, then add a new row to Donor View Page. @jayrevolinskyjr
  • 'Add Item' button uses "addDictValue(DonorJSON)" to append a new Item with Name and user-specified quantity to DonorJSON. @xl26 @jayrevolinskyjr

Backend

DonorLookup(Name, Id):

  • 'NewDonor(Name)' use Sequelize to create a new user in the DB table @Anoushka444 @ysiddhapura
  • 'FindDonor(Name/Id)' use Sequelize to SELECT on a Person ID that matches 'Name/Id' and has transaction types = "Donation". (Implemented /lookupDonor endpoint) @parthpandey1
  • 'AddDonorItems(Name/Id)' - update DB using Sequelize with updated DonorJSON values by Person Name/Id (Implemented /donate endpoint) @parthpandey1
  • 'FindAllDonors' - to list out all users which have atleast one donation. (implemented /donors endpoint) @parthpandey1
  • 'Donations/<person_id>' - to return all the 'donation' transactions by a particular donor. This should also return trans_items within a transaction. (implemented /donations/:person_id endpoint) @parthpandey1

UpdatedDonorLookup

@kbuffardi
Copy link
Contributor

kbuffardi commented Apr 25, 2023

This looks like a good start. One more feature I'd like:

  • Be able to create a new donor if the query does not yield a match. For example, if the user searches Safeway but that name is not identified as a donor yet, the option should be presented to create a new donor named Safeway

@kbuffardi kbuffardi added the Urgent Need everyone's attention label Apr 25, 2023
@jayrevolinskyjr jayrevolinskyjr self-assigned this Apr 25, 2023
@Jooms
Copy link
Contributor

Jooms commented Apr 25, 2023

@jayrevolinskyjr and @ysiddhapura
To design, break down into tasks, and then report here to see what's needed (and let people claim)

To everyone else, assign yourself here if you need a feature code PR. We will assign tasks by order of assignee (as break-down permits)

@jayrevolinskyjr
Copy link
Contributor Author

jayrevolinskyjr commented Apr 26, 2023

Diagram designed with @ysiddhapura @Anoushka444 @jayrevolinskyjr @briswells

@parthpandey1
Copy link
Contributor

@Jooms @jayrevolinskyjr @briswells @ysiddhapura @Anoushka444
the FindDonor() endpoint sounds more like a person search feature. I am a bit skeptical of using it in context of donor feature as we are basically limiting this function to only find persons with atleast one donation. I feel this endpoint will work better as a general person search feature. As for looking up donors, since we are already sending list of all donors from backend to populate the donor lookup page, I think a more efficient and simpler method would be to implement a frontend filter which can list out matching records based on name or id entered by the end user.

I am planning to create an endpoint which returns matching person records based on person name or id entered by the end user. This endpoint maybe useful in future if we plan on implementing user search functionality on the frontend. Let me know your thoughts on this.

@jayrevolinskyjr
Copy link
Contributor Author

the FindDonor() endpoint sounds more like a person search feature. I am a bit skeptical of using it in context of donor feature as we are basically limiting this function to only find persons with atleast one donation. I feel this endpoint will work better as a general person search feature. As for looking up donors, since we are already sending list of all donors from backend to populate the donor lookup page, I think a more efficient and simpler method would be to implement a frontend filter which can list out matching records based on name or id entered by the end user.

I am planning to create an endpoint which returns matching person records based on person name or id entered by the end user. This endpoint maybe useful in future if we plan on implementing user search functionality on the frontend. Let me know your thoughts on this.

The FindDonor() function can then filter the results from that endpoint to show the donor list, which will be sufficient to get the feature running.

@jayrevolinskyjr jayrevolinskyjr changed the title Report all donations by provider / individual / anonymous donor Donor Lookup and Add Donation at Checkout May 1, 2023
@jayrevolinskyjr jayrevolinskyjr added the feature New feature or request label May 2, 2023
@xl26 xl26 self-assigned this May 4, 2023
xl26 added a commit that referenced this issue May 8, 2023
)

1. Show donor details
2. Show all the transactions/donations made by them.
3. Make a new donation.

These will be the fixes for #193  :
Donor Lookup Page Updates:
1. Donate Button routes to the donor view page


Donor View Page:
1. Show donations made prior
3. Make a new donation (with the API request created by @parthpandey1 )
@reembot
Copy link
Contributor

reembot commented May 10, 2023

PR 217 title/intention reduced to specifically address Donor API connecting to front of table view of current Donors in database plus add new Donors and Donations.

This was done in order to separate issues concerned with the Donor functionality, and mitigate further PR bloating- @jayrevolinskyjr created new Issues addressing pending functionality above ^^

ysiddhapura added a commit that referenced this issue May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Urgent Need everyone's attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants