forked from fga-eps-mds/2017.2-MerendaMais
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fga-eps-mds#164 - Composing items for scheduled visits and counselor…
…s related to it Co-authored-by: Ronyell <[email protected]> Co-authored-by: ThalissonMelo <[email protected]>
- Loading branch information
1 parent
7b9428f
commit d984a9c
Showing
4 changed files
with
100 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import React from 'react'; | ||
import { Text, View, TouchableOpacity, StyleSheet } from 'react-native'; | ||
import { Actions } from 'react-native-router-flux'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const styles = StyleSheet.create({ | ||
listSchedule: { | ||
flex: 1, | ||
marginHorizontal: 15, | ||
marginVertical: 10, | ||
borderColor: 'black', | ||
borderWidth: 1, | ||
borderRadius: 3, | ||
backgroundColor: '#FAFAFA', | ||
justifyContent: 'space-between', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
}, | ||
|
||
textBox: { | ||
flex: 4, | ||
paddingLeft: 4, | ||
justifyContent: 'flex-start', | ||
marginRight: 15, | ||
}, | ||
|
||
text: { | ||
fontSize: 15, | ||
paddingVertical: 2, | ||
}, | ||
}); | ||
|
||
class ScheduleCard extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
data: {}, | ||
counselor: this.props.counselor, | ||
}; | ||
} | ||
|
||
render(){ | ||
return( | ||
<View style={styles.listSchedule} key={this.props.keyProp}> | ||
<View style={styles.textBox}> | ||
{ | ||
this.props.data.map( (item) =>( | ||
<Text style={styles.text}> | ||
<Text style={{ fontWeight: 'bold' }}>{item.label} </Text> | ||
{item.value} | ||
</Text> | ||
) | ||
)} | ||
</View> | ||
{this.props.children} | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
ScheduleCard.propTypes = { | ||
data: PropTypes.arrayOf(PropTypes.shape({ | ||
label: PropTypes.string.isRequired, | ||
value: PropTypes.string.isRequired | ||
})).isRequired, | ||
keyProp: PropTypes.string.isRequired, | ||
counselor: PropTypes.shape({ | ||
name: PropTypes.string.isRequired, | ||
email: PropTypes.string.isRequired, | ||
token: PropTypes.string.isRequired, | ||
nuvemCode: PropTypes.number.isRequired, | ||
profile: PropTypes.shape({ | ||
cpf: PropTypes.string.isRequired, | ||
phone: PropTypes.string.isRequired, | ||
isPresident: PropTypes.bool.isRequired, | ||
segment: PropTypes.string.isRequired, | ||
CAE: PropTypes.string.isRequired, | ||
CAE_Type: PropTypes.string, | ||
}).isRequired, | ||
}).isRequired, | ||
}; | ||
|
||
export default ScheduleCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters