Skip to content

Commit

Permalink
Fix previous months headers not hiding (#608)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Dudley <samuel.dudley@digital.trade.gov.uk>
  • Loading branch information
CaitBarnard and SamDudley authored Jan 29, 2025
1 parent 8b05ed2 commit fb2029e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function PayrollTable({
<tr className="govuk-table__row">
{headers.map((header) => {
const isActual = previousMonths.some(
(obj) => obj.month_short_name === header && obj.is_actual,
(obj) => obj.short_name === header && obj.is_actual,
);
const isHidden =
showPreviousMonths && isActual ? " hidden" : "";
Expand Down
5 changes: 3 additions & 2 deletions front_end/src/Components/EditPayroll/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@

/**
* @typedef {Object} PreviousMonthsData
* @property {string} month_short_name - The short form name of the month
* @property {int} month_index - The financial index of the month (Apr is 1 etc)
* @property {string} key - The short form name of the month in lowercase
* @property {string} short_name - The short form name of the month in titlecase
* @property {int} index - The financial index of the month (Apr is 1 etc)
* @property {bool} is_actual - Is the actual loaded for this month
*/

Expand Down

0 comments on commit fb2029e

Please sign in to comment.