Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Vistas/Componentes/Organismos/ListaTransferencia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const ListaTransferenciaPersonalizada = ({
const [izquierda, setIzquierda] = useState(elementosDisponibles);
const [derecha, setDerecha] = useState(elementosSeleccionados);

// Use ref to track if we're in the middle of updating from props
const updatingFromPropsRef = useRef(false);

// Actualizar estado interno cuando cambien las props
Expand All @@ -61,7 +60,6 @@ const ListaTransferenciaPersonalizada = ({
updatingFromPropsRef.current = false;
}, [elementosSeleccionados]);

// Only notify parent when changes come from user interactions, not from prop updates
useEffect(() => {
if (alCambiarSeleccion && !updatingFromPropsRef.current) {
alCambiarSeleccion({
Expand Down
2 changes: 0 additions & 2 deletions src/Vistas/Componentes/Organismos/ModalDetalleRol.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ const ModalDetalleRol = ({ abierto, onCerrar, idRol }) => {

const manejarGuardar = async () => {
const datosParaEnviar = {
// Only send the name value if it was actually changed
nombre: nombreRol !== nombreOriginal ? nombreRol : null,
// Only send the description value if it was actually changed
descripcion: descripcionRol !== descripcionOriginal ? descripcionRol : null,
permisos: permisosSeleccionados.map(permiso => permiso.id)
};
Expand Down
4 changes: 2 additions & 2 deletions src/Vistas/Paginas/Pedidos/ListaPedidos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ListaPedidos = () => {

const { usuario } = useAuth();

// 🆕 Estados para actualizar pedido
// Estados para actualizar pedido
const [modalAbierto, setModalAbierto] = useState(false);
const [pedidoSeleccionado, setPedidoSeleccionado] = useState(null);

Expand Down Expand Up @@ -62,7 +62,7 @@ const ListaPedidos = () => {

const [abrirPopUpEliminar, setAbrirPopUpEliminar] = useState(false);

// 🆕 Funciones para editar pedido
// Funciones para editar pedido
const abrirModalEditar = (pedido) => {
console.log('Fila seleccionada:', pedido);
setPedidoSeleccionado(pedido);
Expand Down
Loading