|
|
@@ -1,13 +1,12 @@
|
|
|
import React, { PureComponent } from 'react';
|
|
|
import { hot } from 'react-hot-loader';
|
|
|
import { connect } from 'react-redux';
|
|
|
-import PageHeader from '../../core/components/PageHeader/PageHeader';
|
|
|
-import PageLoader from '../../core/components/PageLoader/PageLoader';
|
|
|
+import Page from 'app/core/components/Page/Page';
|
|
|
import OrgProfile from './OrgProfile';
|
|
|
import SharedPreferences from 'app/core/components/SharedPreferences/SharedPreferences';
|
|
|
import { loadOrganization, setOrganizationName, updateOrganization } from './state/actions';
|
|
|
import { NavModel, Organization, StoreState } from 'app/types';
|
|
|
-import { getNavModel } from '../../core/selectors/navModel';
|
|
|
+import { getNavModel, getTitleFromNavModel } from 'app/core/selectors/navModel';
|
|
|
|
|
|
export interface Props {
|
|
|
navModel: NavModel;
|
|
|
@@ -35,22 +34,23 @@ export class OrgDetailsPage extends PureComponent<Props> {
|
|
|
const isLoading = Object.keys(organization).length === 0;
|
|
|
|
|
|
return (
|
|
|
- <div>
|
|
|
- <PageHeader model={navModel} />
|
|
|
- <div className="page-container page-body">
|
|
|
- {isLoading && <PageLoader pageName="Organization" />}
|
|
|
- {!isLoading && (
|
|
|
- <div>
|
|
|
- <OrgProfile
|
|
|
- onOrgNameChange={name => this.onOrgNameChange(name)}
|
|
|
- onSubmit={this.onUpdateOrganization}
|
|
|
- orgName={organization.name}
|
|
|
- />
|
|
|
- <SharedPreferences resourceUri="org" />
|
|
|
+ <Page title={getTitleFromNavModel(navModel)}>
|
|
|
+ <Page.Header model={navModel} />
|
|
|
+ <Page.Contents isLoading={isLoading}>
|
|
|
+ <div className="page-container page-body">
|
|
|
+ {!isLoading && (
|
|
|
+ <div>
|
|
|
+ <OrgProfile
|
|
|
+ onOrgNameChange={name => this.onOrgNameChange(name)}
|
|
|
+ onSubmit={this.onUpdateOrganization}
|
|
|
+ orgName={organization.name}
|
|
|
+ />
|
|
|
+ <SharedPreferences resourceUri="org" />
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
</div>
|
|
|
- )}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </Page.Contents>
|
|
|
+ </Page>
|
|
|
);
|
|
|
}
|
|
|
}
|