Skip to content

Commit

Permalink
Put attendeeGroups under reportPeople setting in the dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
gjvoosten committed Dec 6, 2023
1 parent 29324e7 commit 662a77f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
8 changes: 4 additions & 4 deletions anet-dictionary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ fields:
minAttendingAuthors: 1
optionalPrimaryAdvisor: false
optionalPrimaryPrincipal: true
attendeeGroups:
- label: Linguists
filter:
orgUuid: 70193ee9-05b4-4aac-80b5-75609825db9f
customFields:
relatedReport:
type: anet_object
Expand Down Expand Up @@ -512,10 +516,6 @@ fields:
typeError: Qty must be a number
label: Qty
visibleWhen: $[?(@ && @.multipleButtons && (@.multipleButtons.indexOf('assist') != -1 || @.multipleButtons.indexOf('other') != -1))]
attendeeGroups:
- label: Linguists
filter:
orgUuid: 70193ee9-05b4-4aac-80b5-75609825db9f

person:
status:
Expand Down
3 changes: 2 additions & 1 deletion client/src/pages/reports/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ const ReportForm = ({
}

// Add attendee groups defined in the dictionary
const attendeeGroups = Settings.fields.report.attendeeGroups ?? []
const attendeeGroups =
Settings.fields.report.reportPeople?.attendeeGroups ?? []
attendeeGroups.forEach(({ label, filter: queryVars }) => {
reportPeopleFilters[label] = { label, queryVars }
})
Expand Down
38 changes: 19 additions & 19 deletions src/main/resources/anet-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -652,29 +652,29 @@ properties:
optionalPrimaryPrincipal:
type: boolean
default: false
attendeeGroups:
type: array
uniqueItems: true
items:
type: object
additionalProperties: false
title: Attendee-group
required: [label, filter]
properties:
label:
type: string
title: The label of the attendee group
filter:
type: object
title: Attendee group filters
properties:
orgUuid:
type: string
title: UUID of organisation membership to form
customFields:
type: object
additionalProperties:
"$ref": "#/$defs/customField"
attendeeGroups:
type: array
uniqueItems: true
items:
type: object
additionalProperties: false
title: Attendee-group
required: [label, filter]
properties:
label:
type: string
title: The label of the attendee group
filter:
type: object
title: Attendee group filters
properties:
orgUuid:
type: string
title: UUID of organisation membership to form

person:
type: object
Expand Down
8 changes: 4 additions & 4 deletions testDictionaries/no-custom-fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ fields:
minAttendingAuthors: 1
optionalPrimaryAdvisor: false
optionalPrimaryPrincipal: true
attendeeGroups:
- label: Linguists
filter:
orgUuid: 70193ee9-05b4-4aac-80b5-75609825db9f
attendeeGroups:
- label: Linguists
filter:
orgUuid: 70193ee9-05b4-4aac-80b5-75609825db9f

person:
status:
Expand Down

0 comments on commit 662a77f

Please sign in to comment.