From eea2b590d2754d29d1eae50edc4f2a22e1702b16 Mon Sep 17 00:00:00 2001
From: Keannu Bernasol
+ Results Found:{" "} + { + equipment_instances?.data?.filter((equipment) => + filter !== null + ? // If filter is not null, we filter if it matches any criteria + equipment.equipment_name + .toLowerCase() + .includes(filter.toLowerCase()) || + equipment.category + .toLowerCase() + .includes(filter.toLowerCase()) || + equipment.last_updated + .toLowerCase() + .includes(filter?.toLowerCase()) || + equipment.status.toLowerCase() == filter.toLowerCase() + : // If filter keyword is null then we just pass through everything as if we did not filter at all + true + ).length + } +
+ Results Found:{" "} + { + transactions?.data?.filter((transaction) => + filter !== null + ? // If filter is not null, we filter if it matches any criteria + transaction.borrower.name + .toLowerCase() + .includes(filter.toLowerCase()) || + transaction.teacher.name + .toLowerCase() + .includes(filter.toLowerCase()) || + transaction.remarks + .toLowerCase() + .includes(filter?.toLowerCase()) || + transaction.transaction_status.toLowerCase() == + filter.toLowerCase() + : // If filter keyword is null then we just pass through everything as if we did not filter at all + true + ).length + } +