calendário recomendado
This commit is contained in:
parent
c7d3f7cde3
commit
befcb8b736
File diff suppressed because one or more lines are too long
|
@ -41,10 +41,8 @@ import ImagePicker from 'react-native-image-picker';
|
|||
|
||||
|
||||
var options = {
|
||||
title: 'Select Avatar',
|
||||
customButtons: [
|
||||
{name: 'fb', title: 'Choose Photo from Facebook'},
|
||||
],
|
||||
title: 'Selecionar foto de perfil',
|
||||
|
||||
storageOptions: {
|
||||
skipBackup: true,
|
||||
path: 'images'
|
||||
|
@ -201,8 +199,25 @@ class Profile extends Component {
|
|||
|
||||
}
|
||||
_open=()=>{
|
||||
ImagePicker.launchCamera(options, (response) => {
|
||||
// Same code as in above section!
|
||||
ImagePicker.showImagePicker(options, (response) => {
|
||||
console.log('Response = ', response);
|
||||
|
||||
if (response.didCancel) {
|
||||
console.log('User cancelled image picker');
|
||||
} else if (response.error) {
|
||||
console.log('ImagePicker Error: ', response.error);
|
||||
} else if (response.customButton) {
|
||||
console.log('User tapped custom button: ', response.customButton);
|
||||
} else {
|
||||
const source = { uri: response.uri };
|
||||
|
||||
// You can also display the image using data:
|
||||
// const source = { uri: 'data:image/jpeg;base64,' + response.data };
|
||||
|
||||
this.setState({
|
||||
avatarSource: source,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -226,6 +241,7 @@ class Profile extends Component {
|
|||
</View>
|
||||
|
||||
</View>
|
||||
<Image source={this.state.avatarSource} />
|
||||
<Button onPress={ this._open} title="Editar foto de perfil" color="#CC1A17"
|
||||
/>
|
||||
<View style={styles.userBio}>
|
||||
|
|
|
@ -140,6 +140,13 @@ class choosePath extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
_isRecommended(sessionId, careerPath){
|
||||
|
||||
if(sessionId==44)
|
||||
return true
|
||||
|
||||
return false
|
||||
}
|
||||
_render = ({ item }) => {
|
||||
<Text>Cenas: {item.Name}</Text>;
|
||||
};
|
||||
|
@ -533,8 +540,9 @@ class choosePath extends React.Component {
|
|||
});
|
||||
}}
|
||||
>
|
||||
<View style={styles.sessionInfo}>
|
||||
<Text style={styles.sessionTitle}>
|
||||
{ !this._isRecommended(item[index].Id, this.props.careerPath) &&
|
||||
<View style={{margin:5}}>
|
||||
<Text style={{ fontSize: 15,fontWeight: "bold" }}>
|
||||
{item[index].Name}
|
||||
</Text>
|
||||
<Text
|
||||
|
@ -553,13 +561,50 @@ class choosePath extends React.Component {
|
|||
item[index].MaxAttendees
|
||||
}
|
||||
unfilledColor={"white"}
|
||||
width={170}
|
||||
width={150}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
}{
|
||||
this._isRecommended(item[index].Id, this.props.careerPath) &&
|
||||
<View style={{padding:5, backgroundColor:'rgba(238, 238, 238,0.5)'}}>
|
||||
<View style={{flex:1, flexDirection:'row'}}>
|
||||
<IconFA
|
||||
name="star"
|
||||
color={"#CC1A17"}
|
||||
size={20}
|
||||
/>
|
||||
<Text style={{ fontSize: 15,fontWeight: "bold" , marginLeft:5}}>
|
||||
{item[index].Name}
|
||||
</Text>
|
||||
</View>
|
||||
<Text
|
||||
style={{ marginTop: 10, marginBottom: 5 }}
|
||||
>
|
||||
{item[index].MaxAttendees -
|
||||
item[index].Enrolled}{" "}
|
||||
Lugares disponíveis
|
||||
</Text>
|
||||
{item[index].Enrolled != 0 &&
|
||||
item[index].MaxAttendees!=0 && (
|
||||
<Progress.Bar
|
||||
color={"#000000"}
|
||||
progress={
|
||||
item[index].Enrolled /
|
||||
item[index].MaxAttendees
|
||||
}
|
||||
unfilledColor={"white"}
|
||||
width={150}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
}
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
|
@ -688,7 +733,8 @@ function mapStateToProps(state, props) {
|
|||
sessions: state.apiReducer.sessions,
|
||||
Blocks: state.apiReducer.Blocks,
|
||||
showAlert: state.apiReducer.showAlert,
|
||||
token: state.apiReducer.token
|
||||
token: state.apiReducer.token,
|
||||
careerPath: state.apiReducer.careerPath
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ class teamDetail extends React.Component {
|
|||
|
||||
return (
|
||||
<PTRView onRefresh={this._update}>
|
||||
{this.props.team!= undefined &&
|
||||
<ScrollView style={{ backgroundColor: "#eeeeee" }}>
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
|
@ -110,12 +111,12 @@ class teamDetail extends React.Component {
|
|||
</View>
|
||||
)}
|
||||
{this.props.user.Code != this.props.team.cap.qRcode && (
|
||||
<View width={{ width: "100%", padding: 10 }}>
|
||||
<View style={{ width: "100%", padding: 10 }}>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 22,
|
||||
fontWeight: "bold",
|
||||
color: "#CC1A17",
|
||||
color: "white",
|
||||
textAlign: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
|
@ -152,13 +153,7 @@ class teamDetail extends React.Component {
|
|||
style={{ width: 50, height: 50 }}
|
||||
source={require("../assets/logo_black.jpg")}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: "#000"
|
||||
}}
|
||||
>
|
||||
{item.fullName}
|
||||
</Text>
|
||||
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
|
@ -245,6 +240,7 @@ class teamDetail extends React.Component {
|
|||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
}
|
||||
</PTRView>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -632,7 +632,7 @@ var checkAndRefresh = function(token) {
|
|||
access_token: parsed.access_token,
|
||||
refresh_token: parsed.refresh_token,
|
||||
expirationDateToken:
|
||||
Math.round(new Date().getTime() / 1000) + 3598
|
||||
Math.round(new Date().getTime() / 1000) + (parsed.expires_in -2)
|
||||
};
|
||||
|
||||
console.log(parsed);
|
||||
|
@ -1620,9 +1620,10 @@ export function login(user, pass) {
|
|||
});
|
||||
return;
|
||||
} else {
|
||||
console.log(parsed)
|
||||
var obj = {
|
||||
access_token: parsed.access_token,
|
||||
expirationDateToken: Math.round(new Date().getTime() / 1000) + 3598,
|
||||
expirationDateToken: Math.round(new Date().getTime() / 1000) + (parsed.expires_in-2),
|
||||
refresh_token: parsed.refresh_token,
|
||||
valid: true
|
||||
};
|
||||
|
|
|
@ -829,6 +829,46 @@
|
|||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@expo/vector-icons": {
|
||||
"version": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"from": "github:expo/vector-icons#expo-font-fix",
|
||||
"requires": {
|
||||
"lodash": "^4.17.4",
|
||||
"react-native-vector-icons": "6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-native-vector-icons": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.0.0.tgz",
|
||||
"integrity": "sha512-uF3oWb3TV42uXi2apVOZHw9oy9Nr5SXDVwOo1umQWo/yYCrDzXyVfq14DzezgEbJ9jfc/yghBelj0agkXmOKlg==",
|
||||
"requires": {
|
||||
"lodash": "^4.0.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"yargs": "^8.0.2"
|
||||
}
|
||||
},
|
||||
"yargs": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
|
||||
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
|
||||
"requires": {
|
||||
"camelcase": "^4.1.0",
|
||||
"cliui": "^3.2.0",
|
||||
"decamelize": "^1.1.1",
|
||||
"get-caller-file": "^1.0.1",
|
||||
"os-locale": "^2.0.0",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^1.0.1",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^2.0.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^3.2.1",
|
||||
"yargs-parser": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@expo/websql": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@expo/websql/-/websql-1.0.1.tgz",
|
||||
|
@ -2918,6 +2958,7 @@
|
|||
"integrity": "sha512-xo8wZ9/4F3P1xN9nKFSJM3Gb2m0p05aRncjgFF+jxM5XfvKkUrzW0a6FYOY/h/r2r1wyQI7OTBPTiTH/GxuwgA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"@expo/vector-icons": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"@expo/websql": "^1.0.1",
|
||||
"@types/fbemitter": "^2.0.32",
|
||||
"@types/invariant": "^2.2.29",
|
||||
|
@ -2979,6 +3020,7 @@
|
|||
"qs": "^6.5.0",
|
||||
"react-native-branch": "2.2.5",
|
||||
"react-native-gesture-handler": "~1.0.14",
|
||||
"react-native-maps": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
|
||||
"react-native-reanimated": "1.0.0-alpha.11",
|
||||
"react-native-screens": "1.0.0-alpha.22",
|
||||
"react-native-svg": "8.0.10",
|
||||
|
@ -2988,14 +3030,6 @@
|
|||
"whatwg-fetch": "^2.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/vector-icons": {
|
||||
"version": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"from": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"requires": {
|
||||
"lodash": "^4.17.4",
|
||||
"react-native-vector-icons": "6.0.0"
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
|
@ -3032,47 +3066,17 @@
|
|||
},
|
||||
"react-native-maps": {
|
||||
"version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
|
||||
"from": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2"
|
||||
"from": "github:expo/react-native-maps#v0.22.1-exp.0"
|
||||
},
|
||||
"react-native-screens": {
|
||||
"version": "1.0.0-alpha.22",
|
||||
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz",
|
||||
"integrity": "sha512-kSyAt0AeVU6N7ZonfV6dP6iZF8B7Bce+tk3eujXhzBGsLg0VSLnU7uE9VqJF0xdQrHR91ZjGgVMieo/8df9KTA=="
|
||||
},
|
||||
"react-native-vector-icons": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.0.0.tgz",
|
||||
"integrity": "sha512-uF3oWb3TV42uXi2apVOZHw9oy9Nr5SXDVwOo1umQWo/yYCrDzXyVfq14DzezgEbJ9jfc/yghBelj0agkXmOKlg==",
|
||||
"requires": {
|
||||
"lodash": "^4.0.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"yargs": "^8.0.2"
|
||||
}
|
||||
},
|
||||
"whatwg-fetch": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
|
||||
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
|
||||
},
|
||||
"yargs": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
|
||||
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
|
||||
"requires": {
|
||||
"camelcase": "^4.1.0",
|
||||
"cliui": "^3.2.0",
|
||||
"decamelize": "^1.1.1",
|
||||
"get-caller-file": "^1.0.1",
|
||||
"os-locale": "^2.0.0",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^1.0.1",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^2.0.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^3.2.1",
|
||||
"yargs-parser": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7938,6 +7942,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"react-native-image-crop-picker": {
|
||||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-crop-picker/-/react-native-image-crop-picker-0.23.0.tgz",
|
||||
"integrity": "sha512-BmfP246feY+sElYArAR7/DGRT2kFCTvAdiBKcIH8sA7UbUNy2eGAZsXBZWtt917wm+RuhW98CoAsnKB3iH9IvQ=="
|
||||
},
|
||||
"react-native-image-overlay": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-overlay/-/react-native-image-overlay-0.1.2.tgz",
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"react-native-elements": "^1.0.0",
|
||||
"react-native-fit-image": "^1.5.4",
|
||||
"react-native-gesture-handler": "^1.0.15",
|
||||
"react-native-image-crop-picker": "^0.23.0",
|
||||
"react-native-image-overlay": "^0.1.2",
|
||||
"react-native-image-picker": "^0.28.0",
|
||||
"react-native-image-picker-m": "^0.26.8",
|
||||
|
|
Loading…
Reference in New Issue