File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -234,8 +234,16 @@ export const MealRequestCalendarView = ({
234
234
const getEventColor = ( mealRequest : MealRequest ) => {
235
235
if ( pageContext === "asp" ) {
236
236
if ( mealRequest . donationInfo ) {
237
+ if ( mealRequest . status === MealStatus . FULFILLED ) {
238
+ // return "#2e8438";
239
+ return "#C6F6D5" ;
240
+ }
241
+ if ( mealRequest . status === MealStatus . UPCOMING ) {
242
+ return "#D5C4EC"
243
+ }
244
+
237
245
return mealRequest . id === selectedMealRequests [ 0 ]
238
- ? "#2e8438 "
246
+ ? "#C6F6D5 "
239
247
: "#3BA948" ;
240
248
}
241
249
@@ -266,7 +274,7 @@ export const MealRequestCalendarView = ({
266
274
mealRequest,
267
275
} ,
268
276
backgroundColor : getEventColor ( mealRequest ) ,
269
- textColor : mealRequest . donationInfo ? "white" : "black" ,
277
+ textColor : "black" ,
270
278
display : "block" ,
271
279
} ;
272
280
} ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import EditMealRequestForm from "./EditMealRequestForm";
42
42
import { MealRequestCalendarView } from "../components/common/MealRequestCalendarView" ;
43
43
import { CREATE_MEAL_REQUEST_PAGE , LOGIN_PAGE } from "../constants/Routes" ;
44
44
import AuthContext from "../contexts/AuthContext" ;
45
- import { MealRequest } from "../types/MealRequestTypes" ;
45
+ import { MealRequest , MealStatus } from "../types/MealRequestTypes" ;
46
46
import { logPossibleGraphQLError } from "../utils/GraphQLUtils" ;
47
47
48
48
const DELETE_MEAL_REQUEST = gql `
@@ -234,7 +234,7 @@ const ASPCalendar = ({ authId }: ASPCalendarProps) => {
234
234
< Box textAlign = "center" marginBottom = { 4 } >
235
235
{ selectedMealRequest . donationInfo ? (
236
236
< Text fontSize = "20px" as = "b" >
237
- Upcoming Delivery
237
+ { selectedMealRequest . status === MealStatus . UPCOMING ? " Upcoming Delivery" : "Fulfilled Meal" }
238
238
</ Text >
239
239
) : (
240
240
< Text fontSize = "20px" as = "b" >
@@ -373,6 +373,7 @@ const ASPCalendar = ({ authId }: ASPCalendarProps) => {
373
373
) : null }
374
374
</ Table >
375
375
< Box position = "absolute" bottom = { 2 } right = { 2 } >
376
+ { selectedMealRequest . status !== MealStatus . FULFILLED ?
376
377
< HStack spacing = { 2 } >
377
378
< Button
378
379
variant = "link"
@@ -386,6 +387,7 @@ const ASPCalendar = ({ authId }: ASPCalendarProps) => {
386
387
Edit
387
388
</ Button >
388
389
</ HStack >
390
+ : null }
389
391
</ Box >
390
392
</ Card >
391
393
) : (
You can’t perform that action at this time.
0 commit comments