diff --git a/app/modules/partner_dashboard/templates/partner_dashboard/partner_review_workspace.html b/app/modules/partner_dashboard/templates/partner_dashboard/partner_review_workspace.html index 6b664ee..0f5cc0c 100644 --- a/app/modules/partner_dashboard/templates/partner_dashboard/partner_review_workspace.html +++ b/app/modules/partner_dashboard/templates/partner_dashboard/partner_review_workspace.html @@ -19,6 +19,7 @@
+ ← Back to Review Board Final Documents / UDIN Close Workspace
diff --git a/app/modules/partners/templates/partners/review_board.html b/app/modules/partners/templates/partners/review_board.html index 6e60669..7a0fe38 100644 --- a/app/modules/partners/templates/partners/review_board.html +++ b/app/modules/partners/templates/partners/review_board.html @@ -2,6 +2,136 @@ {% block content %} {% include "modules/partners/templates/partners/_partner_tabs.html" %} +{% macro engagement_row(task, column, payload) %} + {% set stats = namespace(total=0, completed=0, blocked=0, review=0, rework=0, overdue=false, assignees=[]) %} + {% for stat_column in payload.columns %} + {% for item in stat_column.tasks %} + {% if item.subscription_id == task.subscription_id %} + {% set stats.total = stats.total + 1 %} + {% if (item.status or '')|lower in ['completed', 'not_applicable', 'cancelled'] %} + {% set stats.completed = stats.completed + 1 %} + {% endif %} + {% if (item.status or '')|lower == 'blocked' %} + {% set stats.blocked = stats.blocked + 1 %} + {% endif %} + {% if stat_column.code == 'pending_review' %} + {% set stats.review = stats.review + 1 %} + {% endif %} + {% if stat_column.code == 'rework_sent' %} + {% set stats.rework = stats.rework + 1 %} + {% endif %} + {% if item.is_overdue %} + {% set stats.overdue = true %} + {% endif %} + {% if item.assignee_display and item.assignee_display not in stats.assignees %} + {% set _ = stats.assignees.append(item.assignee_display) %} + {% endif %} + {% endif %} + {% endfor %} + {% endfor %} + + + + {{ task.client_display }} +
{{ task.engagement_label }}
+
Engagement #{{ task.subscription_id }}
+ + + {% if column.code == 'pending_review' %} + Pending Review + {% elif column.code == 'clarification_required' %} + Clarification Required + {% elif column.code == 'rework_sent' %} + Rework Sent + {% elif column.code == 'approved' %} + In Progress + {% else %} + Completed + {% endif %} + {% if stats.overdue %} +
Overdue item
+ {% endif %} + + +
{{ stats.completed }} / {{ stats.total }}
+
closed task{{ '' if stats.completed == 1 else 's' }} / visible task{{ '' if stats.total == 1 else 's' }}
+ + +
+ {% if stats.review %}{{ stats.review }} review{% endif %} + {% if stats.blocked %}{{ stats.blocked }} blocked{% endif %} + {% if stats.rework %}{{ stats.rework }} rework{% endif %} + {% if not stats.review and not stats.blocked and not stats.rework %}No review exception{% endif %} +
+ + + {% for assignee in stats.assignees[:3] %} +
{{ assignee }}
+ {% endfor %} + {% if stats.assignees|length > 3 %} +
+{{ stats.assignees|length - 3 }} more
+ {% endif %} + {% if not stats.assignees %}Unassigned{% endif %} + + +
{{ task.priority_label }}
+
{% if task.internal_target_date %}Target {{ task.internal_target_date }}{% else %}No task target{% endif %}
+ + + Open Review + + +{% endmacro %} + +{% macro panel(title, subtitle, ids, payload, tone) %} +
+
+
+

{{ title }}

+

{{ subtitle }}

