Skip to content

Commit

Permalink
fixed leaves issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-cameron committed Mar 8, 2019
1 parent 79ed832 commit ecac439
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
public void onBindViewHolder(MyViewHolder holder, int position) {
UserProfile userProfileList = mUserProfileList.get(position);
holder.name.setText(userProfileList.getFirstName() + " " + userProfileList.getLastName());
holder.numberOfLeaves.setText(userProfileList.getCurrentNumberOfLeaves().toString());
holder.numberOfLeaves.setText(userProfileList.getTotalNumberOfLeaves().toString());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
String userProfileLastName = (String) dataSnapshot.child("lastName").getValue();
String userProfileEmail = (String) dataSnapshot.child("email").getValue();
String userProfileOrganisation = (String) dataSnapshot.child("organisation").getValue();
Long userProfileLeaves = (Long) dataSnapshot.child("numberOfLeaves").getValue();
Long userProfileLeaves = (Long) dataSnapshot.child("totalNumberOfLeaves").getValue();
numberOfUserLeaves.setText(userProfileLeaves.toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
fridayPresentLight.setBackground(getResources().getDrawable(R.drawable.icon_light_green, null));
}
else fridayPresentLight.setBackground(getResources().getDrawable(R.drawable.icon_light_red, null));


}

@Override
Expand Down

0 comments on commit ecac439

Please sign in to comment.