Browse Source

feat(currency): add Philippine Peso (PHP, ₱)

Adds PHP to CURRENCY_SYMBOLS, which feeds both getCurrencySymbol() and the
Settings currency dropdown. Backend stores the code string and needs no change.
maziggy 1 month ago
parent
commit
6b3dd63513

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

@@ -34,6 +34,10 @@ describe('getCurrencySymbol', () => {
     expect(getCurrencySymbol('BZD')).toBe('BZ$');
   });
 
+  it('returns ₱ for PHP', () => {
+    expect(getCurrencySymbol('PHP')).toBe('₱');
+  });
+
   it('returns the code itself for unknown currencies', () => {
     expect(getCurrencySymbol('XYZ')).toBe('XYZ');
   });
@@ -61,7 +65,11 @@ describe('SUPPORTED_CURRENCIES', () => {
     expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'IDR')).toBeDefined();
   });
 
-  it('has 31 entries', () => {
-    expect(SUPPORTED_CURRENCIES).toHaveLength(31);
+  it('contains PHP', () => {
+    expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'PHP')).toEqual({ code: 'PHP', label: 'PHP (₱)' });
+  });
+
+  it('has 32 entries', () => {
+    expect(SUPPORTED_CURRENCIES).toHaveLength(32);
   });
 });

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

@@ -30,6 +30,7 @@ const CURRENCY_SYMBOLS: Record<string, string> = {
   ILS: '₪',
   UAH: '₴',
   IDR: 'Rp',
+  PHP: '₱',
 };
 
 export function getCurrencySymbol(currencyCode: string): string {

File diff suppressed because it is too large
+ 0 - 0
static/assets/index-K1HnBuZh.js


+ 1 - 1
static/index.html

@@ -26,7 +26,7 @@
 
     <!-- Splash screens for iOS -->
     <link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
-    <script type="module" crossorigin src="/assets/index-D8XeZXKl.js"></script>
+    <script type="module" crossorigin src="/assets/index-K1HnBuZh.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-blSspT6K.css">
   </head>
   <body>

Some files were not shown because too many files changed in this diff