Skip to content

Commit

Permalink
AB#245: Add diagrams to organizations page
Browse files Browse the repository at this point in the history
  • Loading branch information
anilsonmez-simsoft committed Dec 9, 2021
1 parent 65f8912 commit c85e3e6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion client/src/pages/organizations/Show.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ import API from "api"
import AppContext from "components/AppContext"
import Approvals from "components/approvals/Approvals"
import { ReadonlyCustomFields } from "components/CustomFields"
import DiagramsContainer from "components/Diagrams"
import * as FieldHelper from "components/FieldHelper"
import Fieldset from "components/Fieldset"
import GuidedTour from "components/GuidedTour"
import LinkTo from "components/LinkTo"
import Messages from "components/Messages"
import Model, { DEFAULT_CUSTOM_FIELDS_PARENT } from "components/Model"
import Model, {
DEFAULT_CUSTOM_FIELDS_PARENT,
NOTE_TYPE
} from "components/Model"
import { AnchorNavItem } from "components/Nav"
import {
jumpToTop,
Expand Down Expand Up @@ -233,6 +237,9 @@ const OrganizationShow = ({ pageDispatchers }) => {
if (includeChildrenOrgs) {
reportQueryParams.orgRecurseStrategy = RECURSE_STRATEGY.CHILDREN
}
const diagrams = organization.notes.filter(
note => note.type === NOTE_TYPE.DIAGRAM
)

return (
<Formik enableReinitialize initialValues={organization}>
Expand Down Expand Up @@ -481,6 +488,14 @@ const OrganizationShow = ({ pageDispatchers }) => {
/>
</Fieldset>
)}
<DiagramsContainer
diagrams={diagrams}
relatedObject={organization}
entityType={Organization}
onDiagramUpdate={() => {
refetch()
}}
/>
</Form>
</div>
)
Expand Down

0 comments on commit c85e3e6

Please sign in to comment.