feat: support multiple vehicle category scopes selection in hse master simper types

This commit is contained in:
Ray1111-aa
2026-10-25 23:21:22 +07:00
parent 01152a4260
commit 58f1801810
8 changed files with 594 additions and 128 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class Employee extends Model
{
$simpers = $this->relationLoaded('simpers') ? $this->simpers : $this->simpers()->with('simperType')->get();
foreach ($simpers as $s) {
if ($s->simperType && $s->simperType->category_scope === $scope && $s->isValid()) {
if ($s->simperType && $s->simperType->coversScope($scope) && $s->isValid()) {
return true;
}
}