generated from xgeekshq/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE]: Save stakeholders into team_user table (#321)
* feat: remove /all from GET /stakeholders/all to follow REST pattern * feat: remove /all from getStakeholders /boards/stakeholders/all to follow REST pattern * feat: remove ignored_users.json * feat: get stakeholder from table teamuser.role * feat: add geomarb as contributor * feat: change get stakeholder to teams * feat: add geomarb to README.md * feat: add team param * fix: chage user.role filter compare from strings to enums data * feat: remove stakeholders * feat: change way to handle stakeholder * fix: compare user.role with enum data instead of string * feat: remove prefetch getStakeholder * feat: change the way to handle stakeholder * feat: remove getStakeholders GET /boards/stakeholders * feat: add stakeholder role * feat: add team.filter.options lib * feat: add getTeam(teamId, teamFilterOptions) & remove getTeamStakeholders * feat: add stakeholder role * feat: add filters loadUsers and userTeamRole to getTeam and remove GET /teams/member * feat: add getTeam(teamId, teamFilterOptions) to get.team.application * feat: add getTeam(teamId, teamFilterOptions) and remove getTeamStakeholders to get.team.service * fix: rename TeamsFilterOptions to TeamQueryParams * feat: improve code readability * feat: improve code readability * fix: error when merge sub-board to main-board * fix: geomar profile link Co-authored-by: Daniel Sousa <104842894+dsousa12@users.noreply.github.com>
- Loading branch information
Showing
22 changed files
with
153 additions
and
122 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
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { IsMongoId, IsString } from 'class-validator'; | ||
|
||
export class TeamParams { | ||
@IsMongoId() | ||
@IsString() | ||
teamId!: string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Transform } from 'class-transformer'; | ||
import { IsBoolean, IsEnum, IsOptional, IsString } from 'class-validator'; | ||
import { TeamRoles } from 'src/libs/enum/team.roles'; | ||
|
||
export class TeamQueryParams { | ||
@IsString() | ||
@IsOptional() | ||
@IsEnum(TeamRoles, { each: true }) | ||
teamUserRole?: TeamRoles; | ||
|
||
@IsOptional() | ||
@IsBoolean() | ||
@Transform(({ value }) => [true, 'true', '', '1'].includes(value)) | ||
loadUsers?: boolean; | ||
} |
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,4 +1,5 @@ | ||
export enum TeamRoles { | ||
ADMIN = 'admin', | ||
MEMBER = 'member' | ||
MEMBER = 'member', | ||
STAKEHOLDER = 'stakeholder' | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
7 changes: 7 additions & 0 deletions
7
backend/src/modules/teams/interfaces/applications/get.team.application.interface.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,11 +1,18 @@ | ||
import { LeanDocument } from 'mongoose'; | ||
|
||
import { TeamQueryParams } from 'libs/dto/param/team.query.params'; | ||
|
||
import { TeamDocument } from '../../schemas/teams.schema'; | ||
|
||
export interface GetTeamApplicationInterface { | ||
countTeams(userId: string): Promise<number>; | ||
|
||
getAllTeams(): Promise<LeanDocument<TeamDocument>[]>; | ||
|
||
getTeam( | ||
teamId: string, | ||
teamQueryParams?: TeamQueryParams | ||
): Promise<LeanDocument<TeamDocument> | null>; | ||
|
||
getTeamsOfUser(userId: string): Promise<LeanDocument<TeamDocument>[]>; | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.