Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIV-14580 - Update claimant feedback link shown in the feedback banner #4216

Merged
merged 15 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/modules/i18n/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"BETA": "BETA",
"MONEY_CLAIMS": "Hawliadau am Arian",
"MY_ACCOUNT": "Fy nghyfrif",
"NEW_SERVICE": "Mae hwn yn wasanaeth newydd – bydd eich <a class='govuk-link' href='https://www.smartsurvey.co.uk/s/IDAMSurvey/?pageurl=https://hmcts-access.service.gov.uk/login?client_id%3Dcmc_citizen' target='_blank'>adborth</a> yn ein helpu i’w wella.",
"NEW_SERVICE": "Mae hwn yn wasanaeth newydd – bydd eich <a class='govuk-link' href='https://www.smartsurvey.co.uk/s/IDAMSurvey/?pageurl={{ pageTitle }}' target='_blank'>adborth</a> yn ein helpu i’w wella.",
"SIGN_IN": "Mewngofnodi",
"SIGN_OUT": "Allgofnodi"
},
Expand Down Expand Up @@ -4462,6 +4462,7 @@
},
"CONFIRMATION_PAGE": {
"TITLE": "Confirmation of your hearing fee payment",
"TITLE_CLAIM_FEE": "Confirmation of your claim fee payment",
"CONFIRMATION_TITLE.HEARING": "Mae eich ceisiadau am help i dalu ffioedd gwrandawiad’ yn gyflawn",
"REFERENCE_NUMBER": "Eich cyfeirnod yw ",
"WHAT_HAPPENS_NEXT": "Beth fydd yn digwydd nesaf",
Expand Down
3 changes: 2 additions & 1 deletion src/main/modules/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"BETA": "BETA",
"MONEY_CLAIMS": "Money Claims",
"MY_ACCOUNT": "My account",
"NEW_SERVICE": "This is a new service – your <a class='govuk-link' href='https://www.smartsurvey.co.uk/s/IDAMSurvey/?pageurl=https://hmcts-access.service.gov.uk/login?client_id%3Dcmc_citizen' target='_blank'>feedback</a> will help us to improve it.",
"NEW_SERVICE": "This is a new service – your <a class='govuk-link' href='https://www.smartsurvey.co.uk/s/CMC_Feedback?pageurl={{ pageTitle }}' target='_blank'>feedback</a> will help us to improve it.",
"SIGN_IN": "Sign in",
"SIGN_OUT": "Sign out"
},
Expand Down Expand Up @@ -4462,6 +4462,7 @@
},
"CONFIRMATION_PAGE": {
"TITLE": "Confirmation of your hearing fee payment",
"TITLE_CLAIM_FEE": "Confirmation of your claim fee payment",
"CONFIRMATION_TITLE.HEARING": "Your application for help with the hearing fee is complete ",
"REFERENCE_NUMBER": "Your reference number",
"WHAT_HAPPENS_NEXT": "What happens next",
Expand Down
5 changes: 5 additions & 0 deletions src/main/modules/nunjucks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class Nunjucks {
nunjucksEnv.addFilter('addDaysTranslated', addDaysFilterTranslated);
nunjucksEnv.addFilter('date', dateFilter);
nunjucksEnv.addFilter('formatDate', formatDate);
nunjucksEnv.addFilter('replaceSpaces', replaceSpace);
nunjucksEnv.addGlobal('t', t);
nunjucksEnv.addGlobal('getLanguage', getLanguage);
nunjucksEnv.addGlobal('translateErrors', translateErrors);
Expand Down Expand Up @@ -175,3 +176,7 @@ export class Nunjucks {
});
}
}

