UI updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent 728c22cc68
commit a075d53dd5

@ -375,6 +375,7 @@ const Map localizedValues = {
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
"MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"}, "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
"km": {"en": "KMs:", "ar": "كم"}, "km": {"en": "KMs:", "ar": "كم"},
"km_": {"en": "KM", "ar": "كم"},
"PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"}, "PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"},
"ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "}, "ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "},
"ClickHere": {"en": "Click here", "ar": "أنقر هنا"}, "ClickHere": {"en": "Click here", "ar": "أنقر هنا"},
@ -1503,5 +1504,6 @@ const Map localizedValues = {
"seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"}, "seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"},
"covidQuestionnaire": { "en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:" }, "covidQuestionnaire": { "en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:" },
"covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " }, "covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " },
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" } "emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" },
"serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}
}; };

@ -13,7 +13,7 @@ class ActivePrescriptionReport {
// List<int> image; // List<int> image;
// String imageExtension; // String imageExtension;
// dynamic imageSRCUrl; // dynamic imageSRCUrl;
// String imageString; String imageString;
// dynamic imageThumbUrl; // dynamic imageThumbUrl;
dynamic isCovered; dynamic isCovered;
String itemDescription; String itemDescription;
@ -48,7 +48,7 @@ class ActivePrescriptionReport {
// this.image, // this.image,
// this.imageExtension, // this.imageExtension,
// this.imageSRCUrl, // this.imageSRCUrl,
// this.imageString, this.imageString,
// this.imageThumbUrl, // this.imageThumbUrl,
this.isCovered, this.isCovered,
this.itemDescription, this.itemDescription,
@ -83,7 +83,7 @@ class ActivePrescriptionReport {
// image = json['Image'].cast<int>(); // image = json['Image'].cast<int>();
// imageExtension = json['ImageExtension']; // imageExtension = json['ImageExtension'];
// imageSRCUrl = json['ImageSRCUrl']; // imageSRCUrl = json['ImageSRCUrl'];
// imageString = json['ImageString']; imageString = json['ImageString'];
// imageThumbUrl = json['ImageThumbUrl']; // imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered']; isCovered = json['IsCovered'];
itemDescription = json['ItemDescription']; itemDescription = json['ItemDescription'];
@ -120,7 +120,7 @@ class ActivePrescriptionReport {
// data['Image'] = this.image; // data['Image'] = this.image;
// data['ImageExtension'] = this.imageExtension; // data['ImageExtension'] = this.imageExtension;
// data['ImageSRCUrl'] = this.imageSRCUrl; // data['ImageSRCUrl'] = this.imageSRCUrl;
// data['ImageString'] = this.imageString; data['ImageString'] = this.imageString;
// data['ImageThumbUrl'] = this.imageThumbUrl; // data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered; data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription; data['ItemDescription'] = this.itemDescription;

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import '../base_service.dart'; import '../base_service.dart';
@ -14,6 +15,11 @@ class FindusService extends BaseService {
Future getAllFindUsOrders() async { Future getAllFindUsOrders() async {
hasError = false; hasError = false;
var lat = await sharedPref.getDouble(USER_LAT);
var long = await sharedPref.getDouble(USER_LONG);
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
await baseAppClient.post(GET_FINDUS_REQUEST, await baseAppClient.post(GET_FINDUS_REQUEST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
FindusModelList.clear(); FindusModelList.clear();

@ -117,6 +117,7 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
bottomSheet: Container( bottomSheet: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 70.0, height: 70.0,
color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button( child: Button(
onTap: () async { onTap: () async {
@ -134,8 +135,6 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
), ),
), ),
); );
// widget.changePageViewIndex(1);
} }
}, },
label: TranslationBase.of(context).next, label: TranslationBase.of(context).next,
@ -144,39 +143,6 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
loading: widget.model.state == ViewState.BusyLocal, loading: widget.model.state == ViewState.BusyLocal,
), ),
), ),
// Container(
// height: MediaQuery.of(context).size.height * 0.10,
// width: double.infinity,
// child: Column(
// children: <Widget>[
// Container(
// width: MediaQuery.of(context).size.width * 0.9,
// child: SecondaryButton(
// label: TranslationBase.of(context).next,
// disabled: this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal,
// color: Colors.grey[800],
// loading: widget.model.state == ViewState.BusyLocal,
// onTap: () async {
// await widget.model.getCustomerInfo();
// if (widget.model.state == ViewState.ErrorLocal) {
// Utils.showErrorToast();
// } else {
// Navigator.push(
// context,
// FadePage(
// page: NewHomeHealthCareStepTowPage(),
// ),
// );
// // widget.changePageViewIndex(1);
// }
// },
// textColor: Theme.of(context).backgroundColor),
// ),
// ],
// ),
// ),
); );
} }

