Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/res/layout/view_job_card.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
app:layout_constraintTop_toTopOf="parent" />

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:id="@+id/tv_job_discrepation"
android:id="@+id/tv_job_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
Expand All @@ -44,7 +44,7 @@
android:textColor="@color/connect_dark_blue_color"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_job_discrepation" />
app:layout_constraintTop_toBottomOf="@+id/tv_job_description" />


<org.commcare.views.connect.connecttextview.ConnectBoldTextView
Expand All @@ -55,7 +55,7 @@
android:textColor="@color/connect_grey"
android:textSize="12sp"
android:visibility="visible"
app:layout_constraintTop_toBottomOf="@+id/tv_job_discrepation"
app:layout_constraintTop_toBottomOf="@+id/tv_job_description"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />

Expand Down
6 changes: 3 additions & 3 deletions app/res/layout/view_progress_job_card.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
app:layout_constraintTop_toTopOf="parent" />

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:id="@+id/tv_job_discrepation"
android:id="@+id/tv_job_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
Expand All @@ -45,7 +45,7 @@
android:textColor="@color/connect_dark_blue_color"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_job_discrepation" />
app:layout_constraintTop_toBottomOf="@+id/tv_job_description" />

<org.commcare.views.connect.connecttextview.ConnectBoldTextView
android:id="@+id/tvDailyVisitTitle"
Expand All @@ -55,7 +55,7 @@
android:textColor="@color/connect_grey"
android:textSize="12sp"
android:visibility="visible"
app:layout_constraintTop_toBottomOf="@+id/tv_job_discrepation"
app:layout_constraintTop_toBottomOf="@+id/tv_job_description"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />

Expand Down
4 changes: 4 additions & 0 deletions app/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@
<string name="connect_results_summary_all">Todos</string>
<string name="connect_results_summary_remaining">Restante</string>
<string name="connect_results_summary_remaining_days">%d em %d dias</string>
<string name="connect_results_summary_remaining_tomorrow">%d até Amanhã</string>
<string name="connect_results_summary_remaining_today">%d até Hoje</string>
<string name="connect_results_summary_visits_done">Todas as Visitas Realizadas</string>
<string name="connect_results_summary_days_over">Dias Acima</string>
<string name="connect_results_payment_confirm">Confirmar</string>
<string name="connect_results_payment_confirm_undo">Desfazer confirmação</string>
<string name="connect_results_payment_confirmed">Confirmado</string>
Expand Down
4 changes: 4 additions & 0 deletions app/res/values-sw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,10 @@
<string name="connect_results_summary_approved">Imeidhinishwa</string>
<string name="connect_results_summary_remaining">Iliyosalia</string>
<string name="connect_results_summary_remaining_days">%d ndani ya siku %d</string>
<string name="connect_results_summary_remaining_tomorrow">%d hadi Kesho</string>
<string name="connect_results_summary_remaining_today">%d ifikapo Leo</string>
<string name="connect_results_summary_visits_done">Ziara Zote Zimefanywa</string>
<string name="connect_results_summary_days_over">Siku Zimeisha</string>
<string name="back">Nyuma</string>
<string name="recover">Pata nafuu</string>
<string name="connect_job_info_per_visit">kwa ziara</string>
Expand Down
4 changes: 4 additions & 0 deletions app/res/values-ti/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@
<string name="connect_results_summary_all">ኩሎም</string>
<string name="connect_results_summary_remaining">ዝተረፈ</string>
<string name="connect_results_summary_remaining_days">%d ኣብ ውሽጢ %d መዓልቲ</string>
<string name="connect_results_summary_remaining_tomorrow">%d ብ ጽባሕ</string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you leave me speechless!

