diff --git a/cypress/local-only/tests/integration/fileAPetitionUpdated/file-a-petition-step-6-irs-notice.cy.ts b/cypress/local-only/tests/integration/fileAPetitionUpdated/file-a-petition-step-6-irs-notice.cy.ts index b9b1e538c8f..089ff4f64a9 100644 --- a/cypress/local-only/tests/integration/fileAPetitionUpdated/file-a-petition-step-6-irs-notice.cy.ts +++ b/cypress/local-only/tests/integration/fileAPetitionUpdated/file-a-petition-step-6-irs-notice.cy.ts @@ -35,10 +35,32 @@ describe('File a petition - Step 6 Review & Submit Case', () => { fillIrsNoticeInformation(VALID_FILE); fillCaseProcedureInformation(); fillStinInformation(VALID_FILE); - cy.get('[data-testid="petition-preview-button"]').should( - 'have.text', - 'sample.pdf', - ); + cy.get(`[data-testid="irs-notice-info-${0}"]`).within(() => { + cy.contains('IRS notice 1').should('exist'); + cy.contains('Notice of Deficiency').should('exist'); + cy.get('[data-testid="atp-preview-button"]').should( + 'have.text', + 'sample.pdf', + ); + }); + cy.get(`[data-testid="irs-notice-info-${1}"]`).should('not.exist'); + }); + + it('should display IRS notice information for a disclosure case type', () => { + fillIrsNoticeInformation(VALID_FILE, 'Disclosure2'); + fillCaseProcedureInformation(); + fillStinInformation(VALID_FILE); + cy.get(`[data-testid="irs-notice-info-${0}"]`).within(() => { + cy.contains('IRS notice 1').should('exist'); + cy.contains( + 'Notice - We Are Going To Make Your Determination Letter Available for Public Inspection', + ).should('exist'); + cy.get('[data-testid="atp-preview-button"]').should( + 'have.text', + 'sample.pdf', + ); + }); + cy.get(`[data-testid="irs-notice-info-${1}"]`).should('not.exist'); }); it('should display IRS notice information for multiple IRS notices', () => { fillMultipleIRSNotices(VALID_FILE); @@ -47,6 +69,7 @@ describe('File a petition - Step 6 Review & Submit Case', () => { cy.get(`[data-testid="irs-notice-info-${0}"]`).within(() => { cy.contains('IRS notice 1').should('exist'); + cy.contains('Notice of Deficiency').should('exist'); cy.contains('2024').should('exist'); cy.contains('05/02/24').should('exist'); cy.contains('Jackson, NJ').should('exist'); @@ -58,6 +81,9 @@ describe('File a petition - Step 6 Review & Submit Case', () => { cy.get(`[data-testid="irs-notice-info-${1}"]`).within(() => { cy.contains('IRS notice 2').should('exist'); + cy.contains( + 'Notice of Determination Concerning Collection Action', + ).should('exist'); cy.contains('2023').should('exist'); cy.contains('05/02/23').should('exist'); cy.contains('New York, NY').should('exist'); diff --git a/shared/src/business/useCases/generatePetitionPdfInteractor.ts b/shared/src/business/useCases/generatePetitionPdfInteractor.ts index 529089c5781..7158945cca3 100644 --- a/shared/src/business/useCases/generatePetitionPdfInteractor.ts +++ b/shared/src/business/useCases/generatePetitionPdfInteractor.ts @@ -1,7 +1,3 @@ -import { - CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE, - CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE, -} from '@shared/business/entities/EntityConstants'; import { CreateCaseIrsForm } from '@web-client/presenter/state'; import { ROLE_PERMISSIONS, @@ -9,6 +5,7 @@ import { } from '@shared/authorization/authorizationClientService'; import { UnauthorizedError } from '@web-api/errors/errors'; import { UnknownAuthUser } from '@shared/business/entities/authUser/AuthUser'; +import { getCaseDescription } from '@shared/business/utilities/getCaseDescription'; export type IrsNotice = CreateCaseIrsForm & { noticeIssuedDateFormatted: string; @@ -136,10 +133,3 @@ export const generatePetitionPdfInteractor = async ( return { fileId }; }; - -function getCaseDescription(hasIrsNotice: boolean, caseType: string) { - if (hasIrsNotice) { - return CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[caseType]; - } - return CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[caseType]; -} diff --git a/shared/src/business/utilities/getCaseDescription.test.ts b/shared/src/business/utilities/getCaseDescription.test.ts new file mode 100644 index 00000000000..e5da6b77108 --- /dev/null +++ b/shared/src/business/utilities/getCaseDescription.test.ts @@ -0,0 +1,107 @@ +import { getCaseDescription } from '@shared/business/utilities/getCaseDescription'; + +const caseTypesWithIrsNotice = [ + { + description: 'Notice of Deficiency', + type: 'Deficiency', + }, + { + description: 'Notice of Determination Concerning Collection Action', + type: 'CDP (Lien/Levy)', + }, + { + description: 'Other', + type: 'Other', + }, + { + description: 'Adjustment of Partnership Items Code Section 6228', + type: 'Partnership (Section 6228)', + }, + { + description: + 'Notice - We Are Going To Make Your Determination Letter Available for Public Inspection', + type: 'Disclosure2', + }, + { + description: + 'Notice of Certification of Your Seriously Delinquent Federal Tax Debt to the Department of State', + type: 'Passport', + }, + { + description: + 'Notice of Determination Concerning Relief From Joint and Several Liability Under Section 6015', + type: 'Innocent Spouse', + }, + { + description: 'Notice of Determination of Worker Classification', + type: 'Worker Classification', + }, + { + description: + 'Notice of Determination Under Section 7623 Concerning Whistleblower Action', + type: 'Whistleblower', + }, + { + description: + 'Notice of Final Determination for Full or Partial Disallowance of Interest Abatement Claim', + type: 'Interest Abatement', + }, + { + description: 'Notice of Intention to Disclose', + type: 'Disclosure1', + }, + { + description: 'Partnership Action Under BBA Section 1101', + type: 'Partnership (BBA Section 1101)', + }, + { + description: 'Readjustment of Partnership Items Code Section 6226', + type: 'Partnership (Section 6226)', + }, +]; + +const caseTypesWithoutIrsNotice = [ + { description: 'Deficiency', type: 'Deficiency' }, + { description: 'Collection (Lien/Levy)', type: 'CDP (Lien/Levy)' }, + { description: 'Passport', type: 'Passport' }, + { description: 'Innocent Spouse', type: 'Innocent Spouse' }, + { description: 'Whistleblower', type: 'Whistleblower' }, + { description: 'Worker Classification', type: 'Worker Classification' }, + { + description: 'Declaratory Judgment (Retirement Plan)', + type: 'Declaratory Judgment (Retirement Plan)', + }, + { + description: 'Declaratory Judgment (Exempt Organization)', + type: 'Declaratory Judgment (Exempt Organization)', + }, + { description: 'Disclosure', type: 'Disclosure' }, + { + description: + 'Interest Abatement - Failure of IRS to Make Final Determination Within 180 Days After Claim for Abatement', + type: 'Interest Abatement', + }, + { description: 'Other', type: 'Other' }, +]; + +describe('getCaseDescription', () => { + describe('With IRS notices', () => { + const hasIrsNotice = true; + caseTypesWithIrsNotice.forEach(caseType => { + it(`should return case description for ${caseType.type}`, () => { + const caseDescription = getCaseDescription(hasIrsNotice, caseType.type); + expect(caseDescription).toEqual(caseType.description); + }); + }); + }); + + describe('Without IRS notices', () => { + const hasIrsNotice = false; + caseTypesWithoutIrsNotice.forEach(caseType => { + it(`should return case description for ${caseType.type}`, () => { + const caseDescription = getCaseDescription(hasIrsNotice, caseType.type); + expect(caseDescription).toEqual(caseType.description); + }); + }); + }); +}); diff --git a/shared/src/business/utilities/getCaseDescription.ts b/shared/src/business/utilities/getCaseDescription.ts new file mode 100644 index 00000000000..e94712e5cdd --- /dev/null +++ b/shared/src/business/utilities/getCaseDescription.ts @@ -0,0 +1,14 @@ +import { + CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE, + CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE, +} from '../entities/EntityConstants'; + +export const getCaseDescription = ( + hasIrsNotice: boolean, + originalCaseType: string, +) => { + if (hasIrsNotice) { + return CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[originalCaseType]; + } + return CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[originalCaseType]; +}; diff --git a/shared/src/business/utilities/pdfGenerator/documentTemplates/Petition.tsx b/shared/src/business/utilities/pdfGenerator/documentTemplates/Petition.tsx index 31946249b2b..2369df4f2a3 100644 --- a/shared/src/business/utilities/pdfGenerator/documentTemplates/Petition.tsx +++ b/shared/src/business/utilities/pdfGenerator/documentTemplates/Petition.tsx @@ -195,7 +195,10 @@ export const Petition = ({ {contactPrimary.countryType === COUNTRY_TYPES.INTERNATIONAL && (
{contactPrimary.country}
)} -
{contactPrimary.phone}
+
+ Phone: + {contactPrimary.phone} +
{contactPrimary.placeOfLegalResidence && (
{BUSINESS_TYPE_VALUES.includes(partyType) ? ( @@ -240,6 +243,7 @@ export const Petition = ({
{contactSecondary.country}
)}
+ Phone: {contactSecondary.phone ? contactSecondary.phone : 'Phone number not provided'} diff --git a/web-client/src/views/CaseDetail/AddressDisplay.tsx b/web-client/src/views/CaseDetail/AddressDisplay.tsx index f2a092cbf8e..74ceee4a4ec 100644 --- a/web-client/src/views/CaseDetail/AddressDisplay.tsx +++ b/web-client/src/views/CaseDetail/AddressDisplay.tsx @@ -20,6 +20,7 @@ export const AddressDisplay = connect< nameOverride?: string; noMargin?: boolean; showEmail?: boolean; + showPhoneLabel?: boolean; showSealAddressLink?: boolean; }, typeof addessDisplayDeps @@ -33,6 +34,7 @@ export const AddressDisplay = connect< noMargin, openSealAddressModalSequence, showEmail, + showPhoneLabel, showSealAddressLink, }) { return ( @@ -95,6 +97,7 @@ export const AddressDisplay = connect< noMargin={noMargin} openSealAddressModalSequence={openSealAddressModalSequence} showEmail={showEmail} + showPhoneLabel={showPhoneLabel} showSealAddressLink={showSealAddressLink} /> )} @@ -112,6 +115,7 @@ function ContactDetails({ noMargin, openSealAddressModalSequence, showEmail, + showPhoneLabel, showSealAddressLink, }) { return ( @@ -144,6 +148,7 @@ function ContactDetails({ )} data-testid="contact-info-phone-number" > + {showPhoneLabel && Phone: } {contact.phone} )} diff --git a/web-client/src/views/PetitionWelcomePage.tsx b/web-client/src/views/PetitionWelcomePage.tsx index 8b56890289c..791609eb9a3 100644 --- a/web-client/src/views/PetitionWelcomePage.tsx +++ b/web-client/src/views/PetitionWelcomePage.tsx @@ -28,7 +28,7 @@ export const PetitionWelcomePage = ({

Welcome to DAWSON!

{`DAWSON (Docket Access Within a Secure Online Network) is the U.S. Tax - Court's electronic filing and case management system. The Court encourages all petitioners to file documents electronically.`} + Court's electronic filing and case management system.`}
DAWSON allows you to:
diff --git a/web-client/src/views/StartCaseUpdated/CounselInformation.tsx b/web-client/src/views/StartCaseUpdated/CounselInformation.tsx index 1de4da7fb96..2559bb02c6b 100644 --- a/web-client/src/views/StartCaseUpdated/CounselInformation.tsx +++ b/web-client/src/views/StartCaseUpdated/CounselInformation.tsx @@ -17,6 +17,7 @@ export function CounselInformation({ userInfo }) {
- {petitionFormatted.caseType} + {getCaseDescription( + petitionFormatted.hasIrsNotice, + petitionFormatted.originalCaseType, + )}
@@ -37,7 +41,12 @@ export function IRSNoticeInformation({ petitionFormatted }) {
IRS notice {index + 1}
-
{irsNotice.caseType}
+
+ {getCaseDescription( + petitionFormatted.hasIrsNotice, + irsNotice.originalCaseType, + )} +
{irsNotice.taxYear && (
{irsNotice.taxYear}
)} diff --git a/web-client/src/views/StartCaseUpdated/PetitionerInformation.tsx b/web-client/src/views/StartCaseUpdated/PetitionerInformation.tsx index 6cfa7072c67..2187ec83272 100644 --- a/web-client/src/views/StartCaseUpdated/PetitionerInformation.tsx +++ b/web-client/src/views/StartCaseUpdated/PetitionerInformation.tsx @@ -55,6 +55,7 @@ export function PetitionerInformation({ isPetitioner, petitionFormatted }) {
{petitionFormatted.contactPrimary.placeOfLegalResidence && ( @@ -111,6 +112,7 @@ export function PetitionerInformation({ isPetitioner, petitionFormatted }) {