Merge branch 'development_new_design_2.0' into haroon-new-design

# Conflicts:
#	lib/pages/ContactUs/findus/hospitrals_page.dart
#	lib/pages/Covid-DriveThru/covid-drivethru-location.dart
merge-requests/400/head
haroon amjad 3 years ago
commit 4b1a2d4f3d

@ -2,5 +2,5 @@ extension CapExtension on String {
String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}";
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
String get allInCaps => this.toUpperCase();
String get capitalizeFirstofEach => this.length > 0 ? this.split(" ").map((str) => str.inCaps).join(" ") : "";
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : "";
}

@ -100,7 +100,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
),
),
SizedBox(
height: 4,
height: 2,
),
Text(
_location.cityName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
@ -111,6 +111,18 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
letterSpacing: -0.56,
),
),
SizedBox(
height: 2,
),
Text(
TranslationBase.of(context).km+" "+ _location.distanceInKilometers.toString() ?? "",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
],
),
),

@ -6,12 +6,15 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCe
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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_svg/flutter_svg.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
@ -34,6 +37,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
final GlobalKey locationDropdownKey = GlobalKey();
ProjectViewModel projectViewModel;
@ -58,171 +62,190 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).covidInfo,
isShowDecPage: true,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 0.0),
child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')),
),
Container(
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 14.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16.0, letterSpacing: 0.8, color: Colors.grey[700], fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')),
),
Container(
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.grey[400],
width: 1.0,
),
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(8.0),
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 5.0),
child: DropdownButtonHideUnderline(
child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress),
value: selectedProject,
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
selectedProject = newValue;
setProjectLocation(newValue);
});
},
),
)),
// isLocationSelected
// ? Container(
// margin: EdgeInsets.only(top: 15.0),
// alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
// child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
// )
// : Container(),
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 10.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0),
),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
),
Container(
height: MediaQuery.of(context).size.height * 0.15,
width: double.infinity,
showNewAppBarTitle: true,
showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
getDirections();
},
child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
),
),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
),
),
),
Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: Column(
children: [
Container(
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, color: Colors.black, letterSpacing: -1.14)),
),
Container(
margin: EdgeInsets.only(top: 6.0),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 14.0, color: Colors.black, letterSpacing: -0.56)),
),
Expanded(
flex: 1,
InkWell(
onTap: () {
// dropdownKey.currentState;
// openDropdown(clinicDropdownKey);
},
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
next();
},
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
),
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(top: 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton<DriveThroughTestingCenterModel>(
onTap: () {
print("Clicked");
},
key: locationDropdownKey,
hint: new Text(
TranslationBase.of(context).selectAddress,
),
value: selectedProject,
iconSize: 0,
isExpanded: true,
style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
selectedProject = newValue;
setProjectLocation(newValue);
});
},
),
),
),
],
),
),
Icon(Icons.keyboard_arrow_down),
],
),
),
),
],
),
),
mHeight(20),
isLocationSelected
? Stack(
children: [
Container(
margin: EdgeInsets.only(top: 5.0),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
InkWell(
onTap: () {
getDirections();
},
child: Card(
shape: cardRadius(1000),
elevation: 4,
margin: EdgeInsets.all(12),
child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
child: Row(
children: [
SvgPicture.asset(
"assets/images/new/blood_pressure.svg",
width: 18,
height: 18,
),
mWidth(6),
Text(
TranslationBase.of(context).getDirections,
style: TextStyle(
color: Colors.black,
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
)
],
),
),
),
),
],
),
],
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
),
mHeight(12),
],
),
),
],
),
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: CustomColors.accentColor,
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: CustomColors.accentColor,
onPressed: () {
next();
},
child: Text(
TranslationBase.of(context).next,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
),
)),
],
),
);
}

