소스 검색

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 3 달 전
부모
커밋
6b3dd63513
4개의 변경된 파일과 12개의 추가작업 그리고 3개의 파일을 삭제
  1. 10 2
      frontend/src/__tests__/utils/currency.test.ts
  2. 1 0
      frontend/src/utils/currency.ts
  3. 0 0
      static/assets/index-K1HnBuZh.js
  4. 1 1
      static/index.html

+ 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 {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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>

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.