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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +