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": "خاص"},
"allClinic": {"en": "All Clinics", "ar": "جميع العيادات"} ,
"operationReports": {"en": "Operation Reports", "ar": "تقارير العملية"},
"reports": {"en": "Reports", "ar": "تقارير "},
"operation": {"en": "Operation", "ar": " العملية"},
"registerNewPatient": {"en": "Register\nNew Patient", "ar": "تسجيل\n مريض جديد"},
"registeraPatient": {"en": "Register a Patient", "ar": "تسجيل المريض"},
"occupation": {"en": "Occupation", "ar": "مهنة"},

@ -67,304 +67,330 @@ class _ProgressNoteState extends State<OperationReportScreen> {
),
body: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
model.reservationList == null ||
model.reservationList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, ),
): 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,
child:model.reservationList == null ||
model.reservationList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, ),
): Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).operation,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).reports,
fontSize: 25.0,
fontWeight: FontWeight.w700,
),
],
),
],
),
),
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.start,
CrossAxisAlignment.start,
children: [
Container(
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,
),
],
Row(
crossAxisAlignment:
CrossAxisAlignment.end,
)
],
),
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,
CrossAxisAlignment
.start,
children: [
AppText(
"Operation Date : ",
fontSize: 10,
),
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 : ",
TranslationBase.of(
context)
.createdBy,
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.timeStart,
fontSize: 10,
),
)
]),
if (model.reservationList[index]
.remarks !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Remarks : ",
fontSize: 10,
),
Expanded(
child: AppText(
model
.reservationList[
index]
.remarks ??
index]
.doctorName ??
'',
fontSize: 10,
fontWeight:
FontWeight.w600,
fontSize: 12,
),
),
])
],
),
SizedBox(
height: 20,
),
// if (
// authenticationViewModel
// .doctorProfile.doctorID ==
// model
// .operationReportList[
// index]
// .createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
],
),
],
),
),
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.end,
)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.end,
MainAxisAlignment.start,
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),
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: [
AppText(
"Operation Date : ",
fontSize: 10,
),
Expanded(
child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.reservationList[
index]
.operationDate),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontSize: 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,
),
],
)
]),
if (model.reservationList[index]
.timeStart !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Time Start : ",
fontSize: 10,
),
Expanded(
child: AppText(
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,
),
),
SizedBox(
width: 10,
),
SizedBox(
width: 10,
),
],
),
Expanded(
child: AppText(
model
.reservationList[
index]
.remarks ??
'',
fontSize: 10,
),
),
])
],
),
SizedBox(
height: 10,
SizedBox(
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 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];

Loading…
Cancel
Save