Skip to content

Commit

Permalink
CARDS-1741: Add a PageStart extension point to the patient UI
Browse files Browse the repository at this point in the history
  • Loading branch information
veronikaslc committed Sep 20, 2022
1 parent 6b1a4a1 commit a6ff8bb
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
1 change: 1 addition & 0 deletions modules/demo-banner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<Sling-Initial-Content>
SLING-INF/content/Extensions/PageStart/;path:=/Extensions/PageStart/;overwriteProperties:=true;uninstall:=true,
SLING-INF/content/Extensions/LoginPageStart/;path:=/Extensions/LoginPageStart/;overwriteProperties:=true;uninstall:=true,
SLING-INF/content/Extensions/SurveyPageStart/;path:=/Extensions/SurveyPageStart/;overwriteProperties:=true;uninstall:=true
</Sling-Initial-Content>
</instructions>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"jcr:primaryType": "cards:Extension",
"cards:extensionPointId": "patient-portal/surveyPageStart",
"cards:extensionName": "Demo Warning Banner",
"cards:extensionRenderURL": "asset:cards-demo-banner.demoBanner.js"
}
1 change: 1 addition & 0 deletions modules/downtime-warning-banner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
SLING-INF/content/apps/cards/config/;path:=/apps/cards/config/;overwrite:=false,
SLING-INF/content/Extensions/PageStart/;path:=/Extensions/PageStart/;overwriteProperties:=true;uninstall:=true,
SLING-INF/content/Extensions/LoginPageStart/;path:=/Extensions/LoginPageStart/;overwriteProperties:=true;uninstall:=true,
SLING-INF/content/Extensions/SurveyPageStart/;path:=/Extensions/SurveyPageStart/;overwriteProperties:=true;uninstall:=true,
SLING-INF/content/Extensions/AdminDashboard/;path:=/Extensions/AdminDashboard/;overwriteProperties:=true;uninstall:=true,
SLING-INF/content/Extensions/Views/;path:=/Extensions/Views/;overwriteProperties:=true;uninstall:=true,
</Sling-Initial-Content>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"jcr:primaryType": "cards:Extension",
"cards:extensionPointId": "patient-portal/surveyPageStart",
"cards:extensionName": "Downtime Warning Banner",
"cards:extensionRenderURL": "asset:cards-downtime-warning-banner.downtimeBanner.js"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import QuestionnaireSet from "./QuestionnaireSet.jsx";
import PatientIdentification from "./PatientIdentification.jsx";
import Footer from "./Footer.jsx";
import ErrorPage from "../components/ErrorPage.jsx";
import PageStart from '../PageStart';

import { DEFAULT_INSTRUCTIONS, SURVEY_INSTRUCTIONS_PATH } from "./SurveyInstructionsConfiguration.jsx"

Expand Down Expand Up @@ -111,16 +112,21 @@ function PatientPortalHomepage (props) {
const hist = createBrowserHistory();
hist.listen(({action, location}) => window.dispatchEvent(new Event("beforeunload")));
ReactDOM.render(
<StyledEngineProvider injectFirst>
<ThemeProvider theme={appTheme}>
<Router history={hist}>
<Switch color="secondary">
<Route path="/Survey.html/" component={PatientPortalHomepage} />
<Redirect from="/Survey" to="/Survey.html/"/>
</Switch>
</Router>
</ThemeProvider>
</StyledEngineProvider>,
<React.Fragment>
<StyledEngineProvider injectFirst>
<ThemeProvider theme={appTheme}>
<PageStart
extensionsName="SurveyPageStart"
/>
<Router history={hist}>
<Switch color="secondary">
<Route path="/Survey.html/" component={PatientPortalHomepage} />
<Redirect from="/Survey" to="/Survey.html/"/>
</Switch>
</Router>
</ThemeProvider>
</StyledEngineProvider>
</React.Fragment>,
document.querySelector('#patient-portal-container')
);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"jcr:primaryType": "cards:ExtensionPoint",
"cards:extensionPointId": "patient-portal/surveyPageStart",
"cards:extensionPointName": "Content to be displayed on the top of the Patient Portal"
}

0 comments on commit a6ff8bb

Please sign in to comment.