Add dual-screen customer display for the register.
Deploy Ladill POS / deploy (push) Successful in 56s
Deploy Ladill POS / deploy (push) Successful in 56s
Token-gated full-screen customer view shows order, payment QR, tips, signature, receipt, and promo phases while the till keeps operator UI.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class PosCustomerDisplay extends Model
|
||||
{
|
||||
public const PHASE_IDLE = 'idle';
|
||||
|
||||
public const PHASE_CART = 'cart';
|
||||
|
||||
public const PHASE_PAYMENT = 'payment';
|
||||
|
||||
public const PHASE_TIP = 'tip';
|
||||
|
||||
public const PHASE_SIGNATURE = 'signature';
|
||||
|
||||
public const PHASE_RECEIPT = 'receipt';
|
||||
|
||||
public const PHASE_PROMO = 'promo';
|
||||
|
||||
public const PHASES = [
|
||||
self::PHASE_IDLE,
|
||||
self::PHASE_CART,
|
||||
self::PHASE_PAYMENT,
|
||||
self::PHASE_TIP,
|
||||
self::PHASE_SIGNATURE,
|
||||
self::PHASE_RECEIPT,
|
||||
self::PHASE_PROMO,
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'location_id',
|
||||
'owner_ref',
|
||||
'token',
|
||||
'phase',
|
||||
'payload',
|
||||
'customer_action',
|
||||
'last_pushed_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'payload' => 'array',
|
||||
'customer_action' => 'array',
|
||||
'last_pushed_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function location(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PosLocation::class, 'location_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user