merge-requests/487/head
Sultan Khan 5 years ago
parent 49a28c302a
commit 0498545e5c

@ -10,6 +10,7 @@ class GetRescheduleLeavesResponse {
int requisitionType; int requisitionType;
int status; int status;
String createdOn; String createdOn;
String statusDescription;
GetRescheduleLeavesResponse( GetRescheduleLeavesResponse(
{this.clinicId, {this.clinicId,
this.coveringDoctorId, this.coveringDoctorId,
@ -21,7 +22,8 @@ class GetRescheduleLeavesResponse {
this.requisitionNo, this.requisitionNo,
this.requisitionType, this.requisitionType,
this.status, this.status,
this.createdOn}); this.createdOn,
this.statusDescription});
GetRescheduleLeavesResponse.fromJson(Map<String, dynamic> json) { GetRescheduleLeavesResponse.fromJson(Map<String, dynamic> json) {
clinicId = json['clinicId']; clinicId = json['clinicId'];
@ -35,6 +37,7 @@ class GetRescheduleLeavesResponse {
requisitionType = json['requisitionType']; requisitionType = json['requisitionType'];
status = json['status']; status = json['status'];
createdOn = json['createdOn']; createdOn = json['createdOn'];
statusDescription = json['statusDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -50,6 +53,7 @@ class GetRescheduleLeavesResponse {
data['requisitionType'] = this.requisitionType; data['requisitionType'] = this.requisitionType;
data['status'] = this.status; data['status'] = this.status;
data['createdOn'] = this.createdOn; data['createdOn'] = this.createdOn;
data['statusDescription'] = this.statusDescription;
return data; return data;
} }
} }

@ -7,7 +7,7 @@ class GetAllSickLeaveResponse {
int requestNo; int requestNo;
String startDate; String startDate;
int status; int status;
String statusDescription;
GetAllSickLeaveResponse( GetAllSickLeaveResponse(
{this.appointmentNo, {this.appointmentNo,
this.isExtendedLeave, this.isExtendedLeave,
@ -16,7 +16,8 @@ class GetAllSickLeaveResponse {
this.remarks, this.remarks,
this.requestNo, this.requestNo,
this.startDate, this.startDate,
this.status}); this.status,
this.statusDescription});
GetAllSickLeaveResponse.fromJson(Map<String, dynamic> json) { GetAllSickLeaveResponse.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
@ -27,6 +28,7 @@ class GetAllSickLeaveResponse {
requestNo = json['requestNo']; requestNo = json['requestNo'];
startDate = json['startDate']; startDate = json['startDate'];
status = json['status']; status = json['status'];
statusDescription = json['statusDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -39,6 +41,7 @@ class GetAllSickLeaveResponse {
data['requestNo'] = this.requestNo; data['requestNo'] = this.requestNo;
data['startDate'] = this.startDate; data['startDate'] = this.startDate;
data['status'] = this.status; data['status'] = this.status;
data['statusDescription'] = this.statusDescription;
return data; return data;
} }
} }

@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart'; import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -566,7 +567,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
// color: Color(0Xffffffff), // color: Color(0Xffffffff),
// borderRadius: // borderRadius:
// BorderRadius.circular(20)), // BorderRadius.circular(20)),
child: (responseModelList.length > 0) child: (responseModelList.length >
0)
? Column( ? Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList children: responseModelList
@ -574,8 +576,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
item) { item) {
return PatientCard( return PatientCard(
patientInfo: item, patientInfo: item,
patientType: patientType, patientType:
arrivalType: arrivalType, patientType,
arrivalType:
arrivalType,
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.pushNamed( .pushNamed(
@ -586,8 +590,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType, patientType,
"from": patient "from": patient
.getFrom, .getFrom,
"to": "to": patient
patient.getTo, .getTo,
"isSearch": "isSearch":
isSearch, isSearch,
"arrivalType": "arrivalType":
@ -598,11 +602,34 @@ class _PatientsScreenState extends State<PatientsScreen> {
}).toList(), }).toList(),
) )
: Center( : Center(
child: DrAppEmbeddedError( child: Column(
error: TranslationBase.of( crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
SizedBox(
height: 100,
),
Image.asset(
'assets/images/no-data.png'),
Padding(
padding:
const EdgeInsets
.all(8.0),
child: Texts(
TranslationBase.of(
context) context)
.youDontHaveAnyPatient), .youDontHaveAnyPatient),
)
],
), ),
)
// : Center(
// child: DrAppEmbeddedError(
// error: TranslationBase.of(
// context)
// .youDontHaveAnyPatient),
// ),
), ),
], ],
), ),

@ -80,11 +80,11 @@ class AddRescheduleLeavScreen extends StatelessWidget {
border: Border( border: Border(
left: BorderSide( left: BorderSide(
color: item.status == 10 color: item.status == 10
? Colors.green ? Colors.red[800]
: item.status == 2 : item.status == 2
? HexColor('#CC9B14') ? HexColor('#CC9B14')
: item.status == 9 : item.status == 9
? Colors.red[800] ? Colors.green
: Colors.red, : Colors.red,
width: 5.0, width: 5.0,
))), ))),
@ -109,29 +109,14 @@ class AddRescheduleLeavScreen extends StatelessWidget {
margin: margin:
EdgeInsets.only(top: 10), EdgeInsets.only(top: 10),
child: AppText( child: AppText(
item.status == 10 item.statusDescription,
? TranslationBase.of(
context)
.accepted
: item.status == 2
? TranslationBase.of(
context)
.pending
: item.status == 9
? TranslationBase
.of(
context)
.rejected
: TranslationBase
.of(context)
.cancelled,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: item.status == 10 color: item.status == 10
? Colors.green ? Colors.red[800]
: item.status == 2 : item.status == 2
? HexColor('#CC9B14') ? HexColor('#CC9B14')
: item.status == 9 : item.status == 9
? Colors.red[800] ? Colors.green
: Colors.red, : Colors.red,
fontSize: 14, fontSize: 14,
), ),

@ -246,18 +246,18 @@ class AddSickLeavScreen extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 100,), SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'), Image.asset('assets/images/no-data.png'),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('No Sick Leave Found'), child: Texts('No Sick Leave Found'),
) )
], ],
), ),
) )
: SizedBox() : SizedBox()
])))); ]))));
} }

@ -128,8 +128,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
AppText( AppText(
item.remarks ?? "", item.remarks ?? "",
), ),
(item.status == 1 || (item.status == 1)
item.status == 2)
? IconButton( ? IconButton(
icon: Image.asset( icon: Image.asset(
'assets/images/edit.png'), 'assets/images/edit.png'),

@ -857,7 +857,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
authProv.setDoctorProfile(doctor); authProv.setDoctorProfile(doctor);
sharedPref.setObj(DOCTOR_PROFILE, profile); sharedPref.setObj(DOCTOR_PROFILE, profile);
projectsProvider.isLogin = true; projectsProvider.isLogin = true;
Navigator.of(context).pushReplacementNamed(HOME);
Navigator.of(context).popAndPushNamed(HOME);
} }
getDocProfiles(ClinicModel clinicInfo, authProv) { getDocProfiles(ClinicModel clinicInfo, authProv) {

@ -129,9 +129,9 @@ class PatientCard extends StatelessWidget {
children: [ children: [
AppText( AppText(
patientInfo.nationalityName != null patientInfo.nationalityName != null
? patientInfo.nationalityName ? patientInfo.nationalityName.trim()
: patientInfo.nationality != null : patientInfo.nationality != null
? patientInfo.nationality ? patientInfo.nationality.trim()
: "", : "",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,

Loading…
Cancel
Save