diff --git a/src/Components/Corresponsales/Tabulador/Tabulador.tsx b/src/Components/Corresponsales/Tabulador/Tabulador.tsx index 4e98b59..7383453 100644 --- a/src/Components/Corresponsales/Tabulador/Tabulador.tsx +++ b/src/Components/Corresponsales/Tabulador/Tabulador.tsx @@ -56,11 +56,12 @@ export const Tabulador: FC = (props) => { name: 'Costo', width: '15%', cell: (row: ITabuladorConceptos) => { - return row.activo === 1 ? ( + return {}} /> + /*return row.activo === 1 ? ( {}} /> ) : ( {}} /> - ) + )*/ }, }, { @@ -72,9 +73,9 @@ export const Tabulador: FC = (props) => { { - switchConcept(row.id, 1) + defaultChecked={row.activo === 1 ? true : false} + onChange={() => { + switchConcept(row.id, row.activo ? 0 : 1) }} /> @@ -113,7 +114,7 @@ export const Tabulador: FC = (props) => { if (response.status === 200) { let tmp = DetalleConceptos let idx = tmp.findIndex((obj) => obj.id == id) - tmp[idx].activo = status === 1 ? 0 : 1 + tmp[idx].activo = status setDetalleConceptos(tmp) setHeader('Confirmacion') setMsg(response.data.respuesta)