diff --git a/src/app/core/config/i18n/el.ts b/src/app/core/config/i18n/el.ts index 85252849..6aec62ee 100644 --- a/src/app/core/config/i18n/el.ts +++ b/src/app/core/config/i18n/el.ts @@ -872,7 +872,8 @@ export const locale = { QR_CODE: 'Ο QR Κωδικός σου', WALLET_TITLE: 'Το πορτοφόλι μου', WALLET_SUBTITLE: 'σε όλο το δίκτυο', - WALLET_DESC:'Εδώ βλέπεις τους πόντους σου και τις καμπάνιες που συμμετέχεις.' + WALLET_DESC:'Εδώ βλέπεις τους πόντους σου και τις καμπάνιες που συμμετέχεις.', + BADGE_READ:'Μάθε περισσότερα για το σήμα σου εδώ.' }, WIZARD: { NEXT_STEP: 'Επόμενο Βήμα', diff --git a/src/app/member-menu/member-dashboard/member-dashboard.component.html b/src/app/member-menu/member-dashboard/member-dashboard.component.html index b2cc8d96..3cfc4ea6 100644 --- a/src/app/member-menu/member-dashboard/member-dashboard.component.html +++ b/src/app/member-menu/member-dashboard/member-dashboard.component.html @@ -6,10 +6,26 @@ + + {{'MEMBER.DASHBOARD.BADGE_READ' | translate}} + +
+ +
+

+
+
+
+ + + + diff --git a/src/app/member-menu/member-dashboard/member-dashboard.component.scss b/src/app/member-menu/member-dashboard/member-dashboard.component.scss index 212815d5..57c6d38a 100644 --- a/src/app/member-menu/member-dashboard/member-dashboard.component.scss +++ b/src/app/member-menu/member-dashboard/member-dashboard.component.scss @@ -24,6 +24,14 @@ } } +.badge-more{ + text-decoration: underline; + cursor: pointer; + &:hover{ + color:$primary; + } +} + .wallet-card { &-header { border-bottom: 2px solid #eee; diff --git a/src/app/member-menu/member-dashboard/member-dashboard.component.ts b/src/app/member-menu/member-dashboard/member-dashboard.component.ts index 5a470fe1..dea327b3 100644 --- a/src/app/member-menu/member-dashboard/member-dashboard.component.ts +++ b/src/app/member-menu/member-dashboard/member-dashboard.component.ts @@ -1,38 +1,85 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; - +import { Component, OnInit, OnDestroy, ViewChild, HostListener } from '@angular/core'; +import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; /** * Environment */ import { environment } from '../../../environments/environment'; @Component({ - selector: 'app-member-dashboard', - templateUrl: './member-dashboard.component.html', - styleUrls: ['./member-dashboard.component.scss'] + selector: 'app-member-dashboard', + templateUrl: './member-dashboard.component.html', + styleUrls: ['./member-dashboard.component.scss'] }) export class MemberDashboardComponent implements OnInit, OnDestroy { + /** + * Children Modals + */ + @ViewChild('badgeModal') badgeModal: NgbModalRef; + + + /** * Configuration and Static Data */ - public configAccess: Boolean[] = environment.access; + public configAccess: Boolean[] = environment.access; /** * Component Constructor - * + * @param modalService: NgbModal */ - constructor() { } + constructor( + private modalService: NgbModal, + ) { } /** * On Init */ - ngOnInit() { - } + ngOnInit() { + } /** * On Destroy */ - ngOnDestroy() { + ngOnDestroy() { + } + + /** + * Close Modal on Browser Back Button + */ + controlModalState(state: boolean): void { + if (state) { + const modalState = { + modal: true, + desc: 'MemberDashboardModals' + }; + history.pushState(modalState, null); + } else { + if (window.history.state.modal) { + history.back(); + } + } + } + + @HostListener('window:popstate') + dismissModal(): void { + if (this.modalService.hasOpenModals()) { + this.modalService.dismissAll(); + this.controlModalState(false); + } + } + + /** + * Open Badge Modal + */ + openBadgeExplainer(): void { + this.controlModalState(true); + this.modalService.open(this.badgeModal) + .result.then( + () => { this.controlModalState(false); console.log('closed'); }, + () => { this.controlModalState(false); console.log('dismissed'); }); } -} \ No newline at end of file + + +} diff --git a/src/assets/media/images/ranking-1.png b/src/assets/media/images/ranking-1.png index 69096442..6eb5bcd3 100644 Binary files a/src/assets/media/images/ranking-1.png and b/src/assets/media/images/ranking-1.png differ diff --git a/src/assets/media/images/ranking-2.png b/src/assets/media/images/ranking-2.png index 7e1eadf7..35b72e1b 100644 Binary files a/src/assets/media/images/ranking-2.png and b/src/assets/media/images/ranking-2.png differ diff --git a/src/assets/media/images/ranking-3.png b/src/assets/media/images/ranking-3.png index a4f1eeab..9d5368e2 100644 Binary files a/src/assets/media/images/ranking-3.png and b/src/assets/media/images/ranking-3.png differ