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';
@ -24,82 +26,71 @@ class AddRescheduleLeavScreen extends StatelessWidget {
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(
child: Column(
children: [
SizedBox(height: 50),
Container( Container(
margin: width: MediaQuery.of(context).size.width,
EdgeInsets.only(left: 15, right: 15, top: 20), margin: EdgeInsets.all(10),
padding:
EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: color: HexColor('#EAEAEA'),
BorderRadius.all(Radius.circular(6.0)), borderRadius: BorderRadius.all(Radius.circular(20))),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Row(
children: [ children: [
Expanded( Container(
flex: 4, margin: EdgeInsets.all(10),
child: AppText( decoration: BoxDecoration(
TranslationBase.of(context) color: Colors.grey,
.requestLeave), borderRadius: BorderRadius.circular(10)),
), child: IconButton(
IconButton(
icon: Icon( icon: Icon(
Icons.add_circle, Icons.add,
color: Colors.red, size: 35,
)) color: Colors.white,
], ),
) onPressed: () {
// AppTextFormField(
// hintText:
// TranslationBase.of(context).requestLeave,
// borderColor: Colors.white,
// prefix: IconButton(
// icon: Icon(
// Icons.add_circle,
// color: Colors.red,
// )),
// // textInputType: TextInputType.text,
// readOnly: true,
// onTap: () {
// openLeave(
// context,
// false,
// );
// return false;
// },
// inputFormatter: ONLY_LETTERS,
// )
,
onTap: () {
openLeave( openLeave(
context, context,
false, false,
); );
}, }),
) ),
Padding(
child: AppText(
TranslationBase.of(context).applyForReschedule,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 18,
color: HexColor('#7E7E7E')),
padding: EdgeInsets.all(10),
),
], ],
), ),
), ),
Column( Container(
children: model.getReschduleLeave.map<Widget>( height: MediaQuery.of(context).size.height * .65,
(GetRescheduleLeavesResponse item) { child: SingleChildScrollView(
return CardWithBgWidgetNew( child: Column(
widget: Column( children: model.getReschduleLeave
.map<Widget>((GetRescheduleLeavesResponse item) {
return RoundedContainer(
child: Column(
children: [ children: [
Container( Container(
padding: decoration: BoxDecoration(
EdgeInsets.only(left: 10, right: 10), border: Border(
left: BorderSide(
color: item.status == 1
? Colors.green
: item.status == 2
? HexColor('#CC9B14')
: Colors.red[800],
width: 5.0,
))),
padding: EdgeInsets.only(left: 10, right: 10),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 4, flex: 4,
@ -110,12 +101,12 @@ class AddRescheduleLeavScreen extends StatelessWidget {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
padding: padding: EdgeInsets.all(3),
EdgeInsets.all(3), margin: EdgeInsets.only(top: 10),
child: AppText( child: AppText(
item.status == 1 item.status == 1
? TranslationBase ? TranslationBase.of(
.of(context) context)
.approved .approved
: item.status == 2 : item.status == 2
? TranslationBase.of( ? TranslationBase.of(
@ -124,16 +115,14 @@ class AddRescheduleLeavScreen extends StatelessWidget {
: TranslationBase.of( : TranslationBase.of(
context) context)
.rejected, .rejected,
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold,
color: Colors.white,
),
color: item.status == 1 color: item.status == 1
? Colors.green ? Colors.green
: item.status == 2 : item.status == 2
? Colors ? HexColor('#CC9B14')
.yellow[800]
: Colors.red[800], : Colors.red[800],
fontSize: 14,
),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -141,164 +130,141 @@ class AddRescheduleLeavScreen extends StatelessWidget {
Container( Container(
child: AppText( child: AppText(
item.requisitionType == 1 item.requisitionType == 1
? TranslationBase.of( ? TranslationBase.of(context)
context)
.offTime .offTime
: TranslationBase.of( : TranslationBase.of(context)
context)
.holiday + .holiday +
' ', ' ',
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold,
)), )),
SizedBox(
height: 5,
),
Row(children: [
AppText(
TranslationBase.of(context)
.startDate),
AppText(
DateUtils
.convertStringToDateFormat(
item.dateTimeFrom,
'yyyy-MM-dd HH:mm'),
fontWeight: FontWeight.bold,
)
// overflow:
// TextOverflow.ellipsis,
]),
// overflow:
// TextOverflow.ellipsis,
SizedBox(
height: 5,
),
Row( Row(
children: [ children: [
Flexible( AppText(
child: Text( TranslationBase.of(context)
DateUtils.convertStringToDateFormat( .endDate),
item AppText(
.dateTimeFrom, DateUtils
'yyyy-MM-dd HH:mm') + .convertStringToDateFormat(
' ' +
TranslationBase.of(
context)
.to +
' ' +
DateUtils.convertStringToDateFormat(
item.dateTimeTo, item.dateTimeTo,
'yyyy-MM-dd HH:mm') 'yyyy-MM-dd HH:mm'),
// overflow: fontWeight: FontWeight.bold,
// TextOverflow.ellipsis, )
))
], ],
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
model.coveringDoctors.length > 0
? Row(children: [
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: [
AppText(getReasons(
model
.allReasons,
item.reasonId))
]) ])
: SizedBox(), : SizedBox(),
], // AppText(
), // TranslationBase.of(context)
SizedBox( // .reasons,
width: 10, // fontWeight: FontWeight.bold,
), // ),
], Row(
), mainAxisAlignment:
), MainAxisAlignment
.spaceBetween,
children: [
Padding(
padding: EdgeInsets.only(
bottom: 5),
child: AppText(getReasons(
model.allReasons,
item.reasonId))),
(item.status == 2) (item.status == 2)
? Expanded( ? IconButton(
flex: 1, icon: Image.asset(
child: IconButton( 'assets/images/edit.png'),
icon: Icon(
Icons.edit_outlined,
size: 30,
),
// color: Colors.green, //Colors.black, // color: Colors.green, //Colors.black,
onPressed: () => { onPressed: () => {
openLeave(context, true, openLeave(
extendedData: item) context, true,
extendedData:
item)
}, },
)) )
: SizedBox(), : SizedBox(),
]),
], ],
)),
SizedBox(
height: 10,
), ),
Divider( SizedBox(
height: 1, width: 10,
), ),
], ],
));
}).toList(),
)
],
),
)
: new Builder(builder: (context) {
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'),
)
], ],
), ),
)); );
}), }).toList(),
)); )))
])),
);
} }
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,
// extendedData,
// ));
// });
Navigator.push(
context,
FadePage(
page: RescheduleLeaveScreen(
isExtend, isExtend,
extendedData, 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,11 +153,13 @@ 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:
DropdownButtonHideUnderline(
child: new IgnorePointer( child: new IgnorePointer(
ignoring: true, ignoring: true,
child: DropdownButton( child: DropdownButton(
focusColor: Colors.grey, focusColor:
Colors.grey,
isExpanded: true, isExpanded: true,
dropdownColor: dropdownColor:
Colors.grey, Colors.grey,
@ -174,31 +178,35 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
mainAxisSize: mainAxisSize:
MainAxisSize MainAxisSize
.max, .max,
children: <Widget>[ children: <
Widget>[
AppText( AppText(
item, item,
fontSize: SizeConfig fontSize:
.textMultiplier * SizeConfig.textMultiplier *
2.1, 2.1,
color: Colors color: Colors
.grey[500], .grey[
500],
), ),
], ],
); );
}).toList(); }).toList();
}, },
onChanged: (newValue) => onChanged:
(newValue) =>
{}, {},
items: model items: model
.getClinicNameList() .getClinicNameList()
.map((item) { .map((item) {
return DropdownMenuItem( return DropdownMenuItem(
value: value: item
item.toString(), .toString(),
child: Text( child: Text(
item, item,
textAlign: textAlign:
TextAlign.end, TextAlign
.end,
), ),
); );
}).toList(), }).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,14 +483,16 @@ 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:
TranslationBase.of(
context) context)
.fromDate, .fromDate,
borderColor: Colors.white, borderColor: Colors.white,
@ -473,7 +501,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
.calendar_today)), .calendar_today)),
textInputType: textInputType:
TextInputType.number, TextInputType.number,
controller: _toDateController, controller:
_toDateController,
onTap: () { onTap: () {
_presentDatePicker( _presentDatePicker(
'fromDate'); 'fromDate');
@ -493,20 +522,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: TranslationBase hintText:
TranslationBase
.of(context) .of(context)
.toDate, .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,
@ -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,9 +685,10 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
dropdownSearchDecoration: dropdownSearchDecoration:
InputDecoration( InputDecoration(
contentPadding: contentPadding:
EdgeInsets.all( EdgeInsets
0), .all(0),
border: InputBorder border:
InputBorder
.none), .none),
//maxHeight: 300, //maxHeight: 300,
items: model2 items: model2
@ -659,21 +696,23 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
.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(
(newVal) => {
if (newVal['doctorName'] == if (newVal['doctorName'] ==
item || item ||
newVal['doctorName'] == newVal['doctorName'] ==
item) item)
{ {
doctorID = doctorID =
newVal[ newVal['DoctorID']
'DoctorID']
} }
}); });
}, },
@ -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) {

@ -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
? AppText(
DateUtils.convertStringToDateFormat( DateUtils.convertStringToDateFormat(
patientInfo.arrivedOn, patientInfo.arrivedOn,
'MM-dd-yyyy HH:mm'), 'MM-dd-yyyy HH:mm'),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, 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