Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/kotlin/com/moa/controller/HomeController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ class HomeController(
val earnings = workdayService.getMonthlyEarnings(member.id, today.year, today.monthValue)
val schedule = workdayService.getSchedule(member.id, today)
val policy = workPolicyService.getCurrent(member.id)

return ApiResponse.success(
HomeResponse(
workplace = profile.workplace,
workedEarnings = earnings.workedEarnings,
standardSalary = earnings.standardSalary,
dailyPay = schedule.dailyPay,
type = schedule.type,
clockInTime = policy.clockInTime,
clockOutTime = policy.clockOutTime,
)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/moa/controller/MemberController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MemberController(
fun getMember(@Auth member: AuthMemberInfo) =
ApiResponse.success(memberService.getMember(member.id))

@DeleteMapping
@PostMapping("/withdrawal")
fun deleteMember(
@Auth member: AuthMemberInfo,
@RequestBody req: WithdrawalRequest,
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/com/moa/service/dto/HomeResponse.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.moa.service.dto

import com.fasterxml.jackson.annotation.JsonFormat
import com.moa.entity.DailyWorkScheduleType
import java.time.LocalTime

data class HomeResponse(
val workplace: String?,
val workedEarnings: Int,
val standardSalary: Int,
val dailyPay: Int,
val type: DailyWorkScheduleType,
@JsonFormat(pattern = "HH:mm")
val clockInTime: LocalTime,
@JsonFormat(pattern = "HH:mm")
Expand Down
Loading