Skip to content

Commit ebf2339

Browse files
committed
fix(console): move portal CTA from customer to merchant dashboard
1 parent 75e6a75 commit ebf2339

3 files changed

Lines changed: 20 additions & 16 deletions

File tree

templates/console/customer_dashboard.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,5 @@
66

77
{% block content %}
88
{% include "partials/_console_hero_shell.html" with kicker="Customer Console" heading="Track the most recent return activity in one customer-facing shell." lead="This console keeps a customer’s own return cases visible inside the branded ReturnHub frame, with status changes, evidence, and case detail kept easy to review." trust_aria_label="Customer console signals" trust_items=customer_trust_items visual_aria_label="Customer return summary" visual_window_title="Customer cases" visual_list_label="Recent activity" visual_case_meta_items=customer_visual_case_meta_items visual_empty_title="No cases yet" visual_empty_status="Waiting" visual_empty_body="No cases are associated with this customer yet." timeline_label="What comes next" timeline_items=customer_timeline_items recent_cases=recent_cases %}
9-
<section class="rh-band rh-band--workflow mb-4">
10-
<div class="rh-section-heading rh-queue-shell__heading">
11-
<div>
12-
<div class="rh-kicker">Customer portal</div>
13-
<h2>Open your linked return cases and evidence workspace.</h2>
14-
<p>Use the portal to view only this customer’s cases, open a case, and upload supporting evidence.</p>
15-
</div>
16-
<a class="btn btn-primary rh-btn-primary" href="{% url 'customer_portal:case_list' %}">
17-
View my cases
18-
</a>
19-
</div>
20-
</section>
219
{% include "partials/_console_recent_cases_section.html" with kicker="Recent cases" heading="Keep the customer’s own return history visible and easy to scan." recent_cases=recent_cases case_meta_items=customer_recent_case_meta_items empty_title="No customer cases yet" empty_body="This customer account does not have any linked return cases yet." case_detail_url_name="customer_portal:case_detail" %}
2210
{% endblock %}

templates/console/merchant_dashboard.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,17 @@
66

77
{% block content %}
88
{% include "partials/_console_hero_shell.html" with kicker="Merchant Console" heading="Review merchant-linked return cases in one operational workspace." lead="This merchant console keeps linked cases, response activity, and case context visible in the same ReturnHub frame used across the product." trust_aria_label="Merchant console signals" trust_items=merchant_trust_items visual_aria_label="Merchant case summary" visual_window_title="Merchant review" visual_list_label="Linked cases" visual_case_meta_items=merchant_visual_case_meta_items visual_empty_title="No linked cases" visual_empty_status="Idle" visual_empty_body="No cases are linked to this merchant yet." timeline_label="Merchant role" timeline_items=merchant_timeline_items recent_cases=recent_cases %}
9-
{% include "partials/_console_recent_cases_section.html" with kicker="Merchant-linked cases" heading="Keep merchant-linked return history visible and easy to review." recent_cases=recent_cases case_meta_items=merchant_recent_case_meta_items empty_title="No merchant-linked cases yet" empty_body="This merchant account does not have any linked return cases yet." %}
9+
<section class="rh-band rh-band--workflow mb-4">
10+
<div class="rh-section-heading rh-queue-shell__heading">
11+
<div>
12+
<div class="rh-kicker">Merchant portal</div>
13+
<h2>Open the merchant-linked case queue and response workspace.</h2>
14+
<p>Use the portal to review this merchant’s cases, open a case, and submit response evidence.</p>
15+
</div>
16+
<a class="btn btn-primary rh-btn-primary" href="{% url 'merchant_portal:case_list' %}">
17+
View merchant cases
18+
</a>
19+
</div>
20+
</section>
21+
{% include "partials/_console_recent_cases_section.html" with kicker="Merchant-linked cases" heading="Keep merchant-linked return history visible and easy to review." recent_cases=recent_cases case_meta_items=merchant_recent_case_meta_items empty_title="No merchant-linked cases yet" empty_body="This merchant account does not have any linked return cases yet." case_detail_url_name="merchant_portal:case_detail" %}
1022
{% endblock %}

tests/test_console_views.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,9 @@ def test_customer_console_renders_only_customer_cases(client) -> None:
114114
assert response.status_code == 200
115115
assert owned_case.order_reference in body
116116
assert "CUS-9999" not in body
117-
assert 'href="/customer/"' in body
118117
assert f'href="/customer/{owned_case.pk}/"' in body
119-
assert "View my cases" in body
120-
assert "only this customer" in body
118+
assert "View my cases" not in body
119+
assert "Customer portal" not in body
121120
assert "View all cases" not in body
122121
assert "full case list" not in body
123122
assert "Open case" in body
@@ -138,6 +137,11 @@ def test_merchant_console_renders_only_merchant_cases(client) -> None:
138137
assert response.status_code == 200
139138
assert owned_case.order_reference in body
140139
assert "MER-9999" not in body
140+
assert 'href="/merchant/"' in body
141+
assert f'href="/merchant/{owned_case.pk}/"' in body
142+
assert "Merchant portal" in body
143+
assert "View merchant cases" in body
144+
assert "Open case" in body
141145

142146

143147
@pytest.mark.django_db

0 commit comments

Comments
 (0)