-
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
Feature/enroll view model #79
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
14b2a3f
[feat] DayNamePickerView의 viewmodel 작성
jinwoong16 3a78b81
[feat] EnrollViewController의 서브뷰들을 관장하는 viewmodel 작성
jinwoong16 f93ef4f
[feat] DayNamePickerView 로직 변경
jinwoong16 5b38afb
[feat] EnrollViewController 로직 변경
jinwoong16 8836add
Merge branch 'develop' into feature/EnrollViewModel
jinwoong16 5f9a456
[refactor] index 로직 변경
jinwoong16 064dfa9
[refactor] PlanDatePickerView의 bind 메서드 제거
jinwoong16 a247094
[refactor] QuantityView의 bind 메서드 제거
jinwoong16 1a4420b
[refactor] ViewModel의 로직 변경 (삭제예정)
jinwoong16 3587b28
[feat] EnrollViewModel transform 메서드 작성
jinwoong16 e40e374
[feat] EnrollViewController bind메서드 구현
jinwoong16 42c7092
[chore] pbx
jinwoong16 03d0474
[refactor] DayNamePickerView bind 메서드와 viewmodel 삭제
jinwoong16 83ba2d7
[refactor] ViewModel 통합
jinwoong16 aa29c19
[refactor] EnrollViewController bind메서드 추가 작성
jinwoong16 a38eed5
[chore] pbx
jinwoong16 f8c4e1e
[feat] EnrollUseCase protocol 정의
jinwoong16 8bf4c22
[feat] Enroll use case 구현체 작성
jinwoong16 c8eabd1
[feat] DI 생성
jinwoong16 500324d
[refactor] EnrollViewController를 DIContainer를 통하여 생성
jinwoong16 edf891d
[feat] EnrollViewModel 동작 구현
jinwoong16 a81e49a
[feat] 퀘스트 등록 액션의 결과 확인
jinwoong16 259f54e
[refactor] bind메서드에서 output을 계산하는 부분 리팩터
jinwoong16 a4860be
[refactor] bind메서드에서 output을 계산하는 부분 리팩터
jinwoong16 b6c348b
Merge branch 'feature/EnrollViewModel' of https://github.com/boostcam…
jinwoong16 8760332
Merge branch 'develop' into feature/EnrollViewModel
jinwoong16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
DailyQuest/DailyQuest/Domain/UseCases/Home/DefaultEnrollUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// DefaultEnrollUseCase.swift | ||
// DailyQuest | ||
// | ||
// Created by jinwoong Kim on 2022/12/05. | ||
// | ||
|
||
import Foundation | ||
|
||
import RxSwift | ||
|
||
final class DefaultEnrollUseCase { | ||
private let questsRepository: QuestsRepository | ||
|
||
init(questsRepository: QuestsRepository) { | ||
self.questsRepository = questsRepository | ||
} | ||
} | ||
|
||
extension DefaultEnrollUseCase: EnrollUseCase { | ||
func save(with quests: [Quest]) -> Observable<Bool> { | ||
return questsRepository | ||
.save(with: quests) | ||
.map { _ in | ||
true | ||
} | ||
.catchAndReturn(false) | ||
.asObservable() | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
DailyQuest/DailyQuest/Domain/UseCases/Home/Protocols/EnrollUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// EnrollUseCase.swift | ||
// DailyQuest | ||
// | ||
// Created by jinwoong Kim on 2022/12/05. | ||
// | ||
|
||
import Foundation | ||
|
||
import RxSwift | ||
|
||
protocol EnrollUseCase { | ||
func save(with quests: [Quest]) -> Observable<Bool> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
아까 말씀하신 방법으로 바꾸신 거 확인했습니다!