|
|
|
|
@ -9,11 +9,11 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class PendingOrdersScreen extends StatelessWidget {
|
|
|
|
|
const PendingOrdersScreen({Key? key}) : super(key: key);
|
|
|
|
|
const PendingOrdersScreen({Key key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
patient = routeArgs['patient'];
|
|
|
|
|
String patientType = routeArgs['patientType'];
|
|
|
|
|
@ -24,73 +24,73 @@ class PendingOrdersScreen extends StatelessWidget {
|
|
|
|
|
admissionNo: int.parse(patient.admissionNo)),
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext context, PendingOrdersViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
appBar: PatientProfileAppBar(
|
|
|
|
|
patient,
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
),
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
appBarTitle: "Pending Orders",
|
|
|
|
|
body: model.pendingOrdersList == null ||
|
|
|
|
|
AppScaffold(
|
|
|
|
|
appBar: PatientProfileAppBar(
|
|
|
|
|
patient,
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
),
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
appBarTitle: "Pending Orders",
|
|
|
|
|
body: model.pendingOrdersList == null ||
|
|
|
|
|
model.pendingOrdersList.length == 0
|
|
|
|
|
? DrAppEmbeddedError(
|
|
|
|
|
? DrAppEmbeddedError(
|
|
|
|
|
error: TranslationBase.of(context).noDataAvailable)
|
|
|
|
|
: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).pending,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).orders,
|
|
|
|
|
fontSize: 25.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).pending,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).orders,
|
|
|
|
|
fontSize: 25.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: model.pendingOrdersList.length,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xFF707070), width: 0.30),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.pendingOrdersList[index].notes),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: model.pendingOrdersList.length,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xFF707070), width: 0.30),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.pendingOrdersList[index].notes),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
})),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|