fix(time-off): keep the request's employee when editing time off

Merged
AD
7d ago
+6-3

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


Fix editing time off for an employee. The root cause was that the selected employee was missing when clicking save.

beforeafter
https://github.com/user-attachments/assets/6f0e0d55-8225-4c81-b118-c65ceca3c07ehttps://github.com/user-attachments/assets/790356bc-3833-4c3b-a772-57927e1c2ef2

Summary by cubic

Fixes editing time off so the request's employee is preserved on save, and a request shared by several employees keeps all of them.

  • Binds the selected employee to the employee selector so it stays populated when editing an existing request.
  • Replaces only the first employee—the one the selector shows—and keeps the others of a shared request; a new request still gets just the selected employee.
  • Disables the save button until a valid employee is selected.