cal-itp / benefits

Transit benefits enrollment, minus the paperwork.
https://docs.calitp.org/benefits
GNU Affero General Public License v3.0
26 stars 9 forks source link

Transit agency staff should see a home dashboard upon logging in #2246

Closed angela-tran closed 3 weeks ago

angela-tran commented 1 month ago

Acceptance criteria

2268 will implement the "Transit processor" link, so don't worry about that part of the UI for this ticket.

image

angela-tran commented 1 month ago

Thanks @lalver1 for updating the issue description 🙏

Here's a section from Django docs on CSS variables that drive the admin site's theming, in case it's helpful: https://docs.djangoproject.com/en/5.1/ref/contrib/admin/#theming-support

lalver1 commented 1 month ago

No problem @angela-tran 🙂 Ah, thanks for that! I was actually looking at how to override the template that admin uses, so this is very helpful!

angela-tran commented 1 month ago

@lalver1 and I met earlier to talk through how to conditionally show the home dashboard and the default index page. I had originally been thinking we would just override admin/index.html and use conditionals on the user to determine what to show, but after going through some of it with Luis, we came to the consensus that it'll be much cleaner to have a separate template.

The default index page is returned by the AdminSite.index function, so in order to return a different template for transit agency staff users, we need to override this function.

Luis and I worked through putting the necessary configuration in place correctly so that there are no regressions and so that he can override index.

angela-tran commented 3 weeks ago

This ticket is pretty big. The plan is to do it in 3 PRs:

cc @lalver1