diff --git a/src/app/i18n/translations.ts b/src/app/i18n/translations.ts index 960ac91..93b8db6 100644 --- a/src/app/i18n/translations.ts +++ b/src/app/i18n/translations.ts @@ -53,6 +53,7 @@ export const TRANSLATIONS: Record> = { // --- Item basic fields --- ITEM_NAME: 'Item Name', PRICE: 'Price', + DISCOUNT: 'Discount (%)', QUANTITY: 'Quantity', CURRENCY: 'Currency', SIMPLE_DESCRIPTION: 'Simple Description', @@ -169,6 +170,7 @@ export const TRANSLATIONS: Record> = { // --- Item basic fields --- ITEM_NAME: 'Название товара', PRICE: 'Цена', + DISCOUNT: 'Скидка (%)', QUANTITY: 'Количество', CURRENCY: 'Валюта', SIMPLE_DESCRIPTION: 'Краткое описание', diff --git a/src/app/models/item.model.ts b/src/app/models/item.model.ts index b15f3bb..525291c 100644 --- a/src/app/models/item.model.ts +++ b/src/app/models/item.model.ts @@ -14,6 +14,7 @@ export interface Item { priority: number; quantity: number; price: number; + discount: number; currency: string; imgs: string[]; tags: string[]; diff --git a/src/app/pages/item-editor/item-editor.component.html b/src/app/pages/item-editor/item-editor.component.html index 4f73f68..6c8d48e 100644 --- a/src/app/pages/item-editor/item-editor.component.html +++ b/src/app/pages/item-editor/item-editor.component.html @@ -107,6 +107,25 @@ +
+ + {{ 'DISCOUNT' | translate }} + + % + @if (item()!.discount < 0 || item()!.discount > 100) { + Discount must be 0–100% + } + +
+ {{ 'SIMPLE_DESCRIPTION' | translate }}