Add 'Other Items' section below Items Claimed in EventView and EventAdmin

This commit is contained in:
Ryderjj89
2025-05-04 17:13:36 -04:00
parent 4d6bccb178
commit c87ad79a79
2 changed files with 35 additions and 0 deletions

View File

@@ -761,6 +761,24 @@ const EventAdmin: React.FC = () => {
)} )}
</Box> </Box>
</Box> </Box>
{/* Other Items Section */}
<Box>
<Typography variant="subtitle1" gutterBottom>
Other Items:
</Typography>
<Typography variant="body2" color="text.secondary">
{(() => {
const allOtherItems = rsvps
.map(r => r.other_items)
.filter(Boolean)
.flat()
.filter((item: string) => item && item.trim() !== '');
return allOtherItems.length > 0
? allOtherItems.join(', ')
: 'No other items have been brought';
})()}
</Typography>
</Box>
</Box> </Box>
</Box> </Box>

View File

@@ -239,6 +239,23 @@ const EventView: React.FC = () => {
)} )}
</Box> </Box>
</Box> </Box>
<Box>
<Typography variant="subtitle1" gutterBottom>
Other Items:
</Typography>
<Typography variant="body2" color="text.secondary">
{(() => {
const allOtherItems = rsvps
.map(r => r.other_items)
.filter(Boolean)
.flat()
.filter((item: string) => item && item.trim() !== '');
return allOtherItems.length > 0
? allOtherItems.join(', ')
: 'No other items have been brought';
})()}
</Typography>
</Box>
</Box> </Box>
</Box> </Box>