-- EAF Delays Manager — route update only.
-- The new screen reuses the existing IHDelays2.WebApp stored procedures
-- (GetDelaysCodeGroup, GetDelayData, UpdateDelay, SplitDelayAt, JoinDelay,
--  GetProductionItems, GetShifts, GetDelayCategories), so no SP changes are needed.
-- This script just repoints the legacy "delays-1" route to the new pages/eaf/delays-manager screen.

USE [IHBoxSystem]
GO

---- Change route: legacy custom-screens/delays/delays-1 -> pages/eaf/delays-manager
UPDATE TOP (1) FrontEnd.Routes
    SET ModulePath = 'pages/eaf/delays-manager/',
        ModuleName = 'delays-manager',
        [Route]    = '!/delays-manager(/:start)(/:end)(/:machineId)(/:shiftId)(/:crewId)(/:delayCategoryId)(/)'
    WHERE ModulePath = 'custom-screens/delays/delays-1/'
GO
