diff --git a/src/main/frontend/src/components/AddCatalogPriceForm.js b/src/main/frontend/src/components/AddCatalogPriceForm.js index 3269bf07e3..69aefe25b2 100644 --- a/src/main/frontend/src/components/AddCatalogPriceForm.js +++ b/src/main/frontend/src/components/AddCatalogPriceForm.js @@ -2,7 +2,7 @@ // IMPORTANT: // You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file! // -// @todo #1342 AddCatalogPriceForm: show a currency +// @todo #1388 AddCatalogPriceForm: consider using a tooltip for currency class AddCatalogPriceForm extends React.Component { constructor(props) { @@ -33,6 +33,21 @@ class AddCatalogPriceForm extends React.Component { }); } + getCurrencyByCatalogName(catalog) { + switch (catalog) { + case 'michel': + case 'yvert': + return ['\u20AC', 'EUR']; + case 'scott': + return ['$', 'USD']; + case 'gibbons': + return ['\u00A3', 'GBP']; + case 'solovyov': + case 'zagorski': + return ['\u20BD', 'RUB']; + } + } + handleSubmit(event) { event.preventDefault(); @@ -86,6 +101,8 @@ class AddCatalogPriceForm extends React.Component { } render() { const hasValidationErrors = this.state.validationErrors.length > 0; + const [currencySymbol, currencyName] = this.getCurrencyByCatalogName(this.state.catalog); + return (
@@ -129,17 +146,17 @@ class AddCatalogPriceForm extends React.Component { -
-
-
- -
+
+
+ { currencySymbol } +
diff --git a/src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java b/src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java index 483fb0505e..da78ac043a 100644 --- a/src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java +++ b/src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java @@ -32,7 +32,7 @@ public final class ResourceUrl { public static final String STATIC_RESOURCES_URL = "https://stamps.filezz.ru"; // MUST be updated when any of our resources were modified - public static final String RESOURCES_VERSION = "v0.4.3.2"; + public static final String RESOURCES_VERSION = "v0.4.3.3"; // CheckStyle: ignore LineLength for next 14 lines private static final String CATALOG_UTILS_JS = "/public/js/" + RESOURCES_VERSION + "/CatalogUtils.min.js";