-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change organization currency selection to enum
Fixes: #57
- Loading branch information
1 parent
8214112
commit c77cce2
Showing
4 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
10 changes: 8 additions & 2 deletions
10
apps/api/src/models/organizations/dto/path-organization-settings.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
import { IsIn, IsOptional } from 'class-validator'; | ||
import { IsEnum, IsOptional } from 'class-validator'; | ||
import { IPatchOrganizationSettingsDto } from 'shared-types'; | ||
import { OrgValueCalculationStrategy } from '../schemas/org-settings'; | ||
import { Currency } from 'country-code-enum'; | ||
|
||
export class PatchOrganizationSettingsDto implements IPatchOrganizationSettingsDto { | ||
@IsOptional() | ||
@IsIn(['buyPrice', 'sellPrice']) | ||
@IsEnum(OrgValueCalculationStrategy) | ||
valueCalculationStrategy?: string; | ||
|
||
@IsOptional() | ||
@IsEnum(Currency) | ||
currency?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters