Skip to content

Commit

Permalink
feat: latency message added
Browse files Browse the repository at this point in the history
  • Loading branch information
enaenen committed Dec 9, 2023
1 parent ec0a831 commit c3f0cab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/tag-log-v3/tag-log-v3.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ export class TagLogController {
const gaepo = +cadetPerCluster.find((v) => v.cluster === 'GAEPO')?.cadet;
// const seocho = +cadetPerCluster.find((v) => v.cluster === 'SEOCHO')?.cadet;

const infoMessages: InfoMessageDto[] = [];
infoMessages.push(this.messageGenerator.generateInfoMessage());
const infoMessages = this.messageGenerator.generateInfoMessages();

const result: UserInfoType = {
login: user.login,
Expand Down
18 changes: 16 additions & 2 deletions src/utils/message-generator.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,25 @@ import { InfoMessageDto } from "src/tag-log-v3/dto/info-message.dto";
export class MessageGenerator {
// private logger = new Logger(MessageGenerator.name);

generateInfoMessage(): InfoMessageDto {
private generateFundInfoMessage(): InfoMessageDto {
const INFO_MESSAGE_TITLE: string = "인정 시간은 지원금 정책에 반영되는 시간입니다.";
const INFO_MESSAGE_CONTENT: string = "1일 최대 12시간";
const infoMessage = new InfoMessageDto(INFO_MESSAGE_TITLE, INFO_MESSAGE_CONTENT);
return infoMessage;
}



private generateTagLatencyMessage(): InfoMessageDto {
const INFO_MESSAGE_TITLE: string = "입실 중 이용시간은 실제 기록과 다를 수 있습니다.";
const INFO_MESSAGE_CONTENT: string = "입실 / 퇴실 태깅에 유의해주세요.";
const infoMessage = new InfoMessageDto(INFO_MESSAGE_TITLE, INFO_MESSAGE_CONTENT);
return infoMessage;
}

generateInfoMessages(): InfoMessageDto[] {
const infoMessages: InfoMessageDto[] = [];
infoMessages.push(this.generateFundInfoMessage());
infoMessages.push(this.generateTagLatencyMessage());
return infoMessages;
}
}

0 comments on commit c3f0cab

Please sign in to comment.