Translations added

Dev_3.3_InPatient_CR
haroon amjad 2 years ago
parent d251ca0e1c
commit 4afdf5545e

@ -1921,4 +1921,9 @@ const Map localizedValues = {
"birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract.", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"},
"placeOrder": {"en": "Place Order", "ar": "مكان الامر"},
"isFasting": {"en": "Are you fasting?", "ar": "هل أنت صائم؟"},
"noGeneralInstructions": {"en": "You do not have any general instructions right now.", "ar": "ليس لديك أي تعليمات عامة في الوقت الحالي."},
"noMedicalInstructions": {"en": "You do not have any medical instructions right now.", "ar": "ليس لديك أي تعليمات طبية في الوقت الحالي."},
"medicalInstructions": {"en": "Medical Instructions:", "ar": "تعليمات طبية:"},
"generalInstructions": {"en": "General Instructions:", "ar": "تعليمات عامة:"},
};

@ -28,10 +28,10 @@ class GeneralInstructions extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.all(21.0),
child: Text("General Instructions",
child: Text(TranslationBase.of(context).generalInstructions,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 14.0,
fontSize: 21.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
@ -42,7 +42,7 @@ class GeneralInstructions extends StatelessWidget {
width: MediaQuery.of(context).size.width,
child: Card(
elevation: 0.0,
margin: EdgeInsets.all(16),
margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_p
import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart';
import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
@ -238,8 +239,12 @@ class InPatientServicesHome extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(context);
service.getBirthNotification(projectViewModel.user.patientID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['birthNotification']);
Navigator.push(context, FadePage(page: BirthNotification()));
if(res["MessageStatus"] == 1) {
print(res['birthNotification']);
Navigator.push(context, FadePage(page: BirthNotification()));
} else {
AppToast.showErrorToast(message: res["endUserMessage"]);
}
}).catchError((err) {
print(err);
});
@ -249,13 +254,17 @@ class InPatientServicesHome extends StatelessWidget {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getGeneralInstructions(projectViewModel.inPatientProjectID, context).then((res) {
List<GetGeneralInstructions> getGeneralInstructionsList = [];
res['generalInstructions'].forEach((v) {
getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v));
});
GifLoaderDialogUtils.hideDialog(context);
print(res['generalInstructions']);
Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList)));
if (res['generalInstructions'].length != 0) {
List<GetGeneralInstructions> getGeneralInstructionsList = [];
res['generalInstructions'].forEach((v) {
getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v));
});
GifLoaderDialogUtils.hideDialog(context);
print(res['generalInstructions']);
Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noGeneralInstructions);
}
}).catchError((err) {
print(err);
});
@ -265,13 +274,17 @@ class InPatientServicesHome extends StatelessWidget {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) {
List<GetMedicalInstructions> getMedicalInstructionsList = [];
res['MedicalInstruction'].forEach((v) {
getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v));
});
GifLoaderDialogUtils.hideDialog(context);
print(res['MedicalInstruction']);
Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList)));
if (res['MedicalInstruction'].length != 0) {
List<GetMedicalInstructions> getMedicalInstructionsList = [];
res['MedicalInstruction'].forEach((v) {
getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v));
});
GifLoaderDialogUtils.hideDialog(context);
print(res['MedicalInstruction']);
Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noMedicalInstructions);
}
}).catchError((err) {
print(err);
});

@ -35,7 +35,7 @@ class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
children: [
Padding(
padding: const EdgeInsets.all(21.0),
child: Text("Medical Instructions",
child: Text(TranslationBase.of(context).medicalInstructions,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 21.0,
@ -49,7 +49,7 @@ class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
width: MediaQuery.of(context).size.width,
child: Card(
elevation: 0.0,
margin: EdgeInsets.all(16),
margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),

@ -2926,6 +2926,10 @@ class TranslationBase {
String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode];
String get placeOrder => localizedValues["placeOrder"][locale.languageCode];
String get isFasting => localizedValues["isFasting"][locale.languageCode];
String get noGeneralInstructions => localizedValues["noGeneralInstructions"][locale.languageCode];
String get noMedicalInstructions => localizedValues["noMedicalInstructions"][locale.languageCode];
String get medicalInstructions => localizedValues["medicalInstructions"][locale.languageCode];
String get generalInstructions => localizedValues["generalInstructions"][locale.languageCode];
}

Loading…
Cancel
Save