Skip to content

Commit

Permalink
Order not offer (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaBonde authored Dec 10, 2024
1 parent ec4e632 commit 956b93b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Staffing/ConsultantRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/Staffing/DetailedBookingRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 956b93b

Please sign in to comment.