From e16f3d079d5776b5bd38ad2155a0d5cf19c58bf0 Mon Sep 17 00:00:00 2001 From: Byung jin Date: Thu, 25 May 2023 20:13:06 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E2=80=80=E2=9A=A1=EF=B8=8F=20::=20Entity?= =?UTF-8?q?=20=EC=98=B5=EC=85=94=EB=84=90=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PickService/Sources/Domain/Entity/OutingPassEntity.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Services/PickService/Sources/Domain/Entity/OutingPassEntity.swift b/Services/PickService/Sources/Domain/Entity/OutingPassEntity.swift index ccd5fe4b..440dcef2 100644 --- a/Services/PickService/Sources/Domain/Entity/OutingPassEntity.swift +++ b/Services/PickService/Sources/Domain/Entity/OutingPassEntity.swift @@ -1,7 +1,7 @@ import Foundation public struct OutingPassEntity: Equatable { - public let profileFileName: String + public let profileFileName: String? public let studentNumber: String public let studentName: String public let startTime: Date @@ -11,7 +11,7 @@ public struct OutingPassEntity: Equatable { public let picnicDate: Date public init( - profileFileName: String, + profileFileName: String?, studentNumber: String, studentName: String, startTime: Date, From 9cda20bff900f40ebb6c3dadbd23628add684cbc Mon Sep 17 00:00:00 2001 From: Byung jin Date: Thu, 25 May 2023 20:13:23 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20Response=20?= =?UTF-8?q?=EC=98=B5=EC=85=94=EB=84=90=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Data/Remote/Response/OutingPassResponse.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/PickService/Sources/Data/Remote/Response/OutingPassResponse.swift b/Services/PickService/Sources/Data/Remote/Response/OutingPassResponse.swift index ec03076c..ea640dd7 100644 --- a/Services/PickService/Sources/Data/Remote/Response/OutingPassResponse.swift +++ b/Services/PickService/Sources/Data/Remote/Response/OutingPassResponse.swift @@ -15,7 +15,7 @@ struct OutingPassResponse: Decodable { } - let profileFileName: String + let profileFileName: String? let studentNumber: String let studentName: String let startTime: String From 7f0fa36f0a576d829f632c35f0887c0e824ccc14 Mon Sep 17 00:00:00 2001 From: Byung jin Date: Thu, 25 May 2023 20:13:38 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20view=20=EC=98=B5?= =?UTF-8?q?=EC=84=9C=EB=84=90=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scene/OutingPass/OutingPassView.swift | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Application/Sources/Scene/OutingPass/OutingPassView.swift b/Application/Sources/Scene/OutingPass/OutingPassView.swift index 578b5bcf..3aa156b5 100644 --- a/Application/Sources/Scene/OutingPass/OutingPassView.swift +++ b/Application/Sources/Scene/OutingPass/OutingPassView.swift @@ -17,17 +17,25 @@ struct OutingPassView: View { .frame(height: 20) .padding(.bottom, 30) HStack(alignment: .center) { - AsyncImage(url: URL(string: viewModel.outingPassData?.profileFileName ?? "DefaultImage")) { image in - image - .resizable() - .scaledToFill() - } placeholder: { + if let imageURL = viewModel.outingPassData?.profileFileName { + AsyncImage(url: URL(string: imageURL)) { image in + image + .resizable() + .scaledToFill() + } placeholder: { + Image("DefaultImage") + .resizable() + .scaledToFill() + } + .frame(width: 60, height: 60) + .cornerRadius(30) + } else { Image("DefaultImage") .resizable() .scaledToFill() + .frame(width: 60, height: 60) + .cornerRadius(30) } - .frame(width: 60, height: 60) - .cornerRadius(30) Spacer().frame(width: 16) Text("\(viewModel.outingPassData?.studentNumber ?? "") \(viewModel.outingPassData?.studentName ?? "")") .sdText(type: .heading5) From 47c539b91ef6dd33eb38ab10568ec1b65faebaae Mon Sep 17 00:00:00 2001 From: juyeong525 Date: Sat, 27 May 2023 15:37:08 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=C2=A0::=20viewAppear?= =?UTF-8?q?=ED=95=A0=EB=95=8C=EB=A7=88=EB=8B=A4=20false=EC=A4=98=EC=84=9C?= =?UTF-8?q?=20=EB=B7=B0=20=EA=B9=9C=EB=B9=A1=EA=B1=B0=EB=A6=AC=EB=8A=94?= =?UTF-8?q?=EA=B1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sources/Scene/Home/HomeView.swift | 1 - Application/Sources/Scene/Home/HomeViewModel.swift | 4 ---- 2 files changed, 5 deletions(-) diff --git a/Application/Sources/Scene/Home/HomeView.swift b/Application/Sources/Scene/Home/HomeView.swift index dd57e6df..7039d912 100644 --- a/Application/Sources/Scene/Home/HomeView.swift +++ b/Application/Sources/Scene/Home/HomeView.swift @@ -51,7 +51,6 @@ struct HomeView: View, XNavigationAndTabContent { viewModel.fetchMovedClass() }) .onAppear { - viewModel.viewAppear() viewModel.fetchTodaysMeal() viewModel.fetchUserPoint() viewModel.fetchOutingPass() diff --git a/Application/Sources/Scene/Home/HomeViewModel.swift b/Application/Sources/Scene/Home/HomeViewModel.swift index c5ddd8e2..cdf88fcd 100644 --- a/Application/Sources/Scene/Home/HomeViewModel.swift +++ b/Application/Sources/Scene/Home/HomeViewModel.swift @@ -96,8 +96,4 @@ class HomeViewModel: ObservableObject { }) .disposed(by: disposeBag) } - func viewAppear() { - self.isShowMovedClass = false - self.isShowOutingView = false - } }