feat(007): device config & compliance snapshot/restore improvements #9
@ -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<string, mixed> $payload
|
||||
* @param array<string, mixed> $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<string, mixed> $payload
|
||||
* @param array<int, string> $keys
|
||||
|
||||
@ -88,7 +88,6 @@
|
||||
{{ $item['compliance_action_warning'] }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! empty($item['compliance_action_summary']) && is_array($item['compliance_action_summary']))
|
||||
@php
|
||||
$summary = $item['compliance_action_summary'];
|
||||
|
||||
@ -106,6 +106,7 @@
|
||||
$assignmentsFetchFailed = $version->metadata['assignments_fetch_failed'] ?? false;
|
||||
$assignmentsFetchError = $version->metadata['assignments_fetch_error'] ?? null;
|
||||
@endphp
|
||||
|
||||
@if($assignmentsFetchFailed)
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
Assignments could not be fetched from Microsoft Graph.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user