Skip to content

Conversation

@imkven
Copy link
Contributor

@imkven imkven commented Oct 24, 2017

imkven added 16 commits October 2, 2017 12:44
# Conflicts:
#	src/pages/achievements/view/achievements-view.page.ts
#	src/pages/activities-classic/list/activities-classic-list.page.ts
#	src/pages/activities/list/list.page.ts
#	src/pages/activities/list/popup.ts
#	src/pages/assessments/assessments.page.ts
#	src/pages/assessments/group/assessments-group.page.ts
#	src/pages/assessments/popup/items-popup.page.ts
#	src/pages/events/checkin/event-checkin.page.ts
#	src/pages/events/list/list.page.ts
#	src/pages/events/view/events-view.page.ts
#	src/pages/forget-password/forget-password.ts
#	src/pages/gallery/gallery.ts
#	src/pages/levels/list/list.ts
#	src/pages/login/login.ts
#	src/pages/magic-link/magic-link.ts
#	src/pages/rankings/list/rankings.page.ts
#	src/pages/rankings/view/ranking-badges.ts
#	src/pages/rankings/view/ranking-details.page.ts
#	src/pages/registration/register.page.ts
#	src/pages/registration/registration.page.ts
#	src/pages/reset-password/reset-password.ts
#	src/pages/settings/leaderboard/leaderboard-settings.page.ts
#	src/pages/settings/settings.page.ts
#	src/pages/team/team.ts
#	src/pages/term-condition/term-condition.page.ts
@imkven
Copy link
Contributor Author

imkven commented Nov 10, 2017

@jazzmind the changed files that related to this ticket are:

  1. src/pages/login/login.ts
  2. src/shared/app-config/app-config.module.ts
  3. src/shared/app-config/app-config.service.ts
  4. src/pages/tabs/tabs.page.ts
  5. src/pages/tabs/tabs.html

self.cacheService.setLocal('timelineID', data.Timelines[0].Timeline.id);
self.cacheService.setLocal('teams', data.Teams);
self.cacheService.setLocal('gotNewItems', false);
self.cacheService.setLocal('appConfig', data.Experience.config || {});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When user login, we take out the config and save into local storage. @jazzmind

import * as _ from 'lodash';

@Injectable()
export class AppConfigService {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are the code to handle AppConfig for the user. @jazzmind

) {}

ionViewWillEnter() {
this.tabs = this.appConfig.getTabs();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we assign the tabs for render later. @jazzmind

<ion-tab tabsHideOnSubPages="true" [root]="events" tabTitle=" {{ 'TABS.EVENTS' | translate }}" tabIcon="md-calendar"></ion-tab>
<ion-tab tabsHideOnSubPages="true" [root]="ranking" tabTitle=" {{ 'TABS.RANKING' | translate }}" tabIcon="md-medal"></ion-tab>
<ion-tab tabsHideOnSubPages="true" [root]="settings" tabTitle=" {{ 'TABS.ACCOUNT' | translate }}" tabIcon="md-person"></ion-tab>
<ion-tab *ngFor="let tab of tabs" tabsHideOnSubPages="true" [root]="tab.root" tabTitle=" {{ tab.title | translate }}" tabIcon="{{tab.icon}}"></ion-tab>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more hardcoded tabs. The tabs will render based on AppConfig data. @jazzmind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants