-
Notifications
You must be signed in to change notification settings - Fork 1
[ISDK-80] Add a config file for modularisation #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
# 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
…/ISDK-80/modularisation
# Conflicts: # src/pages/assessments/assessments.page.ts # src/pages/assessments/group/assessments-group.page.ts
|
@jazzmind the changed files that related to this ticket are:
|
| 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 || {}); |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
https://intersective.atlassian.net/browse/ISDK-80