used by BOTH the flat Adjustments view and (later) the grouped view.
- Context:
- - `adj` — a PayrollAdjustment instance
- - `additive_types` — list of type labels that are additive (used to decide
- whether the amount should be prefixed with + or - in the display)
- Row actions differ based on whether the adjustment has already been paid:
- - Paid -> single [View Payslip] icon button
- - Unpaid -> three buttons: [Preview][Edit][x]
- (these reuse the existing modals on the dashboard — no new JS)
-#}
+{# === _adjustment_row.html — row partial for the Adjustments tab === #}
+{% comment %}
+Single table row used by BOTH the flat Adjustments view and (later) the grouped view.
+Context:
+ - adj a PayrollAdjustment instance
+ - additive_types list of type labels that are additive (used to decide
+ whether the amount should be prefixed with + or - in the display)
+Row actions differ by paid status:
+ - Paid -> single View Payslip icon button
+ - Unpaid -> three buttons: Preview, Edit, Delete
+ (these reuse the existing modals on the dashboard -- no new JS)
+{% endcomment %}
{% load format_tags %}
@@ -95,9 +96,8 @@
{% else %}
- {# UNPAID: preview + edit + delete #}
- {# Preview button — class .preview-payslip-btn is already wired up in the
- main dashboard JS (opens the preview modal for this worker). #}
+ {# UNPAID row: Preview (reuses .preview-payslip-btn handler), #}
+ {# Edit (reuses .adjustment-badge handler), Delete (opens #deleteConfirmModal). #}
- {# Edit button — class .adjustment-badge is already wired up in the
- main dashboard JS (populates + opens #editAdjustmentModal). We reuse
- it here so no new JS is needed for editing. #}
- {# Delete button — opens the existing #deleteConfirmModal directly
- (short-circuits the edit modal's usual two-step flow). #}