WIP: Pharmacy intervention date handling for to and from date
parent
63675befe2
commit
9fa4fc445c
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,179 @@
|
||||
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/pharmacy_intervention_item.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/PharmacyIntervention.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_view_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/widgets/InterventionDetails.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterventionCardBody extends StatelessWidget {
|
||||
final Medication medication;
|
||||
final PharmacyInterventionViewModel model;
|
||||
|
||||
const InterventionCardBody(
|
||||
{super.key, required this.medication, required this.model});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.accessLevel,
|
||||
data: medication.accessLevel.toString() ?? '',
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.patientID,
|
||||
data: medication.patientID.toString() ?? '',
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.patientName,
|
||||
data: medication.patientName.toString() ?? '',
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.nursingStation,
|
||||
data: medication.nursingStation.toString() ?? '',
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.admissionNumber,
|
||||
data: medication.admissionNo.toString() ?? '',
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.medication,
|
||||
data: medication.medication.toString() ?? '',
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.dosageDetails,
|
||||
data: medication.dosageDetail.toString() ?? '',
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.doctorComments,
|
||||
data: medication.doctorComments.toString() ?? '',
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.startDate,
|
||||
data: model.getDate(medication.startDatetime.toString() ?? ''),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.stopDate,
|
||||
data: model.getDate(medication.stopDatetime.toString() ?? ''),
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.status,
|
||||
data: medication.status.toString() ?? '',
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.doctor,
|
||||
data: medication.doctorName.toString() ?? '',
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.authorizedBy,
|
||||
data: medication.authorizedBy.toString() ?? '-',
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InterventionDetails(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.pharmacyRemarks,
|
||||
data: medication.pharmacyRemarks.toString() ?? '-',
|
||||
))
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/pharmacy_intervention_item.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_view_model.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterventionCardFooter extends StatelessWidget {
|
||||
final PharmacyInterventionViewModel model;
|
||||
final Medication medication;
|
||||
|
||||
const InterventionCardFooter(
|
||||
{super.key, required this.model, required this.medication});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(children: [
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: AppButton(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.details,
|
||||
hasBorder: true,
|
||||
borderColor: Colors.grey,
|
||||
color: Colors.grey,
|
||||
fontColor: Colors.white,
|
||||
onPressed: () async {
|
||||
model.getInterventionHistory(
|
||||
medication: medication
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/pharmacy_intervention_item.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_view_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/widgets/InterventionCardBody.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/widgets/InterventionCardFooter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterventionCardItem extends StatelessWidget {
|
||||
final Medication medication;
|
||||
final PharmacyInterventionViewModel model;
|
||||
|
||||
const InterventionCardItem(
|
||||
{super.key, required this.medication, required this.model});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Card(
|
||||
color: Colors.white,
|
||||
elevation: 5,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
InterventionCardBody(
|
||||
medication: medication,
|
||||
model: model,
|
||||
),
|
||||
InterventionCardFooter(
|
||||
model: model,
|
||||
medication: medication,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterventionDetails extends StatelessWidget {
|
||||
final String title;
|
||||
final String data;
|
||||
|
||||
const InterventionDetails(
|
||||
{super.key, required this.title, required this.data});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Text(
|
||||
data,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/PharmacyIntervention.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_view_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/pharmacy_intervention/widgets/intervention_history_item.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterventionHistoryBottomSheet extends StatelessWidget {
|
||||
final List<InterventionHistory> interventionList;
|
||||
final ScrollController controller;
|
||||
final PharmacyInterventionViewModel model;
|
||||
|
||||
const InterventionHistoryBottomSheet(
|
||||
{super.key, required this.interventionList, required this.controller, required this.model});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: Color(0xFFF7F7F7),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(20), topRight: Radius.circular(20))),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 32),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase
|
||||
.of(context)
|
||||
.histories,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 24,
|
||||
color: Color(0xFF2B353E),
|
||||
),
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
controller: controller,
|
||||
itemCount: interventionList.length,
|
||||
itemBuilder: (context, index) =>
|
||||
Material(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
color: Colors.white,
|
||||
child: InterventionHistoryItem(
|
||||
interventionHistory: interventionList[index],
|
||||
onAcceptClick: (intervention) {
|
||||
model.updateInterventionDiseaseStatus(
|
||||
isAccepted: true,
|
||||
interventionID: interventionList[index].interventionId.toString(),
|
||||
successMessage: TranslationBase.of(context).interventionRejectedSuccessfully,
|
||||
errorMessage: TranslationBase.of(context).unableToPerformTheAction
|
||||
);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onRejectClick: (intervention) {
|
||||
model.updateInterventionDiseaseStatus(
|
||||
interventionID: interventionList[index].interventionId.toString(),
|
||||
successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully,
|
||||
errorMessage: TranslationBase.of(context).unableToPerformTheAction
|
||||
);
|
||||
Navigator.pop(context);
|
||||
|
||||
},
|
||||
),
|
||||
),
|
||||
separatorBuilder: (_, __) => Divider(),
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NoInterventionFound extends StatelessWidget{
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).noInterventionFound,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,236 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class PharmacyInterventionDialog extends StatefulWidget {
|
||||
final Function(
|
||||
String, // dataFrom
|
||||
String, // dateTo
|
||||
String, // admissionNumber
|
||||
String, // patient ID
|
||||
String, // nursingStation
|
||||
) onDispose;
|
||||
|
||||
final String dateFrom;
|
||||
final String dateTo;
|
||||
final String admissionNumber;
|
||||
final String patientID;
|
||||
final String nursingStation;
|
||||
|
||||
const PharmacyInterventionDialog({super.key,
|
||||
required this.onDispose,
|
||||
required this.dateFrom,
|
||||
required this.dateTo,
|
||||
required this.admissionNumber,
|
||||
required this.patientID,
|
||||
required this.nursingStation});
|
||||
|
||||
@override
|
||||
State<PharmacyInterventionDialog> createState() =>
|
||||
_PharmacyInterventionDialogState();
|
||||
}
|
||||
|
||||
class _PharmacyInterventionDialogState
|
||||
extends State<PharmacyInterventionDialog> {
|
||||
final TextEditingController admissionNumber = TextEditingController();
|
||||
final TextEditingController nursingStation = TextEditingController();
|
||||
|
||||
final TextEditingController patientId = TextEditingController();
|
||||
|
||||
String dateFrom = '';
|
||||
|
||||
String dateTo = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
initData();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void initData() {
|
||||
admissionNumber.text = (widget.admissionNumber == '0')?'':widget.admissionNumber;
|
||||
nursingStation.text = (widget.nursingStation == '0')?'':widget.nursingStation;
|
||||
patientId.text = (widget.patientID == '0' )?'':widget.patientID;
|
||||
dateTo = getDate(widget.dateTo);
|
||||
dateFrom = getDate(widget.dateFrom);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
_titleAndTextField(TranslationBase
|
||||
.of(context)
|
||||
.nursingStation,
|
||||
nursingStation, TextInputType.number),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
_titleAndTextField(TranslationBase
|
||||
.of(context)
|
||||
.admissionNumber,
|
||||
admissionNumber, TextInputType.number),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
_titleAndTextField(TranslationBase
|
||||
.of(context)
|
||||
.patientID, patientId,
|
||||
TextInputType.number),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
_dateSelection(TranslationBase
|
||||
.of(context)
|
||||
.dateFrom, (date) {
|
||||
setState(() {
|
||||
dateFrom = date;
|
||||
});
|
||||
}, dateFrom),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
_dateSelection(TranslationBase
|
||||
.of(context)
|
||||
.dateTo, (date) {
|
||||
setState(() {
|
||||
dateTo = date;
|
||||
});
|
||||
}, dateTo),
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: AppButton(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.search,
|
||||
hasBorder: true,
|
||||
borderColor: Color(0xFFB8382B),
|
||||
color: AppGlobal.appRedColor,
|
||||
fontColor: Colors.white,
|
||||
onPressed: () async {
|
||||
//(dateFrom, dateTo, admissionNumber, patientId, nursingStation)
|
||||
widget.onDispose(dateFrom, dateTo, nursingStation.text,
|
||||
patientId.text, nursingStation.text);
|
||||
},
|
||||
),
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _dateSelection(String title, Function(String) onDateSelected,
|
||||
String selectedDate) {
|
||||
return GestureDetector(
|
||||
onTap: () => _selectDate(onDateSelected),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(title),
|
||||
Expanded(
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
selectedDate,
|
||||
),
|
||||
trailing: Icon(Icons.arrow_drop_down_outlined),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future _selectDate(Function(String) updateDate) async {
|
||||
final DateTime? picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(DateTime
|
||||
.now()
|
||||
.year - 150),
|
||||
lastDate: DateTime(DateTime
|
||||
.now()
|
||||
.year + 150),
|
||||
initialEntryMode: DatePickerEntryMode.calendar,
|
||||
builder: (_, child) {
|
||||
return Theme(
|
||||
data: ThemeData.light().copyWith(
|
||||
colorScheme: ColorScheme.fromSwatch(
|
||||
primarySwatch: Colors.red,
|
||||
accentColor: AppGlobal.appRedColor,
|
||||
),
|
||||
dialogBackgroundColor: Colors.white,
|
||||
),
|
||||
child: child!,
|
||||
);
|
||||
});
|
||||
if (picked != null) {
|
||||
updateDate(getFormattedDate(picked));
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
Widget _titleAndTextField(String title, TextEditingController controller,
|
||||
TextInputType? inputType) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(title),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
keyboardType: inputType,
|
||||
decoration: InputDecoration(
|
||||
hintText: '',
|
||||
focusedBorder: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
contentPadding: EdgeInsetsDirectional.only(start: 10.0),
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
controller: controller,
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
void initFromDate() {
|
||||
var time = DateTime.now();
|
||||
dateFrom = getFormattedDate(time);
|
||||
}
|
||||
|
||||
String getFormattedDate(DateTime time) {
|
||||
return DateFormat('yyyy-MM-dd').format(time);
|
||||
}
|
||||
|
||||
String getDate(String dateTime) {
|
||||
if (dateTime.isEmpty) return '';
|
||||
List<String> splitedDate = dateTime.split('-');
|
||||
DateTime now = DateTime(int.parse(splitedDate[0]),
|
||||
int.parse(splitedDate[1]), int.parse(splitedDate[2]));
|
||||
return DateFormat('yyyy-MM-dd').format(now);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart';
|
||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterventionHistoryItem extends StatelessWidget {
|
||||
final InterventionHistory interventionHistory;
|
||||
final Function(InterventionHistory) onAcceptClick;
|
||||
|
||||
// string is index here
|
||||
final Function(InterventionHistory) onRejectClick;
|
||||
|
||||
const InterventionHistoryItem({
|
||||
super.key,
|
||||
required this.interventionHistory,
|
||||
required this.onAcceptClick,
|
||||
required this.onRejectClick,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
interventionHistory.interventionDesc ?? '',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF2B353E),
|
||||
),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
AppText(
|
||||
"${TranslationBase
|
||||
.of(context)
|
||||
.commentedBy}: ${interventionHistory.commentedByName}",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF2B353E),
|
||||
),
|
||||
AppText(
|
||||
"${TranslationBase
|
||||
.of(context)
|
||||
.remarks}: ${interventionHistory.remark?.isNotEmpty == true
|
||||
? interventionHistory.remark
|
||||
: TranslationBase
|
||||
.of(context)
|
||||
.noRemarks}",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF2B353E),
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
height: 48,
|
||||
child: AppButton(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.reject,
|
||||
hasBorder: true,
|
||||
borderColor: Color(0xFFB8382B),
|
||||
color: AppGlobal.appRedColor,
|
||||
fontColor: Colors.white,
|
||||
onPressed: () async {
|
||||
onRejectClick(interventionHistory);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6,
|
||||
),
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
height: 48,
|
||||
child: AppButton(
|
||||
title: TranslationBase
|
||||
.of(context)
|
||||
.accept,
|
||||
hasBorder: true,
|
||||
borderColor: AppGlobal.appGreenColor,
|
||||
color: AppGlobal.appGreenColor,
|
||||
fontColor: Colors.white,
|
||||
onPressed: () async {
|
||||
onAcceptClick(interventionHistory);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
SizedBox(height: 4,),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue