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';
@ -562,48 +563,74 @@ class _PatientsScreenState extends State<PatientsScreen> {
// color: Color(0xffCCCCCC), // color: Color(0xffCCCCCC),
// ), // ),
Container( Container(
// decoration: BoxDecoration( // decoration: BoxDecoration(
// color: Color(0Xffffffff), // color: Color(0Xffffffff),
// borderRadius: // borderRadius:
// BorderRadius.circular(20)), // BorderRadius.circular(20)),
child: (responseModelList.length > 0) child: (responseModelList.length >
? Column( 0)
// mainAxisAlignment: MainAxisAlignment.center, ? Column(
children: responseModelList // mainAxisAlignment: MainAxisAlignment.center,
.map((PatiantInformtion children: responseModelList
item) { .map((PatiantInformtion
return PatientCard( item) {
patientInfo: item, return PatientCard(
patientType: patientType, patientInfo: item,
arrivalType: arrivalType, patientType:
onTap: () { patientType,
Navigator.of(context) arrivalType:
.pushNamed( arrivalType,
PATIENTS_PROFILE, onTap: () {
arguments: { Navigator.of(context)
"patient": item, .pushNamed(
"patientType": PATIENTS_PROFILE,
patientType, arguments: {
"from": patient "patient": item,
.getFrom, "patientType":
"to": patientType,
patient.getTo, "from": patient
"isSearch": .getFrom,
isSearch, "to": patient
"arrivalType": .getTo,
arrivalType, "isSearch":
}); isSearch,
}, "arrivalType":
); arrivalType,
}).toList(), });
) },
: Center( );
child: DrAppEmbeddedError( }).toList(),
error: TranslationBase.of( )
context) : Center(
.youDontHaveAnyPatient), child: Column(
), 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)
.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,
), ),

@ -243,21 +243,21 @@ class AddSickLeavScreen extends StatelessWidget {
) )
: patient.patientStatusType != 43 : patient.patientStatusType != 43
? Center( ? Center(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 100,), SizedBox(
Image.asset('assets/images/no-data.png'), height: 100,
Padding( ),
padding: const EdgeInsets.all(8.0), Image.asset('assets/images/no-data.png'),
child: Texts('No Sick Leave Found'), Padding(
) padding: const EdgeInsets.all(8.0),
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