Updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent cbb9151b62
commit 5163c826ad

@ -797,6 +797,7 @@ const Map localizedValues = {
"mass": {"en": "Mass", "ar": "كتلة"},
"temp-c": {"en": "°C", "ar": "°س"},
"bpm": {"en": "bpm", "ar": "نبضة"},
"respirationBPM": {"en": "bpm", "ar": "نفس"},
"respiration-signs": {"en": "Respiration", "ar": "تنفس"},
"sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"},
"body": {"en": "Body Mass", "ar": "كتلة\nالجسم"},
@ -1213,6 +1214,7 @@ const Map localizedValues = {
"pound": {"en": "Pound", "ar": "رطل"},
"seeListOfDoctor": {"en": "See List Of Doctors", "ar": "انظر قائمة الأطباء"},
"obese": {"en": "Obese", "ar": "سمين"},
"extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"},
"overWeight": {"en": "OverWeight", "ar": "وزن زائد"},
"healthy": {"en": "Healthy", "ar": "صحي"},
"underWeight": {"en": "UnderWeight", "ar": "نقص الوزن"},
@ -1528,4 +1530,6 @@ const Map localizedValues = {
"insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"},
"rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"},
"rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"},
"noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"},
"bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"},
};

@ -41,10 +41,13 @@ class FeedbackService extends BaseService {
_requestInsertCOCItem.deviceInfo = Platform.localHostname;
_requestInsertCOCItem.resolution = "400x847";
_requestInsertCOCItem.projectID = 0;
_requestInsertCOCItem.tokenID = "C0c@@dm!n?T&A&A@Barcha202029582948";
_requestInsertCOCItem.identificationNo =
int.parse(user.patientIdentificationNo);
if (BASE_URL.contains('uat')) {
_requestInsertCOCItem.forDemo = true;
} else {
_requestInsertCOCItem.forDemo = false;
}
final Map<String, dynamic> body = _requestInsertCOCItem.toJson();

@ -18,15 +18,14 @@ class BloodSugarService extends BaseService {
Future getBloodSugar() async {
hasError = false;
Map<String, dynamic> body = Map();
monthDiabtectResultAverageList.clear();
weekDiabtectResultAverageList.clear();
yearDiabtecResultAverageList.clear();
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_DIABETIC_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) {
monthDiabtectResultAverageList.clear();
weekDiabtectResultAverageList.clear();
yearDiabtecResultAverageList.clear();
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
response['List_MonthDiabtectResultAverage'].forEach((item) {
monthDiabtectResultAverageList.add(MonthDiabtectResultAverage.fromJson(item));
@ -47,10 +46,10 @@ class BloodSugarService extends BaseService {
Future getDiabtecResults() async {
hasError = false;
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
await baseAppClient.post(GET_DIABTEC_RESULT, onSuccess: (dynamic response, int statusCode) {
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
response['List_MonthDiabtecPatientResult'].forEach((item) {
monthDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item));

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -12,6 +13,7 @@ class PharmacyModuleService extends BaseService {
bool isFinished = true;
String errorMsg = '';
String url = "";
CustomerInfo customerInfo;
List<PharmacyImageObject> bannerItems = List();
List<Manufacturer> manufacturerList = List();
@ -51,8 +53,12 @@ class PharmacyModuleService extends BaseService {
hasError = false;
try {
await baseAppClient.getPharmacy(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async {
if (!response['IsRegistered']) {}
await generatePharmacyToken();
if (!response['IsRegistered']) {
} else {
customerInfo = CustomerInfo.fromJson(response);
}
// await generatePharmacyToken();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -113,8 +113,8 @@ class HomeHealthCareViewModel extends BaseViewModel {
// await _customerAddressesService.getCustomerInfo();
setState(ViewState.ErrorLocal);
} else {
// await _pharmacyModuleService.createUser();
await _customerAddressesService.getCustomerInfo();
await _pharmacyModuleService.createUser();
// await _customerAddressesService.getCustomerInfo();
await getCustomerAddresses();
}
}

@ -39,7 +39,7 @@ class AskDoctorViewModel extends BaseViewModel {
});
} else {
setState(ViewState.Idle);
AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty);
// AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty);
}
}

@ -145,7 +145,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.isLiveCareAppointment) {
if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
showFooterButton = false;
} else {

@ -124,7 +124,7 @@ class RRTLogListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormattedLang(order.createdOn, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(order.createdOn),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),

@ -107,7 +107,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
"",
//model.user.emailAddress,
),
isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
@ -136,7 +136,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
@ -147,7 +147,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 47 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)

@ -67,7 +67,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
padding: EdgeInsets.all(21),
shrinkWrap: true,
itemBuilder: (context, index) {
bool shouldEnable = (widget.appo.clinicID == 17 && appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = (widget.appo.clinicID == 17 && widget.appo.clinicID == 47 && appoButtonsList[index].caller == "openReschedule");
return InkWell(
onTap: shouldEnable
? null

@ -47,7 +47,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("MADA");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -83,7 +83,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("VISA");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -119,7 +119,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("MASTERCARD");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -155,7 +155,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("Installment");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -192,7 +192,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("ApplePay");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -111,7 +112,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
children: <Widget>[
Text(
TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center,
// textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(height: 21),
@ -159,99 +160,23 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
isShowListAppointHistory = true;
});
},
child: Container(
// margin: EdgeInsets.all(8.0),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Row(
children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context).inPatient.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 12),
),
)),
),
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: appointHistory.doctorNameObj,
url: appointHistory.doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
appointHistory.doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
variant: 'caption3',
),
StarRating(totalAverage: appointHistory.doctorRate.toDouble(), forceStars: true),
],
),
),
),
],
),
),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
)
],
),
child: DoctorCard(
onTap: () {},
isInOutPatient: appointHistory.isInOutPatient,
name: appointHistory.doctorTitle + " " + appointHistory.doctorNameObj,
// billNo: _appointmentResult.invoiceNo,
profileUrl: appointHistory.doctorImageURL,
subName: appointHistory.projectName,
isLiveCareAppointment: appointHistory.isLiveCareAppointment,
date: DateUtil.convertStringToDate(appointHistory.appointmentDate),
rating: appointHistory.actualDoctorRate + 0.0,
appointmentTime: appointHistory.startTime.substring(0, 5),
),
),
SizedBox(height: 12),
if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 && isShowListAppointHistory)
Container(
height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.15,
height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.35 : MediaQuery.of(context).size.height * 0.17,
child: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => InkWell(
@ -261,76 +186,87 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
isShowListAppointHistory = false;
});
},
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
color: Colors.white,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
model.appointHistoryList[index].doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
variant: 'caption3',
),
StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
],
),
),
),
],
),
),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
)
],
),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[400],
)
],
),
child: DoctorCard(
onTap: () {},
isInOutPatient: model.appointHistoryList[index].isInOutPatient,
name: model.appointHistoryList[index].doctorTitle + " " + model.appointHistoryList[index].doctorNameObj,
profileUrl: model.appointHistoryList[index].doctorImageURL,
subName: model.appointHistoryList[index].projectName,
isLiveCareAppointment: model.appointHistoryList[index].isLiveCareAppointment,
date: DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate),
rating: model.appointHistoryList[index].actualDoctorRate + 0.0,
appointmentTime: model.appointHistoryList[index].startTime.substring(0, 5),
),
// Container(
// margin: EdgeInsets.only(left: 8, right: 8),
// color: Colors.white,
// child: Column(
// children: <Widget>[
// Row(
// children: <Widget>[
// Expanded(
// flex: 4,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Padding(
// padding: const EdgeInsets.all(10.0),
// child: Row(
// children: <Widget>[
// Expanded(
// flex: 1,
// child: LargeAvatar(
// name: model.appointHistoryList[index].doctorNameObj,
// url: model.appointHistoryList[index].doctorImageURL,
// ),
// ),
// Expanded(
// flex: 4,
// child: Container(
// margin: EdgeInsets.all(10),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Texts(
// model.appointHistoryList[index].doctorNameObj,
// bold: true,
// ),
// Texts(
// DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
// variant: 'caption3',
// ),
// StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
// ],
// ),
// ),
// ),
// ],
// ),
// ),
// ],
// ),
// ),
// Expanded(
// flex: 1,
// child: Center(
// child: Icon(
// Icons.arrow_forward_ios,
// size: 15,
// ),
// ),
// )
// ],
// ),
// SizedBox(
// height: 5,
// ),
// Divider(
// height: 0.5,
// color: Colors.grey[400],
// )
// ],
// ),
// ),
),
),
),
@ -515,19 +451,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
suffixIconConstraints: BoxConstraints(minWidth: 50),
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
// prefixIconConstraints: BoxConstraints(minWidth: 50),
// prefixIcon: suffix == null
// ? null
// : Text(
// "+" + suffix,
// style: TextStyle(
// fontSize: 14,
// height: 21 / 14,
// fontWeight: FontWeight.w500,
// color: Color(0xff2E303A),
// letterSpacing: -0.56,
// ),
// ),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
@ -581,8 +504,11 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
appointHistory = null;
isShowListAppointHistory = true;
});
});
} else {
isShowListAppointHistory = false;
}
setMessageType(value);
},

