++ gruppo: i pulsanti per aggiungere territori e membri non restano disabilitati
Il conteggio delle spunte arrivava al server solo al clic: il pulsante restava disabilitato. Ora e' sempre attivo e senza spunte avvisa. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,11 @@ class GruppoShow extends Component
|
||||
public function aggiungiMembri(): void
|
||||
{
|
||||
$ids = array_map('intval', $this->nuoviMembri);
|
||||
if ($ids === []) {
|
||||
$this->avvisaErrore('Spunta almeno un proclamatore.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->esegui(fn () => $this->servizio()->aggiungiMembri($this->gruppo, $ids), count($ids) . ' membri aggiunti.');
|
||||
$this->nuoviMembri = [];
|
||||
}
|
||||
@@ -77,6 +82,11 @@ class GruppoShow extends Component
|
||||
public function aggiungiTerritori(): void
|
||||
{
|
||||
$ids = array_map('intval', $this->nuoviTerritori);
|
||||
if ($ids === []) {
|
||||
$this->avvisaErrore('Spunta almeno un territorio.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->esegui(fn () => $this->servizio()->aggiungiAlPacchetto($this->gruppo, $ids), count($ids) . ' territori aggiunti al pacchetto.');
|
||||
$this->nuoviTerritori = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user