Skip to content

Commit 93a41ac

Browse files
committed
[#73] 잡버그 fix.
1 parent 11e39cd commit 93a41ac

File tree

12 files changed

+195
-139
lines changed

12 files changed

+195
-139
lines changed

Spon-us.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
DF5AB1542B8228CC0061F421 /* MakeReportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5AB1532B8228CC0061F421 /* MakeReportViewModel.swift */; };
126126
DF5AB1572B8266D90061F421 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DF5AB1562B8266D90061F421 /* GoogleService-Info.plist */; };
127127
DF5AB1592B826ABB0061F421 /* CompanyPostView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5AB1582B826ABB0061F421 /* CompanyPostView.swift */; };
128+
DF5AB15B2B827BAB0061F421 /* ReportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5AB15A2B827BAB0061F421 /* ReportViewModel.swift */; };
128129
DF5B7E922B7FA430001C009C /* PortfolioOfferViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5B7E912B7FA430001C009C /* PortfolioOfferViewModel.swift */; };
129130
DF5B7E942B808DF1001C009C /* EditAnnouncementViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5B7E932B808DF0001C009C /* EditAnnouncementViewModel.swift */; };
130131
DF5B7E962B809257001C009C /* EditAnnouncementModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5B7E952B809257001C009C /* EditAnnouncementModel.swift */; };
@@ -231,6 +232,7 @@
231232
DF5AB1532B8228CC0061F421 /* MakeReportViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MakeReportViewModel.swift; sourceTree = "<group>"; };
232233
DF5AB1562B8266D90061F421 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
233234
DF5AB1582B826ABB0061F421 /* CompanyPostView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompanyPostView.swift; sourceTree = "<group>"; };
235+
DF5AB15A2B827BAB0061F421 /* ReportViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportViewModel.swift; sourceTree = "<group>"; };
234236
DF5B7E912B7FA430001C009C /* PortfolioOfferViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PortfolioOfferViewModel.swift; sourceTree = "<group>"; };
235237
DF5B7E932B808DF0001C009C /* EditAnnouncementViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditAnnouncementViewModel.swift; sourceTree = "<group>"; };
236238
DF5B7E952B809257001C009C /* EditAnnouncementModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditAnnouncementModel.swift; sourceTree = "<group>"; };
@@ -646,6 +648,7 @@
646648
DF5B7E932B808DF0001C009C /* EditAnnouncementViewModel.swift */,
647649
DF5B7E952B809257001C009C /* EditAnnouncementModel.swift */,
648650
DF5AB1532B8228CC0061F421 /* MakeReportViewModel.swift */,
651+
DF5AB15A2B827BAB0061F421 /* ReportViewModel.swift */,
649652
);
650653
path = Portfolio;
651654
sourceTree = "<group>";
@@ -838,6 +841,7 @@
838841
1031EC7C2B68B9F20016655B /* AnnouncementView.swift in Sources */,
839842
106720022B5835FA00493354 /* SendOfferView.swift in Sources */,
840843
3B81BCB22B622EBF0067E9CB /* StoreKitManager.swift in Sources */,
844+
DF5AB15B2B827BAB0061F421 /* ReportViewModel.swift in Sources */,
841845
10C8AC612B5C340D00B40547 /* SendOfferPostView.swift in Sources */,
842846
807BF83F2B51BCD400A659B9 /* SearchView.swift in Sources */,
843847
806AF86A2B79DBD0008F7F62 /* CategoryModel.swift in Sources */,

Spon-us/ContentView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import PhotosUI
1313
struct ContentView: View {
1414
@AppStorage("loginAccount") var isLoggedIn: String?
1515
@State private var selectedTab: Int = 0
16-
16+
1717
var body: some View {
1818
TabView(selection: $selectedTab) {
1919
HomeView()
@@ -31,15 +31,15 @@ struct ContentView: View {
3131
.font(.English18)
3232
}
3333
.tag(1)
34-
34+
3535
CategoryView()
3636
.tabItem {
3737
Image(selectedTab == 2 ? "ic_discovery_check" : "ic_discovery")
3838
Text("CATEGORY")
3939
.font(.English18)
4040
}
4141
.tag(2)
42-
42+
4343
MyView(rootIsActive: .constant(false))
4444
.tabItem {
4545
Image(selectedTab == 3 ? "ic_mypage_check" : "ic_mypage")

Spon-us/Helper/Extension.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,9 @@ final class AuthInterceptor: RequestInterceptor {
192192
}
193193
}
194194
}
195+
196+
extension UIApplication {
197+
func endEditing() {
198+
sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
199+
}
200+
}

Spon-us/Model/MyPage/MyOrganizationViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class MyOrganizationViewModel: ObservableObject {
5959
self.myOrganization = myOrganizationResponse.content
6060
print(myOrganizationResponse)
6161
} catch {
62+
print(try! response.mapJSON())
6263
print("Error parsing response: \(error)")
6364
}
6465

Spon-us/Model/MyPage/OrganizationModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct OrganizationResponse: Codable {
4646
let location: String?
4747
let description: String?
4848
// let imageUrl: String?
49-
let imageUrl: String
49+
let imageUrl: String?
5050
let organizationType: String
5151
// let suborganizationType: String
5252
let suborganizationType: String?
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// ReportViewModel.swift
3+
// Spon-us
4+
//
5+
// Created by 박현수 on 2/19/24.
6+
//
7+
8+
import Foundation
9+
10+
// 최상위 응답 객체
11+
struct ReportResponseModel: Codable {
12+
let statusCode: String
13+
let message: String
14+
let content: ReportContent
15+
}
16+
17+
// 'content' 필드 내용
18+
struct ReportContent: Codable {
19+
let id: Int
20+
let writerId: Int
21+
let title: String
22+
let content: String
23+
let reportImages: [ReportImage]
24+
let reportAttachments: [ReportAttachment]
25+
}
26+
27+
// 'reportImages' 배열 내의 객체
28+
struct ReportImage: Codable {
29+
let id: Int
30+
let name: String
31+
let url: String
32+
}
33+
34+
// 'reportAttachments' 배열 내의 객체
35+
struct ReportAttachment: Codable {
36+
let id: Int
37+
let name: String
38+
let url: String
39+
}

Spon-us/View/Category/CategoryView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ struct CategoryCell: View {
171171
NavigationLink{SearchPostView(announcementId: categoryContent.id, selectedSaveButton: $isBookmarked)} label: {
172172
VStack(spacing: 0){
173173
HStack(alignment: .top, spacing: 0){
174+
174175
AsyncImageView(url: URL(string: categoryContent.mainImage.url))
175-
.aspectRatio(contentMode: .fill)
176176
.frame(width: 95, height: 95)
177177
.clipped()
178178
.padding(.trailing, 16)

Spon-us/View/Post/NewPostView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ struct NewPostView: View {
196196
}
197197
print("disappear")
198198
}
199+
.onTapGesture {
200+
UIApplication.shared.endEditing()
201+
}
199202
}
200203
}
201204
#Preview {

Spon-us/View/ReceivedOffer/EditPostView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ struct SponUsPostFileCell: View {
253253
Text(text)
254254

255255
if (selectedURLsFile1.isEmpty && selectedURLsFile2.isEmpty && selectedURLsFile3.isEmpty) {
256-
Image("ic_check")
256+
Text("")
257257
}
258258
else{
259259
Text("")

0 commit comments

Comments
 (0)