Files
Virtnet.bond/storage/framework/views/d70c03f3986bfbef7bbbb52db709b7e5.php
Joseph.Rawlings 9e33470134 feat(proxmox): add statistics redirect component and route
Introduced a new Livewire component for statistics redirection and added a corresponding route to enhance navigation within the Proxmox extension. This update lays the groundwork for future statistics-related features.
2026-03-28 15:48:17 -04:00

98 lines
6.3 KiB
PHP

<?php
$audits = $record->audits;
// Also get the child audits
if (get_class($record) === 'App\Models\Product') {
$record->plans->each(function ($plan) use (&$audits) {
$audits = $audits->merge($plan->audits->map(function ($audit) use ($plan) {
$audit->event = 'Plan ' . $plan->name . ' ' . $audit->event;
return $audit;
}));
$plan->prices->each(function ($price) use (&$audits, $plan) {
$audits = $audits->merge($price->audits->map(function ($audit) use ($price, $plan) {
$audit->event = 'Price from Plan ' . $plan->name . ' ' . $audit->event;
return $audit;
}));
});
});
}
// sort
$audits = $audits->sortByDesc('created_at');
?>
<div class="flex flex-col h-full space-y-4">
<?php if (isset($component)) { $__componentOriginal30dbd75eb120a380110a2b340cd88f46 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal30dbd75eb120a380110a2b340cd88f46 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.grid.index','data' => ['class' => 'gap-4']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filament::grid'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'gap-4']); ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $audits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $audit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div
class="fi-in-repeatable-item block rounded-xl bg-white p-4 shadow-sm ring-1 ring-gray-950/5 dark:bg-white/5 dark:ring-white/10">
<div class="flex gap-x-3">
<div class="flex-grow space-y-2 pt-[6px]">
<div class="flex gap-x-2 items-center justify-between">
<div class="flex gap-x-2 items-center">
<div class="text-sm font-medium text-gray-950 dark:text-white">
<?php echo e($audit->user->name); ?>
</div>
<div class="text-xs text-gray-950 dark:text-white">
<?php echo e($audit->created_at->diffForHumans()); ?>
</div>
</div>
<div class="text-xs text-gray-950 dark:text-white">
<?php echo e($audit->created_at->format('Y-m-d H:i:s')); ?>
</div>
</div>
<div class="text-sm text-gray-950 dark:text-white">
<?php echo e($audit->event); ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(count($audit->getModified()) === 0): ?>
<span class="text-xs text-gray-950 dark:text-white">
(No changes)
</span>
<?php else: ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $audit->getModified(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="my-2 p-2 bg-background-secondary rounded">
<span class="font-semibold"><?php echo e($key); ?></span> changed from
<div class="flex flex-wrap items-center gap-2">
<span class="text-red-300 p-1 rounded">
<code><?php echo e($value['old'] ?? ''); ?></code>
</span>
<span class="font-medium">to</span>
<span class="text-green-300 p-1 rounded">
<code><?php echo e($value['new'] ?? ''); ?></code>
</span>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal30dbd75eb120a380110a2b340cd88f46)): ?>
<?php $attributes = $__attributesOriginal30dbd75eb120a380110a2b340cd88f46; ?>
<?php unset($__attributesOriginal30dbd75eb120a380110a2b340cd88f46); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal30dbd75eb120a380110a2b340cd88f46)): ?>
<?php $component = $__componentOriginal30dbd75eb120a380110a2b340cd88f46; ?>
<?php unset($__componentOriginal30dbd75eb120a380110a2b340cd88f46); ?>
<?php endif; ?>
</div>
<?php /**PATH C:\Users\Owner\Virtnet.bond\resources\views\admin\actions\audits.blade.php ENDPATH**/ ?>