add translations to child Vaccination

merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
parent fa01d132c7
commit 49974f81db

@ -1069,4 +1069,64 @@ const Map localizedValues = {
"ar": "أرسل التقرير" "ar": "أرسل التقرير"
}, },
"vaccination": {
"en": "Vaccination",
"ar": "جدول التطعيمات"
},
"welcomeBack": {
"en": "Welcome back",
"ar": "مرحبا مرة أخرى"
},
"instructions": {
"en": "Please ensure that the email address is up-to-date and process to view the schedule",
"ar": "يرجى التأكد من صحة عنوان البريد الالكتروني و المتابعة لعرض الجدول "
},
"update-email": {
"en": "Update Email",
"ar": "تحديث البريد الالكتروني"
},
"updated-email": {
"en": "Updated email successfully",
"ar": "تم تحديث البريد الالكتروني"
},
"view-list-children": {
"en": "View List of Children",
"ar": "عرض قائمة الأطفال"
},
"add-child": {
"en": "Add New Child",
"ar": "اضافة طفل"
},
"child-name": {
"en": "Child Name",
"ar": "اسم الطفل"
},
"childDob": {
"en": "Birth Date",
"ar": "تاريخ الولادة"
},
"delete": {
"en": "Delete",
"ar": "حذف"
},
"deleted-child": {
"en": "The request was successful. The children have removed from the vaccination schedule subscription service.",
"ar": "تم حذف الطفل بنجاح"
},
"visit": {
"en": "Visit",
"ar": "زيارة"
},
"description-vaccination": {
"en": "Description",
"ar": "وصف"
},
"due-date": {
"en": "Due date",
"ar": "تاريخ الاستحقاق"
},
}; };

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccin
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -32,7 +33,7 @@ class ChildDetailsWidget extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Row(children: [ Row(children: [
Texts("CHILD NAME"), Texts(TranslationBase.of(context).childName),
]), ]),
Row(children: [ Row(children: [
Texts(babyInfo.babyName.trim()), Texts(babyInfo.babyName.trim()),
@ -44,10 +45,6 @@ class ChildDetailsWidget extends StatelessWidget {
: 'assets/images/new-design/female.png'), : 'assets/images/new-design/female.png'),
tooltip: '', tooltip: '',
onPressed: () { onPressed: () {
// setState(() {
// // _volume += 10;
// // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// });
}, },
), ),
Texts(babyInfo.genderDescription), Texts(babyInfo.genderDescription),
@ -61,14 +58,14 @@ class ChildDetailsWidget extends StatelessWidget {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: VaccinationTablePage(), page: VaccinationTablePage(babyInfo: babyInfo,),
), ),
); );
}, },
) )
]), ]),
Row(children: [ Row(children: [
Texts("Birthday"), Texts(TranslationBase.of(context).childDob),
]), ]),
Row( Row(
children: [ children: [
@ -92,14 +89,14 @@ class ChildDetailsWidget extends StatelessWidget {
await model.deleteBabyOrders(newChild: deleteBaby); await model.deleteBabyOrders(newChild: deleteBaby);
if (model.isDeleted) { if (model.isDeleted) {
AppToast.showSuccessToast(message: "Record Deleted"); AppToast.showSuccessToast(message: TranslationBase.of(context).deletedChild);
Navigator.pop(context, model.isDeleted); Navigator.pop(context, model.isDeleted);
} else { } else {
//TODO handling error //TODO handling error
} }
}, },
), ),
Texts("Delete"), Texts(TranslationBase.of(context).delete),
]), ]),
SizedBox( SizedBox(
height: 12, height: 12,

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -20,7 +21,7 @@ class ChildPage extends StatefulWidget {
@override @override
_ChildPageState createState() => _ChildPageState(); _ChildPageState createState() => _ChildPageState();
} }
//TODO
class _ChildPageState extends State<ChildPage> class _ChildPageState extends State<ChildPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
DeleteBaby deleteBaby = DeleteBaby(); DeleteBaby deleteBaby = DeleteBaby();
@ -32,7 +33,7 @@ class _ChildPageState extends State<ChildPage>
onModelReady: (model) => model.getNewUserOrders(), onModelReady: (model) => model.getNewUserOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: " Vaccination", appBarTitle: TranslationBase.of(context).vaccination,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -46,7 +47,7 @@ class _ChildPageState extends State<ChildPage>
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: MediaQuery.of(context).size.width / childAspectRatio: MediaQuery.of(context).size.width /
(MediaQuery.of(context).size.height / 1.25), (MediaQuery.of(context).size.height / 1.45),
), ),
itemCount: model.babyInformationModelList.length, itemCount: model.babyInformationModelList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
@ -77,7 +78,7 @@ class _ChildPageState extends State<ChildPage>
74, 74,
1, 1,
), ),
label: "ADD NEW CHILD ", label: TranslationBase.of(context).addChild,
// //
onTap: () { onTap: () {
Navigator.push( Navigator.push(

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_mod
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
@ -30,8 +31,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: " Vaccination", appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Column( child: Column(
@ -41,12 +41,11 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Container( child: Container(
child: Texts( child: Texts(
"Welcome back", TranslationBase.of(context).welcomeBackV,
fontSize: 20, fontSize: 20,
), ),
), ),
@ -63,12 +62,11 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Container( child: Container(
child: Texts( child: Texts(
"Please ensure that the email address is up-to-date and process to view the schedule", TranslationBase.of(context).instructions,
fontSize: 20, fontSize: 20,
), ),
), ),
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
indent: 10, indent: 10,
@ -115,11 +113,12 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
74, 74,
1, 1,
), ),
label: "UPDATE EMAIL", label: TranslationBase.of(context).updateEmail,
// //
onTap: () { onTap: () {
model.user.emailAddress = addEmail.toString(); model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast(message: "Email updated"); AppToast.showSuccessToast(
message: TranslationBase.of(context).updatedEmail);
// bloodDetails.city=_selectedHospital.toString(); // bloodDetails.city=_selectedHospital.toString();
// bloodDetails. // bloodDetails.
@ -138,7 +137,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
74, 74,
1, 1,
), ),
label: " VIEW LIST OF CHILDREN", label: TranslationBase.of(context).viewListChildren,
// //
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -148,7 +147,6 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
), ),
), ),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.15, height: MediaQuery.of(context).size.height * 0.15,
) )

