|
|
|
|
@ -34,7 +34,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
bool isInpatient = routeArgs['isInpatient'];
|
|
|
|
|
return BaseView<SickLeaveViewModel>(
|
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
await model.getSickLeaveForPatient(patient);
|
|
|
|
|
await model.getSickLeaveForPatient(patient, isInpatient);
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
@ -45,8 +45,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
),
|
|
|
|
|
body: Column(children: [
|
|
|
|
|
patient.patientStatusType == 43
|
|
|
|
|
? Column(
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
@ -91,13 +90,11 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
"Leave Screen",
|
|
|
|
|
eventAction: "apply For Sick Leave",
|
|
|
|
|
);
|
|
|
|
|
openSickLeave(context, model);
|
|
|
|
|
openSickLeave(context, model, isInpatient);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
model.getAllSIckLeavePatient.length > 0
|
|
|
|
|
? Expanded(
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.95,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
@ -267,12 +264,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: patient.patientStatusType != 43
|
|
|
|
|
? ErrorMessage(
|
|
|
|
|
error: TranslationBase.of(context).noSickLeave,
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 100,
|
|
|
|
|
)
|
|
|
|
|
@ -281,7 +273,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openSickLeave(BuildContext context, model) {
|
|
|
|
|
openSickLeave(BuildContext context, model, isInpatient) {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
SlideUpPageRoute(
|
|
|
|
|
@ -291,6 +283,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
patientMRN: patient.patientMRN,
|
|
|
|
|
patient: patient,
|
|
|
|
|
previousModel: model,
|
|
|
|
|
isInpatient: isInpatient
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|