fix(employee-appointment): save false and 0 buffer settings on update
Merged
CE
7d ago+81+81+01234567890123456789-4-4-0123456789
Problem
EmployeeAppointmentUpdateHandler only writes a field when isNotEmpty(value), which treats false and 0 as empty. Turning bufferTimeStart / bufferTimeEnd off, or setting bufferTimeInMins / breakTimeInMins to 0, was silently ignored and the old value stayed.
Fix
For these four fields, skip only a key left out of the request (!== undefined). Minutes are still converted to numbers; an explicit null stays null.
Tests
New employee-appointment.update.handler.spec.ts: false / 0 are written, string minutes become numbers, an agenda-only request updates only agenda.
Notes
Not built or run locally.
Summary by cubic
Fixes the employee appointment update handler so false and 0 buffer settings are saved instead of being silently ignored.
isNotEmptytreatedfalseand0as empty, so disablingbufferTimeStart/bufferTimeEndor settingbufferTimeInMins/breakTimeInMinsto0left the old value in place.- These four fields now skip a value only when it's
undefinedor''; string minutes are coerced to numbers while explicitnullstaysnull. - Adds
employee-appointment.update.handler.spec.tscoveringfalse/0writes, string-to-number coercion,null/''handling, and agenda-only updates. - Tests weren't run locally; the new spec may need verification in CI.