You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
4.3 KiB
Dart
94 lines
4.3 KiB
Dart
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
|
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import '../../../../routes.dart';
|
|
|
|
class MyReferralPatientScreen extends StatelessWidget {
|
|
// previous design page is: MyReferralPatient
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
AuthViewModel authProvider = Provider.of(context);
|
|
|
|
return BaseView<PatientReferralViewModel>(
|
|
onModelReady: (model) => model.getPendingReferralPatients(),
|
|
builder: (_, model, w) => AppScaffold(
|
|
baseViewModel: model,
|
|
isShowAppBar: false,
|
|
appBarTitle: TranslationBase.of(context).referPatient,
|
|
body: model.pendingReferral == null || model.pendingReferral.length == 0
|
|
? Center(
|
|
child: AppText(
|
|
TranslationBase.of(context).referralEmptyMsg,
|
|
color: Theme.of(context).errorColor,
|
|
),
|
|
)
|
|
: SingleChildScrollView(
|
|
child: Container(
|
|
margin: EdgeInsets.only(top: 70),
|
|
// color: Colors.white,
|
|
// height: MediaQuery.of(context).size.height,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
// SizedBox(height: 50),
|
|
...List.generate(
|
|
model.pendingReferral.length,
|
|
(index) => InkWell(
|
|
onTap: () {
|
|
Navigator.of(context).pushNamed(MY_REFERRAL_DETAIL,
|
|
arguments: {
|
|
'referral': model.pendingReferral[index]
|
|
});
|
|
},
|
|
child: PatientReferralItemWidget(
|
|
"${model.pendingReferral[index].patientID}",
|
|
patientInfo: model.pendingReferral[index],
|
|
patientName:
|
|
model.pendingReferral[index].patientName,
|
|
referralStatus:
|
|
model.pendingReferral[index].referralStatus,
|
|
isReferredTo: false,
|
|
isSameBranch: model.pendingReferral[index]
|
|
.isReferralDoctorSameBranch,
|
|
referralDoctorName: model
|
|
.pendingReferral[index].referredByDoctorInfo,
|
|
clinicDescription: null,
|
|
remark:
|
|
model.pendingReferral[index].remarksFromSource,
|
|
referredOn: model.pendingReferral[index].referredOn,
|
|
answerFromTarget:
|
|
model.pendingReferral[index].answerFromTarget,
|
|
infoIcon: InkWell(
|
|
onTap: () {
|
|
Navigator.of(context)
|
|
.pushNamed(MY_REFERRAL_DETAIL, arguments: {
|
|
'referral': model.pendingReferral[index]
|
|
});
|
|
},
|
|
child: Icon(
|
|
Icons.info_outline,
|
|
color: Colors.black,
|
|
size: 30,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|