fix design issues

merge-requests/1/merge
Fatimah Alshammari 2 years ago
parent 414cc587ea
commit 3d11273738

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="22.289" height="22.289" viewBox="0 0 22.289 22.289">
<g id="Group_963" data-name="Group 963" transform="translate(0 0)">
<g id="Group_8600" data-name="Group 8600" transform="translate(0 0)">
<path id="Path_1064" data-name="Path 1064" d="M19.024,3.264a11.145,11.145,0,1,0,3.265,7.879,11.145,11.145,0,0,0-3.265-7.879M16.878,15.525h0v0l-.565.561a2.972,2.972,0,0,1-2.8.8A9.875,9.875,0,0,1,10.639,15.6a13.25,13.25,0,0,1-2.262-1.824,13.352,13.352,0,0,1-1.69-2.051,10.4,10.4,0,0,1-1.27-2.571A2.972,2.972,0,0,1,6.159,6.12l.661-.661a.472.472,0,0,1,.667,0h0L9.577,7.547a.472.472,0,0,1,0,.667h0L8.351,9.442a1,1,0,0,0-.1,1.3,14.337,14.337,0,0,0,1.467,1.713,14.249,14.249,0,0,0,1.932,1.623,1.007,1.007,0,0,0,1.285-.111l1.185-1.2a.472.472,0,0,1,.667,0h0l2.091,2.1a.472.472,0,0,1,0,.667" transform="translate(0 -0.001)" fill="#ddd"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 901 B

