Permission approval visibility set
This commit is contained in:
parent
00041958d6
commit
03f9e21350
@ -90,7 +90,7 @@ public class CheckInActivity extends AppCompatActivity {
|
||||
|
||||
boolean _approverstatus;
|
||||
|
||||
String Employeeid,LocName,Latitude,Longitude,Limit;
|
||||
String Employeeid,LocName,Latitude,Longitude,Limit,UserName;
|
||||
|
||||
String currentLat,currentlong;
|
||||
|
||||
@ -105,6 +105,9 @@ public class CheckInActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_checkin);
|
||||
|
||||
|
||||
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE);
|
||||
Employeeid = shared.getString("Employeeid", "");
|
||||
UserName = shared.getString("RegisterUser", "");
|
||||
|
||||
checkSuccess = findViewById(R.id.checkSuccess);
|
||||
txtSuccess = findViewById(R.id.txtSuccess);
|
||||
@ -137,8 +140,7 @@ public class CheckInActivity extends AppCompatActivity {
|
||||
|
||||
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);
|
||||
if(!_approverstatus){
|
||||
if(_approverstatus){
|
||||
rel3.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
rel3.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
popup_log_out.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -231,7 +237,7 @@ public class CheckInActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
TextView username = view.findViewById(R.id.username);
|
||||
username.setText(Employeeid);
|
||||
username.setText(UserName);
|
||||
|
||||
TextView request = view.findViewById(R.id.request);
|
||||
|
||||
@ -470,9 +476,9 @@ public class CheckInActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
public void leaveApprover(){
|
||||
System.out.println("Action Employeeid : " + Employeeid);
|
||||
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>() {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user