DESIGN implement api's
This commit is contained in:
parent
44368bc1c8
commit
682e5f503c
@ -2,13 +2,20 @@ package ru.visionlab.femdemo;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleAdapter;
|
||||
@ -24,8 +31,13 @@ import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.pedant.SweetAlert.SweetAlertDialog;
|
||||
import ru.visionlab.femdemo.models.ApprovalModel;
|
||||
|
||||
public class ApprovalListActivity extends AppCompatActivity {
|
||||
|
||||
@ -35,9 +47,12 @@ public class ApprovalListActivity extends AppCompatActivity {
|
||||
String RequestID,EmployeeID,EmployeeName,LDate,LTimeOut,LTimeIn,NoOfHrs,LeaveType,ApproverID,ApproverName,Reason;
|
||||
|
||||
ListView lv;
|
||||
ArrayList<HashMap<String,String>> arrayList;
|
||||
boolean isreject;
|
||||
ArrayList<ApprovalModel> arrayList=new ArrayList<ApprovalModel>();
|
||||
|
||||
String Employeeid;
|
||||
String Employeeid,RegisterUser;
|
||||
EditText ed_remarks;
|
||||
private String permissionid;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -47,6 +62,8 @@ public class ApprovalListActivity extends AppCompatActivity {
|
||||
|
||||
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE);
|
||||
Employeeid = shared.getString("Employeeid", "");
|
||||
RegisterUser = shared.getString("RegisterUser", "");
|
||||
|
||||
|
||||
back = findViewById(R.id.back);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@ -57,7 +74,7 @@ public class ApprovalListActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
arrayList=new ArrayList<>();
|
||||
arrayList=new ArrayList<ApprovalModel>();
|
||||
lv = findViewById(R.id.listview);
|
||||
|
||||
|
||||
@ -90,38 +107,59 @@ public class ApprovalListActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
|
||||
arrayList.clear();
|
||||
|
||||
JSONArray jsonArray=new JSONArray(response);
|
||||
for(int i = 0;i<jsonArray.length();i++){
|
||||
for(int i = 0;i<jsonArray.length();i++) {
|
||||
|
||||
JSONObject jb1=jsonArray.getJSONObject(0);
|
||||
RequestID = jb1.getString("RequestID");
|
||||
EmployeeID = jb1.getString("EmployeeID");
|
||||
EmployeeName = jb1.getString("EmployeeName");
|
||||
LDate = jb1.getString("LDate");
|
||||
LTimeOut = jb1.getString("LTimeOut");
|
||||
LTimeIn = jb1.getString("LTimeIn");
|
||||
NoOfHrs = jb1.getString("NoOfHrs");
|
||||
LeaveType = jb1.getString("LeaveType");
|
||||
ApproverID = jb1.getString("ApproverID");
|
||||
ApproverName = jb1.getString("ApproverName");
|
||||
Reason = jb1.getString("Reason");
|
||||
JSONObject jb1 = jsonArray.getJSONObject(i);
|
||||
RequestID = jb1.getString("RequestID");
|
||||
EmployeeID = jb1.getString("EmployeeID");
|
||||
EmployeeName = jb1.getString("EmployeeName");
|
||||
LDate = jb1.getString("LDate");
|
||||
LTimeOut = jb1.getString("LTimeOut");
|
||||
LTimeIn = jb1.getString("LTimeIn");
|
||||
NoOfHrs = jb1.getString("NoOfHrs");
|
||||
LeaveType = jb1.getString("LeaveType");
|
||||
ApproverID = jb1.getString("ApproverID");
|
||||
ApproverName = jb1.getString("ApproverName");
|
||||
Reason = jb1.getString("Reason");
|
||||
|
||||
HashMap<String,String> data = new HashMap<>();
|
||||
data.put("EmployeeName",EmployeeName);
|
||||
data.put("EmployeeID",EmployeeID);
|
||||
data.put("LeaveType",LeaveType);
|
||||
data.put("ApproverName",ApproverName);
|
||||
// HashMap<String,String> data = new HashMap<>();
|
||||
// data.put("EmployeeName",EmployeeName);
|
||||
// data.put("EmployeeID",EmployeeID);
|
||||
// data.put("LeaveType",LeaveType);
|
||||
// data.put("ApproverName",ApproverName);
|
||||
ApprovalModel approvalModel = new ApprovalModel();
|
||||
approvalModel.setApproverID(jb1.getString("ApproverID"));
|
||||
approvalModel.setRequestID(jb1.getString("RequestID"));
|
||||
approvalModel.setEmployeeID(jb1.getString("EmployeeID"));
|
||||
approvalModel.setEmployeeName(jb1.getString("EmployeeName"));
|
||||
approvalModel.setLDate(jb1.getString("LDate"));
|
||||
approvalModel.setLTimeOut(jb1.getString("LTimeOut"));
|
||||
approvalModel.setLTimeIn(jb1.getString("LTimeIn"));
|
||||
approvalModel.setNoOfHrs(jb1.getString("NoOfHrs"));
|
||||
approvalModel.setLeaveType(jb1.getString("LeaveType"));
|
||||
approvalModel.setApproverName(jb1.getString("ApproverName"));
|
||||
approvalModel.setReason(jb1.getString("Reason"));
|
||||
|
||||
arrayList.add(data);
|
||||
arrayList.add(approvalModel);
|
||||
}
|
||||
|
||||
ListAdapter adapter = new SimpleAdapter(ApprovalListActivity.this,arrayList,R.layout.listview_layout
|
||||
,new String[]{"EmployeeName","EmployeeID","LeaveType","ApproverName"},new int[]{R.id.EmployeeNameVal,R.id.EmployeeIDVal,R.id.LeaveTypeVal,R.id.ApproverNameVal});
|
||||
lv.setAdapter(adapter);
|
||||
// ListAdapter adapter = new SimpleAdapter(ApprovalListActivity.this,arrayList,R.layout.listview_layout
|
||||
// ,new String[]{"EmployeeName","EmployeeID","LeaveType","ApproverName"},new int[]{R.id.EmployeeNameVal,R.id.EmployeeIDVal,R.id.LeaveTypeVal,R.id.ApproverNameVal});
|
||||
// lv.setAdapter(adapter);
|
||||
|
||||
// ArrayAdapter<ApprovalModel> adapter = new ArrayAdapter<ApprovalModel>(getApplicationContext(),R.layout.listview_layout,arrayList);
|
||||
lv.setAdapter(new Nr());
|
||||
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
ApprovalModel approvalModel=arrayList.get(i);
|
||||
Intent intent = new Intent(ApprovalListActivity.this,LeaveRequestDetailsActivity.class);
|
||||
Bundle bundle=new Bundle();
|
||||
bundle.putSerializable("Approvaldata", (Serializable) approvalModel);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
@ -137,7 +175,7 @@ public class ApprovalListActivity extends AppCompatActivity {
|
||||
ApproverIDVal.setText(ApproverID);
|
||||
ApproverNameVal.setText(ApproverName);
|
||||
ReasonVal.setText(Reason);
|
||||
*/ }
|
||||
*/
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -161,4 +199,172 @@ public class ApprovalListActivity extends AppCompatActivity {
|
||||
};
|
||||
Volley.newRequestQueue(ApprovalListActivity.this).add(stringRequest);
|
||||
}
|
||||
}
|
||||
|
||||
private class Nr extends BaseAdapter {
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return arrayList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
LayoutInflater inflater = getLayoutInflater();
|
||||
View v = inflater.inflate(R.layout.listview_layout, null);
|
||||
|
||||
TextView EmployeeNameVal=v.findViewById(R.id.EmployeeNameVal);
|
||||
TextView EmployeeIDVal=v.findViewById(R.id.EmployeeIDVal);
|
||||
TextView LeaveTypeVal=v.findViewById(R.id.LeaveTypeVal);
|
||||
TextView ApproverNameVal=v.findViewById(R.id.ApproverNameVal);
|
||||
LinearLayout ll_approve=v.findViewById(R.id.ll_approve);
|
||||
|
||||
EmployeeNameVal.setText(arrayList.get(position).getEmployeeName());
|
||||
EmployeeIDVal.setText(arrayList.get(position).getEmployeeID());
|
||||
LeaveTypeVal.setText(arrayList.get(position).getLeaveType());
|
||||
ApproverNameVal.setText(arrayList.get(position).getApproverName());
|
||||
|
||||
permissionid=arrayList.get(position).getRequestID();
|
||||
|
||||
|
||||
|
||||
// ll_approve.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// isreject=false;
|
||||
// AlertDialog.Builder builder = new AlertDialog.Builder(ApprovalListActivity.this);
|
||||
// builder.setTitle("Remarks");
|
||||
// builder.setCancelable(false);
|
||||
//
|
||||
// // set the custom layout
|
||||
// final View customLayout = getLayoutInflater().inflate(R.layout.dialog_approve, null);
|
||||
// builder.setView(customLayout);
|
||||
//
|
||||
// // add a button
|
||||
// builder.setPositiveButton("Save", (dialog, which) -> {
|
||||
// // send data from the AlertDialog to the Activity
|
||||
// ed_remarks = customLayout.findViewById(R.id.ed_remarks);
|
||||
//
|
||||
// if(ed_remarks.getText().toString().isEmpty())
|
||||
// {
|
||||
// Toast.makeText(ApprovalListActivity.this, "Please enter remars", Toast.LENGTH_SHORT).show();
|
||||
// builder.show();
|
||||
// return;
|
||||
//
|
||||
// }
|
||||
// else {
|
||||
// PermissionApprovalAction();
|
||||
// }
|
||||
//
|
||||
// });
|
||||
// // create and show the alert dialog
|
||||
// AlertDialog dialog = builder.create();
|
||||
// dialog.show();
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public void PermissionApprovalAction(){
|
||||
|
||||
|
||||
final ProgressDialog loading = ProgressDialog.show(ApprovalListActivity.this, "Fetching information", "Please wait ", false, false);
|
||||
|
||||
String url= "http://43.242.212.92:7001/api/lgt/PermissionApprovalAction";
|
||||
StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
|
||||
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(response);
|
||||
String _statusMessage = jsonObject.getString("_statusMessage");
|
||||
String _statusCode=jsonObject.getString("_statusCode");
|
||||
|
||||
|
||||
if(_statusCode.equals("200"))
|
||||
{
|
||||
String message;
|
||||
if(isreject)
|
||||
{
|
||||
message="Leave Rejected";
|
||||
}
|
||||
else {
|
||||
message="Leave Approved";
|
||||
}
|
||||
|
||||
new SweetAlertDialog(ApprovalListActivity.this, SweetAlertDialog.SUCCESS_TYPE)
|
||||
.setTitleText(message)
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
sDialog.dismissWithAnimation();
|
||||
PermissionApprovalList();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(ApprovalListActivity.this, _statusMessage, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
loading.dismiss();
|
||||
}
|
||||
|
||||
}, new com.android.volley.Response.ErrorListener() {
|
||||
@Override
|
||||
public void onErrorResponse(VolleyError error) {
|
||||
// Log.d("error-=>",error.getMessage());
|
||||
Toast.makeText(ApprovalListActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
loading.dismiss();
|
||||
System.out.println("Error message: "+ error.getMessage());
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
|
||||
params.put("permissionID",permissionid);
|
||||
params.put("approverID", Employeeid);
|
||||
params.put("actionby", RegisterUser);
|
||||
params.put("remark", ed_remarks.getText().toString());
|
||||
if(isreject)
|
||||
{
|
||||
params.put("actionflag", "R");
|
||||
}
|
||||
else
|
||||
{
|
||||
params.put("actionflag", "A");
|
||||
}
|
||||
|
||||
System.out.println("params in Approve "+params);
|
||||
return params;
|
||||
}
|
||||
};
|
||||
Volley.newRequestQueue(ApprovalListActivity.this).add(stringRequest);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -365,7 +365,7 @@ public class CheckInActivity extends AppCompatActivity {
|
||||
|
||||
new SweetAlertDialog(CheckInActivity.this, SweetAlertDialog.SUCCESS_TYPE)
|
||||
.setTitleText(valueFromApiCheckIn)
|
||||
.setConfirmText("OK")
|
||||
.setConfirmText("Successfully Login")
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
|
@ -2,13 +2,18 @@ package ru.visionlab.femdemo;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.volley.Request;
|
||||
@ -23,21 +28,44 @@ import org.json.JSONObject;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.pedant.SweetAlert.SweetAlertDialog;
|
||||
import ru.visionlab.femdemo.R;
|
||||
import ru.visionlab.femdemo.models.ApprovalModel;
|
||||
|
||||
public class LeaveRequestDetailsActivity extends AppCompatActivity {
|
||||
|
||||
Button btnapprove,btnreject;
|
||||
Button btnapprove,btnreject,btn_leav_type;
|
||||
|
||||
ImageButton back;
|
||||
|
||||
|
||||
TextView emp_name,leavtype,leavdate,hours,txt_time_in,txt_time_out,txt_approver_name,txt_reason;
|
||||
ApprovalModel approvalModel;
|
||||
String empname,LeaveType,LDate,NoOfHrs,LTimeIn,LTimeOut,ApproverName,Reason;
|
||||
String[] separated;
|
||||
private String Employeeid;
|
||||
private String RegisterUser,permissionID;
|
||||
EditText ed_remarks;
|
||||
boolean isreject;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_leave_request_details);
|
||||
|
||||
back = findViewById(R.id.back);
|
||||
emp_name = findViewById(R.id.emp_name);
|
||||
leavtype = findViewById(R.id.leavtype);
|
||||
leavdate = findViewById(R.id.leavdate);
|
||||
btn_leav_type = findViewById(R.id.btn_leav_type);
|
||||
hours = findViewById(R.id.hours);
|
||||
txt_time_in = findViewById(R.id.txt_time_in);
|
||||
txt_time_out = findViewById(R.id.txt_time_out);
|
||||
txt_approver_name = findViewById(R.id.txt_approver_name);
|
||||
txt_reason = findViewById(R.id.txt_reason);
|
||||
btnapprove = findViewById(R.id.btnapprove);
|
||||
btnreject = findViewById(R.id.btnreject);
|
||||
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -45,19 +73,110 @@ public class LeaveRequestDetailsActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
btnapprove = findViewById(R.id.btnapprove);
|
||||
|
||||
approvalModel=(ApprovalModel) getIntent().getSerializableExtra("Approvaldata");
|
||||
|
||||
|
||||
// fill employee details
|
||||
|
||||
empname=(approvalModel.getEmployeeName());
|
||||
LeaveType=(approvalModel.getLeaveType());
|
||||
LDate=(approvalModel.getLDate());
|
||||
NoOfHrs=(approvalModel.getNoOfHrs());
|
||||
LTimeIn=(approvalModel.getLTimeIn());
|
||||
LTimeOut=(approvalModel.getLTimeOut());
|
||||
ApproverName=(approvalModel.getApproverName());
|
||||
Reason=(approvalModel.getReason());
|
||||
permissionID=(approvalModel.getRequestID());
|
||||
separated=LDate.split(" ");
|
||||
Log.d("empname",empname);
|
||||
|
||||
emp_name.setText(empname);
|
||||
leavtype.setText(LeaveType);
|
||||
leavdate.setText(separated[0]);
|
||||
btn_leav_type.setText(LeaveType);
|
||||
hours.setText(NoOfHrs);
|
||||
txt_time_in.setText(LTimeIn);
|
||||
txt_time_out.setText(LTimeOut);
|
||||
txt_approver_name.setText(ApproverName);
|
||||
txt_reason.setText(Reason);
|
||||
|
||||
|
||||
|
||||
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE);
|
||||
|
||||
Employeeid = shared.getString("Employeeid", "");
|
||||
RegisterUser = shared.getString("RegisterUser", "");
|
||||
|
||||
|
||||
btnapprove.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
PermissionApprovalAction();
|
||||
|
||||
isreject=false;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(LeaveRequestDetailsActivity.this);
|
||||
builder.setTitle("Remarks");
|
||||
builder.setCancelable(false);
|
||||
|
||||
// set the custom layout
|
||||
final View customLayout = getLayoutInflater().inflate(R.layout.dialog_approve, null);
|
||||
builder.setView(customLayout);
|
||||
|
||||
// add a button
|
||||
builder.setPositiveButton("Save", (dialog, which) -> {
|
||||
// send data from the AlertDialog to the Activity
|
||||
ed_remarks = customLayout.findViewById(R.id.ed_remarks);
|
||||
|
||||
if(ed_remarks.getText().toString().isEmpty())
|
||||
{
|
||||
Toast.makeText(LeaveRequestDetailsActivity.this, "Please enter remars", Toast.LENGTH_SHORT).show();
|
||||
builder.show();
|
||||
return;
|
||||
|
||||
}
|
||||
else {
|
||||
PermissionApprovalAction();
|
||||
}
|
||||
|
||||
});
|
||||
// create and show the alert dialog
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
btnreject = findViewById(R.id.btnreject);
|
||||
|
||||
btnreject.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
PermissionApprovalAction();
|
||||
isreject=true;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(LeaveRequestDetailsActivity.this);
|
||||
builder.setTitle("Remarks");
|
||||
builder.setCancelable(false);
|
||||
// set the custom layout
|
||||
final View customLayout = getLayoutInflater().inflate(R.layout.dialog_approve, null);
|
||||
builder.setView(customLayout);
|
||||
|
||||
// add a button
|
||||
builder.setPositiveButton("Save", (dialog, which) -> {
|
||||
// send data from the AlertDialog to the Activity
|
||||
ed_remarks = customLayout.findViewById(R.id.ed_remarks);
|
||||
|
||||
if(ed_remarks.getText().toString().isEmpty())
|
||||
{
|
||||
Toast.makeText(LeaveRequestDetailsActivity.this, "Please enter remarks", Toast.LENGTH_SHORT).show();
|
||||
builder.show();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
PermissionApprovalAction();
|
||||
}
|
||||
|
||||
});
|
||||
// create and show the alert dialog
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -75,13 +194,35 @@ public class LeaveRequestDetailsActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(response);
|
||||
String _statusMessage3 = jsonObject.getString("_statusMessage");
|
||||
System.out.println("_statusMessage "+_statusMessage3);
|
||||
if(_statusMessage3.equals("Saved Successfully")){
|
||||
Intent intent = new Intent(LeaveRequestDetailsActivity.this, ApprovalListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
String _statusMessage = jsonObject.getString("_statusMessage");
|
||||
String _statusCode=jsonObject.getString("_statusCode");
|
||||
|
||||
|
||||
if(_statusCode.equals("200"))
|
||||
{
|
||||
String message;
|
||||
if(isreject)
|
||||
{
|
||||
message="Leave Rejected";
|
||||
}
|
||||
else {
|
||||
message="Leave Approved";
|
||||
}
|
||||
new SweetAlertDialog(LeaveRequestDetailsActivity.this, SweetAlertDialog.SUCCESS_TYPE)
|
||||
.setTitleText(message)
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
sDialog.dismissWithAnimation();
|
||||
Intent intent = new Intent(LeaveRequestDetailsActivity.this, ApprovalListActivity.class);startActivity(intent);
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(LeaveRequestDetailsActivity.this, _statusMessage, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -108,14 +249,20 @@ public class LeaveRequestDetailsActivity extends AppCompatActivity {
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
|
||||
params.put("permissionID", "27507");
|
||||
params.put("eleavetype", "27256");
|
||||
params.put("actionby", "asaif");
|
||||
params.put("remark", "Testing Approve");
|
||||
params.put("actionflag", "A");
|
||||
|
||||
|
||||
params.put("permissionID",permissionID );
|
||||
params.put("approverID", Employeeid);
|
||||
params.put("actionby", RegisterUser);
|
||||
params.put("remark", ed_remarks.getText().toString());
|
||||
if(isreject)
|
||||
{
|
||||
params.put("actionflag", "R");
|
||||
}
|
||||
else
|
||||
{
|
||||
params.put("actionflag", "A");
|
||||
}
|
||||
|
||||
System.out.println("params in Approve "+params);
|
||||
return params;
|
||||
}
|
||||
};
|
||||
|
@ -74,6 +74,8 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
String timeset, timeSetFrom,RegisterUser;
|
||||
EditText txtDate, txtTime;
|
||||
private int mYear, mMonth, mDay;
|
||||
private String code_type="P";
|
||||
|
||||
|
||||
|
||||
|
||||
@ -94,7 +96,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
txt_p_date = findViewById(R.id.txtPDate);
|
||||
txt_from_date = findViewById(R.id.txt_from_date);
|
||||
txt_to_date = findViewById(R.id.txt_to_date);
|
||||
|
||||
btnSubmit = findViewById(R.id.btnSubmit);
|
||||
|
||||
IsELeaveApprover();
|
||||
//PermissionInsert();
|
||||
@ -107,6 +109,8 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
|
||||
System.out.println("Current date and time "+currentDateandTime);
|
||||
|
||||
txt_p_date.setText(currentDateandTime);
|
||||
|
||||
|
||||
spinner = findViewById(R.id.spinner);
|
||||
// ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.spinner_items, android.R.layout.simple_spinner_item);
|
||||
@ -122,7 +126,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
// Do something with the selected item
|
||||
|
||||
code_type=permissionModel.Permission_code;
|
||||
|
||||
if (permissionModel.Permission_code.toUpperCase().equals("O"))
|
||||
{
|
||||
@ -154,21 +158,21 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
private_date.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
final Calendar c = Calendar.getInstance();
|
||||
mYear = c.get(Calendar.YEAR);
|
||||
mMonth = c.get(Calendar.MONTH);
|
||||
mDay = c.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
DatePickerDialog datePickerDialog = new DatePickerDialog(PermissionRequestActivity.this,
|
||||
new DatePickerDialog.OnDateSetListener() {
|
||||
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int year,
|
||||
int monthOfYear, int dayOfMonth) {
|
||||
txt_p_date.setText(dayOfMonth + "-" + (monthOfYear + 1) + "-" + year);
|
||||
}
|
||||
}, mYear, mMonth, mDay);
|
||||
datePickerDialog.show();
|
||||
// final Calendar c = Calendar.getInstance();
|
||||
// mYear = c.get(Calendar.YEAR);
|
||||
// mMonth = c.get(Calendar.MONTH);
|
||||
// mDay = c.get(Calendar.DAY_OF_MONTH);
|
||||
//
|
||||
// DatePickerDialog datePickerDialog = new DatePickerDialog(PermissionRequestActivity.this,
|
||||
// new DatePickerDialog.OnDateSetListener() {
|
||||
//
|
||||
// @Override
|
||||
// public void onDateSet(DatePicker view, int year,
|
||||
// int monthOfYear, int dayOfMonth) {
|
||||
// txt_p_date.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
|
||||
// }
|
||||
// }, mYear, mMonth, mDay);
|
||||
// datePickerDialog.show();
|
||||
}
|
||||
});
|
||||
official_from_date.setOnClickListener(new View.OnClickListener() {
|
||||
@ -185,7 +189,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int year,
|
||||
int monthOfYear, int dayOfMonth) {
|
||||
txt_from_date.setText(dayOfMonth + "-" + (monthOfYear + 1) + "-" + year);
|
||||
txt_from_date.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
|
||||
}
|
||||
}, mYear, mMonth, mDay);
|
||||
datePickerDialog.show();
|
||||
@ -205,7 +209,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onDateSet(DatePicker view, int year,
|
||||
int monthOfYear, int dayOfMonth) {
|
||||
txt_to_date.setText(dayOfMonth + "-" + (monthOfYear + 1) + "-" + year);
|
||||
txt_to_date.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
|
||||
}
|
||||
}, mYear, mMonth, mDay);
|
||||
datePickerDialog.show();
|
||||
@ -237,7 +241,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
btnSubmit = findViewById(R.id.btnSubmit);
|
||||
|
||||
btnSubmit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -321,7 +325,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
int minute) {
|
||||
|
||||
|
||||
timeset="";
|
||||
|
||||
if(hourOfDay>12)
|
||||
{
|
||||
hourOfDay-=12;
|
||||
@ -333,7 +337,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
textTimeTo.setText(hourOfDay + ":" + minute+" "+timeset);
|
||||
textTimeTo.setText(hourOfDay+":"+minute+" "+timeset);
|
||||
}
|
||||
}, mHour, mMinute, false);
|
||||
timePickerDialog.show();
|
||||
@ -362,23 +366,42 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
JSONObject jsonObject= null;
|
||||
try {
|
||||
jsonObject = new JSONObject(response);
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
// try {
|
||||
// jsonObject = new JSONObject(response);
|
||||
// } catch (JSONException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(response);
|
||||
_statusMessage = jsonObject.getString("_statusMessage");
|
||||
String _statusCode=jsonObject.getString("_statusCode");
|
||||
loading.dismiss();
|
||||
new SweetAlertDialog(PermissionRequestActivity.this, SweetAlertDialog.SUCCESS_TYPE)
|
||||
.setTitleText("Permission successful")
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
sDialog.dismissWithAnimation();
|
||||
}
|
||||
}).show();
|
||||
|
||||
if(_statusCode.equals("200"))
|
||||
{
|
||||
new SweetAlertDialog(PermissionRequestActivity.this, SweetAlertDialog.SUCCESS_TYPE)
|
||||
.setTitleText("Permission request Successful")
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
sDialog.dismissWithAnimation();
|
||||
}
|
||||
}).show();
|
||||
|
||||
txt_from_date.setText("From Date");
|
||||
txt_to_date.setText("To Date");
|
||||
textTimeTo.setText("Time to");
|
||||
textTimeFrom.setText("Time from");
|
||||
txt_p_date.setText(currentDateandTime);
|
||||
edtRemarks.setText("");
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
Toast.makeText(PermissionRequestActivity.this, _statusMessage, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -402,16 +425,22 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
|
||||
params.put("employeeid", Employeeid);
|
||||
params.put("eleavetype", permission_code);
|
||||
params.put("pdate", currentDateandTime);
|
||||
params.put("eleavetype", code_type);
|
||||
if(code_type.equals("O")) {
|
||||
params.put("pdate", currentDateandTime);
|
||||
}
|
||||
else {
|
||||
params.put("pdate", currentDateandTime);
|
||||
}
|
||||
|
||||
params.put("fromtime", textTimeFrom.getText().toString());
|
||||
params.put("totime", textTimeTo.getText().toString());
|
||||
params.put("reason", edtRemarks.getText().toString());
|
||||
params.put("attachment", "");
|
||||
params.put("userid", RegisterUser);
|
||||
if(permission_code.equals("O")){
|
||||
params.put("startdate", fromDate);
|
||||
params.put("enddate", toDate);
|
||||
if(code_type.equals("O")){
|
||||
params.put("startdate", txt_from_date.getText().toString());
|
||||
params.put("enddate", txt_to_date.getText().toString());
|
||||
}
|
||||
else {
|
||||
params.put("startdate", "");
|
||||
@ -532,7 +561,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
|
||||
Toast.makeText(PermissionRequestActivity.this, "Response successful1", Toast.LENGTH_SHORT).show();
|
||||
// Toast.makeText(PermissionRequestActivity.this, "Response successful1", Toast.LENGTH_SHORT).show();
|
||||
loading.dismiss();
|
||||
}
|
||||
|
||||
@ -540,7 +569,7 @@ public class PermissionRequestActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onErrorResponse(VolleyError error) {
|
||||
// Log.d("error-=>",error.getMessage());
|
||||
Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
// / Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
loading.dismiss();
|
||||
System.out.println("Error message: "+ error.getMessage());
|
||||
|
||||
|
@ -5,12 +5,18 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -23,9 +29,13 @@ import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.pedant.SweetAlert.SweetAlertDialog;
|
||||
import ru.visionlab.femdemo.models.ApprovalModel;
|
||||
import ru.visionlab.femdemo.models.ReportModel;
|
||||
|
||||
public class ReportActivity extends AppCompatActivity {
|
||||
|
||||
@ -41,25 +51,30 @@ public class ReportActivity extends AppCompatActivity {
|
||||
String valuefromApi="";
|
||||
|
||||
String passingDateFrom,passingDateTo;
|
||||
String Employeeid;
|
||||
String RegisterUser;
|
||||
String pdate,Check_In,Check_Out,status;
|
||||
ListView listview_report;
|
||||
ArrayList<ReportModel> reportList=new ArrayList<ReportModel>();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_report);
|
||||
|
||||
btnReport = findViewById(R.id.btnReport);
|
||||
btnReport.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE);
|
||||
|
||||
Intent intent = new Intent(ReportActivity.this, ReportDetailsActivity.class);
|
||||
intent.putExtra("passingDateFrom",passingDateFrom);
|
||||
intent.putExtra("passingDateTo",passingDateTo);
|
||||
startActivity(intent);
|
||||
//getReport();
|
||||
}
|
||||
});
|
||||
Employeeid = shared.getString("Employeeid", "");
|
||||
RegisterUser = shared.getString("RegisterUser", "");
|
||||
toDate = findViewById(R.id.toDate);
|
||||
listview_report=findViewById(R.id.listview_report);
|
||||
textToDate = findViewById(R.id.textToDate);
|
||||
fromDate = findViewById(R.id.fromDate);
|
||||
textFromDate = findViewById(R.id.textFromDate);
|
||||
back = findViewById(R.id.back);
|
||||
btnReport = findViewById(R.id.btnReport);
|
||||
|
||||
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -70,8 +85,6 @@ public class ReportActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
fromDate = findViewById(R.id.fromDate);
|
||||
textFromDate = findViewById(R.id.textFromDate);
|
||||
fromDate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -91,14 +104,14 @@ public class ReportActivity extends AppCompatActivity {
|
||||
// on below line we are setting date to our text view.
|
||||
textFromDate.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
|
||||
|
||||
yearFrom = year;
|
||||
dayOfmonthFrom = dayOfMonth;
|
||||
monthOfYearFrom = monthOfYear;
|
||||
|
||||
System.out.println("Date from values: " + dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom);
|
||||
|
||||
passingDateFrom = dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom;
|
||||
System.out.println("passingDateFrom " + passingDateFrom);
|
||||
// yearFrom = year;
|
||||
// dayOfmonthFrom = dayOfMonth;
|
||||
// monthOfYearFrom = monthOfYear;
|
||||
//
|
||||
// System.out.println("Date from values: " + dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom);
|
||||
//
|
||||
// passingDateFrom = dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom;
|
||||
// System.out.println("passingDateFrom " + passingDateFrom);
|
||||
}
|
||||
},
|
||||
// on below line we are passing year,
|
||||
@ -111,8 +124,7 @@ public class ReportActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
toDate = findViewById(R.id.toDate);
|
||||
textToDate = findViewById(R.id.textToDate);
|
||||
|
||||
toDate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -132,14 +144,14 @@ public class ReportActivity extends AppCompatActivity {
|
||||
// on below line we are setting date to our text view.
|
||||
textToDate.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
|
||||
|
||||
yearTo = year;
|
||||
dayOfmonthTo = dayOfMonth;
|
||||
monthOfYearTo = monthOfYear;
|
||||
|
||||
System.out.println("Date from values: " + dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo);
|
||||
|
||||
passingDateTo = dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo;
|
||||
System.out.println("passingDateTo " + passingDateTo);
|
||||
// yearTo = year;
|
||||
// dayOfmonthTo = dayOfMonth;
|
||||
// monthOfYearTo = monthOfYear;
|
||||
//
|
||||
// System.out.println("Date from values: " + dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo);
|
||||
//
|
||||
// passingDateTo = dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo;
|
||||
// System.out.println("passingDateTo " + passingDateTo);
|
||||
|
||||
}
|
||||
},
|
||||
@ -152,26 +164,119 @@ public class ReportActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
});
|
||||
btnReport.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
if(textFromDate.getText().toString().equals("From date"))
|
||||
{
|
||||
Toast.makeText(ReportActivity.this, "From date is required", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if(textToDate.getText().toString().equals("To date"))
|
||||
{
|
||||
Toast.makeText(ReportActivity.this, "To date is required", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
getReport(Employeeid,textFromDate.getText().toString(),textToDate.getText().toString());
|
||||
}
|
||||
|
||||
|
||||
// Intent intent = new Intent(ReportActivity.this, ReportDetailsActivity.class);
|
||||
// intent.putExtra("passingDateFrom",passingDateFrom);
|
||||
// intent.putExtra("passingDateTo",passingDateTo);
|
||||
// startActivity(intent);
|
||||
//getReport();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getReport(){
|
||||
public void getReport(String employeeid, String fromdate, String todate){
|
||||
final ProgressDialog loading = ProgressDialog.show(ReportActivity.this, "Authenticating", "Please wait ", false, false);
|
||||
//String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport";
|
||||
//String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+"101"+"&fromdate="+"06/06/2023"+"&todate="+"06/07/2023";
|
||||
String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+"101"+"&fromdate="+dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom+"&todate="+dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo;
|
||||
|
||||
String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+employeeid+"&fromdate="+fromdate+"&todate="+todate;
|
||||
System.out.println("report url :"+url);
|
||||
StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
try {
|
||||
if(!reportList.isEmpty())
|
||||
{
|
||||
reportList.clear();
|
||||
}
|
||||
|
||||
JSONObject jsonObject=new JSONObject(response);
|
||||
JSONObject jb1=jsonObject.getJSONObject("statusModel");
|
||||
valuefromApi = jb1.getString("_statusMessage");
|
||||
System.out.println("Report status from api " + valuefromApi);
|
||||
|
||||
JSONArray jsonArray=jsonObject.getJSONArray("_lstAttendanceData");
|
||||
for(int i=0;i<jsonArray.length();i++)
|
||||
{
|
||||
JSONObject jb2=jsonArray.getJSONObject(i);
|
||||
pdate=jb2.getString("pdate");
|
||||
Check_In=jb2.getString("Check_In");
|
||||
Check_Out=jb2.getString("Check_Out");
|
||||
status=jb2.getString("status");
|
||||
|
||||
ReportModel reportModel=new ReportModel();
|
||||
reportModel.setPdate(pdate);
|
||||
reportModel.setCheck_In(Check_In);
|
||||
reportModel.setCheck_Out(Check_Out);
|
||||
reportModel.setStatus(status);
|
||||
|
||||
reportList.add(reportModel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(valuefromApi.equals("success"))
|
||||
{
|
||||
listview_report.setVisibility(View.VISIBLE);
|
||||
new SweetAlertDialog(ReportActivity.this, SweetAlertDialog.SUCCESS_TYPE)
|
||||
.setTitleText("Reports found")
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
sDialog.dismissWithAnimation();
|
||||
listview_report.setAdapter(new Nr());
|
||||
listview_report.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
// ReportModel reportModel=reportList.get(i);
|
||||
// Intent intent = new Intent(ReportActivity.this,LeaveRequestDetailsActivity.class);
|
||||
// Bundle bundle=new Bundle();
|
||||
// bundle.putSerializable("Reportdata", (Serializable) reportModel);
|
||||
// intent.putExtras(bundle);
|
||||
// startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).show();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
listview_report.setVisibility(View.GONE);
|
||||
new SweetAlertDialog(ReportActivity.this, SweetAlertDialog.ERROR_TYPE)
|
||||
.setTitleText("No data founds")
|
||||
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
|
||||
@Override
|
||||
public void onClick(SweetAlertDialog sDialog) {
|
||||
sDialog.dismissWithAnimation();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
Toast.makeText(ReportActivity.this, valuefromApi, Toast.LENGTH_SHORT).show();
|
||||
|
||||
loading.dismiss();
|
||||
}
|
||||
|
||||
@ -187,17 +292,52 @@ public class ReportActivity extends AppCompatActivity {
|
||||
}
|
||||
})
|
||||
{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
|
||||
/*params.put("employeeid", "101");
|
||||
params.put("fromdate", "06/06/2023");
|
||||
params.put("todate", "06/07/2023");*/
|
||||
|
||||
return params;
|
||||
}
|
||||
// @Override
|
||||
// protected Map<String, String> getParams() {
|
||||
// Map<String, String> params = new HashMap<String, String>();
|
||||
//
|
||||
// params.put("employeeid", "101");
|
||||
// params.put("fromdate", "06/06/2023");
|
||||
// params.put("todate", "06/07/2023");
|
||||
//
|
||||
// return params;
|
||||
// }
|
||||
};
|
||||
Volley.newRequestQueue(ReportActivity.this).add(stringRequest);
|
||||
}
|
||||
private class Nr extends BaseAdapter {
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return reportList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
LayoutInflater inflater = getLayoutInflater();
|
||||
View v = inflater.inflate(R.layout.report_list, null);
|
||||
|
||||
TextView txt_pdate=v.findViewById(R.id.txt_pdate);
|
||||
TextView txt_checkin=v.findViewById(R.id.txt_checkin);
|
||||
TextView txt_checkout=v.findViewById(R.id.txt_checkout);
|
||||
TextView txt_status=v.findViewById(R.id.txt_status);
|
||||
|
||||
txt_pdate.setText(reportList.get(position).getPdate());
|
||||
txt_checkin.setText(reportList.get(position).getCheck_In());
|
||||
txt_checkout.setText(reportList.get(position).getCheck_Out());
|
||||
txt_status.setText(reportList.get(position).getStatus());
|
||||
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
@ -31,7 +31,7 @@ public class ReportDetailsActivity extends AppCompatActivity {
|
||||
|
||||
ImageView back;
|
||||
|
||||
String Employeeid;
|
||||
String Employeeid,pdate,Check_In,Check_Out,status;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -39,8 +39,8 @@ public class ReportDetailsActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_report_details);
|
||||
|
||||
SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE);
|
||||
|
||||
Employeeid = shared.getString("Employeeid", "");
|
||||
Intent intent=getIntent();
|
||||
|
||||
empIdVal = findViewById(R.id.empIdVal);
|
||||
pdateVal = findViewById(R.id.pdateVal);
|
||||
@ -52,78 +52,27 @@ public class ReportDetailsActivity extends AppCompatActivity {
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(ReportDetailsActivity.this, ReportActivity.class);
|
||||
startActivity(intent);
|
||||
onBackPressed();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Intent intent = getIntent();
|
||||
passingDateFrom = intent.getStringExtra("passingDateFrom");
|
||||
passingDateTo = intent.getStringExtra("passingDateTo");
|
||||
pdate=intent.getStringExtra("pdate");
|
||||
Check_In=intent.getStringExtra("Check_In");
|
||||
Check_Out=intent.getStringExtra("Check_Out");
|
||||
status=intent.getStringExtra("status");
|
||||
|
||||
empIdVal.setText(Employeeid);
|
||||
pdateVal.setText(pdate);
|
||||
Check_InVal.setText(Check_In);
|
||||
Check_OutVal.setText(Check_Out);
|
||||
statusVal.setText(status);
|
||||
|
||||
|
||||
|
||||
System.out.println("passingDateFrom " + passingDateFrom + " " + passingDateTo);
|
||||
|
||||
getReport();
|
||||
}
|
||||
|
||||
public void getReport(){
|
||||
final ProgressDialog loading = ProgressDialog.show(ReportDetailsActivity.this, "Authenticating", "Please wait ", false, false);
|
||||
|
||||
String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+Employeeid+"&fromdate="+passingDateFrom+"&todate="+passingDateTo;
|
||||
StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
try {
|
||||
JSONObject jsonObject=new JSONObject(response);
|
||||
JSONArray jsonArray=jsonObject.getJSONArray("_lstAttendanceData");
|
||||
JSONObject jb1=jsonArray.getJSONObject(0);
|
||||
String EmployeeID = jb1.getString("EmployeeID");
|
||||
String pdate = jb1.getString("pdate");
|
||||
String Check_In = jb1.getString("Check_In");
|
||||
String Check_Out = jb1.getString("Check_Out");
|
||||
String status = jb1.getString("status");
|
||||
|
||||
empIdVal.setText(EmployeeID);
|
||||
pdateVal.setText(pdate);
|
||||
Check_InVal.setText(Check_In);
|
||||
Check_OutVal.setText(Check_Out);
|
||||
statusVal.setText(status);
|
||||
|
||||
System.out.println("data from api " + EmployeeID + " " + pdate+" "+Check_In+" "+Check_Out+" "+status);
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
Toast.makeText(ReportDetailsActivity.this, "Successfull" , Toast.LENGTH_SHORT).show();
|
||||
loading.dismiss();
|
||||
}
|
||||
|
||||
}, new com.android.volley.Response.ErrorListener() {
|
||||
@Override
|
||||
public void onErrorResponse(VolleyError error) {
|
||||
// Log.d("error-=>",error.getMessage());
|
||||
Toast.makeText(ReportDetailsActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
loading.dismiss();
|
||||
System.out.println("Error message: "+ error.getMessage());
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
|
||||
/*params.put("employeeid", "101");
|
||||
params.put("fromdate", "06/06/2023");
|
||||
params.put("todate", "06/07/2023");*/
|
||||
|
||||
return params;
|
||||
}
|
||||
};
|
||||
Volley.newRequestQueue(ReportDetailsActivity.this).add(stringRequest);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package ru.visionlab.femdemo.models;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ApprovalModel implements Serializable {
|
||||
String RequestID,EmployeeID,EmployeeName,LDate,
|
||||
LTimeOut,LTimeIn,NoOfHrs,LeaveType,
|
||||
ApproverID,ApproverName,Reason,_statusCode;
|
||||
|
||||
public String getRequestID() {
|
||||
return RequestID;
|
||||
}
|
||||
|
||||
public void setRequestID(String requestID) {
|
||||
RequestID = requestID;
|
||||
}
|
||||
|
||||
public String getEmployeeID() {
|
||||
return EmployeeID;
|
||||
}
|
||||
|
||||
public void setEmployeeID(String employeeID) {
|
||||
EmployeeID = employeeID;
|
||||
}
|
||||
|
||||
public String getEmployeeName() {
|
||||
return EmployeeName;
|
||||
}
|
||||
|
||||
public void setEmployeeName(String employeeName) {
|
||||
EmployeeName = employeeName;
|
||||
}
|
||||
|
||||
public String getLDate() {
|
||||
return LDate;
|
||||
}
|
||||
|
||||
public void setLDate(String LDate) {
|
||||
this.LDate = LDate;
|
||||
}
|
||||
|
||||
public String getLTimeOut() {
|
||||
return LTimeOut;
|
||||
}
|
||||
|
||||
public void setLTimeOut(String LTimeOut) {
|
||||
this.LTimeOut = LTimeOut;
|
||||
}
|
||||
|
||||
public String getLTimeIn() {
|
||||
return LTimeIn;
|
||||
}
|
||||
|
||||
public void setLTimeIn(String LTimeIn) {
|
||||
this.LTimeIn = LTimeIn;
|
||||
}
|
||||
|
||||
public String getNoOfHrs() {
|
||||
return NoOfHrs;
|
||||
}
|
||||
|
||||
public void setNoOfHrs(String noOfHrs) {
|
||||
NoOfHrs = noOfHrs;
|
||||
}
|
||||
|
||||
public String getLeaveType() {
|
||||
return LeaveType;
|
||||
}
|
||||
|
||||
public void setLeaveType(String leaveType) {
|
||||
LeaveType = leaveType;
|
||||
}
|
||||
|
||||
public String getApproverID() {
|
||||
return ApproverID;
|
||||
}
|
||||
|
||||
public void setApproverID(String approverID) {
|
||||
ApproverID = approverID;
|
||||
}
|
||||
|
||||
public String getApproverName() {
|
||||
return ApproverName;
|
||||
}
|
||||
|
||||
public void setApproverName(String approverName) {
|
||||
ApproverName = approverName;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return Reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
Reason = reason;
|
||||
}
|
||||
|
||||
public String get_statusCode() {
|
||||
return _statusCode;
|
||||
}
|
||||
|
||||
public void set_statusCode(String _statusCode) {
|
||||
this._statusCode = _statusCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package ru.visionlab.femdemo.models;
|
||||
|
||||
public class ReportModel {
|
||||
|
||||
String EmployeeID,pdate,Check_In,Check_Out,status;
|
||||
|
||||
public String getEmployeeID() {
|
||||
return EmployeeID;
|
||||
}
|
||||
|
||||
public void setEmployeeID(String employeeID) {
|
||||
EmployeeID = employeeID;
|
||||
}
|
||||
|
||||
public String getPdate() {
|
||||
return pdate;
|
||||
}
|
||||
|
||||
public void setPdate(String pdate) {
|
||||
this.pdate = pdate;
|
||||
}
|
||||
|
||||
public String getCheck_In() {
|
||||
return Check_In;
|
||||
}
|
||||
|
||||
public void setCheck_In(String check_In) {
|
||||
Check_In = check_In;
|
||||
}
|
||||
|
||||
public String getCheck_Out() {
|
||||
return Check_Out;
|
||||
}
|
||||
|
||||
public void setCheck_Out(String check_Out) {
|
||||
Check_Out = check_Out;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:padding="23dp"
|
||||
>
|
||||
android:padding="23dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin1"
|
||||
@ -22,7 +22,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Approval list"
|
||||
android:text="Request list"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
@ -36,6 +36,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/listview"
|
||||
tools:listitem="@layout/listview_layout"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
</LinearLayout>
|
@ -9,6 +9,14 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="23dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -62,21 +70,24 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emp_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Madelyn Lubin"
|
||||
android:text=""
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"/>
|
||||
<TextView
|
||||
android:id="@+id/leavdate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Tue, 22 - Thu, 24 Feb 2023"
|
||||
android:text=""
|
||||
android:textStyle="normal"
|
||||
android:textColor="#5F5F5F"/>
|
||||
<TextView
|
||||
android:id="@+id/leavtype"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Casual Leave"
|
||||
android:text=""
|
||||
android:textStyle="bold"
|
||||
android:textColor="#3553BB"/>
|
||||
|
||||
@ -89,9 +100,10 @@
|
||||
android:layout_marginLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hours"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="03"
|
||||
android:text=""
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
@ -101,7 +113,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Days"
|
||||
android:text="Hours"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="normal"
|
||||
android:textColor="#000000"
|
||||
@ -114,26 +126,29 @@
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_leav_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_btn_with_stroke_grey"
|
||||
android:text="Casual Leave"
|
||||
android:text=""
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="#3553BB"
|
||||
android:padding="5dp"
|
||||
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Total Leave this year"
|
||||
android:text="Time In"
|
||||
android:textColor="#A1A1A1"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_time_in"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="23 days"
|
||||
android:text=""
|
||||
android:textColor="#434343"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="18sp"
|
||||
@ -142,14 +157,15 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Substitute"
|
||||
android:text="Time Out"
|
||||
android:textColor="#A1A1A1"
|
||||
android:layout_marginTop="30dp"/>
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_time_out"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Richard Wilson"
|
||||
android:text=""
|
||||
android:textColor="#434343"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="18sp"
|
||||
@ -160,12 +176,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Approver"
|
||||
android:textColor="#A1A1A1"
|
||||
android:layout_marginTop="30dp"/>
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_approver_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Michael Adams"
|
||||
android:text=""
|
||||
android:textColor="#434343"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="18sp"
|
||||
@ -174,14 +191,15 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="HR Contact"
|
||||
android:text="Reason"
|
||||
android:textColor="#A1A1A1"
|
||||
android:layout_marginTop="30dp"/>
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_reason"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="HR Contact"
|
||||
android:text=""
|
||||
android:textColor="#434343"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="18sp"
|
||||
@ -207,6 +225,7 @@
|
||||
android:text="Reject"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
@ -195,6 +195,36 @@
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/timePickerFrom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_button_time"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:layout_marginRight="14dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/calender"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textTimeFrom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Time from"
|
||||
android:textColor="@color/black"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="100dp"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/official_to_date"
|
||||
android:layout_width="match_parent"
|
||||
@ -221,36 +251,7 @@
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timePickerFrom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_button_time"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:layout_marginRight="14dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/calender"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textTimeFrom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Time from"
|
||||
android:textColor="@color/black"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="100dp"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/timePickerTo"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -113,11 +113,20 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:layout_marginRight="14dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:background="@drawable/bg_btn_with_stroke"
|
||||
android:text="Submit"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listview_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="30dp"
|
||||
tools:listitem="@layout/report_list"
|
||||
android:dividerHeight="5.0sp"
|
||||
android:divider="@android:color/transparent"
|
||||
android:layout_height="wrap_content"></ListView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_remarks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
@ -72,7 +72,7 @@
|
||||
android:id="@+id/request"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Permission"
|
||||
android:text="Permission request"
|
||||
android:layout_toRightOf="@id/req"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="38dp"
|
||||
@ -108,7 +108,7 @@
|
||||
android:id="@+id/permissionApproval"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Permission appoval"
|
||||
android:text="Permission approval"
|
||||
android:layout_toRightOf="@id/approval"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="38dp"
|
||||
|
@ -135,6 +135,7 @@
|
||||
android:layout_marginRight="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_approve"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="25dp"
|
||||
android:orientation="horizontal"
|
||||
|
@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/edittext_border">
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/rl_1"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
|
||||
<!-- >-->
|
||||
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/EmployeeName"-->
|
||||
<!-- android:text="Employee ID"-->
|
||||
<!-- android:textSize="18sp"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- android:layout_width="fill_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textColor="@color/colorPrimary" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/emp_id"-->
|
||||
<!-- android:text="Employee ID"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textColor="#5d5d5d"-->
|
||||
<!-- android:layout_alignParentRight="true"-->
|
||||
<!-- android:gravity="center_horizontal"-->
|
||||
<!-- />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pdate"
|
||||
android:text="Private Date"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_pdate"
|
||||
android:text=""
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#5d5d5d"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_3"
|
||||
android:layout_below="@id/rl_2"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/checkin"
|
||||
android:text="Check In"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_checkin"
|
||||
android:text=""
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#5d5d5d"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_4"
|
||||
android:layout_below="@id/rl_3"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/checkout"
|
||||
android:text="Check Out"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_checkout"
|
||||
android:text=""
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#5d5d5d"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_5"
|
||||
android:layout_below="@id/rl_4"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:text="Status"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_status"
|
||||
android:text=""
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#5d5d5d"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"></RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
Loading…
x
Reference in New Issue
Block a user