SET QUOTED_IDENTIFIER ON;
GO

PRINT '=== Menu items 9 catalog keys ===';
SELECT [Key], ParentKey, [Order], Label, DisplayLabel, IsVisible
FROM MenuItems
WHERE [Key] IN ('Master','Suppliers','Projects','Departments','Catalogs','CatalogUnits','CatalogMaterials','CatalogServices','CatalogWorkItems')
ORDER BY [Order];
GO

PRINT '=== CatalogManager role + permissions ===';
SELECT R.Name, COUNT(P.MenuKey) AS PermCount
FROM AspNetRoles R
LEFT JOIN Permissions P ON P.RoleId = R.Id
WHERE R.Name = 'CatalogManager'
GROUP BY R.Name;
GO

PRINT '=== catalog.manager user ===';
SELECT TOP 3 U.Email, U.FullName, U.IsActive
FROM Users U
WHERE U.Email LIKE '%catalog%';
GO
