Refactor user repository fields management and enhance query structure

- Moved the `FIELDS` constant from `UserRepository` to `UserRepositoryInterface` to improve consistency and sharing.
- Updated SQL queries to include new fields (`absenceStart`, `mainLanguage`, and `isRoleSeeAuditTrails`).
- Streamlined CSV export logic to reference the shared `FIELDS` constant.
This commit is contained in:
2026-03-03 14:13:16 +01:00
parent cd29e3150a
commit 95437bd06d
3 changed files with 33 additions and 45 deletions

View File

@@ -19,6 +19,30 @@ use Doctrine\Persistence\ObjectRepository;
*/
interface UserRepositoryInterface extends ObjectRepository
{
public const FIELDS = [
'id',
'username',
'email',
'enabled',
'civility_id',
'civility_abbreviation',
'civility_name',
'label',
'mainCenter_id',
'mainCenter_name',
'mainScope_id',
'mainScope_name',
'userJob_id',
'userJob_name',
'currentLocation_id',
'currentLocation_name',
'mainLocation_id',
'mainLocation_name',
'absenceStart',
'mainLanguage',
'isRoleSeeAuditTrails',
];
public function countBy(array $criteria): int;
public function countByActive(): int;