260623_01_ENH: 엑셀 다운로드를 제외한 기능 완성

This commit is contained in:
2026-06-23 09:54:25 +09:00
parent 28da30b865
commit 08ea4d5420
23 changed files with 1202 additions and 349 deletions

View File

@@ -0,0 +1,35 @@
import {PerformanceFull, UserCompact} from "@/types/gwcf";
export const toNotificationParamValue = (value: unknown) => value == null ? "" : String(value);
export const buildUserMsgParam = (user: UserCompact): Record<string, string> => ({
...Object.fromEntries(
Object.entries(user.userDetail ?? {}).map(([key, value]) => [key, toNotificationParamValue(value)])
),
userId: toNotificationParamValue(user.userId),
userCmpn: toNotificationParamValue(user.userCmpn),
userTeam: toNotificationParamValue(user.userTeam),
userName: toNotificationParamValue(user.userName),
userRole: toNotificationParamValue(user.userRole),
});
export const buildPerformanceSmsParams = (performance: PerformanceFull): Record<string, string> => ({
businessType: toNotificationParamValue(performance.businessType),
performanceGenre: toNotificationParamValue(performance.performanceGenre),
performanceArea: toNotificationParamValue(performance.performanceArea),
artistName: toNotificationParamValue(performance.artistName),
performanceName: toNotificationParamValue(performance.performanceName),
performanceStartMonth: toNotificationParamValue(performance.performanceStartMonth),
performanceDtInfo: toNotificationParamValue(performance.performanceDtInfo),
performanceTimeInfo: toNotificationParamValue(performance.performanceTimeInfo),
ticketReservationStatus: toNotificationParamValue(performance.ticketReservationStatus),
ticketReservationMemo: toNotificationParamValue(performance.ticketReservationMemo),
performanceMemo: toNotificationParamValue(performance.performanceMemo),
...Object.fromEntries(
Object.entries(performance.performanceDetail ?? {}).map(([key, value]) => [key, toNotificationParamValue(value)])
),
...Object.fromEntries(
Object.entries(performance.performanceMonitoringSchedule ?? {}).map(([key, value]) => [key, toNotificationParamValue(value)])
),
performanceId: toNotificationParamValue(performance.id),
});