From 55c0f57d42d82f1f1f5809e9c7d6845b6e0b68af Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Wed, 25 May 2022 15:36:35 -0500 Subject: Add PedidoPage - cambio de esqueleto segun figma - componente de etiquetas - tabla y form de Pedido #TODO - estetica de etiquetas - redux y crear end points --- .../components/Tables/tableParts/MainTableForm.js | 2 +- .../components/Tables/tableParts/RowReadOnly.js | 26 +++++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'front/odiparpack/app/components/Tables') diff --git a/front/odiparpack/app/components/Tables/tableParts/MainTableForm.js b/front/odiparpack/app/components/Tables/tableParts/MainTableForm.js index ccf0e4a..8869212 100644 --- a/front/odiparpack/app/components/Tables/tableParts/MainTableForm.js +++ b/front/odiparpack/app/components/Tables/tableParts/MainTableForm.js @@ -61,7 +61,7 @@ class MainTableForm extends React.Component { diff --git a/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js b/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js index 7da655f..2f4a519 100644 --- a/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js +++ b/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js @@ -5,8 +5,9 @@ import classNames from 'classnames'; import css from 'ba-styles/Table.scss'; import DeleteIcon from '@material-ui/icons/Delete'; import EditIcon from '@material-ui/icons/BorderColor'; +import { etiqueta } from 'ba-components/Odipar/common'; -import { TableCell, IconButton } from '@material-ui/core'; +import { TableCell, IconButton, LinearProgress } from '@material-ui/core'; const styles = theme => ({ button: { @@ -32,11 +33,24 @@ class RowReadOnly extends React.Component { }; const renderCell = dataArray => dataArray.map((itemCell, index) => { if (itemCell.name !== 'action' && !itemCell.hidden) { - return ( - - {item.get(itemCell.name) !== undefined ? item.get(itemCell.name).toString() : ''} - - ); + const inputType = anchor[index].type; + switch (inputType) { + case 'etiq_pedido': + case 'etiq_camion': + case 'etiq_bloqueo': + case 'etiq_alma': + return ( + + {etiqueta(inputType, item.get(itemCell.name))} + + ); + case 'texto': + return ( + + {item.get(itemCell.name) !== undefined ? item.get(itemCell.name).toString() : ''} + + ); + } } return false; }); -- cgit v1.2.3