@ -1,13 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class StatusFeedbackPage extends StatefulWidget {
@override
@ -17,6 +20,7 @@ class StatusFeedbackPage extends StatefulWidget {
class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>(
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
@ -28,67 +32,70 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
child: model.cOCItemList.isNotEmpty
? Container(
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
gotodetails(model.cOCItemList[index]);
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
),
],
),
),
],
),
Texts('${model.cOCItemList[index].formType}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
],
onTap: () {
// gotodetails(model.cOCItemList[index]);
},
child: Card(
shape: cardRadius(12),
margin: EdgeInsets.all(10),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(projectViewModel.isArabic ? model.cOCItemList[index].statusAr : model.cOCItemList[index].status,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Text(model.cOCItemList[index].formType,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12))),
myRichText(TranslationBase.of(context).number + ": ", model.cOCItemList[index].itemID.toString(), projectViewModel.isArabic),
Text(model.cOCItemList[index].cOCTitle,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12)),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(model.cOCItemList[index].date.split(" ")[0],
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48)),
Text(model.cOCItemList[index].date.split(" ")[1],
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48)),
],
),
],
),
),
),
))),
)),
)
: Center(
child: Column(
@ -122,7 +129,8 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).search,
() => {},
projectViewModel.isLogin ? null : () => {},
disabledColor: Colors.grey,
),
),
],

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:flutter/cupertino.dart';
@ -154,8 +155,12 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
widget.image(file, image);
if(file != null && image != null) {
Navigator.pop(context);
widget.image(file, image);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noInsuranceCardAttached);
}
},
child: Padding(
padding: const EdgeInsets.all(8.0),

@ -2,7 +2,9 @@ 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';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
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';
@ -45,7 +47,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
description: TranslationBase.of(context).infoApprovals,
infoList: TranslationBase.of(context).infoApprovalPoints,
imagesInfo: imagesInfo,
body: ListView.separated(
body: model.insuranceApproval.length > 0 ? ListView.separated(
padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
itemBuilder: (_, index) {
@ -164,7 +166,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
);
},
separatorBuilder: (context, index) => SizedBox(height: 12),
itemCount: model.insuranceApproval.length)),
itemCount: model.insuranceApproval.length) : getNoDataWidget(context)),
);
}

