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 21, 2023
1 parent 0199f09 commit 62b1bf8
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:
optionalAttendingAuthor: false
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 @@ -655,29 +655,29 @@ properties:
type: boolean
default: false
description: Defines if having a primary principal for a report is optional
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:
optionalAttendingAuthor: false
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 62b1bf8

Please sign in to comment.