Skip to content

Commit

Permalink
Simplify default custom functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
sarus committed Aug 8, 2024
1 parent 5ad0c04 commit 96f011c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/functionalityByEntityType/customFunctionalityByType.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,33 +110,29 @@ const CUSTOM_FUNCTIONALITY_FOR_STANDARD_ENTITY_TYPES = {
*/
const CUSTOM_FUNCTIONALITY_FOR_CUSTOM_ENTITY_TYPES = {
// All Custom Type Defaults
defaults: assetsAndIncidentCustomFunctionality,
defaults: BUILT_IN_SERVICENOW_TYPE_DEFAULTS,

// Specific Custom Types which override default above which is to search both incident and asset
// tables.
knowledgeBase: {
...BUILT_IN_SERVICENOW_TYPE_DEFAULTS,
queryFunction: queryKnowledgeBase,
createSummaryTags: getTotalKbDocsSummaryTag,
displayTabNames: { knowledgeBaseData: 'Knowledge Base' },
displayStructure: { knowledgeBaseData: knowledgeBaseDisplayStructure }
},
change: {
...BUILT_IN_SERVICENOW_TYPE_DEFAULTS,
tableQueryTableName: 'change_request',
displayTabNames: { tableQueryData: 'Changes' }
},
request: {
...BUILT_IN_SERVICENOW_TYPE_DEFAULTS,
tableQueryTableName: 'sc_request',
displayTabNames: { tableQueryData: 'Requests' }
},
requestedItem: {
...BUILT_IN_SERVICENOW_TYPE_DEFAULTS,
tableQueryTableName: 'sc_req_item',
displayTabNames: { tableQueryData: 'Requested Items' }
},
incident: BUILT_IN_SERVICENOW_TYPE_DEFAULTS
incident: {}
};

const specificCustomTypesWithDefaults = flow(
Expand Down

0 comments on commit 96f011c

Please sign in to comment.