Merge branch 'master' into dev_aamir

pull/273/head
aamir-csol 3 days ago
commit 42f4333a28

@ -1003,6 +1003,8 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
Future<Either<Failure, GenericApiModel<PatientAppointmentShareResponseModel>>> getPatientShareWalkInAppointment({required int projectID, required int clinicID, required int doctorID}) async { Future<Either<Failure, GenericApiModel<PatientAppointmentShareResponseModel>>> getPatientShareWalkInAppointment({required int projectID, required int clinicID, required int doctorID}) async {
Map<String, dynamic> mapRequest = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID}; Map<String, dynamic> mapRequest = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID};
late PatientAppointmentShareResponseModel patientShareObj;
try { try {
GenericApiModel<PatientAppointmentShareResponseModel>? apiResponse; GenericApiModel<PatientAppointmentShareResponseModel>? apiResponse;
Failure? failure; Failure? failure;
@ -1015,14 +1017,18 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
final list = response['OnlineCheckInAppointmentsWalkInModel']; final list = response['OnlineCheckInAppointmentsWalkInModel'];
if (list == null || list.isEmpty) { patientShareObj = (list == null || list.isEmpty) ? PatientAppointmentShareResponseModel() : PatientAppointmentShareResponseModel.fromJson(list);
throw Exception("patient share list is empty");
}
final patientShareObj = PatientAppointmentShareResponseModel.fromJson(list);
patientShareObj.isCash = response["IsCash"]; patientShareObj.isCash = response["IsCash"];
patientShareObj.isEligible = response["IsEligible"]; patientShareObj.isEligible = response["IsEligible"];
patientShareObj.isInsured = response["IsInsured"]; patientShareObj.isInsured = response["IsInsured"];
// if (list == null || list.isEmpty) {
// throw Exception("patient share list is empty");
// }
// final patientShareObj = PatientAppointmentShareResponseModel.fromJson(list);
// patientShareObj.isCash = response["IsCash"];
// patientShareObj.isEligible = response["IsEligible"];
// patientShareObj.isInsured = response["IsInsured"];
apiResponse = GenericApiModel<PatientAppointmentShareResponseModel>( apiResponse = GenericApiModel<PatientAppointmentShareResponseModel>(
messageStatus: messageStatus, messageStatus: messageStatus,

@ -151,6 +151,8 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
{required int projectID, required int clinicID, required String appointmentNo, required bool isLiveCareAppointment}) async { {required int projectID, required int clinicID, required String appointmentNo, required bool isLiveCareAppointment}) async {
Map<String, dynamic> mapRequest = {"ProjectID": projectID, "ClinicID": clinicID, "AppointmentNo": appointmentNo, "IsActiveAppointment": true, "IsForLiveCare": isLiveCareAppointment}; Map<String, dynamic> mapRequest = {"ProjectID": projectID, "ClinicID": clinicID, "AppointmentNo": appointmentNo, "IsActiveAppointment": true, "IsForLiveCare": isLiveCareAppointment};
late PatientAppointmentShareResponseModel patientShareObj;
try { try {
GenericApiModel<PatientAppointmentShareResponseModel>? apiResponse; GenericApiModel<PatientAppointmentShareResponseModel>? apiResponse;
Failure? failure; Failure? failure;
@ -163,15 +165,20 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
final list = response['OnlineCheckInAppointments']; final list = response['OnlineCheckInAppointments'];
if (list == null || list.isEmpty) { patientShareObj = (list == null || list.isEmpty) ? PatientAppointmentShareResponseModel() : PatientAppointmentShareResponseModel.fromJson(list[0]);
throw Exception("patient share list is empty");
}
final patientShareObj = PatientAppointmentShareResponseModel.fromJson(list[0]);
patientShareObj.isCash = response["IsCash"]; patientShareObj.isCash = response["IsCash"];
patientShareObj.isEligible = response["IsEligible"]; patientShareObj.isEligible = response["IsEligible"];
patientShareObj.isInsured = response["IsInsured"]; patientShareObj.isInsured = response["IsInsured"];
// if (list == null || list.isEmpty) {
// throw Exception("patient share list is empty");
// }
// final patientShareObj = PatientAppointmentShareResponseModel.fromJson(list[0]);
// patientShareObj.isCash = response["IsCash"];
// patientShareObj.isEligible = response["IsEligible"];
// patientShareObj.isInsured = response["IsInsured"];
apiResponse = GenericApiModel<PatientAppointmentShareResponseModel>( apiResponse = GenericApiModel<PatientAppointmentShareResponseModel>(
messageStatus: messageStatus, messageStatus: messageStatus,
statusCode: statusCode, statusCode: statusCode,

@ -1787,12 +1787,6 @@ abstract class LocaleKeys {
static const selectBloodDonationCity = 'selectBloodDonationCity'; static const selectBloodDonationCity = 'selectBloodDonationCity';
static const selectBloodDonationGender = 'selectBloodDonationGender'; static const selectBloodDonationGender = 'selectBloodDonationGender';
static const selectBloodType = 'selectBloodType'; static const selectBloodType = 'selectBloodType';
static const startLiveChat = 'startLiveChat';
static const followUsOn = 'followUsOn';
static const followUsOnX = 'followUsOnX';
static const likeUsOnFB = 'likeUsOnFB';
static const watchUsOnYoutube = 'watchUsOnYoutube';
static const connectOnLinkedin = 'connectOnLinkedin';
static const networkErrorTitle = 'networkErrorTitle'; static const networkErrorTitle = 'networkErrorTitle';
static const networkErrorMessage = 'networkErrorMessage'; static const networkErrorMessage = 'networkErrorMessage';
static const networkConnectionReset = 'networkConnectionReset'; static const networkConnectionReset = 'networkConnectionReset';
@ -1801,5 +1795,11 @@ abstract class LocaleKeys {
static const networkErrorWhileFetching = 'networkErrorWhileFetching'; static const networkErrorWhileFetching = 'networkErrorWhileFetching';
static const networkPleaseCheckInternet = 'networkPleaseCheckInternet'; static const networkPleaseCheckInternet = 'networkPleaseCheckInternet';
static const networkServerErrorNoMessage = 'networkServerErrorNoMessage'; static const networkServerErrorNoMessage = 'networkServerErrorNoMessage';
static const startLiveChat = 'startLiveChat';
static const followUsOn = 'followUsOn';
static const followUsOnX = 'followUsOnX';
static const likeUsOnFB = 'likeUsOnFB';
static const watchUsOnYoutube = 'watchUsOnYoutube';
static const connectOnLinkedin = 'connectOnLinkedin';
} }

@ -262,7 +262,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.appointmentDetails.tr(context: context), title: LocaleKeys.appointmentDetails.tr(context: context),
report: AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel) report: AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel) || widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment! || widget.patientAppointmentHistoryResponseModel.isClinicReBookingAllowed! ==false || widget.patientAppointmentHistoryResponseModel.isActiveDoctor! == false
? () { ? () {
contactUsViewModel.setSelectedFeedbackType(FeedbackType(id: 1, nameEN: "Complaint for appointment", nameAR: 'شكوى على موعد')); contactUsViewModel.setSelectedFeedbackType(FeedbackType(id: 1, nameEN: "Complaint for appointment", nameAR: 'شكوى على موعد'));
contactUsViewModel.setPatientFeedbackSelectedAppointment(widget.patientAppointmentHistoryResponseModel); contactUsViewModel.setPatientFeedbackSelectedAppointment(widget.patientAppointmentHistoryResponseModel);

@ -281,9 +281,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol((myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare ?? 0).toString().toText16(isBold: true), AppColors.blackColor,
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true),
AppColors.blackColor,
13, 13,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
@ -293,8 +291,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
children: [ children: [
"VAT 15%".toText14(isBold: true, color: AppColors.greyTextColor), "VAT 15%".toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientTaxAmount! (myAppointmentsVM.patientAppointmentShareResponseModel!.patientTaxAmount ?? 0).toString()
.toString()
.toText14(isBold: true, color: AppColors.greyTextColor), .toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor, AppColors.greyTextColor,
13, 13,
@ -307,8 +304,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
children: [ children: [
"".toText14(isBold: true), "".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true), (myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax ?? 0).toString().toText24(isBold: true), AppColors.blackColor,
AppColors.blackColor,
17, 17,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],

@ -125,6 +125,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
backgroundColor: AppColors.bgRedLightColor, backgroundColor: AppColors.bgRedLightColor,
borderColor: AppColors.bgRedLightColor, borderColor: AppColors.bgRedLightColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
isDisabled: !Utils.havePrivilege(117),
padding: EdgeInsetsGeometry.symmetric(vertical: 0.h, horizontal: 20.h)), padding: EdgeInsetsGeometry.symmetric(vertical: 0.h, horizontal: 20.h)),
child: Padding( child: Padding(
padding: EdgeInsets.all(24.w), padding: EdgeInsets.all(24.w),

Loading…
Cancel
Save