@@ -151,6 +151,8 @@ export async function listMySchedules(userId: string, q: { month?: string }) {
151151 const schedules = rows . map ( ( s : any ) => ( {
152152 user_alba_schedule_id : binToUuid ( s . user_alba_schedule_id ) ,
153153 workplace : s . workplace ?? null ,
154+ workplace_name : s . workplace_name ?? null ,
155+ workplace_color : s . workplace_color ?? null ,
154156 work_date : s . work_date ?? null ,
155157 work_time : s . work_time ?? null ,
156158 day_of_week : s . day_of_week ?? null ,
@@ -164,22 +166,24 @@ export async function listMySchedules(userId: string, q: { month?: string }) {
164166}
165167
166168/** 단건 조회 */
167- export async function getMyScheduleById ( userId : string , scheduleId : string ) {
168- const s = await scheduleRepo . findDetailByIdAndUserId ( userId , scheduleId ) ;
169- if ( ! s ) throw new CustomError ( 'EC404' , 404 , '스케줄을 찾을 수 없습니다.' , null ) ;
170-
171- return {
172- user_alba_schedule_id : binToUuid ( s . user_alba_schedule_id as unknown as Uint8Array ) ,
173- workplace : s . workplace ?? null ,
174- work_date : s . work_date ?? null ,
175- work_time : s . work_time ?? null ,
176- day_of_week : s . day_of_week ?? null ,
177- repeat_type : s . repeat_type ?? null ,
178- repeat_days : s . repeat_days ?? null ,
179- hourly_wage : s . hourly_wage ?? null ,
180- memo : s . memo ?? null ,
181- } ;
182- }
169+ // export async function getMyScheduleById(userId: string, scheduleId: string) {
170+ // const s = await scheduleRepo.findDetailByIdAndUserId(userId, scheduleId);
171+ // if (!s) throw new CustomError('EC404', 404, '스케줄을 찾을 수 없습니다.', null);
172+
173+ // return {
174+ // user_alba_schedule_id: binToUuid(s.user_alba_schedule_id as unknown as Uint8Array),
175+ // workplace: s.workplace ?? null,
176+ // work_date: s.work_date ?? null,
177+ // work_time: s.work_time ?? null,
178+ // workplace_name: s.workplace_name ?? null,
179+ // workplace_color: s.workplace_color ?? null,
180+ // day_of_week: s.day_of_week ?? null,
181+ // repeat_type: s.repeat_type ?? null,
182+ // repeat_days: s.repeat_days ?? null,
183+ // hourly_wage: s.hourly_wage ?? null,
184+ // memo: s.memo ?? null,
185+ // };
186+ // }
183187
184188// 유저 수동 입력 스케줄 생성
185189export async function createManual (
@@ -190,6 +194,8 @@ export async function createManual(
190194
191195 const scheduleInput = {
192196 workplace : body . workplace ,
197+ workplace_name : body . workplace_name ,
198+ workplace_color : body . workplace_color ,
193199 work_date : body . work_date ,
194200 work_time : body . work_time ,
195201 day_of_week : body . day_of_week ,
0 commit comments