Cliente now picks a jefe mecánico after choosing the service so the calendar shows that specific jefe's availability. Each jefe has its own configurable parallel slot capacity (replacing the global SLOTS_PARALELOS = 5). Admins manage jefes from /admin/jefes; jefes log in to /jefe to see their daily agenda. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,14 @@ export async function crearSesionCliente(clienteId: string): Promise<string> {
|
||||
return token;
|
||||
}
|
||||
|
||||
export async function crearSesionJefe(jefeId: string): Promise<string> {
|
||||
const token = await new SignJWT({ sub: jefeId, role: "jefe" })
|
||||
.setProtectedHeader({ alg: "HS256" })
|
||||
.setExpirationTime("8h")
|
||||
.sign(SECRET);
|
||||
return token;
|
||||
}
|
||||
|
||||
export async function verificarSesion(
|
||||
cookieName: string
|
||||
): Promise<{ sub: string; role: string } | null> {
|
||||
|
||||
Reference in New Issue
Block a user