12 Commits
2.0 ... 2.0.4

Author SHA1 Message Date
f7096108f0 Merge branch 'release/2.0.4' 2018-05-29 01:32:36 -04:00
d5ca679865 - More profile fixes 2018-05-29 01:31:59 -04:00
9362d110a5 Merge branch 'release/2.0.3' 2018-05-29 01:11:46 -04:00
2e94702ec2 Merge tag '2.0.3' into develop
no message
2018-05-29 01:11:46 -04:00
709caf208a - Profiles service mapping 2018-05-29 01:11:27 -04:00
70fe066cdd Merge branch 'release/2.0.2' 2018-05-29 01:08:07 -04:00
73f456ed00 Merge tag '2.0.2' into develop
no message
2018-05-29 01:08:07 -04:00
c9431f62ef - profiles service fixes 2018-05-29 01:07:25 -04:00
b91f7fcfba Merge branch 'release/2.0.1' 2018-05-29 00:37:55 -04:00
58b25b0a44 Merge tag '2.0.1' into develop
no message
2018-05-29 00:37:55 -04:00
01ed427b54 - Fix for verified profiles 2018-05-29 00:37:30 -04:00
8fd37ec556 Merge tag '2.0' into develop
UI Revisions
2018-05-29 00:31:52 -04:00
2 changed files with 14 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ export class GridPage {
tabNavEl: any;
constructor(public navCtrl: NavController, public profileService: ProfileService, private _sanitizer: DomSanitizer) {
profileService.load().then((data) => {
profileService.loadVerified().then((data) => {
this.profiles = data;
});
this.tabNavEl = document.querySelector('#tab-nav .tabbar');

View File

@@ -29,8 +29,8 @@ export class ProfileService {
}
loadSubmitted() {
if (this.profiles) {
return Promise.resolve(this.profiles);
if (this.profiles && this.profiles.submitted) {
return Promise.resolve(this.profiles.submitted);
}
return new Promise(resolve => {
@@ -39,8 +39,8 @@ export class ProfileService {
}
loadVerified() {
if (this.profiles) {
return Promise.resolve(this.profiles);
if (this.profiles && this.profiles.verified) {
return Promise.resolve(this.profiles.verified);
}
return new Promise(resolve => {
@@ -55,7 +55,7 @@ export class ProfileService {
data => {
this.profiles = {};
this.profiles[type] = data;
this.profiles.reduce((map, profile, i) => {
this.profiles[type].reduce((map, profile, i) => {
map[profile._id] = i;
return map;
}, this.idMap[type]);
@@ -67,16 +67,16 @@ export class ProfileService {
)
}
getNextProfile(id, type) {
var nextIdIndex = this.idMap[id] + 1;
nextIdIndex = nextIdIndex >= this.profiles.length ? 0 : nextIdIndex;
return this.profiles[nextIdIndex];
getNextProfile(id, type = 'all') {
var nextIdIndex = this.idMap[type][id] + 1;
nextIdIndex = nextIdIndex >= this.profiles[type].length ? 0 : nextIdIndex;
return this.profiles[type][nextIdIndex];
}
getPreviousProfile(id, type) {
var prevIdIndex = this.idMap[id] + 1;
prevIdIndex = prevIdIndex < 0 ? (this.profiles.length - 1) : prevIdIndex;
return this.profiles[prevIdIndex];
getPreviousProfile(id, type = 'all') {
var prevIdIndex = this.idMap[type][id] - 1;
prevIdIndex = prevIdIndex < 0 ? (this.profiles[type].length - 1) : prevIdIndex;
return this.profiles[type][prevIdIndex];
}
getProfiles() {