Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social assistance #368

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading