-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixing two bugs that were introduced with the implementation of websocket-communication for boards. 1: When a new card gets created by clicking on the corresponding button, it gets created without an empty text field element. 2: When the user hits enter key while being in a card title, a new text field element should be created at the beginning of the card and the cursor should jump into it.
- Loading branch information
1 parent
cf58b6b
commit ee670e4
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
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
13 changes: 12 additions & 1 deletion
13
apps/server/src/modules/board/gateway/dto/create-card.message.param.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,6 +1,17 @@ | ||
import { IsMongoId } from 'class-validator'; | ||
import { ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { IsEnum, IsMongoId, IsOptional } from 'class-validator'; | ||
import { ContentElementType } from '../../domain'; | ||
|
||
export class CreateCardMessageParams { | ||
@IsMongoId() | ||
columnId!: string; | ||
|
||
@IsEnum(ContentElementType, { each: true }) | ||
@IsOptional() | ||
@ApiPropertyOptional({ | ||
required: false, | ||
isArray: true, | ||
enum: ContentElementType, | ||
}) | ||
requiredEmptyElements?: ContentElementType[]; | ||
} |