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

Jc/register page #36

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Jc/register page #36

wants to merge 4 commits into from

Conversation

JoseBambora
Copy link
Contributor

Give the possibility for the users creating performances on karaokes. This will reduce the time, since everyone can create their team performance, instead of being the admin creating every team performance.

@@ -15,6 +15,7 @@ defmodule KaraokiumWeb.Admin.PerformanceLive.New do
socket
|> assign(:performance, %Performance{})
|> assign(:page_title, "New Performance")
|> assign(:karaoke_id, karaoke_id)}
|> assign(:karaoke_id, karaoke_id)
|> assign(:permissions, socket.assigns.current_user.permissions)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you using this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using this on the same folder, on the file new.html.heex. I made this in order to have the same page returning to 2 different pages. This is important when we have normal users, that doesn't have any permission, and they want to register their team, their return page will be the normal karaoke page. The rest users that have permissions will go directly to the admin page when they finished registering some team. I made this for the reason to not creating another new.ex and new.html.heex which only difference would be the return page.


:sysadmin ->
acc ++ sysadmin_menu(conn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't change this. Each permission opens the possibility to navigate to different places and do different things.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I am commiting it to another branch since this branch is for register_page and not for navbar.

]
}
]
end

defp sysadmin_menu(conn) do
[
%{title: "LiveDashboard", url: Routes.live_dashboard_path(conn, :home), submenu: []}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A sysadmin of the system should only get permission to access the Live Dashboard in order to monitor the application.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I am commiting it to another branch since this branch is for register_page and not for navbar.

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

Successfully merging this pull request may close these issues.

2 participants