diff --git a/app/Filament/Organizations/Pages/ReportsPage.php b/app/Filament/Organizations/Pages/ReportsPage.php index a1497c3c..52de903c 100644 --- a/app/Filament/Organizations/Pages/ReportsPage.php +++ b/app/Filament/Organizations/Pages/ReportsPage.php @@ -21,10 +21,6 @@ use Filament\Pages\Page; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\View\View; -use Illuminate\Support\Arr; -use Illuminate\Support\Facades\Blade; -use Illuminate\Support\HtmlString; -use function Filament\Support\get_color_css_variables; class ReportsPage extends Page implements Forms\Contracts\HasForms, HasInfolists { @@ -82,70 +78,47 @@ protected function getFormSchema(): array { return [ Forms\Components\Section::make() - ->columns(4) + ->columns(12) ->schema([ Select::make('report_type') ->key('report_type') ->label(__('report.labels.report_type')) - ->columnSpan(2) + ->columnSpan(6) ->options(ReportType::options()) ->searchable(), DatePicker::make('start_date') ->label(__('report.labels.start_date')) ->default(now()->startOfMonth()) + ->columnSpan(3) ->maxDate(fn (Get $get) => $get('end_date') ? $get('end_date') : now()) ->live(), DatePicker::make('end_date') ->label(__('report.labels.end_date')) ->default(now()) + ->columnSpan(3) ->minDate(fn (Get $get) => $get('start_date') ?? null) ->maxDate(now()) ->live(), Checkbox::make('add_cases_in_monitoring') - ->label(function () { - $icon = 'heroicon-o-information-circle'; - - $iconClasses = Arr::toCssClasses([ - 'fi-in-text-item-icon h-5 w-5 shrink-0', - 'text-custom-500', - ]); - - $iconColor = 'grey'; - $iconStyles = Arr::toCssStyles([ - get_color_css_variables($iconColor, shades: [500]) => $iconColor !== 'gray', - ]); - - $label = Blade::render(' -
-
- {{ $label }} -
- - - -
', [ - 'helper' => __('report.helpers.add_cases_in_monitoring'), - 'label' => __('report.labels.add_cases_in_monitoring'), - 'icon' => $icon, - 'iconClasses' => $iconClasses, - 'iconStyles' => $iconStyles, - ]); - - return new HtmlString($label); - }) - ->columnSpan(2), + ->hintIcon('heroicon-o-information-circle', __('report.helpers.add_cases_in_monitoring')) + ->hintColor('black') + ->columnSpan(2) + ->extraAttributes([ + 'class' => 'justify-start', + ]) + ->label(__('report.labels.add_cases_in_monitoring')) + ->default(true), Checkbox::make('show_missing_values') ->label(__('report.labels.show_missing_values')) ->default(true) - ->columnSpan(2), + ->extraAttributes([ + 'class' => 'ml-16' + ]) + ->columnSpan(4), ]), ]; } diff --git a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileDetails.php b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileDetails.php index 17758a2c..be25ad76 100644 --- a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileDetails.php +++ b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileDetails.php @@ -61,11 +61,6 @@ public static function getSchema(?Beneficiary $recordParam = null): array ->label(__('beneficiary.section.close_file.labels.date')) ->required(), - TextInput::make('number') - ->label(__('beneficiary.section.close_file.labels.number')) - ->maxLength(50) - ->required(), - DatePicker::make('admittance_date') ->label(__('beneficiary.section.close_file.labels.admittance_date')) ->required(), diff --git a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileGeneralDetails.php b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileGeneralDetails.php index 3ed5c12a..ce51bc7d 100644 --- a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileGeneralDetails.php +++ b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/EditCloseFileGeneralDetails.php @@ -92,7 +92,7 @@ public static function getSchema(): array RichEditor::make('close_situation') ->label(__('beneficiary.section.close_file.labels.close_situation')) - ->placeholder(__('beneficiary.section.close_file.placeholder.close_situation'))->columnSpanFull() + ->placeholder(__('beneficiary.section.close_file.placeholders.close_situation'))->columnSpanFull() ->maxLength(2500), ]; diff --git a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php index c21af740..7bcbcc9d 100644 --- a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php +++ b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php @@ -79,10 +79,6 @@ public function infolist(Infolist $infolist): Infolist ->schema([ DateEntry::make('date') ->label(__('beneficiary.section.close_file.labels.date')), - - TextEntry::make('number') - ->label(__('beneficiary.section.close_file.labels.number')), - DateEntry::make('admittance_date') ->label(__('beneficiary.section.close_file.labels.admittance_date')), diff --git a/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/EditMonthlyPlanServicesAndInterventions.php b/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/EditMonthlyPlanServicesAndInterventions.php index b65fb475..08f604b5 100644 --- a/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/EditMonthlyPlanServicesAndInterventions.php +++ b/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/EditMonthlyPlanServicesAndInterventions.php @@ -19,6 +19,7 @@ use Filament\Forms\Components\Actions\Action; use Filament\Forms\Components\Grid; use Filament\Forms\Components\Placeholder; +use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\Section; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; @@ -190,8 +191,8 @@ function (Get $get, ?int $state) { ->maxLength(200), ]), - Textarea::make('service_details') - ->label(__('intervention_plan.labels.service_details')) + RichEditor::make('service_details') + ->label(__('intervention_plan.labels.intervention_details')) ->placeholder(__('intervention_plan.placeholders.service_details')), ]), ]; diff --git a/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/ViewMonthlyPlan.php b/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/ViewMonthlyPlan.php index 34936468..8be6e2c3 100644 --- a/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/ViewMonthlyPlan.php +++ b/app/Filament/Organizations/Resources/MonthlyPlanResource/Pages/ViewMonthlyPlan.php @@ -190,7 +190,7 @@ public function infolist(Infolist $infolist): Infolist ]), TextEntry::make('service_details') - ->label(__('intervention_plan.labels.service_details')) + ->label(__('intervention_plan.labels.intervention_details')) ->columnSpanFull(), ]), ]), diff --git a/app/Models/CloseFile.php b/app/Models/CloseFile.php index e9ed2064..f42d4ec0 100644 --- a/app/Models/CloseFile.php +++ b/app/Models/CloseFile.php @@ -21,7 +21,6 @@ class CloseFile extends Model protected $fillable = [ 'date', - 'number', 'admittance_date', 'exit_date', 'specialist_id', diff --git a/database/factories/CloseFileFactory.php b/database/factories/CloseFileFactory.php index 2d0d52b6..5bcce545 100644 --- a/database/factories/CloseFileFactory.php +++ b/database/factories/CloseFileFactory.php @@ -24,7 +24,6 @@ public function definition(): array return [ 'date' => $this->faker->date(), - 'number' => $this->faker->randomNumber(), 'admittance_date' => $this->faker->date(), 'exit_date' => $this->faker->date(), 'admittance_reason' => $this->faker->randomElements(AdmittanceReason::values(), rand(0, 5)), diff --git a/database/migrations/2024_10_09_183227_create_close_files_table.php b/database/migrations/2024_10_09_183227_create_close_files_table.php index 190006a1..7e8069c7 100644 --- a/database/migrations/2024_10_09_183227_create_close_files_table.php +++ b/database/migrations/2024_10_09_183227_create_close_files_table.php @@ -20,7 +20,6 @@ public function up(): void $table->foreignIdFor(Beneficiary::class)->constrained()->cascadeOnDelete(); $table->foreignIdFor(Specialist::class)->nullable()->constrained()->cascadeOnDelete(); $table->date('date')->nullable(); - $table->string('number')->nullable(); $table->date('admittance_date')->nullable(); $table->date('exit_date')->nullable(); $table->string('admittance_reason')->nullable(); diff --git a/lang/ro/beneficiary.php b/lang/ro/beneficiary.php index 2b3e298d..d1b48ec3 100644 --- a/lang/ro/beneficiary.php +++ b/lang/ro/beneficiary.php @@ -423,9 +423,9 @@ 'admittance_reason' => 'Motivul admiterii în Centru', 'admittance_details' => 'Detalii motiv admitere', 'close_method' => 'Modalitatea de închidere a cazului', - 'institution_name' => 'Numele instituției', - 'beneficiary_request' => 'Descrie motivul beneficiarei', - 'other_details' => 'Descrie altă situație', + 'institution_name' => 'Specificǎ instituția/serviciul unde s-a realizat transferul', + 'beneficiary_request' => 'Specificǎ motivul beneficiarei', + 'other_details' => 'Specificǎ altă situație', 'close_situation' => 'Situația cazului la închidere', 'close_date' => 'Închis la data', 'close_method_widget' => 'Modalitatea de închidere', @@ -440,9 +440,10 @@ ], 'placeholders' => [ 'admittance_details' => 'Adaugă detalii referitoare la motivul admiterii', - 'institution_name' => 'Adaugă numele instituției la care s-a transferat beneficiara', + 'institution_name' => 'Introdu instituția/serviciului', 'add_details' => 'Adaugă detalii', 'close_situation' => 'Descrieți situația cazului la închidere', + '', ], 'notifications' => [ diff --git a/lang/ro/intervention_plan.php b/lang/ro/intervention_plan.php index d7d825e8..f56c311a 100644 --- a/lang/ro/intervention_plan.php +++ b/lang/ro/intervention_plan.php @@ -174,6 +174,7 @@ 'actions' => 'Acțiuni', 'selected_interval' => 'Interval selectat', 'service_details' => 'Detalii acordare serviciu', + 'intervention_details' => 'Detalii acordare intervenții', ], 'headings' => [ @@ -334,8 +335,6 @@ 'add_details' => 'Adaugă detalii', 'select_age' => 'Alege un an', - - ], ],