This commit is contained in:
henrydays 2019-03-18 17:55:02 +00:00
parent eb543397a2
commit 58d9444bbb
4 changed files with 18 additions and 5 deletions

View File

@ -266,7 +266,7 @@ _creatTeam=()=>{
</View>
</View>
</View>
{ this.props.team=='none' &&
{ this.props.team!= undefined && this.props.team=='none' &&
<View style={{backgroundColor:'white', margin:10}}>
<View style={{backgroundColor:'#CC1A17'}}>
<Text style={{ fontSize: 18,
@ -334,7 +334,7 @@ _creatTeam=()=>{
</View>
}
{
this.props.team!='none' &&
this.props.team!= undefined && this.props.team!='none' &&
<View>
<View
@ -374,7 +374,7 @@ _creatTeam=()=>{
{this.props.team.nMembros}/6 elementos
</Text>
</View>
{this.props.team.cap.qRcode == this.props.user.Code && <TouchableOpacity onPress={this._delTeam}>
{ this.props.team!= undefined && this.props.team.cap.qRcode == this.props.user.Code && <TouchableOpacity onPress={this._delTeam}>
<View
style={{
alignItems: "center",

View File

@ -60,7 +60,7 @@ let apiState = {
acesso: [],
alojamento: [],
sessionDetail:{},
team:{},
team:undefined,
internalToken:"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIxIiwidW5pcXVlX25hbWUiOiJjZW5hIiwicm9sZSI6IkFkbWluIiwibmJmIjoxNTUyOTI4NTgyLCJleHAiOjE1NTMwMTQ5ODIsImlhdCI6MTU1MjkyODU4Mn0.Kwc-vu9lTGFDTKOAt7LKvBb0pnEnF6v30kF-4RjjU8swAwTJLF_oymF-MKOYtpY0a9IRaBK9yrED5b5Wkc2aoQ",
eventsInternal:[],
cromos:[]

View File

@ -26,11 +26,22 @@ namespace api.Data
public async Task<List<EventLocVisited>> GetEventLocsVisitedTeam(int id)
{
List<EventLocVisited> allLocs = await _context.EventLocsVisited.Include(e=>e.Team).Include(e=>e.Location).ToListAsync();
List<EventLocVisited> rList = new List<EventLocVisited>();
for(var i=0;i<allLocs.Count;i++){
EventLocVisited a=allLocs[i];
if(allLocs[i].Team.Id == id){
rList.Add(allLocs[i]);
a.complete=true;
}else{
a.complete=false;
}
rList.Add(a);
}
return rList;
}

View File

@ -10,5 +10,7 @@ namespace api.Models
public Team Team{get;set;} //team
public EventLoc Location{get;set;} //location
public DateTime timestamp{get;set;} //time
public Boolean complete{get;set;}
}
}