Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into development

merge-update-with-lab-changes
Fatimah Alshammari 5 years ago
commit 235fdfba54

@ -646,8 +646,8 @@ const Map localizedValues = {
"Remarks": {"en": "Remarks", "ar": "ملاحضات"}, "Remarks": {"en": "Remarks", "ar": "ملاحضات"},
"ActiveMedications": {"en": "Active Medications", "ar": "ادويتي النشطة"}, "ActiveMedications": {"en": "Active Medications", "ar": "ادويتي النشطة"},
"ExpDate": {"en": "Active Exp Date :", "VA": "تاريخ الإنتهاء"}, "ExpDate": {"en": "Active Exp Date :", "VA": "تاريخ الإنتهاء"},
"Route": {"en": "Route :", "ar": "الطريقة"}, "Route": {"en": "Route", "ar": "الطريقة"},
"Frequency": {"en": "Frequency :", "ar": "المعدل"}, "Frequency": {"en": "Frequency", "ar": "المعدل"},
"DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"}, "DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"},
"AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"}, "AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"},
"reminderDes": { "reminderDes": {
@ -1088,6 +1088,7 @@ const Map localizedValues = {
"Average": {"en": "Average", "ar": "المعدل"}, "Average": {"en": "Average", "ar": "المعدل"},
"DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, "DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"Period": {"en": "Period", "ar": "الفترة"}, "Period": {"en": "Period", "ar": "الفترة"},
"duration": {"en": "Duration", "ar": "المدة"},
"cm": {"en": "CM", "ar": "سم"}, "cm": {"en": "CM", "ar": "سم"},
"ft": {"en": "ft", "ar": "قدم"}, "ft": {"en": "ft", "ar": "قدم"},
"kg": {"en": "kg", "ar": "كجم"}, "kg": {"en": "kg", "ar": "كجم"},

@ -1,127 +1,193 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PrescriptionReport { class PrescriptionReport {
String address;
int appointmentNo;
String clinic;
String companyName;
int days;
String doctorName;
var doseDailyQuantity;
String frequency;
int frequencyNumber;
String image;
String imageExtension;
String imageSRCUrl;
String imageString;
String imageThumbUrl;
String isCovered;
String itemDescription;
int itemID;
String orderDate;
int patientID; int patientID;
String patientName; String patientName;
String phoneOffice1;
String prescriptionQR;
int prescriptionTimes;
String productImage;
String productImageBase64;
String productImageString;
int projectID;
String projectName;
String remarks;
String route;
String sKU;
int scaleOffset;
String startDate;
String patientAge; String patientAge;
String patientGender; String patientGender;
String address;
String phoneOffice; String phoneOffice;
String itemDescription;
int doseTimingID; int doseTimingID;
int frequencyID; int frequencyID;
int routeID; int routeID;
String clinic;
String doctorName;
String route;
String frequency;
String remarks;
String name; String name;
int days;
String startDate;
String orderDate;
int doseDailyQuantity;
int itemID;
Null productImage;
String sKU;
String itemDescriptionN; String itemDescriptionN;
String routeN; String routeN;
String frequencyN; String frequencyN;
String imageSRCUrl;
String imageThumbUrl;
PrescriptionReport( PrescriptionReport({
{this.patientID, this.address,
this.patientName, this.appointmentNo,
this.patientAge, this.clinic,
this.patientGender, this.companyName,
this.address, this.days,
this.phoneOffice, this.doctorName,
this.itemDescription, this.doseDailyQuantity,
this.doseTimingID, this.frequency,
this.frequencyID, this.frequencyNumber,
this.routeID, this.image,
this.clinic, this.imageExtension,
this.doctorName, this.imageSRCUrl,
this.route, this.imageString,
this.frequency, this.imageThumbUrl,
this.remarks, this.isCovered,
this.name, this.itemDescription,
this.days, this.itemID,
this.startDate, this.orderDate,
this.orderDate, this.patientID,
this.doseDailyQuantity, this.patientName,
this.itemID, this.phoneOffice1,
this.productImage, this.prescriptionQR,
this.sKU, this.prescriptionTimes,
this.itemDescriptionN, this.productImage,
this.routeN, this.productImageBase64,
this.frequencyN, this.productImageString,
this.imageSRCUrl, this.projectID,
this.imageThumbUrl}); this.projectName,
this.remarks,
this.route,
this.sKU,
this.scaleOffset,
this.startDate,
this.patientAge,
this.patientGender,
this.phoneOffice,
this.doseTimingID,
this.frequencyID,
this.routeID,
this.name,
this.itemDescriptionN,
this.routeN,
this.frequencyN,
});
PrescriptionReport.fromJson(Map<String, dynamic> json) { PrescriptionReport.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
patientName = json['PatientName'];
patientAge = json['PatientAge'];
patientGender = json['PatientGender'];
address = json['Address']; address = json['Address'];
phoneOffice = json['PhoneOffice']; appointmentNo = json['AppointmentNo'];
itemDescription = json['ItemDescription'];
doseTimingID = json['DoseTimingID'];
frequencyID = json['FrequencyID'];
routeID = json['RouteID'];
clinic = json['Clinic']; clinic = json['Clinic'];
doctorName = json['DoctorName']; companyName = json['CompanyName'];
route = json['Route'];
frequency = json['Frequency'];
remarks = json['Remarks'];
name = json['Name'];
days = json['Days']; days = json['Days'];
startDate = json['StartDate']; doctorName = json['DoctorName'];
orderDate = json['OrderDate'];
doseDailyQuantity = json['DoseDailyQuantity']; doseDailyQuantity = json['DoseDailyQuantity'];
frequency = json['Frequency'];
frequencyNumber = json['FrequencyNumber'];
image = json['Image'];
imageExtension = json['ImageExtension'];
imageSRCUrl = json['ImageSRCUrl'];
imageString = json['ImageString'];
imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered'];
itemDescription = json['ItemDescription'];
itemID = json['ItemID']; itemID = json['ItemID'];
orderDate = json['OrderDate'];
patientID = json['PatientID'];
patientName = json['PatientName'];
phoneOffice1 = json['PhoneOffice1'];
prescriptionQR = json['PrescriptionQR'];
prescriptionTimes = json['PrescriptionTimes'];
productImage = json['ProductImage']; productImage = json['ProductImage'];
productImageBase64 = json['ProductImageBase64'];
productImageString = json['ProductImageString'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
route = json['Route'];
sKU = json['SKU']; sKU = json['SKU'];
itemDescriptionN = json['ItemDescriptionN']; scaleOffset = json['ScaleOffset'];
routeN = json['RouteN']; startDate = json['StartDate'];
frequencyN = json['FrequencyN'];
imageSRCUrl = json['ImageSRCUrl']; patientAge = json['patientAge'];
imageThumbUrl = json['ImageThumbUrl']; patientGender = json['patientGender'];
phoneOffice = json['phoneOffice'];
doseTimingID = json['doseTimingID'];
frequencyID = json['frequencyID'];
routeID = json['routeID'];
name = json['name'];
itemDescriptionN = json['itemDescriptionN'];
routeN = json['routeN'];
frequencyN = json['frequencyN'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['Address'] = this.address;
data['AppointmentNo'] = this.appointmentNo;
data['Clinic'] = this.clinic;
data['CompanyName'] = this.companyName;
data['Days'] = this.days;
data['DoctorName'] = this.doctorName;
data['DoseDailyQuantity'] = this.doseDailyQuantity;
data['Frequency'] = this.frequency;
data['FrequencyNumber'] = this.frequencyNumber;
data['Image'] = this.image;
data['ImageExtension'] = this.imageExtension;
data['ImageSRCUrl'] = this.imageSRCUrl;
data['ImageString'] = this.imageString;
data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription;
data['ItemID'] = this.itemID;
data['OrderDate'] = this.orderDate;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName; data['PatientName'] = this.patientName;
data['PhoneOffice1'] = this.phoneOffice1;
data['PrescriptionQR'] = this.prescriptionQR;
data['PrescriptionTimes'] = this.prescriptionTimes;
data['ProductImage'] = this.productImage;
data['ProductImageBase64'] = this.productImageBase64;
data['ProductImageString'] = this.productImageString;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['Route'] = this.route;
data['SKU'] = this.sKU;
data['ScaleOffset'] = this.scaleOffset;
data['StartDate'] = this.startDate;
data['PatientAge'] = this.patientAge; data['PatientAge'] = this.patientAge;
data['PatientGender'] = this.patientGender; data['PatientGender'] = this.patientGender;
data['Address'] = this.address;
data['PhoneOffice'] = this.phoneOffice; data['PhoneOffice'] = this.phoneOffice;
data['ItemDescription'] = this.itemDescription;
data['DoseTimingID'] = this.doseTimingID; data['DoseTimingID'] = this.doseTimingID;
data['FrequencyID'] = this.frequencyID; data['FrequencyID'] = this.frequencyID;
data['RouteID'] = this.routeID; data['RouteID'] = this.routeID;
data['Clinic'] = this.clinic;
data['DoctorName'] = this.doctorName;
data['Route'] = this.route;
data['Frequency'] = this.frequency;
data['Remarks'] = this.remarks;
data['Name'] = this.name; data['Name'] = this.name;
data['Days'] = this.days;
data['StartDate'] = this.startDate;
data['OrderDate'] = this.orderDate;
data['DoseDailyQuantity'] = this.doseDailyQuantity;
data['ItemID'] = this.itemID;
data['ProductImage'] = this.productImage;
data['SKU'] = this.sKU;
data['ItemDescriptionN'] = this.itemDescriptionN; data['ItemDescriptionN'] = this.itemDescriptionN;
data['RouteN'] = this.routeN; data['RouteN'] = this.routeN;
data['FrequencyN'] = this.frequencyN; data['FrequencyN'] = this.frequencyN;
data['ImageSRCUrl'] = this.imageSRCUrl;
data['ImageThumbUrl'] = this.imageThumbUrl;
data['hasPlan'] = false; data['hasPlan'] = false;
return data; return data;
} }
} }

@ -18,10 +18,9 @@ class WeatherService extends BaseService {
var long = await sharedPref.getDouble(USER_LONG); var long = await sharedPref.getDouble(USER_LONG);
body['Latitude'] = lat ?? 0; body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0; body['Longitude'] = long ?? 0;
weatherIndicatorData = [];
await baseAppClient.post(WEATHER_INDICATOR, await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
weatherIndicatorData = [];
response['GetCityInfo_List'].forEach((data) { response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data)); weatherIndicatorData.add(GetCityInfoList.fromJson(data));
}); });

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -42,7 +43,31 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
getPatientInfo(model), getPatientInfo(model),
getInvoiceDetails(model), getInvoiceDetails(model),
getInsuranceDetails(model), getInsuranceDetails(model),
getAncillaryDetails(model) getAncillaryDetails(model),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Texts(
TranslationBase.of(context).total,
fontSize: 20,
fontWeight: FontWeight.bold,
),
Texts(
getTotalValue(model),
fontSize: 20,
fontWeight: FontWeight.bold,
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Button(
label: TranslationBase.of(context).payNow,
onTap: () {},
)
],
)
]) ])
: SizedBox()))); : SizedBox())));
} }
@ -208,7 +233,9 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
); );
list.add(Row( list.add(Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [getLabDetails(value)], children: [
getLabDetails(value),
],
)); ));
}); });
@ -218,6 +245,13 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
); );
} }
String getTotalValue(value) {
double total = 0.0;
value.ancillaryListsDetails[0].ancillaryOrderProcList
.forEach((result) => {total += result.companyShareWithTax});
return total.toStringAsFixed(2);
}
getLabDetails(value) { getLabDetails(value) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -660,14 +660,15 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
removeFamily(family, context), ConfirmDialog.closeAlertDialog(context),
ConfirmDialog.closeAlertDialog(context) removeFamily(family, context)
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
removeFamily(GetAllSharedRecordsByStatusList family, context) { removeFamily(GetAllSharedRecordsByStatusList family, context) {
GifLoaderDialogUtils.showMyDialog(context);
this.userID = family.iD; this.userID = family.iD;
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
request['ID'] = this.userID; request['ID'] = this.userID;
@ -679,7 +680,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
refreshFamily(context) { refreshFamily(context) {
//sharedPref.remove(FAMILY_FILE); GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
sharedPref.remove(FAMILY_FILE); sharedPref.remove(FAMILY_FILE);
}); });

@ -124,7 +124,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
: Column( : Column(
children: [ children: [
SizedBox( SizedBox(
height: 80, height: 20,
), ),
Container( Container(
margin: EdgeInsets.only(left: 12, right: 12), margin: EdgeInsets.only(left: 12, right: 12),

@ -210,71 +210,77 @@ class _SelectTransportationMethodState
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Row( Container(
children: [ margin: EdgeInsets.only(bottom:65 ),
Expanded( child: Row(
child: InkWell( children: [
onTap: () { Expanded(
setState(() { child: InkWell(
_way = Way.OneWay; onTap: () {
}); setState(() {
}, _way = Way.OneWay;
child: Container( });
decoration: BoxDecoration( },
shape: BoxShape.rectangle, child: Container(
borderRadius: BorderRadius.circular(8), decoration: BoxDecoration(
border: shape: BoxShape.rectangle,
Border.all(color: Colors.grey, width: 0.5), borderRadius: BorderRadius.circular(8),
color: Colors.white, border:
), Border.all(color: Colors.grey, width: 0.5),
child: ListTile( color: Colors.white,
title: ),
Texts(TranslationBase.of(context).oneDirec), child: ListTile(
leading: Radio( title:
value: Way.OneWay, Texts(TranslationBase.of(context).oneDirec),
groupValue: _way, leading: Radio(
onChanged: (value) { value: Way.OneWay,
setState(() { groupValue: _way,
_way = value; onChanged: (value) {
}); setState(() {
}, _way = value;
});
},
),
), ),
), ),
), ),
), ),
), Expanded(
Expanded( child: InkWell(
child: InkWell( onTap: () {
onTap: () { setState(() {
setState(() { _way = Way.TwoWays;
_way = Way.TwoWays; });
}); },
}, child: Container(
child: Container( decoration: BoxDecoration(
decoration: BoxDecoration( shape: BoxShape.rectangle,
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(8), border:
border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5), color: Colors.white,
color: Colors.white, ),
), child: ListTile(
child: ListTile( title:
title: Texts(TranslationBase.of(context).twoDirec),
Texts(TranslationBase.of(context).twoDirec), leading: Radio(
leading: Radio( value: Way.TwoWays,
value: Way.TwoWays, groupValue: _way,
groupValue: _way, onChanged: (value) {
onChanged: (value) { setState(() {
setState(() { _way = value;
_way = value; });
}); },
}, ),
), ),
), ),
), ),
), ),
), ],
], ),
),
SizedBox(
height: 30,
), ),
], ],
), ),

@ -73,6 +73,7 @@ class _SummaryState extends State<Summary> {
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,), Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,),
SizedBox(height: 5,), SizedBox(height: 5,),
Container( Container(
height: 55, height: 55,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -87,8 +88,8 @@ class _SummaryState extends State<Summary> {
], ],
), ),
), ),
SizedBox(height: 250),
SizedBox(height: 45,),
], ],
), ),

