|
|
|
|
@ -193,7 +193,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
offTime = newValue;
|
|
|
|
|
offTime = newValue.toString();
|
|
|
|
|
});
|
|
|
|
|
if (offTime == '1') {
|
|
|
|
|
model2.getReasons(18);
|
|
|
|
|
@ -206,7 +206,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
model2
|
|
|
|
|
.getReasons(102);
|
|
|
|
|
setState(() {
|
|
|
|
|
offTime = newValue;
|
|
|
|
|
offTime = newValue.toString();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -564,94 +564,96 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (model2.coveringDoctors.length >
|
|
|
|
|
0)
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownSearch(
|
|
|
|
|
mode: Mode.BOTTOM_SHEET,
|
|
|
|
|
|
|
|
|
|
dropdownSearchDecoration:
|
|
|
|
|
InputDecoration(
|
|
|
|
|
contentPadding:
|
|
|
|
|
EdgeInsets.all(0),
|
|
|
|
|
border:
|
|
|
|
|
InputBorder.none),
|
|
|
|
|
//maxHeight: 300,
|
|
|
|
|
items: model2.coveringDoctors
|
|
|
|
|
.map((item) {
|
|
|
|
|
return projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? item['doctorNameN']
|
|
|
|
|
: item['doctorName'];
|
|
|
|
|
}).toList(),
|
|
|
|
|
// label: "Doctor List",
|
|
|
|
|
onChanged: (item) {
|
|
|
|
|
model2.coveringDoctors
|
|
|
|
|
.forEach((newVal) => {
|
|
|
|
|
if (newVal[
|
|
|
|
|
'doctorName'] ==
|
|
|
|
|
item)
|
|
|
|
|
doctorID = newVal[
|
|
|
|
|
'DoctorID']
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
selectedItem:
|
|
|
|
|
getSelectedDoctor(model2),
|
|
|
|
|
showSearchBox: true,
|
|
|
|
|
searchBoxDecoration:
|
|
|
|
|
InputDecoration(
|
|
|
|
|
border:
|
|
|
|
|
OutlineInputBorder(),
|
|
|
|
|
contentPadding:
|
|
|
|
|
EdgeInsets.fromLTRB(
|
|
|
|
|
12, 12, 8, 0),
|
|
|
|
|
labelText: "Search Doctor",
|
|
|
|
|
),
|
|
|
|
|
popupTitle: Container(
|
|
|
|
|
height: 50,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Theme.of(context)
|
|
|
|
|
.primaryColorDark,
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.only(
|
|
|
|
|
topLeft:
|
|
|
|
|
Radius.circular(20),
|
|
|
|
|
topRight:
|
|
|
|
|
Radius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
'',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 24,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
popupShape:
|
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.only(
|
|
|
|
|
topLeft:
|
|
|
|
|
Radius.circular(24),
|
|
|
|
|
topRight:
|
|
|
|
|
Radius.circular(24),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
else
|
|
|
|
|
SizedBox(),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
/// TODO Elham*2 fix it
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisSize: MainAxisSize.max,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// if (model2.coveringDoctors.length >
|
|
|
|
|
// 0)
|
|
|
|
|
// Expanded(
|
|
|
|
|
// // add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
// child: DropdownSearch(
|
|
|
|
|
// mode: Mode.BOTTOM_SHEET,
|
|
|
|
|
//
|
|
|
|
|
// dropdownSearchDecoration:
|
|
|
|
|
// InputDecoration(
|
|
|
|
|
// contentPadding:
|
|
|
|
|
// EdgeInsets.all(0),
|
|
|
|
|
// border:
|
|
|
|
|
// InputBorder.none),
|
|
|
|
|
// //maxHeight: 300,
|
|
|
|
|
// items: model2.coveringDoctors
|
|
|
|
|
// .map((item) {
|
|
|
|
|
// return projectsProvider
|
|
|
|
|
// .isArabic
|
|
|
|
|
// ? item['doctorNameN']
|
|
|
|
|
// : item['doctorName'];
|
|
|
|
|
// }).toList(),
|
|
|
|
|
// // label: "Doctor List",
|
|
|
|
|
// onChanged: (_item) {
|
|
|
|
|
// model2.coveringDoctors
|
|
|
|
|
// .forEach((newVal) => {
|
|
|
|
|
// if (newVal[
|
|
|
|
|
// 'doctorName'] ==
|
|
|
|
|
// _item)
|
|
|
|
|
// doctorID = newVal[
|
|
|
|
|
// 'DoctorID']
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// selectedItem:
|
|
|
|
|
// getSelectedDoctor(model2),
|
|
|
|
|
// showSearchBox: true,
|
|
|
|
|
// // TODO Elham*2 fix
|
|
|
|
|
// // searchBoxDecoration:
|
|
|
|
|
// // InputDecoration(
|
|
|
|
|
// // border:
|
|
|
|
|
// // OutlineInputBorder(),
|
|
|
|
|
// // contentPadding:
|
|
|
|
|
// // EdgeInsets.fromLTRB(
|
|
|
|
|
// // 12, 12, 8, 0),
|
|
|
|
|
// // labelText: "Search Doctor",
|
|
|
|
|
// // ),
|
|
|
|
|
// popupTitle: Container(
|
|
|
|
|
// height: 50,
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Theme.of(context)
|
|
|
|
|
// .primaryColorDark,
|
|
|
|
|
// borderRadius:
|
|
|
|
|
// BorderRadius.only(
|
|
|
|
|
// topLeft:
|
|
|
|
|
// Radius.circular(20),
|
|
|
|
|
// topRight:
|
|
|
|
|
// Radius.circular(20),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Center(
|
|
|
|
|
// child: Text(
|
|
|
|
|
// '',
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 24,
|
|
|
|
|
// fontWeight:
|
|
|
|
|
// FontWeight.bold,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// popupShape:
|
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
|
// borderRadius:
|
|
|
|
|
// BorderRadius.only(
|
|
|
|
|
// topLeft:
|
|
|
|
|
// Radius.circular(24),
|
|
|
|
|
// topRight:
|
|
|
|
|
// Radius.circular(24),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
// else
|
|
|
|
|
// SizedBox(),
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
|