api
This commit is contained in:
parent
eb543397a2
commit
58d9444bbb
|
@ -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",
|
||||
|
|
|
@ -60,7 +60,7 @@ let apiState = {
|
|||
acesso: [],
|
||||
alojamento: [],
|
||||
sessionDetail:{},
|
||||
team:{},
|
||||
team:undefined,
|
||||
internalToken:"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIxIiwidW5pcXVlX25hbWUiOiJjZW5hIiwicm9sZSI6IkFkbWluIiwibmJmIjoxNTUyOTI4NTgyLCJleHAiOjE1NTMwMTQ5ODIsImlhdCI6MTU1MjkyODU4Mn0.Kwc-vu9lTGFDTKOAt7LKvBb0pnEnF6v30kF-4RjjU8swAwTJLF_oymF-MKOYtpY0a9IRaBK9yrED5b5Wkc2aoQ",
|
||||
eventsInternal:[],
|
||||
cromos:[]
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue