diff --git a/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart b/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart index 2ba7b174..873c2858 100644 --- a/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart +++ b/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart @@ -58,7 +58,7 @@ class InterventionHistoryBottomSheet extends StatelessWidget { model.updateInterventionDiseaseStatus( isAccepted: true, interventionID: interventionList[index].interventionId.toString(), - successMessage: TranslationBase.of(context).interventionRejectedSuccessfully, + successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully, errorMessage: TranslationBase.of(context).unableToPerformTheAction ); Navigator.pop(context); @@ -66,7 +66,7 @@ class InterventionHistoryBottomSheet extends StatelessWidget { onRejectClick: (intervention) { model.updateInterventionDiseaseStatus( interventionID: interventionList[index].interventionId.toString(), - successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully, + successMessage: TranslationBase.of(context).interventionRejectedSuccessfully, errorMessage: TranslationBase.of(context).unableToPerformTheAction ); Navigator.pop(context); diff --git a/lib/utils/exception_report.dart b/lib/utils/exception_report.dart index cc349638..9333700f 100644 --- a/lib/utils/exception_report.dart +++ b/lib/utils/exception_report.dart @@ -37,7 +37,6 @@ void postFailureResponse({ // await collectionRef.doc(DateTime.now().toIso8601String()).set(data); } - void postRequestAndResponse({ required dynamic doctorId, required String completeUrl, @@ -46,9 +45,10 @@ void postRequestAndResponse({ required String response, required String statusCode, }) async { - if(!monitoredEndpoints.contains(urlSuffix)) { + if (!monitoredEndpoints.contains(urlSuffix)) { return; } + // print(" the url is being logged "); // Map data = { // "url" : completeUrl, @@ -59,8 +59,23 @@ void postRequestAndResponse({ // final firestore = FirebaseFirestore.instance; // // Sanitize urlSuffix to be Firestore-safe // final safeSuffix = urlSuffix.replaceAll(RegExp(r'[^a-zA-Z0-9_-]'), '_'); + + print(" the url is being logged "); + Map data = { + "url": completeUrl, + "request": request, + "response": response, + "statusCode": statusCode, + }; + // final firestore = FirebaseFirestore.instance; + // Sanitize urlSuffix to be Firestore-safe + final safeSuffix = urlSuffix.replaceAll(RegExp(r'[^a-zA-Z0-9_-]'), '_'); + // final collectionRef = firestore.collection('doctors') // .doc(doctorId.toString()) // .collection(safeSuffix); // await collectionRef.doc(DateTime.now().toIso8601String()).set(data); -} \ No newline at end of file + +} + +