Skip to content

Commit 4d6c0af

Browse files
committed
Merge branch 'develop' into chore/#220-qa
2 parents 9392ad7 + 5228bfa commit 4d6c0af

51 files changed

Lines changed: 258 additions & 186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CERTI-iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,12 @@
290290
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
291291
CODE_SIGN_ENTITLEMENTS = "CERTI-iOS/CERTI-iOS.entitlements";
292292
CODE_SIGN_STYLE = Automatic;
293-
CURRENT_PROJECT_VERSION = 1;
293+
CURRENT_PROJECT_VERSION = 7;
294294
DEVELOPMENT_TEAM = 42CZFA579G;
295295
ENABLE_PREVIEWS = YES;
296296
GENERATE_INFOPLIST_FILE = YES;
297297
INFOPLIST_FILE = "CERTI-iOS/Global/Resources/Info.plist";
298+
INFOPLIST_KEY_CFBundleDisplayName = "따요";
298299
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
299300
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
300301
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
@@ -323,11 +324,12 @@
323324
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
324325
CODE_SIGN_ENTITLEMENTS = "CERTI-iOS/CERTI-iOS.entitlements";
325326
CODE_SIGN_STYLE = Automatic;
326-
CURRENT_PROJECT_VERSION = 1;
327+
CURRENT_PROJECT_VERSION = 7;
327328
DEVELOPMENT_TEAM = 42CZFA579G;
328329
ENABLE_PREVIEWS = YES;
329330
GENERATE_INFOPLIST_FILE = YES;
330331
INFOPLIST_FILE = "CERTI-iOS/Global/Resources/Info.plist";
332+
INFOPLIST_KEY_CFBundleDisplayName = "따요";
331333
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
332334
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
333335
INFOPLIST_KEY_UILaunchScreen_Generation = YES;

CERTI-iOS/Data/Network/Comment/CommentAPI.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import Moya
1111

