Skip to content

Commit

Permalink
fixing moieties card always appearing for chems
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoAnderson committed Oct 17, 2024
1 parent 6803412 commit d56984b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/app/core/substance-form/form-sections.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,10 @@ export const formSections: { [substanceType: string]: Array<string> } = {
'substance-form-change-reason'
],
chemicalSimplified: [
'substance-form-definition',
'substance-form-names',
'substance-form-simplified-names',
'substance-form-structure',
'substance-form-moieties',
'substance-form-codes-card',
'substance-form-simplified-codes-card',
'substance-form-relationships',
'substance-form-notes',
'substance-form-properties',
'substance-form-references',
'substance-form-simplified-references',
'substance-form-change-reason'
],
protein: [
'substance-form-definition',
Expand Down
4 changes: 0 additions & 4 deletions src/app/core/substance-form/substance-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,7 @@ export class SubstanceFormComponent implements OnInit, AfterViewInit, OnDestroy
});
const hiddenStateSubscription =
this.formSections[index].dynamicComponentRef.instance.hiddenStateUpdate.subscribe(isHidden => {
if ((!this.simplifiedForm) && !(['substance-form-simplified-names','substance-form-simplified-codes-card','substance-form-simplified-references'].includes(this.formSections[index].dynamicComponentName))) {
this.formSections[index].isHidden = isHidden;
} else if (this.simplifiedForm) {
this.formSections[index].isHidden = isHidden;
}
});
this.subscriptions.push(hiddenStateSubscription);
this.formSections[index].dynamicComponentRef.instance.canAddItemUpdate.pipe(take(1)).subscribe(isList => {
Expand Down

0 comments on commit d56984b

Please sign in to comment.