add admin interface, angular migration
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<h2 mat-dialog-title>{{ isEditMode ? ('admin.quotas.edit_quota' | i18n) : ('admin.quotas.create_quota' | i18n) }}</h2>
|
||||
|
||||
<mat-dialog-content>
|
||||
<form [formGroup]="quotaForm">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>{{'admin.quotas.name' | i18n}}</mat-label>
|
||||
<input matInput formControlName="name" required>
|
||||
@if (quotaForm.get('name').hasError('required')) {
|
||||
<mat-error>
|
||||
{{'admin.quotas.name_required' | i18n}}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>{{'admin.quotas.value' | i18n}}</mat-label>
|
||||
<input matInput type="number" formControlName="value" required>
|
||||
@if (quotaForm.get('value').hasError('required')) {
|
||||
<mat-error>
|
||||
{{'admin.quotas.value_required' | i18n}}
|
||||
</mat-error>
|
||||
}
|
||||
@if (quotaForm.get('value').hasError('min')) {
|
||||
<mat-error>
|
||||
{{'admin.quotas.value_min' | i18n}}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>{{'admin.quotas.unit' | i18n}}</mat-label>
|
||||
<input matInput formControlName="unit">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox formControlName="disposable">
|
||||
{{'admin.quotas.disposable' | i18n}}
|
||||
</mat-checkbox>
|
||||
</form>
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button (click)="cancel()">{{'admin.cancel' | i18n}}</button>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!quotaForm.valid">
|
||||
{{ (isEditMode ? 'admin.save' : 'admin.create') | i18n }}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
Reference in New Issue
Block a user