Inactive department
When we set an "Inactive from" date on the department card we will:
Give active employees an
end_dateif they have none or they do not have an upcoming contract in an active departmentThe
end_datewill be the date before the "Inactive from" date given in the department card. This has been chosen as there will be no access to the department on the "Inactive from" date.
Amend the
contract_start_dateif employee has an upcoming contract in an active department that does not match the "Inactive from" date
Example:
userA
contractA: startDate: 2022-01-01, endDate: 2022-12-31, shop: inactive
contractB: startDate: 2023-01-01, endDate: 2023-12-31, shop: active
terminating inactive shop (inactive_from: 2022-06-01)
userA
contractA: startDate: 2022-01-01, endDate: 2022-05-31, shop: inactive
contractB: startDate: 2022-06-01, endDate: 2023-12-31, shop: active
This will ensure that there will be no gaps where employees are between an inactive and an active department.
Note: it will happen when we pass the date selected in the “Inactive from” field in the department card and not when we set the date (unless we do it in the past)
