Skip to content

Commit

Permalink
Merge pull request #63 from pegasystems/bug/tor/BUG-827920
Browse files Browse the repository at this point in the history
Fix Angular errors
  • Loading branch information
vishalshrm539 authored Sep 29, 2023
2 parents c869f86 + 9822996 commit baa380e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { CommonModule } from '@angular/common';
import { SdkComponentMap } from '../helpers/sdk_component_map';
import { ErrorBoundaryComponent } from '../../_components/infra/error-boundary/error-boundary.component';


const componentsRequireDisplayOnlyFAProp: Array<string> = [
"HybridViewContainer",
"ModalViewContainer",
"ViewContainer",
"RootContainer",
"View",
"CaseView"
];

@Component({
selector: 'component-mapper',
templateUrl: './component-mapper.component.html',
Expand Down Expand Up @@ -84,6 +94,12 @@ export class ComponentMapperComponent implements OnInit, OnChanges {
try {
for (const propName in this.props) {
if (this.props[propName] !== undefined) {
// We'll set 'displayOnlyFA$' prop only to the components which really need it
// Eventual plan is to get rid of this particular prop
if(propName === "displayOnlyFA$" && !componentsRequireDisplayOnlyFAProp.includes(this.name)){
// eslint-disable-next-line no-continue
continue;
}
this.componentRef.setInput(propName, this.props[propName]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { Component, OnInit, Input } from '@angular/core';
})
export class ReferenceComponent implements OnInit {
@Input() pConn$: any;
@Input() displayOnlyFA$: boolean;

configProps$: Object;
referencedComponent: any = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { ComponentMapperComponent } from '../../../_bridge/component-mapper/comp
export class WideNarrowPageComponent implements OnInit {
@Input() pConn$: any;
@Input() formGroup$: FormGroup;
@Input() displayOnlyFA$;

thePConnType: string = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
</div>

<div *ngIf="sComponentName$ == 'RootContainer'">
<component-mapper name="RootContainer" [props]="{ pConn$, PCore$, props$, displayOnlyFA: false }"></component-mapper>
<component-mapper name="RootContainer" [props]="{ pConn$, PCore$, props$, displayOnlyFA$: false }"></component-mapper>
</div>

0 comments on commit baa380e

Please sign in to comment.