mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 10:56:24 +00:00
Fix bugs, cards now link to order
This commit is contained in:
parent
78886c8c9c
commit
4d9a5023e0
@ -97,7 +97,8 @@ class OrderView(APIView):
|
||||
return Response(data, status=status.HTTP_200_OK)
|
||||
else:
|
||||
# Non participants should not see the status or who is the taker
|
||||
data.pop('status','status_message','taker','taker_nick')
|
||||
for key in ('status','status_message','taker','taker_nick'):
|
||||
del data[key]
|
||||
return Response(data, status=status.HTTP_200_OK)
|
||||
|
||||
return Response({'Order Not Found':'Invalid Order Id'},status=status.HTTP_404_NOT_FOUND)
|
||||
|
@ -23,8 +23,8 @@ export default class BookPage extends Component {
|
||||
}
|
||||
|
||||
handleCardClick=(e)=>{
|
||||
console.log(e.target)
|
||||
this.props.history.push('/order/' + e.target);
|
||||
console.log(e)
|
||||
this.props.history.push('/order/' + e);
|
||||
}
|
||||
|
||||
// Make these two functions sequential. getOrderDetails needs setState to be finish beforehand.
|
||||
@ -107,7 +107,7 @@ export default class BookPage extends Component {
|
||||
<Card elevation={6} sx={{ width: 945 }}>
|
||||
|
||||
{/* To fix! does not pass order.id to handleCardCLick. Instead passes the clicked </>*/}
|
||||
<CardActionArea value={order.id} onClick={this.handleCardClick}>
|
||||
<CardActionArea value={order.id} onClick={() => this.handleCardClick(order.id)}>
|
||||
<CardContent>
|
||||
|
||||
<List dense="true">
|
||||
|
@ -103,7 +103,7 @@ export default class OrderPage extends Component {
|
||||
{this.state.isParticipant ? "" : <Button variant='contained' color='primary' to='/home' component={Link}>Take Order</Button>}
|
||||
</Grid>
|
||||
<Grid item xs={12} align="center">
|
||||
{this.state.isParticipant ? "" : <Button variant='contained' color='secondary' onClick={this.handleClickBackButton}>Back</Button>}
|
||||
<Button variant='contained' color='secondary' onClick={this.handleClickBackButton}>Back</Button>
|
||||
</Grid>
|
||||
</Paper>
|
||||
</Grid>
|
||||
|
Loading…
Reference in New Issue
Block a user