|
@ -90,7 +90,7 @@ public class CheckInActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
boolean _approverstatus; |
|
|
boolean _approverstatus; |
|
|
|
|
|
|
|
|
String Employeeid,LocName,Latitude,Longitude,Limit; |
|
|
|
|
|
|
|
|
String Employeeid,LocName,Latitude,Longitude,Limit,UserName; |
|
|
|
|
|
|
|
|
String currentLat,currentlong; |
|
|
String currentLat,currentlong; |
|
|
|
|
|
|
|
@ -105,6 +105,9 @@ public class CheckInActivity extends AppCompatActivity { |
|
|
setContentView(R.layout.activity_checkin); |
|
|
setContentView(R.layout.activity_checkin); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE); |
|
|
|
|
|
Employeeid = shared.getString("Employeeid", ""); |
|
|
|
|
|
UserName = shared.getString("RegisterUser", ""); |
|
|
|
|
|
|
|
|
checkSuccess = findViewById(R.id.checkSuccess); |
|
|
checkSuccess = findViewById(R.id.checkSuccess); |
|
|
txtSuccess = findViewById(R.id.txtSuccess); |
|
|
txtSuccess = findViewById(R.id.txtSuccess); |
|
@ -137,8 +140,7 @@ public class CheckInActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
System.out.println("Current date and time " + currentDateAndTime); |
|
|
System.out.println("Current date and time " + currentDateAndTime); |
|
|
|
|
|
|
|
|
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE); |
|
|
|
|
|
Employeeid = shared.getString("Employeeid", ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -197,12 +199,16 @@ public class CheckInActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rel3 = view.findViewById(R.id.rel3); |
|
|
rel3 = view.findViewById(R.id.rel3); |
|
|
if(!_approverstatus){ |
|
|
|
|
|
|
|
|
if(_approverstatus){ |
|
|
|
|
|
rel3.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
rel3.setVisibility(View.GONE); |
|
|
rel3.setVisibility(View.GONE); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
popup_log_out.setOnClickListener(new View.OnClickListener() { |
|
|
popup_log_out.setOnClickListener(new View.OnClickListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void onClick(View view) { |
|
|
public void onClick(View view) { |
|
@ -231,7 +237,7 @@ public class CheckInActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TextView username = view.findViewById(R.id.username); |
|
|
TextView username = view.findViewById(R.id.username); |
|
|
username.setText(Employeeid); |
|
|
|
|
|
|
|
|
username.setText(UserName); |
|
|
|
|
|
|
|
|
TextView request = view.findViewById(R.id.request); |
|
|
TextView request = view.findViewById(R.id.request); |
|
|
|
|
|
|
|
@ -470,9 +476,9 @@ public class CheckInActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
public void leaveApprover(){ |
|
|
public void leaveApprover(){ |
|
|
|
|
|
System.out.println("Action Employeeid : " + Employeeid); |
|
|
final ProgressDialog loading = ProgressDialog.show(CheckInActivity.this, "Authenticating", "Please wait while logging", false, false); |
|
|
final ProgressDialog loading = ProgressDialog.show(CheckInActivity.this, "Authenticating", "Please wait while logging", false, false); |
|
|
String url= "http://43.242.212.92:7001/api/lgt/IsELeaveApprover?employeeid=27256"; |
|
|
|
|
|
//String url= "http://43.242.212.92:7001/api/lgt/IsELeaveApprover?employeeid=29034"; |
|
|
|
|
|
|
|
|
String url= "http://43.242.212.92:7001/api/lgt/IsELeaveApprover?employeeid="+Employeeid; |
|
|
StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() { |
|
|
StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() { |
|
|
@Override |
|
|
@Override |
|
|
public void onResponse(String response) { |
|
|
public void onResponse(String response) { |
|
|