1
1
import { gql , useApolloClient , useMutation } from "@apollo/client" ;
2
2
import {
3
- Box ,
4
3
Button ,
5
4
Divider ,
6
5
Flex ,
7
6
FormControl ,
8
7
FormLabel ,
9
8
Grid ,
10
9
GridItem ,
11
- Input ,
12
- Select ,
13
10
SimpleGrid ,
14
11
Spacer ,
15
12
Spinner ,
@@ -19,28 +16,23 @@ import {
19
16
Tbody ,
20
17
Td ,
21
18
Text ,
22
- Textarea ,
23
19
Th ,
24
20
Thead ,
25
21
Tr ,
26
22
useToast ,
27
23
} from "@chakra-ui/react" ;
28
24
import React , { useContext , useState } from "react" ;
29
- import { Value } from "react-multi-date-picker" ;
30
25
import { useNavigate } from "react-router-dom" ;
31
26
32
27
import MealDeliveryDetails from "./MealDeliveryDetails" ;
33
28
34
-
35
29
import * as Routes from "../../../constants/Routes" ;
36
- import { MEAL_DONOR_DASHBOARD_PAGE } from "../../../constants/Routes" ;
37
30
import AuthContext from "../../../contexts/AuthContext" ;
38
31
import { MealRequest } from "../../../types/MealRequestTypes" ;
39
32
import { Contact , OnsiteContact } from "../../../types/UserTypes" ;
40
33
import { logPossibleGraphQLError } from "../../../utils/GraphQLUtils" ;
41
34
import { useGetDefaultPageForUser } from "../../../utils/useGetDefaultPageForUser" ;
42
35
import useIsMealDonor from "../../../utils/useIsMealDonor" ;
43
- import OnsiteContactSection from "../../common/OnsiteContactSection" ;
44
36
45
37
// Create the GraphQL mutation
46
38
const COMMIT_TO_MEAL_REQUEST = gql `
@@ -132,13 +124,12 @@ const MealDonationFormReviewAndSubmit: React.FunctionComponent<MealDonationFormR
132
124
} ) ;
133
125
134
126
if ( isMealDonor ) {
135
- apolloClient . cache . evict ( { fieldName : "getMealRequestsByRequestorId" } ) ;
127
+ apolloClient . cache . evict ( {
128
+ fieldName : "getMealRequestsByRequestorId" ,
129
+ } ) ;
136
130
apolloClient . cache . evict ( { fieldName : "getMealRequestsByDonorId" } ) ;
137
- navigate (
138
- `${ Routes . MEAL_DONOR_CONFIRMATION_PAGE } ?aspId=${ aspId } ` ,
139
- ) ;
140
- }
141
- else {
131
+ navigate ( `${ Routes . MEAL_DONOR_CONFIRMATION_PAGE } ?aspId=${ aspId } ` ) ;
132
+ } else {
142
133
navigate ( defaultPage ) ;
143
134
}
144
135
}
@@ -171,7 +162,15 @@ const MealDonationFormReviewAndSubmit: React.FunctionComponent<MealDonationFormR
171
162
< Text fontSize = "2xl" as = "b" >
172
163
Step 3
173
164
</ Text >
174
-
165
+ < Text
166
+ color = "gray.600"
167
+ fontStyle = "italic"
168
+ fontSize = "xs"
169
+ marginY = "1rem"
170
+ >
171
+ Please note that once you press submit, you will need to contact
172
+ the administrators to cancel the donation.
173
+ </ Text >
175
174
< FormControl >
176
175
< FormLabel variant = "form-label-bold" >
177
176
Primary Contact Name
0 commit comments