- 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
48 lines
1.7 KiB
PHP
48 lines
1.7 KiB
PHP
<?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;
|
|
use Shared\Pagination\Pagination;
|
|
|
|
/** @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;
|
|
}
|