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_LETTERS = "[a-zA-Z &'\"]";
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 PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
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_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
@ -246,7 +247,6 @@ const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -394,7 +394,7 @@ const Map<String, Map<String, String>> localizedValues = {
'painManagement': {'en': "Pain Management", 'ar': 'إدارة الألم'},
'holiday': {'en': "Holiday", 'ar': 'يوم الاجازة'},
'to': {'en': "To", 'ar': 'إلى'},
'coveringDoctor': {'en': "Covering Doctor", 'ar': 'تغطية دكتور'},
'coveringDoctor': {'en': "Covering Doctor: ", 'ar': ' :تغطية دكتور'},
'requestLeave': {'en': 'Request Leave', 'ar': 'طلب إجازة'},
'pleaseEnterDate': {
'en': 'Please enter leave start date',
@ -785,7 +785,21 @@ const Map<String, Map<String, String>> localizedValues = {
"prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
"notes": {"en": "Notes", "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(
child: this.isView == false
? AppText(
'Search With Other Critearia',
TranslationBase.of(context)
.searchWithOther,
color: Colors.red,
fontWeight: FontWeight.bold,
)
: AppText('Hide Other Criteria',
: AppText(
TranslationBase.of(context)
.hideOtherCriteria,
color: Colors.red,
fontWeight: FontWeight.bold),
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_texts_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:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
@ -18,287 +20,251 @@ class AddRescheduleLeavScreen extends StatelessWidget {
Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return BaseView<SickLeaveViewModel>(
onModelReady: (model) =>
{model.getRescheduleLeave(), model.getCoveringDoctors()},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).rescheduleLeaves,
body: model.getReschduleLeave.length > 0
? SingleChildScrollView(
onModelReady: (model) =>
{model.getRescheduleLeave(), model.getCoveringDoctors()},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).rescheduleLeaves,
body: Column(children: [
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(
children: [
SizedBox(height: 50),
Container(
margin:
EdgeInsets.only(left: 15, right: 15, top: 20),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
child: Row(
children: [
Expanded(
flex: 4,
child: AppText(
TranslationBase.of(context)
.requestLeave),
),
IconButton(
icon: Icon(
Icons.add_circle,
color: Colors.red,
))
],
)
// 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(
context,
false,
);
},
)
],
),
),
Column(
children: model.getReschduleLeave.map<Widget>(
(GetRescheduleLeavesResponse item) {
return CardWithBgWidgetNew(
widget: Column(
children: [
Container(
padding:
EdgeInsets.only(left: 10, right: 10),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 4,
child: Wrap(
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Container(
padding:
EdgeInsets.all(3),
child: AppText(
item.status == 1
? TranslationBase
.of(context)
.approved
: item.status == 2
? TranslationBase.of(
context)
.pending
: TranslationBase.of(
context)
.rejected,
fontWeight:
FontWeight.bold,
color: Colors.white,
),
color: item.status == 1
? Colors.green
: item.status == 2
? Colors
.yellow[800]
: Colors.red[800],
),
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,
),
decoration: BoxDecoration(
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(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 4,
child: Wrap(
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.all(3),
margin: EdgeInsets.only(top: 10),
child: AppText(
item.status == 1
? TranslationBase.of(
context)
.approved
: item.status == 2
? TranslationBase.of(
context)
.pending
: TranslationBase.of(
context)
.rejected,
fontWeight: FontWeight.bold,
color: item.status == 1
? Colors.green
: item.status == 2
? HexColor('#CC9B14')
: Colors.red[800],
fontSize: 14,
),
),
SizedBox(
height: 5,
),
Container(
child: AppText(
item.requisitionType == 1
? TranslationBase.of(context)
.offTime
: TranslationBase.of(context)
.holiday +
' ',
fontWeight: 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(
children: [
AppText(
TranslationBase.of(context)
.endDate),
AppText(
DateUtils
.convertStringToDateFormat(
item.dateTimeTo,
'yyyy-MM-dd HH:mm'),
fontWeight: FontWeight.bold,
)
],
),
SizedBox(
height: 5,
),
model.coveringDoctors.length > 0
? Row(children: [
AppText(
TranslationBase.of(
context)
.coveringDoctor,
fontWeight:
FontWeight.bold,
),
model.coveringDoctors
.length >
0
? Row(children: [
AppText(getDoctor(
model
.coveringDoctors,
item.coveringDoctorId))
])
: SizedBox(),
AppText(
TranslationBase.of(
context)
.reasons,
getDoctor(
model.coveringDoctors,
item.coveringDoctorId),
fontWeight:
FontWeight.bold,
),
model.allReasons.length > 0
? Row(children: [
AppText(getReasons(
model
.allReasons,
item.reasonId))
])
: SizedBox(),
],
),
SizedBox(
width: 10,
),
],
),
),
(item.status == 2)
? Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.edit_outlined,
size: 30,
),
// color: Colors.green, //Colors.black,
onPressed: () => {
openLeave(context, true,
extendedData: item)
},
))
: SizedBox(),
],
)),
SizedBox(
height: 10,
),
Divider(
height: 1,
)
])
: SizedBox(),
// AppText(
// TranslationBase.of(context)
// .reasons,
// fontWeight: FontWeight.bold,
// ),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Padding(
padding: EdgeInsets.only(
bottom: 5),
child: AppText(getReasons(
model.allReasons,
item.reasonId))),
(item.status == 2)
? IconButton(
icon: Image.asset(
'assets/images/edit.png'),
// color: Colors.green, //Colors.black,
onPressed: () => {
openLeave(
context, true,
extendedData:
item)
},
)
: SizedBox(),
]),
],
),
SizedBox(
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}) {
showModalBottomSheet(
context: context,
builder: (context) {
return new Container(
child: RescheduleLeaveScreen(
isExtend,
extendedData,
));
});
// showModalBottomSheet(
// context: context,
// builder: (context) {
// return new Container(
// child: RescheduleLeaveScreen(
// isExtend,
// extendedData,
// ));
// });
Navigator.push(
context,
FadePage(
page: RescheduleLeaveScreen(
isExtend,
extendedData,
),
),
);
}
getDoctor(model, doctorId) {

@ -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 {

@ -1145,26 +1145,45 @@ class TranslationBase {
String get billNo => localizedValues['BillNo'][locale.languageCode];
String get labResults => localizedValues['labResults'][locale.languageCode];
String get sendSuc => localizedValues['sendSuc'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode];
String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode];
String get specialResult =>
localizedValues['SpecialResult'][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 reschedule => localizedValues['reschedule'][locale.languageCode];
String get leaves => localizedValues['leaves'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
String get totalApproval => localizedValues['totalApproval'][locale.languageCode];
String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode];
String get totalApproval =>
localizedValues['totalApproval'][locale.languageCode];
String get procedureStatus =>
localizedValues['procedureStatus'][locale.languageCode];
String get unusedCount => localizedValues['unusedCount'][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 prescriptions => localizedValues['prescriptions'][locale.languageCode];
String get prescriptions =>
localizedValues['prescriptions'][locale.languageCode];
String get notes => localizedValues['notes'][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> {

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

Loading…
Cancel
Save