Fix TypeScript compilation errors
- Add searchReference to ApplicationListItem type - Fix result variable in toApplicationDetails function - Add query helper functions for req.query parameter handling - Fix req.query.* type errors in routes (applications, cache, classifications, objects) - Fix CompletenessCategoryConfig missing id property - Fix number | null type errors in dataService - Add utils/queryHelpers.ts for reusable query parameter helpers
This commit is contained in:
@@ -142,37 +142,39 @@ router.get('/data-completeness', async (req: Request, res: Response) => {
|
||||
description: 'Configuration for Data Completeness Score fields',
|
||||
lastUpdated: new Date().toISOString(),
|
||||
},
|
||||
categories: {
|
||||
general: {
|
||||
categories: [
|
||||
{
|
||||
id: 'general',
|
||||
name: 'General',
|
||||
description: 'General application information fields',
|
||||
fields: [
|
||||
{ name: 'Organisation', fieldPath: 'organisation', enabled: true },
|
||||
{ name: 'ApplicationFunction', fieldPath: 'applicationFunctions', enabled: true },
|
||||
{ name: 'Status', fieldPath: 'status', enabled: true },
|
||||
{ name: 'Business Impact Analyse', fieldPath: 'businessImpactAnalyse', enabled: true },
|
||||
{ name: 'Application Component Hosting Type', fieldPath: 'hostingType', enabled: true },
|
||||
{ name: 'Supplier Product', fieldPath: 'supplierProduct', enabled: true },
|
||||
{ name: 'Business Owner', fieldPath: 'businessOwner', enabled: true },
|
||||
{ name: 'System Owner', fieldPath: 'systemOwner', enabled: true },
|
||||
{ name: 'Functional Application Management', fieldPath: 'functionalApplicationManagement', enabled: true },
|
||||
{ name: 'Technical Application Management', fieldPath: 'technicalApplicationManagement', enabled: true },
|
||||
{ id: 'organisation', name: 'Organisation', fieldPath: 'organisation', enabled: true },
|
||||
{ id: 'applicationFunctions', name: 'ApplicationFunction', fieldPath: 'applicationFunctions', enabled: true },
|
||||
{ id: 'status', name: 'Status', fieldPath: 'status', enabled: true },
|
||||
{ id: 'businessImpactAnalyse', name: 'Business Impact Analyse', fieldPath: 'businessImpactAnalyse', enabled: true },
|
||||
{ id: 'hostingType', name: 'Application Component Hosting Type', fieldPath: 'hostingType', enabled: true },
|
||||
{ id: 'supplierProduct', name: 'Supplier Product', fieldPath: 'supplierProduct', enabled: true },
|
||||
{ id: 'businessOwner', name: 'Business Owner', fieldPath: 'businessOwner', enabled: true },
|
||||
{ id: 'systemOwner', name: 'System Owner', fieldPath: 'systemOwner', enabled: true },
|
||||
{ id: 'functionalApplicationManagement', name: 'Functional Application Management', fieldPath: 'functionalApplicationManagement', enabled: true },
|
||||
{ id: 'technicalApplicationManagement', name: 'Technical Application Management', fieldPath: 'technicalApplicationManagement', enabled: true },
|
||||
],
|
||||
},
|
||||
applicationManagement: {
|
||||
{
|
||||
id: 'applicationManagement',
|
||||
name: 'Application Management',
|
||||
description: 'Application management classification fields',
|
||||
fields: [
|
||||
{ name: 'ICT Governance Model', fieldPath: 'governanceModel', enabled: true },
|
||||
{ name: 'Application Management - Application Type', fieldPath: 'applicationType', enabled: true },
|
||||
{ name: 'Application Management - Hosting', fieldPath: 'applicationManagementHosting', enabled: true },
|
||||
{ name: 'Application Management - TAM', fieldPath: 'applicationManagementTAM', enabled: true },
|
||||
{ name: 'Application Management - Dynamics Factor', fieldPath: 'dynamicsFactor', enabled: true },
|
||||
{ name: 'Application Management - Complexity Factor', fieldPath: 'complexityFactor', enabled: true },
|
||||
{ name: 'Application Management - Number of Users', fieldPath: 'numberOfUsers', enabled: true },
|
||||
{ id: 'governanceModel', name: 'ICT Governance Model', fieldPath: 'governanceModel', enabled: true },
|
||||
{ id: 'applicationType', name: 'Application Management - Application Type', fieldPath: 'applicationType', enabled: true },
|
||||
{ id: 'applicationManagementHosting', name: 'Application Management - Hosting', fieldPath: 'applicationManagementHosting', enabled: true },
|
||||
{ id: 'applicationManagementTAM', name: 'Application Management - TAM', fieldPath: 'applicationManagementTAM', enabled: true },
|
||||
{ id: 'dynamicsFactor', name: 'Application Management - Dynamics Factor', fieldPath: 'dynamicsFactor', enabled: true },
|
||||
{ id: 'complexityFactor', name: 'Application Management - Complexity Factor', fieldPath: 'complexityFactor', enabled: true },
|
||||
{ id: 'numberOfUsers', name: 'Application Management - Number of Users', fieldPath: 'numberOfUsers', enabled: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
res.json(defaultConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user