Add Frontdesk-style Devices registry for POS hardware.
Deploy Ladill POS / deploy (push) Successful in 42s
Deploy Ladill POS / deploy (push) Successful in 42s
Register tills, customer displays, kitchen screens, printers, scanners, and tablets per branch. Customer displays share the branch display token and mark online when the public screen polls; stale devices go offline on a schedule.
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
|
||||
use App\Models\PosCustomerDisplay;
|
||||
use App\Models\PosSale;
|
||||
use App\Services\Pos\CustomerDisplayService;
|
||||
use App\Services\Pos\DeviceService;
|
||||
use App\Services\Pos\ReceiptEmailService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -18,11 +19,13 @@ class CustomerDisplayController extends Controller
|
||||
public function __construct(
|
||||
private CustomerDisplayService $displays,
|
||||
private ReceiptEmailService $receiptEmail,
|
||||
private DeviceService $devices,
|
||||
) {}
|
||||
|
||||
public function show(string $token): View
|
||||
{
|
||||
$display = $this->find($token);
|
||||
$this->devices->touchByToken($token);
|
||||
|
||||
return view('pos.customer-display', [
|
||||
'display' => $display,
|
||||
@@ -36,6 +39,7 @@ class CustomerDisplayController extends Controller
|
||||
public function state(string $token): JsonResponse
|
||||
{
|
||||
$display = $this->find($token);
|
||||
$this->devices->touchByToken($token);
|
||||
|
||||
return response()->json($this->displays->publicState($display));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user