designed full screen mode for production quantity chart
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user