Skip to content

Commit

Permalink
improve filter
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewThien committed Dec 5, 2024
1 parent 5b8e4db commit 87fb07f
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,8 @@ export const columns: ColumnDef<ScanReportTable>[] = [
cell: ({ row }) => {
const { id, name, jobs } = row.original;
// Filter the jobs based on the scanReportTable ID
let jobsData: Job[] = [];
console.log("🚀 ~ jobsData:", jobsData);
jobs.map((job) => {
if (job.scan_report_table == id) {
jobsData.push(job);
}
});
const jobsData: Job[] = jobs.filter((job) => job.scan_report_table == id);

// Get the general status of the table
const generalStatus = FindGeneralStatus(jobsData);

Expand Down

0 comments on commit 87fb07f

Please sign in to comment.