From 98947d5f6b6525da5815946a22e7c4e06b93e8cf Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 4 Oct 2020 10:06:48 +0300 Subject: [PATCH 01/16] Blood Denote --- .../AlHabibMedicalService/all_habib_medical_service_page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 8b04bc31..e0f07385 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/Blood/advance_payment_page.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/family/my-family.dart'; @@ -188,7 +189,7 @@ class _AllHabibMedicalServiceState extends State { ServicesContainer( onTap: () => Navigator.push( context, - FadePage(), + FadePage(page: ChildVaccinesPage()), ), imageLocation: 'assets/images/new-design/children_vaccines_icon.png', From 20ef255ee6bf0834f93ac62b398992c2bd920a6f Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 4 Oct 2020 10:22:12 +0300 Subject: [PATCH 02/16] Blood Denote --- lib/core/viewModels/base_view_model.dart | 2 +- lib/pages/ChildVaccines/child_vaccines_page.dart | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 lib/pages/ChildVaccines/child_vaccines_page.dart diff --git a/lib/core/viewModels/base_view_model.dart b/lib/core/viewModels/base_view_model.dart index 3d7122bd..d19905f7 100644 --- a/lib/core/viewModels/base_view_model.dart +++ b/lib/core/viewModels/base_view_model.dart @@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/material.dart'; -class BaseViewModel extends ChangeNotifier { +class BaseViewModel extends ChangeNotifier { ViewState _state = ViewState.Idle; bool isInternetConnection = true; bool isLogin = false; diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart new file mode 100644 index 00000000..07031ceb --- /dev/null +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -0,0 +1,15 @@ + +import 'package:flutter/cupertino.dart'; + +class ChildVaccinesPage extends StatefulWidget { + @override + _ChildVaccinesPageState createState() => _ChildVaccinesPageState(); +} + +class _ChildVaccinesPageState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} + From db19eec35f03ce48574fb3ba2e0788b21087452d Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 4 Oct 2020 13:12:31 +0300 Subject: [PATCH 03/16] Blood Denote --- .../ChildVaccines/child_vaccines_page.dart | 430 +++++++++++++++++- 1 file changed, 429 insertions(+), 1 deletion(-) diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index 07031ceb..cec04f12 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -1,5 +1,13 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; class ChildVaccinesPage extends StatefulWidget { @override @@ -7,9 +15,429 @@ class ChildVaccinesPage extends StatefulWidget { } class _ChildVaccinesPageState extends State { + TextEditingController titleController = TextEditingController(); + var checkedValue=false; + String addEmail=""; @override Widget build(BuildContext context) { - return Container(); + + return BaseView( + onModelReady: (model) => model.getCities(),//model.getHospitals(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 20, + ), + + Padding( + padding: const EdgeInsets.all(10.0), + child:Container( + child: Texts("Welcome back",fontSize: 20,), + ) , + ), + Divider(color:Colors.black ,), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child:Container( + child: Texts("Please ensure that the email address is up-to-date and process to view the schedule",fontSize: 20,), + ) , + ), + + Divider(color:Colors.black ,), + Padding( + padding: const EdgeInsets.all(10.0), + child:Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: model.user.emailAddress,//'Title', + controller: titleController, + fontSize: 20, + hintColor: Colors.black, + fontWeight: FontWeight.w600, + onChanged: (text) { + addEmail=text; + model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true; + // checkedValue=true; + // print("First text field: $text"); + // print("First text field:"+ model.user.emailAddress); + + }, + validator: (value) { + + if (value == null) + { + return model.user.emailAddress; + + } + else + + { + return model.user.emailAddress;} + }, + ), + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), + label: "UPDATE EMAIL", + // + onTap: (){ + model.user.emailAddress=model.user.emailAddress+addEmail.toString(); + AppToast.showSuccessToast( + message: "Email updated"); + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + + + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: Color.fromRGBO(63, 72, 74, 1,), + label: " VIEW LIST OF CHILDREN", + // + onTap: (){ + + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + + + ), + ), + // Texts( + // // TranslationBase.of(context).advancePaymentLabel, + // model.user.emailAddress, + // textAlign: TextAlign.center, + // ), + SizedBox( + height: 12, + ), + // InkWell( + // onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),//model.hospitals + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Texts(getHospitalName()), + // Icon(Icons.arrow_drop_down) + // ], + // ), + // ), + // ), + SizedBox( + height: 12, + ), + // InkWell( + // //======Gender======== + // onTap: () => confirmSelectGenderDialog(),//confirmSelectBeneficiaryDialog(model), + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // //Texts(getBeneficiaryType()), + // Texts(getGender()), + // Icon(Icons.arrow_drop_down) + // ], + // ), + // ), + // ), + // if (beneficiaryType == BeneficiaryType.MyFamilyFiles) + // SizedBox( + // height: 12, + // ), + // if (beneficiaryType == BeneficiaryType.MyFamilyFiles) + // InkWell( + // onTap: () { + // model.getFamilyFiles().then((value) { + // confirmSelectFamilyDialog(model + // .getAllSharedRecordsByStatusResponse + // .getAllSharedRecordsByStatusList); + // }).showProgressBar( + // text: "Loading", + // backgroundColor: Colors.blue.withOpacity(0.6)); + // }, + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Texts(getFamilyMembersName()), + // Icon(Icons.arrow_drop_down) + // ], + // ), + // ), + // ), + SizedBox( + height: 12, + ), + // InkWell( + // //======Gender======== + // onTap: () => confirmSelectBloodDialog(),//confirmSelectBeneficiaryDialog(model), + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // //Texts(getBeneficiaryType()), + // Texts(getBlood()), + // Icon(Icons.arrow_drop_down) + // ], + // ), + // ), + // ), + // if (beneficiaryType == BeneficiaryType.MyFamilyFiles) + // SizedBox( + // height: 12, + // ), + // if (beneficiaryType == BeneficiaryType.MyFamilyFiles) + // InkWell( + // onTap: () { + // model.getFamilyFiles().then((value) { + // confirmSelectFamilyDialog(model + // .getAllSharedRecordsByStatusResponse + // .getAllSharedRecordsByStatusList); + // }).showProgressBar( + // text: "Loading", + // backgroundColor: Colors.blue.withOpacity(0.6)); + // }, + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Texts(getFamilyMembersName()), + // Icon(Icons.arrow_drop_down) + // ], + // ), + // ), + // ), + SizedBox( + height: 12, + ), + // Row( + // children: [ + // Container( + // child: Text(" To view the terms and conditions "), + // ), + // SizedBox( + // width: MediaQuery.of(context).size.height * 0.10, + // ), + // // InkWell( + // // onTap: () { + // // Navigator.of(context).push(MaterialPageRoute( + // // builder: (BuildContext context) => UserAgreementPage())); + // // }, + // // child: Container( + // // child: Texts(" Click here ",color: Colors.blue,), + // // ), + // // ) + // ], + // ), + SizedBox( + height: 12, + ), + // Row( + // children: [ + // Checkbox( + // onChanged: (bool value) { + // setState(() { + // checkedValue = value; + // }); + // }, + // // tristate: checkedValue==true,//i == 1, + // value: checkedValue, + // activeColor: Colors.red,//Color(0xFF6200EE), + // ), + // SizedBox(height: 10,), + // Row(children: [ + // + // ],), + // SizedBox( + // width: 10, + // ), + // Text( + // 'I agree to the terms and conditions ', + // style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue? Colors.red : Colors.black), + // ), + // ], + // ), + // NewTextFields( + // hintText: TranslationBase.of(context).fileNumber, + // controller: _fileTextController, + // ), + // if (beneficiaryType == BeneficiaryType.OtherAccount) + // SizedBox( + // height: 12, + // ), + // if (beneficiaryType == BeneficiaryType.OtherAccount) + // InkWell( + // onTap: () { + // if (_fileTextController.text.isNotEmpty) + // model + // .getPatientInfoByPatientID( + // id: _fileTextController.text) + // .then((value) { + // confirmSelectPatientDialog(model.patientInfoList); + // }).showProgressBar( + // text: "Loading", + // backgroundColor: + // Colors.blue.withOpacity(0.6)); + // else + // AppToast.showErrorToast( + // message: 'Please Enter The File Number'); + // }, + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Texts(getPatientName()), + // Icon(Icons.arrow_drop_down) + // ], + // ), + // ), + // ), + // SizedBox( + // height: 12, + // ), + + // NewTextFields( + // hintText: TranslationBase.of(context).amount, + // keyboardType: TextInputType.number, + // onChanged: (value) { + // setState(() { + // amount = value; + // }); + // }, + // ), + // SizedBox( + // height: 12, + // ), + // NewTextFields( + // hintText: TranslationBase.of(context).depositorEmail, + // initialValue: model.user.emailAddress, + // onChanged: (value) { + // email = value; + // }, + // ), + // SizedBox( + // height: 12, + // ), + // NewTextFields( + // hintText: TranslationBase.of(context).notes, + // controller: _notesTextController, + // ), + SizedBox( + height: 10, + ), + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Center( + // child: Container( + // color: Colors.white, + // width: 350, + // child: InkWell( + // onTap: () { + // showDialog( + // context: context, + // builder: (_) => + // AssetGiffyDialog( + // title: Text( + // "", + // style: TextStyle( + // fontSize: 22.0, + // fontWeight: + // FontWeight + // .w600), + // ), + // image: Image.asset( + // 'assets/images/BloodChrt_EN.png'), + // buttonCancelText: + // Text('cancel'), + // buttonCancelColor: + // Colors.grey, + // onlyCancelButton: true, + // )); + // }, + // child: Container( + // width: 250, + // height: 200, + // child:Image.asset( + // 'assets/images/BloodChrt_EN.png')), + // ), + // ), + // ), + // ], + // ), + + SizedBox( + height: MediaQuery.of(context).size.height * 0.15, + ) + ], + ), + + ), + ), + ); } } From 9ab0d6688827fe1c7a67e78b8b4263e94acd7639 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 5 Oct 2020 09:17:38 +0300 Subject: [PATCH 04/16] child Vaccines --- .../childvaccines/child_vaccines_service.dart | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/core/service/childvaccines/child_vaccines_service.dart diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart new file mode 100644 index 00000000..dc317a3e --- /dev/null +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -0,0 +1,29 @@ + +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import '../base_service.dart'; + +class ChildVaccinesService extends BaseService{ + +List BabyInformationModelList = List(); + Map body = Map(); +Future getAllBabyInformationOrders() async { + hasError = false; + body['List_BabyInformationModel'] = false; + + + await baseAppClient.post(GET_BABYINFORMATION_REQUEST, + onSuccess: (dynamic response, int statusCode) { + BabyInformationModelList.clear(); + + response['List_BabyInformationModel'].forEach((vital) { + + BabyInformationModelList.add(List_BabyInformationModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); +} + +} \ No newline at end of file From 0e4ff1f804c5c0b7c9229b43eceecbc48d33055e Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 5 Oct 2020 12:37:24 +0300 Subject: [PATCH 05/16] child Vaccines --- .../childvaccines/child_vaccines_service.dart | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart index dc317a3e..d614f9a5 100644 --- a/lib/core/service/childvaccines/child_vaccines_service.dart +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -1,29 +1,30 @@ - import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import '../base_service.dart'; -class ChildVaccinesService extends BaseService{ - -List BabyInformationModelList = List(); +class ChildVaccinesService extends BaseService { + List babyInformationModelList = List(); + List userInformationModelList = List(); Map body = Map(); -Future getAllBabyInformationOrders() async { - hasError = false; - body['List_BabyInformationModel'] = false; - - - await baseAppClient.post(GET_BABYINFORMATION_REQUEST, - onSuccess: (dynamic response, int statusCode) { - BabyInformationModelList.clear(); - - response['List_BabyInformationModel'].forEach((vital) { - - BabyInformationModelList.add(List_BabyInformationModel.fromJson(vital)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + Future getAllBabyInformationOrders() async { + hasError = false; + body['isDentalAllowedBackend'] = false; + body['IsLogin'] = true; + //body['UserID'] = babyInformationModelList[0].userID; + body['UserID'] = 42843; + + + await baseAppClient.post(GET_BABYINFORMATION_REQUEST, + onSuccess: (dynamic response, int statusCode) { + babyInformationModelList.clear(); + + response['List_BabyInformationModel'].forEach((vital) { + babyInformationModelList.add(List_BabyInformationModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } } - -} \ No newline at end of file From 37b817e0c8377156b60314a2e2c0b41d82145386 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 5 Oct 2020 16:02:20 +0300 Subject: [PATCH 06/16] child Vaccines --- lib/pages/ChildVaccines/child_page.dart | 129 ++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 lib/pages/ChildVaccines/child_page.dart diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart new file mode 100644 index 00000000..e5a5058f --- /dev/null +++ b/lib/pages/ChildVaccines/child_page.dart @@ -0,0 +1,129 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ChildPage extends StatefulWidget { +//final List babyInformationModelList; + + // ChildPage({Key key, this.babyInformationModelList}) ; + + @override + _ChildPageState createState() => _ChildPageState(); +} + +class _ChildPageState extends State with SingleTickerProviderStateMixin { + @override + Widget build(BuildContext context) { + var checkedValue= false; + return BaseView( + onModelReady: (model) => model.getBabyInformatioRequestOrders(),//model.getCOC(),getFindUsRequestOrders() + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 15,right: 15,top: 70), + child: Column( + children: [ + ...List.generate(model.babyInformationModelList.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, + + ), + child: Column( + children: [ + Row(children:[Texts("CHILD NAME"),]), + Row(children:[Texts(model.babyInformationModelList[index].babyName),]), + + Row( + children: [IconButton( + icon: Icon(Icons.phone,color: Colors.red,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + Texts(model.babyInformationModelList[index].babyName), + IconButton( + icon: Icon(Icons.phone,color: Colors.red,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + )] + ), + Row(children:[Texts("Birthday"),]), + Row(children:[IconButton( + icon: Icon(Icons.phone,color: Colors.red,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + Texts(model.babyInformationModelList[index].dOB.toString()),]), + Row(children:[IconButton( + icon: Icon(Icons.phone,color: Colors.red,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + Texts("Birthday"),]), + ], + ) + + + ) + + ) + + ], + + + ) + ) + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), + label: "ADD NEW CHILD ", + // + onTap: (){ + + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + + + ), + ), + ) + ); + } +} From e14d619eddd036065dfb69a6c587861b5f5c8bd6 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Mon, 5 Oct 2020 16:33:07 +0300 Subject: [PATCH 07/16] child Vaccines --- .../images/new-design/calender-secondary.png | Bin 0 -> 16215 bytes assets/images/new-design/female.png | Bin 0 -> 2344 bytes assets/images/new-design/garbage.png | Bin 0 -> 1628 bytes assets/images/new-design/male.png | Bin 0 -> 6152 bytes lib/config/config.dart | 12 +++++ .../List_BabyInformationModel.dart | 45 ++++++++++++++++ .../childvaccines/user_information_model.dart | 48 ++++++++++++++++++ .../childvaccines/child_vaccines_service.dart | 2 +- .../user_information_service.dart | 34 +++++++++++++ .../child_vaccines_view_model.dart | 29 +++++++++++ .../user_information_view_model.dart | 25 +++++++++ lib/locator.dart | 8 +++ lib/pages/Blood/blood_donation.dart | 2 +- lib/pages/ChildVaccines/child_page.dart | 13 +++-- .../ChildVaccines/child_vaccines_page.dart | 29 ++++++++--- 15 files changed, 232 insertions(+), 15 deletions(-) create mode 100644 assets/images/new-design/calender-secondary.png create mode 100644 assets/images/new-design/female.png create mode 100644 assets/images/new-design/garbage.png create mode 100644 assets/images/new-design/male.png create mode 100644 lib/core/model/childvaccines/List_BabyInformationModel.dart create mode 100644 lib/core/model/childvaccines/user_information_model.dart create mode 100644 lib/core/service/childvaccines/user_information_service.dart create mode 100644 lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart create mode 100644 lib/core/viewModels/child_vaccines/user_information_view_model.dart diff --git a/assets/images/new-design/calender-secondary.png b/assets/images/new-design/calender-secondary.png new file mode 100644 index 0000000000000000000000000000000000000000..a790849d3f7979c473f5d489fe5b7d49aec72b3e GIT binary patch literal 16215 zcmV-dKd8WoP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3@DkzBcwh5y5fX9Bb^2Qp$kSo8NgxYd$P&Kt(E zXIhlF0?0ffktnnO_kWK0&wu{oYzWoFRBCQHTmHosoA3Nm?ep*X>1@2;@4p;h&$+LU zoA)O?4+VaP*Bkch^_|Dl#~aG)^=^E9+?4q`PJJE7y&w4g3p%rYf4#204ix`#SjdzhhxAR^oWU8^41KmhV|-30y&Fq4P8F-G$=yh~@Vf3g1I$ zKaZVx|MlD8z5n)Y>}-EM9=;BRvHA6a{B4Y0kGu5k@$h~c|K*C@$CvBfcn&d=`-rV@=Q;4YWTUZ9YPhmq2VjUecj97PUA&(SX4TbJ-)<91JM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S_0U+>O;EF(x9q{A7;y>g?_gSmMksAXT=!7D|6ez*&@jiDaaPMq$M#O TO?@NSz6-#SK(^!9c;EO3rQ_^~ literal 0 HcmV?d00001 diff --git a/assets/images/new-design/male.png b/assets/images/new-design/male.png new file mode 100644 index 0000000000000000000000000000000000000000..e957df707e9201793820bb08943f07b19d212705 GIT binary patch literal 6152 zcmV+j829IiP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+TEF1b{sj9MgOsiUIHe=upGm5PVb;`x_*?ooNt{PXX53_joA_n*9P z@%NY4-Nze|mlBWZ`Lpczc;$8Z{6Nj`>*MR|uFiLz_AV4Y7QX+Io!Oqh$F+B%6rb0_ z`?u@w=QRJ}cHaMSzRSLgfB!pIim` z{1!#RFYf{6TaDh=gM52EeVitKxuWoS<}YvL_<3pHYj@6S z=j`Y1G#4sW+$I6S1Drv6urLuhszo9j#}+g`A^x z&U)s%5tT%`7Q~vff_01z<{hG(@X@=^&i!fMoaDdNxA?zx&ROgJ6P#b_w5&5 zTY42G-3HkdT1|aA5E}>Vrm?AM(m#H5|Ly|+j~3cUKubrcFZ33du6p*-;_S~I!NA$U z@0HWpb%?d+i1RDXMoeV#>Tmbhu-GLKUoy`<4WlqHCs68I#A~VkpbArq;4t=j6 z12WxVjJeXDI}hze7$(PTB6lilXOEu?1p^8FizPiU2?mp~g==c6;ETRI zIBV*4YFf0?StrA&93i1|PraQvk;qVdf?jDbFg=h|95HFZ!UU*E$7}~(%$y*W zz2l^75yU0XYp^?1ZkM#q@VXR(ir9`k8^_-3mSp`4l_tQdRJYH?1)@Q2ZMc=|TN5rG zxt2ZPxmrc$KH!U+%v{bny0;ZO6wL;1r_jf>NkIyu%wF_EN!&;dxdTs9X ziP}VeJR_4&Va8|G^+5+m5JIjoYCqXy19Vf~q$ZXr+>E9vfy6Xbbhh=auhY~*LT7_o+;Z*5x zqQ%{)>1GPh4sW~XIELgN=ly#mD8LUaDaxC8rK9MPggXX0iJ7xnx!Mn9jk(i z74^JxkbJ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Y)hpE>1ntV;Rva-?~J+>kNz;X)_ zr-SD7^ouWM3I*_{j&fNu^b>b@Se;LJ0FX|n?NlOK2Qcnp4__+F#|3#_ecngPYV zI@cu`Yj2G;4d%RS8zP$_Qmcu#J%Mayd@`9lsfrnjKv@U9Av9{24m_vEirS|-$CjnO1H_s8^iyHUcy)_v< zQfPo@j=#4F#BmM6MRS)g4|oosQk<=|NlLUBN2zo=Z4>-c-((^q$My6~@}3J5GqkQ` zIJ;0J5!j>MR7WOz51?oPIvtZHypcq;_I(gT@Q_<)r7#39oz(tY`o?N6 zWZ_F1s2LPdMljgxVw&`z3sW;$2^JHedGVs#P1B6$08(RZ1d0kUYZzm+do3OW2*G*H zM8_AR=5k+zIo)Nq&v_1@P;{;HK>68=vx}BP1k+q*yVr979l>sw0()NZoLIi04SRuAoOOlT!~s7OG2r})q^-#&<#wRt zw`ge@w9A`|>znQuk#?6te@{nSJXNq5JkSrmbKtT4|l=G$gyS8ZL>-T8yp99F^| zI(S#U^qJ0B?A?N%!*BKwkh4{T5pWI&WTa+6vtVFfO*pb9knR0xGMOBZHCmPxv;(2% z0IqOgXYf)Uc%?cG9q6QC0&%*NZ>+K%>T+=b!r=m3rH0DMB^ zI@fWD{idCHFqurAACdq8pe7ui3mDr4D7&HA0)GRMCh%I&&g=w$-jb5fg8aNexs#OX z0A^f?ub~^XhYp!`@4Q0YL>M%H0I;~Rahjsq0pN25Y9qWQ3X8VHVjmW-6O>1F#N!8H zU?$1m4JtO^0?1XV$#>mXOn7;>z)!@*2Snj{flSLQJmQZ^a^KyONcuI@Dywgt3k|$-0(R{mc(BL*p_2< zeP>(SF?di#`N4H%Wu-Z)ynM2vnniHZH76oUFX+749SZC! json) { + alertBy = json['AlertBy']; + babyID = json['BabyID']; + babyName = json['BabyName']; + dOB = DateUtil.convertStringToDate(json['DOB']); + gender = json['Gender']; + genderDescription = json['GenderDescription']; + patientID = json['PatientID']; + userID = json['UserID']; + } + + Map toJson() { + final Map data = new Map(); + data['AlertBy'] = this.alertBy; + data['BabyID'] = this.babyID; + data['BabyName'] = this.babyName; + data['DOB'] = this.dOB; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['PatientID'] = this.patientID; + data['UserID'] = this.userID; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/childvaccines/user_information_model.dart b/lib/core/model/childvaccines/user_information_model.dart new file mode 100644 index 00000000..9e1687d3 --- /dev/null +++ b/lib/core/model/childvaccines/user_information_model.dart @@ -0,0 +1,48 @@ +class List_UserInformationModel { + int userID; + String mobileNumber; + String nationalID; + String emailAddress; + int patientID; + int patientType; + bool patientOutSA; + int createdBy; + int editedBy; + + List_UserInformationModel( + {this.userID, + this.mobileNumber, + this.nationalID, + this.emailAddress, + this.patientID, + this.patientType, + this.patientOutSA, + this.createdBy, + this.editedBy}); + + List_UserInformationModel.fromJson(Map json) { + userID = json['UserID']; + mobileNumber = json['MobileNumber']; + nationalID = json['NationalID']; + emailAddress = json['EmailAddress']; + patientID = json['PatientID']; + patientType = json['PatientType']; + patientOutSA = json['PatientOutSA']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + } + + Map toJson() { + final Map data = new Map(); + data['UserID'] = this.userID; + data['MobileNumber'] = this.mobileNumber; + data['NationalID'] = this.nationalID; + data['EmailAddress'] = this.emailAddress; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['PatientOutSA'] = this.patientOutSA; + data['CreatedBy'] = this.createdBy; + data['EditedBy'] = this.editedBy; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart index d614f9a5..097f6bb0 100644 --- a/lib/core/service/childvaccines/child_vaccines_service.dart +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -11,7 +11,7 @@ class ChildVaccinesService extends BaseService { hasError = false; body['isDentalAllowedBackend'] = false; body['IsLogin'] = true; - //body['UserID'] = babyInformationModelList[0].userID; + // body['UserID'] = babyInformationModelList[0].userID; body['UserID'] = 42843; diff --git a/lib/core/service/childvaccines/user_information_service.dart b/lib/core/service/childvaccines/user_information_service.dart new file mode 100644 index 00000000..9082039f --- /dev/null +++ b/lib/core/service/childvaccines/user_information_service.dart @@ -0,0 +1,34 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import '../base_service.dart'; + +class UserInformationService extends BaseService{ + + List userInformationModelList = List(); + Map body = Map(); + + + + Future getUserInformationOrders() async { + hasError = false; + // body['isDentalAllowedBackend'] = false; + // body['IsLogin'] = true; + // body['UserID'] = 42843; + + + await baseAppClient.post(GET_USERINFORMATION_REQUEST, + onSuccess: (dynamic response, int statusCode) { + userInformationModelList.clear(); + + response['List_UserInformationModel_New'].forEach((vital) { + userInformationModelList.add(List_UserInformationModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + +} \ No newline at end of file diff --git a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart new file mode 100644 index 00000000..e6a8ca60 --- /dev/null +++ b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart @@ -0,0 +1,29 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; + +import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class ChildVaccinesViewModel extends BaseViewModel{ + + + ChildVaccinesService _childVaccinesService = locator(); + + + + List get babyInformationModelList=> _childVaccinesService.babyInformationModelList;//BabyInformationModelList; + getBabyInformatioRequestOrders() async { + setState(ViewState.Busy); + + await _childVaccinesService.getAllBabyInformationOrders(); + + if (_childVaccinesService.hasError) { + error = _childVaccinesService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + +} \ No newline at end of file diff --git a/lib/core/viewModels/child_vaccines/user_information_view_model.dart b/lib/core/viewModels/child_vaccines/user_information_view_model.dart new file mode 100644 index 00000000..c362ef73 --- /dev/null +++ b/lib/core/viewModels/child_vaccines/user_information_view_model.dart @@ -0,0 +1,25 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/user_information_service.dart'; +import '../../../locator.dart'; +import '../base_view_model.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; + +class UserInformationViewModel extends BaseViewModel { + UserInformationService _userInformationService = + locator(); + + List get userInformationModelList => + _userInformationService.userInformationModelList; + + getUserInformatioRequestOrders() async { + setState(ViewState.Busy); + + await _userInformationService.getUserInformationOrders(); + + if (_userInformationService.hasError) { + error = _userInformationService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/locator.dart b/lib/locator.dart index 8a7022c6..b57a63a1 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; import 'package:diplomaticquarterapp/core/service/qr_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:get_it/get_it.dart'; @@ -10,6 +11,8 @@ import 'core/service/AuthenticatedUserObject.dart'; import 'core/service/appointment_rate_service.dart'; import 'core/service/blood/blood_details_servies.dart'; import 'core/service/blood/blood_donation_service.dart'; +import 'core/service/childvaccines/child_vaccines_service.dart'; +import 'core/service/childvaccines/user_information_service.dart'; import 'core/service/contactus/finadus_service.dart'; import 'core/service/contactus/livechat_service.dart'; import 'core/service/dashboard_service.dart'; @@ -37,6 +40,7 @@ import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/blooddonation/blood_details_view_model.dart'; import 'core/viewModels/blooddonation/booddonation_view_model.dart'; +import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; import 'core/viewModels/contactus/livechat_view_model.dart'; import 'core/viewModels/er/am_request_view_model.dart'; @@ -112,6 +116,8 @@ void setupLocator() { locator.registerLazySingleton(() => BloodDonationService()); locator.registerLazySingleton(() => BloodDetailsService()); + locator.registerLazySingleton(() => ChildVaccinesService()); + locator.registerLazySingleton(() => UserInformationService()); /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -139,6 +145,8 @@ void setupLocator() { locator.registerFactory(() => LiveChatViewModel()); locator.registerFactory(() => BloodDonationViewModel()); locator.registerFactory(() => BloodDeatailsViewModel()); + locator.registerFactory(() => ChildVaccinesViewModel()); + locator.registerFactory(() => UserInformationViewModel()); locator.registerFactory(() => H2OViewModel()); locator.registerFactory(() => BloodSugarViewMode()); diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index 6132e38c..99e5242e 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -87,7 +87,7 @@ class _BloodDonationPageState extends State { children: [ Texts( // TranslationBase.of(context).advancePaymentLabel, - "Enter the required information, In order to register for Blood Donation Service", + "Enter the required information, In order to register for Blood Donation Service",//+model.user.firstName, textAlign: TextAlign.center, ), SizedBox( diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index e5a5058f..ea107600 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class ChildPage extends StatefulWidget { //final List babyInformationModelList; @@ -38,14 +39,16 @@ class _ChildPageState extends State with SingleTickerProviderStateMix color: Colors.white, ), + width: 150, child: Column( + children: [ Row(children:[Texts("CHILD NAME"),]), Row(children:[Texts(model.babyInformationModelList[index].babyName),]), Row( children: [IconButton( - icon: Icon(Icons.phone,color: Colors.red,), + icon: new Image.asset('assets/images/new-design/female.png'), tooltip: 'Increase volume by 10', onPressed: () { setState(() { @@ -56,7 +59,7 @@ class _ChildPageState extends State with SingleTickerProviderStateMix ), Texts(model.babyInformationModelList[index].babyName), IconButton( - icon: Icon(Icons.phone,color: Colors.red,), + icon: Icon(Icons.remove_red_eye_outlined,color: Colors.red,), tooltip: 'Increase volume by 10', onPressed: () { setState(() { @@ -68,7 +71,7 @@ class _ChildPageState extends State with SingleTickerProviderStateMix ), Row(children:[Texts("Birthday"),]), Row(children:[IconButton( - icon: Icon(Icons.phone,color: Colors.red,), + icon: new Image.asset('assets/images/new-design/calender-secondary.png'), tooltip: 'Increase volume by 10', onPressed: () { setState(() { @@ -77,9 +80,9 @@ class _ChildPageState extends State with SingleTickerProviderStateMix }); }, ), - Texts(model.babyInformationModelList[index].dOB.toString()),]), + Texts(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB)),]), Row(children:[IconButton( - icon: Icon(Icons.phone,color: Colors.red,), + icon: new Image.asset('assets/images/new-design/garbage.png'), tooltip: 'Increase volume by 10', onPressed: () { setState(() { diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index cec04f12..269c9259 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -1,28 +1,35 @@ +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + + class ChildVaccinesPage extends StatefulWidget { @override _ChildVaccinesPageState createState() => _ChildVaccinesPageState(); } -class _ChildVaccinesPageState extends State { +class _ChildVaccinesPageState extends State + with SingleTickerProviderStateMixin{ TextEditingController titleController = TextEditingController(); var checkedValue=false; String addEmail=""; @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getCities(),//model.getHospitals(), + return BaseView( + onModelReady: (model) => model.getUserInformatioRequestOrders(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment, @@ -98,7 +105,7 @@ class _ChildVaccinesPageState extends State { label: "UPDATE EMAIL", // onTap: (){ - model.user.emailAddress=model.user.emailAddress+addEmail.toString(); + model.user.emailAddress=addEmail.toString(); AppToast.showSuccessToast( message: "Email updated"); // bloodDetails.city=_selectedHospital.toString(); @@ -119,12 +126,18 @@ class _ChildVaccinesPageState extends State { color: Color.fromRGBO(63, 72, 74, 1,), label: " VIEW LIST OF CHILDREN", // - onTap: (){ + onTap: () => Navigator.push( + context, + FadePage( + page: ChildPage(), - // bloodDetails.city=_selectedHospital.toString(); + //ChildPage(babyInformationModelList:model.BabyInformationModelList) + // HospitalsPage( + // findusHospitalModelList: model.FindusHospitalModelList, + // ) - // bloodDetails. - }, + ), + ), ), From 4009aed0009b0fdd19bb46596dedaa696a092deb Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 6 Oct 2020 13:05:18 +0300 Subject: [PATCH 08/16] child Vaccines --- .../ChildVaccines/add_newchild_page.dart | 235 +++++++++++++++++ lib/pages/ChildVaccines/child_page.dart | 22 +- lib/pages/ChildVaccines/new_text_Field.dart | 239 ++++++++++++++++++ .../medical/balance/advance_payment_page.dart | 1 + 4 files changed, 491 insertions(+), 6 deletions(-) create mode 100644 lib/pages/ChildVaccines/add_newchild_page.dart create mode 100644 lib/pages/ChildVaccines/new_text_Field.dart diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart new file mode 100644 index 00000000..0d87cda3 --- /dev/null +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -0,0 +1,235 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.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/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; + +import 'new_text_Field.dart'; + +enum Gender { Male, Female, NON } +enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } + +class AddNewChildPage extends StatefulWidget { + @override + _AddNewChildPageState createState() => _AddNewChildPageState(); +} + +class _AddNewChildPageState extends State { + int tappedIndex; + int checkedValue; + + @override + void initState() { + super.initState(); + tappedIndex = -1; + } + + TextEditingController _firstTextController = TextEditingController(); + TextEditingController _secondTextController = TextEditingController(); + TextEditingController _notesTextController = TextEditingController(); + BeneficiaryType beneficiaryType = BeneficiaryType.NON; + Gender gender = Gender.Male; + ChildVaccinesViewModel AddvancedModel = ChildVaccinesViewModel(); + + @override + Widget build(BuildContext context) { + + return AppScaffold( + isShowAppBar: true, + appBarTitle: "Vaccintion", + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 50, + ), + Texts( + "Add the child's information below to recieve the schedule of vaccinations.", //+model.user.firstName, + textAlign: TextAlign.center, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: "First Name", + controller: _firstTextController, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: "Second Name", + controller: _secondTextController, + ), + SizedBox( + height: 12, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Gender:", + textAlign: TextAlign.end, + + ), + ],), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + padding: EdgeInsets.all(12), + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.center, + + + children: [ + + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: 170, + child: SecondaryButton( + + textColor:checkedValue == 1 + ? Colors.white + : Colors.black, + color: checkedValue == 1 + ? Colors.red + : Colors.white, + + label: "Male", + // + onTap: () { + // bloodDetails.city=_selectedHospital.toString(); + setState(() { + checkedValue=1; + print("checkedValue="+checkedValue.toString()); + }); + + // bloodDetails. + }, + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: 170, + child: SecondaryButton( + textColor:checkedValue == 2 + ? Colors.white + : Colors.black, + color: checkedValue == 2 + ? Colors.red + : Colors.white, + label: "Female", + // + onTap: () { + setState(() { + checkedValue=2; + print("checkedValue="+checkedValue.toString()); + }); + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + ), + ) + ],) , + ), + //========== + SizedBox( + height: 6, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Date Of Birth::", + textAlign: TextAlign.end, + + ), + ],), + InkWell( + onTap: () { + DatePicker.showDatePicker(context, + showTitleActions: true, + minTime: DateTime( + DateTime.now().year, DateTime.now().month - 1, 1), + maxTime: DateTime.now(), onConfirm: (date) { + setState(() { + // widget.startDay = date; + }); + }, + // currentTime: widget.startDay, + // locale: projectViewModel.localeType + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( DateUtil.yearMonthDay(DateTime.now()) + //getStartDay() + ), + Icon( + Icons.calendar_today, + color: Colors.black, + ) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + //========= + + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: "Add", + // + onTap: () { + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + ), + + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index ea107600..54e2b60d 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -1,9 +1,11 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; @@ -20,10 +22,12 @@ class ChildPage extends StatefulWidget { class _ChildPageState extends State with SingleTickerProviderStateMixin { @override Widget build(BuildContext context) { - var checkedValue= false; + var checkedValue= true; return BaseView( onModelReady: (model) => model.getBabyInformatioRequestOrders(),//model.getCOC(),getFindUsRequestOrders() builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: " Vaccination", baseViewModel: model, body: SingleChildScrollView( child: Container( @@ -83,7 +87,7 @@ class _ChildPageState extends State with SingleTickerProviderStateMix Texts(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB)),]), Row(children:[IconButton( icon: new Image.asset('assets/images/new-design/garbage.png'), - tooltip: 'Increase volume by 10', + tooltip: '', onPressed: () { setState(() { // _volume += 10; @@ -116,12 +120,18 @@ class _ChildPageState extends State with SingleTickerProviderStateMix color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), label: "ADD NEW CHILD ", // - onTap: (){ + onTap: () => Navigator.push( + context, + FadePage( + page: AddNewChildPage(), - // bloodDetails.city=_selectedHospital.toString(); + //ChildPage(babyInformationModelList:model.BabyInformationModelList) + // HospitalsPage( + // findusHospitalModelList: model.FindusHospitalModelList, + // ) - // bloodDetails. - }, + ), + ), ), diff --git a/lib/pages/ChildVaccines/new_text_Field.dart b/lib/pages/ChildVaccines/new_text_Field.dart new file mode 100644 index 00000000..ad9eb580 --- /dev/null +++ b/lib/pages/ChildVaccines/new_text_Field.dart @@ -0,0 +1,239 @@ +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class NumberTextInputFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, TextEditingValue newValue) { + final int newTextLength = newValue.text.length; + int selectionIndex = newValue.selection.end; + int usedSubstringIndex = 0; + final StringBuffer newText = StringBuffer(); + if (newTextLength >= 1) { + newText.write('('); + if (newValue.selection.end >= 1) selectionIndex++; + } + if (newTextLength >= 4) { + newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') '); + if (newValue.selection.end >= 3) selectionIndex += 2; + } + if (newTextLength >= 7) { + newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-'); + if (newValue.selection.end >= 6) selectionIndex++; + } + if (newTextLength >= 11) { + newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' '); + if (newValue.selection.end >= 10) selectionIndex++; + } + // Dump the rest. + if (newTextLength >= usedSubstringIndex) + newText.write(newValue.text.substring(usedSubstringIndex)); + return TextEditingValue( + text: newText.toString(), + selection: TextSelection.collapsed(offset: selectionIndex), + ); + } +} + +final _mobileFormatter = NumberTextInputFormatter(); + +class NewTextFields extends StatefulWidget { + NewTextFields( + {Key key, + this.type, + this.hintText, + this.suffixIcon, + this.autoFocus, + this.onChanged, + this.initialValue, + this.minLines, + this.maxLines, + this.inputFormatters, + this.padding, + this.focus = false, + this.maxLengthEnforced = true, + this.suffixIconColor, + this.inputAction, + this.onSubmit, + this.keepPadding = true, + this.textCapitalization = TextCapitalization.none, + this.controller, + this.keyboardType, + this.validator, + this.borderOnlyError = false, + this.onSaved, + this.onSuffixTap, + this.readOnly: false, + this.maxLength, + this.prefixIcon, + this.bare = false, + this.onTap, + this.fontSize = 16.0, + this.fontWeight = FontWeight.w700, + this.autoValidate = false, + this.hintColor,this.isEnabled=true}) + : super(key: key); + + final String hintText; + + // final String initialValue; + final String type; + final bool autoFocus; + final IconData suffixIcon; + final Color suffixIconColor; + final Icon prefixIcon; + final VoidCallback onTap; + final TextEditingController controller; + final TextInputType keyboardType; + final FormFieldValidator validator; + final Function onSaved; + final Function onSuffixTap; + final Function onChanged; + final Function onSubmit; + final bool readOnly; + final int maxLength; + final int minLines; + final int maxLines; + final bool maxLengthEnforced; + final bool bare; + final bool isEnabled; + final TextInputAction inputAction; + final double fontSize; + final FontWeight fontWeight; + final bool keepPadding; + final TextCapitalization textCapitalization; + final List inputFormatters; + final bool autoValidate; + final EdgeInsets padding; + final bool focus; + final bool borderOnlyError; + final Color hintColor; + final String initialValue; + @override + _NewTextFieldsState createState() => _NewTextFieldsState(); +} + +class _NewTextFieldsState extends State { + final FocusNode _focusNode = FocusNode(); + bool focus = false; + bool view = false; + + @override + void initState() { + super.initState(); + _focusNode.addListener(() { + setState(() { + focus = _focusNode.hasFocus; + }); + }); + } + + @override + void didUpdateWidget(NewTextFields oldWidget) { + if (widget.focus) _focusNode.requestFocus(); + super.didUpdateWidget(oldWidget); + } + + @override + void dispose() { + _focusNode.dispose(); + super.dispose(); + } + + + bool _determineReadOnly() { + if (widget.readOnly != null && widget.readOnly) { + _focusNode.unfocus(); + return true; + } else { + return false; + } + } + + @override + Widget build(BuildContext context) { + return AnimatedContainer( + duration: Duration(milliseconds: 300), + decoration:BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Container( + margin: EdgeInsets.only(top: 8), + + child: TextFormField( + enabled: widget.isEnabled, + initialValue: widget.initialValue, + keyboardAppearance: Theme.of(context).brightness, + scrollPhysics: BouncingScrollPhysics(), + autovalidate: widget.autoValidate, + textCapitalization: widget.textCapitalization, + onFieldSubmitted: widget.inputAction == TextInputAction.next + ? (widget.onSubmit != null + ? widget.onSubmit + : (val) { + _focusNode.nextFocus(); + }) + : widget.onSubmit, + textInputAction: widget.inputAction, + minLines: widget.minLines ?? 1, + maxLines: widget.maxLines ?? 1, + maxLengthEnforced: widget.maxLengthEnforced, + onChanged: widget.onChanged, + focusNode: _focusNode, + maxLength: widget.maxLength ?? null, + controller: widget.controller, + keyboardType: widget.keyboardType, + readOnly: _determineReadOnly(), + obscureText: widget.type == "password" && !view ? true : false, + autofocus: widget.autoFocus ?? false, + validator: widget.validator, + onSaved: widget.onSaved, + + style: Theme.of(context) + .textTheme + .body2 + .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), + inputFormatters: widget.keyboardType == TextInputType.phone + ? [ + WhitelistingTextInputFormatter.digitsOnly, + _mobileFormatter, + ] + : widget.inputFormatters, + decoration: InputDecoration( + labelText: widget.hintText, + labelStyle: TextStyle(color: Colors.black), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .errorColor + .withOpacity(0.5), + width: 1.0), + borderRadius: BorderRadius.circular(12.0)), + focusedErrorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context) + .errorColor + .withOpacity(0.5), + width: 1.0), + borderRadius: BorderRadius.circular(8.0)), + focusedBorder: OutlineInputBorder( + borderSide: + BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12)), + disabledBorder: OutlineInputBorder( + borderSide: + BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12)), + enabledBorder: OutlineInputBorder( + borderSide: + BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index 5cef835f..02d08682 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -29,6 +29,7 @@ import 'new_text_Field.dart'; enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } + class AdvancePaymentPage extends StatefulWidget { @override _AdvancePaymentPageState createState() => _AdvancePaymentPageState(); From 42554ffa675a0119c943ff1f0e5baa6721faec89 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 6 Oct 2020 15:45:58 +0300 Subject: [PATCH 09/16] child Vaccines --- .../ChildVaccines/add_newchild_page.dart | 109 ++++++++++++++++-- 1 file changed, 97 insertions(+), 12 deletions(-) diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index 0d87cda3..b28c1986 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -1,7 +1,10 @@ +import 'package:device_calendar/device_calendar.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.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'; @@ -10,9 +13,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; + import 'new_text_Field.dart'; @@ -20,6 +21,35 @@ enum Gender { Male, Female, NON } enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } class AddNewChildPage extends StatefulWidget { + final int frequency; + final int days; + final String itemDescription; + + List _scheduleList = List(); + List daysOfWeek = [ + DayOfWeek.Monday, + DayOfWeek.Tuesday, + DayOfWeek.Wednesday, + DayOfWeek.Thursday, + DayOfWeek.Friday, + DayOfWeek.Saturday, + DayOfWeek.Sunday + ]; + + DateTime startDay; + DateTime endDay; + + //AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) : super(key: key); + AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) { + startDay = DateTime.now(); + endDay = DateTime.now();//endDay = DateTime.now().add(Duration(days: days)); + int hour = 24;//(24 / frequency).round(); + int durations = 24 ~/ hour; + for (int count = 0; count < durations; count++) { + _scheduleList.add(DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day, (hour * count))); + } + } @override _AddNewChildPageState createState() => _AddNewChildPageState(); } @@ -39,7 +69,8 @@ class _AddNewChildPageState extends State { TextEditingController _notesTextController = TextEditingController(); BeneficiaryType beneficiaryType = BeneficiaryType.NON; Gender gender = Gender.Male; - ChildVaccinesViewModel AddvancedModel = ChildVaccinesViewModel(); + //ChildVaccinesViewModel addvancedModel = ChildVaccinesViewModel(); + List_BabyInformationModel addvancedModel = List_BabyInformationModel(); @override Widget build(BuildContext context) { @@ -165,14 +196,17 @@ class _AddNewChildPageState extends State { onTap: () { DatePicker.showDatePicker(context, showTitleActions: true, - minTime: DateTime( - DateTime.now().year, DateTime.now().month - 1, 1), - maxTime: DateTime.now(), onConfirm: (date) { + // minTime: DateTime( + // DateTime.now().year, DateTime.now().month - 1, 1), + minTime: DateTime( + 1, 1, 1), + maxTime: DateTime.now(), + onConfirm: (date) { setState(() { - // widget.startDay = date; + widget.startDay = date; }); }, - // currentTime: widget.startDay, + currentTime: widget.startDay, // locale: projectViewModel.localeType ); }, @@ -186,8 +220,9 @@ class _AddNewChildPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts( DateUtil.yearMonthDay(DateTime.now()) - //getStartDay() + Texts( //getStartDay() + // DateUtil.yearMonthDay(DateTime.now()) + getStartDay() ), Icon( Icons.calendar_today, @@ -223,7 +258,23 @@ class _AddNewChildPageState extends State { label: "Add", // onTap: () { - // bloodDetails.city=_selectedHospital.toString(); + + addvancedModel.babyName=_firstTextController.text + " "+_secondTextController.text; + addvancedModel.gender=checkedValue; + addvancedModel.dOB=DateUtil.convertStringToDate(getStartDay()) ; + addvancedModel.alertBy=2; + addvancedModel.alertBy=addvancedModel.babyID; + addvancedModel.genderDescription=checkedValue==1?"Male":"Female"; + addvancedModel.patientID=addvancedModel.patientID; + addvancedModel.userID=addvancedModel.userID; + // // advanceModel.fileNumber = _fileTextController.text; + // // advanceModel.hospitalsModel = _selectedHospital; + // // advanceModel.note = _notesTextController.text; + // // advanceModel.email = email ?? model.user.emailAddress; + // // advanceModel.amount = amount; + // // bloodDetails.city=_selectedHospital.toString(); + AppToast.showSuccessToast( + message: "Email updated"); // bloodDetails. }, @@ -232,4 +283,38 @@ class _AddNewChildPageState extends State { ), ); } + String getStartDay() { + return "${DateUtil.getMonth(widget.startDay.month)} ${widget.startDay.day}, ${widget.startDay.year}"; + } + + String getEndDay() { + return "${DateUtil.getMonth(widget.endDay.month)} ${widget.endDay.day}, ${widget.endDay.year}"; + } + + String getDateTime(DateTime dateTime) { + return '${dateTime.hour}:${dateTime.minute}'; + } + + String getDays() { + String days = ""; + widget.daysOfWeek.forEach((element) { + days += "${DateUtil.getDay(element)},"; + }); + return days; + } + + void confirmSelectDayDialog() { + showDialog( + context: context, + child: DayCheckBoxDialog( + title: 'Select Day', + selectedDaysOfWeek: widget.daysOfWeek, + onValueSelected: (value) { + setState(() { + widget.daysOfWeek = value; + }); + }, + ), + ); + } } From 8a6511404f849bdd3b00a575f2f72380515231b8 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 6 Oct 2020 17:03:42 +0300 Subject: [PATCH 10/16] child Vaccines --- .../ChildVaccines/add_newchild_page.dart | 399 +++++++++--------- 1 file changed, 211 insertions(+), 188 deletions(-) diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index b28c1986..f4f2db94 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -1,7 +1,11 @@ import 'package:device_calendar/device_calendar.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/add_new_child_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -14,7 +18,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; - import 'new_text_Field.dart'; enum Gender { Male, Female, NON } @@ -24,6 +27,7 @@ class AddNewChildPage extends StatefulWidget { final int frequency; final int days; final String itemDescription; + String dateAdd; List _scheduleList = List(); List daysOfWeek = [ @@ -41,9 +45,10 @@ class AddNewChildPage extends StatefulWidget { //AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) : super(key: key); AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) { - startDay = DateTime.now(); - endDay = DateTime.now();//endDay = DateTime.now().add(Duration(days: days)); - int hour = 24;//(24 / frequency).round(); + startDay = DateTime.now(); + endDay = + DateTime.now(); //endDay = DateTime.now().add(Duration(days: days)); + int hour = 24; //(24 / frequency).round(); int durations = 24 ~/ hour; for (int count = 0; count < durations; count++) { _scheduleList.add(DateTime(DateTime.now().year, DateTime.now().month, @@ -71,218 +76,236 @@ class _AddNewChildPageState extends State { Gender gender = Gender.Male; //ChildVaccinesViewModel addvancedModel = ChildVaccinesViewModel(); List_BabyInformationModel addvancedModel = List_BabyInformationModel(); + CreateNewBaby newChild=CreateNewBaby(); + List_UserInformationModel informationModel =List_UserInformationModel(); @override Widget build(BuildContext context) { - - return AppScaffold( - isShowAppBar: true, - appBarTitle: "Vaccintion", - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Container( - margin: EdgeInsets.all(12), - child: Column( - // crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - height: 50, - ), - Texts( - "Add the child's information below to recieve the schedule of vaccinations.", //+model.user.firstName, - textAlign: TextAlign.center, - ), - SizedBox( - height: 12, - ), - NewTextFields( - hintText: "First Name", - controller: _firstTextController, - ), - SizedBox( - height: 12, - ), - NewTextFields( - hintText: "Second Name", - controller: _secondTextController, - ), - SizedBox( - height: 12, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Gender:", - textAlign: TextAlign.end, - + return BaseView( + builder: (_,model,w)=> AppScaffold( + isShowAppBar: true, + appBarTitle: "Vaccintion", + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 50, ), - ],), - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: double.infinity, - padding: EdgeInsets.all(12), - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisAlignment: MainAxisAlignment.center, - - + Texts( + "Add the child's information below to recieve the schedule of vaccinations.", //+model.user.firstName, + textAlign: TextAlign.center, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: "First Name", + controller: _firstTextController, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: "Second Name", + controller: _secondTextController, + ), + SizedBox( + height: 12, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: 170, - child: SecondaryButton( - - textColor:checkedValue == 1 - ? Colors.white - : Colors.black, - color: checkedValue == 1 - ? Colors.red - : Colors.white, - - label: "Male", - // - onTap: () { - // bloodDetails.city=_selectedHospital.toString(); - setState(() { - checkedValue=1; - print("checkedValue="+checkedValue.toString()); - }); - - // bloodDetails. - }, - ), + Text( + "Gender:", + textAlign: TextAlign.end, ), - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: 170, - child: SecondaryButton( - textColor:checkedValue == 2 - ? Colors.white - : Colors.black, - color: checkedValue == 2 - ? Colors.red - : Colors.white, - label: "Female", - // - onTap: () { - setState(() { - checkedValue=2; - print("checkedValue="+checkedValue.toString()); - }); - // bloodDetails.city=_selectedHospital.toString(); + ], + ), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + padding: EdgeInsets.all(12), + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: 170, + child: SecondaryButton( + textColor: + checkedValue == 1 ? Colors.white : Colors.black, + color: checkedValue == 1 ? Colors.red : Colors.white, + + label: "Male", + // + onTap: () { + // bloodDetails.city=_selectedHospital.toString(); + setState(() { + checkedValue = 1; + print("checkedValue=" + checkedValue.toString()); + }); - // bloodDetails. - }, + // bloodDetails. + }, + ), ), - ) - ],) , - ), - //========== - SizedBox( - height: 6, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Date Of Birth::", - textAlign: TextAlign.end, + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: 170, + child: SecondaryButton( + textColor: + checkedValue == 2 ? Colors.white : Colors.black, + color: checkedValue == 2 ? Colors.red : Colors.white, + label: "Female", + // + onTap: () { + setState(() { + checkedValue = 2; + print("checkedValue=" + checkedValue.toString()); + }); + // bloodDetails.city=_selectedHospital.toString(); + // bloodDetails. + }, + ), + ) + ], ), - ],), - InkWell( - onTap: () { - DatePicker.showDatePicker(context, + ), + //========== + SizedBox( + height: 6, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Date Of Birth::", + textAlign: TextAlign.end, + ), + ], + ), + InkWell( + onTap: () { + DatePicker.showDatePicker( + context, showTitleActions: true, // minTime: DateTime( // DateTime.now().year, DateTime.now().month - 1, 1), - minTime: DateTime( - 1, 1, 1), + minTime: DateTime(1, 1, 1), maxTime: DateTime.now(), - onConfirm: (date) { + onConfirm: (date) { setState(() { - widget.startDay = date; + widget.startDay = date; }); }, currentTime: widget.startDay, - // locale: projectViewModel.localeType - ); - }, - child: Container( - padding: EdgeInsets.all(12), - width: double.infinity, - height: 65, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts( //getStartDay() - // DateUtil.yearMonthDay(DateTime.now()) - getStartDay() - ), - Icon( - Icons.calendar_today, - color: Colors.black, - ) - ], + // locale: projectViewModel.localeType + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(//getStartDay() + // DateUtil.yearMonthDay(DateTime.now()) + getStartDay() + ), + Icon( + Icons.calendar_today, + color: Colors.black, + ) + ], + ), ), ), - ), - SizedBox( - height: 12, - ), - //========= - - ], + SizedBox( + height: 12, + ), + //========= + ], + ), ), ), - ), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.12, - width: double.infinity, - padding: EdgeInsets.all(12), - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue == false - ? Colors.white24 - : Color.fromRGBO( - 63, - 72, - 74, - 1, - ), - label: "Add", - // - onTap: () { + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: "Add", + // + onTap: () { - addvancedModel.babyName=_firstTextController.text + " "+_secondTextController.text; - addvancedModel.gender=checkedValue; - addvancedModel.dOB=DateUtil.convertStringToDate(getStartDay()) ; - addvancedModel.alertBy=2; - addvancedModel.alertBy=addvancedModel.babyID; - addvancedModel.genderDescription=checkedValue==1?"Male":"Female"; - addvancedModel.patientID=addvancedModel.patientID; - addvancedModel.userID=addvancedModel.userID; - // // advanceModel.fileNumber = _fileTextController.text; - // // advanceModel.hospitalsModel = _selectedHospital; - // // advanceModel.note = _notesTextController.text; - // // advanceModel.email = email ?? model.user.emailAddress; - // // advanceModel.amount = amount; - // // bloodDetails.city=_selectedHospital.toString(); - AppToast.showSuccessToast( - message: "Email updated"); + newChild.babyName = + _firstTextController.text + " " + _secondTextController.text; + newChild.gender = checkedValue.toString(); + newChild.strDOB=getStartDay() ; + newChild.createdBy=informationModel.createdBy ; + newChild.editedBy=informationModel.createdBy; + newChild.tempValue=true; + newChild.userID=addvancedModel.userID; + newChild.isLogin=true; + newChild.alertBy=addvancedModel.alertBy; + + model.getNewBabyOrders(newChild: newChild); - // bloodDetails. - }, - ), + //DateTime.now();//DateUtil.convertStringToDate(getStartDay()); + // addvancedModel.alertBy = 2; + // addvancedModel.alertBy = addvancedModel.babyID; + // addvancedModel.genderDescription = + // checkedValue == 1 ? "Male" : "Female"; + // addvancedModel.patientID = addvancedModel.patientID; + // addvancedModel.userID = addvancedModel.userID; + // // advanceModel.fileNumber = _fileTextController.text; + // // advanceModel.hospitalsModel = _selectedHospital; + // // advanceModel.note = _notesTextController.text; + // // advanceModel.email = email ?? model.user.emailAddress; + // // advanceModel.amount = amount; + // // bloodDetails.city=_selectedHospital.toString(); + AppToast.showSuccessToast(message: "Record Added"); + //============ + Navigator.push( + context, + FadePage( + page: ChildPage(), + + //ChildPage(babyInformationModelList:model.BabyInformationModelList) + // HospitalsPage( + // findusHospitalModelList: model.FindusHospitalModelList, + // ) + ), + ); + //============== + + // bloodDetails. + }, + ), + ), ), ); } + String getStartDay() { return "${DateUtil.getMonth(widget.startDay.month)} ${widget.startDay.day}, ${widget.startDay.year}"; } From 6830996f9c838f2a213bb29af38ce971402086db Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 6 Oct 2020 18:01:32 +0300 Subject: [PATCH 11/16] child Vaccines --- .../add_new_child_view_model.dart | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/core/viewModels/child_vaccines/add_new_child_view_model.dart diff --git a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart new file mode 100644 index 00000000..26355bd7 --- /dev/null +++ b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart @@ -0,0 +1,28 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + +class AddNewChildViewModel extends BaseViewModel{ + + CreteNewBabyService _creteNewBabyService = locator(); + + + + List get creteNewBabyModelList=> _creteNewBabyService.createNewBabyModelList; + getNewBabyOrders({ CreateNewBaby newChild}) async { + setState(ViewState.Busy); + + await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild); + + if ( _creteNewBabyService.hasError) { + error = _creteNewBabyService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + +} From fe17c20bdf19c746989824ccfe114f7af1911fd7 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Tue, 6 Oct 2020 18:04:14 +0300 Subject: [PATCH 12/16] child Vaccines --- lib/config/config.dart | 5 + .../childvaccines/add_newchild_model.dart | 100 ++++++++++++++++++ .../childvaccines/add_new_child_service.dart | 26 +++++ lib/locator.dart | 7 ++ 4 files changed, 138 insertions(+) create mode 100644 lib/core/model/childvaccines/add_newchild_model.dart create mode 100644 lib/core/service/childvaccines/add_new_child_service.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 204148b6..65f1553e 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -78,6 +78,11 @@ const GET_USERINFORMATION_REQUEST= 'Services/Community.svc/REST/GetUserInformation_New'; +///addNewChild +const GET_NEWCHILD_REQUEST= + 'Services/Community.svc/REST/CreateNewBaby'; + + ///BloodDenote diff --git a/lib/core/model/childvaccines/add_newchild_model.dart b/lib/core/model/childvaccines/add_newchild_model.dart new file mode 100644 index 00000000..9bbfe6ad --- /dev/null +++ b/lib/core/model/childvaccines/add_newchild_model.dart @@ -0,0 +1,100 @@ +class CreateNewBaby { + String babyName; + String gender; + String strDOB; + int editedBy; + int createdBy; + bool tempValue; + int userID; + bool isLogin; + int alertBy; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + String sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + int patientID; + String tokenID; + int patientTypeID; + int patientType; + + CreateNewBaby( + {this.babyName, + this.gender, + this.strDOB, + this.editedBy, + this.createdBy, + this.tempValue, + this.userID, + this.isLogin, + this.alertBy, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType}); + + CreateNewBaby.fromJson(Map json) { + babyName = json['BabyName']; + gender = json['Gender']; + strDOB = json['StrDOB']; + editedBy = json['EditedBy']; + createdBy = json['CreatedBy']; + tempValue = json['TempValue']; + userID = json['UserID']; + isLogin = json['IsLogin']; + alertBy = json['AlertBy']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + patientID = json['PatientID']; + tokenID = json['TokenID']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + } + + Map toJson() { + final Map data = new Map(); + data['BabyName'] = this.babyName; + data['Gender'] = this.gender; + data['StrDOB'] = this.strDOB; + data['EditedBy'] = this.editedBy; + data['CreatedBy'] = this.createdBy; + data['TempValue'] = this.tempValue; + data['UserID'] = this.userID; + data['IsLogin'] = this.isLogin; + data['AlertBy'] = this.alertBy; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['PatientID'] = this.patientID; + data['TokenID'] = this.tokenID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/childvaccines/add_new_child_service.dart b/lib/core/service/childvaccines/add_new_child_service.dart new file mode 100644 index 00000000..22a081a3 --- /dev/null +++ b/lib/core/service/childvaccines/add_new_child_service.dart @@ -0,0 +1,26 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import '../base_service.dart'; + +class CreteNewBabyService extends BaseService { + List createNewBabyModelList = List(); + + + Future getCreateNewBabyOrders({ CreateNewBaby newChild}) async { + hasError = false; + await baseAppClient.post(GET_NEWCHILD_REQUEST, + onSuccess: (dynamic response, int statusCode) { + createNewBabyModelList.clear(); + + response['List_UserInformationModel_New'].forEach((vital) { + createNewBabyModelList.add( + CreateNewBaby.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: newChild.toJson()); + } + +} \ No newline at end of file diff --git a/lib/locator.dart b/lib/locator.dart index b57a63a1..dee65ccc 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -11,6 +11,7 @@ import 'core/service/AuthenticatedUserObject.dart'; import 'core/service/appointment_rate_service.dart'; import 'core/service/blood/blood_details_servies.dart'; import 'core/service/blood/blood_donation_service.dart'; +import 'core/service/childvaccines/add_new_child_service.dart'; import 'core/service/childvaccines/child_vaccines_service.dart'; import 'core/service/childvaccines/user_information_service.dart'; import 'core/service/contactus/finadus_service.dart'; @@ -40,6 +41,7 @@ import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/blooddonation/blood_details_view_model.dart'; import 'core/viewModels/blooddonation/booddonation_view_model.dart'; +import 'core/viewModels/child_vaccines/add_new_child_view_model.dart'; import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; import 'core/viewModels/contactus/livechat_view_model.dart'; @@ -118,6 +120,8 @@ void setupLocator() { locator.registerLazySingleton(() => BloodDetailsService()); locator.registerLazySingleton(() => ChildVaccinesService()); locator.registerLazySingleton(() => UserInformationService()); + locator.registerLazySingleton(() => CreteNewBabyService()); + /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -147,6 +151,9 @@ void setupLocator() { locator.registerFactory(() => BloodDeatailsViewModel()); locator.registerFactory(() => ChildVaccinesViewModel()); locator.registerFactory(() => UserInformationViewModel()); + locator.registerFactory(() => UserInformationViewModel()); + + locator.registerFactory(() => AddNewChildViewModel()); locator.registerFactory(() => H2OViewModel()); locator.registerFactory(() => BloodSugarViewMode()); From 1d29aa36a2f3f48a18ba0cff506e1b41ee0abc5b Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 7 Oct 2020 10:39:42 +0300 Subject: [PATCH 13/16] child Vaccines --- lib/config/config.dart | 4 + .../create_vaccination_table.dart | 25 ++ .../childvaccines/child_vaccines_service.dart | 9 +- .../user_information_service.dart | 13 +- .../vaccination_table_service.dart | 39 +++ .../vaccination_table_view_model.dart | 30 +++ lib/locator.dart | 7 +- .../ChildVaccines/add_newchild_page.dart | 10 +- lib/pages/ChildVaccines/child_page.dart | 34 ++- .../ChildVaccines/child_vaccines_page.dart | 1 + .../dialogs/SelectGenderDialog.dart | 146 +++++++++++ lib/pages/ChildVaccines/new_text_Field.dart | 239 ------------------ .../ChildVaccines/vaccinationtable_page.dart | 136 ++++++++++ 13 files changed, 435 insertions(+), 258 deletions(-) create mode 100644 lib/core/model/childvaccines/create_vaccination_table.dart create mode 100644 lib/core/service/childvaccines/vaccination_table_service.dart create mode 100644 lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart create mode 100644 lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart delete mode 100644 lib/pages/ChildVaccines/new_text_Field.dart create mode 100644 lib/pages/ChildVaccines/vaccinationtable_page.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 65f1553e..2f497de2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -83,6 +83,10 @@ const GET_NEWCHILD_REQUEST= 'Services/Community.svc/REST/CreateNewBaby'; +///addNewTABLE +const GET_TABLE_REQUEST= + 'Services/Community.svc/REST/CreateVaccinationTable'; + ///BloodDenote diff --git a/lib/core/model/childvaccines/create_vaccination_table.dart b/lib/core/model/childvaccines/create_vaccination_table.dart new file mode 100644 index 00000000..d39f2a64 --- /dev/null +++ b/lib/core/model/childvaccines/create_vaccination_table.dart @@ -0,0 +1,25 @@ +class CreateVaccinationTable { + String givenAt; + String status; + String vaccinesDescription; + String visit; + + CreateVaccinationTable( + {this.givenAt, this.status, this.vaccinesDescription, this.visit}); + + CreateVaccinationTable.fromJson(Map json) { + givenAt = json['GivenAt']; + status = json['Status']; + vaccinesDescription = json['VaccinesDescription']; + visit = json['Visit']; + } + + Map toJson() { + final Map data = new Map(); + data['GivenAt'] = this.givenAt; + data['Status'] = this.status; + data['VaccinesDescription'] = this.vaccinesDescription; + data['Visit'] = this.visit; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart index 097f6bb0..75a07338 100644 --- a/lib/core/service/childvaccines/child_vaccines_service.dart +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; @@ -6,13 +8,16 @@ import '../base_service.dart'; class ChildVaccinesService extends BaseService { List babyInformationModelList = List(); List userInformationModelList = List(); + Map body = Map(); Future getAllBabyInformationOrders() async { hasError = false; + body['isDentalAllowedBackend'] = false; body['IsLogin'] = true; - // body['UserID'] = babyInformationModelList[0].userID; - body['UserID'] = 42843; + + //body['UserID'] = userInformationModelList[0].userID;//AuthenticatedUser.fromJson(json['List'][0] //babyInformationModelList[0].userID; + body['UserID'] = 46013;//42843; await baseAppClient.post(GET_BABYINFORMATION_REQUEST, diff --git a/lib/core/service/childvaccines/user_information_service.dart b/lib/core/service/childvaccines/user_information_service.dart index 9082039f..7651ef0f 100644 --- a/lib/core/service/childvaccines/user_information_service.dart +++ b/lib/core/service/childvaccines/user_information_service.dart @@ -12,9 +12,16 @@ class UserInformationService extends BaseService{ Future getUserInformationOrders() async { hasError = false; - // body['isDentalAllowedBackend'] = false; - // body['IsLogin'] = true; - // body['UserID'] = 42843; + await getUser(); + body['CreatedBy'] = 102; + body['EditedBy'] = 102; + body['EmailAddress'] = user.emailAddress; + body['IsLogin'] =true; + body['LogInTokenID'] = 'ZBGoQFUG50eQJd6Y7u1ykA=='; + body['MobileNumber'] = user.mobileNumber; + body['NationalID'] = user.nationalityID; + body['ZipCode'] = user.zipCode; + body['isDentalAllowedBackend'] = false; await baseAppClient.post(GET_USERINFORMATION_REQUEST, diff --git a/lib/core/service/childvaccines/vaccination_table_service.dart b/lib/core/service/childvaccines/vaccination_table_service.dart new file mode 100644 index 00000000..7f987b76 --- /dev/null +++ b/lib/core/service/childvaccines/vaccination_table_service.dart @@ -0,0 +1,39 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import '../base_service.dart'; + +class VaccinationTableService extends BaseService { + List createVaccinationTableModelList = List(); + Map body = Map(); + + + + Future getCreateVaccinationTableOrders() async { + hasError = false; + await getUser(); + body['BabyName']="fffffffffff eeeeeeeeeeeeee"; + body['DOB'] = "/Date(1585774800000+0300)/"; + body['EmailAddress'] = user.emailAddress; + body['isDentalAllowedBackend'] = false; + body['SendEmail'] = false; + body['IsLogin'] =true; + + + + + await baseAppClient.post(GET_TABLE_REQUEST, + onSuccess: (dynamic response, int statusCode) { + createVaccinationTableModelList.clear(); + response['List_CreateVaccinationTableModel'].forEach((vital) { + createVaccinationTableModelList.add( + CreateVaccinationTable.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + +} \ No newline at end of file diff --git a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart new file mode 100644 index 00000000..3b72dd50 --- /dev/null +++ b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/vaccination_table_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + +class VaccinationTableViewModel extends BaseViewModel{ + + VaccinationTableService _creteVaccinationTableService = locator(); + + // String get creteVaccinationTableContent => _creteVaccinationTableService.userAgreementContent; + //String get userAgreementContent => _creteNewBabyService.v//_reportsService.userAgreementContent; + List get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList;//.createNewBabyModelList; + getCreateVaccinationTable() async { + setState(ViewState.Busy); + + await _creteVaccinationTableService.getCreateVaccinationTableOrders();//getCreateNewBabyOrders(); + + if ( _creteVaccinationTableService.hasError) { + error = _creteVaccinationTableService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + +} diff --git a/lib/locator.dart b/lib/locator.dart index dee65ccc..46b97fce 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -14,6 +14,7 @@ import 'core/service/blood/blood_donation_service.dart'; import 'core/service/childvaccines/add_new_child_service.dart'; import 'core/service/childvaccines/child_vaccines_service.dart'; import 'core/service/childvaccines/user_information_service.dart'; +import 'core/service/childvaccines/vaccination_table_service.dart'; import 'core/service/contactus/finadus_service.dart'; import 'core/service/contactus/livechat_service.dart'; import 'core/service/dashboard_service.dart'; @@ -43,6 +44,7 @@ import 'core/viewModels/blooddonation/blood_details_view_model.dart'; import 'core/viewModels/blooddonation/booddonation_view_model.dart'; import 'core/viewModels/child_vaccines/add_new_child_view_model.dart'; import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'core/viewModels/child_vaccines/vaccination_table_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; import 'core/viewModels/contactus/livechat_view_model.dart'; import 'core/viewModels/er/am_request_view_model.dart'; @@ -121,6 +123,7 @@ void setupLocator() { locator.registerLazySingleton(() => ChildVaccinesService()); locator.registerLazySingleton(() => UserInformationService()); locator.registerLazySingleton(() => CreteNewBabyService()); + locator.registerLazySingleton(() => VaccinationTableService()); /// View Model @@ -151,7 +154,9 @@ void setupLocator() { locator.registerFactory(() => BloodDeatailsViewModel()); locator.registerFactory(() => ChildVaccinesViewModel()); locator.registerFactory(() => UserInformationViewModel()); - locator.registerFactory(() => UserInformationViewModel()); + locator.registerFactory(() => VaccinationTableViewModel()); + + locator.registerFactory(() => AddNewChildViewModel()); locator.registerFactory(() => H2OViewModel()); diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index f4f2db94..a24fa5a4 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/add_new_child_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -18,7 +19,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'new_text_Field.dart'; + enum Gender { Male, Female, NON } enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } @@ -260,12 +261,15 @@ class _AddNewChildPageState extends State { _firstTextController.text + " " + _secondTextController.text; newChild.gender = checkedValue.toString(); newChild.strDOB=getStartDay() ; + newChild.alertBy=addvancedModel.alertBy; newChild.createdBy=informationModel.createdBy ; newChild.editedBy=informationModel.createdBy; newChild.tempValue=true; - newChild.userID=addvancedModel.userID; + // newChild.userID=46013;//informationModel.userID; newChild.isLogin=true; - newChild.alertBy=addvancedModel.alertBy; + //newChild.tokenID='qMgbP94U23RkXtWWT0Sw=='; + //'ZBGoQFUG50eQJd6Y7u1ykA=='; + model.getNewBabyOrders(newChild: newChild); diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index 54e2b60d..c657b3ca 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -43,17 +44,18 @@ class _ChildPageState extends State with SingleTickerProviderStateMix color: Colors.white, ), - width: 150, + padding: EdgeInsets.all(12), + width: double.infinity, child: Column( children: [ Row(children:[Texts("CHILD NAME"),]), - Row(children:[Texts(model.babyInformationModelList[index].babyName),]), + Row(children:[Texts(model.babyInformationModelList[index].babyName.trim()),]), Row( children: [IconButton( - icon: new Image.asset('assets/images/new-design/female.png'), - tooltip: 'Increase volume by 10', + icon: Image.asset(model.babyInformationModelList[index].gender==1? 'assets/images/new-design/male.png':'assets/images/new-design/female.png'), + tooltip: '', onPressed: () { setState(() { // _volume += 10; @@ -61,15 +63,27 @@ class _ChildPageState extends State with SingleTickerProviderStateMix }); }, ), - Texts(model.babyInformationModelList[index].babyName), + Texts(model.babyInformationModelList[index].genderDescription), IconButton( - icon: Icon(Icons.remove_red_eye_outlined,color: Colors.red,), + icon: Icon(Icons.remove_red_eye,color: Colors.red,), tooltip: 'Increase volume by 10', onPressed: () { - setState(() { - // _volume += 10; - // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - }); + Navigator.push( + context, + FadePage( + page: VaccinationTablePage(), + + //ChildPage(babyInformationModelList:model.BabyInformationModelList) + // HospitalsPage( + // findusHospitalModelList: model.FindusHospitalModelList, + // ) + + ), + ); + // setState(() { + // // _volume += 10; + // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + // }); }, )] ), diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index 269c9259..ba4589a9 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -32,6 +32,7 @@ class _ChildVaccinesPageState extends State onModelReady: (model) => model.getUserInformatioRequestOrders(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, + baseViewModel: model, appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment, body: SingleChildScrollView( physics: ScrollPhysics(), diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart new file mode 100644 index 00000000..295c6dcd --- /dev/null +++ b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectGenderDialog extends StatefulWidget { + final Gender beneficiaryType; + final Function(Gender) onValueSelected; + + SelectGenderDialog({Key key, this.beneficiaryType, this.onValueSelected}); + + @override + _SelectGenderDialogState createState() => + _SelectGenderDialogState(this.beneficiaryType); +} + +class _SelectGenderDialogState extends State { + _SelectGenderDialogState(this.beneficiaryType); + Gender beneficiaryType; + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = Gender.Male; + }); + }, + child: ListTile( + title: Text("Male"), + leading: Radio( + value: Gender.Male, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (Gender value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = Gender.Female; + }); + }, + child: ListTile( + title: Text("Female"), + leading: Radio( + value: Gender.Female, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (Gender value) { + setState(() { + beneficiaryType = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/ChildVaccines/new_text_Field.dart b/lib/pages/ChildVaccines/new_text_Field.dart deleted file mode 100644 index ad9eb580..00000000 --- a/lib/pages/ChildVaccines/new_text_Field.dart +++ /dev/null @@ -1,239 +0,0 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -class NumberTextInputFormatter extends TextInputFormatter { - @override - TextEditingValue formatEditUpdate( - TextEditingValue oldValue, TextEditingValue newValue) { - final int newTextLength = newValue.text.length; - int selectionIndex = newValue.selection.end; - int usedSubstringIndex = 0; - final StringBuffer newText = StringBuffer(); - if (newTextLength >= 1) { - newText.write('('); - if (newValue.selection.end >= 1) selectionIndex++; - } - if (newTextLength >= 4) { - newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') '); - if (newValue.selection.end >= 3) selectionIndex += 2; - } - if (newTextLength >= 7) { - newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-'); - if (newValue.selection.end >= 6) selectionIndex++; - } - if (newTextLength >= 11) { - newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' '); - if (newValue.selection.end >= 10) selectionIndex++; - } - // Dump the rest. - if (newTextLength >= usedSubstringIndex) - newText.write(newValue.text.substring(usedSubstringIndex)); - return TextEditingValue( - text: newText.toString(), - selection: TextSelection.collapsed(offset: selectionIndex), - ); - } -} - -final _mobileFormatter = NumberTextInputFormatter(); - -class NewTextFields extends StatefulWidget { - NewTextFields( - {Key key, - this.type, - this.hintText, - this.suffixIcon, - this.autoFocus, - this.onChanged, - this.initialValue, - this.minLines, - this.maxLines, - this.inputFormatters, - this.padding, - this.focus = false, - this.maxLengthEnforced = true, - this.suffixIconColor, - this.inputAction, - this.onSubmit, - this.keepPadding = true, - this.textCapitalization = TextCapitalization.none, - this.controller, - this.keyboardType, - this.validator, - this.borderOnlyError = false, - this.onSaved, - this.onSuffixTap, - this.readOnly: false, - this.maxLength, - this.prefixIcon, - this.bare = false, - this.onTap, - this.fontSize = 16.0, - this.fontWeight = FontWeight.w700, - this.autoValidate = false, - this.hintColor,this.isEnabled=true}) - : super(key: key); - - final String hintText; - - // final String initialValue; - final String type; - final bool autoFocus; - final IconData suffixIcon; - final Color suffixIconColor; - final Icon prefixIcon; - final VoidCallback onTap; - final TextEditingController controller; - final TextInputType keyboardType; - final FormFieldValidator validator; - final Function onSaved; - final Function onSuffixTap; - final Function onChanged; - final Function onSubmit; - final bool readOnly; - final int maxLength; - final int minLines; - final int maxLines; - final bool maxLengthEnforced; - final bool bare; - final bool isEnabled; - final TextInputAction inputAction; - final double fontSize; - final FontWeight fontWeight; - final bool keepPadding; - final TextCapitalization textCapitalization; - final List inputFormatters; - final bool autoValidate; - final EdgeInsets padding; - final bool focus; - final bool borderOnlyError; - final Color hintColor; - final String initialValue; - @override - _NewTextFieldsState createState() => _NewTextFieldsState(); -} - -class _NewTextFieldsState extends State { - final FocusNode _focusNode = FocusNode(); - bool focus = false; - bool view = false; - - @override - void initState() { - super.initState(); - _focusNode.addListener(() { - setState(() { - focus = _focusNode.hasFocus; - }); - }); - } - - @override - void didUpdateWidget(NewTextFields oldWidget) { - if (widget.focus) _focusNode.requestFocus(); - super.didUpdateWidget(oldWidget); - } - - @override - void dispose() { - _focusNode.dispose(); - super.dispose(); - } - - - bool _determineReadOnly() { - if (widget.readOnly != null && widget.readOnly) { - _focusNode.unfocus(); - return true; - } else { - return false; - } - } - - @override - Widget build(BuildContext context) { - return AnimatedContainer( - duration: Duration(milliseconds: 300), - decoration:BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Container( - margin: EdgeInsets.only(top: 8), - - child: TextFormField( - enabled: widget.isEnabled, - initialValue: widget.initialValue, - keyboardAppearance: Theme.of(context).brightness, - scrollPhysics: BouncingScrollPhysics(), - autovalidate: widget.autoValidate, - textCapitalization: widget.textCapitalization, - onFieldSubmitted: widget.inputAction == TextInputAction.next - ? (widget.onSubmit != null - ? widget.onSubmit - : (val) { - _focusNode.nextFocus(); - }) - : widget.onSubmit, - textInputAction: widget.inputAction, - minLines: widget.minLines ?? 1, - maxLines: widget.maxLines ?? 1, - maxLengthEnforced: widget.maxLengthEnforced, - onChanged: widget.onChanged, - focusNode: _focusNode, - maxLength: widget.maxLength ?? null, - controller: widget.controller, - keyboardType: widget.keyboardType, - readOnly: _determineReadOnly(), - obscureText: widget.type == "password" && !view ? true : false, - autofocus: widget.autoFocus ?? false, - validator: widget.validator, - onSaved: widget.onSaved, - - style: Theme.of(context) - .textTheme - .body2 - .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), - inputFormatters: widget.keyboardType == TextInputType.phone - ? [ - WhitelistingTextInputFormatter.digitsOnly, - _mobileFormatter, - ] - : widget.inputFormatters, - decoration: InputDecoration( - labelText: widget.hintText, - labelStyle: TextStyle(color: Colors.black), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context) - .errorColor - .withOpacity(0.5), - width: 1.0), - borderRadius: BorderRadius.circular(12.0)), - focusedErrorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context) - .errorColor - .withOpacity(0.5), - width: 1.0), - borderRadius: BorderRadius.circular(8.0)), - focusedBorder: OutlineInputBorder( - borderSide: - BorderSide(color: Colors.white, width: 1.0), - borderRadius: BorderRadius.circular(12)), - disabledBorder: OutlineInputBorder( - borderSide: - BorderSide(color: Colors.white, width: 1.0), - borderRadius: BorderRadius.circular(12)), - enabledBorder: OutlineInputBorder( - borderSide: - BorderSide(color: Colors.white, width: 1.0), - borderRadius: BorderRadius.circular(12), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart new file mode 100644 index 00000000..8039765e --- /dev/null +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -0,0 +1,136 @@ +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/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; + +class VaccinationTablePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + var checkedValue; + return BaseView( + onModelReady: (model) => model.getCreateVaccinationTable(),//getUserTermsAndConditions(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBarTitle: "Vaccination", + body: SingleChildScrollView( + child:Container( + margin: EdgeInsets.only(left: 15,right: 15,top: 70), + child: Column( + children: [//babyInformationModelList.length + ...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: [ + Html( + data:"
BCG
HEPATITIS B
"//model.creteVaccinationTableModelList[index].vaccinesDescription + , + ), + // Row(children:[Texts("CHILD NAME"),]), + // Row(children:[Texts(model.babyInformationModelList[index].babyName.trim()),]), + + // Row( + // children: [IconButton( + // icon: Image.asset(model.babyInformationModelList[index].gender==1? 'assets/images/new-design/male.png':'assets/images/new-design/female.png'), + // tooltip: '', + // onPressed: () { + // setState(() { + // // _volume += 10; + // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + // }); + // }, + // ), + // Texts(model.babyInformationModelList[index].genderDescription), + // IconButton( + // icon: Icon(Icons.remove_red_eye,color: Colors.red,), + // tooltip: 'Increase volume by 10', + // onPressed: () { + // Navigator.push( + // context, + // FadePage( + // page: VaccinationTablePage(), + // + // //ChildPage(babyInformationModelList:model.BabyInformationModelList) + // // HospitalsPage( + // // findusHospitalModelList: model.FindusHospitalModelList, + // // ) + // + // ), + // ); + // // setState(() { + // // // _volume += 10; + // // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + // // }); + // }, + // )] + // ), + // Row(children:[Texts("Birthday"),]), + // Row(children:[IconButton( + // icon: new Image.asset('assets/images/new-design/calender-secondary.png'), + // tooltip: 'Increase volume by 10', + // onPressed: () { + // setState(() { + // // _volume += 10; + // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + // }); + // }, + // ), + // Texts(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB)),]), + // Row(children:[IconButton( + // icon: new Image.asset('assets/images/new-design/garbage.png'), + // tooltip: '', + // onPressed: () { + // setState(() { + // // _volume += 10; + // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + // }); + // }, + // ), + // Texts("Birthday"),]), + ], + ) + + + ) + + ) + ], + ), + + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), + label: " ", + // + onTap: () {} + + + ), + ), + ), + ); + } +} From dcb93bf5cc58071887b871670cded223780bfc64 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 7 Oct 2020 12:12:15 +0300 Subject: [PATCH 14/16] child Vaccines --- .../ChildVaccines/vaccinationtable_page.dart | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart index 8039765e..952cfb0c 100644 --- a/lib/pages/ChildVaccines/vaccinationtable_page.dart +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -38,10 +38,27 @@ class VaccinationTablePage extends StatelessWidget { child: Column( children: [ - Html( - data:"
BCG
HEPATITIS B
"//model.creteVaccinationTableModelList[index].vaccinesDescription - , - ), + Row(children: [ + Text(model.creteVaccinationTableModelList[index].visit), + SizedBox(width: 10,), + + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Html( + // data:"
BCG
HEPATITIS B
"//model.creteVaccinationTableModelList[index].vaccinesDescription + data:model.creteVaccinationTableModelList[index].vaccinesDescription, + + ), + ],), + ), + Text(model.creteVaccinationTableModelList[index].givenAt), + + + ],), + Divider(color:Colors.black ,), // Row(children:[Texts("CHILD NAME"),]), // Row(children:[Texts(model.babyInformationModelList[index].babyName.trim()),]), @@ -123,7 +140,7 @@ class VaccinationTablePage extends StatelessWidget { child: SecondaryButton( textColor: Colors.white, color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), - label: " ", + label: "Send Email ", // onTap: () {} From 24795e808f5ef4bc1da8924f904bc4666416c409 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 7 Oct 2020 12:56:42 +0300 Subject: [PATCH 15/16] child Vaccines --- .../dialogs/SelectGenderDialog.dart | 85 ++++++++----------- .../ChildVaccines/vaccinationtable_page.dart | 13 ++- 2 files changed, 47 insertions(+), 51 deletions(-) diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart index 295c6dcd..5eb461c6 100644 --- a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart +++ b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart @@ -5,20 +5,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class SelectGenderDialog extends StatefulWidget { - final Gender beneficiaryType; - final Function(Gender) onValueSelected; - - SelectGenderDialog({Key key, this.beneficiaryType, this.onValueSelected}); - @override - _SelectGenderDialogState createState() => - _SelectGenderDialogState(this.beneficiaryType); + _SelectGenderDialogState createState() => _SelectGenderDialogState(); } class _SelectGenderDialogState extends State { - _SelectGenderDialogState(this.beneficiaryType); - Gender beneficiaryType; - @override Widget build(BuildContext context) { return SimpleDialog( @@ -34,21 +25,12 @@ class _SelectGenderDialogState extends State { child: InkWell( onTap: () { setState(() { - beneficiaryType = Gender.Male; + //beneficiaryType = Gender.Male; }); }, child: ListTile( - title: Text("Male"), - leading: Radio( - value: Gender.Male, - groupValue: beneficiaryType, - activeColor: Colors.red[800], - onChanged: (Gender value) { - setState(() { - beneficiaryType = value; - }); - }, - ), + title: Text("Send the child's schedule to the email\n Tamer.dasdasdas@gmail.com "), + ), ), ) @@ -57,33 +39,33 @@ class _SelectGenderDialogState extends State { SizedBox( height: 5.0, ), - Row( - children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - setState(() { - beneficiaryType = Gender.Female; - }); - }, - child: ListTile( - title: Text("Female"), - leading: Radio( - value: Gender.Female, - groupValue: beneficiaryType, - activeColor: Colors.red[800], - onChanged: (Gender value) { - setState(() { - beneficiaryType = value; - }); - }, - ), - ), - ), - ) - ], - ), + // Row( + // children: [ + // Expanded( + // flex: 1, + // child: InkWell( + // onTap: () { + // setState(() { + // beneficiaryType = Gender.Female; + // }); + // }, + // child: ListTile( + // title: Text("Female"), + // leading: Radio( + // value: Gender.Female, + // groupValue: beneficiaryType, + // activeColor: Colors.red[800], + // onChanged: (Gender value) { + // setState(() { + // beneficiaryType = value; + // }); + // }, + // ), + // ), + // ), + // ) + // ], + // ), SizedBox( height: 5.0, ), @@ -121,7 +103,7 @@ class _SelectGenderDialogState extends State { flex: 1, child: InkWell( onTap: () { - widget.onValueSelected(beneficiaryType); + // widget.onValueSelected(beneficiaryType); Navigator.pop(context); }, child: Padding( @@ -143,4 +125,7 @@ class _SelectGenderDialogState extends State { ], ); } + + + } diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart index 952cfb0c..6ac11e4f 100644 --- a/lib/pages/ChildVaccines/vaccinationtable_page.dart +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -9,6 +9,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'dialogs/SelectGenderDialog.dart'; + class VaccinationTablePage extends StatelessWidget { @override Widget build(BuildContext context) { @@ -142,7 +144,16 @@ class VaccinationTablePage extends StatelessWidget { color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), label: "Send Email ", // - onTap: () {} + onTap: () { + //SelectGenderDialog(); +//=============== + showDialog( + context: context, + child: SelectGenderDialog( + ), + ); + //========= + } ), From cb2a78e2ee721f07974fb91065ae400db1ed750e Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Wed, 7 Oct 2020 16:17:16 +0300 Subject: [PATCH 16/16] child Vaccines --- .../get_vacainations_itemsmodel.dart | 18 +++++++++ .../get_vaccinations_item_services.dart | 38 +++++++++++++++++++ .../ChildVaccines/add_newchild_page.dart | 18 +-------- lib/pages/ChildVaccines/child_page.dart | 6 --- .../dialogs/SelectGenderDialog.dart | 28 +------------- 5 files changed, 58 insertions(+), 50 deletions(-) create mode 100644 lib/core/model/childvaccines/get_vacainations_itemsmodel.dart create mode 100644 lib/core/service/childvaccines/get_vaccinations_item_services.dart diff --git a/lib/core/model/childvaccines/get_vacainations_itemsmodel.dart b/lib/core/model/childvaccines/get_vacainations_itemsmodel.dart new file mode 100644 index 00000000..14891852 --- /dev/null +++ b/lib/core/model/childvaccines/get_vacainations_itemsmodel.dart @@ -0,0 +1,18 @@ +class GET_VACCINATIONS_ITEMSMODEL { + String dESCRIPTION; + String iTEMCODE; + + GET_VACCINATIONS_ITEMSMODEL({this.dESCRIPTION, this.iTEMCODE}); + + GET_VACCINATIONS_ITEMSMODEL.fromJson(Map json) { + dESCRIPTION = json['DESCRIPTION']; + iTEMCODE = json['ITEM_CODE']; + } + + Map toJson() { + final Map data = new Map(); + data['DESCRIPTION'] = this.dESCRIPTION; + data['ITEM_CODE'] = this.iTEMCODE; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/childvaccines/get_vaccinations_item_services.dart b/lib/core/service/childvaccines/get_vaccinations_item_services.dart new file mode 100644 index 00000000..f7fe4662 --- /dev/null +++ b/lib/core/service/childvaccines/get_vaccinations_item_services.dart @@ -0,0 +1,38 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_itemsmodel.dart'; + +import '../base_service.dart'; + +class GetVccinationsItemsService extends BaseService { + List getVaccinationsItemModelList = List(); + Map body = Map(); + + + + Future getaccinationsitemOrders() async { + hasError = false; + // await getUser(); + // body['BabyName']="fffffffffff eeeeeeeeeeeeee"; + // body['DOB'] = "/Date(1585774800000+0300)/"; + // body['EmailAddress'] = user.emailAddress; + // body['isDentalAllowedBackend'] = false; + // body['SendEmail'] = false; + // body['IsLogin'] =true; + + + + + await baseAppClient.post(GET_TABLE_REQUEST, + onSuccess: (dynamic response, int statusCode) { + getVaccinationsItemModelList.clear(); + response['List_CreateVaccinationTableModel'].forEach((vital) { + getVaccinationsItemModelList.add( + GET_VACCINATIONS_ITEMSMODEL.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + +} \ No newline at end of file diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index a24fa5a4..f2970cad 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -274,19 +274,7 @@ class _AddNewChildPageState extends State { model.getNewBabyOrders(newChild: newChild); - //DateTime.now();//DateUtil.convertStringToDate(getStartDay()); - // addvancedModel.alertBy = 2; - // addvancedModel.alertBy = addvancedModel.babyID; - // addvancedModel.genderDescription = - // checkedValue == 1 ? "Male" : "Female"; - // addvancedModel.patientID = addvancedModel.patientID; - // addvancedModel.userID = addvancedModel.userID; - // // advanceModel.fileNumber = _fileTextController.text; - // // advanceModel.hospitalsModel = _selectedHospital; - // // advanceModel.note = _notesTextController.text; - // // advanceModel.email = email ?? model.user.emailAddress; - // // advanceModel.amount = amount; - // // bloodDetails.city=_selectedHospital.toString(); + AppToast.showSuccessToast(message: "Record Added"); //============ Navigator.push( @@ -294,10 +282,6 @@ class _AddNewChildPageState extends State { FadePage( page: ChildPage(), - //ChildPage(babyInformationModelList:model.BabyInformationModelList) - // HospitalsPage( - // findusHospitalModelList: model.FindusHospitalModelList, - // ) ), ); //============== diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index c657b3ca..6a937aad 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -12,9 +12,7 @@ import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class ChildPage extends StatefulWidget { -//final List babyInformationModelList; - // ChildPage({Key key, this.babyInformationModelList}) ; @override _ChildPageState createState() => _ChildPageState(); @@ -139,10 +137,6 @@ class _ChildPageState extends State with SingleTickerProviderStateMix FadePage( page: AddNewChildPage(), - //ChildPage(babyInformationModelList:model.BabyInformationModelList) - // HospitalsPage( - // findusHospitalModelList: model.FindusHospitalModelList, - // ) ), ), diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart index 5eb461c6..f84dea29 100644 --- a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart +++ b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart @@ -39,33 +39,7 @@ class _SelectGenderDialogState extends State { SizedBox( height: 5.0, ), - // Row( - // children: [ - // Expanded( - // flex: 1, - // child: InkWell( - // onTap: () { - // setState(() { - // beneficiaryType = Gender.Female; - // }); - // }, - // child: ListTile( - // title: Text("Female"), - // leading: Radio( - // value: Gender.Female, - // groupValue: beneficiaryType, - // activeColor: Colors.red[800], - // onChanged: (Gender value) { - // setState(() { - // beneficiaryType = value; - // }); - // }, - // ), - // ), - // ), - // ) - // ], - // ), + SizedBox( height: 5.0, ),