From 9a55def7223fd100899810b720a23540ec62c81e Mon Sep 17 00:00:00 2001 From: Maria Katrin Bonde Date: Tue, 10 Dec 2024 12:42:03 +0100 Subject: [PATCH 1/2] show icon on booking, not offer --- frontend/src/components/Staffing/ConsultantRow.tsx | 2 +- frontend/src/components/Staffing/DetailedBookingRows.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Staffing/ConsultantRow.tsx b/frontend/src/components/Staffing/ConsultantRow.tsx index a0a99d30..236c4956 100644 --- a/frontend/src/components/Staffing/ConsultantRow.tsx +++ b/frontend/src/components/Staffing/ConsultantRow.tsx @@ -159,7 +159,7 @@ export default function ConsultantRows({ const dates = consultant.detailedBooking .filter( (e) => - e.bookingDetails.projectId > 0 && e.bookingDetails.type == "Offer", + e.bookingDetails.projectId > 0 && e.bookingDetails.type == "Booking", ) .map((e) => e.bookingDetails.endDateAgreement); diff --git a/frontend/src/components/Staffing/DetailedBookingRows.tsx b/frontend/src/components/Staffing/DetailedBookingRows.tsx index 32ab8e8b..021722da 100644 --- a/frontend/src/components/Staffing/DetailedBookingRows.tsx +++ b/frontend/src/components/Staffing/DetailedBookingRows.tsx @@ -110,6 +110,7 @@ export function DetailedBookingRows(props: { useEffect(() => { getColorIcon(); + console.log(openEngagementAndSetID); }, []); async function getColorIcon() { @@ -119,13 +120,14 @@ export function DetailedBookingRows(props: { const endDate = new Date(endDateString).getTime(); const today = new Date().getTime(); - if (today > endDate && bookingType == "Offer") { + + if (today > endDate && bookingType == "Booking") { return setAlertColor(colors.find((c) => c.color == "orange")); } else { return setAlertColor(colors.find((c) => c.color == "green")); } } else { - if (endDateString === null && bookingType == "Offer") { + if (endDateString === null && bookingType == "Booking") { return setAlertColor(colors.find((c) => c.color == "red")); } else { return setAlertColor(colors.find((c) => c.color == "transparent")); From 882e70fae0db2735b6a46bc2626730a44278536d Mon Sep 17 00:00:00 2001 From: Maria Katrin Bonde Date: Tue, 10 Dec 2024 12:46:12 +0100 Subject: [PATCH 2/2] console.log removed --- frontend/src/components/Staffing/DetailedBookingRows.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/Staffing/DetailedBookingRows.tsx b/frontend/src/components/Staffing/DetailedBookingRows.tsx index 021722da..34dfe3e0 100644 --- a/frontend/src/components/Staffing/DetailedBookingRows.tsx +++ b/frontend/src/components/Staffing/DetailedBookingRows.tsx @@ -110,7 +110,6 @@ export function DetailedBookingRows(props: { useEffect(() => { getColorIcon(); - console.log(openEngagementAndSetID); }, []); async function getColorIcon() {