From ef95180c4261106cd409dc674abdb4b9ee32327b Mon Sep 17 00:00:00 2001 From: euanmillar Date: Fri, 24 Jun 2022 14:39:14 +0100 Subject: [PATCH 1/7] Add cert link and rename SMS env vars --- .../Config/Certificates/Certificates.tsx | 23 +++++++++++++------ packages/notification/src/constants.ts | 4 ++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/client/src/views/SysAdmin/Config/Certificates/Certificates.tsx b/packages/client/src/views/SysAdmin/Config/Certificates/Certificates.tsx index 624f0dbd47f..5bb12d5e748 100644 --- a/packages/client/src/views/SysAdmin/Config/Certificates/Certificates.tsx +++ b/packages/client/src/views/SysAdmin/Config/Certificates/Certificates.tsx @@ -23,7 +23,11 @@ import { connect } from 'react-redux' import { RouteComponentProps } from 'react-router' import styled from 'styled-components' import { SysAdminContentWrapper } from '@client/views/SysAdmin/SysAdminContentWrapper' -import { PrimaryButton, TertiaryButton } from '@opencrvs/components/lib/buttons' +import { + LinkButton, + PrimaryButton, + TertiaryButton +} from '@opencrvs/components/lib/buttons' import { messages } from '@client/i18n/messages/views/config' import { messages as imageUploadMessages } from '@client/i18n/messages/views/imageUpload' import { buttonMessages } from '@client/i18n/messages/buttons' @@ -78,10 +82,6 @@ const Value = styled.span` ${({ theme }) => theme.fonts.reg16} ` -const BlueTitle = styled.span` - color: ${({ theme }) => theme.colors.tertiary}; -` - export type Scope = string[] export enum SVGFile { @@ -469,9 +469,18 @@ class CertificatesConfigComponent extends React.Component { <> {intl.formatMessage(messages.listDetails)} - + { + window.open( + 'https://documentation.opencrvs.org/setup/4.-functional-configuration/4.4-configure-a-certificate-template', + '_blank', + 'noopener,noreferrer' + ) + }} + > {intl.formatMessage(messages.listDetailsQsn)} - + diff --git a/packages/notification/src/constants.ts b/packages/notification/src/constants.ts index 45ffdb5468a..95aef170500 100644 --- a/packages/notification/src/constants.ts +++ b/packages/notification/src/constants.ts @@ -41,8 +41,8 @@ export const INFOBIP_API_KEY = process.env.INFOBIP_API_KEY_PATH ? readFileSync(process.env.INFOBIP_API_KEY_PATH).toString() : '' -export const INFOBIP_SENDER_ID = process.env.INFOBIP_SENDER_ID - ? readFileSync(process.env.INFOBIP_SENDER_ID).toString() +export const INFOBIP_SENDER_ID = process.env.INFOBIP_SENDER_ID_PATH + ? readFileSync(process.env.INFOBIP_SENDER_ID_PATH).toString() : '' export const CERT_PUBLIC_KEY_PATH = From 384b8edbedd41fc56f95f0edfafcd423ae77a49d Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Mon, 27 Jun 2022 12:18:18 +0600 Subject: [PATCH 2/7] Provided a way to recover from error --- .../client/src/views/RecordAudit/RecordAudit.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/client/src/views/RecordAudit/RecordAudit.tsx b/packages/client/src/views/RecordAudit/RecordAudit.tsx index 2ed38075146..d1c606bcf70 100644 --- a/packages/client/src/views/RecordAudit/RecordAudit.tsx +++ b/packages/client/src/views/RecordAudit/RecordAudit.tsx @@ -60,7 +60,8 @@ import { ResponsiveModal, Loader, PageHeader, - IPageHeaderProps + IPageHeaderProps, + ErrorToastNotification } from '@opencrvs/components/lib/interface' import { getScope } from '@client/profile/profileSelectors' import { Scope, hasRegisterScope } from '@client/utils/authUtils' @@ -122,6 +123,7 @@ import { } from './mutations' import { selectDeclaration } from '@client/declarations/selectors' import { OperationVariables } from 'apollo-client' +import { errorMessages } from '@client/i18n/messages/errors' const DesktopHeader = styled(Header)` @media (max-width: ${({ theme }) => theme.grid.breakpoints.lg}px) { @@ -672,7 +674,14 @@ function getBodyContent({ if (loading) { return } else if (error) { - return + return ( + refetch()} + > + {intl.formatMessage(errorMessages.pleaseTryAgainError)} + + ) } let declaration From b12aa35045352e09fbcbee71b1ad0d43e06ad2c4 Mon Sep 17 00:00:00 2001 From: Sadman Anik Date: Mon, 27 Jun 2022 13:41:11 +0600 Subject: [PATCH 3/7] Fixed from config update bug --- packages/workflow/src/utils/formDraftUtils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/workflow/src/utils/formDraftUtils.ts b/packages/workflow/src/utils/formDraftUtils.ts index 84f8ed799cf..7d4443b8881 100644 --- a/packages/workflow/src/utils/formDraftUtils.ts +++ b/packages/workflow/src/utils/formDraftUtils.ts @@ -13,6 +13,7 @@ import fetch from 'node-fetch' import { logger } from '@workflow/logger' import { APPLICATION_CONFIG_URL } from '@workflow/constants' import { setupTestExtension } from '@workflow/features/registration/fhir/fhir-bundle-modifier' +import { EVENT_TYPE } from '@workflow/features/registration/fhir/constants' export enum DraftStatus { DRAFT = 'DRAFT', @@ -22,6 +23,7 @@ export enum DraftStatus { export interface IDraft { status: DraftStatus + event: EVENT_TYPE } export async function getFormDraft(token: string) { @@ -47,7 +49,7 @@ export async function checkFormDraftStatusToAddTestExtension( const formDraft: IDraft[] = await getFormDraft(token) // Array.prototype.every returns true for an empty array const isPublished = - formDraft.length > 0 && + formDraft.length === Object.values(EVENT_TYPE).length && Object.values(formDraft).every( (draft) => draft.status === DraftStatus.PUBLISHED ) From 79d6899a7e1d5fb862cb6ea707af76b6fd99902e Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Mon, 27 Jun 2022 14:38:48 +0600 Subject: [PATCH 4/7] Filtered questions in a more strict way We need to make sure when filtering the questions that they start with the current event. --- .../client/src/forms/configuration/formConfig/utils/index.ts | 2 +- packages/client/src/forms/configuration/index.ts | 2 +- packages/client/src/forms/questionConfig/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/forms/configuration/formConfig/utils/index.ts b/packages/client/src/forms/configuration/formConfig/utils/index.ts index bff8991d0d9..0cfbf4d4266 100644 --- a/packages/client/src/forms/configuration/formConfig/utils/index.ts +++ b/packages/client/src/forms/configuration/formConfig/utils/index.ts @@ -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 diff --git a/packages/client/src/forms/configuration/index.ts b/packages/client/src/forms/configuration/index.ts index c88b4c0fae8..212b84172d9 100644 --- a/packages/client/src/forms/configuration/index.ts +++ b/packages/client/src/forms/configuration/index.ts @@ -292,7 +292,7 @@ export function getConfiguredOrDefaultForm( ? getConfiguredForm( formWithAddresses, formConfig.questionConfig.filter(({ fieldId }) => - fieldId.includes(event) + fieldId.startsWith(event) ) ) : formWithAddresses diff --git a/packages/client/src/forms/questionConfig/index.ts b/packages/client/src/forms/questionConfig/index.ts index 92cfa2cf223..8d976431316 100644 --- a/packages/client/src/forms/questionConfig/index.ts +++ b/packages/client/src/forms/questionConfig/index.ts @@ -180,7 +180,7 @@ export function getConfiguredQuestions( ...orderedQuestions, ...orderByPosition([ ...customizedQuestions.filter(({ fieldId }) => - fieldId.includes(section) + fieldId.startsWith(`${event}.${section}`) ), ...nonCustomizedQuestions ]) From c8bd63e41a2f7eef7658bd3944a19b70dd8828dc Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Mon, 27 Jun 2022 14:54:39 +0600 Subject: [PATCH 5/7] Fixed a conditional when filtering identifiers --- packages/client/src/forms/configuration/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/forms/configuration/index.ts b/packages/client/src/forms/configuration/index.ts index 212b84172d9..82c5919a900 100644 --- a/packages/client/src/forms/configuration/index.ts +++ b/packages/client/src/forms/configuration/index.ts @@ -82,7 +82,7 @@ function mergeIdentifiers( return [ ...mergedIdentifiers.filter( ({ sectionIndex, groupIndex }) => - sectionIndex !== questionIdentifiers.sectionIndex && + sectionIndex !== questionIdentifiers.sectionIndex || groupIndex !== questionIdentifiers.groupIndex ), currentFieldIdentifier From 2ad46d6458e4dd38efcd4326593426fab4d39768 Mon Sep 17 00:00:00 2001 From: soumita-dsi Date: Mon, 27 Jun 2022 15:40:11 +0600 Subject: [PATCH 6/7] Added id to queries for fixing record audit not shoowing issue --- packages/client/src/views/RecordAudit/queries.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/client/src/views/RecordAudit/queries.ts b/packages/client/src/views/RecordAudit/queries.ts index cf51798a7bf..4c5dbd87a31 100644 --- a/packages/client/src/views/RecordAudit/queries.ts +++ b/packages/client/src/views/RecordAudit/queries.ts @@ -16,6 +16,7 @@ export const FETCH_DECLARATION_SHORT_INFO = gql` fetchRegistration(id: $id) { id registration { + id type trackingId status { @@ -31,6 +32,7 @@ export const FETCH_DECLARATION_SHORT_INFO = gql` } ... on BirthRegistration { child { + id name { use firstNames @@ -40,6 +42,7 @@ export const FETCH_DECLARATION_SHORT_INFO = gql` } ... on DeathRegistration { deceased { + id name { use firstNames From c642212d9199ac2354283c60982fd760da4827fe Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Mon, 27 Jun 2022 13:29:46 +0300 Subject: [PATCH 7/7] update frontend query schema to match new searchEvents schema --- packages/client/graphql.schema.json | 310 ++++++------------ packages/client/src/search/queries.ts | 6 +- packages/client/src/utils/gateway.ts | 282 ++++++++++++++-- .../client/src/views/OfficeHome/queries.ts | 6 +- 4 files changed, 356 insertions(+), 248 deletions(-) diff --git a/packages/client/graphql.schema.json b/packages/client/graphql.schema.json index a6c12378971..f23de32a368 100644 --- a/packages/client/graphql.schema.json +++ b/packages/client/graphql.schema.json @@ -436,18 +436,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "APPLICATION_AUDIT_LOCATIONS", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "APPLICATION_NAME", "description": null, @@ -460,18 +448,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "BACKGROUND_SYNC_BROADCAST_CHANNEL", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "BIRTH", "description": null, @@ -484,18 +460,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "COUNTRY", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "COUNTRY_LOGO", "description": null, @@ -508,30 +472,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "COUNTRY_LOGO_RENDER_HEIGHT", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "COUNTRY_LOGO_RENDER_WIDTH", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "CURRENCY", "description": null, @@ -556,18 +496,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "DESKTOP_TIME_OUT_MILLISECONDS", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "EXTERNAL_VALIDATION_WORKQUEUE", "description": null, @@ -604,30 +532,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "INFORMANT_MINIMUM_AGE", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LOGROCKET", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "NID_NUMBER_PATTERN", "description": null, @@ -651,30 +555,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "SENTRY", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UI_POLLING_INTERVAL", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, @@ -700,18 +580,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "APPLICATION_AUDIT_LOCATIONS", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "APPLICATION_NAME", "description": null, @@ -724,18 +592,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "BACKGROUND_SYNC_BROADCAST_CHANNEL", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "BIRTH", "description": null, @@ -748,18 +604,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "COUNTRY", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "COUNTRY_LOGO", "description": null, @@ -772,30 +616,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "COUNTRY_LOGO_RENDER_HEIGHT", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "COUNTRY_LOGO_RENDER_WIDTH", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "CURRENCY", "description": null, @@ -820,18 +640,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "DESKTOP_TIME_OUT_MILLISECONDS", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "EXTERNAL_VALIDATION_WORKQUEUE", "description": null, @@ -869,11 +677,11 @@ "deprecationReason": null }, { - "name": "INFORMANT_MINIMUM_AGE", + "name": "NID_NUMBER_PATTERN", "description": null, "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "defaultValue": null, @@ -881,7 +689,7 @@ "deprecationReason": null }, { - "name": "LOGROCKET", + "name": "PHONE_NUMBER_PATTERN", "description": null, "type": { "kind": "SCALAR", @@ -891,57 +699,68 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AssignmentData", + "description": null, + "fields": [ { - "name": "NID_NUMBER_PATTERN", + "name": "firstName", "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "PHONE_NUMBER_PATTERN", + "name": "lastName", "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "SENTRY", + "name": "officeName", "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "UI_POLLING_INTERVAL", + "name": "userId", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, @@ -5922,6 +5741,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "signature", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Signature", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "statusReason", "description": null, @@ -8530,6 +8361,39 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "markEventAsUnassigned", + "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "markEventAsVoided", "description": null, @@ -11582,9 +11446,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "defaultValue": null, @@ -12634,6 +12502,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "assignment", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AssignmentData", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "attachments", "description": null, @@ -13179,6 +13059,18 @@ "name": "RegistrationSearchSet", "description": null, "fields": [ + { + "name": "assignment", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AssignmentData", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "comment", "description": null, diff --git a/packages/client/src/search/queries.ts b/packages/client/src/search/queries.ts index 50a34904956..b082360d54b 100644 --- a/packages/client/src/search/queries.ts +++ b/packages/client/src/search/queries.ts @@ -18,7 +18,7 @@ export const SEARCH_EVENTS = gql` $contactNumber: String $registrationNumber: String $name: String - $locationIds: [String] + $locationIds: [String!] ) { searchEvents( sort: $sort @@ -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 @@ -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 diff --git a/packages/client/src/utils/gateway.ts b/packages/client/src/utils/gateway.ts index 8d1b4f0288f..cf7790fb6bc 100644 --- a/packages/client/src/utils/gateway.ts +++ b/packages/client/src/utils/gateway.ts @@ -111,6 +111,14 @@ export type ApplicationConfigurationInput = { PHONE_NUMBER_PATTERN?: InputMaybe } +export type AssignmentData = { + __typename?: 'AssignmentData' + firstName?: Maybe + lastName?: Maybe + officeName?: Maybe + userId?: Maybe +} + export type Attachment = { __typename?: 'Attachment' _fhirID?: Maybe @@ -686,6 +694,7 @@ export type History = { output?: Maybe>> reason?: Maybe reinstated?: Maybe + signature?: Maybe statusReason?: Maybe user?: Maybe } @@ -915,6 +924,7 @@ export type Mutation = { markDeathAsVerified?: Maybe markEventAsArchived: Scalars['ID'] markEventAsReinstated?: Maybe + markEventAsUnassigned: Scalars['ID'] markEventAsVoided: Scalars['ID'] modifyDraftStatus?: Maybe notADuplicate: Scalars['ID'] @@ -1034,6 +1044,10 @@ export type MutationMarkEventAsReinstatedArgs = { id: Scalars['String'] } +export type MutationMarkEventAsUnassignedArgs = { + id: Scalars['String'] +} + export type MutationMarkEventAsVoidedArgs = { comment?: InputMaybe id: Scalars['String'] @@ -1393,7 +1407,7 @@ export type QuerySearchDeathRegistrationsArgs = { export type QuerySearchEventsArgs = { contactNumber?: InputMaybe count?: InputMaybe - locationIds?: InputMaybe>> + locationIds?: InputMaybe> name?: InputMaybe registrationNumber?: InputMaybe skip?: InputMaybe @@ -1502,6 +1516,7 @@ export type RegWorkflowInput = { export type Registration = { __typename?: 'Registration' _fhirID?: Maybe + assignment?: Maybe attachments?: Maybe>> book?: Maybe certificates?: Maybe>> @@ -1552,6 +1567,7 @@ export type RegistrationInput = { export type RegistrationSearchSet = { __typename?: 'RegistrationSearchSet' + assignment?: Maybe comment?: Maybe contactNumber?: Maybe contactRelationship?: Maybe @@ -1949,9 +1965,7 @@ export type SearchEventsQueryVariables = Exact<{ contactNumber?: InputMaybe registrationNumber?: InputMaybe name?: InputMaybe - locationIds?: InputMaybe< - Array> | InputMaybe - > + locationIds?: InputMaybe | Scalars['String']> }> export type SearchEventsQuery = { @@ -1981,6 +1995,13 @@ export type SearchEventsQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -2004,6 +2025,13 @@ export type SearchEventsQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -2016,9 +2044,7 @@ export type SearchDeclarationsUserWiseQueryVariables = Exact<{ Array> | InputMaybe > userId?: InputMaybe - locationIds?: InputMaybe< - Array> | InputMaybe - > + locationIds?: InputMaybe | Scalars['String']> sort?: InputMaybe count?: InputMaybe skip?: InputMaybe @@ -2082,9 +2108,7 @@ export type CountUserWiseDeclarationsQueryVariables = Exact<{ Array> | InputMaybe > userId?: InputMaybe - locationIds?: InputMaybe< - Array> | InputMaybe - > + locationIds?: InputMaybe | Scalars['String']> }> export type CountUserWiseDeclarationsQuery = { @@ -2326,19 +2350,6 @@ export type MarkEventAsVoidedMutation = { markEventAsVoided: string } -export type MarkEventAsReinstatedMutationVariables = Exact<{ - id: Scalars['String'] -}> - -export type MarkEventAsReinstatedMutation = { - __typename?: 'Mutation' - markEventAsReinstated?: { - __typename?: 'Reinstated' - taskEntryResourceID: string - registrationStatus?: RegStatus | null - } | null -} - export type MarkEventAsArchivedMutationVariables = Exact<{ id: Scalars['String'] }> @@ -2358,6 +2369,15 @@ export type MarkBirthAsCertifiedMutation = { markBirthAsCertified: string } +export type SubmitMutationMutationVariables = Exact<{ + id: Scalars['String'] +}> + +export type SubmitMutationMutation = { + __typename?: 'Mutation' + markEventAsUnassigned: string +} + export type FetchBirthRegistrationForReviewQueryVariables = Exact<{ id: Scalars['ID'] }> @@ -2589,6 +2609,11 @@ export type FetchBirthRegistrationForReviewQuery = { } | null> | null avatar?: { __typename?: 'Avatar'; data: string; type: string } | null } | null + signature?: { + __typename?: 'Signature' + data?: string | null + type?: string | null + } | null comments?: Array<{ __typename?: 'Comment' comment?: string | null @@ -2865,6 +2890,11 @@ export type FetchBirthRegistrationForCertificateQuery = { } | null> | null avatar?: { __typename?: 'Avatar'; data: string; type: string } | null } | null + signature?: { + __typename?: 'Signature' + data?: string | null + type?: string | null + } | null comments?: Array<{ __typename?: 'Comment' comment?: string | null @@ -3221,6 +3251,11 @@ export type FetchDeathRegistrationForReviewQuery = { } | null> | null avatar?: { __typename?: 'Avatar'; data: string; type: string } | null } | null + signature?: { + __typename?: 'Signature' + data?: string | null + type?: string | null + } | null comments?: Array<{ __typename?: 'Comment' comment?: string | null @@ -3486,6 +3521,11 @@ export type FetchDeathRegistrationForCertificationQuery = { } | null> | null avatar?: { __typename?: 'Avatar'; data: string; type: string } | null } | null + signature?: { + __typename?: 'Signature' + data?: string | null + type?: string | null + } | null comments?: Array<{ __typename?: 'Comment' comment?: string | null @@ -3560,6 +3600,13 @@ type EventSearchFields_BirthEventSearchSet_Fragment = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } @@ -3586,6 +3633,13 @@ type EventSearchFields_DeathEventSearchSet_Fragment = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } @@ -3594,9 +3648,7 @@ export type EventSearchFieldsFragment = | EventSearchFields_DeathEventSearchSet_Fragment export type RegistrationHomeQueryVariables = Exact<{ - locationIds?: InputMaybe< - Array> | InputMaybe - > + locationIds?: InputMaybe | Scalars['String']> pageSize?: InputMaybe inProgressSkip?: InputMaybe healthSystemSkip?: InputMaybe @@ -3639,6 +3691,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -3664,6 +3723,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -3696,6 +3762,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -3721,6 +3794,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -3753,6 +3833,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -3778,6 +3865,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -3810,6 +3904,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -3835,6 +3936,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -3867,6 +3975,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -3892,6 +4007,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -3924,6 +4046,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -3949,6 +4078,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -3981,6 +4117,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -4006,6 +4149,13 @@ export type RegistrationHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -4015,9 +4165,7 @@ export type RegistrationHomeQuery = { export type FieldAgentHomeQueryVariables = Exact<{ userId?: InputMaybe - locationIds?: InputMaybe< - Array> | InputMaybe - > + locationIds?: InputMaybe | Scalars['String']> pageSize?: InputMaybe reviewSkip?: InputMaybe rejectSkip?: InputMaybe @@ -4052,6 +4200,13 @@ export type FieldAgentHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -4077,6 +4232,13 @@ export type FieldAgentHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -4109,6 +4271,13 @@ export type FieldAgentHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -4134,6 +4303,13 @@ export type FieldAgentHomeQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -4149,9 +4325,7 @@ export type SearchEventsForWorkqueueQueryVariables = Exact<{ status?: InputMaybe< Array> | InputMaybe > - locationIds?: InputMaybe< - Array> | InputMaybe - > + locationIds?: InputMaybe | Scalars['String']> count?: InputMaybe skip?: InputMaybe }> @@ -4185,6 +4359,13 @@ export type SearchEventsForWorkqueueQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -4210,6 +4391,13 @@ export type SearchEventsForWorkqueueQuery = { duplicates?: Array | null createdAt?: string | null modifiedAt?: string | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -4360,6 +4548,19 @@ export type FetchRegistrationByCompositionQuery = { | null } +export type MarkEventAsReinstatedMutationVariables = Exact<{ + id: Scalars['String'] +}> + +export type MarkEventAsReinstatedMutation = { + __typename?: 'Mutation' + markEventAsReinstated?: { + __typename?: 'Reinstated' + taskEntryResourceID: string + registrationStatus?: RegStatus | null + } | null +} + export type FetchDeclarationShortInfoQueryVariables = Exact<{ id: Scalars['ID'] }> @@ -4388,6 +4589,13 @@ export type FetchDeclarationShortInfoQuery = { __typename?: 'RegWorkflow' type?: RegStatus | null } | null> | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | { @@ -4411,6 +4619,13 @@ export type FetchDeclarationShortInfoQuery = { __typename?: 'RegWorkflow' type?: RegStatus | null } | null> | null + assignment?: { + __typename?: 'AssignmentData' + userId?: string | null + firstName?: string | null + lastName?: string | null + officeName?: string | null + } | null } | null } | null @@ -4621,6 +4836,8 @@ export type UpdateApplicationConfigMutation = { APPLICATION_NAME?: string | null NID_NUMBER_PATTERN?: string | null PHONE_NUMBER_PATTERN?: string | null + HIDE_EVENT_REGISTER_INFORMATION?: boolean | null + ADDRESSES?: number | null COUNTRY_LOGO?: { __typename?: 'CountryLogo' fileName?: string | null @@ -4767,7 +4984,6 @@ export type GetLocationStatisticsQueryVariables = Exact<{ status: Array> | InputMaybe event?: InputMaybe officeSelected: Scalars['Boolean'] - showStatusCount: Scalars['Boolean'] }> export type GetLocationStatisticsQuery = { diff --git a/packages/client/src/views/OfficeHome/queries.ts b/packages/client/src/views/OfficeHome/queries.ts index 827a2f9f7d0..64aaf87ffec 100644 --- a/packages/client/src/views/OfficeHome/queries.ts +++ b/packages/client/src/views/OfficeHome/queries.ts @@ -55,7 +55,7 @@ const EVENT_SEARCH_RESULT_FIELDS = gql` export const REGISTRATION_HOME_QUERY = gql` ${EVENT_SEARCH_RESULT_FIELDS} query registrationHome( - $locationIds: [String] + $locationIds: [String!] $pageSize: Int $inProgressSkip: Int $healthSystemSkip: Int @@ -154,7 +154,7 @@ export const FIELD_AGENT_HOME_QUERY = gql` ${EVENT_SEARCH_RESULT_FIELDS} query fieldAgentHome( $userId: String - $locationIds: [String] + $locationIds: [String!] $pageSize: Int $reviewSkip: Int $rejectSkip: Int @@ -202,7 +202,7 @@ export const SEARCH_EVENTS = gql` $contactNumber: String $registrationNumber: String $status: [String] - $locationIds: [String] + $locationIds: [String!] $count: Int $skip: Int ) {