summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/components/Tables/tableParts
diff options
context:
space:
mode:
authorgabrhr <[email protected]>2022-05-25 15:36:35 -0500
committergabrhr <[email protected]>2022-05-25 15:36:35 -0500
commit55c0f57d42d82f1f1f5809e9c7d6845b6e0b68af (patch)
tree316e157c2f167c595c4a8abc2c30932b3a0577e1 /front/odiparpack/app/components/Tables/tableParts
parentf74cc2a27968533395b43334f606df63be4bb40f (diff)
downloadDP1_project-55c0f57d42d82f1f1f5809e9c7d6845b6e0b68af.tar.gz
DP1_project-55c0f57d42d82f1f1f5809e9c7d6845b6e0b68af.tar.bz2
DP1_project-55c0f57d42d82f1f1f5809e9c7d6845b6e0b68af.zip
Add PedidoPage
- cambio de esqueleto segun figma - componente de etiquetas - tabla y form de Pedido #TODO - estetica de etiquetas - redux y crear end points
Diffstat (limited to 'front/odiparpack/app/components/Tables/tableParts')
-rw-r--r--front/odiparpack/app/components/Tables/tableParts/MainTableForm.js2
-rw-r--r--front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js26
2 files changed, 21 insertions, 7 deletions
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 {
<Tooltip title="Add Item">
<Button variant="contained" onClick={() => addNew(anchor, branch)} color="secondary" className={classes.button}>
<AddIcon className={classNames(classes.leftIcon, classes.iconSmall)} />
- Add New
+ AƱadir
</Button>
</Tooltip>
</div>
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 (
- <TableCell padding="none" key={index.toString()}>
- {item.get(itemCell.name) !== undefined ? item.get(itemCell.name).toString() : ''}
- </TableCell>
- );
+ const inputType = anchor[index].type;
+ switch (inputType) {
+ case 'etiq_pedido':
+ case 'etiq_camion':
+ case 'etiq_bloqueo':
+ case 'etiq_alma':
+ return (
+ <TableCell padding="none" key={index.toString()}>
+ {etiqueta(inputType, item.get(itemCell.name))}
+ </TableCell>
+ );
+ case 'texto':
+ return (
+ <TableCell padding="none" key={index.toString()}>
+ {item.get(itemCell.name) !== undefined ? item.get(itemCell.name).toString() : ''}
+ </TableCell>
+ );
+ }
}
return false;
});