Skip to content

Review Package

Kevma50287 edited this page Jan 5, 2024 · 23 revisions

Overview

The Correspondence Review Package allows MailTeam and MailTeam Supervisor users to view and edit a correspondence.

The user can navigate to this Review Package page from the Correspondence Cases Queue. After clicking on a case from the Correspondence Queue, the ReviewPackageLoadingScreen will render first in order to fetch data and store it in the Correspondence Redux store.

The Correspondence Review Package page is comprised of six sections:

  1. ReviewPackageNotificationBanner
  2. ReviewPackageCaseTitle
  3. ReviewPackageData
  4. ReviewForm
  5. CmpDocuments
  6. Footer

Frontend Technical Implementation

ReviewPackageLoadingScreen & Redux

Correspondence Review Package utilizes the ReviewPackageLoadingScreen.jsx to fetch data through GET /queue/correspondence/correspondence_uuid. Information being stored in Redux relates to application state variables that are widely used by all correspondence components, and includes veteran information, correspondence metadata, correspondence documents, and the package document type.

CorrespondenceReviewPackage

The CorrespondenceReviewPackage.jsx is the root layout component. Additional data fetching occurs here for data specific to Correspondence Review Package. A majority of the logic regarding routing, state management, and handler functions are defined here and passed as props to their respective sections.

When the user is part of the MailTeamSupervisor organization and there is a pending removal request active on a correspondence, the buttons of the Correspondence Review Package will be disabled to prevent further edits.

ReviewPackageCaseTitle

image

The ReviewPackageCaseTitle.jsx consists of generic text prompting the user to review the general information, the RemovePackageModal, and a SearchableDropdown component.

The SearchableDropdown is a controlled component containing four different options: Split Package, Merge Package, Remove package, and Reassign Package. When an option is selected, the handlePackageActionModal function is invoked to update packageActionModal in CorrespondenceReviewPackage.jsx.

Modals

Depending on the value of packageActionModal, the PackageActionModal.jsx will dynamically render certain form fields. As different actions have different input fields, the RadioFields, TextAreas, and submit buttons are wrapped in conditional statements to suit each actions needs.

The submit button for each form invokes the submitHandler function. This functions handles the submission logic for all available actions. Upon submission, a request is made to POST /queue/correspondence/${correspondence.uuid}/task, and a new ReviewPackageTask is created and assigned to the MailTeamSupervisor organization. After the task is created successfully, the user will be redirected to the Correspondence Cases Queue page.

The RemovePackageModal.jsx is a different modal that replaces the PackageActionModal when there is a pending Remove Package request. After a reason for removal has been submitted, the suer can now click on the submit button, sending a request to POST /queue/correspondence/correspondence_id/remove_package. If successful, the redux store will be updated in order for the success banner to load on the Correspondence Cases Queue Page.

ReviewPackageData

image

The ReviewPackageData.jsx component displays the general information fetched in the parent component. Field includes the VA Date Of Receipt (VA DOR), Source Type, Package Document Type, CM (Central Mail) Packet Number, CMP (Central Mail Portal) Queue Name, and the Portal Entry Date. These fields represent metadata from the Central Mail Portal, which can be edited through the "Edit" button.

Dates are formatted using the Moment.js library and uses the following format: "MM/DD/YYYY"

ReviewForm

ReviewForm.jsx

CmpDocuments

CmpDocuments.jsx

PdfPreview & PDFJS

Backend Technical Implementation

Models

Controllers

Routes

Views

Ruby Claim Evidence API Gem

Clone this wiki locally