|
|
|
|
@ -114,12 +114,13 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
model2.getCoveringDoctors()
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model2, w) => GestureDetector(
|
|
|
|
|
onTap: (){
|
|
|
|
|
FocusScope.of(context).requestFocus(new FocusNode());
|
|
|
|
|
},
|
|
|
|
|
child: AppScaffold(
|
|
|
|
|
onTap: () {
|
|
|
|
|
FocusScope.of(context).requestFocus(new FocusNode());
|
|
|
|
|
},
|
|
|
|
|
child: AppScaffold(
|
|
|
|
|
baseViewModel: model2,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).rescheduleLeaves,
|
|
|
|
|
body: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
@ -130,8 +131,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(8),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
@ -139,7 +140,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom:
|
|
|
|
|
SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -151,58 +153,64 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButtonHideUnderline(
|
|
|
|
|
child: new IgnorePointer(
|
|
|
|
|
ignoring: true,
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
focusColor: Colors.grey,
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
dropdownColor:
|
|
|
|
|
Colors.grey,
|
|
|
|
|
value: getClinicName(
|
|
|
|
|
model) ??
|
|
|
|
|
"",
|
|
|
|
|
iconSize: 0,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext
|
|
|
|
|
context) {
|
|
|
|
|
return model
|
|
|
|
|
.getClinicNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize
|
|
|
|
|
.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
child:
|
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
|
child: new IgnorePointer(
|
|
|
|
|
ignoring: true,
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
focusColor:
|
|
|
|
|
Colors.grey,
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
dropdownColor:
|
|
|
|
|
Colors.grey,
|
|
|
|
|
value: getClinicName(
|
|
|
|
|
model) ??
|
|
|
|
|
"",
|
|
|
|
|
iconSize: 0,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext
|
|
|
|
|
context) {
|
|
|
|
|
return model
|
|
|
|
|
.getClinicNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize
|
|
|
|
|
.max,
|
|
|
|
|
children: <
|
|
|
|
|
Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[
|
|
|
|
|
500],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged:
|
|
|
|
|
(newValue) =>
|
|
|
|
|
{},
|
|
|
|
|
items: model
|
|
|
|
|
.getClinicNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value: item
|
|
|
|
|
.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
color: Colors
|
|
|
|
|
.grey[500],
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign
|
|
|
|
|
.end,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) =>
|
|
|
|
|
{},
|
|
|
|
|
items: model
|
|
|
|
|
.getClinicNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return DropdownMenuItem(
|
|
|
|
|
value:
|
|
|
|
|
item.toString(),
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
))),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
))),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
@ -216,7 +224,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
@ -238,8 +247,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(8),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
@ -247,7 +256,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom:
|
|
|
|
|
SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -262,7 +272,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child:
|
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
child:
|
|
|
|
|
DropdownButton(
|
|
|
|
|
// focusColor: Colors.grey,
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: offTime == null
|
|
|
|
|
@ -272,12 +283,14 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
(BuildContext
|
|
|
|
|
context) {
|
|
|
|
|
return model2.allOffTime
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize.max,
|
|
|
|
|
MainAxisSize
|
|
|
|
|
.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item[
|
|
|
|
|
@ -297,12 +310,22 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
offTime = newValue;
|
|
|
|
|
}),
|
|
|
|
|
if (offTime == '1')
|
|
|
|
|
{model2.getReasons(18)}
|
|
|
|
|
{
|
|
|
|
|
model2
|
|
|
|
|
.getReasons(18)
|
|
|
|
|
}
|
|
|
|
|
else if (offTime == '2')
|
|
|
|
|
{model2.getReasons(19)}
|
|
|
|
|
else if (offTime == '3' ||
|
|
|
|
|
{
|
|
|
|
|
model2
|
|
|
|
|
.getReasons(19)
|
|
|
|
|
}
|
|
|
|
|
else if (offTime ==
|
|
|
|
|
'3' ||
|
|
|
|
|
offTime == '5')
|
|
|
|
|
{model2.getReasons(102)}
|
|
|
|
|
{
|
|
|
|
|
model2
|
|
|
|
|
.getReasons(102)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
items: model2.allOffTime
|
|
|
|
|
.map((item) {
|
|
|
|
|
@ -335,20 +358,21 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
color:
|
|
|
|
|
HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.fromDate,
|
|
|
|
|
hintText: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.fromDate,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
prefix: IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.calendar_today)),
|
|
|
|
|
icon: Icon(Icons
|
|
|
|
|
.calendar_today)),
|
|
|
|
|
textInputType:
|
|
|
|
|
TextInputType.number,
|
|
|
|
|
controller: _toDateController,
|
|
|
|
|
@ -372,11 +396,12 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
Radius.circular(
|
|
|
|
|
6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color:
|
|
|
|
|
HexColor("#CCCCCC"))),
|
|
|
|
|
color: HexColor(
|
|
|
|
|
"#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
@ -387,8 +412,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.fromTime,
|
|
|
|
|
type:
|
|
|
|
|
DateTimePickerType.time,
|
|
|
|
|
type: DateTimePickerType
|
|
|
|
|
.time,
|
|
|
|
|
controller: _controller4,
|
|
|
|
|
onChanged: (val) =>
|
|
|
|
|
fromTime = val,
|
|
|
|
|
@ -411,11 +436,12 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
Radius.circular(
|
|
|
|
|
6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color:
|
|
|
|
|
HexColor("#CCCCCC"))),
|
|
|
|
|
color: HexColor(
|
|
|
|
|
"#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
@ -426,8 +452,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.toTime,
|
|
|
|
|
type:
|
|
|
|
|
DateTimePickerType.time,
|
|
|
|
|
type: DateTimePickerType
|
|
|
|
|
.time,
|
|
|
|
|
controller: _controller5,
|
|
|
|
|
onChanged: (val) =>
|
|
|
|
|
toTime = val,
|
|
|
|
|
@ -457,23 +483,26 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
color:
|
|
|
|
|
HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
hintText: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.fromDate,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.fromDate,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
prefix: IconButton(
|
|
|
|
|
icon: Icon(Icons
|
|
|
|
|
.calendar_today)),
|
|
|
|
|
textInputType:
|
|
|
|
|
TextInputType.number,
|
|
|
|
|
controller: _toDateController,
|
|
|
|
|
controller:
|
|
|
|
|
_toDateController,
|
|
|
|
|
onTap: () {
|
|
|
|
|
_presentDatePicker(
|
|
|
|
|
'fromDate');
|
|
|
|
|
@ -493,21 +522,22 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
color:
|
|
|
|
|
HexColor("#CCCCCC"))),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.toDate,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.toDate,
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
prefix: IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons
|
|
|
|
|
.calendar_today)),
|
|
|
|
|
icon: Icon(Icons
|
|
|
|
|
.calendar_today)),
|
|
|
|
|
textInputType:
|
|
|
|
|
TextInputType.number,
|
|
|
|
|
controller:
|
|
|
|
|
@ -529,8 +559,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(8),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
@ -538,7 +568,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom:
|
|
|
|
|
SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -553,7 +584,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child:
|
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
child:
|
|
|
|
|
DropdownButton(
|
|
|
|
|
focusColor: Colors.grey,
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: reason == null
|
|
|
|
|
@ -564,12 +596,14 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
iconSize: 40,
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
(BuildContext
|
|
|
|
|
context) {
|
|
|
|
|
return model2.allReasons
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize.max,
|
|
|
|
|
MainAxisSize
|
|
|
|
|
.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
projectsProvider
|
|
|
|
|
@ -603,7 +637,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? item['nameAr']
|
|
|
|
|
: item['nameEn'],
|
|
|
|
|
: item[
|
|
|
|
|
'nameEn'],
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.end,
|
|
|
|
|
),
|
|
|
|
|
@ -621,8 +656,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(8),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0,
|
|
|
|
|
color: HexColor("#CCCCCC"))),
|
|
|
|
|
@ -630,7 +665,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
bottom:
|
|
|
|
|
SizeConfig.widthMultiplier * 0.9,
|
|
|
|
|
right: SizeConfig.widthMultiplier * 3,
|
|
|
|
|
left: SizeConfig.widthMultiplier * 3),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -649,33 +685,36 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
dropdownSearchDecoration:
|
|
|
|
|
InputDecoration(
|
|
|
|
|
contentPadding:
|
|
|
|
|
EdgeInsets.all(
|
|
|
|
|
0),
|
|
|
|
|
border: InputBorder
|
|
|
|
|
.none),
|
|
|
|
|
EdgeInsets
|
|
|
|
|
.all(0),
|
|
|
|
|
border:
|
|
|
|
|
InputBorder
|
|
|
|
|
.none),
|
|
|
|
|
//maxHeight: 300,
|
|
|
|
|
items: model2
|
|
|
|
|
.coveringDoctors
|
|
|
|
|
.map((item) {
|
|
|
|
|
return projectsProvider
|
|
|
|
|
.isArabic
|
|
|
|
|
? item['doctorNameN']
|
|
|
|
|
: item['doctorName'];
|
|
|
|
|
? item[
|
|
|
|
|
'doctorNameN']
|
|
|
|
|
: item[
|
|
|
|
|
'doctorName'];
|
|
|
|
|
}).toList(),
|
|
|
|
|
// label: "Doctor List",
|
|
|
|
|
onChanged: (item) {
|
|
|
|
|
model2.coveringDoctors
|
|
|
|
|
.forEach((newVal) => {
|
|
|
|
|
if (newVal['doctorName'] ==
|
|
|
|
|
item ||
|
|
|
|
|
newVal['doctorName'] ==
|
|
|
|
|
item)
|
|
|
|
|
{
|
|
|
|
|
doctorID =
|
|
|
|
|
newVal[
|
|
|
|
|
'DoctorID']
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
.forEach(
|
|
|
|
|
(newVal) => {
|
|
|
|
|
if (newVal['doctorName'] ==
|
|
|
|
|
item ||
|
|
|
|
|
newVal['doctorName'] ==
|
|
|
|
|
item)
|
|
|
|
|
{
|
|
|
|
|
doctorID =
|
|
|
|
|
newVal['DoctorID']
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
selectedItem:
|
|
|
|
|
getSelectedDoctor(
|
|
|
|
|
@ -693,8 +732,10 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
),
|
|
|
|
|
popupTitle: Container(
|
|
|
|
|
height: 50,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Theme.of(context)
|
|
|
|
|
decoration:
|
|
|
|
|
BoxDecoration(
|
|
|
|
|
color: Theme.of(
|
|
|
|
|
context)
|
|
|
|
|
.primaryColorDark,
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.only(
|
|
|
|
|
@ -712,8 +753,10 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 24,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
color:
|
|
|
|
|
Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -723,9 +766,11 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.only(
|
|
|
|
|
topLeft:
|
|
|
|
|
Radius.circular(24),
|
|
|
|
|
Radius.circular(
|
|
|
|
|
24),
|
|
|
|
|
topRight:
|
|
|
|
|
Radius.circular(24),
|
|
|
|
|
Radius.circular(
|
|
|
|
|
24),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -805,8 +850,11 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title: widget.isUpdate == true
|
|
|
|
|
? TranslationBase.of(context).update
|
|
|
|
|
: TranslationBase.of(context).add,
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.updateReschedule
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.addReschedule,
|
|
|
|
|
color: HexColor('#359846'),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if (offTime == '1' || offTime == '2') {
|
|
|
|
|
if (widget.isUpdate == true) {
|
|
|
|
|
@ -837,7 +885,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)));
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getProfile() async {
|
|
|
|
|
|