const replaceSpace = (title: string): string => {
return title.replace(/ /g, '_').replace('\'','');
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import {YesNo} from 'common/form/models/yesNo';

const delayedFlightController = Router();
const delayedFlightPath = 'features/claim/airlines/delayed-flight';
const pageTitle = 'PAGES.DELAYED_FLIGHT.CLAIMING_FOR_DELAYED';

delayedFlightController.get(DELAYED_FLIGHT_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
try {
const userId = req.session?.user?.id;
const delayedFlight = await getDelayedFlight(userId);
const form = new GenericForm(delayedFlight);
res.render(delayedFlightPath, {form});
res.render(delayedFlightPath, {form, pageTitle});
} catch (error) {
next(error);
}
Expand All @@ -26,17 +27,17 @@ delayedFlightController.post(DELAYED_FLIGHT_URL, (async (req: AppRequest, res: R
const delayedFlight = new GenericYesNo(req.body.option, 'ERRORS.DELAYED_FLIGHT.CLAIMING_FOR_DELAY_REQUIRED');
const form = new GenericForm(delayedFlight);
form.validateSync();

if (form.hasErrors()) {
res.render(delayedFlightPath, {form});
res.render(delayedFlightPath, {form, pageTitle});
} else {
await saveDelayedFlight(userId, delayedFlight);

delayedFlight.option === YesNo.YES
delayedFlight.option === YesNo.YES
? res.redirect(FLIGHT_DETAILS_URL)
: res.redirect(CLAIM_DEFENDANT_COMPANY_DETAILS_URL);
}

} catch (error) {
next(error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const flightDetailsController = Router();
const flightDetailsPath = 'features/claim/airlines/flight-details';
const civilServiceApiBaseUrl = config.get<string>('services.civilService.url');
const civilServiceClient: CivilServiceClient = new CivilServiceClient(civilServiceApiBaseUrl);
const pageTitle= 'PAGES.FLIGHT_DETAILS.FLIGHT_DETAILS';

flightDetailsController.get(FLIGHT_DETAILS_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
try {
Expand All @@ -21,7 +22,7 @@ flightDetailsController.get(FLIGHT_DETAILS_URL, (async (req: AppRequest, res: Re
const form = new GenericForm(flightDetails);
const airlines = await civilServiceClient.getAirlines(req);
const datalist = buildDataList(airlines, form.hasFieldError('airline'), flightDetails.airline, lng);
res.render(flightDetailsPath, {form, today: new Date(), airlines, datalist});
res.render(flightDetailsPath, {form, today: new Date(), airlines, datalist, pageTitle});
} catch (error) {
next(error);
}
Expand All @@ -39,7 +40,7 @@ flightDetailsController.post(FLIGHT_DETAILS_URL, (async (req: AppRequest, res: R
form.validateSync();
if (form.hasErrors()) {
const datalist = buildDataList(airlines, form.hasFieldError('airline'), airline, lng);
res.render(flightDetailsPath, {form, today: new Date(), airlines, datalist});
res.render(flightDetailsPath, {form, today: new Date(), airlines, datalist, pageTitle});
} else {
await saveFlightDetails(userId, flightDetails);
res.redirect(CLAIM_DEFENDANT_COMPANY_DETAILS_URL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const claimAmountBreakdownController = Router();
const viewPath = 'features/claim/amount/claim-amount-breakdown';

function renderView(form: GenericForm<AmountBreakdown>, res: Response) {
res.render(viewPath, {form});
res.render(viewPath, {form, pageTitle: 'PAGES.CLAIM_AMOUNT_BREAKDOWN.TITLE'});
}

claimAmountBreakdownController.get(CLAIM_AMOUNT_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const civilServiceApiBaseUrl = config.get<string>('services.civilService.url');
const civilServiceClient: CivilServiceClient = new CivilServiceClient(civilServiceApiBaseUrl);

function renderView(form: GenericForm<GenericYesNo>, res: Response): void {
res.render(bilingualLangPreferenceViewPath, {form});
res.render(bilingualLangPreferenceViewPath, {form, pageTitle: 'PAGES.CLAIM_BILINGUAL_LANGUAGE_PREFERENCE.PAGE_TITLE'});
}

claimBilingualLangPreferenceController.get(
Expand Down
1 change: 1 addition & 0 deletions src/main/routes/features/claim/checkAnswersController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function renderView(res: Response, form: GenericForm<StatementOfTruthForm> | Gen
res.render(checkAnswersViewPath, {
form, summarySections, signatureType,
payment,
pageTitle: 'PAGES.CHECK_YOUR_ANSWER.TITLE',
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ claimSubmittedController.get(CLAIM_CONFIRMATION_URL, (async (req: AppRequest, re
helpWithFee,
claimId,
redirectUrl,
pageTitle: 'PAGES.CLAIM_SUBMITTED.PAGE_TITLE',
});
}
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ claimTaskListController.get(CLAIMANT_TASK_LIST_URL, claimIssueTaskListGuard, (as
const {completed, total} = calculateTotalAndCompleted(taskLists);
const description = t('PAGES.CLAIM_TASK_LIST.COMPLETED_SECTIONS', {completed, total, lng});
const title = completed < total ? t('PAGES.CLAIM_TASK_LIST.APPLICATION_COMPLETE', {lng}) : t('PAGES.CLAIM_TASK_LIST.APPLICATION_INCOMPLETE', {lng});
res.render(taskListViewPath, {taskLists, title, description});
res.render(taskListViewPath, {taskLists, title, description, pageTitle:'PAGES.CLAIM_TASK_LIST.PAGE_TITLE'});
} catch (error) {
next(error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const completingClaimViewPath = 'features/claim/completing-claim';
const completingClaimController = Router();

completingClaimController.get(CLAIM_COMPLETING_CLAIM_URL, (_req, res) => {
res.render(completingClaimViewPath);
res.render(completingClaimViewPath, {pageTitle: 'PAGES.COMPLETING_CLAIM.PAGE_TITLE'});
});

completingClaimController.post(CLAIM_COMPLETING_CLAIM_URL, (async (req: AppRequest, res: Response, next: NextFunction): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const helpWithFeesViewPath = 'features/claim/details/help-with-fees';
const helpWithFeesPropertyName = 'helpWithFees';

function renderView(form: GenericForm<HelpWithFees>, res: Response): void {
res.render(helpWithFeesViewPath, {form});
res.render(helpWithFeesViewPath, {form, pageTitle: 'PAGES.HELP_WITH_FEES.PAGE_TITLE'});
}

helpWithFeesController.get(CLAIM_HELP_WITH_FEES_URL, async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const reasonViewPath = 'features/claim/details/reason';
const claimDetailsPropertyName = 'reason';

function renderView(form: GenericForm<Reason>, res: Response): void {
res.render(reasonViewPath, {form});
res.render(reasonViewPath, {form, pageTitle: 'PAGES.REASON.PAGE_TITLE'});
}

reasonController.get(CLAIM_REASON_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
2 changes: 1 addition & 1 deletion src/main/routes/features/claim/feeChangeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ feeChangeController.get(CLAIM_FEE_CHANGE_URL, (async (req: AppRequest, res: Resp
const claimFee = convertToPoundsFilter(newClaimFeeData.calculatedAmountInPence);
const draftClaimData: DraftClaimData = await getDraftClaimData(user?.accessToken, user?.id);
const redirectUrl = draftClaimData?.draftClaim ? CLAIMANT_TASK_LIST_URL : draftClaimData.claimCreationUrl;
return res.render(feeChangeViewPath, {claimFee, redirectUrl});
return res.render(feeChangeViewPath, {claimFee, redirectUrl, pageTitle: 'PAGES.FEE_CHANGE.PAGE_TITLE'});
} catch (error) {
next(error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ incompleteClaimIssueSubmissionController.get(CLAIM_INCOMPLETE_SUBMISSION_URL, (a
res.render(incompleteSubmissionViewPath, {
tasks: taskLists,
taskListUri: constructResponseUrlWithIdParams(req.params.id, CLAIMANT_TASK_LIST_URL),
pageTitle: 'PAGES.INCOMPLETE_SUBMISSION.TITLE',
});
} catch (error) {
next(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const claimInterestController = express.Router();
const claimInterestPath = 'features/claim/interest/claim-interest';

function renderView(form: GenericForm<GenericYesNo>, res: express.Response): void {
res.render(claimInterestPath, {form});
res.render(claimInterestPath, {form, pageTitle: 'PAGES.CLAIM_JOURNEY.CLAIM_INTEREST.PAGE_TITLE'});
}

claimInterestController.get(CLAIM_INTEREST_URL, (async (req:AppRequest, res:express.Response, next: express.NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ claimTotalInterestController.get(CLAIM_INTEREST_TOTAL_URL, (async (req: AppReque
const interest = await getInterest(req.session?.user?.id);
res.render(claimTotalInterestViewPath, {
form: new GenericForm(new TotalInterest(interest?.totalInterest?.amount.toString(), interest?.totalInterest?.reason)),
pageTitle: 'PAGES.TOTAL_INTEREST.PAGE_TITLE',
});
} catch (error) {
next(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const claimantInterestFromViewPath = 'features/claim/interest/claimant-interest-
const propertyName = 'interestClaimFrom';

function renderView(form: GenericForm<InterestClaimFromSelection>, res: Response): void {
res.render(claimantInterestFromViewPath, {form});
res.render(claimantInterestFromViewPath, {form, pageTitle: 'PAGES.CLAIM_JOURNEY.WHEN_CLAIM_INTEREST_FROM.TITLE'});
}

claimantInterestFromController.get(CLAIM_INTEREST_DATE_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const interestRateViewPath = 'features/claim/interest/claimant-interest-rate';
const propertyName = 'sameRateInterestSelection';

function renderView(form: GenericForm<ClaimantInterestRate>, res: Response): void {
res.render(interestRateViewPath, {form});
res.render(interestRateViewPath, {form, pageTitle: 'PAGES.CLAIMANT_INTEREST_RATE.PAGE_TITLE'});
}

interestRateController.get(CLAIM_INTEREST_RATE_URL, (async (req:AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const continueClaimingInterestController = Router();
const continueClaimingInterestPath = 'features/claim/interest/continue-claiming-interest';

function renderView(form: GenericForm<GenericYesNo>, res: Response): void {
res.render(continueClaimingInterestPath, {form});
res.render(continueClaimingInterestPath, {form, pageTitle: 'PAGES.CLAIM_JOURNEY.CONTINUE_CLAIMING_INTEREST.PAGE_TITLE'});
}

continueClaimingInterestController.get(CLAIM_INTEREST_CONTINUE_CLAIMING_URL, (async (req:AppRequest, res:Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const howMuchContinueClaimingController = Router();
const howMuchContinueClaimingPath = 'features/claim/interest/how-much-continue-claiming';

function renderView(form: GenericForm<HowMuchContinueClaiming>, res: Response): void {
res.render(howMuchContinueClaimingPath, {form});
res.render(howMuchContinueClaimingPath, {form, pageTitle: 'PAGES.CLAIM_JOURNEY.HOW_MUCH_CONTINUE.PAGE_TITLE'});
}

howMuchContinueClaimingController.get(CLAIM_INTEREST_HOW_MUCH_URL, (async (req:AppRequest, res:Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const interestEndDateViewPath = 'features/claim/interest/interest-end-date';
const dqPropertyName = 'interestEndDate';

function renderView(form: GenericForm<InterestEndDate>, res: Response): void {
res.render(interestEndDateViewPath, {form});
res.render(interestEndDateViewPath, {form, pageTitle: 'PAGES.CLAIM_JOURNEY.INTEREST_END_DATE.TITLE'});
}

interestEndDateController.get(CLAIM_INTEREST_END_DATE_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const interestStartDateViewPath = 'features/claim/interest/interest-start-date';
const interestPropertyName = 'interestStartDate';

function renderView(form: GenericForm<InterestStartDate>, res: Response): void {
res.render(interestStartDateViewPath, {form, today: new Date()});
res.render(interestStartDateViewPath, {form, today: new Date(), pageTitle: 'PAGES.INTEREST_START_DATE.PAGE_TITLE'});
}

interestStartDateController.get(CLAIM_INTEREST_START_DATE_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const interestTypeViewPath = 'features/claim/interest/interest-type';
const propertyName = 'interestClaimOptions';

function renderView(form: GenericForm<InterestClaimOption>, res: Response) {
res.render(interestTypeViewPath, {form});
res.render(interestTypeViewPath, {form, pageTitle: 'PAGES.INTEREST_CLAIM_OPTIONS.PAGE_TITLE'});
}

interestTypeController.get(CLAIM_INTEREST_TYPE_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ claimFeeBreakDownController.get(CLAIM_FEE_BREAKUP, claimFeePaymentGuard, (async
const hasInterest = claim.claimInterest === YesNo.YES;
const interestAmount = calculateInterestToDate(claim);
const totalAmount = hasInterest ? (claim.totalClaimAmount + interestAmount + claimFee) : (claim.totalClaimAmount + claimFee);
return res.render(viewPath, { totalClaimAmount: claim.totalClaimAmount?.toFixed(2), interest: interestAmount, claimFee, hasInterest, totalAmount: totalAmount?.toFixed(2) });
return res.render(viewPath, { totalClaimAmount: claim.totalClaimAmount?.toFixed(2), interest: interestAmount, claimFee, hasInterest, totalAmount: totalAmount?.toFixed(2), pageTitle: 'PAGES.FEE_AMOUNT.TITLE' });
} catch (error) {
next(error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ async function renderView(res: Response, req: AppRequest, claimId: string, redir
paymentSuccessfulPanel: getPaymentSuccessfulPanelContent(claim, lng),
paymentSuccessfulBody: getPaymentSuccessfulBodyContent(claim, lng),
paymentSuccessfulButton: getPaymentSuccessfulButtonContent(redirectUrl),
pageTitle: 'PAGES.PAY_HEARING_FEE.CONFIRMATION_PAGE.TITLE_CLAIM_FEE',
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ paymentUnsuccessfulController.get(PAY_CLAIM_FEE_UNSUCCESSFUL_URL, (async (req: A
res.render(paymentUnsuccessfulViewPath, {
claimNumber,
makePaymentAgainUrl,
pageTitle: 'PAGES.LATEST_UPDATE_CONTENT.CASE_PROGRESSION.HEARING_FEE.PAYMENT.UNSUCCESSFUL.PAGE_TITLE',
});
} catch (error) {
next(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async function renderView(res: Response, req: AppRequest | Request, claimId: st
paymentSuccessfulPanel: getPaymentSuccessfulPanelContent(claim,lng),
paymentSuccessfulBody: getPaymentSuccessfulBodyContent(claim, calculatedAmountInPence,lng),
paymentSuccessfulButton: getPaymentSuccessfulButtonContent(redirectUrl),
pageTitle: 'PAGES.PAY_HEARING_FEE.CONFIRMATION_PAGE.TITLE',
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const resolvingThisDisputeController = Router();
const resolvingThisDisputePath = 'features/claim/resolving-this-dispute';

resolvingThisDisputeController.get(CLAIM_RESOLVING_DISPUTE_URL, (async (req: Request, res: Response) => {
res.render(resolvingThisDisputePath);
res.render(resolvingThisDisputePath, {pageTitle: 'PAGES.CLAIM_JOURNEY.RESOLVE_THE_DISPUTE.PAGE_TITLE'});
}) as RequestHandler);

resolvingThisDisputeController.post(CLAIM_RESOLVING_DISPUTE_URL, (req: AppRequest, res: Response, next: NextFunction): void => {
Expand Down
2 changes: 1 addition & 1 deletion src/main/routes/features/claim/totalAmountController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const totalAmountController = Router();
const totalAmountViewPath = 'features/claim/total-amount';

function renderView(form: object, res: Response): void {
res.render(totalAmountViewPath, {form});
res.render(totalAmountViewPath, {form, pageTitle: 'PAGES.TOTAL_AMOUNT.PAGE_TITLE'});
}

totalAmountController.get(CLAIM_TOTAL_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ function renderPage(res: Response, req: Request, claimantDetails: GenericForm<Pa
party: claimantDetails,
type: partyType,
carmEnabled: carmEnabled,
pageTitle: 'PAGES.COMPANY_DETAILS.CLAIMANT_PAGE_TITLE',
});
} else {
res.render(claimantIndividualDetailsPath, {
party: claimantDetails,
type: partyType,
pageTitle: 'PAGES.CLAIM_JOURNEY.CLAIMANT_INDIVIDUAL_DETAILS.PAGE_TITLE',
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { DOBDate } from 'common/form/models/claim/claimant/dobDate';

const claimantDoBController = Router();
const claimantDoBViewPath = 'features/response/citizenDob/citizen-dob';
const pageTitle= 'PAGES.CLAIMANT_DOB.PAGE_TITLE';

claimantDoBController.get(CLAIMANT_DOB_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
try {
Expand All @@ -22,7 +23,7 @@ claimantDoBController.get(CLAIMANT_DOB_URL, (async (req: AppRequest, res: Respon
const dateOfBirth = new Date(claim.applicant1.dateOfBirth as unknown as string);
form = new GenericForm(new DOBDate(dateOfBirth.getDate().toString(), (dateOfBirth.getMonth() + 1).toString(), dateOfBirth.getFullYear().toString()));
}
res.render(claimantDoBViewPath, {form, today: new Date(), claimantView: true, maxDateForAge18: getDOBforAgeFromCurrentTime(18)});
res.render(claimantDoBViewPath, {form, today: new Date(), claimantView: true, maxDateForAge18: getDOBforAgeFromCurrentTime(18), pageTitle });
} catch (error) {
next(error);
}
Expand All @@ -36,7 +37,7 @@ claimantDoBController.post(CLAIMANT_DOB_URL, (async (req: AppRequest | Request,
form.validateSync();

if (form.hasErrors()) {
res.render(claimantDoBViewPath, {form, today: new Date(), claimantView: true, maxDateForAge18: getDOBforAgeFromCurrentTime(18)});
res.render(claimantDoBViewPath, {form, today: new Date(), claimantView: true, maxDateForAge18: getDOBforAgeFromCurrentTime(18), pageTitle});
} else {
const claim = await getCaseDataFromStore(claimId);
claim.applicant1.dateOfBirth = new DOBDate(day, month, year);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const evidenceViewPath = 'features/claim/claimant-evidences';
const evidenceController = Router();

function renderView(form: GenericForm<Evidence>, res: Response): void {
res.render(evidenceViewPath, {form});
res.render(evidenceViewPath, {form, pageTitle: 'PAGES.EVIDENCE.PAGE_TITLE'});
}

evidenceController.get(CLAIM_EVIDENCE_URL, (async (req: AppRequest, res: Response, next: NextFunction) => {
Expand Down
Loading
Loading