feat: client-side currency conversion with admin-configurable rates
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

- CurrencyRatesService: RUB-based rates, persisted via localStorage
- CurrencyConvertPipe: impure pipe converting item price to selected currency
- Admin settings page: editable currency rates form
- Applied conversion to product-card, product-information, quick-view-dialog,
  delivery-information, compare-table, cart totals + payment payload

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-08-15 01:45:12 +04:00
parent d8c078ad5a
commit 4510eb769a
20 changed files with 235 additions and 30 deletions

View File

@@ -1947,6 +1947,10 @@ export const en: Translations = {
density: 'Table density',
densityExplain: 'Reduce row padding across backoffice list pages for a more compact view.',
densityCompact: 'Compact rows',
currencyRates: 'Currency rates',
currencyRatesExplain: 'Rates relative to 1 RUB, used to convert storefront prices while the backend does not return prices per currency.',
currencyRatesSave: 'Save rates',
currencyRatesSaved: 'Rates saved',
},
adminAnalytics: {
topProductsEmptyTitle: 'No product sales in this period',

View File

@@ -1942,6 +1942,10 @@ export const hy: Translations = {
density: 'Աղյուսակի խտություն',
densityExplain: 'Փոքրացնել տողերի հեռավորությունը ադմինիստրատիվ վահանակի ցուցակներում՝ ավելի կոմպակտ տեսքի համար։',
densityCompact: 'Կոմպակտ տողեր',
currencyRates: 'Արժույթների փոխարժեքներ',
currencyRatesExplain: 'Փոխարժեքներ՝ 1 RUB-ի նկատմամբ, օգտագործվում են կայքի գները փոխարկելու համար, քանի դեռ բեքենդը գներ չի վերադարձնում ըստ արժույթի։',
currencyRatesSave: 'Պահպանել փոխարժեքները',
currencyRatesSaved: 'Փոխարժեքները պահպանվեցին',
},
adminAnalytics: {
topProductsEmptyTitle: 'Այս ժամանակահատվածում ապրանքների վաճառք չկա',

View File

@@ -1942,6 +1942,10 @@ export const ru: Translations = {
density: 'Плотность таблиц',
densityExplain: 'Уменьшить отступы строк в списках панели управления для более компактного вида.',
densityCompact: 'Компактные строки',
currencyRates: 'Курсы валют',
currencyRatesExplain: 'Курсы относительно 1 RUB, используются для конвертации цен на сайте, пока бэкенд не возвращает цены в разных валютах.',
currencyRatesSave: 'Сохранить курсы',
currencyRatesSaved: 'Курсы сохранены',
},
adminAnalytics: {
topProductsEmptyTitle: 'Нет продаж товаров за этот период',

View File

@@ -1955,6 +1955,10 @@ export interface Translations {
density: string;
densityExplain: string;
densityCompact: string;
currencyRates: string;
currencyRatesExplain: string;
currencyRatesSave: string;
currencyRatesSaved: string;
};
adminAnalytics: {
topProductsEmptyTitle: string;