Wejście do testu w grupie

This commit is contained in:
Marcin Szczepański 2020-01-16 17:20:59 +01:00
parent c1d0f977e2
commit 49e5bf13d9
2 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@
Poprzednia odpowiedź była niepoprawna. Poprzednia odpowiedź była niepoprawna.
</div> </div>
<div *ngIf="!isStarted && (test['permission'] !== 'GROUP' || (test['permission'] === 'GROUP' && !test['attempted']))"> <div *ngIf="!isStarted && (test['permission'] !== 'GROUP' || (test['permission'] === 'GROUP' && !test['attempted'] && (test['dateStart'] < now && test['dateEnd'] < now)))">
<br /><br /> <br /><br />
<button class="button" (click)="start()"> <i class="far fa-play-circle"></i> Rozpocznij test</button> <button class="button" (click)="start()"> <i class="far fa-play-circle"></i> Rozpocznij test</button>
</div> </div>

View File

@ -28,6 +28,7 @@ export class TestDetailsComponent implements OnInit, OnDestroy {
getResultSubscription: ISubscription; getResultSubscription: ISubscription;
getTestWithoutAnswersSubscription: ISubscription; getTestWithoutAnswersSubscription: ISubscription;
display = false; display = false;
now = Date.now();
constructor(private route: ActivatedRoute, private router: Router, private testService: TestsService, constructor(private route: ActivatedRoute, private router: Router, private testService: TestsService,
private routingState: RoutingStateService) { } private routingState: RoutingStateService) { }