1212
enum CommentAPI {
13-
case getComment(certificationId: Int, page: Int, size: Int, sort: String)
13+
case getComment(certificationId: Int, page: Int, size: Int, commentSortType: String)
1414
case addComment(request: CommentRequestDTO)
1515
case deleteComment(commentId: Int)
1616
case likeComment(commentId: Int)
@@ -52,12 +52,12 @@ extension CommentAPI: BaseTargetType {
5252

5353
var task: Moya.Task {
5454
switch self {
55-
case .getComment(let certificationId, let page, let size, let sort):
55+
case .getComment(let certificationId, let page, let size, let commentSortType):
5656
return .requestParameters(parameters: [
5757
"certificationId": certificationId,
5858
"page": page,
5959
"size": size,
60-
"sort": sort
60+
"commentSortType": commentSortType
6161
], encoding: URLEncoding.queryString)
6262
case .addComment(let request):
6363
return .requestJSONEncodable(request)

CERTI-iOS/Data/Network/Comment/CommentService.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import Moya
1111

1212
protocol CommentServiceProtocol {
13-
func getComment(certificationId: Int, page: Int, size: Int, sort: String) async -> Result<CommentListResponseDTO, NetworkError>
13+
func getComment(certificationId: Int, page: Int, size: Int, commentSortType: String) async -> Result<CommentListResponseDTO, NetworkError>
1414
func addComment(request: CommentRequestDTO) async ->Result<Void, NetworkError>
1515
func deleteComment(commentId: Int) async ->Result<Void, NetworkError>
1616
func likeComment(commentId: Int) async -> Result<Void, NetworkError>
@@ -19,8 +19,8 @@ protocol CommentServiceProtocol {
1919
final class CommentService: BaseService, CommentServiceProtocol {
2020
private let provider = MoyaProvider<CommentAPI>.init(plugins: [MoyaPlugin()])
2121

22-
func getComment(certificationId: Int, page: Int, size: Int, sort: String) async -> Result<CommentListResponseDTO, NetworkError> {
23-
return await requestDecodable(provider, .getComment(certificationId: certificationId, page: page, size: size, sort: sort))
22+
func getComment(certificationId: Int, page: Int, size: Int, commentSortType: String) async -> Result<CommentListResponseDTO, NetworkError> {
23+
return await requestDecodable(provider, .getComment(certificationId: certificationId, page: page, size: size, commentSortType: commentSortType))
2424
}
2525

2626
func addComment(request: CommentRequestDTO) async -> Result<Void, NetworkError> {

CERTI-iOS/Data/Repositories/DefaultCommentRepository.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ final class DefaultCommentRepository: CommentRepository {
1616
self.service = service
1717
}
1818

19-
func getComment(certificationId: Int, page: Int, size: Int, sort: String) async -> Result<CommentEntity, NetworkError> {
20-
let result = await service.getComment(certificationId: certificationId, page: page, size: size, sort: sort)
19+
func getComment(certificationId: Int, page: Int, size: Int, commentSortType: String) async -> Result<CommentEntity, NetworkError> {
20+
let result = await service.getComment(certificationId: certificationId, page: page, size: size, commentSortType: commentSortType)
2121

2222
switch result {
2323
case .success(let dto):

CERTI-iOS/Domain/Interfaces/Repositories/CommentRepository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import Moya
1111

1212
protocol CommentRepository {
13-
func getComment(certificationId: Int, page: Int, size: Int, sort: String) async -> Result<CommentEntity, NetworkError>
13+
func getComment(certificationId: Int, page: Int, size: Int, commentSortType: String) async -> Result<CommentEntity, NetworkError>
1414
func addComment(request: AddCommentEntity) async -> Result<Void, NetworkError>
1515
func deleteComment(commentId: Int) async -> Result<Void, NetworkError>
1616
func likeComment(commentId: Int) async -> Result<Void, NetworkError>

CERTI-iOS/Domain/UseCases/Comment/FetchCommentUseCase.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
protocol FetchCommentUseCase {
11-
func execute(certificationId: Int, page: Int, size: Int, sort: String) async -> Result<CommentEntity, NetworkError>
11+
func execute(certificationId: Int, page: Int, size: Int, commentSortType: String) async -> Result<CommentEntity, NetworkError>
1212
}
1313

1414
final class DefaultFetchCommentUseCase: FetchCommentUseCase {
@@ -18,7 +18,7 @@ final class DefaultFetchCommentUseCase: FetchCommentUseCase {
1818
self.repository = repository
1919
}
2020

21-
func execute(certificationId: Int, page: Int, size: Int, sort: String) async -> Result<CommentEntity, NetworkError> {
22-
return await repository.getComment(certificationId: certificationId, page: page, size: size, sort: sort)
21+
func execute(certificationId: Int, page: Int, size: Int, commentSortType: String) async -> Result<CommentEntity, NetworkError> {
22+
return await repository.getComment(certificationId: certificationId, page: page, size: size, commentSortType: commentSortType)
2323
}
2424
}

CERTI-iOS/Global/Components/DatePickerBox.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ struct DatePickerBox: View {
1818
formatter.locale = Locale(identifier: "ko_KR")
1919
return formatter
2020
}
21+
private var today: Date {
22+
Calendar.current.startOfDay(for: Date())
23+
}
2124

2225
var body: some View {
2326
VStack(alignment: .leading, spacing: 0) {
@@ -64,7 +67,7 @@ struct DatePickerBox: View {
6467
self.isCalendarVisible = false
6568
}
6669
}
67-
), displayedComponents: .date)
70+
), in: today..., displayedComponents: .date)
6871
.datePickerStyle(.graphical)
6972
.background(
7073
RoundedRectangle(cornerRadius: 12)

CERTI-iOS/Global/Extensions/String+.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ extension String {
8080
return "\(outputFormatter.string(from: date))"
8181
}
8282

83+
func toCommentDateString() -> String {
84+
let inputFormatter = DateFormatter()
85+
inputFormatter.locale = Locale(identifier: "ko_KR")
86+
inputFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS"
87+
88+
guard let date = inputFormatter.date(from: self) else {
89+
return self
90+
}
91+
92+
let outputFormatter = DateFormatter()
93+
outputFormatter.locale = Locale(identifier: "ko_KR")
94+
outputFormatter.dateFormat = "yyyy.MM.dd"
95+
96+
return outputFormatter.string(from: date)
97+
}
98+
8399
func toBirthDateString() -> String {
84100
let inputFormatter = DateFormatter()
85101
inputFormatter.dateFormat = "yyyy-MM-dd"
65 KB
Loading

CERTI-iOS/Global/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"images" : [
33
{
4-
"filename" : "Frame 2087329325.png",
4+
"filename" : "Certi_logo_iOS.png",
55
"idiom" : "universal",
66
"platform" : "ios",
77
"size" : "1024x1024"

0 commit comments

Comments
 (0)