|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:easy_localization/src/public_ext.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/painting.dart';
|
|
|
|
|
@ -26,8 +27,12 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
bool isMissingDays = true;
|
|
|
|
|
bool isOffDays = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DateTime date = DateTime.now();
|
|
|
|
|
late var formattedDate;
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
formattedDate = DateFormat('d-MMM-yy').format(date);
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -61,14 +66,16 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Attendance".toText24(isBold: true, color: MyColors.darkIconColor),
|
|
|
|
|
LocaleKeys.attendance
|
|
|
|
|
.tr().toText24(isBold: true, color: MyColors.darkIconColor),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
"June 13, 2021".toText16(color: MyColors.greyACColor),
|
|
|
|
|
Text(formattedDate),
|
|
|
|
|
// "June 13, 2021".toText16(color: MyColors.greyACColor),
|
|
|
|
|
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
|
|
|
|
|
],
|
|
|
|
|
).onPress(() {
|
|
|
|
|
showDatePicker(
|
|
|
|
|
).onPress(() async {
|
|
|
|
|
await showDatePicker(
|
|
|
|
|
context: context,
|
|
|
|
|
initialDate: DateTime.now(),
|
|
|
|
|
firstDate: DateTime(2021),
|
|
|
|
|
@ -87,7 +94,14 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
child: child!,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
).then((selectedDate) {
|
|
|
|
|
if (selectedDate != null) {
|
|
|
|
|
setState(() {
|
|
|
|
|
date = selectedDate;
|
|
|
|
|
formattedDate = DateFormat('d-MMM-yy').format(selectedDate);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
).paddingOnly(left: 21, right: 21),
|
|
|
|
|
@ -96,13 +110,16 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
optionUI("Schedule\nDays", "16"),
|
|
|
|
|
optionUI(LocaleKeys.scheduleDays.tr(), "16"),
|
|
|
|
|
6.width,
|
|
|
|
|
optionUI("Off\nDays", "0"),
|
|
|
|
|
optionUI(LocaleKeys.offDays
|
|
|
|
|
.tr(), "0"),
|
|
|
|
|
6.width,
|
|
|
|
|
optionUI("Non\nAnalyzed", "0"),
|
|
|
|
|
optionUI(LocaleKeys.nonAnalyzed
|
|
|
|
|
.tr(), "0"),
|
|
|
|
|
6.width,
|
|
|
|
|
optionUI("Shortage\nHour", "6"),
|
|
|
|
|
optionUI(LocaleKeys.shortageHour
|
|
|
|
|
.tr(), "6"),
|
|
|
|
|
],
|
|
|
|
|
).paddingOnly(left: 21, right: 21),
|
|
|
|
|
35.height,
|
|
|
|
|
@ -127,8 +144,10 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
"Attendance".toText12(isBold: true, color: MyColors.grey3AColor),
|
|
|
|
|
"Stats".toText24(isBold: true, color: MyColors.grey3AColor),
|
|
|
|
|
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),
|
|
|
|
|
Row(
|
|
|
|
|
@ -143,7 +162,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: const EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
child: "PRESENT 16".toText16(isBold: true, color: MyColors.lightGreenColor),
|
|
|
|
|
child: LocaleKeys.present
|
|
|
|
|
.tr().toText16(isBold: true, color: MyColors.lightGreenColor),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).paddingOnly(left: 21, right: 23),
|
|
|
|
|
@ -160,7 +180,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: const EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
child: "ABSENT 04".toText16(
|
|
|
|
|
child: LocaleKeys.absent
|
|
|
|
|
.tr().toText16(
|
|
|
|
|
isBold: true,
|
|
|
|
|
color: MyColors.backgroundBlackColor,
|
|
|
|
|
),
|
|
|
|
|
@ -432,9 +453,11 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
"99%".toText44(color: Colors.white, isBold: true),
|
|
|
|
|
"Completed".tr().toText11(color: MyColors.greyACColor),
|
|
|
|
|
LocaleKeys.completed
|
|
|
|
|
.tr().toText11(color: MyColors.greyACColor),
|
|
|
|
|
19.height,
|
|
|
|
|
"Shift Time".tr().toText11(color: MyColors.greyACColor),
|
|
|
|
|
LocaleKeys.shiftTime
|
|
|
|
|
.tr().toText11(color: MyColors.greyACColor),
|
|
|
|
|
"08:00 - 17:00".toText22(color: Colors.white, isBold: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -464,7 +487,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Actual Check In ".tr().toText11(
|
|
|
|
|
LocaleKeys.actualCheckIn
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -476,7 +500,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Actual Check Out".tr().toText11(
|
|
|
|
|
LocaleKeys.actualCheckOut
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -499,7 +524,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Approved Check In".tr().toText11(
|
|
|
|
|
LocaleKeys.approvedCheckIn
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -511,7 +537,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Approved Check Out".tr().toText11(
|
|
|
|
|
LocaleKeys.approvedCheckOut
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -534,7 +561,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Late In".tr().toText11(
|
|
|
|
|
LocaleKeys.lateIn
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -546,7 +574,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Excess".tr().toText11(
|
|
|
|
|
LocaleKeys.excess
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -569,7 +598,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Shortage".tr().toText11(
|
|
|
|
|
LocaleKeys.shortage
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -581,7 +611,8 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Early Out".tr().toText11(
|
|
|
|
|
LocaleKeys.earlyOut
|
|
|
|
|
.tr().toText11(
|
|
|
|
|
color: MyColors.grey67Color,
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
|