fix design issues

merge-requests/1/merge
Fatimah Alshammari 3 years ago
parent 8a0f18b741
commit b7685295d9

@ -389,8 +389,10 @@
"itemInfo": "معلومات العنصر", "itemInfo": "معلومات العنصر",
"uploadAttachment": "تحميل المرفق", "uploadAttachment": "تحميل المرفق",
"selectFromGalleryOrOpenCamera": "اختر من المعرض أو فتح الكاميرا", "selectFromGalleryOrOpenCamera": "اختر من المعرض أو فتح الكاميرا",
"openCamera": "فتح\nآلة تصوير", "openCamera": "فتح\nالكاميرا",
"uploadFromGallery": "تحميل من\nصالة عرض", "uploadFromGallery": "تحميل من\nملفات الجهاز",
"name": "الأسم",
"email": "ايميل",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -391,6 +391,8 @@
"selectFromGalleryOrOpenCamera": "Select from gallery or open camera", "selectFromGalleryOrOpenCamera": "Select from gallery or open camera",
"openCamera": "Open\nCamera", "openCamera": "Open\nCamera",
"uploadFromGallery": "Upload from\nGallery", "uploadFromGallery": "Upload from\nGallery",
"name": "Name",
"email": "Email",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -403,6 +403,12 @@ class CodegenLoader extends AssetLoader{
"itemPrice": "سعر السلعة", "itemPrice": "سعر السلعة",
"itemPhotos": "صور البند", "itemPhotos": "صور البند",
"itemInfo": "معلومات العنصر", "itemInfo": "معلومات العنصر",
"uploadAttachment": "تحميل المرفق",
"selectFromGalleryOrOpenCamera": "اختر من المعرض أو فتح الكاميرا",
"openCamera": "فتح\nالكاميرا",
"uploadFromGallery": "تحميل من\nملفات الجهاز",
"name": "الأسم",
"email": "ايميل",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",
@ -826,6 +832,12 @@ static const Map<String,dynamic> en_US = {
"itemPrice": "Item Price", "itemPrice": "Item Price",
"itemPhotos": "Item Photos", "itemPhotos": "Item Photos",
"itemInfo": "Item Info", "itemInfo": "Item Info",
"uploadAttachment": "Upload Attachment",
"selectFromGalleryOrOpenCamera": "Select from gallery or open camera",
"openCamera": "Open\nCamera",
"uploadFromGallery": "Upload from\nGallery",
"name": "Name",
"email": "Email",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -388,6 +388,12 @@ abstract class LocaleKeys {
static const itemPrice = 'itemPrice'; static const itemPrice = 'itemPrice';
static const itemPhotos = 'itemPhotos'; static const itemPhotos = 'itemPhotos';
static const itemInfo = 'itemInfo'; static const itemInfo = 'itemInfo';
static const uploadAttachment = 'uploadAttachment';
static const selectFromGalleryOrOpenCamera = 'selectFromGalleryOrOpenCamera';
static const openCamera = 'openCamera';
static const uploadFromGallery = 'uploadFromGallery';
static const name = 'name';
static const email = 'email';
static const profile_reset_password_label = 'profile.reset_password.label'; static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username'; static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password'; static const profile_reset_password_password = 'profile.reset_password.password';

@ -90,31 +90,30 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
"Absent": getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList!.aBSENTDAYS!.toDouble() : 0, "Absent": getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList!.aBSENTDAYS!.toDouble() : 0,
}; };
return Scaffold( return Scaffold(
appBar: AppBar( backgroundColor: MyColors.backgroundColor,
backgroundColor: MyColors.white,
leading: IconButton(
icon: const Icon(
Icons.arrow_back_ios,
color: MyColors.backgroundBlackColor,
),
onPressed: () => Navigator.pop(context),
),
),
backgroundColor: Colors.white,
body: ListView( body: ListView(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
children: [ children: [
Column( Column(
children: [ children: [
20.height, Container(
Column( color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.attendance.tr().toText24(isBold: true, color: MyColors.darkIconColor), IconButton(
icon: const Icon(
Icons.arrow_back_ios,
color: MyColors.backgroundBlackColor,
),
onPressed: () => Navigator.pop(context),
),
20.height,
LocaleKeys.attendance.tr().toText24(isBold: true, color: MyColors.grey3AColor),
Row( Row(
children: [ children: [
"${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor), "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.greyACColor),
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor), const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
], ],
).onPress(() async { ).onPress(() async {
showMonthPicker( showMonthPicker(
@ -127,15 +126,15 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
searchMonth = getMonth(selectedDate.month); searchMonth = getMonth(selectedDate.month);
searchYear = selectedDate.year; searchYear = selectedDate.year;
formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate); formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate);
// _calendarController.selectedDate = formattedDate;
callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear); callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear);
} }
}); });
}) }),
],
).paddingOnly(left: 21, right: 21),
18.height, 18.height,
AspectRatio(aspectRatio: 333 / 270, child: calendarWidget()).paddingOnly(left: 21, right: 21), AspectRatio(aspectRatio: 304 / 244, child: calendarWidget()),
],
).paddingOnly(left: 21, right: 21, top:40),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
@ -148,18 +147,19 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
optionUI(LocaleKeys.shortageHour.tr(), "${getTimeCardSummaryList?.sHORTAGEHRS != null ? getTimeCardSummaryList!.sHORTAGEHRS : 0}"), optionUI(LocaleKeys.shortageHour.tr(), "${getTimeCardSummaryList?.sHORTAGEHRS != null ? getTimeCardSummaryList!.sHORTAGEHRS : 0}"),
], ],
).paddingOnly(left: 21, right: 21), ).paddingOnly(left: 21, right: 21),
35.height, 38.height,
Container( Container(
width: double.infinity,
height: 227,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: const BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), borderRadius: const BorderRadius.only(
topLeft: Radius.circular(25.0),
topRight: Radius.circular(25.0),
),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
offset: const Offset(0, 2), offset: const Offset(0, 1),
blurRadius: 26, blurRadius: 26,
color: MyColors.darkColor.withOpacity(0.1), color: Color(0xff000014).withOpacity(0.1),
), ),
], ],
), ),
@ -168,12 +168,8 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Column( "${LocaleKeys.attendance.tr()} ${LocaleKeys.stats.tr()}".toSectionHeading(),
children: [ 29.height,
LocaleKeys.attendance.tr().toText12(isBold: true, color: MyColors.grey3AColor),
LocaleKeys.stats.tr().toText24(isBold: true, color: MyColors.grey3AColor),
],
).paddingOnly(left: 21, top: 29, bottom: 36, right: 23),
Row( Row(
children: [ children: [
Container( Container(
@ -184,12 +180,11 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
), ),
), ),
Container( 7.width,
margin: const EdgeInsets.only(left: 5, right: 5), "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList?.aTTENDEDDAYS : 0}".toText16(
child: "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS}".toText16(isBold: true, color: MyColors.lightGreenColor), isBold: true, color: MyColors.lightGreenColor),
),
], ],
).paddingOnly(left: 21, right: 23), ),
8.height, 8.height,
Row( Row(
children: [ children: [
@ -201,23 +196,16 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
), ),
), ),
Container( 7.width,
margin: const EdgeInsets.only(left: 5, right: 5), "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList?.aBSENTDAYS : 0 }".toText16(
child: "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS}".toText16( isBold: true, color: MyColors.backgroundBlackColor,
isBold: true,
color: MyColors.backgroundBlackColor,
),
) )
], ],
).paddingOnly(left: 21, top: 8, right: 23),
],
), ),
Column( ],
crossAxisAlignment: CrossAxisAlignment.start, ).expanded,
children: <Widget>[ 44.width,
Container( AspectRatio(aspectRatio: 1/1,
width: 169,
height: 170,
child: PieChart( child: PieChart(
dataMap: dataMap, dataMap: dataMap,
animationDuration: const Duration(milliseconds: 800), animationDuration: const Duration(milliseconds: 800),
@ -243,11 +231,9 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
color: MyColors.white, color: MyColors.white,
)), )),
), ),
), ).expanded,
],
).paddingOnly(left: 65, top: 27, right: 21, bottom: 28),
], ],
), ).paddingOnly(left: 21, right: 21, top: 29, bottom: 28),
), ),
], ],
), ),
@ -260,14 +246,14 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
return AspectRatio( return AspectRatio(
aspectRatio: 1 / 1, aspectRatio: 1 / 1,
child: Container( child: Container(
padding: const EdgeInsets.only(top: 10, left: 8, right: 8, bottom: 10), padding: const EdgeInsets.only(top: 10, left: 8, right: 8, bottom: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(15),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
offset: const Offset(0, 1), offset: const Offset(0, 1),
blurRadius: 15, blurRadius: 26,
color: MyColors.darkColor.withOpacity(0.1), color: MyColors.darkColor.withOpacity(0.1),
), ),
], ],
@ -304,14 +290,6 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
dayFormat: 'EEE', dayFormat: 'EEE',
showTrailingAndLeadingDates: false, showTrailingAndLeadingDates: false,
showAgenda: false, showAgenda: false,
//navigationDirection: MonthNavigationDirection.vertical,
monthCellStyle: MonthCellStyle(
textStyle: TextStyle(
fontStyle: FontStyle.normal,
fontSize: 13,
color: Colors.white,
),
),
), ),
viewHeaderStyle: const ViewHeaderStyle( viewHeaderStyle: const ViewHeaderStyle(
dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600), dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600),
@ -365,7 +343,7 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
child: Text( child: Text(
"$val", "$val",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 12,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.white, color: MyColors.white,
), ),
@ -398,8 +376,6 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
), ),
); );
} }
} }
return Container( return Container(
margin: const EdgeInsets.all(4), margin: const EdgeInsets.all(4),
@ -419,15 +395,11 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
"$val", "$val",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w600,
color: Color(0xff1F2428), color: Color(0xff1F2428),
), ),
), ),
); );
// return Container(
// alignment: Alignment.center,
// child: Text("$val"),
// );
} else { } else {
return const SizedBox(); return const SizedBox();
} }
@ -468,11 +440,11 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
return Column( return Column(
children: [ children: [
Container( Container(
width: 75, width: 49,
height: 7, height: 7,
margin: const EdgeInsets.symmetric(vertical: 10), margin: const EdgeInsets.symmetric(vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(25),
color: MyColors.darkGreyColor, color: MyColors.darkGreyColor,
), ),
), ),
@ -483,196 +455,146 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
itemBuilder: (_, i) => Container( itemBuilder: (_, i) => Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(35.0), top: Radius.circular(25.0),
), ),
color: MyColors.backgroundBlackColor, color: MyColors.backgroundBlackColor,
), ),
child: Column( child: Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( "${DateFormat("MMMM-dd-yyyy").format(dateTime1).replaceAll('-', " ")}".toText24(isBold: true, color: Colors.white),
child: "${DateFormat("MMMM-dd-yyyy").format(dateTime1).replaceAll('-', " ")}".toText24(isBold: true, color: Colors.white), LocaleKeys.attendanceDetails.tr().toText16(color: MyColors.greyACColor),
).paddingOnly(top: 26, left: 21, right: 21), 12.height,
Container( CircularStepProgressBar(
child: LocaleKeys.attendanceDetails.tr().toText16(color: MyColors.greyACColor).paddingOnly(left: 21, bottom: 16),
),
Center(
child: CircularStepProgressBar(
totalSteps: 16 * 4, totalSteps: 16 * 4,
currentStep: percentage, currentStep: percentage,
width: 210, width: 224,
height: 210, height: 236,
selectedColor: MyColors.gradiantEndColor, selectedColor: MyColors.gradiantEndColor,
unselectedColor: MyColors.grey70Color, unselectedColor: MyColors.grey70Color,
child: Center(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
"${getScheduleShiftsDetailsList!.pERCENTAGE}".toText44(color: Colors.white, isBold: true), "${getScheduleShiftsDetailsList!.pERCENTAGE}".toText44(color: Colors.white, isBold: true),
LocaleKeys.completed.tr().toText11(color: MyColors.greyACColor), LocaleKeys.completed.tr().toText11(color: MyColors.greyACColor),
19.height, 28.height,
LocaleKeys.shiftTime.tr().toText11(color: MyColors.greyACColor), LocaleKeys.shiftTime.tr().toText11(color: MyColors.greyACColor),
"${getScheduleShiftsDetailsList!.sHTNAME}".toText22(color: Colors.white, isBold: true), "${getScheduleShiftsDetailsList!.sHTNAME}".toText22(color: Colors.white, isBold: true),
], ],
), ).center,
), ).center,
), ],
), ).paddingOnly(left: 21, right: 21, top: 27, bottom: 37),
Container(
padding: const EdgeInsets.only(top: 20, bottom: 20),
),
Stack( Stack(
children: [ children: [
Container(
height: 5,
padding: const EdgeInsets.only(top: 24, bottom: 24),
color: MyColors.backgroundBlackColor,
),
Container( Container(
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white), decoration: const BoxDecoration(
padding: const EdgeInsets.only(left: 21, right: 21, top: 28, bottom: 24), borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
padding: const EdgeInsets.only(left: 31, right: 31, top: 30, bottom: 29),
child: Column( child: Column(
children: [ children: [
Row( Row(
children: [ children: [
Container( Column(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.actualCheckIn.tr().toText11( LocaleKeys.actualCheckIn.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color,
),
8.height,
"${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}" != "" "${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}" != ""
? "${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}".toText22(color: Colors.black, isBold: true) ? "${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}".toText22(color: Colors.black, isBold: true)
: "__".toText22(color: Colors.black, isBold: true), : "__".toText22(color: Colors.black, isBold: true),
], ],
), ).expanded,
),
40.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.actualCheckOut.tr().toText11( LocaleKeys.actualCheckOut.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color,
),
8.height,
"${getScheduleShiftsDetailsList!.sHTACTUALENDTIME}" != "" "${getScheduleShiftsDetailsList!.sHTACTUALENDTIME}" != ""
? "${getScheduleShiftsDetailsList!.sHTACTUALENDTIME}".toText22(color: Colors.black, isBold: true) ? "${getScheduleShiftsDetailsList!.sHTACTUALENDTIME}".toText22(color: Colors.black, isBold: true)
: "__".toText22(color: Colors.black, isBold: true), : "__".toText22(color: Colors.black, isBold: true),
], ],
), ).expanded,
], ],
), ),
25.height, 25.height,
const Divider( const Divider(
height: 1, height: 1,
thickness: 1, thickness: 1,
color: MyColors.whiteColor, color: MyColors.lightGreyEFColor,
), ),
25.height, 25.height,
Row( Row(
children: [ children: [
Container( Column(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.approvedCheckIn.tr().toText11( LocaleKeys.approvedCheckIn.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color,
),
8.height,
"${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}" != "" "${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}" != ""
? "${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}".toText22(color: MyColors.greenColor, isBold: true) ? "${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}".toText22(color: MyColors.greenColor, isBold: true)
: "__".toText22(color: MyColors.greenColor, isBold: true), : "__".toText22(color: MyColors.greenColor, isBold: true),
], ],
), ).expanded,
),
30.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.approvedCheckOut.tr().toText11( LocaleKeys.approvedCheckOut.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color,
),
8.height,
"${getScheduleShiftsDetailsList!.aPPROVEDENDTIME}" != "" "${getScheduleShiftsDetailsList!.aPPROVEDENDTIME}" != ""
? "${getScheduleShiftsDetailsList!.aPPROVEDENDTIME}".toText22(color: MyColors.greenColor, isBold: true) ? "${getScheduleShiftsDetailsList!.aPPROVEDENDTIME}".toText22(color: MyColors.greenColor, isBold: true)
: "__".toText22(color: MyColors.greenColor, isBold: true), : "__".toText22(color: MyColors.greenColor, isBold: true),
], ],
), ).expanded,
], ],
), ),
25.height, 25.height,
const Divider( const Divider(
height: 1, height: 1,
thickness: 1, thickness: 1,
color: MyColors.whiteColor, color: MyColors.lightGreyEFColor,
), ),
25.height, 25.height,
Row( Row(
children: [ children: [
Container( Column(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.lateIn.tr().toText11( LocaleKeys.lateIn.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color,
),
8.height,
"${getDayHoursTypeDetailsList[index].lATEINHRS}".toText22(color: MyColors.redColor, isBold: true), "${getDayHoursTypeDetailsList[index].lATEINHRS}".toText22(color: MyColors.redColor, isBold: true),
], ],
), ).expanded,
),
80.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.excess.tr().toText11( LocaleKeys.excess.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color, "${getDayHoursTypeDetailsList[index].eXCESSHRS}".toText22(color: MyColors.backgroundBlackColor, isBold: true),
),
8.height,
"${getDayHoursTypeDetailsList[index].eXCESSHRS}".toText22(color: Colors.black, isBold: true),
], ],
), ).expanded,
], ],
), ),
25.height, 25.height,
const Divider( const Divider(
height: 1, height: 1,
thickness: 1, thickness: 1,
color: MyColors.whiteColor, color: MyColors.lightGreyEFColor,
), ),
25.height, 25.height,
Row( Row(
children: [ children: [
Container( Column(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.shortage.tr().toText11( LocaleKeys.shortage.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color, "${getDayHoursTypeDetailsList[index].sHORTAGEHRS}".toText22(color: MyColors.backgroundBlackColor, isBold: true),
),
8.height,
"${getDayHoursTypeDetailsList[index].sHORTAGEHRS}".toText22(color: Colors.black, isBold: true),
], ],
), ).expanded,
),
80.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.earlyOut.tr().toText11( LocaleKeys.earlyOut.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color,
),
8.height,
"${getDayHoursTypeDetailsList[index].eARLYOUTHRS}".toText22(color: Colors.black, isBold: true), "${getDayHoursTypeDetailsList[index].eARLYOUTHRS}".toText22(color: Colors.black, isBold: true),
], ],
), ).expanded,
], ],
), ),
], ],

