Skip to content

Commit

Permalink
fox errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanrezaee committed Apr 29, 2021
1 parent fa11424 commit b2ee197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/report/Services/ReportServices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Future getSendReportEmil(
String url = "$baseUrl/restaurant/report/email-report-orders";
print("url $url");
Map data = {};
if (coupenCode != null) {
if (coupenCode != null && coupenCode != "") {
data['Coupon Code'] = coupenCode;
}
if (resturant != null) {
Expand All @@ -62,7 +62,7 @@ Future getSendReportEmil(
}

if (totalUser != null) {
data['Total Coupon Used'] = totalUser;
data['Total Order Userd Coupon'] = totalUser;
}

log("data $data");
Expand Down
4 changes: 4 additions & 0 deletions lib/modules/report/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class _ReportPageState extends State<ReportPage> {
listRest.addAll(snapshot.listResturant.map((e) {
return {"display": "${e.resturantName}", "value": "${e.id}"};
}).toList());
setState(() {
orderResturantId = listRest[0]['value'];
earingResturantId = listRest[0]['value'];
});
});
super.initState();
}
Expand Down

0 comments on commit b2ee197

Please sign in to comment.