merge-requests/447/head
Haroon Amjad 4 years ago
parent ade3cb0899
commit 59dac89118

@ -114,6 +114,9 @@ class BaseAppClient {
} }
} }
// body['PatientID'] = 1018977;
// body['TokenID'] = "@dm!n";
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);

@ -160,12 +160,12 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
else else
return ListView.separated( return ListView.separated(
itemBuilder: (context, index) { itemBuilder: (context, index) {
snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2; // snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2;
if (snapshot.data.getAllSharedRecordsByStatusList[index].status == 3) if (snapshot.data.getAllSharedRecordsByStatusList[index].status == 3)
return Card( return Card(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
shape: cardRadius(15), shape: cardRadius(15),
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xffFDA4B0) : Color(0xff6EA8FF), color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0xffFDA4B0) : Color(0xff6EA8FF),
elevation: 0.0, elevation: 0.0,
child: Container( child: Container(
// height: 130,0xffFDA4B0 // height: 130,0xffFDA4B0
@ -179,7 +179,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Texts( Texts(
snapshot.data.getAllSharedRecordsByStatusList[index].patientName.toLowerCase().capitalizeFirstofEach, snapshot.data.getAllSharedRecordsByStatusList[index].patientName.toLowerCase().capitalizeFirstofEach,
fontSize: 22, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,
), ),
@ -209,7 +209,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset("assets/images/new-design/switch.svg", SvgPicture.asset("assets/images/new-design/switch.svg",
height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white), height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white),
SizedBox( SizedBox(
width: 5, width: 5,
), ),
@ -223,7 +223,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// }, // },
// ), // ),
Texts(TranslationBase.of(context).switchUser, Texts(TranslationBase.of(context).switchUser,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white,
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600) fontWeight: FontWeight.w600)
], ],
@ -242,12 +242,12 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset("assets/images/new-design/delete.svg", SvgPicture.asset("assets/images/new-design/delete.svg",
height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white), height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white),
SizedBox( SizedBox(
width: 5, width: 5,
), ),
Texts(TranslationBase.of(context).delete, Texts(TranslationBase.of(context).delete,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white,
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
], ],

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notificatio
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -15,25 +16,6 @@ import 'package:provider/provider.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class NotificationsPage extends StatelessWidget { class NotificationsPage extends StatelessWidget {
getDateForm(String date) {
DateTime d = DateUtil.convertStringToDate(date);
String monthName = DateUtil.getMonth(d.month).toString();
TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute);
String minute = timeOfDay.minute < 10 ? timeOfDay.minute.toString().padLeft(2, '0') : timeOfDay.minute.toString();
String hour = '${timeOfDay.hourOfPeriod}:$minute';
if (timeOfDay.period == DayPeriod.am) {
hour = hour + "AM";
} else {
{
hour = hour + "PM";
}
}
//DayPeriod.am
return monthName + ',${d.day},${d.year}, $hour';
}
int currentIndex = 0; int currentIndex = 0;
@override @override
@ -41,7 +23,11 @@ class NotificationsPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<NotificationViewModel>( return BaseView<NotificationViewModel>(
onModelReady: (model) { onModelReady: (model) {
GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2); GetNotificationsRequestModel getNotificationsRequestModel =
new GetNotificationsRequestModel(
currentPage: currentIndex,
pagingSize: 14,
notificationStatusID: 2);
model.getNotifications(getNotificationsRequestModel, context); model.getNotifications(getNotificationsRequestModel, context);
}, },
@ -53,6 +39,28 @@ class NotificationsPage extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
body: ListView.separated( body: ListView.separated(
itemBuilder: (context, index) { itemBuilder: (context, index) {
if (index == model.notifications.length) {
return InkWell(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
currentIndex++;
GetNotificationsRequestModel
getNotificationsRequestModel =
new GetNotificationsRequestModel(
currentPage: currentIndex,
pagingSize: 14,
notificationStatusID: 2);
await model.getNotifications(
getNotificationsRequestModel, context);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Image.asset('assets/images/notf.png'),
),
);
}
return InkWell( return InkWell(
onTap: () async { onTap: () async {
if (!model.notifications[index].isRead) { if (!model.notifications[index].isRead) {
@ -69,17 +77,23 @@ class NotificationsPage extends StatelessWidget {
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor.withOpacity(0.05), color: model.notifications[index].isRead
? Theme.of(context).scaffoldBackgroundColor
: CustomColors.accentColor.withOpacity(0.05),
border: projectViewModel.isArabic border: projectViewModel.isArabic
? Border( ? Border(
right: BorderSide( right: BorderSide(
color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, color: model.notifications[index].isRead
? Theme.of(context).scaffoldBackgroundColor
: CustomColors.accentColor,
width: 5.0, width: 5.0,
), ),
) )
: Border( : Border(
left: BorderSide( left: BorderSide(
color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, color: model.notifications[index].isRead
? Theme.of(context).scaffoldBackgroundColor
: CustomColors.accentColor,
width: 5.0, width: 5.0,
), ),
), ),
@ -92,16 +106,25 @@ class NotificationsPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.notifications[index].createdOn)) + Texts(DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(model
.notifications[index].createdOn)) +
" " + " " +
DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(model.notifications[index].createdOn), false)), DateUtil.formatDateToTimeLang(
DateUtil.convertStringToDate(model
.notifications[index].createdOn),
false)),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Row( Row(
children: [ children: [
Expanded(child: Texts(model.notifications[index].message)), Expanded(
if (model.notifications[index].messageType == "image") child: Texts(model
.notifications[index].message)),
if (model
.notifications[index].messageType ==
"image")
Icon( Icon(
FontAwesomeIcons.images, FontAwesomeIcons.images,
color: CustomColors.grey, color: CustomColors.grey,
@ -130,7 +153,7 @@ class NotificationsPage extends StatelessWidget {
], ],
); );
}, },
itemCount: model.notifications.length)), itemCount: model.notifications.length + 1)),
// ListView( // ListView(
// children: model.notifications // children: model.notifications
// .map( // .map(

@ -65,8 +65,8 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
mWidth(12), mWidth(12),
Container( Container(
height: 60.0, height: 70.0,
width: 60, width: 70.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
child: Image.asset("assets/images/new/payment/Mada.png"), child: Image.asset("assets/images/new/payment/Mada.png"),
), ),

@ -31,7 +31,11 @@ class ConfirmPaymentPage extends StatefulWidget {
final String selectedPaymentMethod; final String selectedPaymentMethod;
AuthenticatedUser authenticatedUser; AuthenticatedUser authenticatedUser;
ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser}); ConfirmPaymentPage(
{this.advanceModel,
this.patientInfoAndMobileNumber,
this.selectedPaymentMethod,
this.authenticatedUser});
@override @override
_ConfirmPaymentPageState createState() => _ConfirmPaymentPageState(); _ConfirmPaymentPageState createState() => _ConfirmPaymentPageState();
@ -47,12 +51,16 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
void submit(MyBalanceViewModel model, code) { void submit(MyBalanceViewModel model, code) {
final activationCode = code; final activationCode = code;
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) { model
.checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pop(context, true); Navigator.pop(context, true);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID; appo.projectID = widget.patientInfoAndMobileNumber.projectID;
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); openPayment(widget.selectedPaymentMethod, widget.authenticatedUser,
double.parse(widget.advanceModel.amount), null);
}); });
} }
@ -70,22 +78,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Navigator.pop(context), Navigator.pop(context),
}, },
).displayDialog(context); ).displayDialog(context);
// showDialog(
// context: context,
// barrierDismissible: false,
// child: ConfirmSMSDialog(
// phoneNumber: patientInfoAndMobileNumber.mobileNumber,
// ),
// ).then((value) {
// print("dialog dismissed");
// print(value);
// if (value != null && value) {
// AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
// appo.projectID = patientInfoAndMobileNumber.projectID;
// openPayment(selectedPaymentMethod, authenticatedUser, double.parse(advanceModel.amount), null);
// }
// });
} }
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
@ -120,11 +112,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Container( Container(
height: 100.0, height: 100.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.30,
child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)), child: Image.asset(
getImagePath(widget.selectedPaymentMethod)),
), ),
Text( Text(
'${widget.advanceModel.amount} SAR', '${widget.advanceModel.amount} ' +
TranslationBase.of(context).sar,
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
@ -153,7 +147,8 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
margin: EdgeInsets.all(3), margin: EdgeInsets.all(3),
child: NewTextFields( child: NewTextFields(
hintText: TranslationBase.of(context).name, hintText: TranslationBase.of(context).name,
initialValue: widget.patientInfoAndMobileNumber.firstName, initialValue:
widget.patientInfoAndMobileNumber.firstName,
isEnabled: false, isEnabled: false,
), ),
), ),
@ -173,7 +168,11 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
), ),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).depositorName, hintText: TranslationBase.of(context).depositorName,
initialValue: model.user.firstName + " " + model.user.middleName + " " + model.user.lastName, initialValue: model.user.firstName +
" " +
model.user.middleName +
" " +
model.user.lastName,
isEnabled: false, isEnabled: false,
), ),
SizedBox( SizedBox(
@ -198,9 +197,14 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
TranslationBase.of(context).confirm.toUpperCase(), TranslationBase.of(context).confirm.toUpperCase(),
() { () {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) { model
.sendActivationCodeForAdvancePayment(
patientID: int.parse(widget.advanceModel.fileNumber),
projectID: widget.advanceModel.hospitalsModel.iD)
.then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model); if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(model);
}); });
}, },
), ),
@ -213,35 +217,54 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
String getImagePath(String paymentMethod) { String getImagePath(String paymentMethod) {
switch (paymentMethod) { switch (paymentMethod) {
case "MADA": case "MADA":
return 'assets/images/new-design/mada.png'; return 'assets/images/new/payment/Mada.png';
break; break;
case "SADAD": case "SADAD":
return 'assets/images/new-design/sadad.png'; return 'assets/images/new-design/sadad.png';
break; break;
case "VISA": case "VISA":
return 'assets/images/new-design/visa.png'; return 'assets/images/new/payment/visa.png';
break; break;
case "MASTERCARD": case "MASTERCARD":
return 'assets/images/new-design/mastercard.png'; return 'assets/images/new/payment/Mastercard.png';
break; break;
case "Installment": case "Installment":
return 'assets/images/new-design/installment.png'; return 'assets/images/new/payment/installments.png';
break; break;
case "ApplePay": case "ApplePay":
return 'assets/images/new-design/applepay.svg'; return 'assets/images/new/payment/Apple_Pay.png';
break; break;
} }
return 'assets/images/new-design/mada.png'; return 'assets/images/new-design/mada.png';
} }
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { openPayment(String paymentMethod, AuthenticatedUser authenticatedUser,
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(
onExitCallback: onBrowserExit,
appo: appo,
onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber)); transID = Utils.getAdvancePaymentTransID(
widget.advanceModel.hospitalsModel.iD,
int.parse(widget.advanceModel.fileNumber));
browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod, browser.openPaymentBrowser(
widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", ""); amount,
"Advance Payment",
transID,
widget.advanceModel.hospitalsModel.iD.toString(),
widget.advanceModel.email,
paymentMethod,
widget.patientInfoAndMobileNumber.patientType,
widget.advanceModel.patientName,
widget.advanceModel.fileNumber,
authenticatedUser,
browser,
false,
"3",
"");
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -293,11 +316,23 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
service.HIS_createAdvancePayment(appo, widget.advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber.patientType, service.HIS_createAdvancePayment(
widget.advanceModel.patientName, widget.advanceModel.fileNumber, AppGlobal.context) appo,
widget.advanceModel.hospitalsModel.iD.toString(),
res['Amount'],
res['Fort_id'],
res['PaymentMethod'],
widget.patientInfoAndMobileNumber.patientType,
widget.advanceModel.patientName,
widget.advanceModel.fileNumber,
AppGlobal.context)
.then((res) { .then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo); addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
0,
appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
@ -305,9 +340,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
}); });
} }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { addAdvancedNumberRequest(String advanceNumber, String paymentReference,
dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { service
.addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, AppGlobal.context)
.then((res) {
print(res); print(res);
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
navigateToHome(AppGlobal.context); navigateToHome(AppGlobal.context);

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -31,7 +32,7 @@ class WeightWeeklyPage extends StatelessWidget {
elevation: 1, elevation: 1,
margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
child: ShowChart( child: ShowChart(
title: TranslationBase.of(context).weight, title: TranslationBase.of(AppGlobal.context).weight,
timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData, timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0, indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
horizontalInterval: 2, horizontalInterval: 2,
@ -46,7 +47,7 @@ class WeightWeeklyPage extends StatelessWidget {
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).details), child: Texts(TranslationBase.of(AppGlobal.context).details),
), ),
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -57,14 +58,14 @@ class WeightWeeklyPage extends StatelessWidget {
model.weightWeekTimeSeriesData.isEmpty model.weightWeekTimeSeriesData.isEmpty
? Container( ? Container(
child: Center( child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable), child: Texts(TranslationBase.of(AppGlobal.context).noDataAvailable),
), ),
) )
: Table( : Table(
columnWidths: { columnWidths: {
0: FlexColumnWidth(2.5), 0: FlexColumnWidth(2.5),
}, },
children: fullData(context, model), children: fullData(AppGlobal.context, model),
), ),
], ],
), ),

@ -46,7 +46,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [
Utils.tableColumnValue(DateUtil.formatDateToDate(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime), false), isLast: i == (labOrderResultList.length - 1)), Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)), Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)),
], ],
), ),

Loading…
Cancel
Save