@ -14,6 +14,7 @@ class SelectGenderDialog extends StatefulWidget {
} }
class _SelectGenderDialogState extends State<SelectGenderDialog> { class _SelectGenderDialogState extends State<SelectGenderDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(

@ -1,101 +1,154 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dialogs/SelectGenderDialog.dart'; import 'dialogs/SelectGenderDialog.dart';
class VaccinationTablePage extends StatelessWidget { class VaccinationTablePage extends StatelessWidget {
final List_BabyInformationModel babyInfo;
const VaccinationTablePage({Key key, this.babyInfo}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var checkedValue; var checkedValue;
return BaseView<VaccinationTableViewModel>( return BaseView<VaccinationTableViewModel>(
onModelReady: (model) => model.getCreateVaccinationTable(),//getUserTermsAndConditions(), onModelReady: (model) => model.getCreateVaccinationTable(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: "Vaccination", appBarTitle: TranslationBase.of(context).vaccination,
body: SingleChildScrollView( body: SingleChildScrollView(
child:Container( child: Container(
margin: EdgeInsets.only(left: 15,right: 15,top: 70), margin: EdgeInsets.only(left: 15, right: 15, top: 10),
child: Column( child: Column(
children: [//babyInformationModelList.length crossAxisAlignment: CrossAxisAlignment.start,
...List.generate(model.creteVaccinationTableModelList.length, (index) => children: [
Container( Row(
decoration: BoxDecoration( children: [
shape: BoxShape.rectangle, Expanded(
border: Border.all(color: Colors.white, width: 0.5), child: Column(
borderRadius: BorderRadius.all(Radius.circular(5)), children: [
color: Colors.white, Texts(TranslationBase.of(context).childName),
Texts(babyInfo.babyName??'',fontWeight: FontWeight.w600,),
],
),
),
Expanded(
child: Column(children: [
Texts(TranslationBase.of(context).childDob),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(FontAwesomeIcons.calendarCheck,color: Colors.red,),
SizedBox(width: 15,),
Texts(DateUtil.yearMonthDay(babyInfo.dOB)??''),
],
),
],
),
),
],
),
SizedBox(height: 15,),
Divider(),
Column(
children: [
Row(
children: [
Texts(TranslationBase.of(context).visit),
SizedBox(
width: 10,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(TranslationBase.of(context).descriptionVaccination),
],
),
), ),
padding: EdgeInsets.all(12), Texts(TranslationBase.of(context).dueDate),
width: double.infinity, ],
child: Column( ),
],
),
...List.generate(
model.creteVaccinationTableModelList.length,
(index) => Container(
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// border: Border.all(color: Colors.white, width: 0.5),
// borderRadius: BorderRadius.all(Radius.circular(5)),
// // color: Colors.white,
// ),
padding: EdgeInsets.all(12),
width: double.infinity,
child: Column(
children: [
Row(
children: [ children: [
Row(children: [ Texts(model
Text(model.creteVaccinationTableModelList[index].visit), .creteVaccinationTableModelList[index].visit),
SizedBox(width: 10,), SizedBox(
width: 10,
Expanded( ),
child: Column( Expanded(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Html( children: [
// data:"<html><head><style type='text/css'>.Test {list-style-image:url('http://10.50.100.198:4444/Images/Bullet_List_Small.png');}</style></head><body><table><tr align='left'><td align='left'>BCG</td></tr><tr align='left'><td align='left'>HEPATITIS B</td></tr></table></body></html>"//model.creteVaccinationTableModelList[index].vaccinesDescription Html(
data:model.creteVaccinationTableModelList[index].vaccinesDescription, data: model.creteVaccinationTableModelList[index].vaccinesDescription,
),
), ],
],), ),
), ),
Text(model.creteVaccinationTableModelList[index].givenAt), Texts(model.creteVaccinationTableModelList[index].givenAt),
],),
Divider(color:Colors.black ,),
], ],
) ),
Divider(
color: Colors.white,height: 3,thickness: 1.0,
) ),
],
),
),
) )
], ],
), ),
),
), ),
), bottomSheet: Padding(
bottomSheet: Container( padding: const EdgeInsets.all(8.0),
height: MediaQuery.of(context).size.height * 0.12, child: Container(
width: double.infinity, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), color: checkedValue == false
label: "Send Email ", ? Colors.white24
// : Color.fromRGBO(63, 72, 74, 1,),
onTap: () { label: TranslationBase.of(context).sendEmail,
//SelectGenderDialog(); onTap: () {
//=============== showDialog(
showDialog( context: context,
context: context, child: SelectGenderDialog(),
child: SelectGenderDialog( );
), },
); ),
//=========
}
), ),
), ),
), ),

@ -875,6 +875,20 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get report => localizedValues['report'][locale.languageCode]; String get report => localizedValues['report'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode]; String get openRad => localizedValues['open-rad'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get vaccination => localizedValues['vaccination'][locale.languageCode];
String get welcomeBackV => localizedValues['welcomeBack'][locale.languageCode];
String get instructions => localizedValues['instructions'][locale.languageCode];
String get updateEmail => localizedValues['update-email'][locale.languageCode];
String get updatedEmail => localizedValues['updated-email'][locale.languageCode];
String get viewListChildren => localizedValues['view-list-children'][locale.languageCode];
String get addChild => localizedValues['add-child'][locale.languageCode];
String get childName => localizedValues['child-name'][locale.languageCode];
String get childDob => localizedValues['childDob'][locale.languageCode];
String get delete => localizedValues['delete'][locale.languageCode];
String get deletedChild => localizedValues['deleted-child'][locale.languageCode];
String get visit => localizedValues['visit'][locale.languageCode];
String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode];
String get dueDate => localizedValues['due-date'][locale.languageCode];
} }

Loading…
Cancel
Save