Implement TASK F-2: Wrap JailDetailPage jail-control API calls in a hook. Changes: - Add start(), stop(), reload(), and setIdle() methods to useJailDetail hook - Update JailDetailPage to use hook control methods instead of direct API imports - Update error handling to remove dependency on ApiError type - Add comprehensive tests for new control methods (8 tests) - Update existing test to include new hook methods in mock The control methods handle refetching jail data after each operation, consistent with the pattern used in useJails hook.
5.7 KiB
5.7 KiB