diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index 9f2f9aa1..9e3a5f04 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -209,42 +209,30 @@ class _NewPrescriptionScreenState extends State { 0.09, child: Column( children: [ - // AppText( - // (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) != - // null - // ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn).year) - // .toString() - // : DateTime.now() - // .year) - // .toString(), - // color: Colors - // .green, - // fontSize: - // 13.5, - // ), - // AppText( - // Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn != - // null - // ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) - // .month) - // : DateTime.now() - // .month) - // .toUpperCase(), - // color: Colors - // .green, - // ), - // AppText( - // DateTime.parse(model - // .prescriptionList[ - // 0] - // .entityList[ - // index] - // .createdOn) - // .day - // .toString(), - // color: Colors - // .green, - // ), + AppText( + (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) != + null + ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn).year) + .toString() + : DateTime.now() + .year) + .toString(), + color: Colors + .green, + fontSize: + 13.5, + ), + AppText( + Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn != + null + ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) + .month) + : DateTime.now() + .month) + .toUpperCase(), + color: Colors + .green, + ), AppText( DateTime.parse(model .prescriptionList[ @@ -252,6 +240,18 @@ class _NewPrescriptionScreenState extends State { .entityList[ index] .createdOn) + .day + .toString(), + color: Colors + .green, + ), + AppText( + Helpers.getTimeFormated(DateTime.parse(model + .prescriptionList[ + 0] + .entityList[ + index] + .createdOn)) .toString(), color: Colors .green, @@ -446,7 +446,7 @@ class _NewPrescriptionScreenState extends State { Row( children: [ AppText( - 'BOX Quantity: ', + 'pharmacy Intervention ', fontWeight: FontWeight .w700, diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index 09bc8f50..4f9543c1 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -303,6 +303,14 @@ class Helpers { return ""; } + static String getTimeFormated(DateTime dateTime) { + print(dateTime); + if (dateTime != null) + return dateTime.hour.toString() + ":" + dateTime.minute.toString(); + else + return ""; + } + /* *@author: Mohammad Aljammal *@Date:26/5/2020