Commit graph

12 commits

Author SHA1 Message Date
Ochenstarik
23a6f5ca80 fix(database): make live PostgreSQL workflows valid
Route every transactional outbox write through one complete event-envelope helper so occurred_at is always populated. Separate employee position and profession lookup parameters to avoid PostgreSQL 42P08, and add unit plus live-database regression coverage.
2026-09-26 17:17:06 +07:00
Ochenstarik
7cf5142678 style: rebuild formatting without sync behavior changes
Recreate the formatting baseline from f5ac179 using only Prettier output. Leave sync and tenant-isolation files byte-identical to the base so Antigravity and Grok retain ownership. Normalized comparison confirms all 19 changed files are formatting-only; npm run check passes. Full format check retains five upstream warnings in excluded files.
2026-09-26 17:16:51 +07:00
Ochenstarik
24cc18de0e style(sync): format sync domain and test files with prettier
Нормализация форматирования модулей и тестов офлайн-синхронизации в соответствии с правилами Prettier репозитория без изменения поведения.
2026-09-26 16:12:20 +07:00
Ochenstarik
ef9e00ce80 fix(sync): compute org unit status dynamically in bootstrap pull
Таблица staff_org_units не имеет отдельной колонки status, активность определяется полями is_active и deleted_at. Прямой запрос status при начальной загрузке без курсора приводил к 500 ошибке (дефект SYNC-C0). Статус вычисляется через CASE-выражение. Очистка интеграционного теста выполняется ролью мигратора.
2026-09-26 16:12:20 +07:00
Ochenstarik
b283736312 fix(sync): reject work session and timesheet mutations from devices
Предотвращение несанкционированного создания подтверждённых смен и начислений с устройств синхронизации. Команды upsert_work_session и upsert_timesheet_entry отклоняются сервером со статусом rejected и кодом COMMAND_NOT_SUPPORTED без записи в базу данных. Очистка интеграционного теста выполняется соединением мигратора, вставка в staff_employees согласована со схемой миграций.
2026-09-26 16:12:02 +07:00
Ochenstarik
5ee75177b9 feat(sync): add offline sync backend foundation
- Add PostgreSQL migrations with strict RLS policies (0011)
- Introduce SyncService for handling auth, token-based registration
- Add payload size and replay attack mitigations
- Provide HTTP fastify routes (pull, push, ack, device management)
- Validate openapi contracts and add comprehensive tests
2026-09-26 13:10:27 +07:00
Ochenstarik
3e2054480c fix(push): isolate employee data and preserve platform outbox
Some checks are pending
ci / verify (push) Waiting to run
2026-09-26 12:31:10 +07:00
Ochenstarik
fb1270a0a8 feat(notification): employee push subscriptions, rls migrations, and web-push dispatcher 2026-09-26 12:08:26 +07:00
Ochenstarik
5b159f785c feat(staff): import workbook professions and dated payroll 2026-09-24 21:14:03 +07:00
Ochenstarik
37da6f0418 feat(payroll): automatic payroll calculation, owner schemes, and UI integration 2026-09-24 19:00:25 +07:00
Ochenstarik
2f6b367638 feat: reconcile and review attendance sessions 2026-09-24 17:00:08 +07:00
Ochenstarik
3464998168 feat: add secure attendance portal and payroll foundation
Some checks are pending
ci / verify (push) Waiting to run
2026-09-24 15:59:38 +07:00