@@ -18,6 +18,7 @@ import {
18
18
publicTicketNoTicket as publicTicket ,
19
19
redeemsForTicket ,
20
20
redeemForId ,
21
+ oneTicket ,
21
22
} from "../../src/helpers/API" ;
22
23
import { colors } from "../../styles/theme" ;
23
24
@@ -98,6 +99,20 @@ const StyledTicket = styled.div<{ color: string }>`
98
99
margin-bottom: 16px;
99
100
` ;
100
101
102
+ const FlexWrap = styled . div `
103
+ display: flex;
104
+ flex-wrap: wrap;
105
+ ` ;
106
+
107
+ const FlexItem = styled . div `
108
+ flex: 1 1 50%;
109
+ ` ;
110
+
111
+ const BC = styled . span `
112
+ font-weight: bold;
113
+ text-transform: capitalize;
114
+ ` ;
115
+
101
116
const NOT_REDEEMED = "not_redeemed" ;
102
117
103
118
interface Hash {
@@ -178,6 +193,12 @@ const Watchman: NextPage = (props) => {
178
193
retry : false ,
179
194
cacheTime : 0 ,
180
195
} ) as { isLoading : boolean ; data ?: any } ;
196
+ const { data : preferences } = useQuery ( {
197
+ queryKey : [ "oneTicket" , ticketId ] ,
198
+ queryFn : async ( ) => await oneTicket ( ticketId ) ,
199
+ retry : false ,
200
+ cacheTime : 0 ,
201
+ } ) ;
181
202
182
203
const mutation = useMutation (
183
204
async ( redeemId : string ) => {
@@ -248,6 +269,27 @@ const Watchman: NextPage = (props) => {
248
269
userUsername = { publicTicketData . username }
249
270
userName = { publicTicketData . name }
250
271
/>
272
+ { publicTicketData . ticketType !== "meetup" &&
273
+ publicTicketData . ticketType !== "workshop" ? (
274
+ < >
275
+ < H2 > Preferences</ H2 >
276
+ < FlexWrap >
277
+ < FlexItem >
278
+ Pronombre: < BC > { preferences ?. preferences ?. pronouns } </ BC >
279
+ </ FlexItem >
280
+ < FlexItem >
281
+ Alergias: < BC > { preferences ?. preferences ?. foodAllergy } </ BC >
282
+ </ FlexItem >
283
+ < FlexItem >
284
+ Comida: < BC > { preferences ?. preferences ?. foodPreference } </ BC >
285
+ </ FlexItem >
286
+ < FlexItem >
287
+ Polera: < BC > { preferences ?. preferences ?. shirtSize } </ BC >
288
+ </ FlexItem >
289
+ </ FlexWrap >
290
+ </ >
291
+ ) : null }
292
+
251
293
< H2 > Redemptions</ H2 >
252
294
{ ticketInfo ?. redemptions ?. map ( ( r : RedemptionSummary ) => (
253
295
< RedemptionRow key = { r . id } >
0 commit comments