Skip to content

Commit

Permalink
Absence Activity
Browse files Browse the repository at this point in the history
#5
- model attendance.java enhanced by item aprv = approved absence
  • Loading branch information
eurosecom committed Jan 29, 2017
1 parent e7070aa commit 3a036ce
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion app/src/main/java/com/eusecom/attendance/models/Attendance.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Attendance {
public String lati;
public String datm;
private HashMap<String, Object> dats;
public String aprv;

public Attendance() {
// Default constructor required for calls to DataSnapshot.getValue(User.class)
Expand All @@ -32,7 +33,7 @@ public Attendance() {


public Attendance(String usico, String usid, String ume, String dmxa, String dmna, String daod, String dado, String dnixa,
String hodxb, String longi, String lati, String datm) {
String hodxb, String longi, String lati, String datm, String aprv) {
this.usico = usico;
this.usid = usid;
this.ume = ume;
Expand All @@ -49,8 +50,29 @@ public Attendance(String usico, String usid, String ume, String dmxa, String dmn
HashMap<String, Object> datsObj = new HashMap<String, Object>();
datsObj.put("date", ServerValue.TIMESTAMP);
this.dats = datsObj;
this.aprv = aprv;
}

public Attendance(String usico, String usid, String ume, String dmxa, String dmna, String daod, String dado, String dnixa,
String hodxb, String longi, String lati, String datm ) {
this.usico = usico;
this.usid = usid;
this.ume = ume;
this.dmxa = dmxa;
this.dmna = dmna;
this.daod = daod;
this.dado = dado;
this.dnixa = dnixa;
this.hodxb = hodxb;
this.longi = longi;
this.lati = lati;
this.datm = datm;

HashMap<String, Object> datsObj = new HashMap<String, Object>();
datsObj.put("date", ServerValue.TIMESTAMP);
this.dats = datsObj;
this.aprv = "0";
}

public String getUsico() {

Expand All @@ -75,6 +97,8 @@ public Map<String, Object> toMap() {
result.put("lati", lati);
result.put("datm", datm);
result.put("dats", dats);
result.put("dats", dats);
result.put("appr", aprv);

return result;
}
Expand Down

0 comments on commit 3a036ce

Please sign in to comment.