Skip to content

Commit

Permalink
#1051 - display UUID along with audit fields for ease of copying
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed Oct 18, 2023
1 parent c612e46 commit 687b1a6
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/adminApp/ApplicationMenu/ApplicationMenuShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Title } from "react-admin";
import Button from "@material-ui/core/Button";
import Grid from "@material-ui/core/Grid";
import _ from "lodash";
import { Audit } from "../../formDesigner/components/Audit";
import { SystemInfo } from "../../formDesigner/components/SystemInfo";
import RuleDisplay from "../components/RuleDisplay";
import ApplicationMenuService from "../service/ApplicationMenuService";
import { ShowLabelValue } from "../../formDesigner/common/ShowLabelValue";
Expand Down Expand Up @@ -52,7 +52,7 @@ const ApplicationMenuShow = props => {
<p />
</>
)}
<Audit {...menuItem} />
<SystemInfo {...menuItem} />
</div>
{editAlert && <Redirect to={"/appDesigner/applicationMenu/" + props.match.params.id} />}
</Box>
Expand Down
4 changes: 2 additions & 2 deletions src/adminApp/EncounterType/EncounterTypeShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
findProgramEncounterForm
} from "../domain/formMapping";
import { BooleanStatusInShow } from "../../common/components/BooleanStatusInShow";
import { Audit } from "../../formDesigner/components/Audit";
import { SystemInfo } from "../../formDesigner/components/SystemInfo";
import RuleDisplay from "../components/RuleDisplay";
import { MessageReducer } from "../../formDesigner/components/MessageRule/MessageReducer";
import { getMessageRules, getMessageTemplates } from "../service/MessageService";
Expand Down Expand Up @@ -166,7 +166,7 @@ const EncounterTypeShow = props => {
readOnly={true}
/>
<p />
<Audit {...encounterType} />
<SystemInfo {...encounterType} />
</div>

{editAlert && <Redirect to={"/appDesigner/encounterType/" + props.match.params.id} />}
Expand Down
4 changes: 2 additions & 2 deletions src/adminApp/Program/ProgramShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ShowSubjectType } from "../WorkFlow/ShowSubjectType";
import { get, identity } from "lodash";
import { findProgramEnrolmentForm, findProgramExitForm } from "../domain/formMapping";
import { BooleanStatusInShow } from "../../common/components/BooleanStatusInShow";
import { Audit } from "../../formDesigner/components/Audit";
import { SystemInfo } from "../../formDesigner/components/SystemInfo";
import RuleDisplay from "../components/RuleDisplay";
import { MessageReducer } from "../../formDesigner/components/MessageRule/MessageReducer";
import { getMessageRules, getMessageTemplates } from "../service/MessageService";
Expand Down Expand Up @@ -173,7 +173,7 @@ const ProgramShow = props => {
entityTypeId={program.programId}
readOnly={true}
/>
<Audit {...program} />
<SystemInfo {...program} />
</div>

{editAlert && <Redirect to={"/appDesigner/program/" + props.match.params.id} />}
Expand Down
4 changes: 2 additions & 2 deletions src/adminApp/SubjectType/SubjectTypeShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { GroupRoleShow } from "./GroupRoleShow";
import { findRegistrationForm } from "../domain/formMapping";
import { useFormMappings, useLocationType } from "./effects";
import { BooleanStatusInShow } from "../../common/components/BooleanStatusInShow";
import { Audit } from "../../formDesigner/components/Audit";
import { SystemInfo } from "../../formDesigner/components/SystemInfo";
import { AdvancedSettingShow } from "./AdvancedSettingShow";
import RuleDisplay from "../components/RuleDisplay";
import { MessageReducer } from "../../formDesigner/components/MessageRule/MessageReducer";
Expand Down Expand Up @@ -150,7 +150,7 @@ const SubjectTypeShow = props => {
/>
{subjectType.group && <GroupRoleShow groupRoles={subjectType.groupRoles} />}
<AdvancedSettingShow locationTypes={locationTypes} subjectType={subjectType} />
<Audit {...subjectType} />
<SystemInfo {...subjectType} />
</div>
{editAlert && <Redirect to={"/appDesigner/subjectType/" + props.match.params.id} />}
</Box>
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/components/Documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DocumentationItem } from "./DocumentationItem";
import { SaveComponent } from "../../common/components/SaveComponent";
import api from "../api";
import { cloneForSave } from "../reducers";
import { Audit } from "../../formDesigner/components/Audit";
import { SystemInfo } from "../../formDesigner/components/SystemInfo";
import { Privilege } from "openchs-models";
import UserInfo from "../../common/model/UserInfo";
import { connect } from "react-redux";
Expand Down Expand Up @@ -96,7 +96,7 @@ const Documentation = ({ userInfo }) => {
/>
<Box mt={2} />
{createdBy && (
<Audit
<SystemInfo
direction={"row"}
createdDateTime={createdDateTime}
lastModifiedDateTime={lastModifiedDateTime}
Expand Down
4 changes: 2 additions & 2 deletions src/formDesigner/components/ConceptDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Checkbox from "@material-ui/core/Checkbox";
import { withRouter } from "react-router-dom";
import { isEmpty, isNil, orderBy } from "lodash";
import { BooleanStatusInShow } from "../../common/components/BooleanStatusInShow";
import { Audit } from "./Audit";
import { SystemInfo } from "./SystemInfo";
import UserInfo from "../../common/model/UserInfo";
import { connect } from "react-redux";
import { Privilege } from "openchs-models";
Expand Down Expand Up @@ -311,7 +311,7 @@ function ConceptDetails({ userInfo, ...props }) {
</>

<p />
<Audit {...data} />
<SystemInfo {...data} />
</div>

{editAlert && <Redirect to={"/appdesigner/concept/" + props.match.params.uuid + "/edit"} />}
Expand Down
14 changes: 13 additions & 1 deletion src/formDesigner/components/SystemInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import React from "react";
import { Grid } from "@material-ui/core";
import FormLabel from "@material-ui/core/FormLabel";
import { createdAudit, modifiedAudit } from "../../adminApp/components/AuditUtil";
import _ from "lodash";

export const Audit = ({
export const SystemInfo = ({
uuid,
createdBy,
lastModifiedBy,
createdDateTime,
Expand Down Expand Up @@ -40,6 +42,16 @@ export const Audit = ({
})}
</span>
</Grid>
{!_.isEmpty(uuid) && (
<Grid item container direction={"column"} spacing={1} xs={8}>
<Grid item>
<FormLabel style={{ fontSize: "13px" }}>UUID </FormLabel>
</Grid>
<Grid item>
<span style={{ fontSize: "15px" }}>{uuid}</span>
</Grid>
</Grid>
)}
</Grid>
</Grid>
);
Expand Down
4 changes: 2 additions & 2 deletions src/formDesigner/views/FormDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Redirect } from "react-router-dom";

import { SaveComponent } from "../../common/components/SaveComponent";
import FormLevelRules from "../components/FormLevelRules";
import { Audit } from "../components/Audit";
import { SystemInfo } from "../components/SystemInfo";
import StaticFormElementGroup from "../components/StaticFormElementGroup";
import { DeclarativeRuleHolder } from "rules-config";
import FormDesignerContext from "./FormDesignerContext";
Expand Down Expand Up @@ -1124,7 +1124,7 @@ class FormDetails extends Component {
</Droppable>
</DragDropContext>

<Audit {...this.state.form} direction={"row"} />
<SystemInfo {...this.state.form} direction={"row"} />
{/* </div> */}
</TabContainer>

Expand Down

0 comments on commit 687b1a6

Please sign in to comment.