merge-requests/195/head
hussam al-habibeh 5 years ago
parent 7de6a8e99f
commit cbb8937b1d

@ -242,7 +242,6 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'لا يوجد اي نتائج' 'ar': 'لا يوجد اي نتائج'
}, },
'typeMedicineName': {'en': 'Type Medicine Name', 'ar': 'اكتب اسم الدواء'}, 'typeMedicineName': {'en': 'Type Medicine Name', 'ar': 'اكتب اسم الدواء'},
'moreThan3Letter': { 'moreThan3Letter': {
'en': 'Medicine Name Should Be More Than 3 letter', 'en': 'Medicine Name Should Be More Than 3 letter',
'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف' 'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف'
@ -250,8 +249,5 @@ const Map<String, Map<String, String>> localizedValues = {
'gender2': {'en': 'Gender: ', 'ar': 'الجنس: '}, 'gender2': {'en': 'Gender: ', 'ar': 'الجنس: '},
'age2': {'en': 'Age: ', 'ar': 'العمر: '}, 'age2': {'en': 'Age: ', 'ar': 'العمر: '},
'referralPatient': {'en': 'Referral Patient', 'ar': 'المريض المحال '}, 'referralPatient': {'en': 'Referral Patient', 'ar': 'المريض المحال '},
'replySuccessfully': { 'replySuccessfully': {'en': 'Reply Successfully', 'ar': 'تم الرد بنجاح'},
'en': 'Reply Successfully',
'ar': 'تم الرد بنجاح'
},
}; };

@ -40,9 +40,7 @@ class _LandingPageState extends State<LandingPage> {
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
backgroundColor: HexColor('#515B5D'), backgroundColor: HexColor('#515B5D'),
textTheme: TextTheme( textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
headline6:
TextStyle(color: Colors.white)),
title: Text(getText(currentTab).toUpperCase()), title: Text(getText(currentTab).toUpperCase()),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {

@ -95,19 +95,15 @@ class _ReferPatientState extends State<ReferPatientScreen> {
value: _selectedClinic, value: _selectedClinic,
iconSize: 40, iconSize: 40,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder: (BuildContext context) {
(BuildContext context) { return model.getClinicNameList().map((item) {
return model
.getClinicNameList()
.map((item) {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
AppText( AppText(
item, item,
fontSize: fontSize:
SizeConfig.textMultiplier * SizeConfig.textMultiplier * 2.1,
2.1,
), ),
], ],
); );
@ -117,24 +113,19 @@ class _ReferPatientState extends State<ReferPatientScreen> {
setState(() { setState(() {
_selectedDoctor = null; _selectedDoctor = null;
_selectedClinic = newValue; _selectedClinic = newValue;
var clinicInfo = model var clinicInfo = model.clinicsList
.clinicsList .where((i) => i['ClinicDescription']
.where((i) =>
i['ClinicDescription']
.toString() .toString()
.contains( .contains(_selectedClinic))
_selectedClinic))
.toList(); .toList();
clinicId = clinicInfo[0]['ClinicID'] clinicId =
.toString(); clinicInfo[0]['ClinicID'].toString();
model.getDoctorsList(clinicId); model.getDoctorsList(clinicId);
}) })
}, },
items: model items: model.getClinicNameList().map((item) {
.getClinicNameList()
.map((item) {
return DropdownMenuItem( return DropdownMenuItem(
value: item.toString(), value: item.toString(),
child: Text( child: Text(
@ -180,19 +171,15 @@ class _ReferPatientState extends State<ReferPatientScreen> {
value: _selectedDoctor, value: _selectedDoctor,
iconSize: 40, iconSize: 40,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder: (BuildContext context) {
(BuildContext context) { return model.getDoctorNameList().map((item) {
return model
.getDoctorNameList()
.map((item) {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
AppText( AppText(
item, item,
fontSize: fontSize:
SizeConfig.textMultiplier * SizeConfig.textMultiplier * 2.1,
2.1,
), ),
], ],
); );
@ -201,21 +188,18 @@ class _ReferPatientState extends State<ReferPatientScreen> {
onChanged: (newValue) => { onChanged: (newValue) => {
setState(() { setState(() {
_selectedDoctor = newValue; _selectedDoctor = newValue;
doctorsList = doctorsList = model.doctorsList;
model.doctorsList;
var doctorInfo = doctorsList var doctorInfo = doctorsList
.where((i) => i['DoctorName'] .where((i) => i['DoctorName']
.toString() .toString()
.contains(_selectedDoctor)) .contains(_selectedDoctor))
.toList(); .toList();
doctorId = doctorInfo[0]['DoctorID'] doctorId =
.toString(); doctorInfo[0]['DoctorID'].toString();
}) })
}, },
items: model items: model.getDoctorNameList().map((item) {
.getDoctorNameList()
.map((item) {
return DropdownMenuItem( return DropdownMenuItem(
value: item.toString(), value: item.toString(),
child: Text( child: Text(
@ -294,8 +278,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
value: _selectedReferralFrequancy, value: _selectedReferralFrequancy,
iconSize: 40, iconSize: 40,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder: (BuildContext context) {
(BuildContext context) {
return model return model
.getReferralNamesList() .getReferralNamesList()
.map((item) { .map((item) {
@ -305,8 +288,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
AppText( AppText(
item, item,
fontSize: fontSize:
SizeConfig.textMultiplier * SizeConfig.textMultiplier * 2.1,
2.1,
), ),
], ],
); );
@ -315,21 +297,17 @@ class _ReferPatientState extends State<ReferPatientScreen> {
onChanged: (newValue) => { onChanged: (newValue) => {
setState(() { setState(() {
_selectedReferralFrequancy = newValue; _selectedReferralFrequancy = newValue;
var freqInfo = model var freqInfo = model.referalFrequancyList
.referalFrequancyList .singleWhere((i) => i['Description']
.singleWhere((i) => i[
'Description']
.toString() .toString()
.contains( .contains(
_selectedReferralFrequancy)); _selectedReferralFrequancy));
freqId = freqInfo['ParameterCode'] freqId =
.toString(); freqInfo['ParameterCode'].toString();
myFocusNode.requestFocus(); myFocusNode.requestFocus();
}) })
}, },
items: model items: model.getReferralNamesList().map((item) {
.getReferralNamesList()
.map((item) {
return DropdownMenuItem( return DropdownMenuItem(
value: item.toString(), value: item.toString(),
child: Text( child: Text(
@ -371,29 +349,21 @@ class _ReferPatientState extends State<ReferPatientScreen> {
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
margin: 10, margin: 10,
visibility: visibility: isValid == null ? false : !isValid,
isValid == null ? false : !isValid,
), ),
// TODO replace AppButton with secondary button and add loading // TODO replace AppButton with secondary button and add loading
AppButton( AppButton(
title: TranslationBase
.of(context)
.send,
color: Color(PRIMARY_COLOR),
onPressed: () =>
{
referToDoctor(context, model)
},
title: TranslationBase.of(context).send, title: TranslationBase.of(context).send,
color: (Hexcolor("#B8382B")), color: Color(PRIMARY_COLOR),
onPressed: () => {referToDoctor(context)}, onPressed: () => {referToDoctor(context, model)},
) )
], ],
)) ))
], ],
), ),
), ),
),); ),
);
} }
Widget priorityBar(BuildContext _context) { Widget priorityBar(BuildContext _context) {
@ -460,7 +430,6 @@ class _ReferPatientState extends State<ReferPatientScreen> {
]); ]);
}).toList(), }).toList(),
), ),
),
); );
} }
@ -488,10 +457,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
return; return;
} }
final routeArgs = ModalRoute final routeArgs = ModalRoute.of(context).settings.arguments as Map;
.of(context)
.settings
.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
try { try {
@ -508,8 +474,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
selectedDoctorID: doctorId.toString(), selectedDoctorID: doctorId.toString(),
projectID: patient.projectId); projectID: patient.projectId);
// TODO: Add Translation // TODO: Add Translation
DrAppToastMsg.showSuccesToast( DrAppToastMsg.showSuccesToast('Reply Successfully');
'Reply Successfully');
Navigator.pop(context); Navigator.pop(context);
} catch (e) { } catch (e) {
DrAppToastMsg.showErrorToast(e); DrAppToastMsg.showErrorToast(e);

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "12.0.0" version: "14.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.40.6" version: "0.41.1"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -70,7 +70,7 @@ packages:
name: build_config name: build_config
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.4" version: "0.4.5"
build_daemon: build_daemon:
dependency: transitive dependency: transitive
description: description:
@ -84,7 +84,7 @@ packages:
name: build_modules name: build_modules
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
build_resolvers: build_resolvers:
dependency: transitive dependency: transitive
description: description:
@ -98,21 +98,21 @@ packages:
name: build_runner name: build_runner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.7" version: "1.10.9"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
name: build_runner_core name: build_runner_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.2" version: "6.1.4"
build_web_compilers: build_web_compilers:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: build_web_compilers name: build_web_compilers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.12.2" version: "2.15.3"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -161,7 +161,7 @@ packages:
name: checked_yaml name: checked_yaml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.4"
cli_util: cli_util:
dependency: transitive dependency: transitive
description: description:
@ -426,7 +426,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.2" version: "0.6.3-nullsafety.1"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -468,7 +468,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -622,7 +622,7 @@ packages:
name: pubspec_parse name: pubspec_parse
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.5" version: "0.1.7"
quiver: quiver:
dependency: transitive dependency: transitive
description: description:
@ -725,7 +725,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -767,7 +767,7 @@ packages:
name: timing name: timing
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.1+2" version: "0.1.1+3"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -860,5 +860,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.11.0-162.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save