fix: scanner wire:ignore + Company custom columns

- 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) <noreply@anthropic.com>
This commit is contained in:
2026-05-28 23:14:09 +00:00
parent c84ef5d9bd
commit b9ff9c6583
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class Company extends BaseTenant implements HasMedia
return [ return [
'id', 'id',
'slug', 'name', 'display_name', 'city', 'phone', 'email', 'contact_name', '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', 'trial_ends_at', 'active_until',
'settings', 'settings',
'created_at', 'updated_at', 'deleted_at', 'created_at', 'updated_at', 'deleted_at',
@@ -35,7 +35,9 @@
</style> </style>
<div class="sc-wrap" x-data="scanner()" x-init="init()"> <div class="sc-wrap" x-data="scanner()" x-init="init()">
<div class="sc-cam"> {{-- wire:ignore: html5-qrcode injects the camera DOM here; keep
Livewire's morph away so an update doesn't tear down the stream. --}}
<div class="sc-cam" wire:ignore>
<div id="reader"></div> <div id="reader"></div>
<div class="placeholder" x-show="!running && !error" x-cloak> <div class="placeholder" x-show="!running && !error" x-cloak>
Apasă „Pornește" pentru a deschide camera. Apasă „Pornește" pentru a deschide camera.