<string name="connect_results_summary_remaining_today">%d ብ ሎሚ</string>
<string name="connect_results_summary_visits_done">ኩሉ ዝተገብረ ምብጻሕ</string>
<string name="connect_results_summary_days_over">መዓልታት ተወዲኡ</string>
<string name="connect_results_payment_confirm">ኣረጋግፅ</string>
<string name="connect_results_payment_confirm_undo">ምርፅጋፅ መልስ</string>
<string name="connect_results_payment_confirmed">ተረጋጊፁ</string>
Expand Down
4 changes: 4 additions & 0 deletions app/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@
<string name="connect_results_summary_earned">Earned</string>
<string name="connect_results_summary_remaining">Remaining</string>
<string name="connect_results_summary_remaining_days">%d in %d days</string>
<string name="connect_results_summary_remaining_tomorrow">%d by tomorrow</string>
<string name="connect_results_summary_remaining_today">%d by today</string>
<string name="connect_results_summary_visits_done">All Visits Done</string>
<string name="connect_results_summary_days_over">Days Over</string>

<string name="connect_results_summary_transferred">Transferred</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ private void updateJobTileDetails() {
if (show) {
ConnectBoldTextView tvJobTitle = viewJobCard.findViewById(R.id.tv_job_title);
ConnectMediumTextView tvViewMore = viewJobCard.findViewById(R.id.tv_view_more);
ConnectMediumTextView tvJobDiscrepation = viewJobCard.findViewById(R.id.tv_job_discrepation);
ConnectMediumTextView tvJobDescription = viewJobCard.findViewById(R.id.tv_job_description);
ConnectBoldTextView hoursTitle = viewJobCard.findViewById(R.id.tvDailyVisitTitle);
ConnectBoldTextView tv_job_time = viewJobCard.findViewById(R.id.tv_job_time);
ConnectRegularTextView connectJobEndDate = viewJobCard.findViewById(R.id.connect_job_end_date);

tvJobTitle.setText(job.getTitle());
tvViewMore.setVisibility(View.GONE);
tvJobDiscrepation.setText(job.getDescription());
tvJobDescription.setText(job.getDescription());
connectJobEndDate.setText(activity.getString(R.string.connect_learn_complete_by, ConnectManager.formatDate(job.getProjectEndDate())));

String workingHours = job.getWorkingHours();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,26 @@ public void onBindViewHolder(@NonNull ProgressBarViewHolder holder, int position
holder.binding.tvDeliveryTitle.setText(String.valueOf(connectDeliveryDetails.getDeliveryName()));
holder.binding.tvApproved.setText(String.valueOf(connectDeliveryDetails.getApprovedCount()));
holder.binding.tvDeliveryTotalAmount.setText(String.valueOf(connectDeliveryDetails.getTotalAmount()));
String remaining = context.getString(R.string.connect_results_summary_remaining_days,
connectDeliveryDetails.getPendingCount(), connectDeliveryDetails.getRemainingDays());

int pending = connectDeliveryDetails.getPendingCount();
String remaining;
if(pending > 0) {
remaining = switch ((int) connectDeliveryDetails.getRemainingDays()) {
case 0 ->
context.getString(R.string.connect_results_summary_days_over);
case 1 ->
context.getString(R.string.connect_results_summary_remaining_today, pending);
case 2 ->
context.getString(R.string.connect_results_summary_remaining_tomorrow, pending);
default ->
context.getString(R.string.connect_results_summary_remaining_days,
pending, connectDeliveryDetails.getRemainingDays());
};
} else {
remaining = context.getString(R.string.connect_results_summary_visits_done);
}
holder.binding.tvRemaining.setText(remaining);

holder.binding.rootView.setOnClickListener(view -> {
deliveryItemOnClickListener.onClick(connectDeliveryDetails.getDeliveryName());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.commcare.android.database.connect.models.ConnectJobRecord;
import org.commcare.android.database.connect.models.ConnectPaymentUnitRecord;
import org.commcare.connect.ConnectManager;
import org.commcare.connect.network.ConnectNetworkHelper;
import org.commcare.dalvik.R;
import org.commcare.google.services.analytics.FirebaseAnalyticsUtil;
import org.commcare.utils.ConnectivityStatus;
Expand All @@ -52,7 +51,7 @@ public class ConnectDeliveryProgressFragment extends Fragment {
private TextView updateText;

private CardView paymentAlertTile;
private ConnectRegularTextView paymentAlertText;
private TextView paymentAlertText;
private ConnectJobPaymentRecord paymentToConfirm = null;
private String tabPosition = "";
boolean isTabChange = false;
Expand Down Expand Up @@ -201,15 +200,15 @@ private void jobCardDataHandle(View view, ConnectJobRecord job) {
ConnectBoldTextView tvJobTitle = viewJobCard.findViewById(R.id.tv_job_title);
ConnectBoldTextView hoursTitle = viewJobCard.findViewById(R.id.tvDailyVisitTitle);
ConnectBoldTextView tv_job_time = viewJobCard.findViewById(R.id.tv_job_time);
ConnectMediumTextView tvJobDiscrepation = viewJobCard.findViewById(R.id.tv_job_discrepation);
ConnectMediumTextView tvJobDescription = viewJobCard.findViewById(R.id.tv_job_description);
ConnectRegularTextView connectJobEndDate = viewJobCard.findViewById(R.id.connect_job_end_date);

viewMore.setOnClickListener(view1 -> {
Navigation.findNavController(viewMore).navigate(ConnectDeliveryProgressFragmentDirections.actionConnectJobDeliveryProgressFragmentToConnectJobDetailBottomSheetDialogFragment());
});

tvJobTitle.setText(job.getTitle());
tvJobDiscrepation.setText(job.getDescription());
tvJobDescription.setText(job.getDescription());
connectJobEndDate.setText(getString(R.string.connect_learn_complete_by, ConnectManager.formatDate(job.getProjectEndDate())));

String workingHours = job.getWorkingHours();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ private void jobCardDataHandle(View view, ConnectJobRecord job) {
ConnectBoldTextView tvJobTitle = viewJobCard.findViewById(R.id.tv_job_title);
ConnectBoldTextView hoursTitle = viewJobCard.findViewById(R.id.tvDailyVisitTitle);
ConnectBoldTextView tv_job_time = viewJobCard.findViewById(R.id.tv_job_time);
ConnectMediumTextView tvJobDiscrepation = viewJobCard.findViewById(R.id.tv_job_discrepation);
ConnectMediumTextView tvJobDescription = viewJobCard.findViewById(R.id.tv_job_description);
ConnectRegularTextView connectJobEndDate = viewJobCard.findViewById(R.id.connect_job_end_date);

viewMore.setOnClickListener(view1 -> {
Navigation.findNavController(viewMore).navigate(ConnectJobIntroFragmentDirections.actionConnectJobIntroFragmentToConnectJobDetailBottomSheetDialogFragment());
});

tvJobTitle.setText(job.getTitle());
tvJobDiscrepation.setText(job.getDescription());
tvJobDescription.setText(job.getDescription());
connectJobEndDate.setText(getString(R.string.connect_learn_complete_by, ConnectManager.formatDate(job.getProjectEndDate())));

String workingHours = job.getWorkingHours();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@ private void jobCardDataHandle(View view, ConnectJobRecord job) {
ConnectBoldTextView tvJobTitle = viewJobCard.findViewById(R.id.tv_job_title);
ConnectBoldTextView hoursTitle = viewJobCard.findViewById(R.id.tvDailyVisitTitle);
ConnectBoldTextView tv_job_time = viewJobCard.findViewById(R.id.tv_job_time);
ConnectMediumTextView tvJobDiscrepation = viewJobCard.findViewById(R.id.tv_job_discrepation);
ConnectMediumTextView tvJobDescription = viewJobCard.findViewById(R.id.tv_job_description);
ConnectRegularTextView connectJobEndDate = viewJobCard.findViewById(R.id.connect_job_end_date);

viewMore.setVisibility(View.GONE);

tvJobTitle.setText(job.getTitle());
tvJobDiscrepation.setText(job.getDescription());
tvJobDescription.setText(job.getDescription());
connectJobEndDate.setText(getString(R.string.connect_learn_complete_by, ConnectManager.formatDate(job.getProjectEndDate())));

String workingHours = job.getWorkingHours();
Expand Down