2026-06-14 21:32:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace App\Contracts\Directories;
|
|
|
|
|
|
|
|
|
|
use App\Contracts\Directory;
|
|
|
|
|
use App\Models\Customer;
|
|
|
|
|
use App\Models\Order;
|
|
|
|
|
use Carbon\CarbonInterface;
|
|
|
|
|
use Domain\Enums\OrderStatus;
|
|
|
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator as PaginationLengthAwarePaginator;
|
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
use Ramsey\Uuid\UuidInterface;
|
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-01 17:26:30 +02:00
|
|
|
use Shared\Pagination\Pagination;
|
2026-06-14 21:32:07 +02:00
|
|
|
|
|
|
|
|
/** @extends Directory<\Ramsey\Uuid\UuidInterface, \App\Models\Order> */
|
|
|
|
|
interface OrderDirectory extends Directory
|
|
|
|
|
{
|
|
|
|
|
public function find(UuidInterface $id): ?Order;
|
|
|
|
|
|
|
|
|
|
/** @return \Illuminate\Pagination\LengthAwarePaginator<int,Order> */
|
|
|
|
|
public function getPaginatedOrdersOf(
|
|
|
|
|
Customer $customer,
|
|
|
|
|
Pagination $pagination,
|
|
|
|
|
bool $orderByDate = false
|
|
|
|
|
): PaginationLengthAwarePaginator;
|
|
|
|
|
|
|
|
|
|
public function findOf(Customer $customer, UuidInterface $id): ?Order;
|
|
|
|
|
|
|
|
|
|
/** @return Collection<int,Order>*/
|
|
|
|
|
public function getValidatedOrders(CarbonInterface $start, CarbonInterface $end): Collection;
|
|
|
|
|
|
|
|
|
|
/** @return Collection<int,Order> */
|
|
|
|
|
public function getOrdersByStatus(OrderStatus $status, CarbonInterface $start, CarbonInterface $end): Collection;
|
|
|
|
|
|
|
|
|
|
public function getNbActiveClients(CarbonInterface $start, CarbonInterface $end): int;
|
|
|
|
|
|
|
|
|
|
public function getNbCmdWith7DayDelay(CarbonInterface $start, CarbonInterface $end): int;
|
|
|
|
|
|
|
|
|
|
public function getNbCmdWith14DayDelay(CarbonInterface $start, CarbonInterface $end): int;
|
|
|
|
|
|
|
|
|
|
public function getCaHt(CarbonInterface $start, CarbonInterface $end): float;
|
|
|
|
|
|
|
|
|
|
public function getCaTtc(CarbonInterface $start, CarbonInterface $end): float;
|
|
|
|
|
|
|
|
|
|
public function getTotalQuantity(CarbonInterface $start, CarbonInterface $end): int;
|
|
|
|
|
}
|