diff --git a/public/locales/bg/budgetOption.json b/public/locales/bg/budgetOption.json new file mode 100644 index 0000000..ae0c555 --- /dev/null +++ b/public/locales/bg/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Не прикажи", + "ShowAndEdit": "Прикажи и уреди", + "ShowOnly": "Прикажи само" +} \ No newline at end of file diff --git a/public/locales/bg/priority.json b/public/locales/bg/priority.json new file mode 100644 index 0000000..58d9bca --- /dev/null +++ b/public/locales/bg/priority.json @@ -0,0 +1,5 @@ +{ + "High": "Висок", + "Low": "Нисак", + "Normal": "Нормално" +} \ No newline at end of file diff --git a/public/locales/cs/budgetOption.json b/public/locales/cs/budgetOption.json new file mode 100644 index 0000000..d6dd752 --- /dev/null +++ b/public/locales/cs/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Nepokážte.", + "ShowAndEdit": "Zobrazit a upravit", + "ShowOnly": "Zobrazit pouze" +} \ No newline at end of file diff --git a/public/locales/cs/priority.json b/public/locales/cs/priority.json new file mode 100644 index 0000000..75f8c9a --- /dev/null +++ b/public/locales/cs/priority.json @@ -0,0 +1,5 @@ +{ + "High": "Vysoký", + "Low": "Nízký", + "Normal": "Normální" +} \ No newline at end of file diff --git a/public/locales/de/budgetOption.json b/public/locales/de/budgetOption.json new file mode 100644 index 0000000..da96bb2 --- /dev/null +++ b/public/locales/de/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Nicht anzeigen", + "ShowAndEdit": "Anzeigen und Bearbeiten", + "ShowOnly": "Nur anzeigen" +} \ No newline at end of file diff --git a/public/locales/de/priority.json b/public/locales/de/priority.json new file mode 100644 index 0000000..0b971bc --- /dev/null +++ b/public/locales/de/priority.json @@ -0,0 +1,4 @@ +{ + "High": "Hoch", + "Low": "Niedrig" +} \ No newline at end of file diff --git a/public/locales/en/budgetOption.json b/public/locales/en/budgetOption.json index 343e6e4..f09d0d0 100644 --- a/public/locales/en/budgetOption.json +++ b/public/locales/en/budgetOption.json @@ -1,5 +1,5 @@ { "DoNotShow": "Do Not Show", - "ShowOnly": "Show Only", - "ShowAndEdit": "Show And Edit" -} + "ShowAndEdit": "Show And Edit", + "ShowOnly": "Show Only" +} \ No newline at end of file diff --git a/public/locales/en/priority.json b/public/locales/en/priority.json index b73bf9b..7d56b76 100644 --- a/public/locales/en/priority.json +++ b/public/locales/en/priority.json @@ -1,5 +1,5 @@ { + "High": "High", "Low": "Low", - "Normal": "Normal", - "High": "High" -} + "Normal": "Normal" +} \ No newline at end of file diff --git a/public/locales/es/budgetOption.json b/public/locales/es/budgetOption.json new file mode 100644 index 0000000..6c153c2 --- /dev/null +++ b/public/locales/es/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "No mostrar", + "ShowAndEdit": "Mostrar y editar", + "ShowOnly": "Mostrar solo" +} \ No newline at end of file diff --git a/public/locales/es/priority.json b/public/locales/es/priority.json new file mode 100644 index 0000000..899c658 --- /dev/null +++ b/public/locales/es/priority.json @@ -0,0 +1,4 @@ +{ + "High": "Alto", + "Low": "Bajo" +} \ No newline at end of file diff --git a/public/locales/fr/budgetOption.json b/public/locales/fr/budgetOption.json new file mode 100644 index 0000000..cd66518 --- /dev/null +++ b/public/locales/fr/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Ne pas afficher", + "ShowAndEdit": "Afficher et modifier", + "ShowOnly": "Afficher uniquement" +} \ No newline at end of file diff --git a/public/locales/fr/priority.json b/public/locales/fr/priority.json new file mode 100644 index 0000000..bb49528 --- /dev/null +++ b/public/locales/fr/priority.json @@ -0,0 +1,4 @@ +{ + "High": "Élevé", + "Low": "Faible" +} \ No newline at end of file diff --git a/public/locales/ko/budgetOption.json b/public/locales/ko/budgetOption.json new file mode 100644 index 0000000..32b830d --- /dev/null +++ b/public/locales/ko/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "표시하지 마세요", + "ShowAndEdit": "보기 및 편집", + "ShowOnly": "쇼 온리" +} \ No newline at end of file diff --git a/public/locales/ko/priority.json b/public/locales/ko/priority.json new file mode 100644 index 0000000..b64f7d6 --- /dev/null +++ b/public/locales/ko/priority.json @@ -0,0 +1,4 @@ +{ + "Low": "로우", + "Normal": "정상" +} \ No newline at end of file diff --git a/public/locales/nl/budgetOption.json b/public/locales/nl/budgetOption.json new file mode 100644 index 0000000..a7e75f1 --- /dev/null +++ b/public/locales/nl/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Niet weergeven", + "ShowAndEdit": "Weergeven en bewerken", + "ShowOnly": "Alleen weergeven" +} \ No newline at end of file diff --git a/public/locales/nl/priority.json b/public/locales/nl/priority.json new file mode 100644 index 0000000..5ecec06 --- /dev/null +++ b/public/locales/nl/priority.json @@ -0,0 +1,5 @@ +{ + "High": "Hoog", + "Low": "Laag", + "Normal": "Normaal" +} \ No newline at end of file diff --git a/public/locales/pl/budgetOption.json b/public/locales/pl/budgetOption.json new file mode 100644 index 0000000..027840c --- /dev/null +++ b/public/locales/pl/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Nie wyświetlać", + "ShowAndEdit": "Pokaż i edytuj", + "ShowOnly": "Pokaż tylko" +} \ No newline at end of file diff --git a/public/locales/pl/priority.json b/public/locales/pl/priority.json new file mode 100644 index 0000000..32a9121 --- /dev/null +++ b/public/locales/pl/priority.json @@ -0,0 +1,4 @@ +{ + "High": "Wysoki", + "Low": "Niski" +} \ No newline at end of file diff --git a/public/locales/pt/budgetOption.json b/public/locales/pt/budgetOption.json new file mode 100644 index 0000000..7e8acbd --- /dev/null +++ b/public/locales/pt/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Não exibir", + "ShowAndEdit": "Mostrar e Editar", + "ShowOnly": "Mostrar apenas" +} \ No newline at end of file diff --git a/public/locales/pt/priority.json b/public/locales/pt/priority.json new file mode 100644 index 0000000..93dd9c7 --- /dev/null +++ b/public/locales/pt/priority.json @@ -0,0 +1,5 @@ +{ + "High": "Alto", + "Low": "Baixo", + "Normal": "Normal." +} \ No newline at end of file diff --git a/public/locales/uk/budgetOption.json b/public/locales/uk/budgetOption.json new file mode 100644 index 0000000..6fbd01e --- /dev/null +++ b/public/locales/uk/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "Не відображати", + "ShowAndEdit": "Показати та редагувати", + "ShowOnly": "Показати тільки" +} \ No newline at end of file diff --git a/public/locales/uk/priority.json b/public/locales/uk/priority.json new file mode 100644 index 0000000..d56cebc --- /dev/null +++ b/public/locales/uk/priority.json @@ -0,0 +1,5 @@ +{ + "High": "Високий", + "Low": "Низький", + "Normal": "Звичайний" +} \ No newline at end of file diff --git a/public/locales/ur/budgetOption.json b/public/locales/ur/budgetOption.json new file mode 100644 index 0000000..fb7fc22 --- /dev/null +++ b/public/locales/ur/budgetOption.json @@ -0,0 +1,5 @@ +{ + "DoNotShow": "न दिखाएं।", + "ShowAndEdit": "دکھائیں اور ترمیم کریں", + "ShowOnly": "صرف ذلك هو المطلوب." +} \ No newline at end of file diff --git a/public/locales/ur/priority.json b/public/locales/ur/priority.json new file mode 100644 index 0000000..961e613 --- /dev/null +++ b/public/locales/ur/priority.json @@ -0,0 +1,5 @@ +{ + "High": "بहुत ऊँचा", + "Low": "کम", + "Normal": "سामान्य" +} \ No newline at end of file diff --git a/src/components/common/CostEditor.tsx b/src/components/common/CostEditor.tsx new file mode 100644 index 0000000..69ced7c --- /dev/null +++ b/src/components/common/CostEditor.tsx @@ -0,0 +1,80 @@ +import Input, { InputType } from "./Input"; + +export type CostValue = { + amount: number; + isoCurrencySymbol: string; +}; + +export interface CostEditorProps { + name: string; + value: CostValue; + amountLabel?: string; + currencyLabel?: string; + amountError?: string; + currencyError?: string; + onChange: (value: CostValue) => void; +} + +function normalizeAmount(rawValue: string) { + if (rawValue.trim() === "") { + return 0; + } + + const parsed = Number(rawValue); + return Number.isFinite(parsed) ? parsed : 0; +} + +export default function CostEditor(props: CostEditorProps) { + const { + name, + value, + amountLabel, + currencyLabel, + amountError, + currencyError, + onChange, + } = props; + + const currentValue: CostValue = { + amount: value?.amount ?? 0, + isoCurrencySymbol: value?.isoCurrencySymbol ?? "", + }; + + return ( +