mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
fix(server): balance sheet query validation schema
This commit is contained in:
@@ -24,14 +24,14 @@ export class BalanceSheetQueryDto extends FinancialSheetBranchesQueryDto {
|
|||||||
displayColumnsType: 'total' | 'date_periods' = 'total';
|
displayColumnsType: 'total' | 'date_periods' = 'total';
|
||||||
|
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
enum: ['day', 'month', 'year'],
|
enum: ['day', 'month', 'year', 'quarter'],
|
||||||
default: 'year',
|
default: 'year',
|
||||||
description: 'Time period for column display',
|
description: 'Time period for column display',
|
||||||
})
|
})
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsEnum(['day', 'month', 'year'])
|
@IsEnum(['day', 'month', 'year', 'quarter'])
|
||||||
displayColumnsBy: 'day' | 'month' | 'year' = 'year';
|
displayColumnsBy: 'day' | 'month' | 'year' | 'quarter' = 'year';
|
||||||
|
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
description: 'Start date for the balance sheet period',
|
description: 'Start date for the balance sheet period',
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ export class CashFlowStatementQueryDto extends FinancialSheetBranchesQueryDto {
|
|||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
description: 'Display columns by time period',
|
description: 'Display columns by time period',
|
||||||
required: false,
|
required: false,
|
||||||
enum: ['day', 'month', 'year'],
|
enum: ['day', 'month', 'year', 'quarter'],
|
||||||
default: 'year',
|
default: 'year',
|
||||||
})
|
})
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsEnum(['day', 'month', 'year'])
|
@IsEnum(['day', 'month', 'year', 'quarter'])
|
||||||
displayColumnsBy: 'day' | 'month' | 'year' = 'year';
|
displayColumnsBy: 'day' | 'month' | 'year' | 'quarter' = 'year';
|
||||||
|
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
description: 'Type of column display',
|
description: 'Type of column display',
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ export class ProfitLossSheetQueryDto extends FinancialSheetBranchesQueryDto {
|
|||||||
displayColumnsType: 'total' | 'date_periods';
|
displayColumnsType: 'total' | 'date_periods';
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsEnum(['day', 'month', 'year'])
|
@IsEnum(['day', 'month', 'year', 'quarter'])
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@ApiProperty({ description: 'How to display columns' })
|
@ApiProperty({ description: 'How to display columns' })
|
||||||
displayColumnsBy: 'day' | 'month' | 'year' = 'year';
|
displayColumnsBy: 'day' | 'month' | 'year' | 'quarter' = 'year';
|
||||||
|
|
||||||
@Transform(({ value }) => parseBoolean(value, false))
|
@Transform(({ value }) => parseBoolean(value, false))
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
|
|||||||
Reference in New Issue
Block a user