@@ -46,8 +46,8 @@ function Header(props) {
-
-
+
+
*/}
);
diff --git a/front/odiparpack/app/components/Odipar/EtiquetaData.js b/front/odiparpack/app/components/Odipar/EtiquetaData.js
new file mode 100644
index 0000000..4a2a37c
--- /dev/null
+++ b/front/odiparpack/app/components/Odipar/EtiquetaData.js
@@ -0,0 +1,73 @@
+//Pedido
+export const pedido = {
+ entregado: {
+ text: "Entregado",
+ color: "#81C784",
+ icon: false
+ },
+ pendiente:{
+ text: "Pendiente",
+ color: "#FFB74D",
+ icon: false
+ },
+ enCamino: {
+ text: "En Camino",
+ color: "#64B5F6",
+ icon: false
+ },
+ cancelado: {
+ text: "Cancelado",
+ color: "#E57373",
+ icon: false
+ }
+ }
+
+ //Camion
+ export const camion = {
+ entregado: {
+ text: "Entregado",
+ color: "#81C784",
+ icon: false
+ },
+ pendiente:{
+ text: "Pendiente",
+ color: "#FFB74D",
+ icon: false
+ },
+ enCamino: {
+ text: "En Camino",
+ color: "#64B5F6",
+ icon: false
+ },
+ cancelado: {
+ text: "Cancelado",
+ color: "#E57373",
+ icon: false
+ }
+ }
+
+ export const bloqueo = {
+ desbloqueado: {
+ text: "Entregado",
+ color: "#81C784",
+ icon: false
+ },
+ bloqueado:{
+ text: "Pendiente",
+ color: "#FFB74D",
+ icon: false
+ }
+ }
+
+ export const almacen = {
+ noPrincipal: {
+ text: "Pequeño",
+ color: "#81C784",
+ icon: false
+ },
+ principal:{
+ text: "Principal",
+ color: "#FFB74D",
+ icon: false
+ }
+ }
\ No newline at end of file
diff --git a/front/odiparpack/app/components/Odipar/common.js b/front/odiparpack/app/components/Odipar/common.js
new file mode 100644
index 0000000..c66b792
--- /dev/null
+++ b/front/odiparpack/app/components/Odipar/common.js
@@ -0,0 +1,38 @@
+import React from "react"
+import { Chip } from "@material-ui/core";
+import {pedido, camion, bloqueo, almacen} from './EtiquetaData'
+
+const etiquetaStyle = color => ({
+ fontWeight: 'bold',
+ color: '#FFF',
+ backgroundColor: color
+});
+
+
+//Etiquetas
+export function etiqueta(tipo , estado) { // eslint-disable-line
+ let {color, text} = ""
+ switch(tipo){
+ case 'etiq_pedido':
+ text = pedido[Object.keys(pedido)[estado]].text
+ color = pedido[Object.keys(pedido)[estado]].color
+ break;
+ case 'etiq_camion':
+ text = camion[Object.keys(camion)[estado]].text
+ color = camion[Object.keys(camion)[estado]].color
+ break;
+ case 'etiq_bloqueo':
+ text = bloqueo[Object.keys(bloqueo)[estado]].text
+ color = bloqueo[Object.keys(bloqueo)[estado]].color
+ break;
+ case 'etiq_alma':
+ console.log("entre?")
+ text = almacen[Object.keys(almacen)[estado]].text
+ color = almacen[Object.keys(almacen)[estado]].color
+ break;
+ }
+
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/front/odiparpack/app/components/Panel/FloatingPanel.js b/front/odiparpack/app/components/Panel/FloatingPanel.js
index 675166a..f0a0e6b 100644
--- a/front/odiparpack/app/components/Panel/FloatingPanel.js
+++ b/front/odiparpack/app/components/Panel/FloatingPanel.js
@@ -82,7 +82,7 @@ FloatingPanel.propTypes = {
};
FloatingPanel.defaultProps = {
- title: 'Add New Item',
+ title: 'Añadir nuevo',
extraSize: false,
};
diff --git a/front/odiparpack/app/components/Sidebar/MainMenuSimple.js b/front/odiparpack/app/components/Sidebar/MainMenuSimple.js
new file mode 100644
index 0000000..f7634ca
--- /dev/null
+++ b/front/odiparpack/app/components/Sidebar/MainMenuSimple.js
@@ -0,0 +1,98 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { withStyles } from '@material-ui/core/styles';
+import classNames from 'classnames';
+import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
+import { NavLink } from 'react-router-dom';
+import ExpandLess from '@material-ui/icons/ExpandLess';
+import ExpandMore from '@material-ui/icons/ExpandMore';
+// Menu Object
+import MenuContent from 'ba-api/menu';
+import { List, ListItem, ListItemIcon, ListItemText, Collapse, Icon } from '@material-ui/core';
+import styles from './sidebar-jss';
+
+function sortByKey(array, key) {
+ return array.sort((a, b) => {
+ const x = a[key]; const y = b[key];
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ });
+}
+
+const LinkBtn = React.forwardRef(function LinkBtn(props, ref) { // eslint-disable-line
+ return ; // eslint-disable-line
+});
+
+function MainMenuSimple(props) {
+ const {
+ classes,
+ toggleDrawerOpen,
+ loadTransition,
+ openSubMenu,
+ open,
+ } = props;
+
+ const handleClick = () => {
+ //toggleDrawerOpen();
+ loadTransition(false);
+ };
+
+ const getMenus = menuArray => menuArray.map((item, index) => {
+ return (
+
+ -1 ? classes.opened : '')}
+ activeClassName={classes.active}
+ component={LinkBtn}
+ to={item.link}
+ onClick={handleClick}
+ timeout="auto"
+ unmountOnExit
+ >
+ {item.icon
+ && (
+
+ {item.icon}
+
+ )
+ }
+
+
+
+ );
+ });
+ return (
+
+ {getMenus(MenuContent)}
+
+ );
+}
+
+MainMenuSimple.propTypes = {
+ classes: PropTypes.object.isRequired,
+ open: PropTypes.object.isRequired,
+ openSubMenu: PropTypes.func.isRequired,
+ toggleDrawerOpen: PropTypes.func.isRequired,
+ loadTransition: PropTypes.func.isRequired,
+};
+
+const openAction = (key, keyParent) => ({ type: 'OPEN_SUBMENU', key, keyParent });
+const reducer = 'ui';
+
+const mapStateToProps = state => ({
+ force: state, // force active class for sidebar menu
+ open: state.getIn([reducer, 'subMenuOpen'])
+});
+
+const mapDispatchToProps = dispatch => ({
+ openSubMenu: bindActionCreators(openAction, dispatch)
+});
+
+const MainMenuMapped = connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(MainMenuSimple);
+
+export default withStyles(styles)(MainMenuMapped);
diff --git a/front/odiparpack/app/components/Sidebar/Sidebar.js b/front/odiparpack/app/components/Sidebar/Sidebar.js
index 01de4ec..b4f5626 100644
--- a/front/odiparpack/app/components/Sidebar/Sidebar.js
+++ b/front/odiparpack/app/components/Sidebar/Sidebar.js
@@ -4,10 +4,10 @@ import { withStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import brand from 'ba-api/brand';
import dummy from 'ba-api/dummyContents';
-import logo from 'ba-images/logo.svg';
-import { Hidden, Drawer, SwipeableDrawer, List, Divider, Avatar } from '@material-ui/core';
-import MainMenu from './MainMenu';
-import OtherMenu from './OtherMenu';
+import logo from 'ba-images/logo.png';
+import { Hidden, Drawer, SwipeableDrawer, Avatar } from '@material-ui/core';
+import MainMenuSimple from './MainMenuSimple';
+//import OtherMenu from './OtherMenu';
import styles from './sidebar-jss';
const MenuContent = props => {
@@ -38,11 +38,11 @@ const MenuContent = props => {