Skip to content
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

feat: 명함 그룹 관련 API 연결 #434 #456

Merged
merged 13 commits into from
May 1, 2023

Conversation

dlwns33
Copy link
Member

@dlwns33 dlwns33 commented Apr 24, 2023

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • 명함 그룹 생성 API를 연결했습니다.
  • 명함 그룹 편집 뷰에서 뷰모델을 이용한 MVVM 패턴으로 리팩토링 했습니다.
  • 명함 그룹 삭제 API를 연결했습니다. -> 지금 서버 500 오류가 뜨는 것 같아서 나중에 이슈 파서 다시 확인해보겠습니다.
  • 지금 근처의 뷰 API를 다른 브랜치에서 동시에 작업중이라서 여기에는 안들어간 저번 PR의 수정사항들은 다 그 브랜치에 있다고 생각해주시면 됩니다!

📮 관련 이슈

@dlwns33 dlwns33 added Yijoon 🐨 이준 대치동강사 작업 Feat 새로운 기능 구현 labels Apr 24, 2023
@dlwns33 dlwns33 requested a review from hyun99999 April 24, 2023 05:51
@dlwns33 dlwns33 self-assigned this Apr 24, 2023
Comment on lines +26 to +28
func makeUpdateVC() -> UpdateViewController
func makeCardDetailVC() -> CardDetailViewController
func makeGroupEditVC(groupList: [Group]) -> GroupEditViewController
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니더👍

@@ -191,7 +191,7 @@ public class GroupAPI {
else { return .pathErr }

switch statusCode {
case 200:
case 200, 201:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 다 200으로 준대여!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영하겠습니다!

Comment on lines +8 to +9
import UIKit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 85 to 86
groupEditTableView.register(GroupEditTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.groupEditTableViewCell)
groupEditTableView.register(EmptyGroupEditTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.EmptyGroupEditTableViewCell)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className 으로 사용해도 좋을 듯합니당 저는 일단 작업하면서 밟히는 것들부터 하나씩 적용했습니당

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 좋습니다 좋습니다 이거 적용해놓겠습니다!

Comment on lines +8 to +50
import RxSwift
import RxRelay

final class GroupEditViewModel: ViewModelType {

// MARK: - Properties

private let disposeBag = DisposeBag()
var groupList: [Group] = []

// MARK: - Inputs

struct Input {
let viewWillAppearEvent: Observable<Void>
}

// MARK: - Outputs

struct Output {
var groupListRelay = PublishRelay<[Group]>()
}

// MARK: - Initialize

init(groupList: [Group]) {
self.groupList = groupList
}
}

extension GroupEditViewModel {
func transform(input: Input) -> Output {
let output = Output()

input.viewWillAppearEvent
.withUnretained(self)
.subscribe { owner, _ in
output.groupListRelay.accept(owner.groupList)
}
.disposed(by: self.disposeBag)

return output
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기서두 저번에 view model 코드리뷰와 동일하게 disposeBag 을 사용하며 뷰 모델에서 구독이 진행되서 수정되면 좋겠습니당!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오케이 뷰컨에서 구독을 휘갈겨보겠습니다...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니당

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

선생님 뷰컨 구독 이슈 일단 냅두고 합친 다음에 이슈 다시 파서 수정하겠습니다! (제가 다른 곳에서도 뷰모델에서 구독을 갈겨놔서...)
지금 API 부터 일단 연결 다시 해보겠습니다!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그랴요!
출시하고 좀 정리할거 정리해서 리스트업 해봅시다

@dlwns33 dlwns33 merged commit aa1e596 into TeamNADA:develop May 1, 2023
@dlwns33 dlwns33 deleted the feature/#434 branch May 1, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 Yijoon 🐨 이준 대치동강사 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: 명함 그룹 관련 API 연결
2 participants