@if (loading()) {

Caricamento magazzino…

} @else if (loadError(); as message) { } @else { @if (formAperto()) {

{{ voceInModificaId() ? 'Modifica voce' : 'Nuova voce di magazzino' }}

@if (materialeSelezionato(); as materiale) {

Materiale: {{ materiale.nome }}

} @else {
@if (risultatiRicerca().length > 0) {
    @for (materiale of risultatiRicerca(); track materiale.id) {
  • {{ materiale.nome }} ({{ materiale.categoria }})
  • }
} @else if (nessunRisultato()) {

Nessun materiale trovato per "{{ ricerca.value }}".

} } @if (materialeErrore(); as message) { }
@if (form.controls.quantitaPosseduta.hasError('required')) {

La quantità è obbligatoria.

} @else if (form.controls.quantitaPosseduta.hasError('min')) {

La quantità non può essere negativa.

}
@if (salvataggioErrore(); as message) { }
} @if (voci().length === 0) {

Nessuna voce in magazzino.

} @else {
@if (vista() === 'lista') {
@for (lettera of lettereDisponibili(); track lettera) { }
@if (vociFiltrate().length === 0) {

Nessun materiale che inizia per "{{ letteraSelezionata() }}".

} @else { @for (voce of vociFiltrate(); track voce.id) { }
Materiale Quantità Stato Posizione Note
{{ voce.materialeNome }} {{ voce.quantitaPosseduta }} {{ statoLabel(voce.stato) }} {{ voce.posizione ?? '—' }} {{ voce.note ?? '—' }}
} } @else {
@for (gruppo of gruppiPerPosizione(); track gruppo.posizione) {
{{ gruppo.posizione }}
{{ gruppo.voci.length }} material{{ gruppo.voci.length === 1 ? 'e' : 'i' }}
    @for (voce of gruppo.voci; track voce.id) {
  • {{ voce.materialeNome }} × {{ voce.quantitaPosseduta }}
    {{ statoLabel(voce.stato) }}
  • }
}
}
} }