|
@@ -12,7 +12,7 @@ struct FiltersPanelView: View {
|
|
|
|
|
|
|
|
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
|
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
|
|
@State private var expanded: Set<FilterSection> = [
|
|
@State private var expanded: Set<FilterSection> = [
|
|
|
- .jobTitle, .exclude, .location, .employment, .experience
|
|
|
|
|
|
|
+ .jobTitle, .location, .employment, .experience
|
|
|
]
|
|
]
|
|
|
@State private var salaryText: String = ""
|
|
@State private var salaryText: String = ""
|
|
|
|
|
|
|
@@ -28,7 +28,6 @@ struct FiltersPanelView: View {
|
|
|
ScrollView {
|
|
ScrollView {
|
|
|
VStack(spacing: 0) {
|
|
VStack(spacing: 0) {
|
|
|
accordion(.jobTitle) { jobTitleSection }
|
|
accordion(.jobTitle) { jobTitleSection }
|
|
|
- accordion(.exclude) { excludeSection }
|
|
|
|
|
accordion(.location) { locationSection }
|
|
accordion(.location) { locationSection }
|
|
|
accordion(.employment) { employmentSection }
|
|
accordion(.employment) { employmentSection }
|
|
|
accordion(.experience) { experienceSection }
|
|
accordion(.experience) { experienceSection }
|
|
@@ -115,15 +114,6 @@ struct FiltersPanelView: View {
|
|
|
.onChange(of: criteria.keywords) { _, _ in onChange() }
|
|
.onChange(of: criteria.keywords) { _, _ in onChange() }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private var excludeSection: some View {
|
|
|
|
|
- FilterTextField(
|
|
|
|
|
- title: "Exclude keywords",
|
|
|
|
|
- prompt: "Words to exclude",
|
|
|
|
|
- text: $criteria.excludedKeywords
|
|
|
|
|
- )
|
|
|
|
|
- .onChange(of: criteria.excludedKeywords) { _, _ in onChange() }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private var locationSection: some View {
|
|
private var locationSection: some View {
|
|
|
VStack(alignment: .leading, spacing: AppSpacing.sm) {
|
|
VStack(alignment: .leading, spacing: AppSpacing.sm) {
|
|
|
FilterTextField(
|
|
FilterTextField(
|
|
@@ -222,12 +212,11 @@ struct FiltersPanelView: View {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private enum FilterSection: Hashable {
|
|
private enum FilterSection: Hashable {
|
|
|
- case jobTitle, exclude, location, employment, experience, salary
|
|
|
|
|
|
|
+ case jobTitle, location, employment, experience, salary
|
|
|
|
|
|
|
|
var title: String {
|
|
var title: String {
|
|
|
switch self {
|
|
switch self {
|
|
|
case .jobTitle: return "Job Title & Keywords"
|
|
case .jobTitle: return "Job Title & Keywords"
|
|
|
- case .exclude: return "Exclude Keywords"
|
|
|
|
|
case .location: return "Location"
|
|
case .location: return "Location"
|
|
|
case .employment: return "Employment Type"
|
|
case .employment: return "Employment Type"
|
|
|
case .experience: return "Experience Level"
|
|
case .experience: return "Experience Level"
|