I saved the changes from the code editor.
Now I have everything. Let me check how hasPermesso is used in the sidebar to match the pattern:
Now I have all the context I need. I'll now:
strutture query in nuova-chiamata-dialog.tsx (remove nome column, use id_esterno)lab-quick-call-button.tsxapp-shell.tsxFix 1 — nuova-chiamata-dialog.tsx: correct the strutture query and the Struttura type
Fix 2 — Create lab-quick-call-button.tsx
Fix 3 — Mount LabQuickCallButton in AppShellInner
Fix 4 — Check sidebar LAB section uses canAccess correctly (it already does via puoVedere). Also verify lab-dati-page.tsx and lab-configurazione-page.tsx don't query strutture.nome.
Three more fixes needed. Let me read the relevant sections and fix them:
Now I need to check the Struttura type declaration and SelectItem in both files:
Fix all three occurrences — lab-dati-page.tsx and lab-configurazione-page.tsx:
Now fix lab-configurazione-page.tsx:
Also fix the struttura join display — find where struttura.nome is rendered in the link table:
Tutte le modifiche sono complete. Riepilogo:
lab-quick-call-button.tsx (nuovo): bottone flottante PhoneCall posizionato a bottom-20 right-6 (sopra il ? della guida che sta a bottom-6), usa useRolePreview() per verificare isSuperadminReale || canAccess("lab.view") || canAccess("lab.create") prima di renderizzarsi, e monta direttamente NuovaChiamataDialog senza navigare su /lab.
app-shell.tsx: aggiunto import e mount di <LabQuickCallButton /> accanto a <ContextualHelpButton /> nell'AppShellInner, rendendolo disponibile in tutta l'app autenticata.
Fix schema strutture: corrette tutte le query strutture.select("id, nome") → select("id, id_esterno") e i tipi interface Struttura in nuova-chiamata-dialog.tsx, lab-dati-page.tsx e lab-configurazione-page.tsx; aggiornati anche il join struttura:strutture(nome) → struttura:strutture(id_esterno) e tutti i SelectItem / label che leggevano s.nome → s.id_esterno ?? s.id.