Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
feat: add currencies (NOK, SEK, DKK) (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-kot authored Nov 1, 2022
1 parent 592d4ed commit b6b2a2d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
5 changes: 4 additions & 1 deletion backend/internal/data/ent/group/group.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/internal/data/ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/internal/data/ent/schema/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (Group) Fields() []ent.Field {
NotEmpty(),
field.Enum("currency").
Default("usd").
Values("usd", "eur", "gbp", "jpy", "zar", "aud"),
Values("usd", "eur", "gbp", "jpy", "zar", "aud", "nok", "sek", "dkk"),
}
}

Expand Down
20 changes: 19 additions & 1 deletion frontend/lib/data/currency.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type Codes = "USD" | "EUR" | "GBP" | "JPY" | "ZAR" | "AUD";
export type Codes = "USD" | "EUR" | "GBP" | "JPY" | "ZAR" | "AUD" | "NOK" | "SEK" | "DKK";

export type Currency = {
code: Codes;
Expand Down Expand Up @@ -44,4 +44,22 @@ export const currencies: Currency[] = [
symbol: "$",
name: "Australian Dollar",
},
{
code: "NOK",
local: "nb-NO",
symbol: "kr",
name: "Norwegian Krone",
},
{
code: "SEK",
local: "sv-SE",
symbol: "kr",
name: "Swedish Krona",
},
{
code: "DKK",
local: "da-DK",
symbol: "kr",
name: "Danish Krone",
},
];

0 comments on commit b6b2a2d

Please sign in to comment.