Skip to content

Commit

Permalink
[#80] 모임 지원자 Export 하는 csv 파일에 참여자의 파트 정보 컬럼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yeseul106 authored and rdd9223 committed Oct 28, 2023
1 parent 6561a06 commit 4619938
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/meeting/v1/meeting-v1.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,18 @@ export class MeetingV1Service {
const recentActiveGeneration = activities
?.map((activity) => activity.generation)
.sort((a, b) => b - a)[0];
const recentActivePart = activities
?.slice()
.sort((a, b) => b.generation - a.generation)
.map((activity) => activity.part)[0];
const formattedAppliedDate = dayjs(appliedDate).format(
'YYYY-MM-DD HH:mm:ss',
);

return {
name,
recentActiveGeneration,
recentActivePart,
phone,
content,
appliedDate: formattedAppliedDate,
Expand All @@ -82,6 +87,7 @@ export class MeetingV1Service {
const csvColumns = [
{ value: 'name', label: '이름' },
{ value: 'recentActiveGeneration', label: '활동기수' },
{ value: 'recentActivePart', label: '활동파트' },
{ value: 'phone', label: '전화번호' },
{ value: 'appliedDate', label: '신청시간' },
{ value: 'content', label: '신청내용' },
Expand Down

0 comments on commit 4619938

Please sign in to comment.