@ -150,7 +150,9 @@ class InsurancePage extends StatelessWidget {
patientID: patientID,
patientIdentificationID: patientIdentificationID,
name: name,
)));
))).then((value) {
model.getInsuranceUpdated();
});
} else {
AppToast.showErrorToast(message: _insuranceCardService.error);
}

@ -4,9 +4,11 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -22,7 +24,20 @@ class AskDoctorPage extends StatelessWidget {
onModelReady: (model) => model.getMyDoctor(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
body: _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model),
body: model.patientDoctorAppointmentListHospital.length > 0 ? _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model) : noDoctor(context),
),
);
}
Widget noDoctor(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 50.0, right: 50.0),
child: Center(
child: Text(TranslationBase.of(context).askDocEmpty, textAlign: TextAlign.center, style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: CustomColors.accentColor
)),
),
);
}

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.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/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -258,16 +259,13 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
),
bottomSheet: Container(
height: 70,
width: double.infinity,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
color: Colors.white,
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).submit,
color: CustomColors.accentColor,
disabled: amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null,
onTap: () {
child: DefaultButton(
TranslationBase.of(context).submit,
(amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null) ? null :
() {
var mobileNum;
var patientName;
@ -320,6 +318,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
}
});
},
disabledColor: Colors.grey,
),
)),
);

