Adapt frontend to SAM API: RUT auth, new types, helpdesk endpoints
- Login: RUT-based (SAM auth) instead of email - API client: updated all endpoints to /api/helpdesk/* - Types: match SAM response format (nombre, apPaterno, perfil) - Dashboard: uses new DashboardStats with dailyCounts - Tickets: title instead of subject, requesterName/assigneeName - KB: categoryName/authorName instead of nested objects - Removed register page (SAM manages users)
This commit is contained in:
1 parent
0cca57f21e
commit
f56f6365d2
11 files changed
+285
-718
No files matched your search
@@ -12,10 +12,15 @@ export default function Sidebar() {
|
||||
{ href: "/", icon: "bi-speedometer2", label: "Dashboard" },
|
||||
{ href: "/tickets", icon: "bi-ticket-detailed", label: "Tickets" },
|
||||
{ href: "/knowledge-base", icon: "bi-journal-bookmark", label: "Knowledge Base" },
|
||||
{ href: "/users", icon: "bi-people", label: "Users" },
|
||||
{ href: "/settings", icon: "bi-gear", label: "Settings" },
|
||||
];
|
||||
|
||||
const initials = user?.nombre
|
||||
?.split(" ")
|
||||
.map((n: string) => n[0])
|
||||
.join("")
|
||||
.toUpperCase()
|
||||
.slice(0, 2) || "U";
|
||||
|
||||
return (
|
||||
<aside className="sidebar" id="sidebar">
|
||||
<div className="sidebar-brand">
|
||||
@@ -42,17 +47,10 @@ export default function Sidebar() {
|
||||
</nav>
|
||||
|
||||
<div className="sidebar-user">
|
||||
<div className="avatar">
|
||||
{user?.name
|
||||
?.split(" ")
|
||||
.map((n) => n[0])
|
||||
.join("")
|
||||
.toUpperCase()
|
||||
.slice(0, 2) || "U"}
|
||||
</div>
|
||||
<div className="avatar">{initials}</div>
|
||||
<div className="sidebar-user-info">
|
||||
<div className="name">{user?.name || "Usuario"}</div>
|
||||
<div className="role">{user?.role || "Agente"}</div>
|
||||
<div className="name">{user?.nombre || "Usuario"}</div>
|
||||
<div className="role">{user?.perfil || "Agente"}</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={logout}
|
||||
|
||||
Reference in new issue
Block a user