From 956b93bbd8f42faf244d63e83fbcc0bb7ded4682 Mon Sep 17 00:00:00 2001 From: Maria Katrin Bonde <78419778+MariaBonde@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:48:56 +0100 Subject: [PATCH] Order not offer (#550) --- frontend/src/components/Staffing/ConsultantRow.tsx | 2 +- frontend/src/components/Staffing/DetailedBookingRows.tsx | 5 +++-- 2 files changed, 4 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..34dfe3e0 100644 --- a/frontend/src/components/Staffing/DetailedBookingRows.tsx +++ b/frontend/src/components/Staffing/DetailedBookingRows.tsx @@ -119,13 +119,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"));