Check in check out button bug fix
Added condition for remarks
This commit is contained in:
parent
70298168cb
commit
fe677f72a2
@ -639,8 +639,8 @@ public class CheckInActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
params.put("employeeid", Employeeid);
|
params.put("employeeid", Employeeid);
|
||||||
params.put("location", LocName);
|
params.put("location", LocName);
|
||||||
params.put("latitude", currentLat);
|
params.put("latitude", Latitude);
|
||||||
params.put("longitude", currentlong);
|
params.put("longitude", Longitude);
|
||||||
params.put("checkintime", currentDateAndTime);
|
params.put("checkintime", currentDateAndTime);
|
||||||
params.put("locStateDevice", "1");
|
params.put("locStateDevice", "1");
|
||||||
params.put("locStateApp", "1");
|
params.put("locStateApp", "1");
|
||||||
|
@ -115,6 +115,9 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
edtRemarks = findViewById(R.id.edtRemarks);
|
||||||
|
remarks = edtRemarks.getText().toString();
|
||||||
|
|
||||||
btn_private = findViewById(R.id.btn_private);
|
btn_private = findViewById(R.id.btn_private);
|
||||||
btn_private.setOnClickListener(new View.OnClickListener() {
|
btn_private.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -128,10 +131,20 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
|||||||
btnSubmit.setOnClickListener(new View.OnClickListener() {
|
btnSubmit.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
getPermission();
|
|
||||||
|
|
||||||
|
if(edtRemarks.getText().toString().isEmpty())
|
||||||
|
{
|
||||||
|
Toast.makeText(PermissionRequestActivity.this, "Please enter remarks", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
getPermission();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
edtRemarks = findViewById(R.id.edtRemarks);
|
|
||||||
|
|
||||||
timePickerFrom = findViewById(R.id.timePickerFrom);
|
timePickerFrom = findViewById(R.id.timePickerFrom);
|
||||||
textTimeFrom = findViewById(R.id.textTimeFrom);
|
textTimeFrom = findViewById(R.id.textTimeFrom);
|
||||||
@ -207,7 +220,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public void getPermission(){
|
public void getPermission(){
|
||||||
final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
|
final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
|
||||||
remarks = edtRemarks.getText().toString();
|
|
||||||
String url= "http://43.242.212.92:7001/api/lgt/PermissionInsert";
|
String url= "http://43.242.212.92:7001/api/lgt/PermissionInsert";
|
||||||
StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
|
StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
@ -249,7 +262,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
|||||||
params.put("pdate", currentDateandTime);
|
params.put("pdate", currentDateandTime);
|
||||||
params.put("fromtime", textTimeFrom.getText().toString());
|
params.put("fromtime", textTimeFrom.getText().toString());
|
||||||
params.put("totime", textTimeTo.getText().toString());
|
params.put("totime", textTimeTo.getText().toString());
|
||||||
params.put("reason", remarks);
|
params.put("reason", edtRemarks.getText().toString());
|
||||||
params.put("attachment", "");
|
params.put("attachment", "");
|
||||||
params.put("userid", "a");
|
params.put("userid", "a");
|
||||||
if(permission_code.equals("O")){
|
if(permission_code.equals("O")){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user