This commit is contained in:
unknown 2020-01-16 19:29:33 +01:00
commit 4de7f29290
2 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,7 @@
Poprzednia odpowiedź była niepoprawna.
</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) || (test['isGroupOwner']))))">
<br /><br />
<button class="button" (click)="start()"> <i class="far fa-play-circle"></i> Rozpocznij test</button>
</div>
@ -30,6 +30,10 @@
<br /><br />
<h3>Test już został wcześniej rozwiązany!</h3>
</div>
<div *ngIf="!isStarted && test['permission']==='GROUP' && !test['attempted'] && !((test['dateStart'] < now && test['dateEnd'] < now) || (test['isGroupOwner']))">
<br /><br />
<h3>Test jest nieaktywny!</h3>
</div>
<div *ngIf="isStarted && !isEnded">

View File

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