+
+ {% if tone == 'review' %} + {{ ids|length }} engagement{{ '' if ids|length == 1 else 's' }} + {% elif tone == 'progress' %} + {{ ids|length }} engagement{{ '' if ids|length == 1 else 's' }} + {% else %} + {{ ids|length }} engagement{{ '' if ids|length == 1 else 's' }} + {% endif %} +
+
+ + + + + + + + + + + + + + {% set rendered = namespace(seen=[]) %} + {% for column in payload.columns %} + {% for task in column.tasks %} + {% if task.subscription_id and task.subscription_id in ids and task.subscription_id not in rendered.seen %} + {% set _ = rendered.seen.append(task.subscription_id) %} + {{ engagement_row(task, column, payload) }} + {% endif %} + {% endfor %} + {% endfor %} + {% if rendered.seen|length == 0 %} + + + + {% endif %} + +
Client / EngagementStatusTask ProgressReview ItemsAssigned TeamPriority / TargetAction
No engagements in this section.
+
+
+{% endmacro %} +
@@ -14,7 +144,6 @@
- {# Build engagement-level counts without changing the existing backend payload. #} {% set metrics = namespace(pending_review=[], clarification_required=[], rework_sent=[], approved=[], completed=[]) %} {% for column in payload.columns %} {% for task in column.tasks %} @@ -62,117 +191,61 @@
-
-
- - - - - - - - - - - - - - {% set board = namespace(seen=[]) %} - {% for column in payload.columns %} - {% for task in column.tasks %} - {% if task.subscription_id and task.subscription_id not in board.seen %} - {% set _ = board.seen.append(task.subscription_id) %} - {% set stats = namespace(total=0, completed=0, blocked=0, review=0, rework=0, overdue=false, assignees=[]) %} - {% for stat_column in payload.columns %} - {% for item in stat_column.tasks %} - {% if item.subscription_id == task.subscription_id %} - {% set stats.total = stats.total + 1 %} - {% if (item.status or '')|lower in ['completed', 'not_applicable', 'cancelled'] %} - {% set stats.completed = stats.completed + 1 %} - {% endif %} - {% if (item.status or '')|lower == 'blocked' %} - {% set stats.blocked = stats.blocked + 1 %} - {% endif %} - {% if stat_column.code == 'pending_review' %} - {% set stats.review = stats.review + 1 %} - {% endif %} - {% if stat_column.code == 'rework_sent' %} - {% set stats.rework = stats.rework + 1 %} - {% endif %} - {% if item.is_overdue %} - {% set stats.overdue = true %} - {% endif %} - {% if item.assignee_display and item.assignee_display not in stats.assignees %} - {% set _ = stats.assignees.append(item.assignee_display) %} - {% endif %} - {% endif %} - {% endfor %} - {% endfor %} + {# Each engagement appears in exactly one panel: review first, then in progress, then completed. #} + {% set groups = namespace(review=[], progress=[], completed=[]) %} + {% for column in payload.columns %} + {% if column.code in ['pending_review', 'clarification_required', 'rework_sent'] %} + {% for task in column.tasks %} + {% if task.subscription_id and task.subscription_id not in groups.review %} + {% set _ = groups.review.append(task.subscription_id) %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} - - - - - - - - - - {% endif %} - {% endfor %} - {% endfor %} + {% for column in payload.columns %} + {% if column.code == 'approved' %} + {% for task in column.tasks %} + {% if task.subscription_id and task.subscription_id not in groups.review and task.subscription_id not in groups.progress %} + {% set _ = groups.progress.append(task.subscription_id) %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} - {% if board.seen|length == 0 %} - - - - {% endif %} - -
Client / EngagementStatusTask ProgressReview ItemsAssigned TeamPriority / TargetAction
- {{ task.client_display }} -
{{ task.engagement_label }}
-
Engagement #{{ task.subscription_id }}
-
- {% if column.code == 'pending_review' %} - Pending Review - {% elif column.code == 'clarification_required' %} - Clarification Required - {% elif column.code == 'rework_sent' %} - Rework Sent - {% elif column.code == 'approved' %} - In Progress - {% else %} - Completed - {% endif %} - {% if stats.overdue %} -
Overdue item
- {% endif %} -
-
{{ stats.completed }} / {{ stats.total }}
-
closed task{{ '' if stats.completed == 1 else 's' }} / visible task{{ '' if stats.total == 1 else 's' }}
-
-
- {% if stats.review %}{{ stats.review }} review{% endif %} - {% if stats.blocked %}{{ stats.blocked }} blocked{% endif %} - {% if stats.rework %}{{ stats.rework }} rework{% endif %} - {% if not stats.review and not stats.blocked and not stats.rework %}No review exception{% endif %} -
-
- {% for assignee in stats.assignees[:3] %} -
{{ assignee }}
- {% endfor %} - {% if stats.assignees|length > 3 %} -
+{{ stats.assignees|length - 3 }} more
- {% endif %} - {% if not stats.assignees %}Unassigned{% endif %} -
-
{{ task.priority_label }}
-
{% if task.internal_target_date %}Target {{ task.internal_target_date }}{% else %}No task target{% endif %}
-
- Open Review -
No engagement review items found.
-
-
+ {% for column in payload.columns %} + {% if column.code == 'completed' %} + {% for task in column.tasks %} + {% if task.subscription_id and task.subscription_id not in groups.review and task.subscription_id not in groups.progress and task.subscription_id not in groups.completed %} + {% set _ = groups.completed.append(task.subscription_id) %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} + + {{ panel( + 'Review Required', + 'Pending review, clarification-required and rework engagements are shown first.', + groups.review, + payload, + 'review' + ) }} + + {{ panel( + 'In Progress', + 'Engagements currently moving with the team and not presently waiting in the review queue.', + groups.progress, + payload, + 'progress' + ) }} + + {{ panel( + 'Completed', + 'Completed engagement rows remain available separately for review history and reference.', + groups.completed, + payload, + 'completed' + ) }}
Review remains task-level inside the engagement. This board only groups the existing task records into one engagement row for easier partner navigation.