Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Create Board Settings #235

Merged
merged 24 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7e70ea8
feat: settings button mockupcode
f-morgado Jun 2, 2022
5804da7
test: button and settings from mockup
f-morgado Jun 3, 2022
00e4b69
fix: adding slash to backgroundImage path
f-morgado Jun 3, 2022
fdfeaf7
feat: switch and paddings on the form
f-morgado Jun 3, 2022
5e59412
feat: making switch dynamic to all sizes
f-morgado Jun 3, 2022
2ced7aa
feat: limit votes toggle input
CatiaBarroco-xgeeks Jun 6, 2022
e25641d
test: board settings input tests
CatiaBarroco-xgeeks Jun 8, 2022
945292c
test: board settings input props
CatiaBarroco-xgeeks Jun 8, 2022
c0f5ade
test: board settings values
CatiaBarroco-xgeeks Jun 9, 2022
e285d4e
fix: board settings - max votes
dsousa12 Jun 9, 2022
ffd8d8b
fix: max votes switch
dsousa12 Jun 9, 2022
321629f
feat: board configurations mutate
dsousa12 Jun 15, 2022
591ff09
test: mutate values
CatiaBarroco-xgeeks Jun 15, 2022
a58c384
feat: board settings
dsousa12 Jun 16, 2022
35a184f
fix: dashboard tiles arrow sizes
dsousa12 Jun 17, 2022
eb12801
fix: boardSettings Button paddings
dsousa12 Jun 17, 2022
46f6b1f
fix: board buttons alignment
dsousa12 Jun 17, 2022
5f3c7b0
fix: use effects and clean some code
dsousa12 Jun 17, 2022
2d4e0da
Merge branch 'main' into feat-create-board-settings
dsousa12 Jun 17, 2022
8cce37f
chore: update package-lock.json
dsousa12 Jun 17, 2022
c207b02
fix: fixing arrow icon size
f-morgado Jun 17, 2022
986cac3
feat: main board alert about no merged sub-boards
dsousa12 Jun 20, 2022
ff22346
fix: remove console.log
dsousa12 Jun 20, 2022
f9d3bcb
fix: pr suggestions
CatiaBarroco-xgeeks Jun 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions backend/package-lock.json

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

1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@nestjs/config": "^2.0.0",
"@nestjs/core": "^8.4.4",
"@nestjs/jwt": "^8.0.0",
"@nestjs/mapped-types": "^1.0.1",
"@nestjs/mongoose": "^9.0.3",
"@nestjs/passport": "^8.2.1",
"@nestjs/platform-express": "^8.4.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Inject, Injectable } from '@nestjs/common';
import boardDto from '../dto/board.dto';
import { UpdateBoardDto } from '../dto/update-board.dto';
import { UpdateBoardApplicationInterface } from '../interfaces/applications/update.board.application.interface';
import { UpdateBoardService } from '../interfaces/services/update.board.service.interface';
import { TYPES } from '../interfaces/types';
Expand All @@ -11,7 +11,7 @@ export class UpdateBoardApplication implements UpdateBoardApplicationInterface {
private updateBoardService: UpdateBoardService,
) {}

update(userId: string, boardId: string, boardData: boardDto) {
update(userId: string, boardId: string, boardData: UpdateBoardDto) {
return this.updateBoardService.update(userId, boardId, boardData);
}

Expand Down
3 changes: 2 additions & 1 deletion backend/src/modules/boards/controller/boards.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Req,
UseGuards,
} from '@nestjs/common';
import { UpdateBoardDto } from '../dto/update-board.dto';
import BoardDto from '../dto/board.dto';
import JwtAuthenticationGuard from '../../../libs/guards/jwtAuth.guard';
import RequestWithUser from '../../../libs/interfaces/requestWithUser.interface';
Expand Down Expand Up @@ -105,7 +106,7 @@ export default class BoardsController {
async updateBoard(
@Req() request: RequestWithUser,
@Param() { boardId }: BaseParam,
@Body() boardData: BoardDto,
@Body() boardData: UpdateBoardDto,
) {
const board = await this.updateBoardApp.update(
request.user._id,
Expand Down
4 changes: 4 additions & 0 deletions backend/src/modules/boards/dto/update-board.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { PartialType } from '@nestjs/mapped-types';
import BoardDto from './board.dto';

export class UpdateBoardDto extends PartialType(BoardDto) {}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { LeanDocument } from 'mongoose';
import BoardDto from '../../dto/board.dto';
import { UpdateBoardDto } from '../../dto/update-board.dto';
import { BoardDocument } from '../../schemas/board.schema';

export interface UpdateBoardApplicationInterface {
update(
userId: string,
boardId: string,
boardData: BoardDto,
boardData: UpdateBoardDto,
): Promise<LeanDocument<BoardDocument> | null>;
mergeBoards(
subBoardId: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { LeanDocument } from 'mongoose';
import BoardDto from '../../dto/board.dto';
import { UpdateBoardDto } from '../../dto/update-board.dto';
import { BoardDocument } from '../../schemas/board.schema';

export interface UpdateBoardService {
update(
userId: string,
boardId: string,
boardData: BoardDto,
boardData: UpdateBoardDto,
): Promise<LeanDocument<BoardDocument> | null>;
mergeBoards(
subBoardId: string,
Expand Down
4 changes: 2 additions & 2 deletions backend/src/modules/boards/services/update.board.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Inject, Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model, ObjectId, LeanDocument } from 'mongoose';
import { UpdateBoardDto } from '../dto/update-board.dto';
import { GetTeamServiceInterface } from '../../teams/interfaces/services/get.team.service.interface';
import * as Teams from '../../teams/interfaces/types';
import BoardDto from '../dto/board.dto';
import { UpdateBoardService } from '../interfaces/services/update.board.service.interface';
import Board, { BoardDocument } from '../schemas/board.schema';

Expand All @@ -15,7 +15,7 @@ export default class UpdateBoardServiceImpl implements UpdateBoardService {
private getTeamService: GetTeamServiceInterface,
) {}

update(userId: string, boardId: string, boardData: BoardDto) {
update(userId: string, boardId: string, boardData: UpdateBoardDto) {
return this.boardModel
.findOneAndUpdate(
{
Expand Down
8 changes: 8 additions & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ module.exports = {
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'unused-imports/no-unused-imports': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variableLike',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow'
}
],
'prettier/prettier': ['error', { usePrettierrc: true }]
},
settings: {
Expand Down
Loading