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

Refactor/update development #561

Merged
merged 32 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
cee0788
feat(NI): update main branch (#507)
dsousa12 Oct 19, 2022
7204762
feat(NI): update main with development (#508)
dsousa12 Oct 19, 2022
55393c8
[BUG] Adding cards to closed sub-board (#509)
CatiaBarroco-xgeeks Oct 19, 2022
179dcaf
[FIX]: adding cards to closed sub boad eslint issues (#510)
f-morgado Oct 19, 2022
90d0391
fix(NI): ESLint errors on Sprite (#511)
dsousa12 Oct 19, 2022
c2d38dc
[FEATURE]: disable teams button from sidebar menu (#513)
CatiaAntunes96 Oct 19, 2022
6f37c90
[FIX]: fix card team layout (#505)
CatiaAntunes96 Oct 21, 2022
fe138a5
[BUG] Accessing a deleted board (#522)
CatiaBarroco-xgeeks Oct 21, 2022
bba193e
[BUG]: Board Settings Info cancel button to reset info (#490)
CatiaBarroco-xgeeks Oct 28, 2022
1ff677a
[REFACTOR]: update readme (#531)
nunocaseiro Oct 31, 2022
cba0a91
docs: add CatiaAntunes96 as a contributor for code, doc, and review (…
allcontributors[bot] Oct 31, 2022
476966e
docs: add mourabraz as a contributor for code, doc, and review (#534)
allcontributors[bot] Oct 31, 2022
3af3651
docs: add miguel-felix1 as a contributor for code, bug, and 2 more (#…
allcontributors[bot] Oct 31, 2022
88bc639
chore(deps): bump vm2 from 3.9.10 to 3.9.11 in /backend (#537)
dependabot[bot] Oct 31, 2022
67c20b5
[FIX]: Board list bottom cut off (#554)
CatiaAntunes96 Nov 7, 2022
0f62333
[REFACTOR]: list boards without showing subboards (#557)
CatiaAntunes96 Nov 7, 2022
b191318
[FIX]: stakeholders, delete cron job (#559)
nunocaseiro Nov 7, 2022
4887bf7
[FEATURE]: show boards members (#560)
CatiaAntunes96 Nov 7, 2022
2e36588
Feat/add page for creating a new team (#515)
CatiaAntunes96 Oct 20, 2022
0a2cc4e
Feat/add card member to create new team page (#517)
CatiaAntunes96 Oct 21, 2022
081b8d8
[FEATURE]: add form buttons to create team page (#520)
CatiaAntunes96 Oct 21, 2022
15f9c9b
[FEATURE]: Drawer with members (#523)
CatiaAntunes96 Oct 28, 2022
b9fedb4
[FEATURE]: add users controller (#526)
CatiaAntunes96 Oct 28, 2022
02cf998
Feat/change searchinput (#529)
CatiaAntunes96 Oct 31, 2022
62c7aff
[FEATURE]: checklist with members (#532)
CatiaAntunes96 Oct 31, 2022
fd12b0f
[FEATURE]: filter users list (#536)
CatiaAntunes96 Nov 2, 2022
8dc0e23
[FEATURE]: list of selected users on recoil (#540)
CatiaAntunes96 Nov 2, 2022
fc069a2
[FEATURE]: endoint to get the teams of a user (#543)
CatiaAntunes96 Nov 3, 2022
7b0392a
[FEATURE]: render members card (#547)
CatiaAntunes96 Nov 4, 2022
48ba73e
[FEATURE]: add newbee tip if members are > 1 (#549)
CatiaAntunes96 Nov 4, 2022
b6af33f
[FEATURE]: show btn if scroll exists (#550)
CatiaAntunes96 Nov 4, 2022
d7fc132
Merge remote-tracking branch 'origin/development' into development
CatiaAntunes96 Nov 7, 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
37 changes: 36 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,47 @@
"code",
"doc"
]
},
{
"login": "CatiaAntunes96",
"name": "Cátia Antunes",
"avatar_url": "https://avatars.githubusercontent.com/u/59372326?v=4",
"profile": "https://github.com/CatiaAntunes96",
"contributions": [
"code",
"doc",
"review"
]
},
{
"login": "mourabraz",
"name": "mourabraz",
"avatar_url": "https://avatars.githubusercontent.com/u/7543719?v=4",
"profile": "https://www.linkedin.com/in/moura-braz",
"contributions": [
"code",
"doc",
"review"
]
},
{
"login": "miguel-felix1",
"name": "Miguel Félix",
"avatar_url": "https://avatars.githubusercontent.com/u/87712174?v=4",
"profile": "https://github.com/miguel-felix1",
"contributions": [
"code",
"bug",
"review",
"userTesting"
]
}
],
"contributorsPerLine": 7,
"projectName": "split",
"projectOwner": "xgeekshq",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": false
"skipCi": false,
"commitConvention": "angular"
}
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- [🙌🏻 How to Contribute](#--how-to-contribute)
- [🏃 How to Run](https://github.com/xgeekshq/split/wiki/How-to-run)
- [📃 Requirements](https://github.com/xgeekshq/split/wiki/Requirements)
- [Usage](#usage)
- [:computer: Usage](#usage)
- [📝 License](#-license)
- [Contributors ✨](#contributors-)

Expand All @@ -35,10 +35,9 @@ Check out our [**Contributing Guide**](.github/CONTRIBUTING.md) for information
The backend will run on `http://localhost:BACKEND_PORT` and the frontend on `http://localhost:3000`.

- `/dashboard`: dashboard
- `/boards`: boards list
- `/boards/[boardId]`: board page

You must register to access the dashboard page.

## 📝 License

Licensed under the [MIT License](./LICENSE).
Expand All @@ -51,21 +50,26 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/nunocaseiro"><img src="https://avatars.githubusercontent.com/u/90208434?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Nuno Caseiro</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=nunocaseiro" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=nunocaseiro" title="Tests">⚠️</a> <a href="#infra-nunocaseiro" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/xgeekshq/split/commits?author=nunocaseiro" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/gfdias"><img src="https://avatars.githubusercontent.com/u/5095726?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Gonçalo Dias</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=gfdias" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Agfdias" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/xgeekshq/split/commits?author=gfdias" title="Documentation">📖</a> <a href="#projectManagement-gfdias" title="Project Management">📆</a></td>
<td align="center"><a href="https://github.com/rpvsilva"><img src="https://avatars.githubusercontent.com/u/25325644?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Rui Silva</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=rpvsilva" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Arpvsilva" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/RubenMCCarreira"><img src="https://avatars.githubusercontent.com/u/75999036?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Rúben Carreira</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=RubenMCCarreira" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3ARubenMCCarreira" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://daniel-sousa.com"><img src="https://avatars.githubusercontent.com/u/104842894?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Daniel Sousa</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=dsousa12" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=dsousa12" title="Documentation">📖</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Adsousa12" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/f-morgado"><img src="https://avatars.githubusercontent.com/u/99803749?v=4?s=50" width="50px;" alt=""/><br /><sub><b>f-morgado</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=f-morgado" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=f-morgado" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/r-dmatos"><img src="https://avatars.githubusercontent.com/u/100219341?v=4?s=50" width="50px;" alt=""/><br /><sub><b>r-dmatos</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=r-dmatos" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=r-dmatos" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/CatiaBarroco-xgeeks"><img src="https://avatars.githubusercontent.com/u/104831678?v=4?s=50" width="50px;" alt=""/><br /><sub><b>CatiaBarroco-xgeeks</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=CatiaBarroco-xgeeks" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=CatiaBarroco-xgeeks" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/joaosantos99"><img src="https://avatars.githubusercontent.com/u/68588265?v=4?s=50" width="50px;" alt=""/><br /><sub><b>João Santos</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=joaosantos99" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=joaosantos99" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/dvpfran"><img src="https://avatars.githubusercontent.com/u/67462841?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Luís Francisco</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=dvpfran" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=dvpfran" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/geomarb"><img src="https://avatars.githubusercontent.com/u/33127565?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Geomar Bastiani</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=geomarb" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=geomarb" title="Documentation">📖</a></td>
</tr>
<tbody>
<tr>
<td align="center"><a href="https://github.com/nunocaseiro"><img src="https://avatars.githubusercontent.com/u/90208434?v=4?s=50" width="50px;" alt="Nuno Caseiro"/><br /><sub><b>Nuno Caseiro</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=nunocaseiro" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=nunocaseiro" title="Tests">⚠️</a> <a href="#infra-nunocaseiro" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/xgeekshq/split/commits?author=nunocaseiro" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/gfdias"><img src="https://avatars.githubusercontent.com/u/5095726?v=4?s=50" width="50px;" alt="Gonçalo Dias"/><br /><sub><b>Gonçalo Dias</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=gfdias" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Agfdias" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/xgeekshq/split/commits?author=gfdias" title="Documentation">📖</a> <a href="#projectManagement-gfdias" title="Project Management">📆</a></td>
<td align="center"><a href="https://github.com/rpvsilva"><img src="https://avatars.githubusercontent.com/u/25325644?v=4?s=50" width="50px;" alt="Rui Silva"/><br /><sub><b>Rui Silva</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=rpvsilva" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Arpvsilva" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/RubenMCCarreira"><img src="https://avatars.githubusercontent.com/u/75999036?v=4?s=50" width="50px;" alt="Rúben Carreira"/><br /><sub><b>Rúben Carreira</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=RubenMCCarreira" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3ARubenMCCarreira" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://daniel-sousa.com"><img src="https://avatars.githubusercontent.com/u/104842894?v=4?s=50" width="50px;" alt="Daniel Sousa"/><br /><sub><b>Daniel Sousa</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=dsousa12" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=dsousa12" title="Documentation">📖</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Adsousa12" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/f-morgado"><img src="https://avatars.githubusercontent.com/u/99803749?v=4?s=50" width="50px;" alt="f-morgado"/><br /><sub><b>f-morgado</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=f-morgado" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=f-morgado" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/r-dmatos"><img src="https://avatars.githubusercontent.com/u/100219341?v=4?s=50" width="50px;" alt="r-dmatos"/><br /><sub><b>r-dmatos</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=r-dmatos" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=r-dmatos" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/CatiaBarroco-xgeeks"><img src="https://avatars.githubusercontent.com/u/104831678?v=4?s=50" width="50px;" alt="CatiaBarroco-xgeeks"/><br /><sub><b>CatiaBarroco-xgeeks</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=CatiaBarroco-xgeeks" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=CatiaBarroco-xgeeks" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/joaosantos99"><img src="https://avatars.githubusercontent.com/u/68588265?v=4?s=50" width="50px;" alt="João Santos"/><br /><sub><b>João Santos</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=joaosantos99" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=joaosantos99" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/dvpfran"><img src="https://avatars.githubusercontent.com/u/67462841?v=4?s=50" width="50px;" alt="Luís Francisco"/><br /><sub><b>Luís Francisco</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=dvpfran" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=dvpfran" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/geomarb"><img src="https://avatars.githubusercontent.com/u/33127565?v=4?s=50" width="50px;" alt="Geomar Bastiani"/><br /><sub><b>Geomar Bastiani</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=geomarb" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=geomarb" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/CatiaAntunes96"><img src="https://avatars.githubusercontent.com/u/59372326?v=4?s=50" width="50px;" alt="Cátia Antunes"/><br /><sub><b>Cátia Antunes</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=CatiaAntunes96" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=CatiaAntunes96" title="Documentation">📖</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3ACatiaAntunes96" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://www.linkedin.com/in/moura-braz"><img src="https://avatars.githubusercontent.com/u/7543719?v=4?s=50" width="50px;" alt="mourabraz"/><br /><sub><b>mourabraz</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=mourabraz" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/commits?author=mourabraz" title="Documentation">📖</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Amourabraz" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/miguel-felix1"><img src="https://avatars.githubusercontent.com/u/87712174?v=4?s=50" width="50px;" alt="Miguel Félix"/><br /><sub><b>Miguel Félix</b></sub></a><br /><a href="https://github.com/xgeekshq/split/commits?author=miguel-felix1" title="Code">💻</a> <a href="https://github.com/xgeekshq/split/issues?q=author%3Amiguel-felix1" title="Bug reports">🐛</a> <a href="https://github.com/xgeekshq/split/pulls?q=is%3Apr+reviewed-by%3Amiguel-felix1" title="Reviewed Pull Requests">👀</a> <a href="#userTesting-miguel-felix1" title="User Testing">📓</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
Expand Down
12 changes: 6 additions & 6 deletions backend/package-lock.json

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

6 changes: 6 additions & 0 deletions backend/src/libs/dto/param/team.param.optional.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { IsOptional } from 'class-validator';

export class TeamParamOptional {
@IsOptional()
teamId?: string;
}
13 changes: 12 additions & 1 deletion backend/src/modules/boards/controller/boards.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { UnauthorizedResponse } from 'libs/swagger/errors/unauthorized.swagger';
import { BoardResponse } from 'modules/boards/swagger/board.swagger';
import SocketGateway from 'modules/socket/gateway/socket.gateway';

import { TeamParamOptional } from '../../../libs/dto/param/team.param.optional';
import BoardDto from '../dto/board.dto';
import { UpdateBoardDto } from '../dto/update-board.dto';
import { CreateBoardApplicationInterface } from '../interfaces/applications/create.board.application.interface';
Expand Down Expand Up @@ -238,10 +239,20 @@ export default class BoardsController {
type: InternalServerErrorResponse
})
@Delete(':boardId')
async deleteBoard(@Param() { boardId }: BaseParam, @Req() request: RequestWithUser) {
async deleteBoard(
@Param() { boardId }: BaseParam,
@Query() { teamId }: TeamParamOptional,
@Query() { socketId }: BaseParamWSocket,
@Req() request: RequestWithUser
) {
const result = await this.deleteBoardApp.delete(boardId, request.user._id);
if (!result) throw new BadRequestException(DELETE_FAILED);

if (socketId && teamId) {
this.socketService.sendUpdatedBoards(socketId, teamId);
this.socketService.sendUpdatedBoard(boardId, socketId);
}

return result;
}

Expand Down
1 change: 0 additions & 1 deletion backend/src/modules/queue/queue.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ConfigService } from '@nestjs/config';
inject: [ConfigService],
useFactory: (configService: ConfigService) => ({
redis: {
username: configService.get('redis.user'),
password: configService.get('redis.password'),
host: configService.get('redis.host'),
port: configService.get('redis.port'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class CreateSchedulesService implements CreateSchedulesServiceInterface {
job.start();
} catch (e) {
await this.schedulesModel.deleteOne({ board: boardId });
this.schedulerRegistry.deleteCronJob(boardId);
}
}

Expand Down
12 changes: 9 additions & 3 deletions backend/src/modules/socket/gateway/socket.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '@nestjs/websockets';
import { Server, Socket } from 'socket.io';

import JoinPayload from '../interfaces/joinPayload.interface';
import JoinPayloadBoards from '../interfaces/joinPayloadBoards.interface';

@WebSocketGateway({ cors: true })
Expand All @@ -24,8 +25,8 @@ export default class SocketGateway
this.server.to(newBoardId.toString()).except(excludedClient).emit('updateAllBoard', newBoardId);
}

sendUpdatedBoards(excludedClient: string) {
this.server.except(excludedClient).emit('updateBoardList');
sendUpdatedBoards(excludedClient: string, teamId: string) {
this.server.to(teamId).except(excludedClient).emit('teamId');
}

sendUpdatedAllBoard(excludedClient: string) {
Expand All @@ -44,8 +45,13 @@ export default class SocketGateway
this.logger.log(`Client connected: ${client.id}`);
}

@SubscribeMessage('join')
handleJoin(client: Socket, payload: JoinPayload) {
client.join(payload.boardId);
}

@SubscribeMessage('joinBoards')
handleJoinBoards(client: Socket, payload: JoinPayloadBoards) {
client.join(payload.boards);
client.join(payload.teamId);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default interface JoinPayloadBoards {
boards: string;
teamId: string;
}
12 changes: 10 additions & 2 deletions frontend/src/api/boardService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@ export const getBoardsRequest = (
return fetchData(`/boards?page=${pageParam ?? 0}&size=10`, { context, serverSide: !!context });
};

export const deleteBoardRequest = async (id: string): Promise<BoardType> => {
return fetchData(`/boards/${id}`, { method: 'DELETE' });
export const deleteBoardRequest = async ({
id,
socketId,
teamId
}: {
id: string;
socketId?: string;
teamId: string;
}): Promise<BoardType> => {
return fetchData(`/boards/${id}`, { method: 'DELETE', params: { socketId, teamId } });
};

// #endregion
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Board/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const BoardHeader = () => {
{isSubBoard ? title.replace('board', '') : team.name}
</Text>
<CardAvatars
isBoardsPage
listUsers={users}
responsible={false}
teamAdmins={false}
Expand Down
Loading