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

Expose updated_at detail and render correctly #744

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Conversation

DeeTheDev
Copy link
Collaborator

Fixes #737

Some 'updated_at' values were not being exposed for some resources by the backend, which means:

  1. Their value is undefined
  2. The frontend dayjsOrNull(date) function fails since the date value is undefined, and function checks for null only

Solution is to ensure we expose updated_at when we intend to use/render it, and use dayjsOrNull in the frontend to render the value correctly.

Also removes 'updated at' field from the organization page membership related list. Don't think we need it there.

@DeeTheDev DeeTheDev added bug Something isn't working backend Involves changes to the backend API admin Admin site changes labels Nov 25, 2024
@DeeTheDev DeeTheDev self-assigned this Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.74%. Comparing base (5ce63c4) to head (c29ba42).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #744   +/-   ##
=======================================
  Coverage   98.73%   98.74%           
=======================================
  Files         468      468           
  Lines       21342    21353   +11     
=======================================
+ Hits        21073    21084   +11     
  Misses        269      269           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DeeTheDev
Copy link
Collaborator Author

@rgalanakis I noticed that AutoExposeDetails backend method is used in many places, but we only use updated_at in 3 places in the admin portal, and external_links in 2 places (funding/payout transaction detail pages). So there's probably some more cleanup necessary there. Do you suggest I open another issue for this or fix here?

@rgalanakis
Copy link
Member

@rgalanakis I noticed that AutoExposeDetails backend method is used in many places, but we only use updated_at in 3 places in the admin portal, and external_links in 2 places (funding/payout transaction detail pages). So there's probably some more cleanup necessary there. Do you suggest I open another issue for this or fix here?

No, I think when it makes sense we can just do a pass and add it to all the missing detail pages, it isn't a big deal right now. Probably have some standard way to do it.

@rgalanakis rgalanakis merged commit 0c33059 into main Dec 3, 2024
3 checks passed
@rgalanakis rgalanakis deleted the fix-admin-timestamps branch December 3, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Admin site changes backend Involves changes to the backend API bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix admin update_at bug
2 participants