Skip to content

Commit

Permalink
Social assistance
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Dec 4, 2024
1 parent 5c00df6 commit 9b9451f
Show file tree
Hide file tree
Showing 14 changed files with 970 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/Enums/CounselingSheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ enum CounselingSheet: string implements HasLabel

case PSYCHOLOGICAL_ASSISTANCE = 'psychological_assistance';
case LEGAL_ASSISTANCE = 'legal_assistance';
case SOCIAL_ASSISTANCE = 'social_assistance';

protected function labelKeyPrefix(): ?string
{
Expand Down
27 changes: 27 additions & 0 deletions app/Enums/FamilyRelationship.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace App\Enums;

use App\Concerns\Enums;
use Filament\Support\Contracts\HasLabel;

enum FamilyRelationship: string implements HasLabel
{
use Enums\HasLabel;
use Enums\Arrayable;
use Enums\Comparable;

case PARTNER = 'partner';
case MOTHER = 'mother';
case FATHER = 'father';
case SISTER = 'sister';
case BROTHER = 'brother';
case OTHER = 'other';

public function labelKeyPrefix(): ?string
{
return 'enum.family_relationship';
}
}
28 changes: 28 additions & 0 deletions app/Enums/HomeType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

namespace App\Enums;

use App\Concerns\Enums;
use Filament\Support\Contracts\HasLabel;

enum HomeType: string implements HasLabel
{
use Enums\HasLabel;
use Enums\Arrayable;
use Enums\Comparable;

case INDIVIDUAL_HOUSE = 'individual_house';
case BUILDING_WITH_MULTIPLE_HOUSES = 'building_with_multiple_houses';
case APARTMENT = 'apartment';
case STUDIO = 'studio';
case ROOM = 'room';
case SPACE_IN_BUILDING_WITH_NON_RESIDENTIAL_DESTINATION = 'space_in_building_with_non_residential_destination';
case OTHER = 'other';

public function labelKeyPrefix(): ?string
{
return 'enum.home_type';
}
}
25 changes: 25 additions & 0 deletions app/Enums/PaymentMethod.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

namespace App\Enums;

use App\Concerns\Enums;
use Filament\Support\Contracts\HasLabel;

enum PaymentMethod: string implements HasLabel
{
use Enums\HasLabel;
use Enums\Arrayable;
use Enums\Comparable;

case REPRESENTATIVE = 'representative';
case POSTAL_OFFICE = 'postal_office';
case BANK_ACCOUNT = 'bank_account';
case OTHER = 'other';

public function labelKeyPrefix(): ?string
{
return 'enum.payment_method';
}
}
27 changes: 27 additions & 0 deletions app/Enums/ProtectionMeasuringType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace App\Enums;

use App\Concerns\Enums;
use Filament\Support\Contracts\HasLabel;

enum ProtectionMeasuringType: string implements HasLabel
{
use Enums\HasLabel;
use Enums\Arrayable;
use Enums\Comparable;

case EMERGENCY_PLACEMENT = 'emergency_placement';
case PLACEMENT_IN_FAMILY = 'placement_in_family';
case PLACEMENT_AT_FOSTER_CARE = 'placement_at_foster_care';
case PLACEMENT_IN_RESIDENTIAL_CARE_SERVICE = 'placement_in_residential_care_service';
case SPECIALIZED_SUPERVISION = 'specialized_supervision';
case OTHER = 'other';

public function labelKeyPrefix(): ?string
{
return 'enum.protection_measuring_type';
}
}
25 changes: 25 additions & 0 deletions app/Enums/SocialRelationship.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

namespace App\Enums;

use App\Concerns\Enums;
use Filament\Support\Contracts\HasLabel;

enum SocialRelationship: string implements HasLabel
{
use Enums\HasLabel;
use Enums\Arrayable;
use Enums\Comparable;

case FRIEND = 'friend';
case COWORKER = 'coworker';
case SUPPORT_GROUP = 'support_group';
case OTHER = 'other';

public function labelKeyPrefix(): ?string
{
return 'enum.social_relationship';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public function infolist(Infolist $infolist): Infolist
return EditCounselingSheet::getSchemaForPsychologicalAssistance();
}

if (CounselingSheet::isValue($counselingSheet, CounselingSheet::SOCIAL_ASSISTANCE)) {
return EditCounselingSheet::getSchemaForSocialAssistance();
}

return [];
})
->disabledForm()
Expand All @@ -90,7 +94,7 @@ protected function hasInfolist(): bool
protected function getFooterWidgets(): array
{
return [
InterventionsWidget::class
InterventionsWidget::class,
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function getFormSchema(): array

RichEditor::make('observations')
->label(__('intervention_plan.labels.result_observations'))
->placeholder(__('intervention_plan.placeholders.observations')),
->placeholder(__('intervention_plan.placeholders.result_observations')),
];
}

Expand Down
Loading

0 comments on commit 9b9451f

Please sign in to comment.