@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -72,7 +71,7 @@ class InsuranceApprovalDetail extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
myRichText(TranslationBase.of(context).clinic + ":", insuranceApprovalModel?.clinicName.toLowerCase().capitalizeFirstofEach ?? "", projectViewModel.isArabic),
myRichText(TranslationBase.of(context).clinic + ":", insuranceApprovalModel?.clinicName ?? "", projectViewModel.isArabic),
myRichText(TranslationBase.of(context).approvalNo, insuranceApprovalModel?.approvalNo.toString() ?? "", projectViewModel.isArabic),
myRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic),
myRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic),
@ -91,34 +90,26 @@ class InsuranceApprovalDetail extends StatelessWidget {
0: FlexColumnWidth(1.8),
1: FlexColumnWidth(1),
2: FlexColumnWidth(1),
}, children: fullData(context))
}, children: [
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).procedure),
Utils.tableColumnTitle(TranslationBase.of(context).status),
Utils.tableColumnTitle(TranslationBase.of(context).usageStatus)
],
),
TableRow(
children: [
Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.procedureName ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(insuranceApprovalModel?.approvalStatusDescption ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.isInvoicedDesc.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
],
),
])
],
),
),
),
);
}
List<TableRow> fullData(context) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).procedure),
Utils.tableColumnTitle(TranslationBase.of(context).status),
Utils.tableColumnTitle(TranslationBase.of(context).usageStatus)
],
),
);
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.procedureName ?? '', isLast: true),
Utils.tableColumnValue(insuranceApprovalModel?.approvalStatusDescption ?? '', isLast: true),
Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.isInvoicedDesc.toString() ?? '', isLast: true),
],
),
);
return tableRow;
}
}

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -8,7 +7,6 @@ import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -38,7 +36,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
builder: (BuildContext _context, InsuranceViewModel model, Widget child) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
baseViewModel: model,
@ -49,18 +47,19 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
imagesInfo: imagesInfo,
body: ListView.separated(
padding: EdgeInsets.all(21),
itemBuilder: (context, index) {
physics: BouncingScrollPhysics(),
itemBuilder: (_, index) {
Color _patientStatusColor;
String _patientStatusString;
if (model.insuranceApproval[index].isLiveCareAppointment) {
_patientStatusColor = Color(0xff2E303A);
_patientStatusString = TranslationBase.of(context).liveCare.toLowerCase().capitalizeFirstofEach;
_patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach;
} else if (!model.insuranceApproval[index].isInOutPatient) {
_patientStatusColor = Color(0xffD02127);
_patientStatusString = TranslationBase.of(context).inPatient.toLowerCase().capitalizeFirstofEach;
_patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach;
} else {
_patientStatusString = TranslationBase.of(context).outpatient.toLowerCase().capitalizeFirstofEach;
_patientStatusString = TranslationBase.of(context).outpatient.capitalizeFirstofEach;
_patientStatusColor = Color(0xffa9a089);
}
return InkWell(

@ -153,7 +153,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.26,
child: ListView.separated(
itemCount: 4,
itemCount: 5,
padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
@ -163,13 +163,13 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 3 ? 20 : 0, right: index == 0 ? 20 : 0),
margin: EdgeInsets.only(left: index == 4 ? 20 : 0, right: index == 0 ? 20 : 0),
)
: Container(
child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0),
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 4 ? 20 : 0),
);
},
separatorBuilder: (BuildContext context, int index) {

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart';
@ -13,6 +14,7 @@ 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:provider/provider.dart';
class PrescriptionDetailsPage extends StatelessWidget {
final PrescriptionReport prescriptionReport;
@ -21,6 +23,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
@ -97,7 +100,24 @@ class PrescriptionDetailsPage extends StatelessWidget {
],
),
SizedBox(height: 12),
Table(children: fullData(context)),
Table(children: [
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).route),
Utils.tableColumnTitle(TranslationBase.of(context).frequency),
Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses),
Utils.tableColumnTitle(TranslationBase.of(context).duration)
],
),
TableRow(
children: [
Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
],
),
]),
Text(
TranslationBase.of(context).remarks,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48),
@ -183,29 +203,4 @@ class PrescriptionDetailsPage extends StatelessWidget {
),
);
}
List<TableRow> fullData(context) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).route),
Utils.tableColumnTitle(TranslationBase.of(context).frequency),
Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses),
Utils.tableColumnTitle(TranslationBase.of(context).duration)
],
),
);
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true),
],
),
);
return tableRow;
}
}

