diff --git a/backend/src/libs/utils/generateBoardData.ts b/backend/src/libs/utils/generateBoardData.ts index 51d88e787..01b091864 100644 --- a/backend/src/libs/utils/generateBoardData.ts +++ b/backend/src/libs/utils/generateBoardData.ts @@ -18,8 +18,7 @@ export const generateSubBoardDtoData = (index: number, users: BoardUserDto[] = [ isSubBoard: true, maxVotes: undefined, hideCards: false, - hideVotes: false, - postAnonymously: false + hideVotes: false }; }; @@ -43,8 +42,7 @@ export const generateBoardDtoData = (): CreateBoardDto => { team: null, isSubBoard: false, hideCards: false, - hideVotes: false, - postAnonymously: false + hideVotes: false } }; }; diff --git a/backend/src/modules/boards/dto/board.dto.ts b/backend/src/modules/boards/dto/board.dto.ts index c926224a6..250a021d5 100644 --- a/backend/src/modules/boards/dto/board.dto.ts +++ b/backend/src/modules/boards/dto/board.dto.ts @@ -71,11 +71,6 @@ export default class BoardDto { @IsBoolean() hideVotes!: boolean; - @ApiProperty({ default: false }) - @IsNotEmpty() - @IsBoolean() - postAnonymously!: boolean; - @ApiProperty({ type: BoardDto, isArray: true }) @IsOptional() @ValidateNested({ each: true }) diff --git a/backend/src/modules/boards/interfaces/services/create.board.service.interface.ts b/backend/src/modules/boards/interfaces/services/create.board.service.interface.ts index 0997efa88..4fd6df585 100644 --- a/backend/src/modules/boards/interfaces/services/create.board.service.interface.ts +++ b/backend/src/modules/boards/interfaces/services/create.board.service.interface.ts @@ -7,7 +7,6 @@ export interface Configs { votes?: string | null; hideCards?: boolean; hideVotes?: boolean; - anonymously: boolean; maxUsers: number; } diff --git a/backend/src/modules/boards/schemas/board.schema.ts b/backend/src/modules/boards/schemas/board.schema.ts index 1e69b5815..e504ff908 100644 --- a/backend/src/modules/boards/schemas/board.schema.ts +++ b/backend/src/modules/boards/schemas/board.schema.ts @@ -60,9 +60,6 @@ export default class Board { @Prop({ type: Boolean, nullable: false, default: false }) hideVotes?: boolean; - @Prop({ type: Boolean, nullable: false, default: false }) - postAnonymously?: boolean; - @Prop({ type: Number, nullable: false, default: 0 }) totalUsedVotes?: Number; } diff --git a/backend/src/modules/boards/services/create.board.service.ts b/backend/src/modules/boards/services/create.board.service.ts index 523d971e5..76b02bdad 100644 --- a/backend/src/modules/boards/services/create.board.service.ts +++ b/backend/src/modules/boards/services/create.board.service.ts @@ -105,8 +105,7 @@ export default class CreateBoardServiceImpl implements CreateBoardService { } async create(boardData: BoardDto, userId: string) { - const { team, recurrent, maxVotes, postAnonymously, hideCards, hideVotes, maxUsers } = - boardData; + const { team, recurrent, maxVotes, hideCards, hideVotes, maxUsers } = boardData; const newUsers = []; const newBoard = await this.createBoard(boardData, userId); @@ -127,8 +126,7 @@ export default class CreateBoardServiceImpl implements CreateBoardService { recurrent, maxVotes, hideCards, - hideVotes, - anonymously: postAnonymously + hideVotes } }; @@ -163,8 +161,7 @@ export default class CreateBoardServiceImpl implements CreateBoardService { recurrent: configs.recurrent, maxVotes: configs.maxVotes ?? null, hideCards: configs.hideCards ?? false, - hideVotes: configs.hideVotes ?? false, - postAnonymously: configs.anonymously + hideVotes: configs.hideVotes ?? false }; const board = await this.create(boardData, ownerId); diff --git a/backend/src/modules/schedules/schemas/schedules.schema.ts b/backend/src/modules/schedules/schemas/schedules.schema.ts index c49dd265a..cdf969101 100644 --- a/backend/src/modules/schedules/schemas/schedules.schema.ts +++ b/backend/src/modules/schedules/schemas/schedules.schema.ts @@ -35,9 +35,6 @@ export default class Schedules { @Prop({ type: Boolean, nullable: false, default: false }) hideVotes?: boolean; - @Prop({ type: Boolean, nullable: false, default: false }) - postAnonymously?: boolean; - @Prop({ type: Date, nullable: false, default: false }) willRunAt!: Date; } diff --git a/frontend/src/components/Board/Settings/index.tsx b/frontend/src/components/Board/Settings/index.tsx index c5f889e6a..e8d8df186 100644 --- a/frontend/src/components/Board/Settings/index.tsx +++ b/frontend/src/components/Board/Settings/index.tsx @@ -16,7 +16,6 @@ import Text from 'components/Primitives/Text'; import useBoard from 'hooks/useBoard'; import SchemaUpdateBoard from 'schema/schemaUpdateBoardForm'; import { boardInfoState } from 'store/board/atoms/board.atom'; -import { updateBoardError } from 'store/updateBoard/atoms/update-board.atom'; import { UpdateBoardType } from 'types/board/board'; import { BoardUserToAdd } from 'types/board/board.user'; import { BoardUserRoles } from 'utils/enums/board.user.roles'; @@ -73,8 +72,6 @@ const BoardSettings = ({ const dialogContainerRef = useRef(null); const submitBtnRef = useRef(null); - const haveError = useRecoilValue(updateBoardError); - // Unique state to handle the switches change const [switchesState, setSwitchesState] = useState<{ maxVotes: boolean; responsible: boolean }>( { @@ -271,7 +268,6 @@ const BoardSettings = ({ Board Name { const newSubBoard: CreateBoardDto = { ...subBoard, users: [], dividedBoards: [] }; newSubBoard.hideCards = boardState.board.hideCards; newSubBoard.hideVotes = boardState.board.hideVotes; - newSubBoard.postAnonymously = boardState.board.postAnonymously; newSubBoard.maxVotes = maxVotes; const users = subBoard.users.map((boardUser) => ({ user: boardUser.user._id, diff --git a/frontend/src/hooks/useCreateBoard.tsx b/frontend/src/hooks/useCreateBoard.tsx index f5e1c4373..70f5535c7 100644 --- a/frontend/src/hooks/useCreateBoard.tsx +++ b/frontend/src/hooks/useCreateBoard.tsx @@ -43,7 +43,6 @@ const useCreateBoard = (team: Team) => { maxVotes: undefined, hideCards: false, hideVotes: false, - postAnonymously: false, totalUsedVotes: 0 }; }, diff --git a/frontend/src/pages/boards/new.tsx b/frontend/src/pages/boards/new.tsx index 3f3356610..0de0c452a 100644 --- a/frontend/src/pages/boards/new.tsx +++ b/frontend/src/pages/boards/new.tsx @@ -88,7 +88,6 @@ const NewBoard: NextPage = () => { const newSubBoard: CreateBoardDto = { ...subBoard, users: [], dividedBoards: [] }; newSubBoard.hideCards = boardState.board.hideCards; newSubBoard.hideVotes = boardState.board.hideVotes; - newSubBoard.postAnonymously = boardState.board.postAnonymously; newSubBoard.maxVotes = maxVotes; newSubBoard.users = subBoard.users.map((boardUser) => ({ diff --git a/frontend/src/store/createBoard/atoms/create-board.atom.tsx b/frontend/src/store/createBoard/atoms/create-board.atom.tsx index eceb3e139..2afa17dda 100644 --- a/frontend/src/store/createBoard/atoms/create-board.atom.tsx +++ b/frontend/src/store/createBoard/atoms/create-board.atom.tsx @@ -50,7 +50,6 @@ export const createBoardDataState = atom({ isSubBoard: false, hideCards: false, hideVotes: false, - postAnonymously: false, slackGroup: false, totalUsedVotes: 0 } diff --git a/frontend/src/store/updateBoard/atoms/update-board.atom.tsx b/frontend/src/store/updateBoard/atoms/update-board.atom.tsx deleted file mode 100644 index 7253889b9..000000000 --- a/frontend/src/store/updateBoard/atoms/update-board.atom.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { atom } from 'recoil'; - -import { UpdateBoardType } from 'types/board/board'; - -export const updateBoardError = atom({ - key: 'haveUpdateBoardError', - default: false -}); - -export const updateBoardDataState = atom<{ board: UpdateBoardType }>({ - key: 'updateBoardData', - default: { - board: { - _id: '', - title: '', - hideCards: false, - hideVotes: false, - maxVotes: undefined, - users: [] - } - } -}); diff --git a/frontend/src/types/board/board.ts b/frontend/src/types/board/board.ts index b2a32c84a..0e7e52903 100644 --- a/frontend/src/types/board/board.ts +++ b/frontend/src/types/board/board.ts @@ -36,7 +36,6 @@ export default interface BoardType { hideCards: boolean; hideVotes: boolean; votes?: string; - postAnonymously: boolean; submitedByUser?: string; submitedAt?: Date; slackGroup?: boolean;