@ -109,7 +109,11 @@ class WeightWeeklyPage extends StatelessWidget {
model: model,
),
),
);
).then((value) {
if (model.weekWeightMeasurementResult.isEmpty) {
model.weightWeekTimeSeriesData.clear();
}
});
},
child: Container(
// height: 70,

@ -111,7 +111,12 @@ class BloodPressureWeeklyPage extends StatelessWidget {
measureTimeSelectedType: diabtec.measuredArmDesc,
),
),
);
).then((value) {
if(model.weekDiabtecPatientResult.isEmpty) {
model.weightWeekTimeSeriesDataTop.clear();
model.weightWeekTimeSeriesDataLow.clear();
}
});
},
child: Container(
// height: 70,

@ -116,7 +116,11 @@ class BloodSugarWeeklyPage extends StatelessWidget {
bloodSugarViewMode: bloodSugarViewMode,
),
),
);
).then((value) {
if(bloodSugarViewMode.weekDiabtecPatientResult.isEmpty) {
timeSeriesData.clear();
}
});
},
child: Container(
// height: 70,

@ -33,7 +33,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
// vitalSigns.add(new VitalSign(TranslationBase.of(context).body, mode.bodyMax, TranslationBase.of(context).mass, "assets/images/new/"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).temperature, mode.temperatureCelcius, TranslationBase.of(context).tempC, "assets/images/new/temperature.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).heart, mode.hartRat, TranslationBase.of(context).bpm, "assets/images/new/heart_rate.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).bpm, "assets/images/new/respiration_rate.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).respirationBPM, "assets/images/new/respiration_rate.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).bloodPressure, mode.bloodPressure, TranslationBase.of(context).sysDias, "assets/images/new/blood_pressure.svg"));
}
@ -71,7 +71,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Body Mass Index is: " + mode.bodyMax,
TranslationBase.of(context).bodyMassIndex + mode.bodyMax,
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
@ -83,15 +83,15 @@ class VitalSignDetailsScreen extends StatelessWidget {
height: MediaQuery.of(context).size.width / 2.8,
child: Row(
children: [
showMass(context, "Underweight", "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
showMass(context, TranslationBase.of(context).underWeight, "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
mWidth(12),
showMass(context, "Normal", "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6),
showMass(context, TranslationBase.of(context).healthy, "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6),
mWidth(12),
showMass(context, "Overweight", "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4),
showMass(context, TranslationBase.of(context).overWeight, "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4),
mWidth(12),
showMass(context, "Obese", "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2),
showMass(context, TranslationBase.of(context).obese, "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2),
mWidth(12),
showMass(context, "Extreme Obese", "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
showMass(context, TranslationBase.of(context).extremeObese, "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
],
),
),

@ -111,7 +111,6 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
color: rating >= (index + 1)
? Color.fromRGBO(255, 186, 0, 1.0)
: Colors.grey[400],
// Theme.of(context).hintColor,
icon: Icon(rating >= (index + 1)
? Icons.star
: Icons.star)),

@ -2326,6 +2326,15 @@ class TranslationBase {
String get rateAppointment => localizedValues["rateAppointment"][locale.languageCode];
String get noInsuranceCardAttached => localizedValues["noInsuranceCardAttached"][locale.languageCode];
String get bodyMassIndex => localizedValues["bodyMassIndex"][locale.languageCode];
String get extremeObese => localizedValues["extremeObese"][locale.languageCode];
String get respirationBPM => localizedValues["respirationBPM"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,6 +1,9 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
Decoration appGradient = BoxDecoration(
gradient: LinearGradient(
@ -23,6 +26,22 @@ Color getColorFromHex(String hexColor) {
return Color(int.parse(hexColor, radix: 16));
}
Widget getNoDataWidget(BuildContext context) {
return Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0),
Container(
margin: EdgeInsets.only(top: 15.0),
child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xFFBABABA)))),
],
),
),
);
}
spacerVertical(double v) {
return Container(
height: v,

@ -133,7 +133,7 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormattedLang(date, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Text(

@ -75,7 +75,7 @@ class DoctorHeader extends StatelessWidget {
children: [
if (headerModel.date != null)
Text(
DateUtil.getDayMonthYearDateFormattedLang(headerModel.date, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel.time != null)
@ -118,7 +118,7 @@ class DoctorHeader extends StatelessWidget {
),
SizedBox(width: 6),
Text(
"${headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
"${headerModel.totalReviews == null ? 0 : headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,

Loading…
Cancel
Save