Skip to content

Commit

Permalink
Merge branch 'main' into change-beneficiary-id-with-ulid
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 authored Dec 17, 2024
2 parents d14e38f + 415911e commit 9ea1a10
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ class EditCommunityProfile extends EditRecord

protected static string $view = 'filament.organizations.pages.empty-page';

public function getBreadcrumbs(): array
{
return [];
}

public function getTitle(): string|Htmlable
{
return __('community.headings.empty_state_title');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ class ListCommunityProfiles extends ListRecords

protected static string $view = 'filament.organizations.pages.empty-page';

public function getBreadcrumbs(): array
{
return [];
}

public function getTitle(): string|Htmlable
{
return __('community.headings.empty_state_title');
Expand Down
14 changes: 12 additions & 2 deletions app/Filament/Organizations/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,18 @@ public static function getSchema(): array
->afterStateUpdated(self::setDefaultCaseAndNgoAdminPermissions()),

Placeholder::make('obs')
->content(new HtmlString(__('user.placeholders.obs')))
->label('')
->hiddenLabel()
->content(function (Get $get) {

foreach ($get('role_id') as $roleID) {
$role = self::getRole($roleID);
if ($role->case_permissions->contains(CasePermission::HAS_ACCESS_TO_ALL_CASES))
{
return new HtmlString(__('user.placeholders.user_role_with_permissions_for_all_cases'));
}
}
return new HtmlString(__('user.placeholders.user_role_without_permissions_for_all_cases'));
})
->columnSpanFull(),

Group::make()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ protected function getHeaderActions(): array
Actions\CreateAction::make(),
];
}

public function getBreadcrumbs(): array
{
return [];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,13 @@ public function infolist(Infolist $infolist): Infolist
->label(__('user.labels.phone_number')),

TextEntry::make('rolesInOrganization.name')
->label(__('user.labels.select_roles'))
->columnSpanFull(),

TextEntry::make('obs')
->default(
Str::of(__('user.placeholders.obs'))
->toHtmlString()
)
->hiddenLabel()
->columnSpanFull(),
->label(__('user.labels.select_roles')),

TextEntry::make('can_be_case_manager')
->label(__('user.labels.can_be_case_manager'))
->state(fn (User $record) => Ternary::tryFrom((int)$record->canBeCaseManager())),



Group::make()
->columnSpanFull()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('beneficiary_interventions', function (Blueprint $table) {
$table->dropColumn('start_date');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('beneficiary_interventions', function (Blueprint $table) {
//
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('intervention_services', function (Blueprint $table) {
$table->dropColumn('start_date');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('intervention_services', function (Blueprint $table) {
//
});
}
};
4 changes: 3 additions & 1 deletion lang/ro/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'case_permissions' => 'Permisiuni cazuri',
'admin_permissions' => 'Permisiuni administrare',
'last_login_at_date_time' => 'Data și ora ultimei accesări',
'can_be_case_manager' => 'Poate lua rol de manager de caz',
],

'stats' => [
Expand All @@ -52,7 +53,8 @@
],

'placeholders' => [
'obs' => 'Acest tip de utilizator <span class="italic">are acces doar la cazurile din echipa cărora face parte</span> și nu deține drepturi de administrare ale sistemului. Puteți oferi permisiuni suplimentare din lista de mai jos.',
'user_role_without_permissions_for_all_cases' => 'Acest tip de utilizator <span class="italic">are acces doar la cazurile din echipa cărora face parte</span> și nu deține drepturi de administrare ale sistemului. Puteți oferi permisiuni suplimentare din lista de mai jos.',
'user_role_with_permissions_for_all_cases' => 'Acest tip de rol are acces <span class="italic">la toate cazurile din cadrul Centrului</span>, însă nu deține drepturi de administrare ale sistemului. Puteți oferi permisiuni suplimentare din lista de mai jos.',
'dashboard_cart' => 'Distribuția pe luni a numărului total de utilizatori activi Sunrise. Un utilizator este considerat activ dacă a avut cel puțin o accesare a platformei în luna calendaristică respectivă.',
],

Expand Down

0 comments on commit 9ea1a10

Please sign in to comment.