fix: route authorised content staff through management access entry
tests / ci (push) Waiting to run
tests / ci (push) Waiting to run
This commit is contained in:
@@ -6,7 +6,7 @@ export default function ManagementAccess({
|
||||
}: {
|
||||
registrationEnabled: boolean;
|
||||
}) {
|
||||
const { auth } = usePage<{ auth: Auth }>().props;
|
||||
const { auth, contentManagementHref } = usePage<{ auth: Auth; contentManagementHref?: string | null }>().props;
|
||||
const user = auth.user;
|
||||
const action =
|
||||
'inline-flex rounded-lg bg-slate-900 px-5 py-3 font-medium text-white';
|
||||
@@ -29,7 +29,7 @@ export default function ManagementAccess({
|
||||
<h2 className="text-xl font-semibold">
|
||||
{!user
|
||||
? 'Preparar a sua conta'
|
||||
: auth.canManagePortal
|
||||
: contentManagementHref || auth.canManagePortal
|
||||
? 'Acesso disponível'
|
||||
: !user.email_verified_at
|
||||
? 'Verificar o seu email'
|
||||
@@ -53,6 +53,11 @@ export default function ManagementAccess({
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
) : contentManagementHref ? (
|
||||
<>
|
||||
<p>Abra a entrada de gestão para cadastrar oportunidades e gerir documentos e legislação, conforme as funções já atribuídas à sua conta.</p>
|
||||
<Link className={action} href={contentManagementHref}>Abrir gestão de conteúdos e oportunidades</Link>
|
||||
</>
|
||||
) : auth.canManagePortal ? (
|
||||
<>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user