Merge branch 'features/permission' into pms_issue/31163_FaceVerification
This commit is contained in:
commit
2f95660c64
@ -3,9 +3,14 @@ package ru.visionlab.femdemo;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.AdapterView;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ListAdapter;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.SimpleAdapter;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -18,6 +23,9 @@ import org.json.JSONArray;
|
|||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ApprovalListActivity extends AppCompatActivity {
|
public class ApprovalListActivity extends AppCompatActivity {
|
||||||
|
|
||||||
ImageButton back;
|
ImageButton back;
|
||||||
@ -25,10 +33,14 @@ public class ApprovalListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
String RequestID,EmployeeID,EmployeeName,LDate,LTimeOut,LTimeIn,NoOfHrs,LeaveType,ApproverID,ApproverName,Reason;
|
String RequestID,EmployeeID,EmployeeName,LDate,LTimeOut,LTimeIn,NoOfHrs,LeaveType,ApproverID,ApproverName,Reason;
|
||||||
|
|
||||||
|
ListView lv;
|
||||||
|
ArrayList<HashMap<String,String>> arrayList;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_approval_list);
|
//setContentView(R.layout.activity_approval_list);
|
||||||
|
setContentView(R.layout.activity_approval_new_list);
|
||||||
|
|
||||||
back = findViewById(R.id.back);
|
back = findViewById(R.id.back);
|
||||||
back.setOnClickListener(new View.OnClickListener() {
|
back.setOnClickListener(new View.OnClickListener() {
|
||||||
@ -39,9 +51,14 @@ public class ApprovalListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
arrayList=new ArrayList<>();
|
||||||
|
lv = findViewById(R.id.listview);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PermissionApprovalList();
|
PermissionApprovalList();
|
||||||
|
|
||||||
RequestIDVal = findViewById(R.id.RequestIDVal);
|
/*RequestIDVal = findViewById(R.id.RequestIDVal);
|
||||||
EmployeeIDVal = findViewById(R.id.EmployeeIDVal);
|
EmployeeIDVal = findViewById(R.id.EmployeeIDVal);
|
||||||
EmployeeNameVal = findViewById(R.id.EmployeeNameVal);
|
EmployeeNameVal = findViewById(R.id.EmployeeNameVal);
|
||||||
LDateVal = findViewById(R.id.LDateVal);
|
LDateVal = findViewById(R.id.LDateVal);
|
||||||
@ -52,7 +69,7 @@ public class ApprovalListActivity extends AppCompatActivity {
|
|||||||
ApproverIDVal = findViewById(R.id.ApproverIDVal);
|
ApproverIDVal = findViewById(R.id.ApproverIDVal);
|
||||||
ApproverNameVal = findViewById(R.id.ApproverNameVal);
|
ApproverNameVal = findViewById(R.id.ApproverNameVal);
|
||||||
ReasonVal = findViewById(R.id.ReasonVal);
|
ReasonVal = findViewById(R.id.ReasonVal);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -66,7 +83,11 @@ public class ApprovalListActivity extends AppCompatActivity {
|
|||||||
public void onResponse(String response) {
|
public void onResponse(String response) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
JSONArray jsonArray=new JSONArray(response);
|
JSONArray jsonArray=new JSONArray(response);
|
||||||
|
for(int i = 0;i<jsonArray.length();i++){
|
||||||
|
|
||||||
JSONObject jb1=jsonArray.getJSONObject(0);
|
JSONObject jb1=jsonArray.getJSONObject(0);
|
||||||
RequestID = jb1.getString("RequestID");
|
RequestID = jb1.getString("RequestID");
|
||||||
EmployeeID = jb1.getString("EmployeeID");
|
EmployeeID = jb1.getString("EmployeeID");
|
||||||
@ -80,7 +101,26 @@ public class ApprovalListActivity extends AppCompatActivity {
|
|||||||
ApproverName = jb1.getString("ApproverName");
|
ApproverName = jb1.getString("ApproverName");
|
||||||
Reason = jb1.getString("Reason");
|
Reason = jb1.getString("Reason");
|
||||||
|
|
||||||
RequestIDVal.setText(RequestID);
|
HashMap<String,String> data = new HashMap<>();
|
||||||
|
data.put("EmployeeName",EmployeeName);
|
||||||
|
data.put("EmployeeID",EmployeeID);
|
||||||
|
data.put("LeaveType",LeaveType);
|
||||||
|
data.put("ApproverName",ApproverName);
|
||||||
|
|
||||||
|
arrayList.add(data);
|
||||||
|
|
||||||
|
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);
|
||||||
|
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||||
|
Intent intent = new Intent(ApprovalListActivity.this,LeaveRequestDetailsActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/*RequestIDVal.setText(RequestID);
|
||||||
EmployeeIDVal.setText(EmployeeID);
|
EmployeeIDVal.setText(EmployeeID);
|
||||||
EmployeeNameVal.setText(EmployeeName);
|
EmployeeNameVal.setText(EmployeeName);
|
||||||
LDateVal.setText(LDate);
|
LDateVal.setText(LDate);
|
||||||
@ -91,7 +131,7 @@ public class ApprovalListActivity extends AppCompatActivity {
|
|||||||
ApproverIDVal.setText(ApproverID);
|
ApproverIDVal.setText(ApproverID);
|
||||||
ApproverNameVal.setText(ApproverName);
|
ApproverNameVal.setText(ApproverName);
|
||||||
ReasonVal.setText(Reason);
|
ReasonVal.setText(Reason);
|
||||||
|
*/ }
|
||||||
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
<?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:padding="23dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/back"
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:src="@drawable/ic_baseline_arrow_back_24"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:contentDescription="Back"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Approval list"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginLeft="110dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/listview"
|
||||||
|
android:layout_marginTop="20dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,191 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:weightSum="2"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/edittext_border"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/EmployeeName"
|
||||||
|
android:text="Employee Name"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/EmployeeNameVal"
|
||||||
|
android:text="EmployeeName"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#5d5d5d"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/EmployeeID"
|
||||||
|
android:text="Employee ID"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/EmployeeIDVal"
|
||||||
|
android:text="EmployeeID"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#5d5d5d"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/LeaveType"
|
||||||
|
android:text="Leave Type"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/LeaveTypeVal"
|
||||||
|
android:text="LeaveType"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#5d5d5d"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/ApproverName"
|
||||||
|
android:text="Approver Name"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/ApproverNameVal"
|
||||||
|
android:text="ApproverName"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#5d5d5d"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_marginRight="5dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="90dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_btn_with_stroke"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/tick"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="4dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Approve"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="10dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="90dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_btn_with_stroke_grey"
|
||||||
|
android:padding="2dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/cross"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="4dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Reject"
|
||||||
|
android:textColor="#CB1A1A"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="15dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user