I’m building a different dashboard for each user role on my app.
What is the best approach in this case?
For example:
I have a dashboard for admin, so I would like to render dashboard_admin.html
For a user with a role vendor I would like to render dashboard_vendor.html and so on…
I tried live_component but I don’t think it would be a better way and render different templates I had no success because in this version it seems like the macro view doesn’t exist anymore.
I’m using Phoenix 1.7 and Liveview 0.18.3.
Any thoughts about that would be really appreciate. =)
I created a live session but as the path is equal for the same dashboard and the only think that changes is the HTML I got stuck on first match on route for route home (~p"/") others routes with this same path that I was targeting different dashboard was ignored because of that.
Sorry If I am wrong but I think that is a little bit different what I’m trying to do.
I will use the same layout (sidebar, navbar, etc…) for all dashboards.