Skip to content

Commit

Permalink
DRYD-1316: Add object count group fields (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejritter authored Jan 26, 2024
1 parent 90c22fe commit 45a056c
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 0 deletions.
117 changes: 117 additions & 0 deletions src/plugins/recordTypes/collectionobject/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -6207,6 +6207,123 @@ export default (configContext) => {
},
},
},
objectCountGroupList: {
[config]: {
view: {
type: CompoundInput,
},
},
objectCountGroup: {
[config]: {
messages: defineMessages({
name: {
id: 'field.collectionobjects_common.objectCountGroup.name',
defaultMessage: 'Object count',
},
}),
repeating: true,
view: {
type: CompoundInput,
},
},
objectCount: {
[config]: {
dataType: DATA_TYPE_INT,
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.objectCount.fullName',
defaultMessage: 'Object count value',
},
name: {
id: 'field.collectionobjects_common.objectCount.name',
defaultMessage: 'Value',
},
}),
view: {
type: TextInput,
},
},
},
objectCountType: {
[config]: {
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.objectCountType.fullName',
defaultMessage: 'Object count type',
},
name: {
id: 'field.collectionobjects_common.objectCountType.name',
defaultMessage: 'Type',
},
}),
view: {
type: TermPickerInput,
props: {
source: 'objectcounttypes',
},
},
},
},
objectCountCountedBy: {
[config]: {
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.objectCountCountedBy.fullName',
defaultMessage: 'Object count counted by',
},
name: {
id: 'field.collectionobjects_common.objectCountCountedBy.name',
defaultMessage: 'Counted by',
},
}),
view: {
type: AutocompleteInput,
props: {
source: 'person/local,person/shared,person/ulan',
},
},
},
},
objectCountDate: {
[config]: {
dataType: DATA_TYPE_DATE,
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.objectCountDate.fullName',
defaultMessage: 'Object count date',
},
name: {
id: 'field.collectionobjects_common.objectCountDate.name',
defaultMessage: 'Date',
},
}),
view: {
type: DateInput,
},
},
},
objectCountNote: {
[config]: {
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.objectCountNote.fullName',
defaultMessage: 'Object count note',
},
name: {
id: 'field.collectionobjects_common.objectCountNote.name',
defaultMessage: 'Note',
},
}),
view: {
type: TextInput,
props: {
multiline: true,
},
},
},
},
},
},
},
},
};
Expand Down
15 changes: 15 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ const template = (configContext) => {
<Field name="objectNameNote" />
</Field>
</Field>

<Field name="objectCountGroupList">
<Field name="objectCountGroup">
<Panel>
<Row>
<Field name="objectCount" />
<Field name="objectCountType" />
<Field name="objectCountCountedBy" />
<Field name="objectCountDate" />
</Row>
<Field name="objectCountNote" />
</Panel>
</Field>
</Field>

</Panel>

<Panel name="desc" collapsible collapsed>
Expand Down
14 changes: 14 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/photo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ const template = (configContext) => {
<Field name="objectNameNote" />
</Field>
</Field>

<Field name="objectCountGroupList">
<Field name="objectCountGroup">
<Panel>
<Row>
<Field name="objectCount" />
<Field name="objectCountType" />
<Field name="objectCountCountedBy" />
<Field name="objectCountDate" />
</Row>
<Field name="objectCountNote" />
</Panel>
</Field>
</Field>
</Panel>

<Panel name="desc" collapsible collapsed>
Expand Down
13 changes: 13 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/public.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ const template = (configContext) => {
</Field>
</Field>

<Field name="objectCountGroupList">
<Field name="objectCountGroup">
<Panel>
<Row>
<Field name="objectCount" />
<Field name="objectCountType" />
<Field name="objectCountCountedBy" />
<Field name="objectCountDate" />
</Row>
<Field name="objectCountNote" />
</Panel>
</Field>
</Field>
</Panel>

<Panel name="desc" collapsible>
Expand Down
14 changes: 14 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/timebased.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ const template = (configContext) => {
</Field>
</Field>

<Field name="objectCountGroupList">
<Field name="objectCountGroup">
<Panel>
<Row>
<Field name="objectCount" />
<Field name="objectCountType" />
<Field name="objectCountCountedBy" />
<Field name="objectCountDate" />
</Row>
<Field name="objectCountNote" />
</Panel>
</Field>
</Field>

<Field name="objectSignificanceGroupList">
<Field name="objectSignificanceGroup">
<Field name="assignedSignificance" />
Expand Down

0 comments on commit 45a056c

Please sign in to comment.