@ -1,9 +1,13 @@
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
import 'LiveChat/livechat_page.dart';
import 'findus/findus_page.dart';
class ContactUsPage extends StatefulWidget { class ContactUsPage extends StatefulWidget {
@override @override
@ -23,39 +27,82 @@ class _ContactUsPageState extends State<ContactUsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<Widget> myMedicalList = myOptionsList(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).hMGServiceLabel, appBarTitle: TranslationBase.of(context).contactUs,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
body: GridView( body: Column(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21),
shrinkWrap: true,
children: [ children: [
CardCommonContact( Container(
image: 'assets/images/new-design/find_us_icon.png', width: double.infinity,
text: TranslationBase.of(context).findUs, height: 30,
subText: "",
type: 0,
),
CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png',
text: TranslationBase.of(context).feedback,
subText: "",
type: 1,
), ),
CardCommonContact( Padding(
image: 'assets/images/new-design/live_chat_icon.png', padding: EdgeInsets.only(left: 12, right: 12),
text: TranslationBase.of(context).liveChat, child: GridView.builder(
subText: "", shrinkWrap: true,
type: 2, primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) {
return myMedicalList[index];
},
),
), ),
], ],
), ),
); );
} }
List<Widget> myOptionsList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: FindUsPage()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).findUs,
imagePath: 'assets/images/new-design/find_us_icon.png',
subTitle: null,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: FeedbackHomePage()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).feedback,
imagePath: 'assets/images/new-design/feedback_icon.png',
subTitle: null,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: LiveChatPage()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).liveChat,
imagePath: 'assets/images/new-design/live_chat_icon.png',
subTitle: null,
isPngImage: true,
),
));
return medical;
}
} }

@ -37,7 +37,7 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: 'Locations', appBarTitle: TranslationBase.of(context).location,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),

