From 0074bb6c96b7ba95ee209366a59a28d11bef6068 Mon Sep 17 00:00:00 2001 From: JaeSunEo Date: Wed, 21 Jan 2026 22:07:49 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20#135=20=EB=B9=88=20=ED=99=94=EB=A9=B4?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Treatment/TreatmentFilterView.swift | 39 ++++++++--- .../treatment_icon/Contents.json | 6 ++ .../Contents.json | 12 ++++ .../illustration_nosearch.svg | 66 +++++++++++++++++++ 4 files changed, 115 insertions(+), 8 deletions(-) create mode 100644 Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/Contents.json create mode 100644 Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/Contents.json create mode 100644 Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/illustration_nosearch.svg diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift index 013fb197..da2233c1 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift @@ -41,14 +41,21 @@ struct TreatmentFilterView: View { } .frame(height: 34.adjustedH) .padding(.horizontal, 25.adjustedW) - ForEach(viewModel.treatments, id: \.id) { treatment in - TreatmentRowView( - displayMode: .checkBoxView, - treatmentEntity: treatment, - isSelected: .constant(viewModel.isSelected(treatment)), - action: { viewModel.addTreatment(treatment) } - ) - } .padding(.horizontal, 24.adjustedW) + if viewModel.treatments.isEmpty { + Spacer() + .frame(height: 148.adjustedH) + filterEmptyView + } else { + ForEach(viewModel.treatments, id: \.id) { treatment in + TreatmentRowView( + displayMode: .checkBoxView, + treatmentEntity: treatment, + isSelected: .constant(viewModel.isSelected(treatment)), + action: { viewModel.addTreatment(treatment) } + ) + } + .padding(.horizontal, 24.adjustedW) + } } } @@ -60,3 +67,19 @@ struct TreatmentFilterView: View { } } + +extension TreatmentFilterView { + + private var filterEmptyView: some View { + VStack(alignment: .center, spacing: 0) { + Image(.illustrationNosearch) + Spacer() + .frame(height: 16.adjustedH) + VStack(alignment: .center, spacing: 0) { + TypographyText("찾으시는 시술이 없습니다.", style: .body1_r_14, color: .gray600) + TypographyText("다른 시술명을 입력해보세요.", style: .body1_r_14, color: .gray600) + } + .frame(height: 40.adjustedH) + } + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/Contents.json b/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/Contents.json new file mode 100644 index 00000000..ad16deb4 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "illustration_nosearch.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/illustration_nosearch.svg b/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/illustration_nosearch.svg new file mode 100644 index 00000000..97f92019 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/treatment_icon/illustration_nosearch.imageset/illustration_nosearch.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +