.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.ssb.simplitend.patientprofile;
|
||||
|
||||
import static com.ssb.simplitend.patientprofile.RegisterCompleteFragment.PROFILE_PROGRESS;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -30,6 +32,8 @@ public class ProfileProgressFragment extends Fragment implements ProfileContract
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
int profile_progress;
|
||||
|
||||
public ProfileProgressFragment() {
|
||||
// required empty const.
|
||||
}
|
||||
@@ -100,30 +104,43 @@ public class ProfileProgressFragment extends Fragment implements ProfileContract
|
||||
);
|
||||
|
||||
binding.proceed.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_profileProgressFragment_to_registerCompleteFragment);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(PROFILE_PROGRESS, profile_progress);
|
||||
|
||||
Navigation.findNavController(v).navigate(R.id.action_profileProgressFragment_to_registerCompleteFragment, bundle);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProfileProgressFetched(@NonNull PatientData patientData) {
|
||||
|
||||
profile_progress = 0;
|
||||
|
||||
if (patientData.isCareGiverLink == 1) {
|
||||
// TODO: 25-07-2023 look into this
|
||||
profile_progress++;
|
||||
}
|
||||
|
||||
if (patientData.isPatientReminderData == 1) {
|
||||
profile_progress++;
|
||||
|
||||
binding.medReminderImg.setImageResource(0);
|
||||
binding.medReminderImg.setBackgroundResource(R.drawable.ic_done);
|
||||
binding.medReminderImg.setPaddingRelative(15, 15, 15, 15);
|
||||
}
|
||||
|
||||
if (patientData.isPatientMedicalData == 1) {
|
||||
profile_progress++;
|
||||
|
||||
binding.medInfoImg.setImageResource(0);
|
||||
binding.medInfoImg.setBackgroundResource(R.drawable.ic_done);
|
||||
binding.medInfoImg.setPadding(15, 15, 15, 15);
|
||||
}
|
||||
|
||||
if (patientData.isPatientRoutineData == 1) {
|
||||
profile_progress++;
|
||||
|
||||
binding.setupRoutineImg.setImageResource(0);
|
||||
binding.setupRoutineImg.setBackgroundResource(R.drawable.ic_done);
|
||||
binding.setupRoutineImg.setPadding(15, 15, 15, 15);
|
||||
|
||||
Reference in New Issue
Block a user