feat(web): update quality print advanced and base
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 22s
Build, Test and Deploy / build-and-push (push) Successful in 21s
Build, Test and Deploy / deploy (push) Successful in 5s

This commit is contained in:
2026-02-06 13:58:23 +01:00
parent f3d271ded2
commit debf153f58
5 changed files with 48 additions and 16 deletions

View File

@@ -2,14 +2,14 @@
@if (label()) { <label [for]="id()">{{ label() }}</label> }
<select
[id]="id()"
[value]="value"
(change)="onSelect($event)"
[ngModel]="value"
(ngModelChange)="onModelChange($event)"
(blur)="onTouched()"
[disabled]="disabled"
class="form-control"
>
@for (opt of options(); track opt.value) {
<option [value]="opt.value">{{ opt.label }}</option>
@for (opt of options(); track opt.label) {
<option [ngValue]="opt.value">{{ opt.label }}</option>
}
</select>
@if (error()) { <span class="error-text">{{ error() }}</span> }

View File

@@ -1,11 +1,11 @@
import { Component, input, output, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
@Component({
selector: 'app-select',
standalone: true,
imports: [CommonModule, ReactiveFormsModule],
imports: [CommonModule, ReactiveFormsModule, FormsModule],
providers: [
{
provide: NG_VALUE_ACCESSOR,
@@ -33,9 +33,8 @@ export class AppSelectComponent implements ControlValueAccessor {
registerOnTouched(fn: any): void { this.onTouched = fn; }
setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; }
onSelect(event: Event) {
const val = (event.target as HTMLSelectElement).value;
this.value = val;
this.onChange(val);
onModelChange(val: any) {
this.value = val;
this.onChange(val);
}
}