Se agrga crear formatos

This commit is contained in:
2025-11-26 19:44:45 -06:00
parent 29231206c0
commit a6f0010a53
3 changed files with 32 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ import { HistorialCambiosModal } from "../historico/HistorialCambiosModal"
import AIChatModal from "../ai/AIChatModal"
/* =====================================================
Query keys & fetcher
===================================================== */
@@ -54,6 +55,8 @@ export const planTextOptions = (planId: string) =>
staleTime: 60_000,
})
/* =====================================================
Color helpers
===================================================== */
@@ -124,6 +127,17 @@ export function AcademicSections({ planId, color }: { planId: string; color?: st
const [editing, setEditing] = useState<null | { key: keyof PlanTextFields; title: string }>(null)
const [draft, setDraft] = useState("")
const plan_format={
"objetivo_general": "...",
"sistema_evaluacion": "...",
"perfil_ingreso": "...",
"perfil_egreso": "...",
"competencias_genericas": "...",
"competencias_especificas": "...",
"indicadores_desempeno": "...",
"pertinencia": "..."
}
// --- mutation con actualización optimista ---
const updateField = useMutation({
mutationFn: async ({ key, value }: { key: keyof PlanTextFields; value: string | string[] | null }) => {
@@ -309,6 +323,7 @@ export function AcademicSections({ planId, color }: { planId: string; color?: st
/>
<AIChatModal
plan_format={plan_format}
open={openModalIa}
onClose={() => setopenModalIa(false)}
context={{