-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Publisher][Admin Panel] Add Metrics Reporting Agency tab #1665
base: main
Are you sure you want to change the base?
Conversation
"Hi @mxosman and @nichelle-hall! Aside from some small UI bugs that I'll address tomorrow, I think it turned out quite solid! The only issue I've noticed with the API behavior is that it seems like I cannot save the "None" option to the BE. It acts like it's saved (with a 200 code), but it's not having any effect on the actual data. I'm sending Anyway, please check my changes and let me know your thoughts on them. Thank you!" Edit: I also noticed that if we assign vendor as reporting agency -> save changes -> then delete this vendor from "Manage Vendors" modal -- the BE will preserve |
Thank you so much, @nasaownsky! I'll take a closer look at this on Monday. Great call on the deleting the vendor - I didn't give this too much thought, but I'm thinking we don't need to preserve these if a vendor gets deleted, and the UI can just show None. What do you think, @nichelle-hall? |
Thank you for your patience, @nasaownsky - I'll get to this tomorrow as soon as I can! @nichelle-hall will follow up with you as well! |
Sorry I didn't get time to look at this today! I was heads-down in another task. I'll respond first thing tomorrow! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! Works great (aside from the None)!
A couple of things:
- Can we include ungating the Vendor Management so we can release all of this once we merge this PR in?
- @nichelle-hall - when you get a chance, would you mind playing around with this and double checking that the saved selections propagate to the dashboard API correctly?
selected: | ||
currentSettingType === | ||
AgencyProvisioningSettings.METRICS_REPORTING_AGENCY, | ||
/** Hide metrics reporting agency tab when creating a new agency */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great call! Thanks for thinking of this.
const updatedReportingAgency = reportingAgenciesUpdates.find( | ||
(agency) => agency.metric_key === metric.key | ||
); | ||
const selecteReportingdAgency = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: selectedReportingAgency
try { | ||
this.reportingAgencyMetadataLoading = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to wrap this in an action as well since this is an async method.
<Styled.ReportingAgencyDropdownWrapper> | ||
<DropdownContainer> | ||
<Dropdown | ||
label={reportingAgencyName ?? "Please select..."} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going back and forth with this one - I change my mind on the "Please select..." - can we just label this as "None"?
This message is regarding not being able to save I think we should remove the On the backend, we don’t currently handle saving "None" as a valid value for metric settings changes—particularly when an agency wants to null out a previously configured metric. From my perspective, "None" shouldn’t be an available option. Here’s why:
What do you think about this approach? I’d be happy to discuss if you see something I might be missing. |
I went ahead and handled the reporting agency once a vendor is deleted cleanup on the backend. I know you came up with a fix on the frontend, but it’s important to me that the database stays consistent, so I wanted to make sure this was handled properly at the BE level. If you want to test it out, you can point the BE URL of your local application to https://nichelletest---publisher-web-b47yvyxs3q-uc.a.run.app/. Let me know if you run into any issues or if anything needs adjusting! 🚀😊 |
That makes sense. I do recall Chris mentioning wanting the ability to do this more than once though (every time I presented the Figma) - would you mind checking with him to see if he's OK with us not including a 'None' option with your lovely explanation? I'm not sure what the need would be either, but I'm wondering if the use case was mostly to unset it so it doesn't display in the dashboard UI for some reason? Or if they're not sure about the source and accidentally make a selection? |
@nichelle-hall Thank you for your fix! Unfortunately, when performing action chain with vendor removal (on your test URL) I described earlier, the server now responds with 500 error when I'm trying to load the agency, in which the removed vendor was selected as reporting agency. Edit: Oi, not only on your test URL, but also in staging environment I get server error when trying to load such agency. |
Thank you both so much! Fixes have been applied, except for the vendor and 'None' case issues -- waiting on the decisions for that part. |
Description of the change
Added Metrics Reporting Agency feature UI and logic
Type of change
Related issues
closes #1645
Checklists
Development
This box MUST be checked by the submitter prior to merging:
These boxes should be checked by the submitter prior to merging:
Code review
These boxes should be checked by reviewers prior to merging: