Loading
fix(payfit): first leave sync window, setup status and sync dialog
Problem
- A PayFit connection that never ran only imported the last 90 days of leaves, whatever its configured start date.
- The setup showed the leaves step as done before any synchronisation, and the raw API scopes as the connection detail.
- The sync dialog of the HR Integrations page opened on a generic period that left out upcoming leaves, and did not explain invalid dates.
- Month names were always in English.
Root cause
default_windowalways started at today minus 90 days.- The leaves step was done as soon as it was configured.
PeriodDialogonly knew generic periods.window.momentdoes not carry the loaded locales (framework issue, not fixed here: month names useIntl).
Fix
- The first run starts at
leave_sync_from_date. Later runs keep the 90-day window. - The leaves step stays to do until a run happened. The connection shows when it was last checked.
- A provider action can declare its own
periodsandeffects; the dialog shows them, with a message for invalid dates. - Last month's payroll is listed under Needs attention when it has no entry but an earlier month has one.
Deployment note
A connection with leave sync enabled that never ran will import all leaves since its start date on the next nightly run. A first manual run over a shorter period moves it to the 90-day window.
Tests
PayFit suites (absences, provider, push, accounting): 60 tests pass. Both dialogs were checked in a browser. The new French strings were not checked in a browser.