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 overview showed the leaves step as done and no failures before any synchronisation, and the raw API scopes in the banner and the first step.
- The payroll button was grey and appeared twice. Month names were always in English.
- The leave sync dialog had no period choice and did not say what it does.
Root cause
default_windowalways started at today minus 90 days.- The leaves step was done as soon as it was configured.
btn-primaryhas no effect on the v5 header buttons.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.
- One primary payroll button.
- New sync dialog: period tabs, aligned dates, validation, list of effects.
Counterpart of !3309 (merged) on develop. It is not a plain cherry-pick: develop replaced the form overview with the HR Integrations page.
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, accounting, employees): 35 tests pass. The form and both dialogs were checked in a browser, before a last CSS change to the step labels. The new French strings were not checked in a browser.