|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
@ -19,22 +20,28 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: 'Sick Leave',
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(12),
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: model.sickLeaveList.length,
|
|
|
|
|
itemBuilder: (context, index) => DoctorCard(
|
|
|
|
|
name: model.sickLeaveList[index].doctorName,
|
|
|
|
|
date: DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate),
|
|
|
|
|
profileUrl:model.sickLeaveList[index].doctorImageURL,
|
|
|
|
|
rat: model.sickLeaveList[index].doctorRate.toDouble(),
|
|
|
|
|
subName: model.sickLeaveList[index].projectName,
|
|
|
|
|
isInOutPatientDescription: model.sickLeaveList[index].isInOutPatientDescription,
|
|
|
|
|
onEmailTap: (){
|
|
|
|
|
model.sendSickLeaveEmail();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
body: Container(
|
|
|
|
|
margin: EdgeInsets.all(12),
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: model.sickLeaveList.length,
|
|
|
|
|
itemBuilder: (context, index) => DoctorCard(
|
|
|
|
|
name: model.sickLeaveList[index].doctorName,
|
|
|
|
|
date: DateUtil.getMonthDayYearDateFormatted(
|
|
|
|
|
model.sickLeaveList[index].requestDate),
|
|
|
|
|
profileUrl: model.sickLeaveList[index].doctorImageURL,
|
|
|
|
|
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
|
|
|
|
|
subName: model.sickLeaveList[index].projectName,
|
|
|
|
|
isInOutPatientDescription:
|
|
|
|
|
model.sickLeaveList[index].isInOutPatientDescription,
|
|
|
|
|
onEmailTap: () {
|
|
|
|
|
model.sendSickLeaveEmail(
|
|
|
|
|
message: TranslationBase.of(context).emailSentSuccessfully,
|
|
|
|
|
requestNo: model.sickLeaveList[index].requestNo,
|
|
|
|
|
doctorName: model.sickLeaveList[index].doctorName,
|
|
|
|
|
projectName: model.sickLeaveList[index].projectName,
|
|
|
|
|
setupID: model.sickLeaveList[index].setupID,
|
|
|
|
|
projectID: model.sickLeaveList[index].projectID);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|