bug fixes

merge-requests/383/head
Sultan Khan 5 years ago
parent b19c3092a6
commit eadfe2d6bc

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

@ -4,7 +4,7 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
// const BASE_URL = 'https://hmgwebservices.com/'; //const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
@ -234,6 +234,7 @@ const GET_PAtIENTS_INSURANCE_APPROVALS =
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS =
@ -246,7 +247,6 @@ const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh'; 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
var selectedPatientType = 1; var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************ //*********change value to decode json from Dropdown ************

@ -394,7 +394,7 @@ const Map<String, Map<String, String>> localizedValues = {
'painManagement': {'en': "Pain Management", 'ar': 'إدارة الألم'}, 'painManagement': {'en': "Pain Management", 'ar': 'إدارة الألم'},
'holiday': {'en': "Holiday", 'ar': 'يوم الاجازة'}, 'holiday': {'en': "Holiday", 'ar': 'يوم الاجازة'},
'to': {'en': "To", 'ar': 'إلى'}, 'to': {'en': "To", 'ar': 'إلى'},
'coveringDoctor': {'en': "Covering Doctor", 'ar': 'تغطية دكتور'}, 'coveringDoctor': {'en': "Covering Doctor: ", 'ar': ' :تغطية دكتور'},
'requestLeave': {'en': 'Request Leave', 'ar': 'طلب إجازة'}, 'requestLeave': {'en': 'Request Leave', 'ar': 'طلب إجازة'},
'pleaseEnterDate': { 'pleaseEnterDate': {
'en': 'Please enter leave start date', 'en': 'Please enter leave start date',
@ -785,7 +785,21 @@ const Map<String, Map<String, String>> localizedValues = {
"prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, "prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
"notes": {"en": "Notes", "ar": "ملاحظات"}, "notes": {"en": "Notes", "ar": "ملاحظات"},
"dailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, "dailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"searchWithOther": {
"en": "Search With Other Criteria",
"ar": "البحث بمعايير أخرى"
},
"hideOtherCriteria": {
"en": "Hide Other Criteria",
"ar": "إخفاء المعايير الأخرى"
},
"applyForReschedule": {
"en": "Apply for leave or reschedule",
"ar": "تقدم بطلب للحصول على إجازة أو إعادة جدولة"
},
"startDate": {"en": "Start Date: ", "ar": " :تاريخ البدء"},
"endDate": {"en": "End Date: ", "ar": " :تاريخ الانتهاء"},
"add-reschedule": {"en": "Add reschedule", "ar": "أضف إعادة الجدولة"},
"update-reschedule": {"en": "Update reschedule", "ar": "تحديث إعادة الجدولة"},
}; };

@ -210,11 +210,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
InkWell( InkWell(
child: this.isView == false child: this.isView == false
? AppText( ? AppText(
'Search With Other Critearia', TranslationBase.of(context)
.searchWithOther,
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
: AppText('Hide Other Criteria', : AppText(
TranslationBase.of(context)
.hideOtherCriteria,
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
onTap: () { onTap: () {

@ -7,6 +7,8 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -18,287 +20,251 @@ class AddRescheduleLeavScreen extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);
return BaseView<SickLeaveViewModel>( return BaseView<SickLeaveViewModel>(
onModelReady: (model) => onModelReady: (model) =>
{model.getRescheduleLeave(), model.getCoveringDoctors()}, {model.getRescheduleLeave(), model.getCoveringDoctors()},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).rescheduleLeaves, appBarTitle: TranslationBase.of(context).rescheduleLeaves,
body: model.getReschduleLeave.length > 0 body: Column(children: [
? SingleChildScrollView( Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.all(10),
padding:
EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20),
decoration: BoxDecoration(
color: HexColor('#EAEAEA'),
borderRadius: BorderRadius.all(Radius.circular(20))),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey,
borderRadius: BorderRadius.circular(10)),
child: IconButton(
icon: Icon(
Icons.add,
size: 35,
color: Colors.white,
),
onPressed: () {
openLeave(
context,
false,
);
}),
),
Padding(
child: AppText(
TranslationBase.of(context).applyForReschedule,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 18,
color: HexColor('#7E7E7E')),
padding: EdgeInsets.all(10),
),
],
),
),
Container(
height: MediaQuery.of(context).size.height * .65,
child: SingleChildScrollView(
child: Column(
children: model.getReschduleLeave
.map<Widget>((GetRescheduleLeavesResponse item) {
return RoundedContainer(
child: Column( child: Column(
children: [ children: [
SizedBox(height: 50),
Container( Container(
margin: decoration: BoxDecoration(
EdgeInsets.only(left: 15, right: 15, top: 20), border: Border(
decoration: BoxDecoration( left: BorderSide(
borderRadius: color: item.status == 1
BorderRadius.all(Radius.circular(6.0)), ? Colors.green
border: Border.all( : item.status == 2
width: 1.0, color: HexColor("#CCCCCC"))), ? HexColor('#CC9B14')
padding: EdgeInsets.all(5), : Colors.red[800],
child: Column( width: 5.0,
crossAxisAlignment: CrossAxisAlignment.start, ))),
children: [ padding: EdgeInsets.only(left: 10, right: 10),
InkWell( child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.start,
children: [ children: <Widget>[
Expanded( Expanded(
flex: 4, flex: 4,
child: AppText( child: Wrap(
TranslationBase.of(context) children: <Widget>[
.requestLeave), Column(
), crossAxisAlignment:
IconButton( CrossAxisAlignment.start,
icon: Icon( children: <Widget>[
Icons.add_circle, Container(
color: Colors.red, padding: EdgeInsets.all(3),
)) margin: EdgeInsets.only(top: 10),
], child: AppText(
) item.status == 1
// AppTextFormField( ? TranslationBase.of(
// hintText: context)
// TranslationBase.of(context).requestLeave, .approved
// borderColor: Colors.white, : item.status == 2
// prefix: IconButton( ? TranslationBase.of(
// icon: Icon( context)
// Icons.add_circle, .pending
// color: Colors.red, : TranslationBase.of(
// )), context)
// // textInputType: TextInputType.text, .rejected,
// readOnly: true, fontWeight: FontWeight.bold,
// onTap: () { color: item.status == 1
// openLeave( ? Colors.green
// context, : item.status == 2
// false, ? HexColor('#CC9B14')
// ); : Colors.red[800],
// return false; fontSize: 14,
// }, ),
// inputFormatter: ONLY_LETTERS, ),
// ) SizedBox(
, height: 5,
onTap: () { ),
openLeave( Container(
context, child: AppText(
false, item.requisitionType == 1
); ? TranslationBase.of(context)
}, .offTime
) : TranslationBase.of(context)
], .holiday +
), ' ',
), fontWeight: FontWeight.bold,
Column( )),
children: model.getReschduleLeave.map<Widget>( SizedBox(
(GetRescheduleLeavesResponse item) { height: 5,
return CardWithBgWidgetNew( ),
widget: Column( Row(children: [
children: [ AppText(
Container( TranslationBase.of(context)
padding: .startDate),
EdgeInsets.only(left: 10, right: 10), AppText(
child: Row( DateUtils
mainAxisAlignment: .convertStringToDateFormat(
MainAxisAlignment.start, item.dateTimeFrom,
children: <Widget>[ 'yyyy-MM-dd HH:mm'),
Expanded( fontWeight: FontWeight.bold,
flex: 4, )
child: Wrap(
children: <Widget>[ // overflow:
Column( // TextOverflow.ellipsis,
crossAxisAlignment: ]),
CrossAxisAlignment.start,
children: <Widget>[ // overflow:
Container( // TextOverflow.ellipsis,
padding:
EdgeInsets.all(3), SizedBox(
child: AppText( height: 5,
item.status == 1 ),
? TranslationBase Row(
.of(context) children: [
.approved AppText(
: item.status == 2 TranslationBase.of(context)
? TranslationBase.of( .endDate),
context) AppText(
.pending DateUtils
: TranslationBase.of( .convertStringToDateFormat(
context) item.dateTimeTo,
.rejected, 'yyyy-MM-dd HH:mm'),
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold, )
color: Colors.white, ],
), ),
color: item.status == 1
? Colors.green SizedBox(
: item.status == 2 height: 5,
? Colors ),
.yellow[800] model.coveringDoctors.length > 0
: Colors.red[800], ? Row(children: [
),
SizedBox(
height: 5,
),
Container(
child: AppText(
item.requisitionType == 1
? TranslationBase.of(
context)
.offTime
: TranslationBase.of(
context)
.holiday +
' ',
fontWeight:
FontWeight.bold,
)),
Row(
children: [
Flexible(
child: Text(
DateUtils.convertStringToDateFormat(
item
.dateTimeFrom,
'yyyy-MM-dd HH:mm') +
' ' +
TranslationBase.of(
context)
.to +
' ' +
DateUtils.convertStringToDateFormat(
item.dateTimeTo,
'yyyy-MM-dd HH:mm')
// overflow:
// TextOverflow.ellipsis,
))
],
),
SizedBox(
height: 5,
),
AppText( AppText(
TranslationBase.of( TranslationBase.of(
context) context)
.coveringDoctor, .coveringDoctor,
fontWeight:
FontWeight.bold,
), ),
model.coveringDoctors
.length >
0
? Row(children: [
AppText(getDoctor(
model
.coveringDoctors,
item.coveringDoctorId))
])
: SizedBox(),
AppText( AppText(
TranslationBase.of( getDoctor(
context) model.coveringDoctors,
.reasons, item.coveringDoctorId),
fontWeight: fontWeight:
FontWeight.bold, FontWeight.bold,
), )
model.allReasons.length > 0 ])
? Row(children: [ : SizedBox(),
AppText(getReasons( // AppText(
model // TranslationBase.of(context)
.allReasons, // .reasons,
item.reasonId)) // fontWeight: FontWeight.bold,
]) // ),
: SizedBox(), Row(
], mainAxisAlignment:
), MainAxisAlignment
SizedBox( .spaceBetween,
width: 10, children: [
), Padding(
], padding: EdgeInsets.only(
), bottom: 5),
), child: AppText(getReasons(
(item.status == 2) model.allReasons,
? Expanded( item.reasonId))),
flex: 1, (item.status == 2)
child: IconButton( ? IconButton(
icon: Icon( icon: Image.asset(
Icons.edit_outlined, 'assets/images/edit.png'),
size: 30, // color: Colors.green, //Colors.black,
), onPressed: () => {
// color: Colors.green, //Colors.black, openLeave(
onPressed: () => { context, true,
openLeave(context, true, extendedData:
extendedData: item) item)
}, },
)) )
: SizedBox(), : SizedBox(),
], ]),
)), ],
SizedBox( ),
height: 10, SizedBox(
), width: 10,
Divider( ),
height: 1, ],
),
), ),
], ],
)); )),
}).toList(),
)
], ],
), ),
) );
: new Builder(builder: (context) { }).toList(),
return Center( )))
child: SingleChildScrollView( ])),
child: Column( );
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(40),
decoration: BoxDecoration(
border: Border.all(
color: HexColor('#B8382C'), width: 4),
borderRadius:
BorderRadius.all(Radius.circular(100))),
child: IconButton(
icon: Icon(
Icons.add,
size: 35,
),
onPressed: () {
openLeave(
context,
false,
);
}),
),
Padding(
child: AppText(
TranslationBase.of(context).noReScheduleLeave,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10),
),
AppText(
TranslationBase.of(context).applyNow,
fontWeight: FontWeight.bold,
color: HexColor('#B8382C'),
)
],
),
));
}),
));
} }
openLeave(BuildContext context, isExtend, {extendedData}) { openLeave(BuildContext context, isExtend, {extendedData}) {
showModalBottomSheet( // showModalBottomSheet(
context: context, // context: context,
builder: (context) { // builder: (context) {
return new Container( // return new Container(
child: RescheduleLeaveScreen( // child: RescheduleLeaveScreen(
isExtend, // isExtend,
extendedData, // extendedData,
)); // ));
}); // });
Navigator.push(
context,
FadePage(
page: RescheduleLeaveScreen(
isExtend,
extendedData,
),
),
);
} }
getDoctor(model, doctorId) { getDoctor(model, doctorId) {

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

@ -1145,26 +1145,45 @@ class TranslationBase {
String get billNo => localizedValues['BillNo'][locale.languageCode]; String get billNo => localizedValues['BillNo'][locale.languageCode];
String get labResults => localizedValues['labResults'][locale.languageCode]; String get labResults => localizedValues['labResults'][locale.languageCode];
String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; String get sendSuc => localizedValues['sendSuc'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; String get specialResult =>
String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; localizedValues['SpecialResult'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; String get noDataAvailable =>
localizedValues['noDataAvailable'][locale.languageCode];
String get showMoreBtn =>
localizedValues['show-more-btn'][locale.languageCode];
String get fileNumber => localizedValues['fileNumber'][locale.languageCode]; String get fileNumber => localizedValues['fileNumber'][locale.languageCode];
String get reschedule => localizedValues['reschedule'][locale.languageCode]; String get reschedule => localizedValues['reschedule'][locale.languageCode];
String get leaves => localizedValues['leaves'][locale.languageCode]; String get leaves => localizedValues['leaves'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode]; String get openRad => localizedValues['open-rad'][locale.languageCode];
String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; String get totalApproval =>
String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; localizedValues['totalApproval'][locale.languageCode];
String get procedureStatus =>
localizedValues['procedureStatus'][locale.languageCode];
String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; String get unusedCount => localizedValues['unusedCount'][locale.languageCode];
String get companyName => localizedValues['companyName'][locale.languageCode]; String get companyName => localizedValues['companyName'][locale.languageCode];
String get procedureName => localizedValues['procedureName'][locale.languageCode]; String get procedureName =>
localizedValues['procedureName'][locale.languageCode];
String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; String get usageStatus => localizedValues['usageStatus'][locale.languageCode];
String get prescriptions => localizedValues['prescriptions'][locale.languageCode]; String get prescriptions =>
localizedValues['prescriptions'][locale.languageCode];
String get notes => localizedValues['notes'][locale.languageCode]; String get notes => localizedValues['notes'][locale.languageCode];
String get dailyDoses => localizedValues['dailyDoses'][locale.languageCode]; String get dailyDoses => localizedValues['dailyDoses'][locale.languageCode];
String get searchWithOther =>
localizedValues['searchWithOther'][locale.languageCode];
String get hideOtherCriteria =>
localizedValues['hideOtherCriteria'][locale.languageCode];
String get applyForReschedule =>
localizedValues['applyForReschedule'][locale.languageCode];
String get startDate => localizedValues['startDate'][locale.languageCode];
String get endDate => localizedValues['endDate'][locale.languageCode];
String get addReschedule =>
localizedValues['add-reschedule'][locale.languageCode];
String get updateReschedule =>
localizedValues['update-reschedule'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -84,13 +84,15 @@ class PatientCard extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
: AppText( : patientInfo.arrivedOn != null
DateUtils.convertStringToDateFormat( ? AppText(
patientInfo.arrivedOn, DateUtils.convertStringToDateFormat(
'MM-dd-yyyy HH:mm'), patientInfo.arrivedOn,
fontFamily: 'Poppins', 'MM-dd-yyyy HH:mm'),
fontWeight: FontWeight.w600, fontFamily: 'Poppins',
) fontWeight: FontWeight.w600,
)
: SizedBox()
], ],
)) ))
: SizedBox(), : SizedBox(),
@ -124,7 +126,9 @@ class PatientCard extends StatelessWidget {
AppText( AppText(
patientInfo.nationalityName != null patientInfo.nationalityName != null
? patientInfo.nationalityName ? patientInfo.nationalityName
: patientInfo.nationality, : patientInfo.nationality != null
? patientInfo.nationality
: "",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
@ -286,29 +290,29 @@ class PatientCard extends StatelessWidget {
children: [ children: [
Container( Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.only( // borderRadius: BorderRadius.only(
bottomRight: Radius.circular(8), // bottomRight: Radius.circular(8),
topLeft: Radius.circular(8), // topLeft: Radius.circular(8),
), // ),
color: patientInfo.appointmentType == // color: patientInfo.appointmentType ==
'Regular' && // 'Regular' &&
patientInfo.visitTypeId == 100 // patientInfo.visitTypeId == 100
? HexColor('#D02127') // ? HexColor('#D02127')
: patientInfo.appointmentType == // : patientInfo.appointmentType ==
'Walkin' // 'Walkin'
? HexColor('#28323A') // ? HexColor('#28323A')
: HexColor('#6C7379'), // : HexColor('#6C7379'),
), // ),
child: Image.asset( child: Image.asset(
patientInfo.appointmentType == patientInfo.appointmentType ==
'Regular' && 'Regular' &&
patientInfo.visitTypeId == 100 patientInfo.visitTypeId == 100
? 'assets/images/type-livecare.png' ? 'assets/images/livecare.png'
: patientInfo.appointmentType == : patientInfo.appointmentType ==
'Walkin' 'Walkin'
? 'assets/images/type-walkin.png' ? 'assets/images/walkin.png'
: 'assets/images/type-booked.png', : 'assets/images/booked.png',
height: 25, height: 25,
width: 35, width: 35,
)), )),

Loading…
Cancel
Save