Skip to content

Commit 8d9de0f

Browse files
authored
Merge branch 'master' into mod/tor/embeddedUpdate
2 parents dcb3705 + 5adcd0a commit 8d9de0f

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

packages/react-sdk-components/src/components/template/CaseView/CaseView.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ const useStyles = makeStyles(theme => ({
4242
width: theme.spacing(8),
4343
height: theme.spacing(8),
4444
padding: theme.spacing(1)
45-
},
46-
caseViewIconImage: {
47-
filter: 'var(--svg-color)'
4845
}
4946
}));
5047

@@ -61,7 +58,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
6158
header,
6259
subheader,
6360
children = [],
64-
caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '' }
61+
caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '', caseTypeIcon }
6562
} = props;
6663
const { lastUpdateCaseTime = getPConnect().getValue('caseInfo.lastUpdateTime') } = props;
6764
const currentCaseID = props.caseInfo.ID;
@@ -104,7 +101,12 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
104101
const theUtilitiesRegion = getChildRegionByName('utilities');
105102
const theTabsRegion = getChildRegionByName('tabs');
106103

107-
const svgCase = Utils.getImageSrc(icon, Utils.getSDKStaticConentUrl());
104+
let iconForCaseType = caseTypeIcon ? caseTypeIcon.replace('pi pi-', '') : icon;
105+
106+
if (!iconForCaseType || iconForCaseType.includes('.')) {
107+
iconForCaseType = 'polaris-solid';
108+
}
109+
const caseSvgIconUrl = Utils.getImageSrc(iconForCaseType, Utils.getSDKStaticConentUrl());
108110

109111
const [activeVertTab, setActiveVertTab] = useState(0);
110112

@@ -229,7 +231,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
229231
}
230232
avatar={
231233
<Avatar className={classes.caseViewIconBox} variant='square'>
232-
<img src={svgCase} className={classes.caseViewIconImage} />
234+
<img src={caseSvgIconUrl} />
233235
</Avatar>
234236
}
235237
/>

packages/react-sdk-components/src/samples/FullPortal/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,18 @@ export default function FullPortal() {
152152
startPortal();
153153
};
154154

155-
return portalSelectionScreen ? (
155+
const content = portalSelectionScreen ? (
156156
<InvalidPortal defaultPortal={defaultPortalName} portals={availablePortals} onSelect={loadSelectedPortal} />
157157
) : (
158+
rootComponentProps && <RootComponent {...rootComponentProps} />
159+
);
160+
161+
return (
158162
<div id='pega-root'>
159163
<StyledEngineProvider injectFirst>
160164
<ThemeProvider theme={theme}>
161165
<CssBaseline />
162-
{rootComponentProps && <RootComponent {...rootComponentProps} />}
166+
{content}
163167
</ThemeProvider>
164168
</StyledEngineProvider>
165169
</div>

0 commit comments

Comments
 (0)