-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
๐ :: FilterFeature ์ ์ #221
Conversation
} else { | ||
if Int(upperValue) ?? 0 < lowValue { | ||
model?.updateUpperScoreValue(upperValue: lowValue) | ||
} else { | ||
model?.updateUpperScoreValue(upperValue: Int(upperValue) ?? 0) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฑฐ else if ๋ก ์ฒ๋ฆฌํ๋๊ฑฐ ์ด๋ค๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ํ์ผ View๋ public ์ํด๋ ๋ ๊ฑฐ๊ฐ์์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FilterOption ๊ตฌ์กฐ์ฒด๋ public์ผ๋ก ์ํด๋ ๋ ๊ฑฐ๊ฐ์์
@@ -1,7 +1,7 @@ | |||
import Foundation | |||
|
|||
final class RootModel: ObservableObject, RootStateProtocol { | |||
@Published var sceneType: RootSceneType = .signin | |||
@Published var sceneType: RootSceneType = .main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ค์ ๋๋ ค์ฃผ์์ฃ
filterBuildable: any FilterBuildable, | ||
splashBuildable: any SplashBuildable, | ||
container: MVIContainer<RootIntentProtocol, RootStateProtocol> | ||
) { | ||
self.signinBuildable = signinBuildable | ||
self.inputInformationBuildable = inputInformationBuildable | ||
self.mainBuildable = mainBuildable | ||
self.filterBuildable = filterBuildable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root์์ filterBuildable์ ๋ฐ๋ ์ด์ ๊ฐ ์๋์?
if lowValue.contains("๋ง์") { | ||
low = lowValue.replacingOccurrences(of: "๋ง์", with: "") | ||
} else if lowValue.contains("๋ง") { | ||
var replacing = lowValue.replacingOccurrences(of: "๋ง", with: "") | ||
replacing.removeLast() | ||
low = replacing | ||
} else { | ||
low = lowValue | ||
} | ||
if Int(low) ?? 0 > upperValue { | ||
model?.updateLowerSalaryValue(lowerValue: upperValue) | ||
} else { | ||
model?.updateLowerSalaryValue(lowerValue: Int(low) ?? 0) | ||
} | ||
} | ||
|
||
func upperSalaryValue(lowValue: Int, upperValue: String) { | ||
let upp: String | ||
if upperValue.contains("๋ง์") { | ||
upp = upperValue.replacingOccurrences(of: "๋ง์", with: "") | ||
} else if upperValue.contains("๋ง") { | ||
var replacing = upperValue.replacingOccurrences(of: "๋ง", with: "") | ||
replacing.removeLast() | ||
upp = replacing | ||
} else { | ||
upp = upperValue | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฑฐ ์ค๋ณต๋๋ ๋ก์ง์ธ๊ฑฐ๊ฐ์๋ฐ ๋ฐ๋ก method ๋นผ์ ์ฒ๋ฆฌํ๋๊ฑด ์ด๋ค๊ฐ์?
func updateIsError(isError: Bool) { | ||
self.isError = isError | ||
} | ||
|
||
func updateIsPresentedTeckStackAppend(isPresented: Bool) { | ||
self.isPresentedTechStackAppend = isPresented | ||
} | ||
|
||
func updateTeckStacks(techStacks: [String]) { | ||
self.techStacks = techStacks | ||
} | ||
|
||
func updateIsLoading(isLoading: Bool) { | ||
self.isLoading = isLoading | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isError๋ isLoading ์ฐ๋๊ณณ์ด ์๋๋ฐ ๊ทธ๋ฅ ์ฃฝ์ด๋๊ฑฐ ์ด๋ค๊ฐ์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ข์๊ฑฐ ๊ฐ์ต๋๋ค! ์์ ํ์ต๋๋ค
Co-authored-by: baegteun <baegteun@gmail.com>
Co-authored-by: baegteun <baegteun@gmail.com>
filterDelegate?.filterDidCompleted( | ||
filterOption: | ||
.init( | ||
majors: Array(state.majorSet), | ||
techStacks: state.techStacks, | ||
grade: state.gradeSet.map(\.rawValue), | ||
classNum: state.classSet.map(\.rawValue), | ||
department: state.departmentSet.map(\.rawValue), | ||
stuNumSort: state.stuNumSortType, | ||
formOfEmployment: state.formOfEmploymentSet.map(\.rawValue), | ||
minGsmAuthenticationScore: state.lowerScoreValue, | ||
maxGsmAuthenticationScore: state.upperScoreValue, | ||
gsmAuthenticationScoreSort: state.scoreSortType, | ||
minSalary: state.lowerSalaryValue, | ||
maxSalary: state.upperSalaryValue, | ||
salarySort: state.salarySortType | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํน์ ์ด๊ฑฐ argument ๋ณ์๋ก ๋นผ๋๊ฑฐ ์ด๋ค๊ฐ์?
}, | ||
data: GradeType.allCases, | ||
id: \.self | ||
) { text in | ||
SMSText("\(text.rawValue)ํ๋ ", font: .body2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํน์ data: ๋ id: ๋ฅผ ํด๋ก์ ธ๋ค๋ณด๋ค ์์ ์ฌ๋ฆฌ๋๊ฑฐ ์ด๋ค๊ฐ์? ํด๋ก์ ธ๋ค์ ๋ค์ ์๋๊ฒ ๊น๋ํ ๊ฑฐ๊ฐ์์
data: GradeType.allCases, | ||
id: \.self | ||
) { text in | ||
SMSText("\(text.rawValue)ํ๋ ", font: .body2) | ||
} | ||
|
||
checkBoxSection( | ||
text: "๋ฐ", | ||
isSelected: { | ||
state.classSet.contains($0) | ||
}, | ||
selectAction: { | ||
if state.classSet.contains($0) == false { | ||
intent.classSelect(class: $0) | ||
} else { | ||
intent.classDeSelect(class: $0) | ||
} | ||
}, | ||
data: ClassType.allCases, | ||
id: \.self | ||
) { text in | ||
SMSText("\(text.rawValue)๋ฐ", font: .body2) | ||
} | ||
|
||
checkBoxSection( | ||
text: "ํ๊ณผ", | ||
isSelected: { | ||
state.departmentSet.contains($0) | ||
}, | ||
selectAction: { | ||
if state.departmentSet.contains($0) == false { | ||
intent.departmentSelect(department: $0) | ||
} else { | ||
intent.departmentDeSelect(department: $0) | ||
} | ||
}, | ||
data: DepartmentType.allCases, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํน์ ํด๋ก์ ธ ํ๋ผ๋ฏธํฐ ๋ณ์๋ช ๋ค์ text๋ง๊ณ ์ข ๋ ์ง๊ด์ ์ผ๋ก ํด์ค ์ ์๋์?
isSelected: { | ||
state.departmentSet.contains($0) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isSelected: { | |
state.departmentSet.contains($0) | |
}, | |
isSelected: state.departmentSet.contains, |
๋ก ๋๊ธดํ๋ฐ ํน์ ์ด๊ฑด ์ด๋ป๊ฒ ์๊ฐํ์๋์? ํธ๋ถํธ ์กฐ๊ธ ๊ฐ๋ฆด๊ฑฐ๊ฐ์์์,
SMSText(text, font: .body2) | ||
} | ||
|
||
ConditionView(state.userRole == .guest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์กฐ๊ฑด ๋ฐ๊พธ์ ์ผํ ๊ฑฐ๊ฐ์์
), | ||
bounds: 0...2000 | ||
) | ||
.padding(.horizontal, 12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.padding(.horizontal, 12) | |
.padding(.horizontal, 12) |
indent ์กฐ์ ์ด ํ์ํด๋ณด์ ๋๋ค
), | ||
bounds: 0...9999 | ||
) | ||
.padding(.horizontal, 12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.padding(.horizontal, 12) | |
.padding(.horizontal, 12) |
indent ์กฐ์ ์ด ํ์ํด๋ณด์ ๋๋ค
HStack { | ||
SMSTextField( | ||
"", | ||
text: | ||
Binding<String>( | ||
get: { "\(state.lowerScoreValue)" }, | ||
set: { newValue in | ||
intent.lowerScoreValue( | ||
lowValue: newValue, | ||
upperValue: state.upperScoreValue | ||
) | ||
} | ||
), | ||
isOnClear: false | ||
) | ||
.keyboardType(.numberPad) | ||
.frame(width: 80) | ||
|
||
Spacer() | ||
|
||
SMSTextField( | ||
"", | ||
text: | ||
Binding<String>( | ||
get: { "\(state.upperScoreValue)" }, | ||
set: { newValue in | ||
intent.upperScoreValue( | ||
lowValue: state.lowerScoreValue, | ||
upperValue: newValue | ||
) | ||
} | ||
), | ||
isOnClear: false | ||
) | ||
.keyboardType(.numberPad) | ||
.frame(width: 80) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํน์ ์ด๋ถ๋ถ viewBuilder๋ก ๋นผ๋๊ฑฐ ์ด๋ค๊ฐ์? ์ฌ์ฌ์ฉ์ฑ ๋ง๊ณ ๊ทธ๋ฅ ํด๋น ์์ญ์ view๋ก์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ก ๊ฐ์
FilterFeature ์์ฑ
๐ ์์ ๋ด์ฉ
๐ ๋ณ๊ฒฝ์ฌํญ