Make quick sale products on machines as orders paid when ready
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Sales\Infrastructure\Adapters;
|
||||
|
||||
use App\Modules\Machines\Application\UseCases\MachineWorkList;
|
||||
use App\Modules\Sales\Application\Contracts\ProductionQueue;
|
||||
use DateTimeImmutable;
|
||||
|
||||
/**
|
||||
* Order lines on machines' work lists through the Machines module.
|
||||
*/
|
||||
class QueueOnMachines implements ProductionQueue
|
||||
{
|
||||
public function __construct(private MachineWorkList $workList) {}
|
||||
|
||||
public function enqueue(int $orderLineId, int $stepPosition, int $machineId, DateTimeImmutable $day): void
|
||||
{
|
||||
$this->workList->enqueueOrderStep($orderLineId, $stepPosition, $machineId, $day);
|
||||
}
|
||||
|
||||
public function complete(int $orderLineId, int $userId): void
|
||||
{
|
||||
$this->workList->completeOrderLine($orderLineId, $userId);
|
||||
}
|
||||
|
||||
public function remove(int $orderLineId): void
|
||||
{
|
||||
$this->workList->removeOrderLine($orderLineId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user