fix(HistoriaClinica): agregar handlers de otrosLaboratorios en store y corregir ReferenceError
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const fs = require('fs');
|
||||
let code = fs.readFileSync('src/sections/HistoriaClinica.tsx', 'utf8');
|
||||
|
||||
const regex = /function SeccionLaboratorios\(\{ lab, patientId, internacionId, add, update, del, addAcidoBase, canEdit, portalNode\}: \{([\s\S]*?)\}\) \{/;
|
||||
|
||||
const repl = `function SeccionLaboratorios({ lab, otrosLaboratorios = [], patientId, internacionId, add, update, del, addAcidoBase, addOtroLaboratorio, canEdit, portalNode}: {
|
||||
lab: Laboratorio[];
|
||||
otrosLaboratorios?: OtroLaboratorio[];
|
||||
patientId: string;
|
||||
internacionId: string;
|
||||
add: (l: Omit<Laboratorio, 'id'>) => void;
|
||||
update: (id: string, data: Partial<Laboratorio>) => void;
|
||||
del: (id: string) => void;
|
||||
addAcidoBase?: (a: Omit<AcidoBase, 'id'>) => void;
|
||||
addOtroLaboratorio?: (o: Omit<OtroLaboratorio, 'id'>) => void;
|
||||
canEdit?: boolean;
|
||||
portalNode?: HTMLDivElement | null;
|
||||
}) {`;
|
||||
|
||||
code = code.replace(regex, repl);
|
||||
fs.writeFileSync('src/sections/HistoriaClinica.tsx', code);
|
||||
Reference in New Issue
Block a user