fist commit ftc staff app clone
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:ftc_mobile_app/ftc_mobile_app.dart';
|
||||
|
||||
|
||||
class ShowDialogNotification extends StatelessWidget {
|
||||
const ShowDialogNotification({
|
||||
super.key,
|
||||
required this.rotaShift,
|
||||
});
|
||||
|
||||
final RotaShift rotaShift;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
surfaceTintColor: CustomAppColors.kPrimaryColor,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
title: Center(
|
||||
child: CustomTextWidget(
|
||||
text: rotaShift.managerName,
|
||||
fontWeight: FontWeight.bold,
|
||||
isExpanded: false,
|
||||
alignment: Alignment.center,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
NotificationInfoRow( label: 'Service User:', value: rotaShift.name,),
|
||||
const SizedBox(height: 5,),
|
||||
NotificationInfoRow(label: 'Worker Type Role:', value: rotaShift.workerType),
|
||||
const SizedBox(height: 5,),
|
||||
NotificationInfoRow(label: 'Location:',value: rotaShift.location),
|
||||
const SizedBox(height: 5,),
|
||||
NotificationInfoRow(label: 'Start Time:', value: rotaShift.startTime),
|
||||
const SizedBox(height: 5,),
|
||||
NotificationInfoRow(label: 'End Time:',value: rotaShift.endTime),
|
||||
const SizedBox(height: 5,),
|
||||
NotificationInfoRow(label: 'Break Time:',value: rotaShift.breakTime),
|
||||
const SizedBox(height: 5,),
|
||||
NotificationInfoRow(label: 'Notes:',value: rotaShift.notes),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: false,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
maximumSize: Size(MediaQuery.of(context).size.width/3.5, 30.h),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width/3.5, 30.h),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
backgroundColor: CustomAppColors.kRedColor
|
||||
),
|
||||
onPressed: () {
|
||||
// Add functionality for the "Decline" button.
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: const CustomTextWidget(text: 'Decline',fontColor: CustomAppColors.kPrimaryColor),
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
// maximumSize: Size(MediaQuery.of(context).size.width/3.5, 30.h),
|
||||
maximumSize: Size(MediaQuery.of(context).size.width/1.8, 30.h),
|
||||
// minimumSize: Size(MediaQuery.of(context).size.width/3.5, 30.h),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width/1.8, 30.h),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor
|
||||
),
|
||||
onPressed: () {
|
||||
// Add functionality for the "Close" button.
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: CustomTextWidget(text: 'Close',fontColor: CustomAppColors.kBlackColor,fontSize: 15.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class NotificationInfoRow extends StatelessWidget {
|
||||
const NotificationInfoRow({
|
||||
super.key,required this.label, required this.value, this.half = false
|
||||
});
|
||||
|
||||
final String label, value;
|
||||
final bool half;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.w, color: CustomAppColors.kLightGreyColor),
|
||||
borderRadius: BorderRadius.circular(5.r)),
|
||||
padding: EdgeInsets.only(left: 10.w,top: 1.h,bottom: 1.h),
|
||||
width: half ? null : MediaQuery.of(context).size.width,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomTextWidget(text: label,isExpanded: false,fontSize: 12.sp),
|
||||
CustomTextWidget(text: value,fontWeight: FontWeight.w600,isExpanded: false,fontSize: 14,),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export 'custom_dialog_notification.dart';
|
||||
export 'holiday_request_accept_dialog.dart';
|
||||
@@ -0,0 +1,105 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:ftc_mobile_app/ftc_mobile_app.dart';
|
||||
|
||||
|
||||
class HolidayRequestAcceptDialog extends StatelessWidget {
|
||||
const HolidayRequestAcceptDialog({
|
||||
super.key, required this.startDate, required this.endDate, required this.noOfDays,
|
||||
});
|
||||
|
||||
final String startDate;
|
||||
final String endDate;
|
||||
final String noOfDays;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
insetPadding: EdgeInsets.only(right: 18.w,left: 18.w, top:40.h ,bottom: 230.h),
|
||||
contentPadding: EdgeInsets.only(left: 15.w,right: 15.w,top: 11.h,bottom: 0.h),
|
||||
surfaceTintColor: CustomAppColors.kPrimaryColor,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
title: Center(
|
||||
child: CustomTextWidget(
|
||||
text: "Your Holiday Request has been sent",
|
||||
fontWeight: FontWeight.w700,
|
||||
isExpanded: false,
|
||||
alignment: Alignment.center,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: DateInfo( label: 'Start Date', value: startDate,half: true)),
|
||||
SizedBox(width: 5.w,),
|
||||
Expanded(child: DateInfo(label: 'End Date', value: endDate,half: true)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.h,),
|
||||
DateInfo(label: 'Holiday Total Time',value: noOfDays),
|
||||
SizedBox(height: 10.h,),
|
||||
CustomTextWidget(text: "Kindly wait as we review your holiday request.",fontSize: 12.sp),
|
||||
SizedBox(height: 10.h,),
|
||||
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
surfaceTintColor: CustomAppColors.kPrimaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
// Add functionality for the "Close" button.
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: CustomTextWidget(
|
||||
text: 'Close',
|
||||
fontColor: CustomAppColors.kBlackColor,
|
||||
fontSize: 15.sp),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class DateInfo extends StatelessWidget {
|
||||
const DateInfo({
|
||||
super.key,required this.label, required this.value, this.half = false
|
||||
});
|
||||
|
||||
final String label, value;
|
||||
final bool half;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.w, color: CustomAppColors.kLightGreyColor),
|
||||
borderRadius: BorderRadius.circular(5.r)),
|
||||
padding: EdgeInsets.only(left: 10.w,top: 1.h,bottom: 1.h),
|
||||
width: half ? null : MediaQuery.of(context).size.width,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomTextWidget(text: label, isExpanded: false, fontSize: 12.sp),
|
||||
CustomTextWidget(
|
||||
text: value,
|
||||
fontWeight: FontWeight.w600,
|
||||
isExpanded: false,
|
||||
fontSize: 14,
|
||||
fontColor: CustomAppColors.kDarkBlueTextColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user