input.onChange(value)}
+ />
+);
+
+
+const styles = ({
+ root: {
+ flexGrow: 1,
+ }
+});
+
+class CrudRutaTab extends Component {
+
+ render() {
+ //console.log("render ps")
+ const {
+ classes,
+ fetchData,
+ addNew,
+ closeForm,
+ submit,
+ removeRow,
+ editRow,
+ dataTable,
+ openForm,
+ initValues,
+ closeNotif,
+ messageNotif,
+ title,
+ dataReal,
+ dispatch,
+ editingId
+ } = this.props;
+
+ //console.log("render ps DATA", dataReal)
+ //console.log("original", dataApi)
+
+ return (
+
+
closeNotif(branch)} variant = "success" message={messageNotif} />
+
+
+ {/* Create Your own form, then arrange or custom it as You like */}
+
+ {/* No need create button or submit, because that already made in this component */}
+
+
+
+ );
+ }
+}
+
+renderRadioGroup.propTypes = {
+ input: PropTypes.object.isRequired,
+};
+
+CrudRutaTab.propTypes = {
+ dataTable: PropTypes.object.isRequired,
+ openForm: PropTypes.bool.isRequired,
+ classes: PropTypes.object.isRequired,
+ fetchData: PropTypes.func.isRequired,
+ addNew: PropTypes.func.isRequired,
+ closeForm: PropTypes.func.isRequired,
+ submit: PropTypes.func.isRequired,
+ removeRow: PropTypes.func.isRequired,
+ editRow: PropTypes.func.isRequired,
+ initValues: PropTypes.object.isRequired,
+ closeNotif: PropTypes.func.isRequired,
+ messageNotif: PropTypes.string.isRequired,
+ title: PropTypes.string.isRequired,
+};
+
+
+const mapStateToProps = state => ({
+ force: state, // force state from reducer
+ initValues: state.getIn([branch, 'formValues']),
+ dataTable: state.getIn([branch, 'dataTable']),
+ openForm: state.getIn([branch, 'showFrm']),
+ messageNotif: state.getIn([branch, 'notifMsg']),
+ editingId: state.getIn([branch, 'editingId']),
+ pedidosLista : state.getIn(['pedido','pedidos']),
+});
+
+const mapDispatchToProps = dispatch => ({
+ fetchData: bindActionCreators(fetchAction, dispatch),
+ addNew: bindActionCreators(addAction, dispatch),
+ closeForm: bindActionCreators(closeAction, dispatch),
+ submit: bindActionCreators(submitAction, dispatch),
+ removeRow: bindActionCreators(removeAction, dispatch),
+ editRow: bindActionCreators(editAction, dispatch),
+ closeNotif: bindActionCreators(closeNotifAction, dispatch),
+ dispatch
+});
+
+const CrudRutaTabMapped = connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(CrudRutaTab);
+
+export default withStyles(styles)(CrudRutaTabMapped);
diff --git a/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/FormRutaTab.js b/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/FormRutaTab.js
new file mode 100644
index 0000000..60ba534
--- /dev/null
+++ b/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/FormRutaTab.js
@@ -0,0 +1,108 @@
+import React, { Component } from 'react';
+import { withStyles } from '@material-ui/core/styles';
+import PropTypes from 'prop-types';
+import { Field } from 'redux-form/immutable';
+import {required, integer} from 'ba-api/validation'
+import {
+ SelectRedux,
+ TextFieldRedux,
+ DatePickerRedux,
+ EstadoRedux
+} from 'ba-components/Forms/ReduxFormMUI';
+import {
+ MenuItem,
+ InputLabel,
+ FormControl,
+ Typography,
+ } from '@material-ui/core';
+
+const styles = ({
+ root: {
+ flexGrow: 1,
+ },
+ field: {
+ width: '100%',
+ marginBottom: 20
+ },
+ fieldBasic: {
+ width: '100%',
+ marginBottom: 20,
+ marginTop: 10
+ },
+ inlineWrap: {
+ display: 'flex',
+ flexDirection: 'row'
+ }
+ });
+
+
+class FormAveriaTab extends Component {
+ saveRef = ref => {
+ this.ref = ref;
+ return this.ref;
+ };
+
+ state = {
+ selectedDate: new Date(),
+ }
+
+ handleDateChange = (date) => {
+ this.setState({ selectedDate: date });
+ }
+ render() {
+ const { classes } = this.props;
+ const trueBool = true;
+ return (
+ <>
+
+
+ Origen
+
+
+
+
+
+
+
+
+
+ Destino
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+ }
+}
+
+FormAveriaTab.propTypes = {
+ classes: PropTypes.object.isRequired,
+ };
+
+export default withStyles(styles)(FormAveriaTab);
\ No newline at end of file
diff --git a/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/dataRuta.js b/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/dataRuta.js
new file mode 100644
index 0000000..762fb8f
--- /dev/null
+++ b/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/dataRuta.js
@@ -0,0 +1,59 @@
+export const anchorTable = [
+ {
+ name: 'id',
+ label: 'Número Avería',
+ initialValue: '',
+ hidden: true,
+ type: 'texto'
+ }, {
+ name: 'origen',
+ label: 'Provincia origen',
+ initialValue: 'Lima',
+ width: '13%',
+ hidden: false,
+ type: 'texto'
+ }, {
+ name: 'destino',
+ label: 'Provincia destino',
+ initialValue: 'Arequipa',
+ width: '13%',
+ hidden: false,
+ type: 'texto'
+ }, {
+ name: 'distancia',
+ label: 'Distancia (km)',
+ initialValue: 0,
+ width: '10%',
+ hidden: false,
+ type: 'texto'
+ }, {
+ name: 'estado',
+ label: 'Estado',
+ initialValue: 0,
+ width: '10%',
+ hidden: false,
+ type: 'etiq_ruta'
+ },
+ {
+ name: 'action',
+ label: 'Action',
+ initialValue: '',
+ hidden: false
+ },
+];
+
+export const dataApi = [
+ {
+ id: '1',
+ origen: 'Lima',
+ destino: 'Arequipa',
+ distancia: 234,
+ estado: 0,
+ }, {
+ id: '2',
+ origen: 'Lima',
+ destino: 'Cuzco',
+ distancia: 234,
+ estado: 1,
+ }
+];
diff --git a/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/index.js b/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/index.js
new file mode 100644
index 0000000..31656fe
--- /dev/null
+++ b/front/odiparpack/app/containers/Odipar/RedTramos/RutaTab/table/index.js
@@ -0,0 +1 @@
+export CrudRutaTab from "./CrudRutaTab";
diff --git a/front/odiparpack/app/containers/Odipar/RedTramos/TramosMain.js b/front/odiparpack/app/containers/Odipar/RedTramos/TramosMain.js
new file mode 100644
index 0000000..4d0ecea
--- /dev/null
+++ b/front/odiparpack/app/containers/Odipar/RedTramos/TramosMain.js
@@ -0,0 +1,89 @@
+import React, { Component } from 'react';
+import { withStyles } from '@material-ui/core/styles';
+import PropTypes from 'prop-types';
+import { AppBar, Tabs, Tab, Paper, Typography } from '@material-ui/core';
+import { connect } from 'react-redux';
+import RutaTab from './RutaTab/RutaTab';
+//actions
+
+
+function TabContainer(props) {
+ return (
+
+ {props.children}
+
+ );
+ }
+
+ TabContainer.propTypes = {
+ children: PropTypes.node.isRequired,
+ };
+
+const styles = ({
+ root: {
+ flexGrow: 1,
+ marginTop: 30,
+ }
+ });
+
+class CamionesMain extends Component {
+ constructor (props) {
+
+ super(props)
+ this.state = {
+ value: 0
+ };
+
+ }
+
+ handleChange = (event, value) => {
+ this.setState({ value });
+ };
+
+ render() {
+ const {value} = this.state;
+ const { classes } = this.props;
+ return (
+
+
+
+
+
+
+
+
+
+ {value === 0 &&
+
+
+ }
+ {value === 1 &&
+
+ bbbb
+ }
+
+
+
+ );
+ }
+}
+
+CamionesMain.propTypes = {
+ classes: PropTypes.object.isRequired,
+};
+
+const reducer = 'pedido'
+const mapStateToProps = state => ({
+ force: state, // force state from reducer
+});
+
+const mapDispatchToProps = dispatch => ({
+ dispatch
+});
+
+const CamionesMainMapped = connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(CamionesMain);
+
+export default withStyles(styles)(CamionesMainMapped);
\ No newline at end of file
--
cgit v1.2.3