Commit 785621f8 authored by VladikB's avatar VladikB

Alles funktioniert

parent e0ad5c6a
......@@ -16,7 +16,7 @@
aria-label="Copy to clipboard"
class="btn btn-primary"
type="button">
<div *ngIf="clipboardText; else copied">{{'global.copy_to_clipboard' | translate}}</div>
<a *ngIf="clipboardText; else copied">{{'global.copy_to_clipboard' | translate}}</a>
<ng-template #copied>{{'global.copied' | translate}}</ng-template>
</button>
<a href="{{'global.mail' | translate}}{{bonusToken}}.">
......@@ -25,4 +25,3 @@
</button>
</a>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { UserTokenComponent } from './user-token.component';
import { BonusTokenComponent } from './bonus-token.component';
describe('UserTokenComponent', () => {
let component: UserTokenComponent;
let fixture: ComponentFixture<UserTokenComponent>;
describe('BonusTokenComponent', () => {
let component: BonusTokenComponent;
let fixture: ComponentFixture<BonusTokenComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ UserTokenComponent ]
declarations: [ BonusTokenComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(UserTokenComponent);
fixture = TestBed.createComponent(BonusTokenComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
......
import {Component} from '@angular/core';
import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';
import {BonusTokenService} from 'src/app/service/user/shared/bonus-token.service';
import {BonusTokenService} from '../../../../../service/user/bonus-token/bonus-token.service';
@Component({
selector: 'app-user-token',
templateUrl: './user-token.component.html',
styleUrls: ['./user-token.component.scss']
selector: 'app-bonus-token',
templateUrl: './bonus-token.component.html',
styleUrls: ['./bonus-token.component.scss']
})
export class UserTokenComponent {
export class BonusTokenComponent {
public bonusToken: string;
public clipboardText: boolean;
public mailText = '';
constructor(private activeModal: NgbActiveModal, bonusToken: BonusTokenService) {
this.bonusToken = bonusToken.getToken();
constructor(private activeModal: NgbActiveModal, bonusTokenService: BonusTokenService) {
this.bonusToken = bonusTokenService.getToken();
this.clipboardText = true;
}
......
......@@ -23,7 +23,8 @@ import { QuestionTextService } from '../../../service/question-text/question-tex
import { QuizService } from '../../../service/quiz/quiz.service';
import { ToLobbyConfirmComponent } from './modals/to-lobby-confirm/to-lobby-confirm.component';
import {TrackingService} from '../../../service/tracking/tracking.service';
import {UserTokenComponent} from './modals/user-token/user-token.component';
import {BonusTokenComponent} from './modals/bonus-token/bonus-token.component';
@Component({
selector: 'app-quiz-results',
......@@ -466,7 +467,7 @@ export class QuizResultsComponent implements OnInit, OnDestroy, IHasTriggeredNav
} else {
footerElems = [this.footerBarService.footerElemShowToken];
this.footerBarService.footerElemShowToken.onClickCallback = async () => {
this.ngbModal.open(UserTokenComponent).result.then(() => {}
this.ngbModal.open(BonusTokenComponent).result.then(() => {}
).catch(() => {});
};
}
......
......@@ -8,14 +8,14 @@ import { ProgressBarModule } from './progress-bar/progress-bar.module';
import { QuestionDetailsComponent } from './question-details/question-details.component';
import { QuizResultsComponent } from './quiz-results.component';
import { ReadingConfirmationProgressComponent } from './reading-confirmation-progress/reading-confirmation-progress.component';
import { UserTokenComponent } from './modals/user-token/user-token.component';
import { BonusTokenComponent } from './modals/bonus-token/bonus-token.component';
@NgModule({
imports: [
SharedModule, ProgressBarModule, HeaderModule, QuizFlowSharedModule,
],
declarations: [
QuizResultsComponent, ConfidenceRateComponent, ReadingConfirmationProgressComponent, QuestionDetailsComponent, ToLobbyConfirmComponent, UserTokenComponent,
QuizResultsComponent, ConfidenceRateComponent, ReadingConfirmationProgressComponent, QuestionDetailsComponent, ToLobbyConfirmComponent, BonusTokenComponent,
],
bootstrap: [ToLobbyConfirmComponent],
exports: [QuizResultsComponent],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment