Merge branch 'master' into dev_aamir

pull/273/head
aamir-csol 21 hours 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 {
Map<String, dynamic> mapRequest = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID};
late PatientAppointmentShareResponseModel patientShareObj;
try {
GenericApiModel<PatientAppointmentShareResponseModel>? apiResponse;
Failure? failure;
@ -1015,14 +1017,18 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final list = response['OnlineCheckInAppointmentsWalkInModel'];
if (list == null || list.isEmpty) {
throw Exception("patient share list is empty");
}
final patientShareObj = PatientAppointmentShareResponseModel.fromJson(list);
patientShareObj = (list == null || list.isEmpty) ? PatientAppointmentShareResponseModel() : PatientAppointmentShareResponseModel.fromJson(list);
patientShareObj.isCash = response["IsCash"];
patientShareObj.isEligible = response["IsEligible"];
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>(
messageStatus: messageStatus,

@ -151,6 +151,8 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
{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};
late PatientAppointmentShareResponseModel patientShareObj;
try {
GenericApiModel<PatientAppointmentShareResponseModel>? apiResponse;
Failure? failure;
@ -163,15 +165,20 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final list = response['OnlineCheckInAppointments'];
if (list == null || list.isEmpty) {
throw Exception("patient share list is empty");
}
final patientShareObj = PatientAppointmentShareResponseModel.fromJson(list[0]);
patientShareObj = (list == null || list.isEmpty) ? PatientAppointmentShareResponseModel() : PatientAppointmentShareResponseModel.fromJson(list[0]);
patientShareObj.isCash = response["IsCash"];
patientShareObj.isEligible = response["IsEligible"];
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>(
messageStatus: messageStatus,
statusCode: statusCode,

@ -1787,12 +1787,6 @@ abstract class LocaleKeys {
static const selectBloodDonationCity = 'selectBloodDonationCity';
static const selectBloodDonationGender = 'selectBloodDonationGender';
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 networkErrorMessage = 'networkErrorMessage';
static const networkConnectionReset = 'networkConnectionReset';
@ -1801,5 +1795,11 @@ abstract class LocaleKeys {
static const networkErrorWhileFetching = 'networkErrorWhileFetching';
static const networkPleaseCheckInternet = 'networkPleaseCheckInternet';
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(
child: CollapsingListView(
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.setPatientFeedbackSelectedAppointment(widget.patientAppointmentHistoryResponseModel);

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

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

Loading…
Cancel
Save