@ -14,8 +14,8 @@ import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.
import ' package:mohem_flutter_app/models/get_time_card_summary_list_model.dart ' ;
import ' package:mohem_flutter_app/models/get_time_card_summary_list_model.dart ' ;
import ' package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart ' ;
import ' package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart ' ;
import ' package:mohem_flutter_app/widgets/app_bar_widget.dart ' ;
import ' package:mohem_flutter_app/widgets/app_bar_widget.dart ' ;
import ' package:month_picker_dialog_2/month_picker_dialog_2.dart ' ;
import ' package:mohem_flutter_app/widgets/circular_step_progress_bar.dart ' ;
import ' package:mohem_flutter_app/widgets/circular_step_progress_bar.dart ' ;
import ' package:month_picker_dialog_2/month_picker_dialog_2.dart ' ;
import ' package:pie_chart/pie_chart.dart ' ;
import ' package:pie_chart/pie_chart.dart ' ;
import ' package:syncfusion_flutter_calendar/calendar.dart ' ;
import ' package:syncfusion_flutter_calendar/calendar.dart ' ;
@ -405,6 +405,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
) ;
) ;
}
}
void calendarTapped ( CalendarTapDetails details ) async {
void calendarTapped ( CalendarTapDetails details ) async {
dynamic index = details . date ? . day ;
dynamic index = details . date ? . day ;
if ( index ! = null ) {
if ( index ! = null ) {
@ -425,214 +426,213 @@ class _ViewAttendanceState extends State<ViewAttendance> {
}
}
if ( details . date ! . month = = formattedDate . month & & details . date ! . year = = formattedDate . year ) {
if ( details . date ! . month = = formattedDate . month & & details . date ! . year = = formattedDate . year ) {
int val = details . date ! . day ;
int val = details . date ! . day ;
getDayHoursTypeDetailsList ? [ val - 1 ] . aTTENDEDFLAG = = ' Y '
getDayHoursTypeDetailsList ? [ val - 1 ] . aTTENDEDFLAG = = ' Y ' ?
? showModalBottomSheet (
showModalBottomSheet (
context: context ,
context: context ,
shape: RoundedRectangleBorder ( borderRadius: BorderRadius . circular ( 25 ) ) ,
shape: RoundedRectangleBorder ( borderRadius: BorderRadius . circular ( 25 ) ) ,
isScrollControlled: true ,
isScrollControlled: true ,
backgroundColor: MyColors . backgroundBlackColor ,
backgroundColor: MyColors . backgroundBlackColor ,
builder: ( _ ) {
builder: ( _ ) {
return DraggableScrollableSheet (
return DraggableScrollableSheet (
maxChildSize: 0.9 ,
maxChildSize: 0.9 ,
expand: false ,
expand: false ,
builder: ( _ , controller ) {
builder: ( _ , controller ) {
dynamic dmyString = getScheduleShiftsDetailsList ! . sCHEDULEDATE ;
dynamic dmyString = getScheduleShiftsDetailsList ! . sCHEDULEDATE ;
DateTime dateTime1 = DateFormat ( " MM/dd/yyyy hh:mm:ss a " ) . parse ( dmyString ) ;
DateTime dateTime1 = DateFormat ( " MM/dd/yyyy hh:mm:ss a " ) . parse ( dmyString ) ;
return Column (
return Column (
children: [
children: [
Container (
Container (
width: 49 ,
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 ( 25 ) ,
borderRadius: BorderRadius . circular ( 25 ) ,
color: MyColors . darkGreyColor ,
color: MyColors . darkGreyColor ,
) ,
) ,
) ,
) ,
Expanded (
Expanded (
child: ListView . builder (
child: ListView . builder (
controller: controller ,
controller: controller ,
itemCount: 1 ,
itemCount: 1 ,
itemBuilder: ( _ , i ) = > Container (
itemBuilder: ( _ , i ) = >
decoration: const BoxDecoration (
Container (
borderRadius: BorderRadius . vertical (
decoration: const BoxDecoration (
top: Radius . circular ( 25.0 ) ,
borderRadius: BorderRadius . vertical (
) ,
top: Radius . circular ( 25.0 ) ,
color: MyColors . backgroundBlackColor ,
) ,
) ,
child: Column (
color: MyColors . backgroundBlackColor ,
children: [
) ,
Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
Column (
" ${ DateFormat ( " MMMM-dd-yyyy " ) . format ( dateTime1 ) . replaceAll ( ' - ' , " " ) } " . toText24 ( isBold: true , color: Colors . white ) ,
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . attendanceDetails . tr ( ) . toText16 ( color: MyColors . greyACColor ) ,
children: [
12. height ,
" ${ DateFormat ( " MMMM-dd-yyyy " ) . format ( dateTime1 ) . replaceAll ( ' - ' , " " ) } " . toText24 ( isBold: true , color: Colors . white ) ,
CircularStepProgressBar (
LocaleKeys . attendanceDetails . tr ( ) . toText16 ( color: MyColors . greyACColor ) ,
totalSteps: 16 * 4 ,
12. height ,
currentStep: percentage ,
CircularStepProgressBar (
width: 224 ,
totalSteps: 16 * 4 ,
height: 236 ,
currentStep: percentage ,
selectedColor: MyColors . gradiantEndColor ,
width: 224 ,
unselectedColor: MyColors . grey70Color ,
height: 236 ,
child: Column (
selectedColor: MyColors . gradiantEndColor ,
mainAxisSize: MainAxisSize . min ,
unselectedColor: MyColors . grey70Color ,
children: [
child: Column (
" ${ getScheduleShiftsDetailsList ! . pERCENTAGE } " . toText44 ( color: Colors . white , isBold: true ) ,
mainAxisSize: MainAxisSize . min ,
LocaleKeys . completed . tr ( ) . toText11 ( color: MyColors . greyACColor ) ,
children: [
28. height ,
" ${ getScheduleShiftsDetailsList ! . pERCENTAGE } " . toText44 ( color: Colors . white , isBold: true ) ,
LocaleKeys . shiftTime . tr ( ) . toText11 ( color: MyColors . greyACColor ) ,
LocaleKeys . completed . tr ( ) . toText11 ( color: MyColors . greyACColor ) ,
" ${ getScheduleShiftsDetailsList ! . sHTNAME } " . toText22 ( color: Colors . white , isBold: true ) ,
28. height ,
] ,
LocaleKeys . shiftTime . tr ( ) . toText11 ( color: MyColors . greyACColor ) ,
) . center ,
" ${ getScheduleShiftsDetailsList ! . sHTNAME } " . toText22 ( color: Colors . white , isBold: true ) ,
] ,
) . center ,
) . center ,
] ,
). center ,
). paddingOnly ( left: 21 , right: 21 , top: 27 , bottom: 37 ) ,
] ,
Stack (
) . paddingOnly ( left: 21 , right: 21 , top: 27 , bottom: 37 ) ,
children: [
Stack (
Container (
children: [
width: double . infinity ,
Container (
decoration: const BoxDecoration ( borderRadius: BorderRadius . only ( topLeft: Radius . circular ( 25 ) , topRight: Radius . circular ( 25 ) ) , color: Colors . white ) ,
width: double . infinity ,
padding: const EdgeInsets . only ( left: 31 , right: 31 , top: 30 , bottom: 29 ) ,
decoration: const BoxDecoration ( borderRadius: BorderRadius . only ( topLeft: Radius . circular ( 25 ) , topRight: Radius . circular ( 25 ) ) , color: Colors . white ) ,
child: Column (
padding: const EdgeInsets . only ( left: 31 , right: 31 , top: 30 , bottom: 29 ) ,
children: [
child: Column (
Row (
children: [
children: [
Row (
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . actualCheckIn . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . actualCheckIn . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getScheduleShiftsDetailsList ! . sHTACTUALSTARTTIME } " ! = " "
) ,
? " ${ getScheduleShiftsDetailsList ! . sHTACTUALSTARTTIME } " . toText22 ( color: Colors . black , isBold: true )
" ${ getScheduleShiftsDetailsList ! . sHTACTUALSTARTTIME } " ! = " "
: " __ " . toText22 ( color: Colors . black , isBold: true ) ,
? " ${ getScheduleShiftsDetailsList ! . sHTACTUALSTARTTIME } " . toText22 ( color: Colors . black , isBold: true )
] ,
: " __ " . toText22 ( color: Colors . black , isBold: true ) ,
). expanded ,
] ,
Column (
) . expanded ,
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . actualCheckOut . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . actualCheckOut . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getScheduleShiftsDetailsList ! . sHTACTUALENDTIME } " ! = " "
) ,
? " ${ getScheduleShiftsDetailsList ! . sHTACTUALENDTIME } " . toText22 ( color: Colors . black , isBold: true )
" ${ getScheduleShiftsDetailsList ! . sHTACTUALENDTIME } " ! = " "
: " __ " . toText22 ( color: Colors . black , isBold: true ) ,
? " ${ getScheduleShiftsDetailsList ! . sHTACTUALENDTIME } " . toText22 ( color: Colors . black , isBold: true )
] ,
: " __ " . toText22 ( color: Colors . black , isBold: true ) ,
). expanded ,
] ,
] ,
). expanded ,
) ,
] ,
25. height ,
) ,
const Divider (
25. height ,
height: 1 ,
const Divider (
thickness : 1 ,
height : 1 ,
color: MyColors . lightGreyEFColor ,
thickness: 1 ,
) ,
color: MyColors . lightGreyEFColor ,
25. height ,
) ,
Row (
25. height ,
children: [
Row (
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . approvedCheckIn . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . approvedCheckIn . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getScheduleShiftsDetailsList ! . aPPROVEDSTARTTIME } " ! = " "
) ,
? " ${ getScheduleShiftsDetailsList ! . aPPROVEDSTARTTIME } " . toText22 ( color: MyColors . greenColor , isBold: true )
" ${ getScheduleShiftsDetailsList ! . aPPROVEDSTARTTIME } " ! = " "
: " __ " . toText22 ( color: MyColors . greenColor , isBold: true ) ,
? " ${ getScheduleShiftsDetailsList ! . aPPROVEDSTARTTIME } " . toText22 ( color: MyColors . greenColor , isBold: true )
] ,
: " __ " . toText22 ( color: MyColors . greenColor , isBold: true ) ,
). expanded ,
] ,
Column (
) . expanded ,
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . approvedCheckOut . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . approvedCheckOut . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getScheduleShiftsDetailsList ! . aPPROVEDENDTIME } " ! = " "
) ,
? " ${ getScheduleShiftsDetailsList ! . aPPROVEDENDTIME } " . toText22 ( color: MyColors . greenColor , isBold: true )
" ${ getScheduleShiftsDetailsList ! . aPPROVEDENDTIME } " ! = " "
: " __ " . toText22 ( color: MyColors . greenColor , isBold: true ) ,
? " ${ getScheduleShiftsDetailsList ! . aPPROVEDENDTIME } " . toText22 ( color: MyColors . greenColor , isBold: true )
] ,
: " __ " . toText22 ( color: MyColors . greenColor , isBold: true ) ,
). expanded ,
] ,
] ,
). expanded ,
) ,
] ,
25. height ,
) ,
const Divider (
25. height ,
height: 1 ,
const Divider (
thickness : 1 ,
height : 1 ,
color: MyColors . lightGreyEFColor ,
thickness: 1 ,
) ,
color: MyColors . lightGreyEFColor ,
25. height ,
) ,
Row (
25. height ,
children: [
Row (
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . lateIn . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . lateIn . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getDayHoursTypeDetailsList [ index ] . lATEINHRS } " . toText22 ( color: MyColors . redColor , isBold: true ) ,
) ,
] ,
" ${ getDayHoursTypeDetailsList [ index ] . lATEINHRS } " . toText22 ( color: MyColors . redColor , isBold: true ) ,
). expanded ,
] ,
Column (
) . expanded ,
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . excess . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . excess . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getDayHoursTypeDetailsList [ index ] . eXCESSHRS } " . toText22 ( color: MyColors . backgroundBlackColor , isBold: true ) ,
) ,
] ,
" ${ getDayHoursTypeDetailsList [ index ] . eXCESSHRS } " . toText22 ( color: MyColors . backgroundBlackColor , isBold: true ) ,
). expanded ,
] ,
] ,
). expanded ,
) ,
] ,
25. height ,
) ,
const Divider (
25. height ,
height: 1 ,
const Divider (
thickness : 1 ,
height : 1 ,
color: MyColors . lightGreyEFColor ,
thickness: 1 ,
) ,
color: MyColors . lightGreyEFColor ,
25. height ,
) ,
Row (
25. height ,
children: [
Row (
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . shortage . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
LocaleKeys . shortage . tr ( ) . toText11 (
) ,
color: MyColors . grey67Color ,
" ${ getDayHoursTypeDetailsList [ index ] . sHORTAGEHRS } " . toText22 ( color: MyColors . backgroundBlackColor , isBold: true ) ,
) ,
] ,
" ${ getDayHoursTypeDetailsList [ index ] . sHORTAGEHRS } " . toText22 ( color: MyColors . backgroundBlackColor , isBold: true ) ,
). expanded ,
] ,
Column (
) . expanded ,
crossAxisAlignment: CrossAxisAlignment . start ,
Column (
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
LocaleKeys . earlyOut . tr ( ) . toText11 (
children: [
color: MyColors . grey67Color ,
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 ,
] ,
] ,
). expanded ,
) ,
] ,
] ,
) ,
) ,
] ,
) ,
) ,
] ,
) ,
) ,
] ,
] ,
) ,
) ,
] ,
) ,
) ,
) ,
) ,
) ,
) ,
] ,
) ,
) ;
] ,
} ,
) ;
) ;
} ,
} ,
) ;
)
} ,
: null ;
) : null ;
}
}
}
}
List < Meeting > _getDataSource ( ) {
List < Meeting > _getDataSource ( ) {
List < Meeting > meetings = < Meeting > [ ] ;
List < Meeting > meetings = < Meeting > [ ] ;
return meetings ;
return meetings ;