++ fix prioritario display and add link sent toggle

This commit is contained in:
2026-04-13 15:40:35 +00:00
parent 0553d4ef74
commit 6a65087449
10 changed files with 459 additions and 108 deletions

View File

@@ -18,9 +18,12 @@ class CampagnaShow extends Component
public function render()
{
// All assignments with returned_at in campaign range that were counted
$conteggiate = Assegnazione::where('campagna_id', $this->campagna->id)
// Assignments counted for this campaign:
// - assigned on or after campaign start
// - linked to this campaign (campaign_id), regardless of returned_at (retroactive returns allowed)
$conteggiate = Assegnazione::where('campaign_id', $this->campagna->id)
->where('counted_in_campaign', true)
->where('assigned_at', '>=', $this->campagna->start_date)
->with(['territorio', 'proclamatore'])
->orderBy('returned_at')
->get();