diff --git a/api/views.py b/api/views.py index bf0b8d9d..33a669b8 100644 --- a/api/views.py +++ b/api/views.py @@ -84,6 +84,9 @@ class OrderView(viewsets.ViewSet): ''' order_id = request.GET.get(self.lookup_url_kwarg) + if not request.user.is_authenticated: + return Response({'bad_request':'You must have a robot avatar to see the order details'}, status=status.HTTP_400_BAD_REQUEST) + if order_id == None: return Response({'bad_request':'Order ID parameter not found in request'}, status=status.HTTP_400_BAD_REQUEST) @@ -425,8 +428,6 @@ class UserView(APIView): user.delete() return Response({'user_deleted':'User deleted permanently'}, status.HTTP_301_MOVED_PERMANENTLY) - - class BookView(ListAPIView): serializer_class = ListOrderSerializer queryset = Order.objects.filter(status=Order.Status.PUB) diff --git a/frontend/src/components/BottomBar.js b/frontend/src/components/BottomBar.js index 670f5cd3..e33aacd2 100644 --- a/frontend/src/components/BottomBar.js +++ b/frontend/src/components/BottomBar.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' -import {Paper, Grid, IconButton, Typography, Select, MenuItem, List, ListItemText, ListItem, ListItemIcon, ListItemButton, Divider, Dialog, DialogContent} from "@mui/material"; +import {Badge, Paper, Grid, IconButton, Typography, Select, MenuItem, List, ListItemText, ListItem, ListItemIcon, ListItemButton, Divider, Dialog, DialogContent} from "@mui/material"; +import MediaQuery from 'react-responsive' // Icons import SettingsIcon from '@mui/icons-material/Settings'; @@ -26,6 +27,7 @@ export default class BottomBar extends Component { this.state = { openStatsForNerds: false, openCommuniy: false, + openExchangeSummary:false, num_public_buy_orders: 0, num_public_sell_orders: 0, active_robots_today: 0, @@ -58,6 +60,7 @@ export default class BottomBar extends Component { }; StatsDialog =() =>{ + return( { + return( +bottomBarDesktop =()=>{ + return( + @@ -226,7 +230,7 @@ export default class BottomBar extends Component { primaryTypographyProps={{fontSize: '14px'}} secondaryTypographyProps={{fontSize: '12px'}} primary={this.state.today_avg_nonkyc_btc_premium+"%"} - secondary="Today Non-KYC Avg Premium" /> + secondary="Today Avg Premium" /> @@ -244,8 +248,7 @@ export default class BottomBar extends Component { - - + + + ) +} + + handleClickOpenExchangeSummary = () => { + this.setState({openExchangeSummary: true}); + }; + handleClickCloseExchangeSummary = () => { + this.setState({openExchangeSummary: false}); + }; + + phoneExchangeSummaryDialog =() =>{ + return( + + + Exchange Summary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) + } + + +bottomBarPhone =()=>{ + return( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + + render() { + return ( +
+ + + + + + + +
) } }