0f2ea59754
Rol docente:
- profiles.rol acepta 'alumno'|'docente'|'admin' (migración 0006)
- Docente en checkout: no elige maestro; RPC usa su propio nombre como maestro_responsable
- Perfil/onboarding condicionales por rol: docente sin semestre ni tutor, label matrícula → "Número de empleado"
- catalogo.astro: perfilCompleto para docente solo requiere matrícula
Combobox maestros + separar tutores:
- maestros.es_tutor bool: subset marcado que aparece en el select de tutor del perfil
- MaestroForm: nuevo checkbox "Es tutor"; endpoints POST/PATCH aceptan es_tutor
- admin/maestros.astro: columna Tutor con SVG check
- perfil/onboarding queries filtran es_tutor=true, activo=true
- Checkout SolicitudCart: <select> combobox de maestros activos (reemplaza textarea);
option vacía usa el tutor por defecto; endpoint recibe maestro_id numeric
Fecha default 1 día:
- AccionesSolicitud: enDias(7) → enDias(1) por default al aprobar
Sonido notificación:
- Movido src/audio/sonido_notificacion.mp3 → public/audio/
- BadgeSolicitudes: new Audio('/audio/sonido_notificacion.mp3').play() en INSERT
Issues:
- Límite motivo 250 chars (era 500) en checkout + backend
- break-words en Maestro/Motivo de las 3 vistas admin y VerDetalles
38 lines
827 B
TypeScript
38 lines
827 B
TypeScript
/// <reference path="../.astro/types.d.ts" />
|
|
|
|
import type { SupabaseClient, User } from '@supabase/supabase-js';
|
|
|
|
export type Profile = {
|
|
id: string;
|
|
email: string;
|
|
nombre: string | null;
|
|
matricula: string | null;
|
|
rol: 'alumno' | 'docente' | 'admin';
|
|
semestre: string | null;
|
|
tutor_id: number | null;
|
|
foto_path: string | null;
|
|
};
|
|
|
|
declare global {
|
|
namespace App {
|
|
interface Locals {
|
|
supabase: SupabaseClient;
|
|
user: User | null;
|
|
profile: Profile | null;
|
|
}
|
|
}
|
|
}
|
|
|
|
interface ImportMetaEnv {
|
|
readonly PUBLIC_SUPABASE_URL: string;
|
|
readonly PUBLIC_SUPABASE_ANON_KEY: string;
|
|
readonly SUPABASE_SERVICE_ROLE_KEY: string;
|
|
readonly PUBLIC_APP_URL: string;
|
|
}
|
|
|
|
interface ImportMeta {
|
|
readonly env: ImportMetaEnv;
|
|
}
|
|
|
|
declare const process: { env: Record<string, string | undefined> };
|