From b9ff9c65834a7429ff77ce1f8aaed71bd99ed189 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Thu, 28 May 2026 23:14:09 +0000 Subject: [PATCH] fix: scanner wire:ignore + Company custom columns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Scanner page: wrap the html5-qrcode camera container (#reader) in wire:ignore so a Livewire DOM morph can't tear down the live camera stream (same class of bug as the calendar). - Company::getCustomColumns(): add `is_demo` and `default_warehouse_id`. Stancl Tenant treats columns absent from this list as virtual `data` JSON attributes, so editing a company could move default_warehouse_id into data and null the real column — breaking WarehouseService::defaultWarehouse. Full suite: 100 passed. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/Models/Central/Company.php | 2 +- resources/views/filament/tenant/pages/scanner.blade.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Models/Central/Company.php b/app/Models/Central/Company.php index 7840358..3f6ab49 100644 --- a/app/Models/Central/Company.php +++ b/app/Models/Central/Company.php @@ -39,7 +39,7 @@ class Company extends BaseTenant implements HasMedia return [ 'id', 'slug', 'name', 'display_name', 'city', 'phone', 'email', 'contact_name', - 'status', 'plan_id', + 'status', 'plan_id', 'is_demo', 'default_warehouse_id', 'trial_ends_at', 'active_until', 'settings', 'created_at', 'updated_at', 'deleted_at', diff --git a/resources/views/filament/tenant/pages/scanner.blade.php b/resources/views/filament/tenant/pages/scanner.blade.php index 178e1ec..e372ecc 100644 --- a/resources/views/filament/tenant/pages/scanner.blade.php +++ b/resources/views/filament/tenant/pages/scanner.blade.php @@ -35,7 +35,9 @@
-
+ {{-- wire:ignore: html5-qrcode injects the camera DOM here; keep + Livewire's morph away so an update doesn't tear down the stream. --}} +
Apasă „Pornește" pentru a deschide camera.