@ -509,8 +509,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: page: LaboratoryResultPage(patientLabOrders: patientLabOrders)))
LaboratoryResultPage(patientLabOrders: patientLabOrders)))
.then((value) {}); .then((value) {});
} }
@ -518,8 +517,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: page: RadiologyDetailsPage(finalRadiology: finalRadiology)))
RadiologyDetailsPage(finalRadiology: finalRadiology)))
.then((value) {}); .then((value) {});
} }
@ -542,7 +540,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: ReminderDialog(appo: appo), child: ReminderDialog(
eventId: appo.appointmentNo.toString(),
title: "Doctor Appointment",
description: "You have an appointment with " +
appo.doctorTitle +
" " +
appo.doctorNameObj,
startDate: appo.appointmentDate,
endDate: appo.appointmentDate,
location: appo.projectName,
),
), ),
); );
}, },
@ -668,7 +676,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
context, context,
FadePage( FadePage(
page: VitalSignDetailsScreen( page: VitalSignDetailsScreen(
appointmentNo: appoNo, projectID: projectID,isNotOneAppointment: false,))); appointmentNo: appoNo,
projectID: projectID,
isNotOneAppointment: false,
)));
} }
navigateToInsertComplaint() { navigateToInsertComplaint() {

@ -9,9 +9,14 @@ import 'package:manage_calendar_events/manage_calendar_events.dart';
class ReminderDialog extends StatefulWidget { class ReminderDialog extends StatefulWidget {
static var selectedDuration; static var selectedDuration;
AppoitmentAllHistoryResultList appo; final String eventId;
final String title;
final String description;
final String startDate;
final String endDate;
final String location;
ReminderDialog({@required this.appo}); ReminderDialog({@required this.eventId, @required this.title, @required this.description, @required this.startDate, @required this.endDate, @required this.location});
@override @override
_ReminderDialogState createState() => _ReminderDialogState(); _ReminderDialogState createState() => _ReminderDialogState();
@ -98,17 +103,14 @@ class _ReminderDialogState extends State<ReminderDialog> {
}); });
CalendarEvent calendarEvent = new CalendarEvent( CalendarEvent calendarEvent = new CalendarEvent(
eventId: widget.appo.appointmentNo.toString(), eventId: widget.eventId,
title: "Doctor Appointment", title: widget.title,
description: "You have an appointment with " + description: widget.description,
widget.appo.doctorTitle + startDate: DateUtil.convertStringToDate(widget.startDate)
" " +
widget.appo.doctorNameObj,
startDate: DateUtil.convertStringToDate(widget.appo.appointmentDate)
.subtract( .subtract(
new Duration(microseconds: ReminderDialog.selectedDuration)), new Duration(microseconds: ReminderDialog.selectedDuration)),
endDate: DateUtil.convertStringToDate(widget.appo.appointmentDate), endDate: DateUtil.convertStringToDate(widget.endDate),
location: widget.appo.projectName, location: widget.location,
duration: new Duration(minutes: 15).inMinutes, duration: new Duration(minutes: 15).inMinutes,
isAllDay: false, isAllDay: false,
hasAlarm: true); hasAlarm: true);
@ -118,7 +120,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
.then((value) { .then((value) {
print("Cal event"); print("Cal event");
print(value); print(value);
if (int.parse(value) == widget.appo.appointmentNo) { if (int.parse(value) == int.parse(widget.eventId)) {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
} }
Navigator.of(context).pop(); Navigator.of(context).pop();

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_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';
@ -41,20 +42,19 @@ class _WelcomeLogin extends State<WelcomeLogin> {
children: <Widget>[ children: <Widget>[
Image.asset('assets/images/DQ/logo.png', Image.asset('assets/images/DQ/logo.png',
height: 90, width: 90), height: 90, width: 90),
Text( AppText(
TranslationBase.of(context).welcome, TranslationBase.of(context).welcome,
style: TextStyle( fontSize: 30,
fontSize: 30, fontWeight: FontWeight.bold), fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
), ),
Text( AppText(
TranslationBase.of(context).welcomeText, TranslationBase.of(context).welcomeText,
style: TextStyle(fontSize: 24), fontSize: 24,
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
Text( AppText(
TranslationBase.of(context).welcomeText2, TranslationBase.of(context).welcomeText2,
style: TextStyle(fontSize: 24), fontSize: 24,
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
SizedBox( SizedBox(

@ -20,7 +20,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: prescriptionReport.itemID), onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: prescriptionReport.itemID),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).ports, appBarTitle: TranslationBase.of(context).availability,
baseViewModel: model, baseViewModel: model,
body: ListView.builder( body: ListView.builder(
itemBuilder: (context, index) => Container( itemBuilder: (context, index) => Container(

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_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/text.dart';
@ -6,6 +8,7 @@ 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:provider/provider.dart';
class PrescriptionDetailsPage extends StatelessWidget { class PrescriptionDetailsPage extends StatelessWidget {
final PrescriptionReport prescriptionReport; final PrescriptionReport prescriptionReport;
@ -59,40 +62,49 @@ class PrescriptionDetailsPage extends StatelessWidget {
), ),
Container( Container(
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
child: InkWell( child: Row(
onTap: () => Navigator.push( children: [
context, Expanded(
FadePage( child: InkWell(
page: PharmacyForPrescriptionsPage( onTap: () => Navigator.push(
prescriptionReport: prescriptionReport), context,
), FadePage(
), page: PharmacyForPrescriptionsPage(
child: Center( prescriptionReport: prescriptionReport),
child: Column( ),
children: <Widget>[ ),
Container( child: Center(
width: 50,
decoration: BoxDecoration(
color: Colors.white, shape: BoxShape.rectangle),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Icon( Container(
Icons.pin_drop, width: 50,
color: Colors.red[800], decoration: BoxDecoration(
size: 55, color: Colors.white,
shape: BoxShape.rectangle),
child: Column(
children: <Widget>[
Icon(
Icons.pin_drop,
color: Colors.red[800],
size: 55,
),
],
),
),
SizedBox(
height: 5,
), ),
Texts(TranslationBase.of(context).availability)
], ],
), ),
), )),
SizedBox( ),
height: 5, _addReminderButton(context)
), ],
Texts(TranslationBase.of(context).ports) ),
],
),
)),
), ),
Container( Container(
color: Colors.white,
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Table( child: Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
@ -106,28 +118,28 @@ class PrescriptionDetailsPage extends StatelessWidget {
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).way))), child: Texts(TranslationBase.of(context).route, fontSize: 14,))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: child:
Texts(TranslationBase.of(context).average))), Texts(TranslationBase.of(context).frequency, fontSize: 14,))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 4),
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context).dailyDoses))), "${TranslationBase.of(context).dailyDoses}", fontSize: 14,))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: child:
Texts(TranslationBase.of(context).period))), Texts(TranslationBase.of(context).duration, fontSize: 14,))),
], ],
), ),
TableRow( TableRow(
@ -192,4 +204,96 @@ class PrescriptionDetailsPage extends StatelessWidget {
), ),
); );
} }
Widget _addReminderButton(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector(
onTap: () {
DateTime startDate = DateTime.now();
DateTime endDate = DateTime(startDate.year, startDate.month,
startDate.day + prescriptionReport.days);
print(prescriptionReport);
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: ReminderDialog(
eventId: prescriptionReport.itemID.toString(),
title: "Prescription Reminder",
description:
"${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
startDate:
"/Date(${startDate.millisecondsSinceEpoch}+0300)/",
endDate: "/Date(${endDate.millisecondsSinceEpoch}+0300)/",
location: prescriptionReport.remarks,
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
},
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
// height: 100.0,
margin: EdgeInsets.all(7.0),
padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
child: Text("add",
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xffB8382C),
letterSpacing: 1.0,
fontSize: 18.0)),
),
Container(
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Text("reminder",
overflow: TextOverflow.clip,
style: TextStyle(
color: Colors.black,
letterSpacing: 1.0,
fontSize: 15.0)),
),
Container(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
child: Image.asset(
"assets/images/new-design/reminder_icon.png",
width: 45.0,
height: 45.0),
),
],
),
),
],
),
);
}
} }

