Skip to content

Commit

Permalink
Merge pull request #298 from DUNE/krish
Browse files Browse the repository at this point in the history
Small fix for missing component names ...
  • Loading branch information
bjrebel authored Dec 30, 2024
2 parents a30023e + 82c40a0 commit 2bf4345
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/lib/Components.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,14 @@ async function list(match_condition, options) {
record.componentUuid = MUUID.from(record.componentUuid).toString();

if (['APAFrame', 'AssembledAPA', 'GroundingMeshPanel', 'CRBoard', 'GBiasBoard', 'CEAdapterBoard', 'SHVBoard', 'CableHarness'].includes(record.typeFormId)) {
const name_splits = record.name.split('-');
record.name = `${name_splits[1]}-${name_splits[2]}`.slice(0, -3);
if (record.name !== '') {
const name_splits = record.name.split('-');
record.name = `${name_splits[1]}-${name_splits[2]}`.slice(0, -3);
} else {
record.name = record.componentUuid;
}
} else if (record.typeFormId === 'GeometryBoard') {
record.name = record.data.typeRecordNumber;
} else {
record.name = record.name;
}
}

Expand Down

0 comments on commit 2bf4345

Please sign in to comment.