Added tournament active/inactive option
This commit is contained in:
@@ -26,6 +26,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-9"></div>
|
<div class="col-md-9"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<mat-checkbox [(ngModel)]="tournament.active" name="active">
|
||||||
|
Actief
|
||||||
|
</mat-checkbox>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9"></div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label id="max-events-label">Max. aantal onderdelen per inschrijving</label>
|
<label id="max-events-label">Max. aantal onderdelen per inschrijving</label>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import nl from "@angular/common/locales/nl";
|
|||||||
import {TitleService} from "../../service/title.service";
|
import {TitleService} from "../../service/title.service";
|
||||||
import {NgxMaskDirective} from "ngx-mask";
|
import {NgxMaskDirective} from "ngx-mask";
|
||||||
import {MatSnackBar} from "@angular/material/snack-bar";
|
import {MatSnackBar} from "@angular/material/snack-bar";
|
||||||
|
import {MatCheckbox} from "@angular/material/checkbox";
|
||||||
|
|
||||||
registerLocaleData(nl);
|
registerLocaleData(nl);
|
||||||
|
|
||||||
@@ -34,7 +35,8 @@ registerLocaleData(nl);
|
|||||||
MatRadioButton,
|
MatRadioButton,
|
||||||
MatRadioGroup,
|
MatRadioGroup,
|
||||||
MatHint,
|
MatHint,
|
||||||
NgxMaskDirective
|
NgxMaskDirective,
|
||||||
|
MatCheckbox
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
CurrencyPipe
|
CurrencyPipe
|
||||||
@@ -92,4 +94,5 @@ export class TournamentEditComponent implements OnInit {
|
|||||||
this.tournament.costsPerEvent[number] = Number(value);
|
this.tournament.costsPerEvent[number] = Number(value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export class Tournament {
|
|||||||
maxEvents: number;
|
maxEvents: number;
|
||||||
costsPerEvent: number[] = [0, 0, 0];
|
costsPerEvent: number[] = [0, 0, 0];
|
||||||
courts: number;
|
courts: number;
|
||||||
|
active: boolean;
|
||||||
|
|
||||||
static getStatus(tournament: Tournament): string {
|
static getStatus(tournament: Tournament): string {
|
||||||
if (tournament.status == "CLOSED") return "Afgerond";
|
if (tournament.status == "CLOSED") return "Afgerond";
|
||||||
|
|||||||
Reference in New Issue
Block a user