@ -17,7 +17,7 @@ extension EmailValidator on String {
Widget toText10({Color? color, bool isBold = false, int? maxLine}) => Text(
this,
maxLines: maxlines,
//maxLines: maxlines,
style: TextStyle(fontSize: 10, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
);
@ -83,6 +83,12 @@ extension EmailValidator on String {
style: TextStyle(fontSize: 20, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
);
Widget toText21({Color? color, bool isBold = false, FontWeight? weight, int? maxlines}) => Text(
this,
maxLines: maxlines,
style: TextStyle(color: color ?? MyColors.grey3AColor, fontSize: 21, letterSpacing: -0.31, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.w600)),
);
Widget toText22({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),

@ -91,11 +91,11 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
80.height,
60.height,
Container(
padding: EdgeInsets.only(left: 15, right: 15),
padding: EdgeInsets.only(left: 15, right: 15, bottom: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
onPressed: () {
@ -124,103 +124,80 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
.width;
return Column(
children: [
Container(
margin: EdgeInsets.fromLTRB(21, 0, 21, 10),
child: Stack(children: [
Container(
width: _width,
margin: EdgeInsets.only(top: 50),
//padding: EdgeInsets.only(right: 17, left: 17),
decoration: BoxDecoration(
color: MyColors.whiteColor,
borderRadius: const BorderRadius.all(Radius.circular(15)),
boxShadow: [BoxShadow(color: MyColors.lightGreyColor, blurRadius: 15, spreadRadius: 3)],
),
child: Column(
Stack(children: [
Container(
margin: EdgeInsets.fromLTRB(21, 40, 21, 0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
IconButton(
onPressed: (){
if(getEmployeeSubordinates!.isFavorite != true){
showFavoriteAlertDialog(context);
setState(() {});
}else{
fetchChangeFav(
email: getEmployeeSubordinates?.eMPLOYEEEMAILADDRESS ?? "",
employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "",
image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "",
userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "",
isFav: false,);
setState(() {});
} },
icon: getEmployeeSubordinates!.isFavorite != true
? Icon(
Icons.star_outline,
size: 35,
color: MyColors.green9CColor,
)
: Icon(
Icons.star_outlined,
size: 35,
color: MyColors.green9CColor,
),
),
InkWell(
onTap:() {
launchUrl(phoneNumber);
},
child: SvgPicture.asset("assets/images/call.svg"),
),
],
).paddingOnly(left:6, right: 17, top: 16),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
/// card header
customLabel(getEmployeeSubordinates!.eMPLOYEENAME.toString(), 21, MyColors.grey3AColor, true),
customLabel(getEmployeeSubordinates!.eMPLOYEENUMBER.toString() + ' | ' + getEmployeeSubordinates!.jOBNAME.toString(), 13, MyColors.grey80Color, true),
customLabel(getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS.toString(), 13, MyColors.grey3AColor, true),
],
).paddingOnly(bottom: 10, left: 35,right: 31),
IconButton(
onPressed: (){
if(getEmployeeSubordinates!.isFavorite != true){
showFavoriteAlertDialog(context);
setState(() {});
}else{
fetchChangeFav(
email: getEmployeeSubordinates?.eMPLOYEEEMAILADDRESS ?? "",
employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "",
image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "",
userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "",
isFav: false,);
setState(() {});
} },
icon: getEmployeeSubordinates!.isFavorite != true
? Icon(
Icons.star_outline,
size: 35,
color: MyColors.green9CColor,
)
: Icon(
Icons.star_outlined,
size: 35,
color: MyColors.green9CColor,
),
),
getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER == ""
? SvgPicture.asset("assets/images/call-disable.svg", height: 25, width: 25,).paddingOnly(left:6, right: 17)
: InkWell(
onTap:() {
launchUrl(phoneNumber);
},
child: SvgPicture.asset("assets/images/call.svg", height: 25, width: 25,).paddingOnly(left:6, right: 17),
),
],
),
),
Container(height: 100, alignment: Alignment.center, child: ProfileImage()),
])
),
Container(
margin: EdgeInsets.fromLTRB(21, 8, 21, 10),
height: 260,
padding: EdgeInsets.only(top: 15, bottom: 15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(15)),
boxShadow: [BoxShadow(color: MyColors.lightGreyColor, blurRadius: 15, spreadRadius: 3)],
),
child: Column(
children: menu.map((ProfileMenu i) => rowItem(i, context)).toList(),
getEmployeeSubordinates!.eMPLOYEENAME!.toText21(maxlines: 2),
("${getEmployeeSubordinates!.eMPLOYEENUMBER!} | ${getEmployeeSubordinates!.jOBNAME!}").toText13(color: MyColors.grey80Color),
getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS!.toText13(),
],
).objectContainerView(),
),
Container(
height: 68, alignment: Alignment.center, child: ProfileImage()).paddingOnly(top: 10),
]),
12.height,
Container(
margin: EdgeInsets.fromLTRB(21, 0, 21, 0),
child: Column(
children: menu.map((ProfileMenu i) => rowItem(i, context)).toList(),
).objectContainerView(),
),
),
// ),
],
);
}
Widget ProfileImage() =>
CircleAvatar(
getEmployeeSubordinates?.eMPLOYEEIMAGE == null
? SvgPicture.asset("assets/images/user.svg",height: 68, width: 68, )
: CircleAvatar(
radius: 70,
backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinates?.eMPLOYEEIMAGE)),
backgroundColor: Colors.black,
);
Widget customLabel(String label, double size, Color color, bool isBold, {double padding = 0.0}) =>
Container(
padding: EdgeInsets.all(padding),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [Text(label, style: TextStyle(color: color, fontSize: size, fontWeight: isBold ? FontWeight.bold : FontWeight.normal))]));
Widget rowItem(obj, context) {
return InkWell(
@ -233,7 +210,6 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
leading: SvgPicture.asset('assets/images/' + obj.icon),
title: Text(obj.name,
style: TextStyle(color: MyColors.grey3AColor,
fontWeight: FontWeight.w600,
fontSize: 16)),
trailing: Icon(Icons.arrow_forward,
color: MyColors.grey3AColor,),
@ -242,10 +218,10 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
}
void setMenu(){
menu = [
ProfileMenu(name: "Profile Details", icon: "profile_details.svg", route: AppRoutes.profileDetails, arguments:getEmployeeSubordinates),
ProfileMenu(name: "Create Request", icon: "create_request.svg", route: AppRoutes.createRequest,arguments: getEmployeeSubordinates),
ProfileMenu(name: "View Attendance", icon: "view_attendance.svg", route: AppRoutes.viewAttendance, arguments: getEmployeeSubordinates),
ProfileMenu(name: "Team Members", icon: "team.svg", route: AppRoutes.teamMembers, arguments: getEmployeeSubordinates),
ProfileMenu(name: LocaleKeys.profileDetails.tr(), icon: "profile_details.svg", route: AppRoutes.profileDetails, arguments:getEmployeeSubordinates),
ProfileMenu(name: LocaleKeys.createRequest.tr(), icon: "create_request.svg", route: AppRoutes.createRequest,arguments: getEmployeeSubordinates),
ProfileMenu(name: LocaleKeys.viewAttendance.tr(), icon: "view_attendance.svg", route: AppRoutes.viewAttendance, arguments: getEmployeeSubordinates),
ProfileMenu(name: LocaleKeys.teamMembers.tr(), icon: "team.svg", route: AppRoutes.teamMembers, arguments: getEmployeeSubordinates),
];
}

@ -126,42 +126,52 @@ class _MyTeamState extends State<MyTeam> {
itemCount: _textEditingController!.text.isNotEmpty ? getEmployeeSListOnSearch.length : getEmployeeSubordinatesList.length,
itemBuilder: (context, index) {
var phoneNumber = Uri.parse('tel:${getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER}');
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CircleAvatar(
radius: 25,
backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE)),
backgroundColor: Colors.black,
),
10.width,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// "Present".toText13(color: MyColors.greenColor),
"${getEmployeeSListOnSearch[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor),
"${getEmployeeSListOnSearch[index].pOSITIONNAME}".toText10(color: MyColors.grey57Color),
],
).expanded,
Column(
children: [
InkWell(
onTap: () {
launchUrl(phoneNumber);
},
child: SvgPicture.asset("assets/images/call.svg"),
),
21.height,
InkWell(
onTap: () async {
Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSListOnSearch[index]);
},
child: Icon(Icons.arrow_forward_outlined, color: MyColors.grey3AColor),
),
],
),
],
).objectContainerView();
return InkWell(
onTap: () async {
Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSListOnSearch[index]);
},
child: Row(
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
getEmployeeSListOnSearch[index].eMPLOYEEIMAGE == null
? SvgPicture.asset("assets/images/user.svg",height: 34, width: 34, ).paddingOnly(top: 4)
: Container(
height: 34,
width: 34,
child: CircleAvatar(
radius: 25,
backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE)),
backgroundColor: Colors.black,
).paddingOnly(top: 4),
),
9.width,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// "Present".toText13(color: MyColors.greenColor),
"${getEmployeeSListOnSearch[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor),
"${getEmployeeSListOnSearch[index].pOSITIONNAME}".toText10(color: MyColors.grey57Color),
],
).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER == ""
? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22).paddingOnly(bottom: 23)
: InkWell(
onTap: () {
launchUrl(phoneNumber);
},
child: SvgPicture.asset("assets/images/call.svg", width: 22, height: 22).paddingOnly(bottom: 23),
),
// 21.height,
Icon(Icons.arrow_forward_outlined, color: MyColors.grey3AColor),
],
).expanded,
],
).objectContainerView(),
);
})
],
),

