-- Menu wiring for the "Trainer Portal" screen (today's/upcoming sessions trainer daily view), -- one of the [Internal only] gaps flagged in Docs/TMS-Feature-Functionality-Guide.md section 7: -- TrainerPortalComponent (gb4.7mfe projects/training/master/trainerportal/trainerportal.component.ts) -- was fully built and federation-exposed ('./TrainerPortalComponent' in -- projects/training/federation.config.js) but had zero menu wiring, so no user could reach it. -- -- FE dispatch-key mechanism confirmed live (gbformviewer.component.ts's ngOnChanges): -- the actual navigation key is TabDetails.MenuDetails.WebFormSecondURL with '/' stripped, so -- WEBFORMSECONDURL 'tms/trainerportal' below resolves to the FE dispatch key 'tmstrainerportal', -- which was just added to both gbformviewerurl.ts (build/federation) and localgbformviewer.url.ts -- (local dev) in the same commit as this migration. -- -- Placed as a sibling of "Skill Upgrade Review" (MENUID -1900000501) under the same -- "Training Managment Transaction" parent (-1399977686), matching that migration's shape exactly. -- Granted to the same 3 roles every other TMS menu is granted to (Admin/GBSUPERUSER/SystemAdmin) -- -- no dedicated "Trainer" role exists in MROLE on this environment, so this mirrors the established -- convention rather than inventing a new role. -- -- Live-confirmed before writing this: WEBFORMID -1900000502, MENUID -1900000503, MENUCODE -- 'TM31005', ROLEVSMENUID -1900000446..-1900000448 all unused. INSERT INTO MWEBFORM (WEBFORMID, WEBFORMNAME, WEBFORMURL, TEMPLATE, MODULEID, SORTORDER, STATUS, VERSION, SOURCETYPE, CREATEDBYID, CREATEDON, MODIFIEDBYID, MODIFIEDON, WEBFORMSECONDURL, OBJECTMODELID, OBJECTMODELIDS) VALUES (-1900000502, 'Trainer Portal', 'tms/trainerportal', 'Trainer Portal', -1399999902, 0, 1, 1, 2, -1, GETUTCDATE(), -1, GETUTCDATE(), 'tms/trainerportal', -1, '-1'); INSERT INTO MMENU (MENUID, MENUCODE, MENUNAME, MODULEID, GCMTYPEID, SECTION, ISPARENTMENU, PARENTID, PARENTIDS, LEVELS, REMARKS, REPORTID, WEBFORMID, MENUTYPE, MENUNATURE, IMAGEID, PAGEID, MENUDISPLAYNAME, MENUDESCRIPTION, MENUTOOLTIP, MENUCAPTION, SAVEWEBSERVICEID, GETWEBSERVICEID, DELETEWEBSERVICEID, BIZTRANSACTIONCLASSID, ENTITYID, HELPURL, SORTORDER, STATUS, VERSION, SOURCETYPE, CREATEDBYID, CREATEDON, MODIFIEDBYID, MODIFIEDON, DEFAULTREPORTFORMATID, URIPARAMETERVALUE, DEFAULTREPORTVIEWID, LISTMENUID, ANALYSISQUERYID, DEFAULTMENUID, FROMVERSION, TOVERSION, SECTIONID, OBJECTMODELID, ICONNAME) VALUES (-1900000503, 'TM31005', 'Trainer Portal', -1399999902, -1, 'NONE', 0, -1399977686, ',-1399977686', 1, NULL, -1, -1900000502, 1, 0, -1, -1, 'Trainer Portal', 'Trainer''s daily/upcoming session schedule and quick attendance/rating snapshot.', NULL, 'Trainer Portal', -1, -1, -1, -1, -1, NULL, 200, 1, 1, 2, -1, GETUTCDATE(), -1, GETUTCDATE(), -1, 'NONE', -1, -1, -1, -1, '5.0', '5.0', -1, -1, ''); INSERT INTO MROLEVSMENU (ROLEVSMENUID, ROLEID, MENUID, SLNO, ALLOW, MAXDAYSNORMAL, DAYSLIMIT, MAXRECORDSNORMAL, RECORDSLIMIT) VALUES (-1900000446, -1899999998, -1900000503, 9006, '000000', 31, 366, 5000, 25000), -- Admin (-1900000447, -1799999978, -1900000503, 9006, '000000', 31, 366, 5000, 25000), -- GBSUPERUSER (-1900000448, -1799999969, -1900000503, 9006, '000000', 31, 366, 5000, 25000); -- SystemAdmin