Skip to content

[QoL] Flag missing merchant info #9940

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

Open
leowilkin opened this issue Mar 23, 2025 · 9 comments
Open

[QoL] Flag missing merchant info #9940

leowilkin opened this issue Mar 23, 2025 · 9 comments

Comments

@leowilkin
Copy link
Contributor

leowilkin commented Mar 23, 2025

Y'know how we get questions about Unnamed merchant, and we have our Yellow Pages directory to add cute metadata to transactions, like logos and names?

Like Monzo (screen recording to follow), wouldn't it be nice if we could get a little extra option in the transaction 'three dot' dropdown, allowing users to add more information about a vendor, like their name, or website, so we can improve Yellow Pages!

Ideal scenario

Say we find a new JLCPCB vendor ID - it shows up as Unnamed merchant on HCB grant cards, and doesn't have the JLC logo on the ledger.

  1. User clicks onto transaction, and out of the goodness of their heart goes > three dots > Improve merchant information
  2. We show a dropdown/search function: Link to an existing merchant?

If merchant found, send a slack message to a slack channel, or an airtable base with the MID and the respective name to be updated in Yellow Pages

  1. If not found, the user is invited to enter the vendor's name, and their website.
  2. This information gets submitted to the Yellow Pages review team, and a nice OSS contributor adds this to their list of logos & names to link to MIDs, thus our evil plan to collate the world's MIDs expands muahaha.

Implementation ideas

I'm thinking of using Fillout for this initially, cause I know how do to Fillout URL params, and it shouldn't be too difficult (he says).

Eventually, it would be swell if I could figure out how to put this in HCB natively probably stealing some popout code from another process/component.

@leowilkin
Copy link
Contributor Author

I also don't know how to assign this issue to me, so consider this issue assigned to me!

@leowilkin
Copy link
Contributor Author

I tried and failed to do this. turns out you actually need to know ruby.

If anyone wants a stab at this, I think you can pop in a new bit of code (duh) in app/views/hcb_codes/_meatballs.html.erb which looks like the dropdown.

<%# --- this assumes that all flaggable transactions can be improved --- %>
<%# --- there's probably a much better way of doing this, but I haven't found that yet --- %>
<% if flagable %>
  <% fillout_url = "https://forms.hackclub.com/hcb-txn?mid=#{hcb_code.merchant_mid}&name=#{hcb_code.raw_name}" %>
  <%= link_to fillout_url, target: "_blank", class: "flex items-center" do %>
    <%= inline_icon "edit", size: 24 %>
    Improve merchant information
  <% end %>
<% end %>

However! I have not a single clue where I'd get the MID or transaction name from. I did make up the hcb_code.merchant_mid stuff.

@leowilkin
Copy link
Contributor Author

screen-20250323-125843.mp4

Something like this!

@sampoder
Copy link
Member

This is a cool idea! Is the Fillout form ready to go? I can take your code and put something together - it seems pretty close. Though I'd recommend trying to debug it yourself and get it working - that's the best way to learn.

@leowilkin
Copy link
Contributor Author

Fillout is good to go! To be honest, I'm really not sure where to start. I can make the button, but have no idea how to pull MIDs or raw transaction names?

@garyhtou
Copy link
Member

Hey @leowilkin, who will be responsible for processing these fillout submissions and getting them into yellow pages. You mentioned the yellow pages review team, but that's largely just the HCB engineering team at the moment and I'm not sure that we have the capacity to take this on.

Maybe someone on the operations side can handle this? If so, they need to:

  • Regularly process new submissions
  • Perform checks to validate the information provided
  • Create a PR to yellow pages to add this information

@leowilkin
Copy link
Contributor Author

@garyhtou a community team, like the ex-open sourcerers, or the Dino review team? Do you think that would work? I know engineering probably doesn't have the capacity for something like this.

@thedev132
Copy link
Contributor

I'd be down to help out if needed. I've started to see the yellow pages contributions die out over time and still some PRs (including mine 😭 ) are left unmerged. I've been thinking of a way such as what Leo said or if I have time to add merchant IDs to the v3 API I could write a quick script to compile memos and the merchant IDs and try to pair them ig. But tldr is we need some team to review and grow the yellow pages list.

@garyhtou
Copy link
Member

Fyi @leowilkin, I'm chatting with @thedev132 about this since Graham and other YSWS organizers may want to contribute to Yellow Pages to make it more robust (and in turn make the Card Grant managing experience less tedious).

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

No branches or pull requests

4 participants