From 05f700ca61decf11d7a501b499c6c40edcdf2a6d Mon Sep 17 00:00:00 2001 From: Caitlin Barnard Date: Wed, 29 Jan 2025 13:49:59 +0000 Subject: [PATCH 1/2] Fix previous months headers not hiding --- front_end/src/Components/EditPayroll/PayrollTable/index.jsx | 2 +- front_end/src/Components/EditPayroll/types.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/front_end/src/Components/EditPayroll/PayrollTable/index.jsx b/front_end/src/Components/EditPayroll/PayrollTable/index.jsx index 5b680574..92682452 100644 --- a/front_end/src/Components/EditPayroll/PayrollTable/index.jsx +++ b/front_end/src/Components/EditPayroll/PayrollTable/index.jsx @@ -23,7 +23,7 @@ export default function PayrollTable({ {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" : ""; diff --git a/front_end/src/Components/EditPayroll/types.js b/front_end/src/Components/EditPayroll/types.js index 0df813a0..87decde9 100644 --- a/front_end/src/Components/EditPayroll/types.js +++ b/front_end/src/Components/EditPayroll/types.js @@ -33,7 +33,8 @@ /** * @typedef {Object} PreviousMonthsData - * @property {string} month_short_name - The short form name of the month + * @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} month_index - The financial index of the month (Apr is 1 etc) * @property {bool} is_actual - Is the actual loaded for this month */ From cbe3b360eec9f38d009a50974bb8e5648af3db13 Mon Sep 17 00:00:00 2001 From: Caitlin Barnard <54268863+CaitBarnard@users.noreply.github.com> Date: Wed, 29 Jan 2025 15:24:44 +0000 Subject: [PATCH 2/2] Update front_end/src/Components/EditPayroll/types.js Co-authored-by: Sam Dudley --- front_end/src/Components/EditPayroll/types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front_end/src/Components/EditPayroll/types.js b/front_end/src/Components/EditPayroll/types.js index 87decde9..7fc8577a 100644 --- a/front_end/src/Components/EditPayroll/types.js +++ b/front_end/src/Components/EditPayroll/types.js @@ -35,7 +35,7 @@ * @typedef {Object} PreviousMonthsData * @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} month_index - The financial index of the month (Apr is 1 etc) + * @property {int} index - The financial index of the month (Apr is 1 etc) * @property {bool} is_actual - Is the actual loaded for this month */