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,52 +90,51 @@ 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,
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
LocaleKeys.attendance.tr().toText24(isBold: true, color: MyColors.darkIconColor), children: [
Row( IconButton(
children: [ icon: const Icon(
"${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor), Icons.arrow_back_ios,
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor), color: MyColors.backgroundBlackColor,
], ),
).onPress(() async { onPressed: () => Navigator.pop(context),
showMonthPicker( ),
context: context, //locale: EasyLocalization.of(context)?.locale, 20.height,
initialDate: formattedDate, LocaleKeys.attendance.tr().toText24(isBold: true, color: MyColors.grey3AColor),
firstDate: DateTime(searchYear - 2), Row(
lastDate: DateTime.now(), children: [
).then((selectedDate) { "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.greyACColor),
if (selectedDate != null) { const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
searchMonth = getMonth(selectedDate.month); ],
searchYear = selectedDate.year; ).onPress(() async {
formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate); showMonthPicker(
// _calendarController.selectedDate = formattedDate; context: context, //locale: EasyLocalization.of(context)?.locale,
callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear); initialDate: formattedDate,
} firstDate: DateTime(searchYear - 2),
}); lastDate: DateTime.now(),
}) ).then((selectedDate) {
], if (selectedDate != null) {
).paddingOnly(left: 21, right: 21), searchMonth = getMonth(selectedDate.month);
18.height, searchYear = selectedDate.year;
AspectRatio(aspectRatio: 333 / 270, child: calendarWidget()).paddingOnly(left: 21, right: 21), formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate);
callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear);
}
});
}),
18.height,
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,53 +196,44 @@ 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,
children: <Widget>[
Container(
width: 169,
height: 170,
child: PieChart(
dataMap: dataMap,
animationDuration: const Duration(milliseconds: 800),
chartLegendSpacing: 0,
chartRadius: MediaQuery.of(context).size.width / 5.2,
colorList: _colorList,
initialAngleInDegree: 0,
chartType: ChartType.ring,
ringStrokeWidth: 80,
legendOptions: const LegendOptions(
showLegendsInRow: false,
showLegends: false,
),
chartValuesOptions: const ChartValuesOptions(
showChartValueBackground: false,
showChartValues: true,
showChartValuesInPercentage: true,
showChartValuesOutside: false,
decimalPlaces: 1,
chartValueStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: MyColors.white,
)),
),
), ),
], ],
).paddingOnly(left: 65, top: 27, right: 21, bottom: 28), ).expanded,
44.width,
AspectRatio(aspectRatio: 1/1,
child: PieChart(
dataMap: dataMap,
animationDuration: const Duration(milliseconds: 800),
chartLegendSpacing: 0,
chartRadius: MediaQuery.of(context).size.width / 5.2,
colorList: _colorList,
initialAngleInDegree: 0,
chartType: ChartType.ring,
ringStrokeWidth: 80,
legendOptions: const LegendOptions(
showLegendsInRow: false,
showLegends: false,
),
chartValuesOptions: const ChartValuesOptions(
showChartValueBackground: false,
showChartValues: true,
showChartValuesInPercentage: true,
showChartValuesOutside: false,
decimalPlaces: 1,
chartValueStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: MyColors.white,
)),
),
).expanded,
], ],
), ).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(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Column(
child: "${DateFormat("MMMM-dd-yyyy").format(dateTime1).replaceAll('-', " ")}".toText24(isBold: true, color: Colors.white), crossAxisAlignment: CrossAxisAlignment.start,
).paddingOnly(top: 26, left: 21, right: 21), children: [
Container( "${DateFormat("MMMM-dd-yyyy").format(dateTime1).replaceAll('-', " ")}".toText24(isBold: true, color: Colors.white),
child: LocaleKeys.attendanceDetails.tr().toText16(color: MyColors.greyACColor).paddingOnly(left: 21, bottom: 16), LocaleKeys.attendanceDetails.tr().toText16(color: MyColors.greyACColor),
), 12.height,
Center( CircularStepProgressBar(
child: CircularStepProgressBar( totalSteps: 16 * 4,
totalSteps: 16 * 4, currentStep: percentage,
currentStep: percentage, width: 224,
width: 210, height: 236,
height: 210, 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(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.actualCheckIn.tr().toText11(
color: MyColors.grey67Color,
),
8.height,
"${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}" != ""
? "${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}".toText22(color: Colors.black, isBold: true)
: "__".toText22(color: Colors.black, isBold: true),
],
),
),
40.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.actualCheckOut.tr().toText11( LocaleKeys.actualCheckIn.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color, "${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}" != ""
), ? "${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}".toText22(color: Colors.black, isBold: true)
8.height, : "__".toText22(color: Colors.black, isBold: true),
],
).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.actualCheckOut.tr().toText11(color: MyColors.grey67Color,),
"${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(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.approvedCheckIn.tr().toText11(
color: MyColors.grey67Color,
),
8.height,
"${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}" != ""
? "${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}".toText22(color: MyColors.greenColor, isBold: true)
: "__".toText22(color: MyColors.greenColor, isBold: true),
],
),
),
30.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.approvedCheckOut.tr().toText11( LocaleKeys.approvedCheckIn.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color, "${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}" != ""
), ? "${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}".toText22(color: MyColors.greenColor, isBold: true)
8.height, : "__".toText22(color: MyColors.greenColor, isBold: true),
],
).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.approvedCheckOut.tr().toText11(color: MyColors.grey67Color,),
"${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(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.lateIn.tr().toText11(
color: MyColors.grey67Color,
),
8.height,
"${getDayHoursTypeDetailsList[index].lATEINHRS}".toText22(color: MyColors.redColor, isBold: true),
],
),
),
80.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.excess.tr().toText11( LocaleKeys.lateIn.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color, "${getDayHoursTypeDetailsList[index].lATEINHRS}".toText22(color: MyColors.redColor, isBold: true),
),
8.height,
"${getDayHoursTypeDetailsList[index].eXCESSHRS}".toText22(color: Colors.black, isBold: true),
], ],
), ).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.excess.tr().toText11(color: MyColors.grey67Color,),
"${getDayHoursTypeDetailsList[index].eXCESSHRS}".toText22(color: MyColors.backgroundBlackColor, 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(
margin: const EdgeInsets.only(right: 30, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.shortage.tr().toText11(
color: MyColors.grey67Color,
),
8.height,
"${getDayHoursTypeDetailsList[index].sHORTAGEHRS}".toText22(color: Colors.black, isBold: true),
],
),
),
80.width,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.earlyOut.tr().toText11( LocaleKeys.shortage.tr().toText11(color: MyColors.grey67Color,),
color: MyColors.grey67Color, "${getDayHoursTypeDetailsList[index].sHORTAGEHRS}".toText22(color: MyColors.backgroundBlackColor, isBold: true),
), ],
8.height, ).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.earlyOut.tr().toText11(color: MyColors.grey67Color,),
"${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,206 +88,159 @@ 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( child: Column(
top: 21, children: [
left: 21, Column(
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(
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: [
LocaleKeys.checkIn.tr().toText10(isBold: true, color: MyColors.green69Color),
"${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color),
],
),
Column(
children: [
LocaleKeys.checkOut.tr().toText10(isBold: true, color: MyColors.redA3Color),
"${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color),
],
),
Column(
children: [ children: [
LocaleKeys.lateIn.tr().toText10(isBold: true, color: MyColors.darkGreyColor), LocaleKeys.checkIn.tr().toText10(color: MyColors.green69Color),
"${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), "${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".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,
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
children: [
//20.height,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row( Row(
children: [ children: [
"${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor), Container(height: 30, width: 1, color: const Color(0xffF0F0F0)),
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor), 11.width,
],
).onPress(() async {
showMonthPicker(
context: context, //locale: EasyLocalization.of(context)?.locale,
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
).then((selectedDate) {
if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month);
searchYear = selectedDate.year;
formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate);
callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear);
}
});
})
],
),
18.height,
AspectRatio(aspectRatio: 333 / 270, child: calendarWidget()),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column( Column(
children: [ children: [
LocaleKeys.attendance.tr().toText12(isBold: true, color: MyColors.grey3AColor), LocaleKeys.checkOut.tr().toText10(color: MyColors.redA3Color),
LocaleKeys.stats.tr().toText24(isBold: true, color: MyColors.grey3AColor), "${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText14( color: MyColors.grey57Color),
], ],
), ),
30.height, ],
Row( ).expanded,
Row(
children: [
Container(height: 30, width: 1, color: const Color(0xffF0F0F0)),
11.width,
Column(
children: [ children: [
Container( LocaleKeys.lateIn.tr().toText10(color: MyColors.darkGreyColor),
height: 8, "${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText14(color: MyColors.grey57Color),
width: 8,
decoration: BoxDecoration(
color: MyColors.lightGreenColor,
borderRadius: BorderRadius.circular(100),
),
),
Container(
margin: const EdgeInsets.only(left: 5, right: 5),
child: "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList?.aTTENDEDDAYS : 0}".toText16(isBold: true, color: MyColors.lightGreenColor),
),
], ],
), ),
8.height, ],
Row( ).expanded,
children: [ ],
Container( )
height: 9, ],
width: 9, ).paddingOnly(top:15, left: 14, right: 14, bottom: 20).objectContainerView(disablePadding: true, radius: 10,),
decoration: BoxDecoration( 12.height,
color: MyColors.backgroundBlackColor, Column(
borderRadius: BorderRadius.circular(100), children: [
Row(
children: [
"${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor),
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor),
],
).onPress(() async {
showMonthPicker(
context: context, //locale: EasyLocalization.of(context)?.locale,
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
).then((selectedDate) {
if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month);
searchYear = selectedDate.year;
formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate);
callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear);
}
});
}),
8.height,
AspectRatio(aspectRatio: 304 / 244, child: calendarWidget()),
// 45.height,
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
"${LocaleKeys.attendance.tr()} ${LocaleKeys.stats.tr()}".toSectionHeading(),
29.height,
Row(
children: [
Container(
height: 9,
width: 9,
decoration: BoxDecoration(
color: MyColors.lightGreenColor,
borderRadius: BorderRadius.circular(100),
),
), ),
), 7.width,
Container( "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList?.aTTENDEDDAYS : 0}".toText16(
margin: const EdgeInsets.only(left: 5, right: 5), isBold: true, color: MyColors.lightGreenColor),
child: "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList?.aBSENTDAYS : 0 }".toText16( ],
isBold: true, ),
color: MyColors.backgroundBlackColor, 8.height,
Row(
children: [
Container(
height: 9,
width: 9,
decoration: BoxDecoration(
color: MyColors.backgroundBlackColor,
borderRadius: BorderRadius.circular(100),
),
), ),
) 7.width,
], "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList?.aBSENTDAYS : 0 }".toText16(
), isBold: true, color: MyColors.backgroundBlackColor,
], )
), ],
SizedBox( ),
width: 20, ],
), ).expanded,
Column( 44.width,
crossAxisAlignment: CrossAxisAlignment.start, AspectRatio(aspectRatio: 1/1,
children: <Widget>[ child: PieChart(
Container( dataMap: dataMap,
width: 170, animationDuration: const Duration(milliseconds: 800),
height: 170, chartLegendSpacing: 0,
child: PieChart( chartRadius: MediaQuery.of(context).size.width / 5.2,
dataMap: dataMap, colorList: _colorList,
animationDuration: const Duration(milliseconds: 800), initialAngleInDegree: 0,
chartLegendSpacing: 0, chartType: ChartType.ring,
chartRadius: MediaQuery.of(context).size.width / 5.2, ringStrokeWidth: 80,
colorList: _colorList, legendOptions: const LegendOptions(
initialAngleInDegree: 0, showLegendsInRow: false,
chartType: ChartType.ring, showLegends: false,
ringStrokeWidth: 80,
legendOptions: const LegendOptions(
showLegendsInRow: false,
showLegends: false,
),
chartValuesOptions: const ChartValuesOptions(
showChartValueBackground: false,
showChartValues: true,
showChartValuesInPercentage: true,
showChartValuesOutside: false,
decimalPlaces: 1,
chartValueStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: MyColors.white,
)),
), ),
chartValuesOptions: const ChartValuesOptions(
showChartValueBackground: false,
showChartValues: true,
showChartValuesInPercentage: true,
showChartValuesOutside: false,
decimalPlaces: 1,
chartValueStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
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,47 +78,30 @@ 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(
onTap: () async { children: [
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt(); WidgetSpan(
showUpdateAlertDialog(context, relationId!.toInt(), 2, LocaleKeys.update.tr()); child: menuEntries.updateButton == 'Y'
}, ?InkWell(
child: RichText( onTap: () async {
text: TextSpan( relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt();
children: [ showUpdateAlertDialog(context, relationId!.toInt(), 2, LocaleKeys.update.tr());
const WidgetSpan( },
child: Icon( child: Icon(Icons.edit, size: 14, color: MyColors.grey67Color,
Icons.edit,
size: 15,
color: MyColors.grey67Color,
), ),
), )
TextSpan( :Icon(Icons.edit, size: 14, color: MyColors.lightGreyColor,
text: LocaleKeys.update.tr(),
style: const TextStyle(color: MyColors.grey67Color, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
),
],
),
),
)
: RichText(
text: TextSpan(
children: [
const WidgetSpan(
child: Icon(
Icons.edit,
size: 15,
color: MyColors.lightGreyColor,
),
), ),
TextSpan( ),
text: LocaleKeys.update.tr(), TextSpan(
style: const TextStyle(color: MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), text: LocaleKeys.update.tr(),
), 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),
), ),
],
), ),
),
Container(height: 35, width: 1, color: const Color(0xffEFEFEF)), Container(height: 35, width: 1, color: const Color(0xffEFEFEF)),
InkWell( InkWell(
onTap: () { onTap: () {
@ -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