Skip to content

Commit

Permalink
fixed some small things. App should be "complete"
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond123 committed Dec 6, 2022
1 parent 2a144f8 commit 9021458
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
if ("cook".equals(Objects.requireNonNull(child.getValue(CookUser.class)).getUserType())) {
for (DataSnapshot grandChild : child.child("orders").getChildren()) {
Order order = grandChild.getValue(Order.class);
if (order != null && currentUser.getUid().equals(order.getOrderFrom())) {
if (order != null
&& !order.getOrderStatus().equals("deleted")
&& !order.getOrderStatus().equals("completed")
&& currentUser.getUid().equals(order.getOrderFrom())) {
orderList.add(order);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c

if(order.getOrderStatus().equals("accepted")){
reject.setVisibility(View.GONE);
accept.setText("Order Completed");
accept.setText("Complete Order");
accept.setOnClickListener(onCLick -> removeItem(true)); //do nothing atm
}else if(order.getOrderStatus().equals("rejected")){
reject.setVisibility(View.GONE);
Expand All @@ -146,7 +146,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
String fName = user.getFirstName();
String lName = user.getLastName();

if(user.getUserType().equals("cook")) {
if(!user.getUserType().equals("cook")) {
title.setText("Order From: \n" +
fName.substring(0, 1).toUpperCase(Locale.ROOT) + fName.substring(1) + " " +
lName.substring(0, 1).toUpperCase(Locale.ROOT) + lName.substring(1));
Expand Down

0 comments on commit 9021458

Please sign in to comment.