update P15

This commit is contained in:
2026-04-01 12:44:52 +08:00
parent 73309d7890
commit 7c83fa4664
4 changed files with 206 additions and 4 deletions
@@ -287,7 +287,7 @@ class DataScopeController extends AbstractController
? Company::query()->whereIn('id', $company_ids)->pluck('label', 'id')->toArray()
: [];
$platform_names = !empty($platform_ids)
? Platform::query()->whereIn('id', $platform_ids)->pluck('id', 'id')->toArray()
? Platform::query()->whereIn('id', $platform_ids)->pluck('name', 'id')->toArray()
: [];
$store_names = !empty($store_ids)
? Store::query()->whereIn('id', $store_ids)->pluck('label', 'id')->toArray()
@@ -297,7 +297,7 @@ class DataScopeController extends AbstractController
return array_map(function (array $scope) use ($company_names, $platform_names, $store_names): array {
$name = match ($scope['scope_type']) {
'company' => $company_names[$scope['scope_id']] ?? null,
'platform' => isset($platform_names[$scope['scope_id']]) ? "Platform #{$scope['scope_id']}" : null,
'platform' => $platform_names[$scope['scope_id']] ?? null,
'store' => $store_names[$scope['scope_id']] ?? null,
default => null,
};