add polish and turkish lira

This commit is contained in:
Hayden 2023-02-25 18:04:53 -09:00
parent a6bcb36c5b
commit 24afa0013a
No known key found for this signature in database
GPG key ID: 17CF79474E257545
2 changed files with 24 additions and 10 deletions

View file

@ -27,7 +27,7 @@ func (Group) Fields() []ent.Field {
NotEmpty(), NotEmpty(),
field.Enum("currency"). field.Enum("currency").
Default("usd"). Default("usd").
Values("usd", "eur", "gbp", "jpy", "zar", "aud", "nok", "sek", "dkk", "inr", "rmb", "bgn","chf"), Values("usd", "eur", "gbp", "jpy", "zar", "aud", "nok", "sek", "dkk", "inr", "rmb", "bgn", "chf", "pln", "try"),
} }
} }

View file

@ -1,17 +1,19 @@
export type Codes = export type Codes =
| "USD" | "AUD"
| "BGN"
| "CHF"
| "DKK"
| "EUR" | "EUR"
| "GBP" | "GBP"
| "JPY"
| "ZAR"
| "AUD"
| "NOK"
| "SEK"
| "DKK"
| "INR" | "INR"
| "JPY"
| "NOK"
| "PLN"
| "RMB" | "RMB"
| "BGN" | "SEK"
| "CHF"; | "TRY"
| "USD"
| "ZAR";
export type Currency = { export type Currency = {
code: Codes; code: Codes;
@ -69,6 +71,12 @@ export const currencies: Currency[] = [
symbol: "kr", symbol: "kr",
name: "Norwegian Krone", name: "Norwegian Krone",
}, },
{
code: "PLN",
local: "pl-PL",
symbol: "zł",
name: "Polish Zloty",
},
{ {
code: "ZAR", code: "ZAR",
local: "en-ZA", local: "en-ZA",
@ -81,6 +89,12 @@ export const currencies: Currency[] = [
symbol: "kr", symbol: "kr",
name: "Swedish Krona", name: "Swedish Krona",
}, },
{
code: "TRY",
local: "tr-TR",
symbol: "₺",
name: "Turkish Lira",
},
{ {
code: "USD", code: "USD",
local: "en-US", local: "en-US",