Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Reoreder table columns

Marcin Gębala35acd5e65d07
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index 78727bd68d..fccce98369 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -30,16 +30,16 @@
<table class="bordered highlight responsive data-table">
<thead>
<tr>
- <th>
- <a href="{% get_sort_by_url_toggle 'email' %}">
- {% trans "Email" context "Customers table header" %}
- </a>
- </th>
<th class="wide">
<a href="{% get_sort_by_url_toggle 'name' %}">
{% trans "Name" context "Customers table header" %}
</a>
</th>
+ <th>
+ <a href="{% get_sort_by_url_toggle 'email' %}">
+ {% trans "Email" context "Customers table header" %}
+ </a>
+ </th>
<th>
<a href="{% get_sort_by_url_toggle 'location' %}">
{% trans "Location" context "Customers table header" %}
@@ -51,19 +51,23 @@
{% for customer in customers %}
<tr data-action-go="{% url "dashboard:customer-details" pk=customer.pk %}">
{% with customer.default_billing_address as default_address %}
+ <td>
+ {% if default_address %}
+ {{ default_address.first_name }} {{ default_address.last_name }}
+ {% else %}
+ -
+ {% endif %}
+ </td>
<td>
{{ customer.email }}
</td>
- {% if default_address %}
- <td>
- {{ default_address.first_name }} {{ default_address.last_name }}
- </td>
- <td>
+ <td>
+ {% if default_address %}
{{ default_address.city }}, {{ default_address.get_country_display }}
- </td>
- {% else %}
- <td colspan="2"></td>
- {% endif %}
+ {% else %}
+ -
+ {% endif %}
+ </td>
{% endwith %}
</tr>
{% endfor %}
diff --git a/templates/dashboard/includes/_orders_table.html b/templates/dashboard/includes/_orders_table.html
index ce487799d2..4f58ee5918 100644
--- a/templates/dashboard/includes/_orders_table.html
+++ b/templates/dashboard/includes/_orders_table.html
@@ -13,23 +13,23 @@
</a>
</th>
<th>
- <a href="{% get_sort_by_url_toggle 'status' %}">
- {% trans "Order status" context "Orders table header" %}
+ <a href="{% get_sort_by_url_toggle 'email' %}">
+ {% trans "Customer" context "Orders table header" %}
</a>
</th>
<th>
- <a href="{% get_sort_by_url_toggle 'payment_status' %}">
- {% trans "Payment status" context "Orders table header" %}
+ <a href="{% get_sort_by_url_toggle 'created' %}">
+ {% trans "Placed on" context "Orders table header" %}
</a>
</th>
<th>
- <a href="{% get_sort_by_url_toggle 'email' %}">
- {% trans "Customer" context "Orders table header" %}
+ <a href="{% get_sort_by_url_toggle 'status' %}">
+ {% trans "Order status" context "Orders table header" %}
</a>
</th>
<th>
- <a href="{% get_sort_by_url_toggle 'created' %}">
- {% trans "Placed on" context "Orders table header" %}
+ <a href="{% get_sort_by_url_toggle 'payment_status' %}">
+ {% trans "Payment status" context "Orders table header" %}
</a>
</th>
<th class="right-align">
@@ -45,18 +45,18 @@
<td>
#{{ order.id }}
</td>
+ {% trans "Guest" context "Anonymous user account value" as guest %}
<td>
- {% render_status order.status order.get_status_display %}
+ {{ order.user|default:guest }}
</td>
<td>
- {% render_status order.get_last_payment_status order.get_last_payment_status_display %}
+ {{ order.created }}
</td>
- {% trans "Guest" context "Anonymous user account value" as guest %}
<td>
- {{ order.user|default:guest }}
+ {% render_status order.status order.get_status_display %}
</td>
<td>
- {{ order.created }}
+ {% render_status order.get_last_payment_status order.get_last_payment_status_display %}
</td>
<td class="right-align">
{% gross order.get_total html=True %}