diff --git a/cypress/local-only/tests/integration/caseDetail/docketRecord/electronicFiling/logged-in-user-can-see-un-served-petition-document.cy.ts b/cypress/local-only/tests/integration/caseDetail/docketRecord/electronicFiling/logged-in-user-can-see-un-served-petition-document.cy.ts index 6fd23258bc2..13baf2a7c1f 100644 --- a/cypress/local-only/tests/integration/caseDetail/docketRecord/electronicFiling/logged-in-user-can-see-un-served-petition-document.cy.ts +++ b/cypress/local-only/tests/integration/caseDetail/docketRecord/electronicFiling/logged-in-user-can-see-un-served-petition-document.cy.ts @@ -9,6 +9,22 @@ import { } from '../../../../../../helpers/fileAPetition/petitioner-creates-electronic-case'; describe('Logged In User Can See Un-Served Petition Document', () => { + before(() => { + cy.task('toggleFeatureFlag', { + flag: 'updated-petition-flow', + flagValue: false, + }); + + cy.reload(true); + }); + + after(() => { + cy.task('toggleFeatureFlag', { + flag: 'updated-petition-flow', + flagValue: true, + }); + }); + it('should display a preview link to ["P", "ATP", "DISC"] documents for the Petitioner that created the case', () => { loginAsPetitioner(); petitionerCreatesElectronicCaseForBusiness().as('DOCKET_NUMBER'); diff --git a/shared/src/business/entities/EntityConstants.ts b/shared/src/business/entities/EntityConstants.ts index 63d19a9d5c1..c099ba41e1f 100644 --- a/shared/src/business/entities/EntityConstants.ts +++ b/shared/src/business/entities/EntityConstants.ts @@ -1011,8 +1011,8 @@ export const CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE = { }; export const CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE = { - [CASE_TYPES_MAP.deficiency]: 'Notice of Deficiency', - [CASE_TYPES_MAP.cdp]: 'CDP (Lien/Levy)', + [CASE_TYPES_MAP.deficiency]: 'Deficiency', + [CASE_TYPES_MAP.cdp]: 'Collection (Lien/Levy)', [CASE_TYPES_MAP.passport]: 'Passport', [CASE_TYPES_MAP.innocentSpouse]: 'Innocent Spouse', [CASE_TYPES_MAP.whistleblower]: 'Whistleblower', diff --git a/shared/src/business/useCases/generatePetitionPdfInteractor.test.ts b/shared/src/business/useCases/generatePetitionPdfInteractor.test.ts index 691a5b79008..5783b817b0c 100644 --- a/shared/src/business/useCases/generatePetitionPdfInteractor.test.ts +++ b/shared/src/business/useCases/generatePetitionPdfInteractor.test.ts @@ -4,6 +4,8 @@ import { generatePetitionPdfInteractor } from '@shared/business/useCases/generat import { petitionerUser } from '@shared/test/mockUsers'; describe('generatePetitionPdfInteractor', () => { + const mockFileId = '9085265b-e8ad-4bab-9e7c-f82e847b41f9'; + beforeEach(() => { applicationContext.getCurrentUser.mockImplementation(() => petitionerUser); @@ -16,18 +18,11 @@ describe('generatePetitionPdfInteractor', () => { ), ); - applicationContext - .getUseCaseHelpers() - .addDraftWatermarkToDocument.mockImplementation( - () => - new Promise(resolve => - resolve('RESULTS_addDraftWatermarkToDocument'), - ), - ); + applicationContext.getUniqueId.mockReturnValue(mockFileId); applicationContext - .getUseCaseHelpers() - .saveFileAndGenerateUrl.mockImplementation( + .getPersistenceGateway() + .saveDocumentFromLambda.mockImplementation( () => new Promise(resolve => resolve('RESULTS_saveFileAndGenerateUrl')), ); }); @@ -40,15 +35,15 @@ describe('generatePetitionPdfInteractor', () => { ).rejects.toThrow('Unauthorized'); }); - it('should generate petition and call save and generate URL', async () => { + it('should generate petition and call save document', async () => { const results = await generatePetitionPdfInteractor(applicationContext, { caseCaptionExtension: 'TEST_caseCaptionExtension', caseTitle: 'TEST_caseTitle', caseType: CASE_TYPES_MAP.deficiency, contactPrimary: 'TEST_contactPrimary', contactSecondary: 'TEST_contactSecondary', + hasIrsNotice: false, irsNotices: [], - isDraft: false, noticeIssuedDate: 'TEST_noticeIssuedDate', partyType: 'TEST_partyType', petitionFacts: 'TEST_petitionFacts', @@ -63,7 +58,7 @@ describe('generatePetitionPdfInteractor', () => { expect(petitionCalls.length).toEqual(1); expect(petitionCalls[0][0].data).toEqual({ caseCaptionExtension: 'TEST_caseCaptionExtension', - caseDescription: 'Notice of Deficiency', + caseDescription: 'Deficiency', caseTitle: 'TEST_caseTitle', contactPrimary: 'TEST_contactPrimary', contactSecondary: 'TEST_contactSecondary', @@ -77,78 +72,15 @@ describe('generatePetitionPdfInteractor', () => { taxYear: 'TEST_taxYear', }); - const addDraftWatermarkToDocumentCalls = - applicationContext.getUseCaseHelpers().addDraftWatermarkToDocument.mock - .calls; - expect(addDraftWatermarkToDocumentCalls.length).toEqual(0); - const saveFileAndGenerateUrlCalls = - applicationContext.getUseCaseHelpers().saveFileAndGenerateUrl.mock.calls; - expect(saveFileAndGenerateUrlCalls.length).toEqual(1); - expect(saveFileAndGenerateUrlCalls[0][0].file).toEqual( - 'RESULTS_getDocumentGenerators_petition', - ); - expect(saveFileAndGenerateUrlCalls[0][0].urlTtl).toEqual(60 * 60 * 24); - expect(saveFileAndGenerateUrlCalls[0][0].useTempBucket).toEqual(false); - - expect(results).toEqual('RESULTS_saveFileAndGenerateUrl'); - }); - - it('should generate petition, add watermark and call save and generate URL', async () => { - const results = await generatePetitionPdfInteractor(applicationContext, { - caseCaptionExtension: 'TEST_caseCaptionExtension', - caseTitle: 'TEST_caseTitle', - caseType: CASE_TYPES_MAP.deficiency, - contactPrimary: 'TEST_contactPrimary', - contactSecondary: 'TEST_contactSecondary', - irsNotices: [], - isDraft: true, - noticeIssuedDate: 'TEST_noticeIssuedDate', - partyType: 'TEST_partyType', - petitionFacts: 'TEST_petitionFacts', - petitionReasons: 'TEST_petitionReasons', - preferredTrialCity: 'TEST_preferredTrialCity', - procedureType: 'TEST_procedureType', - taxYear: 'TEST_taxYear', - }); - - const petitionCalls = - applicationContext.getDocumentGenerators().petition.mock.calls; - expect(petitionCalls.length).toEqual(1); - expect(petitionCalls[0][0].data).toEqual({ - caseCaptionExtension: 'TEST_caseCaptionExtension', - caseDescription: 'Notice of Deficiency', - caseTitle: 'TEST_caseTitle', - contactPrimary: 'TEST_contactPrimary', - contactSecondary: 'TEST_contactSecondary', - irsNotices: [], - noticeIssuedDate: 'TEST_noticeIssuedDate', - partyType: 'TEST_partyType', - petitionFacts: 'TEST_petitionFacts', - petitionReasons: 'TEST_petitionReasons', - preferredTrialCity: 'TEST_preferredTrialCity', - procedureType: 'TEST_procedureType', - taxYear: 'TEST_taxYear', - }); - - const addDraftWatermarkToDocumentCalls = - applicationContext.getUseCaseHelpers().addDraftWatermarkToDocument.mock + applicationContext.getPersistenceGateway().saveDocumentFromLambda.mock .calls; - expect(addDraftWatermarkToDocumentCalls.length).toEqual(1); - expect(addDraftWatermarkToDocumentCalls[0][0].pdfFile).toEqual( - 'RESULTS_getDocumentGenerators_petition', - ); - - const saveFileAndGenerateUrlCalls = - applicationContext.getUseCaseHelpers().saveFileAndGenerateUrl.mock.calls; expect(saveFileAndGenerateUrlCalls.length).toEqual(1); - expect(saveFileAndGenerateUrlCalls[0][0].file).toEqual( - 'RESULTS_addDraftWatermarkToDocument', + expect(saveFileAndGenerateUrlCalls[0][0].document).toEqual( + 'RESULTS_getDocumentGenerators_petition', ); - expect(saveFileAndGenerateUrlCalls[0][0].urlTtl).toEqual(60 * 60 * 24); - expect(saveFileAndGenerateUrlCalls[0][0].useTempBucket).toEqual(true); - expect(results).toEqual('RESULTS_saveFileAndGenerateUrl'); + expect(results.fileId).toEqual(mockFileId); }); it('should generate petition with correct irsNotice information', async () => { @@ -161,14 +93,14 @@ describe('generatePetitionPdfInteractor', () => { }, ]; - await generatePetitionPdfInteractor(applicationContext, { + const results = await generatePetitionPdfInteractor(applicationContext, { caseCaptionExtension: 'TEST_caseCaptionExtension', caseTitle: 'TEST_caseTitle', caseType: CASE_TYPES_MAP.deficiency, contactPrimary: 'TEST_contactPrimary', contactSecondary: 'TEST_contactSecondary', + hasIrsNotice: true, irsNotices, - isDraft: false, noticeIssuedDate: 'TEST_noticeIssuedDate', partyType: 'TEST_partyType', petitionFacts: 'TEST_petitionFacts', @@ -193,5 +125,6 @@ describe('generatePetitionPdfInteractor', () => { }, ], }); + expect(results.fileId).toEqual(mockFileId); }); }); diff --git a/shared/src/business/useCases/generatePetitionPdfInteractor.ts b/shared/src/business/useCases/generatePetitionPdfInteractor.ts index f24b3e2c111..e9a6ec75b34 100644 --- a/shared/src/business/useCases/generatePetitionPdfInteractor.ts +++ b/shared/src/business/useCases/generatePetitionPdfInteractor.ts @@ -7,20 +7,21 @@ import { ROLE_PERMISSIONS, isAuthorized, } from '@shared/authorization/authorizationClientService'; +import { ServerApplicationContext } from '@web-api/applicationContext'; import { UnauthorizedError } from '@web-api/errors/errors'; // TODO type for props export const generatePetitionPdfInteractor = async ( - applicationContext: IApplicationContext, + applicationContext: ServerApplicationContext, { caseCaptionExtension, caseTitle, caseType, contactPrimary, contactSecondary, + hasIrsNotice, irsNotices, - isDraft, noticeIssuedDate, partyType, petitionFacts, @@ -29,16 +30,16 @@ export const generatePetitionPdfInteractor = async ( procedureType, taxYear, }: any, -) => { +): Promise<{ fileId: string }> => { const user = applicationContext.getCurrentUser(); if (!isAuthorized(user, ROLE_PERMISSIONS.PETITION)) { throw new UnauthorizedError('Unauthorized'); } - const caseDescription = - CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[caseType] || - CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[caseType]; + const caseDescription = hasIrsNotice + ? CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[caseType] + : CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[caseType]; let pdfFile = await applicationContext.getDocumentGenerators().petition({ applicationContext, @@ -50,9 +51,9 @@ export const generatePetitionPdfInteractor = async ( contactSecondary, irsNotices: irsNotices.map(irsNotice => ({ ...irsNotice, - caseDescription: - CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[irsNotice.caseType] || - CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[irsNotice.caseType], + caseDescription: hasIrsNotice + ? CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[irsNotice.caseType] + : CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[irsNotice.caseType], noticeIssuedDateFormatted: applicationContext .getUtilities() .formatDateString(irsNotice.noticeIssuedDate || '', FORMATS.MMDDYY), @@ -67,22 +68,13 @@ export const generatePetitionPdfInteractor = async ( }, }); - if (isDraft) { - pdfFile = await applicationContext - .getUseCaseHelpers() - .addDraftWatermarkToDocument({ - applicationContext, - pdfFile, - }); - } - - // 24 hrs - const urlTtl = 60 * 60 * 24; + const fileId = applicationContext.getUniqueId(); - return await applicationContext.getUseCaseHelpers().saveFileAndGenerateUrl({ + await applicationContext.getPersistenceGateway().saveDocumentFromLambda({ applicationContext, - file: pdfFile, - urlTtl, - useTempBucket: isDraft, + document: pdfFile, + key: fileId, }); + + return { fileId }; }; diff --git a/shared/src/proxies/generatePetitionPdfProxy.ts b/shared/src/proxies/generatePetitionPdfProxy.ts index e51a8385c44..4317065682d 100644 --- a/shared/src/proxies/generatePetitionPdfProxy.ts +++ b/shared/src/proxies/generatePetitionPdfProxy.ts @@ -9,7 +9,6 @@ export const generatePetitionPdfInteractor = ( contactPrimary, contactSecondary, irsNotices, - isDraft, noticeIssuedDate, partyType, petitionFacts, @@ -20,7 +19,6 @@ export const generatePetitionPdfInteractor = ( }: any, ): Promise<{ fileId: string; - url: string; }> => { return post({ applicationContext, @@ -31,7 +29,6 @@ export const generatePetitionPdfInteractor = ( contactPrimary, contactSecondary, irsNotices, - isDraft, noticeIssuedDate, partyType, petitionFacts, diff --git a/web-client/src/presenter/actions/generatePetitionPdfAction.test.ts b/web-client/src/presenter/actions/generatePetitionPdfAction.test.ts index 1956c4c0d20..370f8865bbb 100644 --- a/web-client/src/presenter/actions/generatePetitionPdfAction.test.ts +++ b/web-client/src/presenter/actions/generatePetitionPdfAction.test.ts @@ -45,7 +45,7 @@ describe('generatePetitionPdfAction', () => { expect(results.output).toEqual(undefined); }); - it('should generate the petition, save id in state and return URL when petition is auto generated and current step is not 5', async () => { + it('should generate the petition and save id in state when petition is auto generated', async () => { const results = await runAction(generatePetitionPdfAction, { modules: { presenter, @@ -57,9 +57,6 @@ describe('generatePetitionPdfAction', () => { petitionProp: 'TEST_PROP', petitionType: PETITION_TYPES.autoGenerated, }, - stepIndicatorInfo: { - currentStep: 6, - }, }, }); @@ -67,7 +64,6 @@ describe('generatePetitionPdfAction', () => { applicationContext.getUseCases().generatePetitionPdfInteractor.mock.calls; expect(generatePetitionPdfInteractorCalls.length).toEqual(1); expect(generatePetitionPdfInteractorCalls[0][1]).toEqual({ - isDraft: false, noticeIssuedDate: 'RESULTS_formatDateString', petitionFileId: undefined, petitionProp: 'TEST_PROP', @@ -80,47 +76,8 @@ describe('generatePetitionPdfAction', () => { expect(formatDateStringCalls[0][0]).toEqual('TEST_noticeIssuedDate'); expect(formatDateStringCalls[0][1]).toEqual(FORMATS.MMDDYY); - expect(results.output).toEqual({ pdfUrl: 'TEST_URL' }); expect(results.state.petitionFormatted.petitionFileId).toEqual( 'TEST_FILE_ID', ); }); - - it('should generate the petition, not save id in state and return URL when petition is auto generated and current step is 5', async () => { - const results = await runAction(generatePetitionPdfAction, { - modules: { - presenter, - }, - state: { - petitionFormatted: { - petitionFileId: undefined, - petitionProp: 'TEST_PROP', - petitionType: PETITION_TYPES.autoGenerated, - }, - stepIndicatorInfo: { - currentStep: 5, - }, - }, - }); - - const generatePetitionPdfInteractorCalls = - applicationContext.getUseCases().generatePetitionPdfInteractor.mock.calls; - expect(generatePetitionPdfInteractorCalls.length).toEqual(1); - expect(generatePetitionPdfInteractorCalls[0][1]).toEqual({ - isDraft: true, - noticeIssuedDate: 'RESULTS_formatDateString', - petitionFileId: undefined, - petitionProp: 'TEST_PROP', - petitionType: 'autoGenerated', - }); - - const formatDateStringCalls = - applicationContext.getUtilities().formatDateString.mock.calls; - expect(formatDateStringCalls.length).toEqual(1); - expect(formatDateStringCalls[0][0]).toEqual(''); - expect(formatDateStringCalls[0][1]).toEqual(FORMATS.MMDDYY); - - expect(results.output).toEqual({ pdfUrl: 'TEST_URL' }); - expect(results.state.petitionFormatted.petitionFileId).toEqual(undefined); - }); }); diff --git a/web-client/src/presenter/actions/generatePetitionPdfAction.ts b/web-client/src/presenter/actions/generatePetitionPdfAction.ts index 02dab49f737..264d038abe9 100644 --- a/web-client/src/presenter/actions/generatePetitionPdfAction.ts +++ b/web-client/src/presenter/actions/generatePetitionPdfAction.ts @@ -8,26 +8,20 @@ export const generatePetitionPdfAction = async ({ store, }: ActionProps) => { const petition = get(state.petitionFormatted); - const isDraft = get(state.stepIndicatorInfo.currentStep) == 5; const { petitionType } = petition; if (petitionType === PETITION_TYPES.autoGenerated) { - const { fileId, url } = await applicationContext + const { fileId } = await applicationContext .getUseCases() .generatePetitionPdfInteractor(applicationContext, { ...petition, - isDraft, // do this in interactor noticeIssuedDate: applicationContext .getUtilities() .formatDateString(petition.noticeIssuedDate || '', FORMATS.MMDDYY), }); - if (!isDraft) { - store.set(state.petitionFormatted.petitionFileId, fileId); - } - - return { pdfUrl: url }; + store.set(state.petitionFormatted.petitionFileId, fileId); } }; diff --git a/web-client/src/presenter/actions/getStep1DataAction.test.ts b/web-client/src/presenter/actions/getStep1DataAction.test.ts index b2194641103..7b6d4728e8f 100644 --- a/web-client/src/presenter/actions/getStep1DataAction.test.ts +++ b/web-client/src/presenter/actions/getStep1DataAction.test.ts @@ -143,4 +143,50 @@ describe('getStep1DataAction', () => { useSameAsPrimary: false, }); }); + + it('should set contact type for secondary contact when a secondary contact is present', async () => { + const results = await runAction(getStep1DataAction, { + state: { + form: { + ...STATE_FORM, + contactPrimary: { + address2: 'TEST_PRIMARY_address2', + address3: 'TEST_PRIMARY_address3', + primary: true, + }, + contactSecondary: { + address1: 'TEST_SECONDARY_address1', + city: 'TEST_SECONDARY_city', + countryType: 'TEST_SECONDARY_countryType', + placeOfLegalResidence: 'TEST_SECONDARY_placeOfLegalResidence', + postalCode: 'TEST_SECONDARY_postalCode', + secondary: true, + state: 'TEST_SECONDARY_state', + }, + useSameAsPrimary: false, + }, + }, + }); + const { step1Data } = results.output; + expect(step1Data.contactSecondary.contactType).toEqual( + CONTACT_TYPES.secondary, + ); + }); + + it('should not set contact type for secondary contact when a secondary contact is not present', async () => { + const results = await runAction(getStep1DataAction, { + state: { + form: { + ...STATE_FORM, + contactPrimary: { + address2: 'TEST_PRIMARY_address2', + address3: 'TEST_PRIMARY_address3', + primary: true, + }, + }, + }, + }); + const { step1Data } = results.output; + expect(step1Data.contactSecondary).toBeUndefined(); + }); }); diff --git a/web-client/src/presenter/actions/getStep1DataAction.ts b/web-client/src/presenter/actions/getStep1DataAction.ts index a574ebe0375..e11775eedd8 100644 --- a/web-client/src/presenter/actions/getStep1DataAction.ts +++ b/web-client/src/presenter/actions/getStep1DataAction.ts @@ -21,10 +21,12 @@ export const getStep1DataAction = ({ get }: ActionProps) => { useSameAsPrimary, } = get(state.form); - const contactSecondaryWithType = { - ...contactSecondary, - contactType: CONTACT_TYPES.secondary, - }; + const contactSecondaryWithType = contactSecondary + ? { + ...contactSecondary, + contactType: CONTACT_TYPES.secondary, + } + : contactSecondary; const step1Data = { businessType, diff --git a/web-client/src/presenter/computeds/caseTypeDescriptionHelper.test.ts b/web-client/src/presenter/computeds/caseTypeDescriptionHelper.test.ts index 6395487824d..c6869f2013b 100644 --- a/web-client/src/presenter/computeds/caseTypeDescriptionHelper.test.ts +++ b/web-client/src/presenter/computeds/caseTypeDescriptionHelper.test.ts @@ -10,7 +10,7 @@ const caseTypeDescriptionHelper = withAppContextDecorator( const { CASE_TYPES_MAP } = applicationContext.getConstants(); describe('caseTypeDescriptionHelper', () => { - it('should return case types with proper descriptions for hasIrsNotice true', () => { + it('should return case types with proper descriptions and ordered correctly for hasIrsNotice true', () => { const result = runCompute(caseTypeDescriptionHelper, { state: { form: { hasIrsNotice: true }, @@ -79,7 +79,7 @@ describe('caseTypeDescriptionHelper', () => { }); }); - it('should return case types with proper descriptions for hasIrsNotice false', () => { + it('should return case types with proper descriptions and ordered correctly for hasIrsNotice false', () => { const result = runCompute(caseTypeDescriptionHelper, { state: { form: { hasIrsNotice: false }, @@ -89,12 +89,16 @@ describe('caseTypeDescriptionHelper', () => { expect(result).toMatchObject({ caseTypes: [ { - description: 'CDP (Lien/Levy)', + description: 'Deficiency', + type: CASE_TYPES_MAP.deficiency, + }, + { + description: 'Collection (Lien/Levy)', type: CASE_TYPES_MAP.cdp, }, { - description: 'Notice of Deficiency', - type: CASE_TYPES_MAP.deficiency, + description: 'Other', + type: CASE_TYPES_MAP.other, }, { description: 'Declaratory Judgment (Exempt Organization)', @@ -117,10 +121,7 @@ describe('caseTypeDescriptionHelper', () => { 'Interest Abatement - Failure of IRS to Make Final Determination Within 180 Days After Claim for Abatement', type: CASE_TYPES_MAP.interestAbatement, }, - { - description: 'Other', - type: CASE_TYPES_MAP.other, - }, + { description: 'Passport', type: CASE_TYPES_MAP.passport, diff --git a/web-client/src/presenter/computeds/caseTypeDescriptionHelper.ts b/web-client/src/presenter/computeds/caseTypeDescriptionHelper.ts index b02fc410c1e..7a0bda8f958 100644 --- a/web-client/src/presenter/computeds/caseTypeDescriptionHelper.ts +++ b/web-client/src/presenter/computeds/caseTypeDescriptionHelper.ts @@ -40,22 +40,25 @@ export const caseTypeDescriptionHelper = ( } }); + const reorderedList = form.hasIrsNotice + ? [ + 'Notice of Deficiency', + 'Notice of Determination Concerning Collection Action', + 'Other', + ] + : ['Deficiency', 'Collection (Lien/Levy)', 'Other']; + + const caseTypes = reorderCaseTypes(caseTypesWithDescriptions, reorderedList); + return { - caseTypes: form.hasIrsNotice - ? reorderCaseTypesForIrsNoticeCaseTypes(caseTypesWithDescriptions) - : caseTypesWithDescriptions, + caseTypes, }; }; -function reorderCaseTypesForIrsNoticeCaseTypes( +function reorderCaseTypes( caseTypes: { description: string; type: string }[], + specificOrder: string[], ) { - const specificOrder = [ - 'Notice of Deficiency', - 'Notice of Determination Concerning Collection Action', - 'Other', - ]; - const orderedItems: { description: string; type: string }[] = []; const otherItems: { description: string; type: string }[] = []; diff --git a/web-client/src/presenter/sequences/updatedFilePetitionCompleteStep5Sequence.ts b/web-client/src/presenter/sequences/updatedFilePetitionCompleteStep5Sequence.ts index 25987c4228d..36527c96476 100644 --- a/web-client/src/presenter/sequences/updatedFilePetitionCompleteStep5Sequence.ts +++ b/web-client/src/presenter/sequences/updatedFilePetitionCompleteStep5Sequence.ts @@ -1,6 +1,5 @@ import { clearAlertsAction } from '../actions/clearAlertsAction'; import { formatPetitionAction } from '@web-client/presenter/actions/formatPetitionAction'; -import { generatePetitionPdfAction } from '@web-client/presenter/actions/generatePetitionPdfAction'; import { generatePetitionPreviewPdfUrlAction } from '@web-client/presenter/actions/generatePetitionPreviewPdfUrlAction'; import { getStep1DataAction } from '@web-client/presenter/actions/getStep1DataAction'; import { getStep2DataAction } from '@web-client/presenter/actions/getStep2DataAction'; @@ -8,7 +7,6 @@ import { getStep3DataAction } from '@web-client/presenter/actions/getStep3DataAc import { getStep4DataAction } from '@web-client/presenter/actions/getStep4DataAction'; import { getStep5DataAction } from '@web-client/presenter/actions/getStep5DataAction'; import { incrementCurrentStepIndicatorAction } from '@web-client/presenter/actions/incrementCurrentStepIndicatorAction'; -import { setPdfPreviewUrlAction } from '@web-client/presenter/actions/CourtIssuedOrder/setPdfPreviewUrlAction'; import { setValidationErrorsAction } from '../actions/setValidationErrorsAction'; import { showProgressSequenceDecorator } from '@web-client/presenter/utilities/showProgressSequenceDecorator'; import { startShowValidationAction } from '../actions/startShowValidationAction'; @@ -29,8 +27,6 @@ export const updatedFilePetitionCompleteStep5Sequence = [ getStep3DataAction, getStep4DataAction, formatPetitionAction, - generatePetitionPdfAction, - setPdfPreviewUrlAction, generatePetitionPreviewPdfUrlAction, incrementCurrentStepIndicatorAction, ]), diff --git a/web-client/src/styles/custom.scss b/web-client/src/styles/custom.scss index ec5da797ed4..d086a44135f 100644 --- a/web-client/src/styles/custom.scss +++ b/web-client/src/styles/custom.scss @@ -2376,4 +2376,8 @@ button.change-scanner-button { li { margin-bottom: 0.5em; } +} + +.no-wrap-white-space { + white-space: normal; } \ No newline at end of file diff --git a/web-client/src/views/PetitionSuccessHeader.tsx b/web-client/src/views/PetitionSuccessHeader.tsx index d19d256d4ae..3018e2fff11 100644 --- a/web-client/src/views/PetitionSuccessHeader.tsx +++ b/web-client/src/views/PetitionSuccessHeader.tsx @@ -23,9 +23,12 @@ export const PetitionSuccessHeader = connect( data-testid="header-text" tabIndex={-1} > - + Docket Number:{' '} - + {caseDetail.docketNumberWithSuffix} diff --git a/web-client/src/views/StepIndicator.tsx b/web-client/src/views/StepIndicator.tsx index 245134bd4d2..cc0c67186a5 100644 --- a/web-client/src/views/StepIndicator.tsx +++ b/web-client/src/views/StepIndicator.tsx @@ -43,7 +43,7 @@ export const StepIndicator = connect( className="usa-button--unstyled no-underline" disabled={ +step > currentStep || - currentStep > Object.keys(steps).length + currentStep >= Object.keys(steps).length } onClick={() => { updateStepIndicatorSequence({ step: +step }); @@ -92,6 +92,7 @@ export const StepIndicator = connect( className={classNames( 'usa-step-indicator__total-steps', 'margin-left-05', + 'no-wrap', )} > of {Object.keys(steps).length}