diff --git a/app/Services/Intune/RestoreService.php b/app/Services/Intune/RestoreService.php index 7735824..04d729c 100644 --- a/app/Services/Intune/RestoreService.php +++ b/app/Services/Intune/RestoreService.php @@ -1702,6 +1702,24 @@ private function buildSettingsCatalogCreatePayload( return $payload; } + private function prefixRestoredName(?string $name, string $fallback): string + { + $prefix = 'Restored_'; + $base = trim((string) ($name ?? $fallback)); + + if ($base === '') { + $base = $fallback; + } + + $normalized = strtolower($base); + + if (str_starts_with($normalized, 'restored_') || str_starts_with($normalized, 'restored ')) { + return $base; + } + + return $prefix.$base; + } + /** * @param array $payload * @param array $originalPayload @@ -1759,24 +1777,6 @@ private function applyOdataTypeForCreate(string $policyType, array $payload, arr return $payload; } - private function prefixRestoredName(?string $name, string $fallback): string - { - $prefix = 'Restored_'; - $base = trim((string) ($name ?? $fallback)); - - if ($base === '') { - $base = $fallback; - } - - $normalized = strtolower($base); - - if (str_starts_with($normalized, 'restored_') || str_starts_with($normalized, 'restored ')) { - return $base; - } - - return $prefix.$base; - } - /** * @param array $payload * @param array $keys diff --git a/resources/views/filament/infolists/entries/restore-preview.blade.php b/resources/views/filament/infolists/entries/restore-preview.blade.php index ca25216..49676ce 100644 --- a/resources/views/filament/infolists/entries/restore-preview.blade.php +++ b/resources/views/filament/infolists/entries/restore-preview.blade.php @@ -88,7 +88,6 @@ {{ $item['compliance_action_warning'] }} @endif - @if (! empty($item['compliance_action_summary']) && is_array($item['compliance_action_summary'])) @php $summary = $item['compliance_action_summary']; diff --git a/resources/views/livewire/policy-version-assignments-widget.blade.php b/resources/views/livewire/policy-version-assignments-widget.blade.php index fd8466a..2f7e0b7 100644 --- a/resources/views/livewire/policy-version-assignments-widget.blade.php +++ b/resources/views/livewire/policy-version-assignments-widget.blade.php @@ -106,6 +106,7 @@ $assignmentsFetchFailed = $version->metadata['assignments_fetch_failed'] ?? false; $assignmentsFetchError = $version->metadata['assignments_fetch_error'] ?? null; @endphp + @if($assignmentsFetchFailed)

Assignments could not be fetched from Microsoft Graph.