- Grid fixes
This commit is contained in:
@@ -53,7 +53,7 @@ export class ProfileService {
|
||||
.map(res => res.json())
|
||||
.subscribe(
|
||||
data => {
|
||||
this.profiles = {};
|
||||
this.profiles = this.profiles || {};
|
||||
this.profiles[type] = data;
|
||||
this.profiles[type].reduce((map, profile, i) => {
|
||||
map[profile._id] = i;
|
||||
@@ -62,7 +62,7 @@ export class ProfileService {
|
||||
resolve(this.profiles[type]);
|
||||
},
|
||||
error => {
|
||||
this.doGetRequest(this.fallback, resolve);
|
||||
this.doGetRequest(this.fallback, resolve, type);
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -80,7 +80,7 @@ export class ProfileService {
|
||||
}
|
||||
|
||||
getProfiles() {
|
||||
return this.profiles;
|
||||
return this.profiles.all;
|
||||
}
|
||||
|
||||
getProfileById(id) {
|
||||
@@ -88,10 +88,10 @@ export class ProfileService {
|
||||
}
|
||||
|
||||
getSubmittedProfiles() {
|
||||
|
||||
return this.profiles.submitted;
|
||||
}
|
||||
|
||||
getVerifiedProfiles() {
|
||||
|
||||
return this.profiles.verified;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user