|
@@ -2,6 +2,7 @@ import _ from 'lodash';
|
|
|
import React, { Component } from 'react';
|
|
import React, { Component } from 'react';
|
|
|
import { Text, ListView, View } from 'react-native';
|
|
import { Text, ListView, View } from 'react-native';
|
|
|
import { connect } from 'react-redux';
|
|
import { connect } from 'react-redux';
|
|
|
|
|
+import { Actions } from 'react-native-router-flux';
|
|
|
import { cursadaFetch } from '../actions/';
|
|
import { cursadaFetch } from '../actions/';
|
|
|
import { Card, CardSection, Button } from './common';
|
|
import { Card, CardSection, Button } from './common';
|
|
|
|
|
|
|
@@ -21,13 +22,20 @@ class Cursada extends Component {
|
|
|
this.dataSource = ds.cloneWithRows(clases);
|
|
this.dataSource = ds.cloneWithRows(clases);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ onClassPress(cursada,id) {
|
|
|
|
|
+ Actions.ViewClase({ cursada, _id:id});
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
renderButton(data) {
|
|
renderButton(data) {
|
|
|
if (data.desactivada){
|
|
if (data.desactivada){
|
|
|
return <View />;
|
|
return <View />;
|
|
|
}
|
|
}
|
|
|
return (
|
|
return (
|
|
|
<CardSection>
|
|
<CardSection>
|
|
|
- <Button>Ingresar</Button>
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ onPress={ () => this.onClassPress(this.props._id, data._id)}>
|
|
|
|
|
+ Ingresar
|
|
|
|
|
+ </Button>
|
|
|
</CardSection>
|
|
</CardSection>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|