@ -84,98 +84,105 @@ class PrescriptionItemsPage extends StatelessWidget {
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
shape: cardRadius(12),
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.only(top: 12, bottom: 20, left:projectViewModel.isArabic? 12:20, right: projectViewModel.isArabic? 20:12),
child: Row(
children: [
Text(
model.prescriptionReportListINP[index].itemDescription.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
children: [
Container(
child: Card(
child: Image.network(
model.prescriptionReportListINP[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 60,
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model.prescriptionReportListINP[index].itemDescription.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
clipBehavior: Clip.antiAlias,
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
),
mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
mHeight(10),
Row(
children: [
Container(
child: Card(
child: Image.network(
model.prescriptionReportListINP[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 60,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
Text(
model.prescriptionReportListINP[index].route,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
clipBehavior: Clip.antiAlias,
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
),
mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].route,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
)
],
],
)
],
),
],
),
),
Icon(Icons.arrow_forward_ios,size: 16,),
],
),
),
@ -231,61 +238,68 @@ class PrescriptionItemsPage extends StatelessWidget {
],
),
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.only(top: 12, bottom: 20, left:projectViewModel.isArabic? 12:20, right: projectViewModel.isArabic? 20:12),
child: Row(
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Card(
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 48,
height: 48,
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
mWidth(12),
Expanded(
child: Column(
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
myRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
myRichText(
TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
Card(
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 48,
height: 48,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
mWidth(12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
myRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
myRichText(
TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
),
)
],
),
)
],
],
),
),
Icon(Icons.arrow_forward_ios,size: 16,),
],
),
),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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';
@ -77,14 +78,17 @@ class PrescriptionsHistoryPage extends StatelessWidget {
decoration: BoxDecoration(
color: _color,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
bottomLeft: Radius.circular(10.0),
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
bottomLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight:projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
bottomRight:projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
),
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12),
padding: EdgeInsets.only(left: projectViewModel.isArabic?6:12, right: projectViewModel.isArabic?12:6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
@ -122,7 +126,9 @@ class PrescriptionsHistoryPage extends StatelessWidget {
],
),
),
)
),
Icon(Icons.arrow_forward_ios,size: 16,),
mWidth(6),
],
),
));

@ -572,19 +572,6 @@ class Utils {
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
@ -595,31 +582,6 @@ class Utils {
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(25)
? Navigator.push(
context,
FadePage(page: VitalSignDetailsScreen()),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).vitalSigns,
imagePath: 'vital_signs.png',
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
isEnable: projectViewModel.havePrivilege(25),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png',
subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: false,
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
@ -629,196 +591,10 @@ class Utils {
),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'Invoice.png',
subTitle: TranslationBase.of(context).invoicesList,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
subTitle: TranslationBase.of(context).eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22),
),
));
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).updateInsurance,
imagePath: 'insurance_update_icon_.png',
subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
isEnable: projectViewModel.havePrivilege(18),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png',
subTitle: TranslationBase.of(context).allergiesSubtitle,
isEnable: projectViewModel.havePrivilege(23),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines,
imagePath: 'my_vaccines_icon.png',
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
isEnable: projectViewModel.havePrivilege(26),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context).medicalSubtitle,
isEnable: projectViewModel.havePrivilege(20),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png',
subTitle: TranslationBase.of(context).monthlySubtitle,
isEnable: projectViewModel.havePrivilege(19),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png',
subTitle: TranslationBase.of(context).sickSubtitle,
isEnable: projectViewModel.havePrivilege(16),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance,
imagePath: 'check-in.png',
subTitle: TranslationBase.of(context).myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47),
),
));
// TODO mosa check it
medical.add(MedicalProfileItem(
title: TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',
subTitle: TranslationBase.of(context).patientCallSubtitle,
isEnable: projectViewModel.havePrivilege(61),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png',
subTitle: TranslationBase.of(context).myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png',
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
isEnable: projectViewModel.havePrivilege(30),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
if (projectViewModel.isLogin) {
userData().then((userData_) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
});
} else {
Navigator.push(
context,
FadePage(
page: NotAutPage(
title: TranslationBase.of(context).autoWifi,
description: TranslationBase.of(context).infoAutoWifi,
infoList: [],
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
],
)));
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).internetSubtitle,
),
));
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context).chatbotSubtitle,
isEnable: projectViewModel.havePrivilege(40),
),
));
return medical;
}
@ -865,8 +641,8 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true}) {
ProjectViewModel projectViewModel = Provider.of(AppGlobal.context);
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,

Loading…
Cancel
Save