@ -104,7 +104,7 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backgroundColor: Color(0xFF5AB145), backgroundColor: Color(0xFF5AB145),
fontSize: 14, fontSize: 14,
vPadding: 12, vPadding: 8,
handler: () { handler: () {
model.saveSelectedAddressLocally( model.saveSelectedAddressLocally(
model.addresses[model.selectedAddressIndex]); model.addresses[model.selectedAddressIndex]);

@ -378,24 +378,24 @@ class AuthProvider with ChangeNotifier {
Future<Map> sendPatientIDSMS(mobileNo, context) async { Future<Map> sendPatientIDSMS(mobileNo, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = // var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); // await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, // "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", // "IPAdress": "10.20.10.20",
"VersionID": req.VersionID, // "VersionID": req.VersionID,
"Channel": req.Channel, // "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', // "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0, // "PatientOutSA": 0,
"PatientID": 0, // "PatientID": 0,
"TokenID": "", // "TokenID": "",
"PatientMobileNumber": mobileNo, "PatientMobileNumber": mobileNo,
"SearchType": 2, "SearchType": 2,
"ZipCode": "966", // "ZipCode": "966",
"PatientIdentificationID": "", // "PatientIdentificationID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": null // "SessionID": null
}; };
dynamic localRes; dynamic localRes;

@ -988,6 +988,7 @@ class TranslationBase {
String get average => localizedValues['Average'][locale.languageCode]; String get average => localizedValues['Average'][locale.languageCode];
String get dailyDoses => localizedValues['DailyDoses'][locale.languageCode]; String get dailyDoses => localizedValues['DailyDoses'][locale.languageCode];
String get period => localizedValues['Period'][locale.languageCode]; String get period => localizedValues['Period'][locale.languageCode];
String get duration => localizedValues['duration'][locale.languageCode];
String get cm => localizedValues['cm'][locale.languageCode]; String get cm => localizedValues['cm'][locale.languageCode];
String get kg => localizedValues['kg'][locale.languageCode]; String get kg => localizedValues['kg'][locale.languageCode];
String get lb => localizedValues['lb'][locale.languageCode]; String get lb => localizedValues['lb'][locale.languageCode];

@ -23,18 +23,21 @@ class FlowChartPage extends StatelessWidget {
appBarTitle: filterName, appBarTitle: filterName,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: model.labOrdersResultsList.isNotEmpty child: model. labOrdersResultsList.isNotEmpty
? Container( ? Container(
child: LabResultChartAndDetails( child: LabResultChartAndDetails(
name: filterName, name: filterName,
labResult: model.labOrdersResultsList, labResult: model.labOrdersResultsList,
), ),
) )
: Container( : Center(
child: Center( child: Container(
child: Texts('no Data'), padding: EdgeInsets.only(top: MediaQuery.of(context).size.height *0.42),
child: Center(
child: Texts('No Data'),
),
), ),
), ),
), ),
), ),
); );

