|
|
|
|
@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/routes.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart';
|
|
|
|
|
@ -50,6 +51,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
var clinicID;
|
|
|
|
|
late String fromTime;
|
|
|
|
|
late String toTime;
|
|
|
|
|
bool showBottomSheet = true;
|
|
|
|
|
late String selectedName;
|
|
|
|
|
TextEditingController _controller4 = new TextEditingController();
|
|
|
|
|
TextEditingController _controller5 = new TextEditingController();
|
|
|
|
|
void _presentDatePicker(id) {
|
|
|
|
|
@ -700,6 +703,104 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
bottomSheet: !showBottomSheet
|
|
|
|
|
? Container(
|
|
|
|
|
height: 0,
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.5,
|
|
|
|
|
padding: EdgeInsets.only(top: 13, left: 10, right: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
onChangeState(
|
|
|
|
|
showBottomSheet: false,
|
|
|
|
|
selectedName: selectedName);
|
|
|
|
|
},
|
|
|
|
|
child: Icon(DoctorApp.close_1,
|
|
|
|
|
size: SizeConfig.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4.5,
|
|
|
|
|
color: Color(0xFF2B353E)))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"${TranslationBase.of(context).clinicSelect} :",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: widget.model2.coveringDoctors.,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
// widget.onChangeValue(
|
|
|
|
|
// isAllClinic: false,
|
|
|
|
|
// showBottomSheet: false,
|
|
|
|
|
// selectedClinicName: widget
|
|
|
|
|
// .patientSearchViewModel
|
|
|
|
|
// .InpatientClinicList[index]);
|
|
|
|
|
|
|
|
|
|
onChangeState(
|
|
|
|
|
showBottomSheet: false,
|
|
|
|
|
selectedName: selectedName);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Radio(
|
|
|
|
|
value: widget.patientSearchViewModel
|
|
|
|
|
.InpatientClinicList[index],
|
|
|
|
|
groupValue: widget.selectedClinicName,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.onChangeValue(
|
|
|
|
|
isAllClinic: false,
|
|
|
|
|
showBottomSheet: false,
|
|
|
|
|
selectedClinicName: widget
|
|
|
|
|
.patientSearchViewModel
|
|
|
|
|
.InpatientClinicList[index]);
|
|
|
|
|
widget.patientSearchViewModel
|
|
|
|
|
.filterByClinic(clinicName: value.toString());
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
activeColor: Colors.red,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.patientSearchViewModel
|
|
|
|
|
.InpatientClinicList[index],
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
@ -804,6 +905,14 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onChangeState({ showBottomSheet, selectedName}) {
|
|
|
|
|
setState(() {
|
|
|
|
|
this.showBottomSheet = showBottomSheet;
|
|
|
|
|
this.selectedName = selectedName;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateRecheduleLeave(model) {
|
|
|
|
|
// final df = new DateFormat('yyyy-MM-ddTHH:MM:ss');
|
|
|
|
|
final df = new DateFormat('yyyy-MM-dd');
|
|
|
|
|
|