diff --git a/Solply/Solply/Global/Enum/CustomLoadingType.swift b/Solply/Solply/Global/Enum/CustomLoadingType.swift index 22f01c17..97ca224e 100644 --- a/Solply/Solply/Global/Enum/CustomLoadingType.swift +++ b/Solply/Solply/Global/Enum/CustomLoadingType.swift @@ -17,4 +17,5 @@ enum CustomLoadingType { case placeDetailLoading case courseDetailLoading case archiveFolderLoading + case recordListLoading } diff --git a/Solply/Solply/Global/Modifier/CustomLoadingModifier.swift b/Solply/Solply/Global/Modifier/CustomLoadingModifier.swift index 6d3f91a8..76878fba 100644 --- a/Solply/Solply/Global/Modifier/CustomLoadingModifier.swift +++ b/Solply/Solply/Global/Modifier/CustomLoadingModifier.swift @@ -379,6 +379,57 @@ extension View { } ) ) + + // MARK: - RecordListLoading + + case .recordListLoading: + self.modifier( + CustomLoadingModifier( + isLoading: isLoading, + loadingView: { + VStack(alignment: .center, spacing: 0) { + ForEach(0..<2) { index in + VStack(alignment: .leading, spacing : 16.adjustedHeight) { + HStack(alignment: .center, spacing: 8.adjustedWidth) { + SolplySkeletonView(width: 24.adjusted, height: 24.adjusted, cornerRadius: 0) + .capsuleClipped() + + SolplySkeletonView(font: .body_14_m, width: 60.adjustedWidth) + } + + HStack(alignment: .center, spacing: 8.adjustedWidth) { + ForEach(0..<4) { _ in + SolplySkeletonView(width: 72.adjusted, height: 72.adjusted, cornerRadius: 12) + } + } + + VStack(alignment: .leading, spacing: 2.adjustedHeight) { + SolplySkeletonView(font: .body_14_r, width: 343.adjustedWidth, cornerRadius: 4) + SolplySkeletonView(font: .body_14_r, width: 343.adjustedWidth) + } + + SolplySkeletonView(font: .body_14_m, width: 127.adjustedWidth, cornerRadius: 4) + } + .padding(.vertical, 20.adjustedHeight) + .overlay(alignment: .bottom) { + if index == 0 { + Rectangle() + .frame(height: 1) + .foregroundStyle(.gray200) + } + } + .padding(.horizontal, 20.adjustedWidth) + } + } + } + ) + ) } } } + +#Preview { + Text("") + .customLoading(.recordListLoading, isLoading: true) + Spacer() +} diff --git a/Solply/Solply/Network/DTO/Place/RequestDTO/PlaceRecordWriteRequestDTO.swift b/Solply/Solply/Network/DTO/Place/RequestDTO/PlaceRecordWriteRequestDTO.swift index 81065777..a4c699bc 100644 --- a/Solply/Solply/Network/DTO/Place/RequestDTO/PlaceRecordWriteRequestDTO.swift +++ b/Solply/Solply/Network/DTO/Place/RequestDTO/PlaceRecordWriteRequestDTO.swift @@ -10,7 +10,7 @@ import Foundation struct PlaceRecordWriteRequestDTO: RequestModelType { let placeId: Int let visitedAt: String - let visitTimeSlot: VisitTime + let visitTimeSlot: String let content: String let imageKeys: [String] } diff --git a/Solply/Solply/Presentation/AIRecommend/AIRecommendPrompt/View/AIRecommendPromptView.swift b/Solply/Solply/Presentation/AIRecommend/AIRecommendPrompt/View/AIRecommendPromptView.swift index ec44b277..8b1192ad 100644 --- a/Solply/Solply/Presentation/AIRecommend/AIRecommendPrompt/View/AIRecommendPromptView.swift +++ b/Solply/Solply/Presentation/AIRecommend/AIRecommendPrompt/View/AIRecommendPromptView.swift @@ -33,6 +33,9 @@ struct AIRecommendPromptView: View { appCoordinator.goBack() }) .customModal() + .onTapGesture { + hideKeyboard() + } } } diff --git a/Solply/Solply/Presentation/Record/RecordList/View/RecordListView.swift b/Solply/Solply/Presentation/Record/RecordList/View/RecordListView.swift index 5943cea7..56d73837 100644 --- a/Solply/Solply/Presentation/Record/RecordList/View/RecordListView.swift +++ b/Solply/Solply/Presentation/Record/RecordList/View/RecordListView.swift @@ -31,6 +31,7 @@ struct RecordListView: View { } recordList + .customLoading(.recordListLoading, isLoading: store.state.isLoading) bottomPadding } diff --git a/Solply/Solply/Presentation/Record/RecordWrite/Intent/RecordWriteStore.swift b/Solply/Solply/Presentation/Record/RecordWrite/Intent/RecordWriteStore.swift index 49356bef..c5a47ae8 100644 --- a/Solply/Solply/Presentation/Record/RecordWrite/Intent/RecordWriteStore.swift +++ b/Solply/Solply/Presentation/Record/RecordWrite/Intent/RecordWriteStore.swift @@ -44,7 +44,7 @@ final class RecordWriteStore: ObservableObject { let request = PlaceRecordWriteRequestDTO( placeId: placeId, visitedAt: vistedAt, - visitTimeSlot: visitTimeSlot, + visitTimeSlot: visitTimeSlot.rawValue, content: state.recordText, imageKeys: imageKeyStrings ) diff --git a/Solply/Solply/Presentation/Record/RecordWrite/View/RecordWriteView.swift b/Solply/Solply/Presentation/Record/RecordWrite/View/RecordWriteView.swift index 235164a3..cfaf6aa0 100644 --- a/Solply/Solply/Presentation/Record/RecordWrite/View/RecordWriteView.swift +++ b/Solply/Solply/Presentation/Record/RecordWrite/View/RecordWriteView.swift @@ -78,6 +78,9 @@ struct RecordWriteView: View { } .padding(.bottom, 124.adjustedHeight) } + .onTapGesture { + hideKeyboard() + } .overlay(alignment: .bottom) { registerRecordButton .padding(.bottom, 4.adjustedHeight)