55use Filament \Actions \BulkAction ;
66use Filament \Forms \Components \Select ;
77use Filament \Notifications \Notification ;
8- use Illuminate \Support \Facades \Auth ;
9- use Illuminate \Database \Eloquent \Collection ;
108use Illuminate \Database \Eloquent \Builder ;
9+ use Illuminate \Database \Eloquent \Collection ;
1110use Illuminate \Database \Eloquent \Model ;
11+ use Illuminate \Support \Facades \Auth ;
1212use Illuminate \Support \Facades \Schema ;
13+ use Moox \Core \Models \Scope ;
1314use Moox \Core \Services \ScopeAssignmentValidator ;
1415use Moox \Core \Services \ScopeRegistry ;
1516use Moox \Core \Support \Resources \ScopedResourceContext ;
16- use Moox \Core \Support \Scopes \ScopeValue ;
1717
1818trait HasScopedChildResource
1919{
@@ -91,6 +91,7 @@ public static function getAssignScopeBulkAction(string $name = 'assignScope'): B
9191 foreach ($ records as $ record ) {
9292 if (! method_exists ($ record , 'assignScope ' )) {
9393 $ skippedCount ++;
94+
9495 continue ;
9596 }
9697
@@ -101,6 +102,7 @@ public static function getAssignScopeBulkAction(string $name = 'assignScope'): B
101102 $ validation = $ validator ->validate ($ record , $ targetScope , $ actor );
102103 if (! ($ validation ['allowed ' ] ?? false )) {
103104 $ skippedCount ++;
105+
104106 continue ;
105107 }
106108
@@ -151,7 +153,7 @@ protected static function getAssignableScopeOptions(): array
151153 }
152154
153155 /** @var array<string, array{scope: string, label: string|null, source: string, context: string, boundary: string}> $rows */
154- $ rows = \ Moox \ Core \ Models \ Scope::query ()
156+ $ rows = Scope::query ()
155157 ->where ('origin ' , $ origin )
156158 ->where ('is_active ' , true )
157159 ->orderByRaw ('label is null, label asc, scope asc ' )
0 commit comments