Skip to content

Commit 719300a

Browse files
committed
Update UserResource.php
1 parent fc05f96 commit 719300a

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

packages/user/src/Resources/UserResource.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
use Moox\Core\Traits\Base\BaseInResource;
2525
use Moox\Core\Traits\Tabs\TabsInResource;
2626
use Moox\Security\FilamentActions\Passwords\SendPasswordResetLinksBulkAction;
27-
use Moox\Sync\Models\Platform;
28-
use Moox\Sync\Services\PlatformRelationService;
2927
use Moox\User\Models\User;
3028
use Moox\User\Resources\UserResource\Pages\CreateUser;
3129
use Moox\User\Resources\UserResource\Pages\EditUser;
@@ -86,38 +84,6 @@ public static function form(Form $form): Form
8684
'lg' => 12,
8785
]),
8886

89-
/* Must be provided by Sync, use a static maybe?
90-
Select::make('platforms')
91-
->label('Platforms')
92-
->multiple()
93-
->options(function () {
94-
return Platform::pluck('name', 'id')->toArray();
95-
})
96-
->afterStateHydrated(function ($component, $state, $record) {
97-
if ($record && class_exists(PlatformRelationService::class)) {
98-
$platformService = app(PlatformRelationService::class);
99-
$platforms = $platformService->getPlatformsForModel($record);
100-
$component->state($platforms->pluck('id')->toArray());
101-
}
102-
})
103-
->dehydrated(false)
104-
->reactive()
105-
->afterStateUpdated(function ($state, callable $set, $record) {
106-
if ($record && class_exists(PlatformRelationService::class)) {
107-
$platformService = app(PlatformRelationService::class);
108-
$platformService->syncPlatformsForModel($record, $state ?? []);
109-
}
110-
})
111-
->preload()
112-
->searchable()
113-
->visible(fn () => class_exists(Platform::class))
114-
->columnSpan([
115-
'default' => 12,
116-
'md' => 12,
117-
'lg' => 12,
118-
]),
119-
*/
120-
12187
Select::make('gender')
12288
->label(__('core::user.gender'))
12389
->rules(['in:unknown,male,female,other'])

0 commit comments

Comments
 (0)