designed full screen mode for production quantity chart

This commit is contained in:
dhanabalan
2025-04-21 19:47:13 +05:30
parent 7d3ae71b20
commit 12d3ef3d20
3 changed files with 73 additions and 12 deletions

View File

@@ -11,11 +11,62 @@ use Filament\Facades\Filament;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\CreateRecord;
use Livewire\Livewire;
use Route;
class CreateProductionQuantity extends CreateRecord
{
protected static string $resource = ProductionQuantityResource::class;
// public function getTitle(): string
// {
// return 'Create'; // This should display in the breadcrumb as "Production Quantities > Create"
// }
// Hide only the big H1 heading on the page
public function getHeading(): string
{
return '';
}
public function boot(): void
{
Filament::registerRenderHook(
'panels::body.start',
function () {
if (str_contains(Route::currentRouteName(), 'filament.admin.resources.production-quantities')) {
echo <<<HTML
<style>
/* Hide sidebar and topbar */
.fi-sidebar,
.fi-topbar {
display: none !important;
}
/* Expand main container to full screen */
.fi-main {
margin: 0 !important;
padding: 0 !important;
height: 100vh;
overflow-y: auto; /* Allow vertical scrolling */
}
/* Expand page area fully */
.fi-main > .fi-page {
padding: 0 !important;
max-width: 100% !important;
}
/* Allow scroll on body again */
body {
overflow: auto;
}
</style>
HTML;
}
}
);
}
protected function getFooterWidgets(): array
{
return [
@@ -35,9 +86,10 @@ class CreateProductionQuantity extends CreateRecord
public function getFormActions(): array
{
// return parent::getFormActions(); //return [];
return [
$this->getCancelFormAction(),
];
// return [
// $this->getCancelFormAction(),
// ];
return [];
}
public function processAllValues($formData)