From 7e4cc61c32e31daccc607becdea2d64578cfd1a8 Mon Sep 17 00:00:00 2001 From: Caitlin Barnard Date: Tue, 19 Nov 2024 11:36:58 +0000 Subject: [PATCH] Refactor payroll table component to be generic with headers --- front_end/src/Apps/Payroll.jsx | 13 +++++-- .../src/Components/EditPayroll/constants.js | 35 +++++++++++++++++++ .../src/Components/EditPayroll/index.jsx | 23 +----------- 3 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 front_end/src/Components/EditPayroll/constants.js diff --git a/front_end/src/Apps/Payroll.jsx b/front_end/src/Apps/Payroll.jsx index 3c33784d..161777ca 100644 --- a/front_end/src/Apps/Payroll.jsx +++ b/front_end/src/Apps/Payroll.jsx @@ -2,6 +2,7 @@ import { useEffect, useReducer, useState, useMemo } from "react"; import EditPayroll from "../Components/EditPayroll"; import * as api from "../Components/EditPayroll/api"; +import { payrollHeaders, vacancyHeaders } from "../Components/EditPayroll/constants"; const initialPayrollState = []; @@ -64,14 +65,22 @@ export default function Payroll() { )} -

Payroll

+

Payroll

-

Non-payroll

+

Non-payroll

+

Vacancies

+