Skip to content

Commit fb57c36

Browse files
erikriv16TACC StaffrstijerinaTACC StaffTACC Staff
authored
Changed onboarding status shown (#1547)
* Changed onboarding status shown * Added denied logic for steps.events[0].message * Removed console.log * Fixed React_NX_unit_tests errors * Simplified logic for Denied tag --------- Co-authored-by: TACC Staff <[email protected]> Co-authored-by: Sal Tijerina <[email protected]> Co-authored-by: TACC Staff <[email protected]> Co-authored-by: TACC Staff <[email protected]>
1 parent 4c8ee5c commit fb57c36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client/modules/onboarding/src/OnboardingStatus/OnboardingStatus.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ const getContents = (step: TOnboardingStep) => {
3030
if ('customStatus' in step) {
3131
return <Tag color={color}>{step.customStatus}</Tag>;
3232
}
33+
34+
if (
35+
step.events?.[0]?.message === 'Portal access request has not been approved.'
36+
) {
37+
return <Tag color="red">Denied</Tag>;
38+
}
3339
switch (step.state) {
3440
case 'pending':
3541
return <Tag color={color}>Preparing</Tag>;
@@ -64,5 +70,6 @@ export const OnboardingStatus = ({ step }: { step: TOnboardingStep }) => {
6470
if (!contents) {
6571
return null;
6672
}
73+
6774
return <span className={styles.root}>{getContents(step)}</span>;
6875
};

0 commit comments

Comments
 (0)