diff --git a/KkuMulKum/Application/SceneDelegate.swift b/KkuMulKum/Application/SceneDelegate.swift index 2af0dffc..bd9b87d7 100644 --- a/KkuMulKum/Application/SceneDelegate.swift +++ b/KkuMulKum/Application/SceneDelegate.swift @@ -36,7 +36,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { DispatchQueue.main.async { if success { print("Auto login successful, showing main screen") - self?.showLoginScreen() + self?.showMainScreen() } else { print("Auto login failed, showing login screen") self?.showLoginScreen() diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift index fa68f07c..424e143e 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift @@ -60,6 +60,7 @@ class ReadyStatusView: BaseView { collectionViewLayout: UICollectionViewFlowLayout().then { $0.scrollDirection = .vertical $0.estimatedItemSize = .init(width: Screen.width(335), height: Screen.height(72)) + $0.minimumInteritemSpacing = 10 }).then { $0.backgroundColor = .clear $0.isScrollEnabled = false diff --git a/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift b/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift index 4021acdb..302bc85b 100644 --- a/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift +++ b/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift @@ -8,10 +8,57 @@ import Foundation protocol TardyServiceType { - func getPromiseTardyInfo(with promiseID: Int) -> ResponseBodyDTO? + func fetchTardyInfo(with promiseID: Int) async throws -> ResponseBodyDTO? + func updatePromiseCompletion(with promiseID: Int) async throws -> ResponseBodyDTO? +} + +extension PromiseService: TardyServiceType { + func fetchTardyInfo(with promiseID: Int) async throws -> ResponseBodyDTO? { + return try await request( + with: .fetchTardyInfo( + promiseID: promiseID + ) + ) + } + + func updatePromiseCompletion(with promiseID: Int) async throws -> ResponseBodyDTO? { + return try await request( + with: .updatePromiseCompletion( + promiseID: promiseID + ) + ) + } } final class MockTardyService: TardyServiceType { + func fetchTardyInfo(with promiseID: Int) -> ResponseBodyDTO? { + let mockData = TardyInfoModel( + penalty: "티라미수 케익 릴스", + isPastDue: true, + lateComers: [Comer( + participantId: 1, + name: "유짐이", + profileImageURL: "" + )] + ) + + return ResponseBodyDTO.init( + success: true, + data: mockData, + error: nil + ) + } + + func updatePromiseCompletion(with promiseID: Int) -> ResponseBodyDTO? { + let mockData = EmptyModel() + + return ResponseBodyDTO.init( + success: true, + data: mockData, + error: nil + ) + } + func getPromiseTardyInfo(with promiseID: Int) -> ResponseBodyDTO? { let mockData = TardyInfoModel( penalty: "티라미수 케익 릴스",