Skip to content

Commit

Permalink
Merge branch 'main' into Feat/#76
Browse files Browse the repository at this point in the history
  • Loading branch information
HELLOHIDI authored Nov 2, 2024
2 parents e5ad5c9 + d77fbf7 commit 8b811a6
Show file tree
Hide file tree
Showing 28 changed files with 326 additions and 466 deletions.
16 changes: 0 additions & 16 deletions SantaManito-iOS/SantaManito-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,13 @@
D28568AC2CAD031C0044C231 /* RequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28568AB2CAD031C0044C231 /* RequestHandler.swift */; };
D28568AE2CAD033C0044C231 /* ErrorHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28568AD2CAD033C0044C231 /* ErrorHandler.swift */; };
D28568B22CAD21800044C231 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28568B12CAD21800044C231 /* Config.swift */; };
D2A8F60E2C9D18FF00810BCF /* EditRoomService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F60D2C9D18FF00810BCF /* EditRoomService.swift */; };
D2A8F6122C9D1A4F00810BCF /* MakeRoomInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F6112C9D1A4F00810BCF /* MakeRoomInfo.swift */; };
D2A8F6192CA1168B00810BCF /* MatchingResultViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F6182CA1168B00810BCF /* MatchingResultViewModel.swift */; };
D2A8F61B2CA116BD00810BCF /* MatchingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F61A2CA116BD00810BCF /* MatchingViewModel.swift */; };
D2A8F61D2CA116F800810BCF /* MatchingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F61C2CA116F800810BCF /* MatchingView.swift */; };
D2A8F61F2CA1170B00810BCF /* MatchingResultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F61E2CA1170B00810BCF /* MatchingResultView.swift */; };
D2A8F6212CA1172100810BCF /* FinishView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F6202CA1172100810BCF /* FinishView.swift */; };
D2A8F6232CA1173600810BCF /* FinishViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F6222CA1173600810BCF /* FinishViewModel.swift */; };
D2A8F6252CA118EA00810BCF /* MatchRoomService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A8F6242CA118E900810BCF /* MatchRoomService.swift */; };
D2BC1A8C2C8EBCF500CB32B8 /* SMColoredTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BC1A8B2C8EBCF500CB32B8 /* SMColoredTextView.swift */; };
D2BC1A902C8F4C6400CB32B8 /* Date+.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BC1A8F2C8F4C6400CB32B8 /* Date+.swift */; };
D2BC1A922C90101E00CB32B8 /* EditMissionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BC1A912C90101E00CB32B8 /* EditMissionView.swift */; };
Expand Down Expand Up @@ -255,15 +253,13 @@
D28568AB2CAD031C0044C231 /* RequestHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequestHandler.swift; sourceTree = "<group>"; };
D28568AD2CAD033C0044C231 /* ErrorHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorHandler.swift; sourceTree = "<group>"; };
D28568B12CAD21800044C231 /* Config.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
D2A8F60D2C9D18FF00810BCF /* EditRoomService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditRoomService.swift; sourceTree = "<group>"; };
D2A8F6112C9D1A4F00810BCF /* MakeRoomInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MakeRoomInfo.swift; sourceTree = "<group>"; };
D2A8F6182CA1168B00810BCF /* MatchingResultViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingResultViewModel.swift; sourceTree = "<group>"; };
D2A8F61A2CA116BD00810BCF /* MatchingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingViewModel.swift; sourceTree = "<group>"; };
D2A8F61C2CA116F800810BCF /* MatchingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingView.swift; sourceTree = "<group>"; };
D2A8F61E2CA1170B00810BCF /* MatchingResultView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingResultView.swift; sourceTree = "<group>"; };
D2A8F6202CA1172100810BCF /* FinishView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinishView.swift; sourceTree = "<group>"; };
D2A8F6222CA1173600810BCF /* FinishViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinishViewModel.swift; sourceTree = "<group>"; };
D2A8F6242CA118E900810BCF /* MatchRoomService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchRoomService.swift; sourceTree = "<group>"; };
D2BC1A8B2C8EBCF500CB32B8 /* SMColoredTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMColoredTextView.swift; sourceTree = "<group>"; };
D2BC1A8F2C8F4C6400CB32B8 /* Date+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+.swift"; sourceTree = "<group>"; };
D2BC1A912C90101E00CB32B8 /* EditMissionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditMissionView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -360,15 +356,6 @@
path = User;
sourceTree = "<group>";
};
8779D81B2CB8DD8B00B61DEA /* Deprecated */ = {
isa = PBXGroup;
children = (
D2A8F6242CA118E900810BCF /* MatchRoomService.swift */,
D2A8F60D2C9D18FF00810BCF /* EditRoomService.swift */,
);
path = Deprecated;
sourceTree = "<group>";
};
877CA06B2C8AA1AD00D23193 /* Component */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -858,7 +845,6 @@
D2A8F60C2C9D18E700810BCF /* Room */ = {
isa = PBXGroup;
children = (
8779D81B2CB8DD8B00B61DEA /* Deprecated */,
D268793C2CAA7F8A0025A611 /* RoomAPI.swift */,
879829062C98284B00A863EC /* RoomService.swift */,
);
Expand Down Expand Up @@ -1084,7 +1070,6 @@
874017CB2CA7E6970096E847 /* SMPasteBoard.swift in Sources */,
874017B02CA29C820096E847 /* MyPageViewModel.swift in Sources */,
877EA2412C88ABA00073FFBD /* PushNotificationService.swift in Sources */,
D2A8F6252CA118EA00810BCF /* MatchRoomService.swift in Sources */,
D268793F2CAA80580025A611 /* BaseAPI.swift in Sources */,
D25570E92C8E858A00CCC226 /* EditRoomInfoView.swift in Sources */,
D26BFA802C91692700C5CF86 /* SMInfoView.swift in Sources */,
Expand Down Expand Up @@ -1114,7 +1099,6 @@
879829072C98284B00A863EC /* RoomService.swift in Sources */,
87873BDC2CAC29E900E368BF /* AppDelegate.swift in Sources */,
D2A8F61B2CA116BD00810BCF /* MatchingViewModel.swift in Sources */,
D2A8F60E2C9D18FF00810BCF /* EditRoomService.swift in Sources */,
D2A8F61D2CA116F800810BCF /* MatchingView.swift in Sources */,
879829052C9827B200A863EC /* HomeViewModel.swift in Sources */,
D26BFA912C919D0000C5CF86 /* ManitoWaitingRoomView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import Foundation

struct CreateRoomRequest: Encodable {
var roomName: String
var expirationDate: String
var expirationDate: Date
var missionContents: [String]
}

extension CreateRoomRequest {
init(_ room: MakeRoomInfo, _ mission: [Mission]) {
self.roomName = room.name
self.expirationDate = room.expirationDate.ISO8601Format() //TODO: DateFormat 어떤식으로 Request보낼지에 따라 결정
self.expirationDate = room.expirationDate
self.missionContents = mission.map { $0.content } // TODO: 미션로직 수정필요하다면
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ struct RoomDetailResponse: Decodable {
let id: String
let roomName: String
let invitationCode: String
let createdAt: String //TODO: 서버 확정 후 Date로 변경
let expirationDate: String //TODO: 서버 확정 후 Date로 변경
let matchingDate: String? //TODO: 서버 확정 후 Date로 변경
let deletedByCreatorDate: String? //TODO: 서버 확정 후 Date로 변경
let createdAt: Date
let expirationDate: Date
let matchingDate: Date?
let deletedByCreatorDate: Date?
let creator: UserResponse
let missions: [MissionResponse]
let members: [MemberResponse]
Expand Down Expand Up @@ -44,8 +44,8 @@ extension RoomDetailResponse {
creatorName: self.creator.username,
members: members.map { $0.toEntity()},
mission: missions.map { $0.toEntity()} ,
createdAt: Date().addingTimeInterval(-5 * 24 * 60 * 60), // TODO: 위 주석 해제하면 createdAt에 연결해야함.
expirationDate: Date().addingTimeInterval(-3 * 12 * 60 * 60)
createdAt: self.createdAt,
expirationDate: self.expirationDate
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import Foundation

struct RoomStateFactory {
static func create(_ dto: RoomDetailResponse) -> RoomState {
return .notStarted
guard dto.deletedByCreatorDate == nil else { return .deleted }
// guard dto.expirationDate > Date() else { return .completed } //TODO: 서버 DTO. Date 형식 정해지면 주석 해제
guard dto.expirationDate > Date() else { return .completed }
guard dto.matchingDate != nil else { return .notStarted }
return .inProgress
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct RoomDetail: Hashable {


var isHost: Bool {
UserDefaultsService.userID == creatorID
UserDefaultsService.shared.userID == creatorID
}

// 오늘부터 만료일까지 (한국 날짜 기준)
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8b811a6

Please sign in to comment.