feat(rep-create-form.component): Umschaltmöglichkeit für unbegrenzte Zeit hinzugefügt
This commit is contained in:
parent
712932a0e2
commit
7e05123fbf
@ -2,7 +2,7 @@
|
||||
<div class="dd-row input-row">
|
||||
<mat-form-field class="w40p">
|
||||
<mat-label>Geben Sie einen Datumsbereich ein</mat-label>
|
||||
<mat-date-range-input [formGroup]="range" [rangePicker]="picker" [disabled]="dateDisabled">
|
||||
<mat-date-range-input [formGroup]="range" [rangePicker]="picker" [disabled]="termless">
|
||||
<input matStartDate formControlName="start" placeholder="Start date">
|
||||
<input matEndDate formControlName="end" placeholder="End date">
|
||||
</mat-date-range-input>
|
||||
@ -17,6 +17,9 @@
|
||||
<mat-error>Ungültiges Enddatum</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-slide-toggle [(ngModel)]="termless" class="w20p">
|
||||
Unbefristet
|
||||
</mat-slide-toggle>
|
||||
<button mat-fab extended (click)="create()" class="w20p">
|
||||
<mat-icon>playlist_add</mat-icon>
|
||||
Erstellen
|
||||
|
||||
@ -13,6 +13,7 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { provideMomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import 'moment/locale/de';
|
||||
|
||||
@Component({
|
||||
@ -23,7 +24,7 @@ import 'moment/locale/de';
|
||||
{ provide: MAT_DATE_LOCALE, useValue: 'de-DE' },
|
||||
provideMomentDateAdapter()
|
||||
],
|
||||
imports: [MatFormFieldModule, MatDatepickerModule, FormsModule, ReactiveFormsModule, JsonPipe, MatButtonModule, MatIconModule, MatInputModule],
|
||||
imports: [MatFormFieldModule, MatDatepickerModule, FormsModule, ReactiveFormsModule, JsonPipe, MatButtonModule, MatIconModule, MatInputModule, MatSlideToggleModule],
|
||||
templateUrl: './rep-create-form.component.html',
|
||||
styleUrl: './rep-create-form.component.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
@ -41,7 +42,7 @@ export class RepCreateFormComponent implements OnInit {
|
||||
private readonly _locale = signal(inject<unknown>(MAT_DATE_LOCALE));
|
||||
private readonly _adapter = inject<DateAdapter<unknown, unknown>>(DateAdapter);
|
||||
private readonly _intl = inject(MatDatepickerIntl);
|
||||
dateDisabled: boolean = false;
|
||||
termless: boolean = false;
|
||||
|
||||
constructor() {
|
||||
const dialogData: { userRep: UserRep, afterCreation: (any: any) => any } = inject(MAT_DIALOG_DATA)
|
||||
|
||||
@ -67,6 +67,7 @@ code {
|
||||
|
||||
.input-row {
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.button-row {
|
||||
@ -76,7 +77,7 @@ code {
|
||||
|
||||
.dd-row mat-form-field {
|
||||
width: 100%;
|
||||
margin: 0 1rem 0 1rem;
|
||||
margin: 1rem 0rem 0rem 0rem;
|
||||
}
|
||||
|
||||
.dd-row mat-checkbox {
|
||||
@ -86,7 +87,8 @@ code {
|
||||
|
||||
.dd-row mat-slide-toggle {
|
||||
width: 100%;
|
||||
margin: 0 1rem 1rem 1rem;
|
||||
margin: 1rem 0rem 1rem 0rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dd-row button {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user