@ -82,7 +82,7 @@ class _HospitalsPageState extends State<HospitalsPage> {
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 12, right: 12), padding: EdgeInsets.only(left: 12, right: 12),
child: Text( child: Text(
_location.locationName?.trim() ?? "", _location.locationName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -10,6 +10,7 @@ class PharmaciesPage extends StatefulWidget {
final List<GetHMGLocationsModel> findusPharmaciesModelList; final List<GetHMGLocationsModel> findusPharmaciesModelList;
PharmaciesPage({Key key, this.findusPharmaciesModelList}); PharmaciesPage({Key key, this.findusPharmaciesModelList});
@override @override
_PharmaciesPageState createState() => _PharmaciesPageState(); _PharmaciesPageState createState() => _PharmaciesPageState();
} }
@ -102,7 +103,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
height: 4, height: 4,
), ),
Text( Text(
_location.cityName?.trim() ?? "", _location.cityName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -1,8 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -37,7 +36,7 @@ class _ErOptionsState extends State<ErOptions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context); projectViewModel = Provider.of<ProjectViewModel>(context);
final rrtLocked = !projectViewModel.havePrivilege(68); final rrtLocked = projectViewModel.havePrivilege(68);
return AppScaffold( return AppScaffold(
isShowAppBar: widget.isAppbar, isShowAppBar: widget.isAppbar,
@ -47,129 +46,58 @@ class _ErOptionsState extends State<ErOptions> {
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
body: GridView( body: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21), padding: EdgeInsets.all(21),
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
CardCommonEr( InkWell(
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).ambulancerequest,
subText: TranslationBase.of(context).requestA,
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: AmbulanceReq())); Navigator.push(context, FadePage(page: AmbulanceReq()));
}, },
child: MedicalProfileItem(
title: TranslationBase.of(context).ambulancerequest,
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).requestA,
isPngImage: true,
),
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: NearestEr()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).nearester,
imagePath: 'assets/images/new-design/emergency_icon.png',
subTitle: TranslationBase.of(context).locationa,
isPngImage: true,
),
), ),
CardCommonEr( InkWell(
image: 'assets/images/new-design/emergency_icon.png',
text: TranslationBase.of(context).nearester,
subText: TranslationBase.of(context).locationa,
onTap: () {
Navigator.push(context, FadePage(page: NearestEr()));
}),
CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text: 'ED service',
subText: 'ED service',
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: DdServicesPage())); Navigator.push(context, FadePage(page: DdServicesPage()));
}, },
child: MedicalProfileItem(
title: "ED",
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).service,
isPngImage: true,
),
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: RRTMainScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).rrtService,
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).service,
isPngImage: true,
isEnable: rrtLocked,
),
), ),
CardCommonEr(
locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).rapidResponseTeam,
onTap: () {
Navigator.push(context, FadePage(page: RRTMainScreen()));
}),
], ],
), ),
//
// body: Container(
// margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
//
// Container(
// height: 170,
// margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.start,
// children: <Widget>[
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/AM.PNG',
// text: TranslationBase.of(context).ambulancerequest,
// subText: TranslationBase.of(context).requestA,
// onTap: (){
// Navigator.push(
// context,
// FadePage(
// page: AmbulanceReq()));
// },
//
// ),
// ),
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/emergency_icon.png',
// text: TranslationBase.of(context).nearester,
// subText: TranslationBase.of(context).locationa,
// onTap:(){
// Navigator.push(
// context,
// FadePage(
// page: NearestEr()));
// }),
//
// )
// ],
// ),
// ),
// Container(
// margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
// height: 170,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.start,
// children: <Widget>[
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/AM.PNG',
// text:'ED service',
// subText: 'ED service',
// onTap: (){
// Navigator.push(
// context,
// FadePage(page: DdServicesPage())
// );
// },
//
// ),
// ),
// Expanded(
// child: CardCommonEr(
// locked: rrtLocked,
// image: 'assets/images/new-design/AM.PNG',
// text: TranslationBase.of(context).rrtService,
// subText: TranslationBase.of(context).rapidResponseTeam,
// onTap:(){
// Navigator.push(
// context,
// FadePage(
// page: RRTMainScreen()));
// }),
// )
// ],
// ),
// ),
// ],
// ),
// ),
); );
} }
} }

@ -93,7 +93,7 @@ class _NearestErState extends State<NearestEr> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
ErService service = new ErService(); ErService service = new ErService();
service.getProjectAvgERWaitingTimeOrders().then((response) { service.getProjectAvgERWaitingTimeOrders().then((response) {
if (response['MessageStatus'] == 1) { if (response != null && response['MessageStatus'] == 1) {
setState(() { setState(() {
projectAvgERWaitingTimeModelList.clear(); projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) { response['List_ProjectAvgERWaitingTime'].forEach((vital) {
@ -103,12 +103,14 @@ class _NearestErState extends State<NearestEr> {
}); });
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).serviceNotAvailable);
isDataLoaded = false; isDataLoaded = false;
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err.toString());
}); });
} }
} }

@ -541,7 +541,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
page: VitalSignDetailsScreen( page: VitalSignDetailsScreen(
appointmentNo: appoNo, appointmentNo: appoNo,
projectID: projectID, projectID: projectID,
isNotOneAppointment: true, isNotOneAppointment: false,
))); )));
} }

