fix(fusion_clock): code-review hardening [19.0.5.0.1]

- _cron_generate: per-rule savepoint isolation (one bad rule can't abort the
  whole daily batch)
- fclk_attach_recurrence: clear an existing recurrence first (no orphaned rule
  generating forever)
- fclk_apply_planner_cell: collapse split rows (search was limit=1 after the
  UNIQUE drop, orphaning extras)
- fclk_release_shift: reject non-posted/open shifts (raw-POST guard)
- delete_open_shift: report success=false when nothing was deleted + JS surfaces it
- _generate: log before removing an empty recurrence
Tests added for collapse, re-attach, draft-release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-06-04 22:32:44 -04:00
parent 53c292083f
commit 19d484680d
8 changed files with 83 additions and 11 deletions

View File

@@ -428,7 +428,14 @@ export class FusionClockShiftPlanner extends Component {
schedule_id: id,
week_start: this.state.weekStart,
});
if (!result.error) {
if (result.error || result.success === false) {
this.notification.add(result.error || result.message || "Could not remove open shift.", {
type: "warning",
});
if (result.data) {
this._applyData(result.data);
}
} else {
this._applyData(result.data);
}
} catch (error) {