소스 검색

feat(currency): add Indonesian Rupiah (IDR) support (#1869)

    Adds IDR with Rp symbol to the supported currencies list, available
    in Settings → Cost Tracking.
maziggy 2 달 전
부모
커밋
703dc693d7
5개의 변경된 파일8개의 추가작업 그리고 25개의 파일을 삭제
  1. 0 22
      CHANGELOG.md
  2. 6 2
      frontend/src/__tests__/utils/currency.test.ts
  3. 1 0
      frontend/src/utils/currency.ts
  4. 0 0
      static/assets/index-DxxKVIUT.js
  5. 1 1
      static/index.html

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 22
CHANGELOG.md


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

@@ -57,7 +57,11 @@ describe('SUPPORTED_CURRENCIES', () => {
     expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'BZD')).toBeDefined();
   });
 
-  it('has 30 entries', () => {
-    expect(SUPPORTED_CURRENCIES).toHaveLength(30);
+  it('contains IDR', () => {
+    expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'IDR')).toBeDefined();
+  });
+
+  it('has 31 entries', () => {
+    expect(SUPPORTED_CURRENCIES).toHaveLength(31);
   });
 });

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

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

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
static/assets/index-DxxKVIUT.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-DDY1oW0X.js"></script>
+    <script type="module" crossorigin src="/assets/index-DxxKVIUT.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-BxVhuRti.css">
   </head>
   <body>

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