Start working on handling multiple countries at once

This commit is contained in:
2026-01-17 09:56:40 +01:00
parent 03b74aa33d
commit 22e4034ae3
4 changed files with 28 additions and 19 deletions

View File

@@ -44,9 +44,9 @@
</thead>
{% for price in product.price %}
<tr>
<td>{{ price.price | format_currency('GBP', {}, 'en') }}</td>
<td>{{ price.lowestProductPrice30Days | format_currency('GBP', {}, 'en') }}</td>
<td>{{ price.productStandardPrice | format_currency('PLN', {}, 'pl') }}</td>
<td>{{ price.price | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.lowestProductPrice30Days | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.created_at }}</td>
<td>{{ (product.stock | findByCreatedAtDate(price.created_at | slice(0,10))).stock ?? '' }}</td>
</tr>
@@ -67,7 +67,7 @@
labels: ['{{ price_dates|raw }}'],
datasets: [
{
label: 'Price (PLN)',
label: 'Price ({{ product.country.currency }})',
data: {{ price_list|raw }},
yAxisID: 'yPrice',
tension: 0.1,
@@ -99,7 +99,7 @@
beginAtZero: true,
title: {
display: true,
text: 'Price (PLN)'
text: 'Price ({{ product.country.currency }})'
},
grid: {
drawOnChartArea: false