Se agrga crear formatos
This commit is contained in:
@@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user