Implement company provisioning codes and session tweaks
This commit is contained in:
parent
0fb9bf59b2
commit
2cba553efa
28 changed files with 1407 additions and 534 deletions
|
|
@ -18,6 +18,7 @@ interface PortalShellProps {
|
|||
const navItems = [
|
||||
{ label: "Meus chamados", href: "/portal/tickets" },
|
||||
{ label: "Abrir chamado", href: "/portal/tickets/new", icon: PlusCircle },
|
||||
{ label: "Perfil", href: "/portal/profile" },
|
||||
]
|
||||
|
||||
export function PortalShell({ children }: PortalShellProps) {
|
||||
|
|
@ -155,38 +156,6 @@ export function PortalShell({ children }: PortalShellProps) {
|
|||
Recuperando dados do colaborador vinculado...
|
||||
</div>
|
||||
) : null}
|
||||
{!machineContextError && !machineContextLoading && machineContext && !machineContext.assignedUserId ? (
|
||||
<div className="rounded-xl border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-800 shadow-sm">
|
||||
<p className="font-semibold">Debug: m<EFBFBD>quina autenticada sem colaborador vinculado.</p>
|
||||
<p className="mt-1 text-xs text-amber-700">
|
||||
Copie os dados abaixo e compartilhe com o suporte para investigar.
|
||||
</p>
|
||||
<pre className="mt-2 max-h-64 overflow-y-auto rounded-lg bg-white/70 px-3 py-2 text-[11px] leading-tight text-amber-900">
|
||||
{JSON.stringify(machineContext, null, 2)}
|
||||
</pre>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
const payload = {
|
||||
machineContext,
|
||||
timestamp: new Date().toISOString(),
|
||||
}
|
||||
try {
|
||||
navigator.clipboard
|
||||
.writeText(JSON.stringify(payload, null, 2))
|
||||
.catch(() => {
|
||||
console.warn("N<>o foi poss<73>vel copiar automaticamente. Selecione o texto manualmente.", payload)
|
||||
})
|
||||
} catch (error) {
|
||||
console.warn("Clipboard n<>o suportado. Selecione manualmente.", error)
|
||||
}
|
||||
}}
|
||||
className="mt-2 inline-flex items-center rounded-md border border-amber-300 px-3 py-1 text-xs font-semibold text-amber-800 transition hover:bg-amber-100"
|
||||
>
|
||||
Copiar detalhes
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
{children}
|
||||
</main>
|
||||
<footer className="border-t border-slate-200 bg-white/70">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue