-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: [TEO-454, TEO-508] download event RSVP #119
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
827d0fe
feat: [TEO-454] download event RSVPs
OlteanuCosmin 6ad31e9
feat: [TEO-454] disable implicit type conversion, add @Type decorator…
OlteanuCosmin d8ddbaa
Merge branch 'develop' into feature/TEO-454
OlteanuCosmin 9393e19
feat: [TEO-508] revert @type additions to DTOs and change going from …
OlteanuCosmin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 1 addition & 7 deletions
8
backend/src/api/actions-archive/dto/get-actions-history.dto.ts
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,4 @@ | ||
export enum RSVPGoingEnum { | ||
YES = 'yes', | ||
NO = 'no', | ||
} |
6 changes: 6 additions & 0 deletions
6
backend/src/modules/event/interfaces/event-rsvp-download.interface.ts
This file contains hidden or 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,6 @@ | ||
export interface IEventRSVPDownload { | ||
Nume: string; | ||
Raspuns: string; | ||
'Voluntar in organizatie': string; | ||
Mentiune?: string; | ||
} |
33 changes: 33 additions & 0 deletions
33
backend/src/usecases/event/RSVP/get-many-for-download-rsvp.usecase.ts
This file contains hidden or 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,33 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { IUseCaseService } from 'src/common/interfaces/use-case-service.interface'; | ||
import { IEventRSVPDownload } from 'src/modules/event/interfaces/event-rsvp-download.interface'; | ||
import { GetManyEventRSVPUseCase } from './get-many-rsvp.usecase'; | ||
import { FindManyEventRSVPOptions } from 'src/modules/event/models/event-rsvp.model'; | ||
|
||
@Injectable() | ||
export class GetManyForDownloadEventRSVPUseCase | ||
implements IUseCaseService<IEventRSVPDownload[]> | ||
{ | ||
constructor( | ||
private readonly getManyEventRSVPUseCase: GetManyEventRSVPUseCase, | ||
) {} | ||
|
||
public async execute( | ||
findOptions: FindManyEventRSVPOptions, | ||
): Promise<IEventRSVPDownload[]> { | ||
const eventRSVPs = await this.getManyEventRSVPUseCase.execute({ | ||
...findOptions, | ||
limit: 0, | ||
page: 0, | ||
}); | ||
|
||
return eventRSVPs.items.map((rsvp): IEventRSVPDownload => { | ||
return { | ||
Nume: rsvp.user.name, | ||
Raspuns: rsvp.going ? 'Participa' : 'Nu participa', | ||
'Voluntar in organizatie': rsvp.volunteerId ? 'Da' : 'Nu', | ||
Mentiune: rsvp.mention, | ||
}; | ||
}); | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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,4 @@ | ||
export enum RsvpEnum { | ||
GOING = 'going', | ||
NOT_GOING = 'not_going', | ||
export enum RSVPGoingEnum { | ||
YES = 'yes', | ||
NO = 'no', | ||
} |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.