Skip to content

Commit

Permalink
support pause apparatus in web-client
Browse files Browse the repository at this point in the history
  • Loading branch information
luechtdiode committed Mar 31, 2024
1 parent 75a823f commit 5bbbc74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@
<ion-content>
<form #wertungsform="ngForm" (ngSubmit)="saveNext(wertungsform)" (keyup.enter)="saveNext(wertungsform)">
<ion-list>
<app-wertung-avg-calc #dnote name="noteD" *ngIf="isDNoteUsed" [waiting]="waiting" [valueTitle]="dNoteLabel" [(ngModel)]="wertung.noteD">
<app-wertung-avg-calc #dnote name="noteD" *ngIf="isDNoteUsed" [waiting]="waiting" [valueTitle]="dNoteLabel" [(ngModel)]="wertung.noteD" [disabled]="!editable()">
</app-wertung-avg-calc>
<app-wertung-avg-calc #enote name="noteE" [waiting]="waiting" [valueTitle]="eNoteLabel" [(ngModel)]="wertung.noteE">
<app-wertung-avg-calc #enote name="noteE" [waiting]="waiting" [valueTitle]="eNoteLabel" [(ngModel)]="wertung.noteE" [disabled]="!editable()">
</app-wertung-avg-calc>
<ion-item>
<ion-label>Endnote</ion-label>
<ion-input #endnote [ngModel]='wertung.endnote' type="number" readonly name="endnote"></ion-input>
<ion-input #endnote [ngModel]='wertung.endnote' type="number" readonly name="endnote" [disabled]="!editable()"></ion-input>
</ion-item>
</ion-list>
<ion-list>
<ion-item *ngIf="!wertungsform.valid">
<ion-item *ngIf="!wertungsform.valid && editable()">
Ungültige Eingabe. Die Werte müssen im Format ##.## (2-3 Nachkommastellen mit Dezimalpunkt) eingegeben werden.
</ion-item>
<ion-item *ngIf="!editable()">
An diesem Gerät macht {{item.vorname + ' ' + item.name}} Pause. Es können keine Resultate erfasst werden.
</ion-item>
<ion-button size="large" expand="block" type="submit" #btnSaveNext *ngIf='editable()' [disabled]="waiting || !wertungsform.valid" color="success">
<ion-icon slot="start" name="arrow-forward-circle-outline"></ion-icon>Speichern & Weiter</ion-button>
<ion-button size="large" expand="block" *ngIf='editable()' [disabled]="waiting || !wertungsform.valid" color="secondary" (click)='saveClose(wertungsform)'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class WertungEditorPage {
}

editable() {
return this.backendService.loggedIn;
return this.backendService.loggedIn && this.wertung.wettkampfdisziplinId > 0;
}

updateUI(wc: WertungContainer) {
Expand Down

0 comments on commit 5bbbc74

Please sign in to comment.