Conversation
…EASI-5033/power_platform_wrapper
…EASI-5033/power_platform_wrapper
…EASI-5033/power_platform_wrapper
…ub.com/CMS-Enterprise/easi-app into EASI-5033/power_platform_wrapper
…EASI-5033/power_platform_wrapper
…EASI-5033/power_platform_wrapper
…EASI-5033/power_platform_wrapper
| export default function PowerPlatformFlagWrapper({ | ||
| children | ||
| }: React.PropsWithChildren) { | ||
| const { systemIntakeID } = useParams<{ systemIntakeID?: string }>(); |
There was a problem hiding this comment.
The routes use id as the param instead of systemIntakeID, so this is returning undefined.
| const { systemIntakeID } = useParams<{ systemIntakeID?: string }>(); | |
| const { id: systemIntakeID } = useParams<{ id?: string }>(); |
There was a problem hiding this comment.
The admin header and navigation are rendering before the redirect. Can you move the wrapper so that no page content (other than maybe <PageLoading />) shows if being redirected?
|
|
||
| if (flags.enablePowerPlatform) { | ||
| window.location.href = `https://icpg-dev.crm9.dynamics.com/main.aspx?appid=bc878d88-0468-f011-bec2-001dd8062d4a&pagetype=entityrecord&etn=new_systemintake&id=${systemIntakeID}`; | ||
| return null; |
There was a problem hiding this comment.
I think returning <PageLoading /> here instead of null would make sense so that the user doesn't see a blank screen before the redirect.
| const flags = useFlags(); | ||
|
|
||
| if (flags.enablePowerPlatform) { | ||
| window.location.href = `https://icpg-dev.crm9.dynamics.com/main.aspx?appid=bc878d88-0468-f011-bec2-001dd8062d4a&pagetype=entityrecord&etn=new_systemintake&id=${systemIntakeID}`; |
There was a problem hiding this comment.
- Should we add this base URL as an env variable instead of hard-coding it?
- Are there different power platform URLs for the different environments (local, dev, impl, and prod)?
There was a problem hiding this comment.
There are some additional components in this file related to system intake that need to be wrapped with <PowerPlatformFlagWrapper />.
There was a problem hiding this comment.
I'm seeing "this page cannot be found" instead of being redirected when I try to create a new intake. I think we need to redirect from the request type form instead of the task list.
EASI-5033
Description
How to test this change
.envrc.localadd the following line:export FLAG_SOURCE=LAUNCH_DARKLY # LAUNCH_DARKLY, LOCAL, or FILE- this ensures your local env is looking at live LaunchDarkly datatruein thelocalenv for this flag:enablePowerPlatformid, i.e., the url must have an id in it)PR Author Checklist
PR Reviewer Guidelines