Merge branch 'sultan' into 'development'

dashboard issue

See merge request Cloud_Solution/doctor_app_flutter!326
merge-requests/327/merge
Mohammad Aljammal 5 years ago
commit 63a68b81f1

@ -738,4 +738,5 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "A Sick leave is on Hold status for this patient", 'en': "A Sick leave is on Hold status for this patient",
'ar': "الإجازة المرضية في حالة الانتظار لهذا المريض" 'ar': "الإجازة المرضية في حالة الانتظار لهذا المريض"
}, },
'no-clinic': {'en': "No Clinic", 'ar': "لا عيادة"}
}; };

@ -62,7 +62,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
bool isExpanded = false; bool isExpanded = false;
String isInpatient = ""; String isInpatient = "";
var clinicName = []; var clinicName = [];
var clinicId = 1; var clinicId;
void didChangeDependencies() async { void didChangeDependencies() async {
super.didChangeDependencies(); super.didChangeDependencies();
if (_isInit) { if (_isInit) {
@ -144,12 +144,16 @@ class _DashboardScreenState extends State<DashboardScreen> {
Container( Container(
width: MediaQuery.of(context).size.width * .6, width: MediaQuery.of(context).size.width * .6,
// height: 100, // height: 100,
child: DropdownButtonHideUnderline( child: projectsProvider.doctorClinicsList.length > 0
? DropdownButtonHideUnderline(
child: DropdownButton( child: DropdownButton(
dropdownColor: Colors.white, dropdownColor: Colors.white,
iconEnabledColor: Colors.white, iconEnabledColor: Colors.white,
isExpanded: true, isExpanded: true,
value: clinicId, value: clinicId == null
? projectsProvider
.doctorClinicsList[0].clinicID
: clinicId,
iconSize: 25, iconSize: 25,
elevation: 16, elevation: 16,
selectedItemBuilder: (BuildContext context) { selectedItemBuilder: (BuildContext context) {
@ -160,7 +164,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: <Widget>[ children: <Widget>[
AppText( AppText(
item.clinicName, item.clinicName,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize:
SizeConfig.textMultiplier * 2.1,
color: Colors.white, color: Colors.white,
), ),
], ],
@ -171,7 +176,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
clinicId = newValue; clinicId = newValue;
changeClinic(newValue, context); changeClinic(newValue, context);
}, },
items: projectsProvider.doctorClinicsList.map((item) { items: projectsProvider.doctorClinicsList
.map((item) {
return DropdownMenuItem( return DropdownMenuItem(
child: Text( child: Text(
item.clinicName, item.clinicName,
@ -180,7 +186,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
value: item.clinicID, value: item.clinicID,
); );
}).toList(), }).toList(),
)), ))
: AppText(TranslationBase.of(context).noClinic),
), ),
), ),
// InkWell( // InkWell(

@ -1118,9 +1118,11 @@ class TranslationBase {
String get admissionRequestSuccessMsg => String get admissionRequestSuccessMsg =>
localizedValues['admissionRequestSuccessMsg'][locale.languageCode]; localizedValues['admissionRequestSuccessMsg'][locale.languageCode];
String get infoStatus => localizedValues['infoStatus'][locale.languageCode]; String get infoStatus => localizedValues['infoStatus'][locale.languageCode];
String get doctorResponse => localizedValues['doctorResponse'][locale.languageCode]; String get doctorResponse =>
String get sickleaveonhold => localizedValues['doctorResponse'][locale.languageCode];
String get sickleaveonhold =>
localizedValues['sickleaveonhold'][locale.languageCode]; localizedValues['sickleaveonhold'][locale.languageCode];
String get noClinic => localizedValues['no-clinic'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save