mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user