Ver Fonte

Add RUB (₽) currency option (#333)

Closes #333
maziggy há 6 meses atrás
pai
commit
1ac487254d

+ 1 - 1
CHANGELOG.md

@@ -9,7 +9,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **H2C Nozzle Rack Text Unreadable on Light Filament Colors** ([#300](https://github.com/maziggy/bambuddy/issues/300)) — Nozzle rack slots use the loaded filament color as background, but white/light filaments made the white "0.4" text nearly invisible. Now uses a luminance check to switch to dark text on light backgrounds.
 - **H2C Nozzle Rack Text Unreadable on Light Filament Colors** ([#300](https://github.com/maziggy/bambuddy/issues/300)) — Nozzle rack slots use the loaded filament color as background, but white/light filaments made the white "0.4" text nearly invisible. Now uses a luminance check to switch to dark text on light backgrounds.
 
 
 ### Improved
 ### Improved
-- **Additional Currency Options** ([#329](https://github.com/maziggy/bambuddy/issues/329)) — Added 16 additional currencies to the cost tracking dropdown: HKD, INR, KRW, SEK, NOK, DKK, PLN, BRL, TWD, SGD, NZD, MXN, CZK, THB, ZAR.
+- **Additional Currency Options** ([#329](https://github.com/maziggy/bambuddy/issues/329), [#333](https://github.com/maziggy/bambuddy/issues/333)) — Added 17 additional currencies to the cost tracking dropdown: HKD, INR, KRW, SEK, NOK, DKK, PLN, BRL, TWD, SGD, NZD, MXN, CZK, THB, ZAR, RUB.
 - **Move Email Settings Under Authentication Tab** — Renamed the settings "Users" tab to "Authentication" and moved the standalone "Global Email" tab into it as an "Email Authentication" sub-tab. Groups email/SMTP configuration with user management where it logically belongs. Legacy `?tab=email` URLs are handled automatically.
 - **Move Email Settings Under Authentication Tab** — Renamed the settings "Users" tab to "Authentication" and moved the standalone "Global Email" tab into it as an "Email Authentication" sub-tab. Groups email/SMTP configuration with user management where it logically belongs. Legacy `?tab=email` URLs are handled automatically.
 
 
 ## [0.1.9] - 2026-02-10
 ## [0.1.9] - 2026-02-10

+ 2 - 2
frontend/src/__tests__/utils/currency.test.ts

@@ -37,7 +37,7 @@ describe('SUPPORTED_CURRENCIES', () => {
     expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'INR')).toBeDefined();
     expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'INR')).toBeDefined();
   });
   });
 
 
-  it('has 24 entries', () => {
-    expect(SUPPORTED_CURRENCIES).toHaveLength(24);
+  it('has 25 entries', () => {
+    expect(SUPPORTED_CURRENCIES).toHaveLength(25);
   });
   });
 });
 });

+ 2 - 0
frontend/src/utils/currency.ts

@@ -23,6 +23,7 @@ const CURRENCY_SYMBOLS: Record<string, string> = {
   THB: '฿',
   THB: '฿',
   ZAR: 'R',
   ZAR: 'R',
   TRY: '₺',
   TRY: '₺',
+  RUB: '₽',
 };
 };
 
 
 export function getCurrencySymbol(currencyCode: string): string {
 export function getCurrencySymbol(currencyCode: string): string {
@@ -54,4 +55,5 @@ export const SUPPORTED_CURRENCIES = [
   { code: 'THB', label: 'THB (฿)' },
   { code: 'THB', label: 'THB (฿)' },
   { code: 'ZAR', label: 'ZAR (R)' },
   { code: 'ZAR', label: 'ZAR (R)' },
   { code: 'TRY', label: 'TRY (₺)' },
   { code: 'TRY', label: 'TRY (₺)' },
+  { code: 'RUB', label: 'RUB (₽)' },
 ] as const;
 ] as const;