A free open source IT asset/license management system
Fixed page column width
snipe96bb2c68107d
diff --git a/app/Livewire/CheckoutTargetPanel.php b/app/Livewire/CheckoutTargetPanel.phpindex c5737d6402..c3fffa5ca1 100644--- a/app/Livewire/CheckoutTargetPanel.php+++ b/app/Livewire/CheckoutTargetPanel.php@@ -51,22 +51,11 @@ class CheckoutTargetPanel extends Component#[Locked]public string $defaultTargetType = 'user';- /**- * Grid class applied to the component's root element. Defaults to- * `col-md-5` which matches the single-target checkout pages that host- * this panel directly next to a col-md-7 form. Pages that stack this- * panel with another box inside their own col-md-5 wrapper pass- * `col-md-12` so the component fills its parent instead of collapsing- * to a nested 5/12 width.- */- #[Locked]- public string $rootClass = 'col-md-5';-public ?string $targetType = null;public ?int $targetId = null;- public function mount(string $type, string $defaultTargetType = 'user', string $rootClass = 'col-md-5'): void+ public function mount(string $type, string $defaultTargetType = 'user'): void{if (! in_array($type, self::TYPES, true)) {throw new \InvalidArgumentException("Unknown checkout-target-panel type: {$type}");@@ -78,7 +67,6 @@ class CheckoutTargetPanel extends Component$this->type = $type;$this->defaultTargetType = $defaultTargetType;- $this->rootClass = $rootClass;}/**diff --git a/resources/views/accessories/checkout.blade.php b/resources/views/accessories/checkout.blade.phpindex 6009af293f..f62174e820 100755--- a/resources/views/accessories/checkout.blade.php+++ b/resources/views/accessories/checkout.blade.php@@ -112,7 +112,9 @@</x-page-column>- <livewire:checkout-target-panel type="accessories" />+ <x-page-column class="col-md-5">+ <livewire:checkout-target-panel type="accessories" />+ </x-page-column></x-container>diff --git a/resources/views/blade/side-panel/removed-assets.blade.php b/resources/views/blade/side-panel/removed-assets.blade.phpindex 5f952a6874..3b500d4adb 100644--- a/resources/views/blade/side-panel/removed-assets.blade.php+++ b/resources/views/blade/side-panel/removed-assets.blade.php@@ -2,12 +2,6 @@'items','message','title' => trans('general.notification_warning'),- // On bulk-checkout the checkout-target-panel Livewire component takes- // over the right column once the user picks a target, so this warning- // is only useful in the "picking assets, no target yet" phase — pass- // hideOnTargetSelected=true and the small script at the bottom will- // hide the box the moment a target select gets a value.- 'hideOnTargetSelected' => false,]){{-- Warning side-panel used by bulk checkin/checkout to explain which assets@@ -57,40 +51,4 @@</table></div></div>-- @if ($hideOnTargetSelected)- <script nonce="{{ csrf_token() }}">- (function () {- // Hide the removed-assets warning as soon as the user picks a- // checkout target — the checkout-target-panel Livewire component- // becomes the primary side-column content at that point and the- // stale warning would just eat vertical space. We piggyback on- // the same target selects the panel's bridge script watches so- // there's no coordination between the two.- var $warning = $('#removed-assets-warning');- if (!$warning.length) return;-- var syncVisibility = function () {- var radioVal = $('input[name="checkout_to_type"]:checked').val() || 'user';- var selectSelectors = {- 'user': '#assigned_user_select',- 'asset': '#assigned_asset_select',- 'location': '#assigned_location_location_select',- };- var val = $(selectSelectors[radioVal]).val();- var hasTarget = val !== null && val !== undefined && val !== '';- $warning.toggle(!hasTarget);- };-- $('#assigned_user_select, #assigned_asset_select, #assigned_location_location_select')- .on('change', syncVisibility);- $('input[name="checkout_to_type"]').on('change', syncVisibility);-- // Run once on ready so a server-side pre-selected target- // (session-remembered after a validation redirect) hides the- // warning immediately instead of flashing it on the first paint.- syncVisibility();- })();- </script>- @endif@endifdiff --git a/resources/views/components/checkout.blade.php b/resources/views/components/checkout.blade.phpindex e1c31e7166..c665c931f1 100644--- a/resources/views/components/checkout.blade.php+++ b/resources/views/components/checkout.blade.php@@ -80,7 +80,9 @@</x-page-column>- <livewire:checkout-target-panel type="components" defaultTargetType="asset" />+ <x-page-column class="col-md-5">+ <livewire:checkout-target-panel type="components" defaultTargetType="asset" />+ </x-page-column></x-container>diff --git a/resources/views/consumables/checkout.blade.php b/resources/views/consumables/checkout.blade.phpindex 15a320fa26..3f7f5b80f2 100644--- a/resources/views/consumables/checkout.blade.php+++ b/resources/views/consumables/checkout.blade.php@@ -109,7 +109,9 @@</x-page-column>- <livewire:checkout-target-panel type="consumables" />+ <x-page-column class="col-md-5">+ <livewire:checkout-target-panel type="consumables" />+ </x-page-column></x-container>diff --git a/resources/views/hardware/bulk-checkout.blade.php b/resources/views/hardware/bulk-checkout.blade.phpindex d7a7dedbdb..cd00b128d8 100644--- a/resources/views/hardware/bulk-checkout.blade.php+++ b/resources/views/hardware/bulk-checkout.blade.php@@ -115,9 +115,8 @@<x-side-panel.removed-assets:items="$removed_assets":message="trans('general.assigned_assets_removed')"- :hideOnTargetSelected="true"/>- <livewire:checkout-target-panel type="assets" rootClass="col-md-12" />+ <livewire:checkout-target-panel type="assets" /></x-page-column></x-container>diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.phpindex 8417c453f3..054097c629 100755--- a/resources/views/hardware/checkout.blade.php+++ b/resources/views/hardware/checkout.blade.php@@ -182,7 +182,9 @@</x-page-column>- <livewire:checkout-target-panel type="assets" />+ <x-page-column class="col-md-5">+ <livewire:checkout-target-panel type="assets" />+ </x-page-column></x-container>@stopdiff --git a/resources/views/kits/checkout.blade.php b/resources/views/kits/checkout.blade.phpindex 07604a255c..d27a94eb90 100644--- a/resources/views/kits/checkout.blade.php+++ b/resources/views/kits/checkout.blade.php@@ -61,7 +61,9 @@</x-page-column>- <livewire:checkout-target-panel type="assets" />+ <x-page-column class="col-md-5">+ <livewire:checkout-target-panel type="assets" />+ </x-page-column></x-container>@stopdiff --git a/resources/views/licenses/checkout.blade.php b/resources/views/licenses/checkout.blade.phpindex 7be8ec5d52..2507c792e3 100755--- a/resources/views/licenses/checkout.blade.php+++ b/resources/views/licenses/checkout.blade.php@@ -124,7 +124,9 @@</x-page-column>- <livewire:checkout-target-panel type="licenses" />+ <x-page-column class="col-md-5">+ <livewire:checkout-target-panel type="licenses" />+ </x-page-column></x-container>@stopdiff --git a/resources/views/livewire/checkout-target-panel.blade.php b/resources/views/livewire/checkout-target-panel.blade.phpindex 6bc49efda0..550d93f916 100644--- a/resources/views/livewire/checkout-target-panel.blade.php+++ b/resources/views/livewire/checkout-target-panel.blade.php@@ -1,4 +1,4 @@-<div class="{{ $rootClass }}" @if ($targetId === null) style="display: none;" @endif>+<div @if ($targetId === null) style="display: none;" @endif><div class="box box-primary"><div class="box-header with-border"><h2 class="box-title">