@ -36,19 +36,19 @@ class _ProfileDetailsState extends State<ProfileDetails> {
children: [
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor),
"${getEmployeeSubordinates?.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.darkTextColor),
"${getEmployeeSubordinates?.eMPLOYMENTCATEGORYMEANING}".toText16(color: MyColors.darkTextColor),
23.height,
LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor),
"${getEmployeeSubordinates?.lOCATIONNAME}".toText16(isBold: true, color: MyColors.darkTextColor),
"${getEmployeeSubordinates?.lOCATIONNAME}".toText16(color: MyColors.darkTextColor),
23.height,
LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor),
"${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.darkTextColor),
"${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}".toText16(color: MyColors.darkTextColor),
23.height,
LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor),
"${getEmployeeSubordinates?.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.darkTextColor),
"${getEmployeeSubordinates?.bUSINESSGROUPNAME}".toText16(color: MyColors.darkTextColor),
23.height,
LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor),
"${getEmployeeSubordinates?.pAYROLLNAME}".toText16(isBold: true, color: MyColors.darkTextColor),
"${getEmployeeSubordinates?.pAYROLLNAME}".toText16(color: MyColors.darkTextColor),
]).objectContainerView(),
],
));

@ -88,7 +88,9 @@ class _SubordinateLeaveState extends State<SubordinateLeave> {
],
).objectContainerView(),
if (showList)
ListView.separated(
getSubordinatesLeavesTotalList.isEmpty?
Utils.getNoDataWidget(context).paddingOnly(top: 21)
: ListView.separated(
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
padding: const EdgeInsets.all(21),
@ -98,9 +100,7 @@ class _SubordinateLeaveState extends State<SubordinateLeave> {
var diffDays = DateUtil.convertStringToDate(getSubordinatesLeavesTotalList[index].dATEEND!)
.difference(DateUtil.convertStringToDate(getSubordinatesLeavesTotalList[index].dATESTART!))
.inDays;
return getSubordinatesLeavesTotalList.isEmpty
? Utils.getNoDataWidget(context)
: Row(
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset("assets/images/user.svg", width: 34, height: 34).paddingOnly(top: 4),

@ -1,5 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
@ -59,7 +60,9 @@ class _TeamMembersState extends State<TeamMembers> {
child: Column(
children: <Widget>[
getEmployeeSubordinatesList.isEmpty
? Utils.getNoDataWidget(context):
? Container(
margin: const EdgeInsets.only(top: 100),
child: Utils.getNoDataWidget(context)):
ListView.separated(
scrollDirection: Axis.vertical,
shrinkWrap: true,
@ -69,40 +72,51 @@ class _TeamMembersState extends State<TeamMembers> {
itemCount: getEmployeeSubordinatesList.length,
itemBuilder: (BuildContext context, int index) {
var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}');
return Container(
return InkWell(
onTap: () async {
// Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSubordinatesList[index]);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
radius: 25,
backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE)),
backgroundColor: Colors.black,
),
SizedBox(width: 10,),
getEmployeeSubordinatesList[index].eMPLOYEEIMAGE == null
? SvgPicture.asset("assets/images/user.svg",height: 34, width: 34, ).paddingOnly(top: 4)
: Container(
height: 34,
width: 34,
child: CircleAvatar(
radius: 25,
backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE)),
backgroundColor: Colors.black,
).paddingOnly(top: 4),
),
9.width,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// "Present".toText13(color: MyColors.greenColor),
"${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(isBold: true, color: MyColors.grey3AColor),
"${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10(isBold: true, color: MyColors.grey57Color),
"${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor),
"${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10( color: MyColors.grey57Color),
],
).expanded,
Column(
children: [
IconButton(
onPressed: () {
launchUrl(phoneNumber);
},
icon: Icon(
Icons.whatsapp,
color: Colors.green,
),
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER == ""
? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22).paddingOnly(bottom: 23)
:InkWell(
onTap: () {
launchUrl(phoneNumber);
},
child: SvgPicture.asset("assets/images/call.svg", width: 22, height: 22).paddingOnly(bottom: 23),
),
// 21.height,
Icon(Icons.arrow_forward_outlined, color: MyColors.grey3AColor),
],
).expanded,
],
),
).objectContainerView();
).objectContainerView();
}),
],
)

Loading…
Cancel
Save