Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:opencrvs/opencrvs-core into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
euanmillar committed Jun 27, 2022
2 parents 4c9520c + 4cb8f86 commit e415bc9
Show file tree
Hide file tree
Showing 12 changed files with 395 additions and 264 deletions.
310 changes: 101 additions & 209 deletions packages/client/graphql.schema.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export function generateConfigFields(
defaultForm: ISerializedForm,
questions: IQuestionConfig[]
) {
questions = questions.filter((question) => question.fieldId.includes(event))
questions = questions.filter((question) => question.fieldId.startsWith(event))
/*
* We get a list of all the fields, configured & default,
* transformed into questionConfigs
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/forms/configuration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function mergeIdentifiers(
return [
...mergedIdentifiers.filter(
({ sectionIndex, groupIndex }) =>
sectionIndex !== questionIdentifiers.sectionIndex &&
sectionIndex !== questionIdentifiers.sectionIndex ||
groupIndex !== questionIdentifiers.groupIndex
),
currentFieldIdentifier
Expand Down Expand Up @@ -292,7 +292,7 @@ export function getConfiguredOrDefaultForm(
? getConfiguredForm(
formWithAddresses,
formConfig.questionConfig.filter(({ fieldId }) =>
fieldId.includes(event)
fieldId.startsWith(event)
)
)
: formWithAddresses
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/forms/questionConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function getConfiguredQuestions(
...orderedQuestions,
...orderByPosition([
...customizedQuestions.filter(({ fieldId }) =>
fieldId.includes(section)
fieldId.startsWith(`${event}.${section}`)
),
...nonCustomizedQuestions
])
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/search/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const SEARCH_EVENTS = gql`
$contactNumber: String
$registrationNumber: String
$name: String
$locationIds: [String]
$locationIds: [String!]
) {
searchEvents(
sort: $sort
Expand Down Expand Up @@ -72,7 +72,7 @@ export const SEARCH_DECLARATIONS_USER_WISE = gql`
query searchDeclarationsUserWise(
$status: [String]
$userId: String
$locationIds: [String]
$locationIds: [String!]
$sort: String
$count: Int
$skip: Int
Expand Down Expand Up @@ -122,7 +122,7 @@ export const COUNT_USER_WISE_DECLARATIONS = gql`
query countUserWiseDeclarations(
$status: [String]
$userId: String
$locationIds: [String]
$locationIds: [String!]
) {
searchEvents(status: $status, userId: $userId, locationIds: $locationIds) {
totalItems
Expand Down
Loading

0 comments on commit e415bc9

Please sign in to comment.