Skip to content

Commit

Permalink
Refactor render of sap system type
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaksy committed Jul 26, 2024
1 parent 25fa85c commit 21b3186
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions assets/js/pages/SapSystemsOverviewPage/SapSystemsOverview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,12 @@ function SapSystemsOverview({
)
.filter((item) => item === 'J2EE' || item === 'ABAP')
.map((item) => (item === 'J2EE' ? 'JAVA' : item));
// Join the results in a fixed order
const systemHasABAP = instanceTypes.includes('ABAP');
const systemHasJAVA = instanceTypes.includes('JAVA');
const sapSystemType = [];
if (systemHasABAP) sapSystemType.push('ABAP');
if (systemHasJAVA) sapSystemType.push('JAVA');
return sapSystemType.join('/');
// Join the results in a fixed order ABAP, JAVA, ABAP/JAVA or ''
const sapSystemType = ['ABAP', 'JAVA']
.filter((type) => instanceTypes.includes(type))
.join('/');

return sapSystemType;
},
},

Expand Down

0 comments on commit 21b3186

Please sign in to comment.