Skip to content

Commit

Permalink
Remove unneeded editPayroll component and fix key warning
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitBarnard committed Dec 3, 2024
1 parent bb41d9f commit 6609279
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
8 changes: 4 additions & 4 deletions front_end/src/Apps/Payroll.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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";
import EmployeeRow from "../Components/EditPayroll/EmployeeRow";
import VacancyRow from "../Components/EditPayroll/VacancyRow";
import PayrollTable from "../Components/EditPayroll/PayrollTable";

const initialPayrollState = [];
const initialVacanciesState = [];
Expand Down Expand Up @@ -84,21 +84,21 @@ export default function Payroll() {
</div>
)}
<h2 className="govuk-heading-m">Payroll</h2>
<EditPayroll
<PayrollTable
payroll={payroll}
headers={payrollHeaders}
onTogglePayPeriods={handleTogglePayPeriods}
RowComponent={EmployeeRow}
/>
<h2 className="govuk-heading-m">Non-payroll</h2>
<EditPayroll
<PayrollTable
payroll={nonPayroll}
headers={payrollHeaders}
onTogglePayPeriods={handleTogglePayPeriods}
RowComponent={EmployeeRow}
/>
<h2 className="govuk-heading-m">Vacancies</h2>
<EditPayroll
<PayrollTable
payroll={vacancies}
headers={vacancyHeaders}
onTogglePayPeriods={handleToggleVacancyPayPeriods}
Expand Down
3 changes: 2 additions & 1 deletion front_end/src/Components/EditPayroll/PayrollTable/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function PayrollTable({
}) {
return (
<>
<div class="scrollable">
<div className="scrollable">
<table className="govuk-table">
<thead className="govuk-table__head">
<tr className="govuk-table__row">
Expand All @@ -29,6 +29,7 @@ export default function PayrollTable({
{payroll.map((row) => {
return (
<RowComponent
key={row.id}
row={row}
onTogglePayPeriods={onTogglePayPeriods}
/>
Expand Down
24 changes: 0 additions & 24 deletions front_end/src/Components/EditPayroll/index.jsx

This file was deleted.

0 comments on commit 6609279

Please sign in to comment.