@ -67,7 +67,7 @@ class _MyTeamState extends State<MyTeam> {
Row( Row(
children: [ children: [
TextField( TextField(
onChanged: dropdownValue == "Name" onChanged: dropdownValue == "name"
? (String value) { ? (String value) {
getEmployeeSListOnSearch = getEmployeeSListOnSearch =
getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEENAME!.toLowerCase().contains(value.toLowerCase())).toList(); getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEENAME!.toLowerCase().contains(value.toLowerCase())).toList();
@ -180,8 +180,7 @@ class _MyTeamState extends State<MyTeam> {
} }
// todo @fatima add translation for below list // todo @fatima add translation for below list
List<String> list = ["Name", "Email"]; List<String> list = [LocaleKeys.name.tr(), LocaleKeys.email.tr()];
Widget dropDown() { Widget dropDown() {
return PopupMenuButton( return PopupMenuButton(
itemBuilder: (_) => <PopupMenuItem<int>>[ itemBuilder: (_) => <PopupMenuItem<int>>[

@ -88,88 +88,58 @@ class _ViewAttendanceState extends State<ViewAttendance> {
title: LocaleKeys.viewAttendance.tr(), title: LocaleKeys.viewAttendance.tr(),
), ),
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: SingleChildScrollView( body: ListView(
child: Column(children: [ children: [
Container( Container(
width: double.infinity, margin: EdgeInsets.all(21),
margin: EdgeInsets.only(
top: 21,
left: 21,
right: 21,
),
padding: EdgeInsets.only(left: 14, right: 14, top: 15, bottom: 15),
// height: 120,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 26,
offset: Offset(0, 3),
),
],
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
),
child: Column( child: Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.todayAttendance.tr().toText16(isBold: true, color: MyColors.darkColor), LocaleKeys.todayAttendance.tr().toText16(color: MyColors.darkTextColor),
SizedBox( 7.height,
height: 10,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Column( Column( crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.checkIn.tr().toText10(isBold: true, color: MyColors.green69Color), LocaleKeys.checkIn.tr().toText10(color: MyColors.green69Color),
"${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), "${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".toText14(color: MyColors.grey57Color),
], ],
), ).expanded,
Row(
children: [
Container(height: 30, width: 1, color: const Color(0xffF0F0F0)),
11.width,
Column( Column(
children: [ children: [
LocaleKeys.checkOut.tr().toText10(isBold: true, color: MyColors.redA3Color), LocaleKeys.checkOut.tr().toText10(color: MyColors.redA3Color),
"${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), "${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText14( color: MyColors.grey57Color),
], ],
), ),
],
).expanded,
Row(
children: [
Container(height: 30, width: 1, color: const Color(0xffF0F0F0)),
11.width,
Column( Column(
children: [ children: [
LocaleKeys.lateIn.tr().toText10(isBold: true, color: MyColors.darkGreyColor), LocaleKeys.lateIn.tr().toText10(color: MyColors.darkGreyColor),
"${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), "${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText14(color: MyColors.grey57Color),
], ],
), ),
], ],
) ).expanded,
], ],
), )
),
Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 18,
left: 18,
right: 18,
bottom: 28,
),
padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 16),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 26,
offset: Offset(0, 3),
),
], ],
color: Colors.white, ).paddingOnly(top:15, left: 14, right: 14, bottom: 20).objectContainerView(disablePadding: true, radius: 10,),
borderRadius: BorderRadius.circular(10.0), 12.height,
),
child: Column(
children: [
//20.height,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
children: [ children: [
@ -190,37 +160,30 @@ class _ViewAttendanceState extends State<ViewAttendance> {
callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear); callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear);
} }
}); });
}) }),
], 8.height,
), AspectRatio(aspectRatio: 304 / 244, child: calendarWidget()),
18.height, // 45.height,
AspectRatio(aspectRatio: 333 / 270, child: calendarWidget()),
Row( Row(
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Column( "${LocaleKeys.attendance.tr()} ${LocaleKeys.stats.tr()}".toSectionHeading(),
children: [ 29.height,
LocaleKeys.attendance.tr().toText12(isBold: true, color: MyColors.grey3AColor),
LocaleKeys.stats.tr().toText24(isBold: true, color: MyColors.grey3AColor),
],
),
30.height,
Row( Row(
children: [ children: [
Container( Container(
height: 8, height: 9,
width: 8, width: 9,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MyColors.lightGreenColor, color: MyColors.lightGreenColor,
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
), ),
), ),
Container( 7.width,
margin: const EdgeInsets.only(left: 5, right: 5), "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList?.aTTENDEDDAYS : 0}".toText16(
child: "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList?.aTTENDEDDAYS : 0}".toText16(isBold: true, color: MyColors.lightGreenColor), isBold: true, color: MyColors.lightGreenColor),
),
], ],
), ),
8.height, 8.height,
@ -234,26 +197,16 @@ class _ViewAttendanceState extends State<ViewAttendance> {
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
), ),
), ),
Container( 7.width,
margin: const EdgeInsets.only(left: 5, right: 5), "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList?.aBSENTDAYS : 0 }".toText16(
child: "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList?.aBSENTDAYS : 0 }".toText16( isBold: true, color: MyColors.backgroundBlackColor,
isBold: true,
color: MyColors.backgroundBlackColor,
),
) )
], ],
), ),
], ],
), ).expanded,
SizedBox( 44.width,
width: 20, AspectRatio(aspectRatio: 1/1,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: 170,
height: 170,
child: PieChart( child: PieChart(
dataMap: dataMap, dataMap: dataMap,
animationDuration: const Duration(milliseconds: 800), animationDuration: const Duration(milliseconds: 800),
@ -279,15 +232,15 @@ class _ViewAttendanceState extends State<ViewAttendance> {
color: MyColors.white, color: MyColors.white,
)), )),
), ),
), ).expanded,
],
).paddingOnly(left: 21, right: 21, bottom: 21),
], ],
), ),
], ],
).paddingOnly(top:17, left: 14, right: 14, bottom: 35).objectContainerView(disablePadding: true, radius: 10,),
]
), ),
), ),
]), ]
), ),
); );
} }
@ -315,16 +268,9 @@ class _ViewAttendanceState extends State<ViewAttendance> {
dayFormat: 'EEE', dayFormat: 'EEE',
showTrailingAndLeadingDates: false, showTrailingAndLeadingDates: false,
showAgenda: false, showAgenda: false,
monthCellStyle: MonthCellStyle(
textStyle: TextStyle(
fontStyle: FontStyle.normal,
fontSize: 13,
color: Colors.white,
),
),
), ),
viewHeaderStyle: const ViewHeaderStyle( viewHeaderStyle: const ViewHeaderStyle(
dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600), dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 12, fontWeight: FontWeight.w600),
), ),
monthCellBuilder: (build, details) { monthCellBuilder: (build, details) {
if (details.date.month == formattedDate.month && details.date.year == formattedDate.year) { if (details.date.month == formattedDate.month && details.date.year == formattedDate.year) {
@ -342,7 +288,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
child: Text( child: Text(
"$val", "$val",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 11,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.greyA5Color, color: MyColors.greyA5Color,
), ),
@ -373,7 +319,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
child: Text( child: Text(
"$val", "$val",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 11,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.white, color: MyColors.white,
), ),
@ -399,7 +345,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
child: Text( child: Text(
"$val", "$val",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 11,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.white, color: MyColors.white,
), ),
@ -424,8 +370,8 @@ class _ViewAttendanceState extends State<ViewAttendance> {
child: Text( child: Text(
"$val", "$val",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 10,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w600,
color: Color(0xff1F2428), color: Color(0xff1F2428),
), ),
), ),

@ -78,43 +78,26 @@ class _FamilyMembersState extends State<FamilyMembers> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
// todo @faitma clean below logic and write clean code. // todo @faitma clean below logic and write clean code.
menuEntries.updateButton == 'Y' RichText(
? InkWell( text: TextSpan(
children: [
WidgetSpan(
child: menuEntries.updateButton == 'Y'
?InkWell(
onTap: () async { onTap: () async {
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt(); relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt();
showUpdateAlertDialog(context, relationId!.toInt(), 2, LocaleKeys.update.tr()); showUpdateAlertDialog(context, relationId!.toInt(), 2, LocaleKeys.update.tr());
}, },
child: RichText( child: Icon(Icons.edit, size: 14, color: MyColors.grey67Color,
text: TextSpan(
children: [
const WidgetSpan(
child: Icon(
Icons.edit,
size: 15,
color: MyColors.grey67Color,
),
),
TextSpan(
text: LocaleKeys.update.tr(),
style: const TextStyle(color: MyColors.grey67Color, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
),
],
),
), ),
) )
: RichText( :Icon(Icons.edit, size: 14, color: MyColors.lightGreyColor,
text: TextSpan(
children: [
const WidgetSpan(
child: Icon(
Icons.edit,
size: 15,
color: MyColors.lightGreyColor,
), ),
), ),
TextSpan( TextSpan(
text: LocaleKeys.update.tr(), text: LocaleKeys.update.tr(),
style: const TextStyle(color: MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), style: menuEntries.updateButton == 'Y'? TextStyle(color: MyColors.grey67Color, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600)
:TextStyle(color: MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
), ),
], ],
), ),
@ -130,10 +113,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
children: [ children: [
const WidgetSpan( const WidgetSpan(
child: Icon( child: Icon(
Icons.delete, Icons.delete, size: 15, color: MyColors.redColor,),
size: 15,
color: MyColors.redColor,
),
), ),
TextSpan( TextSpan(
text: LocaleKeys.remove.tr(), text: LocaleKeys.remove.tr(),

Loading…
Cancel
Save