small fixes

merge-requests/901/head
Elham Rababh 4 years ago
parent bfd86f533a
commit d1060ba27a

@ -711,6 +711,8 @@ const Map<String, Map<String, String>> localizedValues = {
"special": {"en": "Special", "ar": "خاص"}, "special": {"en": "Special", "ar": "خاص"},
"allClinic": {"en": "All Clinics", "ar": "جميع العيادات"} , "allClinic": {"en": "All Clinics", "ar": "جميع العيادات"} ,
"operationReports": {"en": "Operation Reports", "ar": "تقارير العملية"}, "operationReports": {"en": "Operation Reports", "ar": "تقارير العملية"},
"reports": {"en": "Reports", "ar": "تقارير "},
"operation": {"en": "Operation", "ar": " العملية"},
"registerNewPatient": {"en": "Register\nNew Patient", "ar": "تسجيل\n مريض جديد"}, "registerNewPatient": {"en": "Register\nNew Patient", "ar": "تسجيل\n مريض جديد"},
"registeraPatient": {"en": "Register a Patient", "ar": "تسجيل المريض"}, "registeraPatient": {"en": "Register a Patient", "ar": "تسجيل المريض"},
"occupation": {"en": "Occupation", "ar": "مهنة"}, "occupation": {"en": "Occupation", "ar": "مهنة"},

@ -67,304 +67,330 @@ class _ProgressNoteState extends State<OperationReportScreen> {
), ),
body: Container( body: Container(
color: Colors.grey[200], color: Colors.grey[200],
child: Column( child:model.reservationList == null ||
children: <Widget>[ model.reservationList.length == 0
model.reservationList == null || ? Center(
model.reservationList.length == 0 child: ErrorMessage(
? Center( error: TranslationBase.of(context).noDataAvailable, ),
child: ErrorMessage( ): Column(
error: TranslationBase.of(context).noDataAvailable, ), children: [
): Expanded( Padding(
child: Container( padding: const EdgeInsets.all(8.0),
child: ListView.builder( child: Column(
itemCount: model.reservationList.length, children: [
itemBuilder: (BuildContext ctxt, int index) { Row(
return FractionallySizedBox( children: [
widthFactor: 0.95, AppText(
child: CardWithBgWidget( TranslationBase.of(context).operation,
hasBorder: false, fontSize: 15.0,
bgColor: Colors.white, fontWeight: FontWeight.w600,
widget: Column( fontFamily: 'Poppins',
children: [ ),
Column( ],
crossAxisAlignment: ),
CrossAxisAlignment.start, Row(
mainAxisAlignment: children: [
MainAxisAlignment.start, AppText(
children: [ TranslationBase.of(context).reports,
Row( fontSize: 25.0,
mainAxisAlignment: fontWeight: FontWeight.w700,
MainAxisAlignment.spaceBetween, ),
],
),
],
),
),
Expanded(
child: Container(
child: ListView.builder(
itemCount: model.reservationList.length,
itemBuilder: (BuildContext ctxt, int index) {
return FractionallySizedBox(
widthFactor: 0.95,
child: CardWithBgWidget(
hasBorder: false,
bgColor: Colors.white,
widget: Column(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Container( Row(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
TranslationBase.of(
context)
.createdBy,
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.doctorName ??
'',
fontWeight:
FontWeight.w600,
fontSize: 12,
),
),
],
),
],
),
),
Column(
children: [
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now(),
isArabic:
projectViewModel
.isArabic),
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.end, CrossAxisAlignment
) .start,
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Reservation: ",
fontSize: 10,
),
Expanded(
child: AppText(
model.reservationList[index].oTReservationID.toString(),
fontSize: 10,
),
)
]),
SizedBox(
height: 8,
),
if (model.reservationList[index]
.operationDate !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Operation Date : ", TranslationBase.of(
fontSize: 10, context)
), .createdBy,
Expanded(
child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.operationDate),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontSize: 10,
),
)
]),
if (model.reservationList[index]
.timeStart !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Time Start : ",
fontSize: 10, fontSize: 10,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
model model
.reservationList[ .reservationList[
index] index]
.timeStart, .doctorName ??
fontSize: 10,
),
)
]),
if (model.reservationList[index]
.remarks !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Remarks : ",
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.remarks ??
'', '',
fontSize: 10, fontWeight:
FontWeight.w600,
fontSize: 12,
), ),
), ),
]) ],
], ),
), ],
),
SizedBox( ),
height: 20, Column(
), children: [
AppText(
// if ( model
// authenticationViewModel .reservationList[
// .doctorProfile.doctorID == index]
// model .createdOn !=
// .operationReportList[ null
// index] ? AppDateUtils.getDayMonthYearDateFormatted(
// .createdBy) AppDateUtils
Row( .getDateTimeFromServerFormat(model
crossAxisAlignment: .reservationList[
CrossAxisAlignment.start, index]
.createdOn),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now(),
isArabic:
projectViewModel
.isArabic),
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
model
.reservationList[
index]
.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
crossAxisAlignment:
CrossAxisAlignment.end,
)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.end, MainAxisAlignment.start,
children: [ children: [
InkWell( AppText(
onTap: () async { "Reservation: ",
await locator<AnalyticsService>() fontSize: 10,
.logEvent( ),
eventCategory: Expanded(
"Operation Report Screen", child: AppText(
eventAction: model.reservationList[index].oTReservationID.toString(),
"Update Operation Report ", fontSize: 10,
); ),
Navigator.push( )
context, ]),
MaterialPageRoute( SizedBox(
builder: (context) => height: 8,
UpdateOperationReport( ),
reservation: model if (model.reservationList[index]
.reservationList[ .operationDate !=
index], null)
patient: patient, Row(
isUpdate: true, mainAxisAlignment:
)), MainAxisAlignment.start,
); children: [
}, AppText(
child: Container( "Operation Date : ",
decoration: BoxDecoration( fontSize: 10,
color: Colors.green[600], ),
borderRadius: Expanded(
BorderRadius.circular(10), child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.operationDate),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontSize: 10,
), ),
// color:Colors.red[600], )
]),
child: Row( if (model.reservationList[index]
children: [ .timeStart !=
Icon( null)
DoctorApp.edit_1, Row(
size: 12, mainAxisAlignment:
color: Colors.white, MainAxisAlignment.start,
), children: [
SizedBox( AppText(
width: 2, "Operation Time Start : ",
), fontSize: 10,
AppText( ),
"Operation Reports", Expanded(
fontSize: 10, child: AppText(
color: Colors.white, model
), .reservationList[
], index]
.timeStart,
fontSize: 10,
), ),
padding: EdgeInsets.all(6), )
]),
if (model.reservationList[index]
.remarks !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Remarks : ",
fontSize: 10,
), ),
), Expanded(
SizedBox( child: AppText(
width: 10, model
), .reservationList[
SizedBox( index]
width: 10, .remarks ??
), '',
], fontSize: 10,
), ),
),
])
],
),
SizedBox( SizedBox(
height: 10, height: 20,
),
// if (
// authenticationViewModel
// .doctorProfile.doctorID ==
// model
// .operationReportList[
// index]
// .createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.end,
children: [
InkWell(
onTap: () async {
await locator<AnalyticsService>()
.logEvent(
eventCategory:
"Operation Report Screen",
eventAction:
"Update Operation Report ",
);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
UpdateOperationReport(
reservation: model
.reservationList[
index],
patient: patient,
isUpdate: true,
)),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.green[600],
borderRadius:
BorderRadius.circular(10),
),
// color:Colors.red[600],
child: Row(
children: [
Icon(
DoctorApp.edit_1,
size: 12,
color: Colors.white,
),
SizedBox(
width: 2,
),
AppText(
"Operation Reports",
fontSize: 10,
color: Colors.white,
),
],
),
padding: EdgeInsets.all(6),
), ),
], ),
), SizedBox(
width: 10,
),
SizedBox(
width: 10,
),
],
), ),
);
}), SizedBox(
), height: 10,
), ),
],
),
),
);
}),
),
),
], ],
), ),
), ),

@ -213,6 +213,8 @@ class TranslationBase {
String get progressNote => localizedValues['progressNote'][locale.languageCode]; String get progressNote => localizedValues['progressNote'][locale.languageCode];
String get operationReports => localizedValues['operationReports'][locale.languageCode]; String get operationReports => localizedValues['operationReports'][locale.languageCode];
String get reports => localizedValues['reports'][locale.languageCode];
String get operation => localizedValues['operation'][locale.languageCode];
String get progress => localizedValues['progress'][locale.languageCode]; String get progress => localizedValues['progress'][locale.languageCode];

Loading…
Cancel
Save