The console under console/ has its own session cookie and console guard (UseConsoleSession), so signing out or changing user there leaves the normal interface alone. Links open it in a new window through a one-time handoff key; a signed-out console asks for a PIN code or password on its own login page. Users set their 4-6 digit PIN on the profile's PIN page, and the console's change user dialog takes it on a keypad; five wrong PINs lock PIN sign-in for 15 minutes. Machine counters are cumulative: users record how much a job used and it is added to the latest reading. A maintenance record restarts the whole counter interval from the reading at the record. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
55 lines
1.4 KiB
PHP
55 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Users\Application\Contracts;
|
|
|
|
use App\Modules\Users\Application\DTOs\UserOption;
|
|
use App\Modules\Users\Application\DTOs\UserSummary;
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
|
|
|
/**
|
|
* Read side of the Users module.
|
|
*/
|
|
interface UserAccountQueries
|
|
{
|
|
public function findSummary(int $id): ?UserSummary;
|
|
|
|
/**
|
|
* Users ordered by name, filtered by a name or email fragment.
|
|
*
|
|
* @return LengthAwarePaginator<int, UserSummary>
|
|
*/
|
|
public function paginate(?string $search, int $perPage = 25): LengthAwarePaginator;
|
|
|
|
/**
|
|
* Active management and employee users who can supervise an intern.
|
|
*
|
|
* @return list<UserOption>
|
|
*/
|
|
public function supervisorOptions(?int $exceptUserId = null): array;
|
|
|
|
/**
|
|
* Active users ordered by name, with their role, for choosing job members.
|
|
*
|
|
* @return list<UserOption>
|
|
*/
|
|
public function activeUserOptions(): array;
|
|
|
|
/**
|
|
* Users who may sign in today and have a console PIN code, ordered by
|
|
* name, for switching user on a machine console.
|
|
*
|
|
* @return list<UserOption>
|
|
*/
|
|
public function pinLoginOptions(): array;
|
|
|
|
/**
|
|
* User names for many ids at once, active or not (for lists and history).
|
|
*
|
|
* @param list<int> $ids
|
|
* @return array<int, string>
|
|
*/
|
|
public function namesByIds(array $ids): array;
|
|
}
|