File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
export interface PointStandard {
id: string;
eventCode: string;
point: number;
limitPoint: number;
isDuplicable: boolean;
siteCode: string;
description: string;
isActive: boolean;
updatedAt: string;
}
export const EMPTY_FIELD_PLACEHOLDER = '-';
/** 제한포인트가 0이면 일 누적 제한이 없다(기획 PTS10100002_p ③). */
export const UNLIMITED_LIMIT_POINT = 0;
export function formatOptionalValue(
value: string | number | null | undefined
): string {
return value === null || value === undefined || value === ''
? EMPTY_FIELD_PLACEHOLDER
: String(value);
}
export function formatPoint(value: number): string {
return value.toLocaleString('ko-KR');
}
export function formatLimitPoint(value: number): string {
return value === UNLIMITED_LIMIT_POINT ? '제한 없음' : formatPoint(value);
}
export function formatDuplicableLabel(isDuplicable: boolean): string {
return isDuplicable ? '중복 가능' : '중복 불가';
}
export function formatActiveLabel(isActive: boolean): string {
return isActive ? '사용' : '사용안함';
}