TenantAtlas/apps/platform/patch_view.php
ahmido 3aeb0d04b8 Auto: 266-tenant-dashboard-productization-v1 → platform-dev (#322)
Automated PR created by Copilot per user request. Branch pushed: 266-tenant-dashboard-productization-v1

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #322
2026-05-03 14:03:46 +00:00

34 lines
1.4 KiB
PHP

<?php
$content = file_get_contents('/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/resources/views/filament/widgets/dashboard/tenant-dashboard-overview.blade.php');
$startMarker = '<x-filament::section>';
$gridMarker = '<div class="grid min-w-0 gap-6 xl:grid-cols-[minmax(0,1.65fr)_minmax(20rem,1fr)]">';
$posStart = strpos($content, $startMarker);
$posGrid = strpos($content, $gridMarker);
if ($posStart !== false && $posGrid !== false) {
// We want to remove everything from $startMarker up to (but not including) $gridMarker
// And replace it with our main grid start
$header = substr($content, 0, $posStart);
$newStart = '<div class="grid min-w-0 gap-6 xl:grid-cols-12">
<!-- Left Column (Main) -->
<div class="flex min-w-0 flex-col gap-6 xl:col-span-8">';
$remaining = substr($content, $posGrid + strlen($gridMarker));
// We also need to change the split for the right column.
// The left column ends and the right column starts somewhere.
// Let's find "<!-- Right Column (Aside) -->" or where the left div ends.
$newContent = $header . $newStart . $remaining;
file_put_contents('/Users/ahmeddarrazi/Documents/projects/wt-plattform/apps/platform/resources/views/filament/widgets/dashboard/tenant-dashboard-overview.blade.php', $newContent);
echo "Replaced top section\n";
} else {
echo "Markers not found\n";
}