Skip to content

Commit

Permalink
fix: add assignment property in declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil20 committed Jan 10, 2025
1 parent 449da54 commit c5b0a9f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/client/src/declarations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from '@client/forms'
import { SCOPES } from '@opencrvs/commons/client'
import {
AssignmentData,
Attachment,
EventType,
History,
Expand Down Expand Up @@ -230,6 +231,7 @@ export interface IDeclaration {
writingDraft?: boolean
operationHistories?: ITaskHistory[]
isNotDuplicate?: boolean
assignmentStatus?: AssignmentData
}

type Relation =
Expand Down Expand Up @@ -1531,6 +1533,10 @@ export const declarationsReducer: LoopReducer<IDeclarationsState, Action> = (
newDeclarationsAfterDownload[downloadingDeclarationIndex].downloadStatus =
DOWNLOAD_STATUS.DOWNLOADED

newDeclarationsAfterDownload[
downloadingDeclarationIndex
].assignmentStatus = eventData?.registration?.assignment ?? null

const newStateAfterDownload = {
...state,
declarations: newDeclarationsAfterDownload
Expand Down
7 changes: 7 additions & 0 deletions packages/client/src/views/DataProvider/birth/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ const GET_BIRTH_REGISTRATION_FOR_REVIEW = gql`
contactRelationship
contactPhoneNumber
contactEmail
assignment {
practitionerId
firstName
lastName
officeName
avatarURL
}
certificates {
hasShowedVerifiedDocument
certificateTemplateId
Expand Down
7 changes: 7 additions & 0 deletions packages/client/src/views/DataProvider/death/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,13 @@ export const GET_DEATH_REGISTRATION_FOR_CERTIFICATION = gql`
contactEmail
contactPhoneNumber
informantsSignature
assignment {
practitionerId
firstName
lastName
officeName
avatarURL
}
duplicates {
compositionId
trackingId
Expand Down
7 changes: 7 additions & 0 deletions packages/client/src/views/DataProvider/marriage/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,13 @@ const GET_MARRIAGE_REGISTRATION_FOR_CERTIFICATE = gql`
brideSignature
witnessOneSignature
witnessTwoSignature
assignment {
practitionerId
firstName
lastName
officeName
avatarURL
}
duplicates {
compositionId
trackingId
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/views/RecordAudit/RecordAudit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ const BodyContent = ({
draft.submissionStatus === SUBMISSION_STATUS.DRAFT)
? {
...getDraftDeclarationData(draft, resources, intl, trackingId),
assignment: workqueueDeclaration?.registration?.assignment
assignment: draft?.assignmentStatus
}
: getWQDeclarationData(
workqueueDeclaration as NonNullable<typeof workqueueDeclaration>,
Expand Down

0 comments on commit c5b0a9f

Please sign in to comment.