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 --- front/odiparpack/app/containers/App/Application.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'front/odiparpack/app/containers/App') diff --git a/front/odiparpack/app/containers/App/Application.js b/front/odiparpack/app/containers/App/Application.js index 0a3ffc2..21c7a76 100644 --- a/front/odiparpack/app/containers/App/Application.js +++ b/front/odiparpack/app/containers/App/Application.js @@ -25,7 +25,8 @@ import { Profile, BlankPage, Photos, Error, Settings, HelpSupport, MapMarker, MapDirection, SearchMap, - TrafficIndicator, StreetViewMap, NotFound + TrafficIndicator, StreetViewMap, NotFound, + Pedidos } from '../pageListAsync'; function Application(props) { @@ -36,6 +37,8 @@ function Application(props) { + {/* Pedidos */} + { /* Layout */ } -- cgit v1.2.3 From 9c396976bb42a9d41407358ce1a1d37242230f21 Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Fri, 27 May 2022 12:50:13 -0500 Subject: Add redux, dispatch and etiquetas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - estetica de etiquetas (ok) - add message, pedido Reducer - add dispatch en Componentes con connect - add api reducer que obtienen el JSON todo ok #TODO - FIX logica de aƱadiir - FIX axios y dispatch fuera de un componente --- front/odiparpack/app/containers/App/index.js | 60 +++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) (limited to 'front/odiparpack/app/containers/App') diff --git a/front/odiparpack/app/containers/App/index.js b/front/odiparpack/app/containers/App/index.js index a7313fe..ea78618 100644 --- a/front/odiparpack/app/containers/App/index.js +++ b/front/odiparpack/app/containers/App/index.js @@ -5,11 +5,51 @@ import Auth from './Auth'; import Application from './Application'; import LoginDedicated from '../Pages/Standalone/LoginDedicated'; import ThemeWrapper from './ThemeWrapper'; +import { Snackbar, Button, Icon } from '@material-ui/core'; +import { connect } from 'react-redux'; window.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__ = true; -function App() { +function App(props) { + + const handleMessageClose = () => { + props.dispatch(closeMessage()) + } + + const { + openMessage = false, + message = '', + type = 'error' + } = props + return ( + + + {type === 'success' ? 'check_circle' : 'report_problem'} + + {message} + + } + action={[ + + ]} + /> @@ -20,4 +60,20 @@ function App() { ); } -export default App; +const reducer = 'message'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + message: state.getIn([reducer, 'message']), + type: state.getIn([reducer, 'type']), + openMessage: state.getIn([reducer, 'openMessage']) +}); + +const mapDispatchToProps = dispatch => ({ + dispatch: dispatch +}); +const AppMapped = connect( + mapStateToProps, + mapDispatchToProps +)(App); + +export default AppMapped; -- cgit v1.2.3 From cbc7d7f7494508fda69e88c76702a878bebca0e2 Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Tue, 31 May 2022 03:58:23 -0500 Subject: Add Almacenes - todo de almacenes, redux, pagina - mejoro form de pedido (etiqueta estado, RUC) #TODO - Ver combobox con API --- front/odiparpack/app/containers/App/Application.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'front/odiparpack/app/containers/App') diff --git a/front/odiparpack/app/containers/App/Application.js b/front/odiparpack/app/containers/App/Application.js index 21c7a76..8a30720 100644 --- a/front/odiparpack/app/containers/App/Application.js +++ b/front/odiparpack/app/containers/App/Application.js @@ -26,7 +26,8 @@ import { Photos, Error, Settings, HelpSupport, MapMarker, MapDirection, SearchMap, TrafficIndicator, StreetViewMap, NotFound, - Pedidos + Pedidos, + Almacenes } from '../pageListAsync'; function Application(props) { @@ -39,6 +40,7 @@ function Application(props) { {/* Pedidos */} + { /* Layout */ } -- cgit v1.2.3