Skip to content

Commit

Permalink
Merge pull request #435 from code4romania/423-include-inactiv-status-…
Browse files Browse the repository at this point in the history
…for-cases

Beneficiary status inactive
  • Loading branch information
gheorghelupu17 authored Dec 20, 2024
2 parents 43ca6d0 + 5d7cf14 commit 44c8f10
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/Enums/CaseStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum CaseStatus: string implements HasLabel, HasColor

case ACTIVE = 'active';
case MONITORED = 'monitored';
case INACTIVE = 'inactive';
case CLOSED = 'closed';
case ARCHIVED = 'archived';

Expand All @@ -30,7 +31,7 @@ public function getColor(): string|array|null
return match ($this) {
self::ACTIVE => Color::Green,
self::MONITORED => Color::Yellow,
self::CLOSED => Color::Gray,
self::CLOSED, self::INACTIVE => Color::Gray,
self::ARCHIVED => Color::Purple,
default => Color::Red,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use App\Enums\CaseStatus;
use App\Enums\Ternary;
use App\Filament\Organizations\Resources\BeneficiaryResource;
use App\Filament\Organizations\Resources\BeneficiaryResource\Actions\ChangeStatus;
use App\Filament\Organizations\Resources\BeneficiaryResource\Actions\ViewDetailsAction;
use App\Filament\Organizations\Resources\BeneficiaryResource\Widgets\CaseTeamListWidget;
use App\Filament\Organizations\Resources\BeneficiaryResource\Widgets\CloseFileWidget;
Expand Down Expand Up @@ -86,10 +87,11 @@ protected function getHeaderActions(): array
ActionGroup::make([])
->dropdown(false)
->actions([
BeneficiaryResource\Actions\ChangeStatus::make('active'),
BeneficiaryResource\Actions\ChangeStatus::make('monitored'),
BeneficiaryResource\Actions\ChangeStatus::make('closed'),
BeneficiaryResource\Actions\ChangeStatus::make('archived'),
ChangeStatus::make('active'),
ChangeStatus::make('monitored'),
ChangeStatus::make('inactive'),
ChangeStatus::make('closed'),
ChangeStatus::make('archived'),
]),

ActionGroup::make([])
Expand Down
2 changes: 2 additions & 0 deletions lang/ro/beneficiary.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@
'status' => [
'active' => 'Deschis',
'monitored' => 'Monitorizare',
'inactive' => 'Inactiv',
'closed' => 'Închis',
'archived' => 'Arhivat',
],
Expand All @@ -476,6 +477,7 @@
'case_actions' => 'Acțiuni caz',
'active' => 'Redeschide caz (dosar curent)',
'monitored' => 'Mută în monitorizare ',
'inactive' => 'Inactivează caz',
'closed' => 'Închide caz',
'archived' => 'Arhivează caz',
'reactivate' => 'Reactivează caz (dosar nou)',
Expand Down

0 comments on commit 44c8f10

Please sign in to comment.