@ -195,6 +195,7 @@ class _AppDrawerState extends State<AppDrawer> {
sideArrow: true, sideArrow: true,
), ),
onTap: () { onTap: () {
Navigator.of(context).pop();
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
MY_FAMILIY, MY_FAMILIY,
); );

@ -87,7 +87,7 @@ class AppScaffold extends StatelessWidget {
this.showHomeAppBarIcon = true, this.showHomeAppBarIcon = true,
this.imagesInfo}); this.imagesInfo});
AppScaffold setOnAppBarCartClick(VoidCallback onClick){ AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
_onCartClick = onClick; _onCartClick = onClick;
return this; return this;
} }
@ -112,21 +112,23 @@ class AppScaffold extends StatelessWidget {
: null, : null,
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
body: SafeArea( body: SafeArea(
top: true, bottom: true, top: true,
child: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && bottom: true,
isShowDecPage) child:
? NotAutPage( (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
title: title ?? appBarTitle, isShowDecPage)
description: description, ? NotAutPage(
infoList: infoList, title: title ?? appBarTitle,
imagesInfo: imagesInfo, description: description,
) infoList: infoList,
: baseViewModel != null imagesInfo: imagesInfo,
? NetworkBaseView( )
child: buildBodyWidget(context), : baseViewModel != null
baseViewModel: baseViewModel, ? NetworkBaseView(
) child: buildBodyWidget(context),
: buildBodyWidget(context), baseViewModel: baseViewModel,
)
: buildBodyWidget(context),
), ),
); );
} }
@ -173,8 +175,7 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
Size get preferredSize => Size(double.maxFinite, 60); Size get preferredSize => Size(double.maxFinite, 60);
} }
class AppBarWidgetState extends State<AppBarWidget>{ class AppBarWidgetState extends State<AppBarWidget> {
String badgeText = "0"; String badgeText = "0";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -182,7 +183,7 @@ class AppBarWidgetState extends State<AppBarWidget>{
return buildAppBar(context); return buildAppBar(context);
} }
badgeUpdateBlock(String value){ badgeUpdateBlock(String value) {
setState(() { setState(() {
badgeText = value; badgeText = value;
}); });
@ -192,8 +193,9 @@ class AppBarWidgetState extends State<AppBarWidget>{
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppBar( return AppBar(
elevation: 0, elevation: 0,
backgroundColor: backgroundColor: widget.isPharmacy
widget.isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color, ? Colors.green
: Theme.of(context).appBarTheme.color,
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle( headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color, color: Theme.of(context).textTheme.headline1.color,
@ -216,38 +218,32 @@ class AppBarWidgetState extends State<AppBarWidget>{
actions: <Widget>[ actions: <Widget>[
(widget.isPharmacy && widget.showPharmacyCart) (widget.isPharmacy && widget.showPharmacyCart)
? IconButton( ? IconButton(
icon: Badge( icon: Badge(
badgeContent: Text( badgeContent: Text(badgeText),
badgeText child: Icon(Icons.shopping_cart)),
), color: Colors.white,
child: Icon(Icons.shopping_cart) onPressed: () {
), Navigator.of(context).popUntil(ModalRoute.withName('/'));
color: Colors.white, })
onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/'));
})
: Container(), : Container(),
(widget.isOfferPackages && widget.showOfferPackagesCart) (widget.isOfferPackages && widget.showOfferPackagesCart)
? IconButton( ? IconButton(
icon: Badge( icon: Badge(
position: BadgePosition.topStart(top: -15, start: -10),
position: BadgePosition.topStart(top: -15,start: -10), badgeContent: Text(
badgeContent: Text( badgeText,
badgeText, style: TextStyle(
style: TextStyle(fontSize: 9,color: Colors.white, fontWeight: FontWeight.normal), fontSize: 9,
), color: Colors.white,
child: Icon(Icons.shopping_cart) fontWeight: FontWeight.normal),
), ),
color: Colors.white, child: Icon(Icons.shopping_cart)),
onPressed: () { color: Colors.white,
// Cart Click Event onPressed: () {
if(_onCartClick != null) // Cart Click Event
_onCartClick(); if (_onCartClick != null) _onCartClick();
})
})
: Container(), : Container(),
if (widget.showHomeAppBarIcon) if (widget.showHomeAppBarIcon)
IconButton( IconButton(
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
@ -256,11 +252,10 @@ class AppBarWidgetState extends State<AppBarWidget>{
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
MaterialPageRoute(builder: (context) => LandingPage()), MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false); (Route<dynamic> r) => false);
// Cart Click Event // Cart Click Event
if(_onCartClick != null) if (_onCartClick != null) _onCartClick();
_onCartClick();
}, },
), ),
if (widget.appBarIcons != null) ...widget.appBarIcons if (widget.appBarIcons != null) ...widget.appBarIcons
@ -356,7 +351,7 @@ class _RobotIcon extends State<RobotIcon> {
], ],
), ),
right: -30, right: -30,
bottom: 50); bottom: -15);
} }
// setAnimation() async { // setAnimation() async {

Loading…
Cancel
Save