Skip to content

Commit

Permalink
Hide associated authorities for place and person
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejritter committed Feb 27, 2024
1 parent 329685c commit e4c9081
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import conservation from './conservation';
import exhibition from './exhibition';
import iterationreport from './iterationreport';
import objectexit from './objectexit';
import person from './person';
import place from './place';

export default [
Expand All @@ -15,5 +16,6 @@ export default [
exhibition,
iterationreport,
objectexit,
person,
place,
];
218 changes: 218 additions & 0 deletions src/plugins/recordTypes/person/forms/default.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
import { defineMessages } from 'react-intl';

const template = (configContext) => {
const {
React,
} = configContext.lib;

const {
Col,
Panel,
Row,
} = configContext.layoutComponents;

const {
InputTable,
Field,
Subrecord,
} = configContext.recordComponents;

return (
<Field name="document">
<Panel name="info" collapsible>
<Field name="personTermGroupList">
<Field name="personTermGroup">
<Panel>
<Row>
<Field name="termDisplayName" />
<Field name="termName" />
<Field name="termQualifier" />
<Field name="termStatus" />
</Row>

<Row>
<Field name="termType" />
<Field name="termFlag" />
<Field name="termLanguage" />
<Field name="termPrefForLang" />
</Row>

<InputTable name="nameDetail">
<Field name="salutation" />
<Field name="title" />
<Field name="foreName" />
<Field name="middleName" />
<Field name="surName" />
<Field name="nameAdditions" />
<Field name="initials" />
</InputTable>

<InputTable name="termSource">
<Field name="termSource" />
<Field name="termSourceDetail" />
<Field name="termSourceID" />
<Field name="termSourceNote" />
</InputTable>
</Panel>
</Field>
</Field>

<Row>
<Col>
<Field name="gender" />

<Field name="occupations">
<Field name="occupation" />
</Field>

<Field name="schoolsOrStyles">
<Field name="schoolOrStyle" />
</Field>

<Field name="groups">
<Field name="group" />
</Field>

<Field name="nationalities">
<Field name="nationality" />
</Field>
</Col>
<Col>
<Field name="nameNote" />

<Row>
<Field name="birthDateGroup" />
<Field name="birthPlace" />
</Row>

<Row>
<Field name="deathDateGroup" />
<Field name="deathPlace" />
</Row>

<Field name="bioNote" />
</Col>
</Row>
</Panel>

<Subrecord name="contact" />

<Panel name="supplied" collapsible collapsed>
<Field name="pronounGroupList">
<Field name="pronounGroup">
<Panel>
<Row>
<Field name="declinedToAnswerPronoun" />
<Field name="suppliedPronouns">
<Field name="suppliedPronoun" />
</Field>
<Field name="useRestrictionPronoun" />
</Row>
</Panel>
</Field>
</Field>
<Field name="genderGroupList">
<Field name="genderGroup">
<Panel>
<Row>
<Field name="declinedToAnswerGender" />
<Field name="suppliedGenders">
<Field name="suppliedGender" />
</Field>
<Field name="useRestrictionGender" />
</Row>
</Panel>
</Field>
</Field>
<Field name="raceGroupList">
<Field name="raceGroup">
<Panel>
<Row>
<Field name="declinedToAnswerRace" />
<Field name="suppliedRaces">
<Field name="suppliedRace" />
</Field>
<Field name="useRestrictionRace" />
</Row>
</Panel>
</Field>
</Field>
<Field name="ethnicityGroupList">
<Field name="ethnicityGroup">
<Panel>
<Row>
<Field name="declinedToAnswerEthnicity" />
<Field name="suppliedEthnicities">
<Field name="suppliedEthnicity" />
</Field>
<Field name="useRestrictionEthnicity" />
</Row>
</Panel>
</Field>
</Field>
<Field name="sexualityGroupList">
<Field name="sexualityGroup">
<Panel>
<Row>
<Field name="declinedToAnswerSexuality" />
<Field name="suppliedSexualities">
<Field name="suppliedSexuality" />
</Field>
<Field name="useRestrictionSexuality" />
</Row>
</Panel>
</Field>
</Field>
<Field name="birthPlaceGroupList">
<Field name="birthPlaceGroup">
<Panel>
<Row>
<Field name="declinedToAnswerBirthPlace" />
<Field name="suppliedBirthPlace" />
<Field name="useRestrictionBirthPlace" />
</Row>
</Panel>
</Field>
</Field>
<Field name="suppliedBirthDateGroupList">
<Field name="suppliedBirthDateGroup">
<Panel>
<Row>
<Field name="declinedToAnswerBirthDate" />
<Field name="suppliedStructuredBirthDateGroup" />
<Field name="useRestrictionBirthDate" />
</Row>
</Panel>
</Field>
</Field>
<Field name="otherGroupList">
<Field name="otherGroup">
<Panel>
<Row>
<Field name="informationAuthor" />
<Field name="informationDate" />
<Field name="informationUseRestriction" />
</Row>
<Field name="otherInformation" />
</Panel>
</Field>
</Field>
</Panel>

<Panel name="hierarchy" collapsible collapsed>
<Field name="relation-list-item" subpath="rel:relations-common-list" />
</Panel>

</Field>
);
};

export default (configContext) => ({
messages: defineMessages({
name: {
id: 'form.person.default.name',
defaultMessage: 'Standard Template',
},
}),
template: template(configContext),
});
5 changes: 5 additions & 0 deletions src/plugins/recordTypes/person/forms/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import defaultForm from './default';

export default (configContext) => ({
default: defaultForm(configContext),
});
9 changes: 9 additions & 0 deletions src/plugins/recordTypes/person/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import forms from './forms';

export default () => (configContext) => ({
recordTypes: {
person: {
forms: forms(configContext),
},
},
});
Loading

0 comments on commit e4c9081

Please sign in to comment.