|
|
|
@ -15,6 +15,7 @@ import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class TeamMembers extends StatefulWidget {
|
|
|
|
class TeamMembers extends StatefulWidget {
|
|
|
|
final String? selectedEmp;
|
|
|
|
final String? selectedEmp;
|
|
|
|
|
|
|
|
|
|
|
|
const TeamMembers({this.selectedEmp, Key? key}) : super(key: key);
|
|
|
|
const TeamMembers({this.selectedEmp, Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
@ -22,8 +23,8 @@ class TeamMembers extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
String searchEmpEmail ="";
|
|
|
|
String searchEmpEmail = "";
|
|
|
|
String searchEmpName ="";
|
|
|
|
String searchEmpName = "";
|
|
|
|
String searchEmpNo = "";
|
|
|
|
String searchEmpNo = "";
|
|
|
|
String? empId;
|
|
|
|
String? empId;
|
|
|
|
|
|
|
|
|
|
|
|
@ -39,7 +40,7 @@ class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString());
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString());
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().employeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString(),getEmployeeSubordinates?.eMPLOYEENUMBER);
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().employeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString(), getEmployeeSubordinates?.eMPLOYEENUMBER);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
} catch (ex) {
|
|
|
|
} catch (ex) {
|
|
|
|
@ -62,14 +63,12 @@ class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
getEmployeeSubordinatesList.isEmpty
|
|
|
|
getEmployeeSubordinatesList.isEmpty
|
|
|
|
? Container(
|
|
|
|
? Container(margin: const EdgeInsets.only(top: 100), child: Utils.getNoDataWidget(context))
|
|
|
|
margin: const EdgeInsets.only(top: 100),
|
|
|
|
: ListView.separated(
|
|
|
|
child: Utils.getNoDataWidget(context)):
|
|
|
|
|
|
|
|
ListView.separated(
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
padding: const EdgeInsets.only(top: 12),
|
|
|
|
padding: const EdgeInsets.only(top: 12),
|
|
|
|
separatorBuilder: (BuildContext cxt,int index) => 12.height,
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 12.height,
|
|
|
|
itemCount: getEmployeeSubordinatesList.length,
|
|
|
|
itemCount: getEmployeeSubordinatesList.length,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}');
|
|
|
|
var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}');
|
|
|
|
@ -81,7 +80,11 @@ class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
getEmployeeSubordinatesList[index].eMPLOYEEIMAGE == null
|
|
|
|
getEmployeeSubordinatesList[index].eMPLOYEEIMAGE == null
|
|
|
|
? SvgPicture.asset("assets/images/user.svg",height: 34, width: 34, ).paddingOnly(top: 4)
|
|
|
|
? SvgPicture.asset(
|
|
|
|
|
|
|
|
"assets/images/user.svg",
|
|
|
|
|
|
|
|
height: 34,
|
|
|
|
|
|
|
|
width: 34,
|
|
|
|
|
|
|
|
).paddingOnly(top: 4)
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
height: 34,
|
|
|
|
height: 34,
|
|
|
|
width: 34,
|
|
|
|
width: 34,
|
|
|
|
@ -97,7 +100,7 @@ class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
// "Present".toText13(color: MyColors.greenColor),
|
|
|
|
// "Present".toText13(color: MyColors.greenColor),
|
|
|
|
"${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor),
|
|
|
|
"${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor),
|
|
|
|
"${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10( color: MyColors.grey57Color),
|
|
|
|
"${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10(color: MyColors.grey57Color),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
@ -106,7 +109,7 @@ class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER == ""
|
|
|
|
getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER == ""
|
|
|
|
? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22)
|
|
|
|
? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22)
|
|
|
|
:InkWell(
|
|
|
|
: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
launchUrl(phoneNumber);
|
|
|
|
launchUrl(phoneNumber);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -122,10 +125,11 @@ class _TeamMembersState extends State<TeamMembers> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingOnly(top: 13, bottom: 13, right: 12, left: 14).objectContainerView(radius: 10, disablePadding: true),
|
|
|
|
).paddingOnly(top: 13, bottom: 13, right: 12, left: 14).objectContainerView(radius: 10, disablePadding: true),
|
|
|
|
);
|
|
|
|
).paddingOnly(left: 16.0, right: 16.0);
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
),
|
|
|
|
));
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|