merge-update-with-lab-changes
Sultan khan 2 years ago
parent 8bdcfcb764
commit 432e64e51d

@ -159,11 +159,11 @@ class BaseAppClient {
body!.removeWhere((key, value) => key == null || value == null); body!.removeWhere((key, value) => key == null || value == null);
if (AppGlobal.isNetworkDebugEnabled) { // if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);
} // }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -53,8 +53,8 @@ class _BookSuccessState extends State<BookSuccess> {
// AuthenticatedUser authUser; // AuthenticatedUser authUser;
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
String selectedPaymentMethod = ""; String? selectedPaymentMethod = "";
String selectedInstallments = ""; String? selectedInstallments = "";
String? tamaraPaymentStatus; String? tamaraPaymentStatus;
String? tamaraOrderID; String? tamaraOrderID;
@ -600,7 +600,7 @@ class _BookSuccessState extends State<BookSuccess> {
}); });
} }
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { openPayment(List<String?> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
selectedPaymentMethod = paymentMethod[0]; selectedPaymentMethod = paymentMethod[0];
selectedInstallments = paymentMethod[1]; selectedInstallments = paymentMethod[1];
@ -610,7 +610,7 @@ class _BookSuccessState extends State<BookSuccess> {
Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!),
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress!, authenticatedUser.emailAddress!,
paymentMethod[0], paymentMethod[0]!,
authenticatedUser.patientType, authenticatedUser.patientType,
authenticatedUser.firstName!, authenticatedUser.firstName!,
authenticatedUser.patientID, authenticatedUser.patientID,
@ -682,10 +682,10 @@ class _BookSuccessState extends State<BookSuccess> {
service.getTamaraPaymentStatus(orderID).then((res) { service.getTamaraPaymentStatus(orderID).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["status"].toString().toLowerCase() == "success") { if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(selectedInstallments), appo); updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(selectedInstallments!), appo);
} else { } else {
updateTamaraRequestStatus( updateTamaraRequestStatus(
"Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", int.parse(selectedInstallments), appo); "Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", int.parse(selectedInstallments!), appo);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -998,7 +998,7 @@ class _BookSuccessState extends State<BookSuccess> {
appointment.doctorTitle = "Dr. "; appointment.doctorTitle = "Dr. ";
appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj; appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj;
appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL; appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL;
appointment.doctorSpeciality = widget.patientShareResponse.doctorSpeciality as List<String>; appointment.doctorSpeciality = (widget.patientShareResponse.doctorSpeciality != null) ? widget.patientShareResponse.doctorSpeciality as List<String> : [""];
appointment.projectName = widget.patientShareResponse.projectName; appointment.projectName = widget.patientShareResponse.projectName;
appointment.projectID = widget.patientShareResponse.projectID; appointment.projectID = widget.patientShareResponse.projectID;
appointment.appointmentDate = widget.patientShareResponse.appointmentDate; appointment.appointmentDate = widget.patientShareResponse.appointmentDate;

@ -188,6 +188,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
backgroundColor: CustomColors.green, backgroundColor: CustomColors.green,
elevation: 0, elevation: 0,
onPressed: () async { onPressed: () async {
print(widget.patientShareResponse);
print(widget.patientShareResponse.appointmentNo); print(widget.patientShareResponse.appointmentNo);
showReminderDialog( showReminderDialog(
context, context,
@ -200,6 +201,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
navigateToBookSuccess(context); navigateToBookSuccess(context);
}, },
title: ""
); );
projectViewModel.analytics.appointment.appointment_reminder(true); projectViewModel.analytics.appointment.appointment_reminder(true);
}, },

@ -92,7 +92,7 @@ class DoctorView extends StatelessWidget {
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date)), // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date)),
Text( Text(
doctor.date != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date )) : DateTime.now().toString(), doctor.date != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date )) : DateUtil.getDayMonthYearDateFormatted(DateTime.now()).toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
) , ) ,
@ -140,7 +140,7 @@ class DoctorView extends StatelessWidget {
itemSize: 20, itemSize: 20,
ignoreGestures: true, ignoreGestures: true,
ratingWidget: RatingWidget( ratingWidget: RatingWidget(
full: Icon(Icons.star), full: Icon(Icons.star, ),
half: Icon(Icons.star_half), half: Icon(Icons.star_half),
empty: Icon(Icons.star), empty: Icon(Icons.star),
), ),

@ -24,19 +24,20 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S
if (Platform.isAndroid) { if (Platform.isAndroid) {
if (await PermissionService.isCalendarPermissionEnabled()) { if (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!); onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? (int){});
} else { } else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async { Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async {
if (await Permission.calendar.request().isGranted) { if (await Permission.calendar.request().isGranted) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!); onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? (int){});
} }
}); });
} }
} else { } else {
if (await Permission.calendar.request().isGranted) { if (await Permission.calendar.request().isGranted) {
print(await Permission.calendar.request().isGranted);
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title!, description: description!, onMultiDateSuccess: onMultiDateSuccess!); onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? (int){});
} }
} }
} }

@ -1296,8 +1296,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
patientShare: widget.patientShareResponse.patientShareWithTax))) patientShare: widget.patientShareResponse.patientShareWithTax)))
.then((value) { .then((value) {
print(value); print(value);
selectedPaymentMethod = value[0]; selectedPaymentMethod = value[0] ?? "";
selectedInstallments = value[1]; selectedInstallments = value[1] ?? "";
getPatientAppointmentHistory(); getPatientAppointmentHistory();
if (value != null) { if (value != null) {

@ -526,7 +526,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
selectedInstallmentPlan = tamaraInstallmentDetails!.supportedInstalments![0].instalments.toString(); selectedInstallmentPlan = tamaraInstallmentDetails!.supportedInstalments![0].instalments.toString();
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
setState(() {}); setState(() {});
} as FutureOr Function(Map value)).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}); });

@ -1577,9 +1577,10 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getTamaraPaymentDetails(BuildContext context) async { Future<Map<String,dynamic>> getTamaraPaymentDetails(BuildContext context) async {
dynamic localRes; dynamic localRes;
await baseAppClient.get(GET_TAMARA_PLAN, isExternal: true, onSuccess: (response, statusCode) async { await baseAppClient.get(GET_TAMARA_PLAN, isExternal: true, onSuccess: (response, statusCode) async {
print(response);
localRes = response[0]; localRes = response[0];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;

@ -107,7 +107,7 @@ class DoctorHeader extends StatelessWidget {
if (headerModel.nationalityFlagURL != null) if (headerModel.nationalityFlagURL != null)
Padding( Padding(
padding: const EdgeInsets.only(top: 8.0), padding: const EdgeInsets.only(top: 8.0),
child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null ? Image.network(headerModel.nationalityFlagURL, height: 20) : SizedBox(), child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null && headerModel.nationalityFlagURL != 'null'? Image.network(headerModel.nationalityFlagURL, height: 20) : SizedBox(),
), ),
], ],
) )

@ -34,7 +34,7 @@ class NfcLayout extends StatefulWidget {
class _NfcLayoutState extends State<NfcLayout> { class _NfcLayoutState extends State<NfcLayout> {
bool _reading = false; bool _reading = false;
late Widget mainWidget; Widget? mainWidget;
late String nfcId; late String nfcId;
@override @override

Loading…
Cancel
Save