@ -54,7 +54,7 @@ class ActiveMedicationsPage extends StatelessWidget {
Container( Container(
child: Card( child: Card(
child: Image.memory( child: Image.memory(
Utils.dataFromBase64String(model.activePrescriptionReport[index].productImageBase64), Utils.dataFromBase64String(model.activePrescriptionReport[index].imageString),
fit: BoxFit.cover, fit: BoxFit.cover,
height: SizeConfig.imageSizeMultiplier * 19, height: SizeConfig.imageSizeMultiplier * 19,
width: SizeConfig.imageSizeMultiplier * 18, width: SizeConfig.imageSizeMultiplier * 18,

@ -155,7 +155,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).fileNumber, hintText: TranslationBase.of(context).fileNumber,
controller: _fileTextController, controller: _fileTextController,
readOnly: true, readOnly: beneficiaryType == BeneficiaryType.OtherAccount ? false : true,
), ),
if (beneficiaryType == BeneficiaryType.OtherAccount) if (beneficiaryType == BeneficiaryType.OtherAccount)
SizedBox( SizedBox(

@ -87,7 +87,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
leading: Radio( leading: Radio(
value: BeneficiaryType.MyFamilyFiles, value: BeneficiaryType.MyFamilyFiles,
groupValue: beneficiaryType, groupValue: beneficiaryType,
activeColor: Color(0xFF40ACC9), activeColor: Color(0xffC5272D),
onChanged: (BeneficiaryType value) { onChanged: (BeneficiaryType value) {
setState(() { setState(() {
beneficiaryType = value; beneficiaryType = value;
@ -124,7 +124,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
leading: Radio( leading: Radio(
value: BeneficiaryType.OtherAccount, value: BeneficiaryType.OtherAccount,
groupValue: beneficiaryType, groupValue: beneficiaryType,
activeColor: Color(0xFF40ACC9), activeColor: Color(0xffC5272D),
onChanged: (BeneficiaryType value) { onChanged: (BeneficiaryType value) {
setState(() { setState(() {
beneficiaryType = value; beneficiaryType = value;
@ -158,7 +158,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.46, letterSpacing: -0.46,
color: Colors.red, color: Color(0xffC5272D),
), ),
), ),
), ),

@ -123,7 +123,7 @@ class MyBalancePage extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
// height: MediaQuery.of(context).size.height * 0.12, // height: MediaQuery.of(context).size.height * 0.12,
height: 70.0, height: 85.0,
color: Colors.white, color: Colors.white,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),

@ -63,7 +63,7 @@ class _MyInvoicesState extends State<MyInvoices> {
return DoctorCard( return DoctorCard(
onTap: () => openInvoiceDetailsPage(getDentalAppointmentsResponse.listDentalAppointments[index]), onTap: () => openInvoiceDetailsPage(getDentalAppointmentsResponse.listDentalAppointments[index]),
isInOutPatient: true, isInOutPatient: true,
name: TranslationBase.of(context).dr + " " + getDentalAppointmentsResponse.listDentalAppointments[index].doctorName, name: TranslationBase.of(context).dr.toString() + " " + (projectViewModel.isArabic ? getDentalAppointmentsResponse.listDentalAppointments[index].doctorNameN.toString() : getDentalAppointmentsResponse.listDentalAppointments[index].doctorName.toString()),
billNo: getDentalAppointmentsResponse.listDentalAppointments[index].invoiceNo.toString(), billNo: getDentalAppointmentsResponse.listDentalAppointments[index].invoiceNo.toString(),
profileUrl: getDentalAppointmentsResponse.listDentalAppointments[index].doctorImageURL, profileUrl: getDentalAppointmentsResponse.listDentalAppointments[index].doctorImageURL,
subName: getDentalAppointmentsResponse.listDentalAppointments[index].projectName, subName: getDentalAppointmentsResponse.listDentalAppointments[index].projectName,

@ -1,14 +1,14 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/Weight/WeightHomePage.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart';
import 'Weight/WeightHomePage.dart';
import 'blood_pressure/BloodPressureHomePage.dart'; import 'blood_pressure/BloodPressureHomePage.dart';
import 'blood_suger/blood_sugar_home_page.dart';
class MyTrackers extends StatelessWidget { class MyTrackers extends StatelessWidget {
@override @override
@ -26,125 +26,51 @@ class MyTrackers extends StatelessWidget {
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: GridView( child: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21), padding: EdgeInsets.all(21),
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
CardCommonContact( InkWell(
image: 'assets/tracker/blood-suger.png', onTap: () {
text: TranslationBase.of(context).bloodSugar, Navigator.push(context, FadePage(page: BloodSugarHomePage()));
subText: "", },
type: 3, child: MedicalProfileItem(
title: TranslationBase.of(context).bloodSugar,
imagePath: 'assets/tracker/blood-suger.png',
subTitle: null,
isPngImage: true,
width: 45.0,
height: 45.0,
),
), ),
CardCommonContact( InkWell(
image: 'assets/tracker/blood-pressure.png', onTap: () {
text: TranslationBase.of(context).bloodPressure, Navigator.push(context, FadePage(page: BloodPressureHomePage()));
subText: "", },
type: 4, child: MedicalProfileItem(
title: TranslationBase.of(context).bloodPressure,
imagePath: 'assets/tracker/blood-pressure.png',
subTitle: null,
isPngImage: true,
width: 45.0,
height: 45.0,
),
), ),
CardCommonContact( InkWell(
image: 'assets/tracker/weight.png', onTap: () {
text: TranslationBase.of(context).weight, Navigator.push(context, FadePage(page: WeightHomePage()));
subText: "", },
type: 5, child: MedicalProfileItem(
) title: TranslationBase.of(context).weight,
]) imagePath: 'assets/tracker/weight.png',
subTitle: null,
// Column( isPngImage: true,
// crossAxisAlignment: CrossAxisAlignment.start, width: 45.0,
// children: [ height: 45.0,
// Row( ),
// mainAxisAlignment: MainAxisAlignment.spaceBetween, ),
// children: [ ])),
// Expanded(
// child: InkWell(
// onTap: () => Navigator.push(context, FadePage(page: BloodSugarHomePage())),
// child: Container(
// margin: EdgeInsets.all(5),
// width: MediaQuery.of(context).size.width * 0.35,
// height: MediaQuery.of(context).size.width * 0.35,
// decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// 'assets/tracker/blood-suger.png',
// width: 60.0,
// ),
// SizedBox(
// height: 15,
// ),
// Texts(TranslationBase.of(context).bloodSugar),
// ],
// ),
// ),
// ),
// ),
// Expanded(
// child: InkWell(
// onTap: () => Navigator.push(context, FadePage(page: BloodPressureHomePage())),
// child: Container(
// margin: EdgeInsets.all(5),
// width: MediaQuery.of(context).size.width * 0.35,
// height: MediaQuery.of(context).size.width * 0.35,
// decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// 'assets/tracker/blood-pressure.png',
// width: 60.0,
// ),
// SizedBox(
// height: 15,
// ),
// Texts(TranslationBase.of(context).bloodPressure),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// Row(
// //mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: [
// Expanded(
// child: InkWell(
// onTap: () => Navigator.push(context, FadePage(page: WeightHomePage())),
// child: Container(
// margin: EdgeInsets.all(5),
// width: MediaQuery.of(context).size.width * 0.35,
// height: MediaQuery.of(context).size.width * 0.35,
// decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// 'assets/tracker/weight.png',
// width: 60.0,
// ),
// SizedBox(
// height: 15,
// ),
// Texts(TranslationBase.of(context).weight),
// ],
// ),
// ),
// ),
// ),
// Expanded(
// child: Container(),
// ),
// ],
// ),
// ],
// ),
),
), ),
); );
} }

@ -1,9 +1,11 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -36,7 +38,7 @@ class PaymentService extends StatelessWidget {
shrinkWrap: true, shrinkWrap: true,
primary: false, primary: false,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: paymentServiceList.length, itemCount: paymentServiceList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
@ -55,44 +57,52 @@ class PaymentService extends StatelessWidget {
List<Widget> medical = List(); List<Widget> medical = List();
medical.add( medical.add(
CardCommonContact( InkWell(
image: 'assets/images/online_payment_icon.png', onTap: () {
text: TranslationBase.of(context).payment, navigateToToDoPage(context);
subText: TranslationBase.of(context).paymentOnline, },
type: 6, child: MedicalProfileItem(
width: double.infinity, title: TranslationBase.of(context).payment,
height: 55.0, imagePath: 'assets/images/new-design/online_payment_icon.png',
projectViewModel: projectViewModel, subTitle: TranslationBase.of(context).paymentOnline,
model: model, isPngImage: true,
width: 65.0,
height: 55.0,
),
), ),
); );
medical.add( medical.add(
CardCommonContact( InkWell(
image: 'assets/images/device_icon.png', onTap: () {
text: TranslationBase.of(context).onlineCheckIn, Navigator.push(context, FadePage(page: AdvancePaymentPage()));
subText: TranslationBase.of(context).appointment, },
type: 7, child: MedicalProfileItem(
width: 70.0, title: TranslationBase.of(context).onlineCheckIn,
height: 60.0, imagePath: 'assets/images/device_icon.png',
projectViewModel: projectViewModel, subTitle: TranslationBase.of(context).appointment,
model: model, isPngImage: true,
width: 45.0,
height: 45.0,
),
), ),
); );
medical.add( medical.add(
CardCommonContact( InkWell(
image: 'assets/images/check-in.png', onTap: () {
text: TranslationBase.of(context).hmg, Navigator.push(context, FadePage(page: MyBalancePage()));
subText: TranslationBase.of(context).wallet, },
type: 8, child: MedicalProfileItem(
width: 60.0, title: TranslationBase.of(context).hmg,
height: 55.0, imagePath: 'assets/images/check-in.png',
projectViewModel: projectViewModel, subTitle: TranslationBase.of(context).wallet,
model: model, isPngImage: true,
width: 45.0,
height: 45.0,
),
), ),
); );
return medical; return medical;
} }

@ -379,6 +379,20 @@ class DateUtil {
return ""; return "";
} }
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted according to language
static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) {
if (dateTime != null)
return DateFormat('dd/MM/yyyy', isArabic ? "ar_SA" : "en_US").format(dateTime);
else
return "";
}
/// get data formatted like 10:30 according to lang
static String formatDateToTimeLang(DateTime date, bool isArabic) {
return DateFormat('hh:mm a', isArabic ? "ar_SA" : "en_US").format(date);
}
/// get data formatted like 26/4/2020 10:30 /// get data formatted like 26/4/2020 10:30
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) { static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) {

@ -2259,8 +2259,7 @@ class TranslationBase {
String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode]; String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode];
String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -49,7 +49,7 @@ class DoctorCard extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return Container( return Container(
height: 120, height: 128,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
@ -130,7 +130,7 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( Text(
DateUtil.formatDateToDate(date, projectViewModel.isArabic), DateUtil.getDayMonthYearDateFormattedLang(date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
Text( Text(

@ -12,8 +12,10 @@ class MedicalProfileItem extends StatelessWidget {
final bool isPngImage; final bool isPngImage;
bool isEnable; bool isEnable;
Color imgColor; Color imgColor;
final width;
final height;
MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false}); MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false, this.width, this.height});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -43,8 +45,8 @@ class MedicalProfileItem extends StatelessWidget {
isPngImage isPngImage
? Image.asset( ? Image.asset(
imagePath, imagePath,
height: SizeConfig.widthMultiplier * 7, width: width != null ? width : SizeConfig.widthMultiplier * 7,
width: SizeConfig.widthMultiplier * 7, height: height != null ? height : SizeConfig.widthMultiplier * 7,
color: imgColor, color: imgColor,
) )
: SvgPicture.asset( : SvgPicture.asset(
@ -64,25 +66,26 @@ class MedicalProfileItem extends StatelessWidget {
height: 13 / 10, height: 13 / 10,
), ),
), ),
Container( if (subTitle != null)
width: double.infinity, Container(
child: Row( width: double.infinity,
children: [ child: Row(
Expanded( children: [
child: Text( Expanded(
subTitle, child: Text(
maxLines: 1, subTitle,
style: TextStyle( maxLines: 1,
fontSize: SizeConfig.textMultiplier * 1.4, style: TextStyle(
fontWeight: FontWeight.w600, fontSize: SizeConfig.textMultiplier * 1.4,
letterSpacing: -0.3, fontWeight: FontWeight.w600,
height: 1, letterSpacing: -0.3,
height: 1,
),
), ),
), ),
), ],
], ),
), ),
),
mFlex(1), mFlex(1),
], ],
), ),

@ -75,12 +75,12 @@ class DoctorHeader extends StatelessWidget {
children: [ children: [
if (headerModel.date != null) if (headerModel.date != null)
Text( Text(
DateUtil.formatDateToDate(headerModel.date, projectViewModel.isArabic), DateUtil.getDayMonthYearDateFormattedLang(headerModel.date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
if (headerModel.time != null) if (headerModel.time != null)
Text( Text(
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date), headerModel.time ?? DateUtil.formatDateToTimeLang(headerModel.date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
if (headerModel?.nationalityFlagURL != null) if (headerModel?.nationalityFlagURL != null)

Loading…
Cancel
Save