From b429adc3f6b86b58eb397ceac7b86fa291060427 Mon Sep 17 00:00:00 2001 From: 14Sandee Date: Fri, 3 Nov 2023 20:32:46 +0530 Subject: [PATCH] . --- .idea/deploymentTargetDropDown.xml | 12 +++++++ .../ProfileProgressFragment.java | 36 +++++++++++-------- .../RegisterCompleteFragment.java | 2 +- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 03d9c98..e5eb84c 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -1,6 +1,18 @@ + + + + + + + + + + + + diff --git a/app/src/main/java/com/app/simplitend/patientprofile/ProfileProgressFragment.java b/app/src/main/java/com/app/simplitend/patientprofile/ProfileProgressFragment.java index 77aa11d..bc2a5a0 100644 --- a/app/src/main/java/com/app/simplitend/patientprofile/ProfileProgressFragment.java +++ b/app/src/main/java/com/app/simplitend/patientprofile/ProfileProgressFragment.java @@ -165,27 +165,33 @@ public class ProfileProgressFragment extends Fragment implements ProfileContract return; } - if (response.body().result.isCaregiverTakeSubscription == 1) { - // CG subscribed - try { - Intent intent = new Intent(requireActivity(), FUAActivity.class); - startActivity(intent); - } catch (Exception e) { - // do nothing - } - } else { - // no subscription alert - try { + if (response.body().result.isCareGiverConnectedWithPatient == 1) { + if (response.body().result.isCaregiverTakeSubscription == 1){ + try { + Intent intent = new Intent(requireActivity(), FUAActivity.class); + startActivity(intent); + } catch (Exception e) { + // do nothing + } + }else{ AppUtil.showAlert(requireContext(), - "Caregiver registration", - "You can set up this feature after caregiver registration is complete", + "Kindly ask Caregiver to subscribe", + "Once your caregiver has completed the " + + "subscription, you will be able to eet up this " + + "feature.", "OK", ((dialogInterface, i) -> { }), null, null); - }catch (Exception e){ - // do nothing } + } else { + AppUtil.showAlert(requireContext(), + "Kindly ask Caregiver to complete registration", + "You can set up this feature after caregiver registration is complete", + "OK", + ((dialogInterface, i) -> { + + }), null, null); } } else { onProfileProgressFetchFailed(new Exception(), "Please try again later."); diff --git a/app/src/main/java/com/app/simplitend/patientprofile/RegisterCompleteFragment.java b/app/src/main/java/com/app/simplitend/patientprofile/RegisterCompleteFragment.java index a006eb1..e713cc7 100644 --- a/app/src/main/java/com/app/simplitend/patientprofile/RegisterCompleteFragment.java +++ b/app/src/main/java/com/app/simplitend/patientprofile/RegisterCompleteFragment.java @@ -177,7 +177,7 @@ public class RegisterCompleteFragment extends Fragment implements ProfileContrac gotoPatientDashBoard(); }else{ AppUtil.showAlert(requireContext(), - "Kindly ask Caregiver to buy SimpliTend subscription.", + "Kindly ask Caregiver to subscribe", "Once your caregiver has completed the " + "subscription, you will be able to use the " + "application.",