Files
keyvault/client/src/app/modules/keys/create/create.component.html
Bastian Wagner 92f0c10bd8 Lost Keys
2025-01-03 13:39:47 +01:00

49 lines
1.8 KiB
HTML

<h2 mat-dialog-title>Neuen Schlüssel anlegen</h2>
<mat-dialog-content>
<form [formGroup]="createForm" class="flex flex-col gap-3">
<mat-form-field>
<mat-label>Name</mat-label>
<input type="text" matInput formControlName="name" maxlength="100">
@if ((createForm.controls.name.value || '').length > 20) {
<mat-hint>{{ (createForm.controls.name.value || '').length }} / 100 Zeichen</mat-hint>
} @else {
<mat-hint>Wie soll der Schlüssel heißen?</mat-hint>
}
</mat-form-field>
<div class="flex items-center gap-6">
<mat-form-field class="flex-auto">
<mat-label>Schlüsselnummer</mat-label>
<input type="text" matInput formControlName="nr" maxlength="100">
<mat-hint>Nummer auf dem Schlüssel</mat-hint>
</mat-form-field>
<div>
<mat-checkbox formControlName="digital" style="margin-bottom: 12px;">Schlüsselkarte</mat-checkbox>
</div>
</div>
<div class="flex items-center gap-3">
<mat-form-field class="flex-auto">
<mat-label>Schließzylinder</mat-label>
<mat-select formControlName="cylinder" multiple>
@for (item of cylinders; track $index) {
<mat-option [value]="item">{{ item.name }}</mat-option>
}
</mat-select>
<mat-hint>Wo sperrt der Schlüssel?</mat-hint>
</mat-form-field>
<button mat-icon-button (click)="openSelectMultipleCylinders()" style="margin-bottom: 12px;">
<mat-icon>open_in_new</mat-icon>
</button>
</div>
</form>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button mat-dialog-close color="warn">Abbrechen</button>
<button (click)="save()" [disabled]="createForm.disabled || createForm.invalid" mat-raised-button color="accent">
<mat-icon>save</mat-icon>
Speichern
</button>
</mat-dialog-actions>