Skip to content

Commit

Permalink
#3134: Make diagram the central component
Browse files Browse the repository at this point in the history
  • Loading branch information
VassilIordanov committed Aug 10, 2020
1 parent d6c83e9 commit de0c186
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 112 deletions.
14 changes: 3 additions & 11 deletions client/src/pages/organizations/Laydown.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,12 @@ const OrganizationLaydown = ({ organization }) => {

return (
<Element name="laydown">
<Element
<Fieldset
id="orgChart"
name="orgChart"
className="scroll-anchor-container"
style={{ background: "none" }}
>
<div style={{ display: "flex", flexDirection: "column" }}>
<div>
<h2 className="legend">
<span className="title-text">Organization Diagram</span>
</h2>
</div>
<div>
<ContainerDimensions>
{({ width, height }) => (
<OrganizationalChart
Expand All @@ -51,9 +45,7 @@ const OrganizationLaydown = ({ organization }) => {
/>
)}
</ContainerDimensions>
</div>
</div>
</Element>
</Fieldset>

<Fieldset
id="supportedPositions"
Expand Down
101 changes: 0 additions & 101 deletions client/src/pages/organizations/Show.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,107 +261,6 @@ const OrganizationShow = ({ pageDispatchers }) => {
title={`Organization ${organization.shortName}`}
action={action}
/>
<Fieldset id="info">
<Field
name="status"
component={FieldHelper.ReadonlyField}
humanValue={Organization.humanNameOfStatus}
/>

<Field
name="type"
component={FieldHelper.ReadonlyField}
humanValue={Organization.humanNameOfType}
/>

<LongNameWithLabel
dictProps={orgSettings.longName}
name="longName"
component={FieldHelper.ReadonlyField}
/>

<IdentificationCodeFieldWithLabel
dictProps={orgSettings.identificationCode}
name="identificationCode"
component={FieldHelper.ReadonlyField}
/>

{organization.parentOrg && organization.parentOrg.uuid && (
<Field
name="parentOrg"
component={FieldHelper.ReadonlyField}
label={Settings.fields.organization.parentOrg}
humanValue={
organization.parentOrg && (
<LinkTo
modelType="Organization"
model={organization.parentOrg}
>
{organization.parentOrg.shortName}{" "}
{organization.parentOrg.longName}{" "}
{organization.parentOrg.identificationCode}
</LinkTo>
)
}
/>
)}

{organization.isAdvisorOrg() && (
<Field
name="superUsers"
component={FieldHelper.ReadonlyField}
label="Super users"
humanValue={
<>
{superUsers.map(position => (
<p key={position.uuid}>
{position.person ? (
<LinkTo
modelType="Person"
model={position.person}
/>
) : (
<i>
<LinkTo modelType="Position" model={position} />
- (Unfilled)
</i>
)}
</p>
))}
{superUsers.length === 0 && (
<p>
<i>No super users</i>
</p>
)}
</>
}
/>
)}

{organization.childrenOrgs &&
organization.childrenOrgs.length > 0 && (
<Field
name="childrenOrgs"
component={FieldHelper.ReadonlyField}
label="Sub organizations"
humanValue={
<ListGroup>
{organization.childrenOrgs.map(organization => (
<ListGroupItem key={organization.uuid}>
<LinkTo
modelType="Organization"
model={organization}
>
{organization.shortName} {organization.longName}{" "}
{organization.identificationCode}
</LinkTo>
</ListGroupItem>
))}
</ListGroup>
}
/>
)}
</Fieldset>

<OrganizationLaydown organization={organization} />
{!isPrincipalOrg && <Approvals relatedObject={organization} />}
Expand Down

0 comments on commit de0c186

Please sign in to comment.