fix: suspend indications by deleting from table instead of updating state
This commit is contained in:
@@ -192,11 +192,6 @@ export function SeccionIndicaciones({ recomendaciones, internacionId, add, updat
|
|||||||
const handleSuspender = (i: Indicacion, suspendioMedico: string) => {
|
const handleSuspender = (i: Indicacion, suspendioMedico: string) => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const fecha = now.toISOString().split('T')[0] + ' ' + now.toTimeString().split(' ')[0].substring(0, 5);
|
const fecha = now.toISOString().split('T')[0] + ' ' + now.toTimeString().split(' ')[0].substring(0, 5);
|
||||||
update(i.id, {
|
|
||||||
estado: 'Suspendida',
|
|
||||||
medicoSuspende: suspendioMedico,
|
|
||||||
fechaSuspension: fecha,
|
|
||||||
});
|
|
||||||
if (onAgregarMovimiento) {
|
if (onAgregarMovimiento) {
|
||||||
onAgregarMovimiento({
|
onAgregarMovimiento({
|
||||||
indicacionId: i.id,
|
indicacionId: i.id,
|
||||||
@@ -207,6 +202,7 @@ export function SeccionIndicaciones({ recomendaciones, internacionId, add, updat
|
|||||||
indicacionPrevia: formatIndicacion(i),
|
indicacionPrevia: formatIndicacion(i),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
del(i.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleModificar = (i: Indicacion, modificoMedico: string) => {
|
const handleModificar = (i: Indicacion, modificoMedico: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user