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.
This commit is contained in:
maziggy
2026-07-11 09:37:10 +02:00
parent ca3f6e5ee0
commit 6b3dd63513
4 changed files with 13 additions and 4 deletions
+10 -2
View File
@@ -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
View File
@@ -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 one or more lines are too long
+1 -1
View File
@@ -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>