feature/handle-multiple-countries (#45)

Reviewed-on: #45
Co-authored-by: Krzysiej <krzysiej@gmail.com>
Co-committed-by: Krzysiej <krzysiej@gmail.com>
This commit was merged in pull request #45.
This commit is contained in:
2026-01-17 17:07:40 +01:00
committed by krzysiej
parent ebe40785fa
commit 295a968581
6 changed files with 117 additions and 24 deletions

View File

@@ -44,9 +44,9 @@
</thead>
{% for price in product.price %}
<tr>
<td>{{ price.price | format_currency('PLN', {}, 'pl') }}</td>
<td>{{ price.lowestProductPrice30Days | format_currency('PLN', {}, 'pl') }}</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