Skip to content

Commit

Permalink
Merge pull request #102 from line/dev
Browse files Browse the repository at this point in the history
beta release: 3.2350.23-beta
  • Loading branch information
h4l-yup authored Dec 11, 2023
2 parents bd3fe9a + 459ba11 commit bf918e3
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export class CreateChannelRequestDto {
@IsString()
description: string | null;

@ApiProperty({ nullable: true, type: ImageConfigRequestDto })
@ApiProperty({ required: false, nullable: true, type: ImageConfigRequestDto })
@IsOptional()
@IsNullable()
@IsObject()
imageConfig: ImageConfigRequestDto | null;
Expand Down
5 changes: 3 additions & 2 deletions apps/api/src/domains/feedback/feedback.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ export class FeedbackService {
fieldsByKey,
fieldsToExport,
);

worksheet.addRow(convertedFeedback).commit();
feedbackIds.push(feedback.id);
}
Expand All @@ -261,7 +260,9 @@ export class FeedbackService {
fieldsToExport,
}) {
const stream = new PassThrough();
const csvStream = fastcsv.format({ headers: true });
const csvStream = fastcsv.format({
headers: fieldsToExport.map((field) => field.name),
});

csvStream.pipe(stream);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('FeedbackIssueStatisticsService suite', () => {
describe('getCountByDateByissue', () => {
it('getting counts by day by issue succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'day';
const issueIds = [faker.number.int(), faker.number.int()];
const dto = new GetCountByDateByIssueDto();
Expand Down Expand Up @@ -141,7 +141,7 @@ describe('FeedbackIssueStatisticsService suite', () => {
});
it('getting counts by week by issue succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'week';
const issueIds = [faker.number.int(), faker.number.int()];
const dto = new GetCountByDateByIssueDto();
Expand Down Expand Up @@ -182,7 +182,7 @@ describe('FeedbackIssueStatisticsService suite', () => {
});
it('getting counts by month by issue succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'month';
const issueIds = [faker.number.int(), faker.number.int()];
const dto = new GetCountByDateByIssueDto();
Expand All @@ -206,11 +206,11 @@ describe('FeedbackIssueStatisticsService suite', () => {
statistics: [
{
feedbackCount: 6,
date: '2023-01-01',
date: '2022-12-31',
},
{
feedbackCount: 4,
date: '2023-02-01',
date: '2023-01-31',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ export class FeedbackIssueStatisticsService {
acc.push(issue);
}

const intervalCount = Math.floor(
DateTime.fromJSDate(from)
.until(DateTime.fromJSDate(new Date(curr.date)))
const intervalCount = Math.ceil(
DateTime.fromJSDate(new Date(curr.date))
.until(DateTime.fromJSDate(to))
.length(interval),
);
const endOfInterval = DateTime.fromJSDate(from).plus({
const endOfInterval = DateTime.fromJSDate(to).minus({
[interval]: intervalCount,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('FeedbackStatisticsService suite', () => {
describe('getCountByDateByChannel', () => {
it('getting counts by day by channel succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'day';
const channelIds = [faker.number.int(), faker.number.int()];
const dto = new GetCountByDateByChannelDto();
Expand Down Expand Up @@ -144,7 +144,7 @@ describe('FeedbackStatisticsService suite', () => {
});
it('getting counts by week by channel succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'week';
const channelIds = [faker.number.int(), faker.number.int()];
const dto = new GetCountByDateByChannelDto();
Expand Down Expand Up @@ -185,7 +185,7 @@ describe('FeedbackStatisticsService suite', () => {
});
it('getting counts by month by channel succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'month';
const channelIds = [faker.number.int(), faker.number.int()];
const dto = new GetCountByDateByChannelDto();
Expand All @@ -209,11 +209,11 @@ describe('FeedbackStatisticsService suite', () => {
statistics: [
{
count: 6,
date: '2023-01-01',
date: '2022-12-31',
},
{
count: 4,
date: '2023-02-01',
date: '2023-01-31',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export class FeedbackStatisticsService {
acc.push(channel);
}

const intervalCount = Math.floor(
DateTime.fromJSDate(from)
.until(DateTime.fromJSDate(new Date(curr.date)))
const intervalCount = Math.ceil(
DateTime.fromJSDate(new Date(curr.date))
.until(DateTime.fromJSDate(to))
.length(interval),
);
const endOfInterval = DateTime.fromJSDate(from).plus({
const endOfInterval = DateTime.fromJSDate(to).minus({
[interval]: intervalCount,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('IssueStatisticsService suite', () => {
describe('getCountByDate', () => {
it('getting counts by date succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'day';
const projectId = faker.number.int();
const dto = new GetCountByDateDto();
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('IssueStatisticsService suite', () => {
});
it('getting counts by week by channel succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'week';
const projectId = faker.number.int();
const dto = new GetCountByDateDto();
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('IssueStatisticsService suite', () => {
});
it('getting counts by month by channel succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const interval = 'month';
const projectId = faker.number.int();
const dto = new GetCountByDateDto();
Expand All @@ -176,11 +176,11 @@ describe('IssueStatisticsService suite', () => {
statistics: [
{
count: 6,
date: '2023-01-01',
date: '2022-12-31',
},
{
count: 4,
date: '2023-02-01',
date: '2023-01-31',
},
],
});
Expand All @@ -190,7 +190,7 @@ describe('IssueStatisticsService suite', () => {
describe('getCount', () => {
it('getting count succeeds with valid inputs', async () => {
const from = new Date('2023-01-01');
const to = faker.date.future();
const to = new Date('2023-12-31');
const projectId = faker.number.int();
const dto = new GetCountDto();
dto.from = from;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ export class IssueStatisticsService {
return {
statistics: issueStatistics.reduce(
(acc, curr) => {
const intervalCount = Math.floor(
DateTime.fromJSDate(from)
.until(DateTime.fromJSDate(new Date(curr.date)))
const intervalCount = Math.ceil(
DateTime.fromJSDate(new Date(curr.date))
.until(DateTime.fromJSDate(to))
.length(interval),
);
const endOfInterval = DateTime.fromJSDate(from).plus({
const endOfInterval = DateTime.fromJSDate(to).minus({
[interval]: intervalCount,
});

Expand Down
7 changes: 4 additions & 3 deletions apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"total-channel": "Total Channel",
"total-feedback": "Total Feedback",
"create-project": "Create Project",
"no-project": "There are no registered projects.",
"in-progress": "In Progress"
"no-project": "There are no registered projects."
},
"profile": {
"title": "Profile",
Expand Down Expand Up @@ -314,7 +313,9 @@
"guide": "Guide",
"more": "more",
"shrink": "shrink",
"feedback-detail": "Feedback Detail"
"feedback-detail": "Feedback Detail",
"create-channel-in-progress": "There is a Channel being created.",
"create-project-in-progress": "There is a Project being created."
},
"toast": {
"sign-in": "Login Successful",
Expand Down
7 changes: 4 additions & 3 deletions apps/web/public/locales/ja/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"total-channel": "全チャンネル数",
"total-feedback": "全体フィードバック数",
"create-project": "Project生成",
"no-project": "登録されたプロジェクトがありません。",
"in-progress": "進行中"
"no-project": "登録されたプロジェクトがありません。"
},
"profile": {
"title": "プロフィール",
Expand Down Expand Up @@ -314,7 +313,9 @@
"guide": "案内",
"more": "もっと",
"shrink": "縮む",
"feedback-detail": "フィードバック詳細"
"feedback-detail": "フィードバック詳細",
"create-channel-in-progress": "作成中のChannelがあります。",
"create-project-in-progress": "作成中のProjectがあります。"
},
"toast": {
"sign-in": "ログイン成功",
Expand Down
7 changes: 4 additions & 3 deletions apps/web/public/locales/ko/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"total-channel": "전체 Channel 수",
"total-feedback": "전체 피드백 수",
"create-project": "Project 생성",
"no-project": "등록된 프로젝트가 없습니다.",
"in-progress": "진행중"
"no-project": "등록된 프로젝트가 없습니다."
},
"profile": {
"title": "프로필",
Expand Down Expand Up @@ -314,7 +313,9 @@
"guide": "안내",
"more": "더보기",
"shrink": "줄이기",
"feedback-detail": "피드백 상세"
"feedback-detail": "피드백 상세",
"create-channel-in-progress": "생성중인 Channel이 있습니다.",
"create-project-in-progress": "생성중인 Project가 있습니다."
},
"toast": {
"sign-in": "로그인 성공",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const CreateChannelButton: React.FC<IProps> = (props) => {
</button>
</TooltipTrigger>
<TooltipContent color="red">
{t('main.index.in-progress')}{' '}
{t('text.create-channel-in-progress')}{' '}
<b>
({step + 1}/{CHANNEL_STEPS.length})
</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const CreateProjectButton: React.FC<IProps> = ({ hasProject }) => {
{!hasProject && t('main.index.no-project')}
{hasProject && step > 0 && (
<>
{t('main.index.in-progress')}{' '}
{t('text.create-project-in-progress')}{' '}
<b>
({step + 1}/{PROJECT_STEPS.length})
</b>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/etc/NoChannel/NoChannel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const NoChannel: React.FC<IProps> = ({ projectId }) => {
</button>
</TooltipTrigger>
<TooltipContent color="blue">
{t('main.index.in-progress')}{' '}
{t('text.create-channel-in-progress')}{' '}
<b>
({step + 1}/{CHANNEL_STEPS.length})
</b>
Expand Down

0 comments on commit bf918e3

Please sign in to comment.