From 7fc47ebf341f6aaa6b8f61ba8c676799e09fa7d6 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 14 Feb 2024 15:11:46 +0300 Subject: [PATCH] LiveCare invoice fix --- lib/config/config.dart | 4 ++-- lib/pages/livecare/widgets/LiveCareHistoryCard.dart | 3 ++- lib/services/livecare_services/livecare_provider.dart | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 8e5bdc7b..4386f96f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; -var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; diff --git a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart index cf89b766..dac84e89 100644 --- a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart +++ b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart @@ -237,9 +237,10 @@ class _LiveCareHistoryCardState extends State { } sendInvoiceEmail(context) { + int languageID = projectViewModel.isArabic ? 1 : 2; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.projectID, authUser.emailAddress, context).then((res) { + service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.projectID, authUser.emailAddress, languageID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully); }).catchError((err) { diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index 25df930d..a01ef107 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -289,13 +289,13 @@ class LiveCareService extends BaseService { return Future.value(localRes); } - Future sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, BuildContext context) async { + Future sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, int languageID, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); authUser = data; } - request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo}; + request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo, "LanguageID": languageID}; dynamic localRes; await baseAppClient.post(SEND_LIVECARE_INVOICE_EMAIL, onSuccess: (response, statusCode) async { localRes = response;