diff --git a/lib/config/config.dart b/lib/config/config.dart index 06768cbc..98393a63 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,8 +4,8 @@ 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://uat.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"; const PATIENT_PROGRESS_NOTE_URL = diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 9fa9c35c..e6722ec9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -377,7 +377,10 @@ const Map> localizedValues = { 'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'}, 'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'}, 'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'}, - 'yourBodyMassIndex': {'en': "Your Body Mass Index is", 'ar': 'مؤشر كتلة جسمك هو'}, + 'yourBodyMassIndex': { + 'en': "Your Body Mass Index is", + 'ar': 'مؤشر كتلة جسمك هو' + }, 'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'}, 'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'}, 'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'}, @@ -816,4 +819,6 @@ const Map> localizedValues = { "en": "Extend Sick Leave Request", "ar": "تمديد طلب الإجازة المرضية" }, + "accepted": {"en": "Accepted", "ar": "وافقت"}, + "cancelled": {"en": "Cancelled", "ar": "ألغيت"}, }; diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index 72aed198..8981f374 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -79,11 +79,13 @@ class AddRescheduleLeavScreen extends StatelessWidget { decoration: BoxDecoration( border: Border( left: BorderSide( - color: item.status == 1 + color: item.status == 10 ? Colors.green : item.status == 2 ? HexColor('#CC9B14') - : Colors.red[800], + : item.status == 9 + ? Colors.red[800] + : Colors.red, width: 5.0, ))), padding: EdgeInsets.only(left: 10, right: 10), @@ -107,23 +109,30 @@ class AddRescheduleLeavScreen extends StatelessWidget { margin: EdgeInsets.only(top: 10), child: AppText( - item.status == 1 + item.status == 10 ? TranslationBase.of( context) - .approved + .accepted : item.status == 2 ? TranslationBase.of( context) .pending - : TranslationBase.of( - context) - .rejected, + : item.status == 9 + ? TranslationBase + .of( + context) + .rejected + : TranslationBase + .of(context) + .cancelled, fontWeight: FontWeight.bold, - color: item.status == 1 + color: item.status == 10 ? Colors.green : item.status == 2 ? HexColor('#CC9B14') - : Colors.red[800], + : item.status == 9 + ? Colors.red[800] + : Colors.red, fontSize: 14, ), ), diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 7ff65bb1..7b12e360 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -648,12 +648,16 @@ class TranslationBase { String get leanBodyWeight => localizedValues['leanBodyWeight'][locale.languageCode]; - String get bodyMassIndex => localizedValues['bodyMassIndex'][locale.languageCode]; + String get bodyMassIndex => + localizedValues['bodyMassIndex'][locale.languageCode]; - String get yourBodyMassIndex => localizedValues['yourBodyMassIndex'][locale.languageCode]; - String get bmiUnderWeight => localizedValues['bmiUnderWeight'][locale.languageCode]; + String get yourBodyMassIndex => + localizedValues['yourBodyMassIndex'][locale.languageCode]; + String get bmiUnderWeight => + localizedValues['bmiUnderWeight'][locale.languageCode]; String get bmiHealthy => localizedValues['bmiHealthy'][locale.languageCode]; - String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; + String get bmiOverWeight => + localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode]; @@ -1193,6 +1197,8 @@ class TranslationBase { String get updateReschedule => localizedValues['update-reschedule'][locale.languageCode]; String get sickLeave => localizedValues['sick_leave'][locale.languageCode]; + String get accepted => localizedValues['accepetd'][locale.languageCode]; + String get cancelled => localizedValues['cancelled'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate {