Skip to content

Commit

Permalink
YAPP-19th#61 - 내 정보 중 포트폴리오, 프로젝트 추가 가능
Browse files Browse the repository at this point in the history
  • Loading branch information
ITlearning committed Jan 12, 2022
1 parent 6ec82b8 commit 1c7727a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Budi/Budi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1650,13 +1650,13 @@
CODE_SIGN_ENTITLEMENTS = Budi/Budi.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V37X2D6JM3;
DEVELOPMENT_TEAM = ZMXTCSPNUZ;
INFOPLIST_FILE = Budi/Resource/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi;
PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi2;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
Expand All @@ -1673,13 +1673,13 @@
CODE_SIGN_ENTITLEMENTS = Budi/Budi.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V37X2D6JM3;
DEVELOPMENT_TEAM = ZMXTCSPNUZ;
INFOPLIST_FILE = Budi/Resource/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi;
PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi2;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Combine
import CombineCocoa

protocol PortfolioViewControllerDelegate: AnyObject {
func getPortfolio(_ portfolio: SignupInfoModel)
func getPortfolio(_ portfolio: SignupInfoModel?)
}

class PortfolioViewController: UIViewController {
Expand Down Expand Up @@ -67,7 +67,7 @@ class PortfolioViewController: UIViewController {
guard let text = text else { return }
guard var data = self?.viewModel.state.writedInfoData.value else { return }
data.porflioLink = text
print(data.porflioLink)
print(data)
self?.viewModel.state.writedInfoData.send(data)

}
Expand All @@ -78,8 +78,7 @@ class PortfolioViewController: UIViewController {
.sink { [weak self] _ in
guard let self = self else { return }
if self.myBudiCoordinator != nil {
let send = self.viewModel.state.writedPortfolioData.value
print("입력받은 텍스트", send)
let send = self.viewModel.state.writedInfoData.value
self.delegate?.getPortfolio(send)
} else {
self.viewModel.action.fetchSignupInfoData.send(())
Expand Down
20 changes: 14 additions & 6 deletions Budi/Budi/Source/MyBudi/Edit/MyBudiEditViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ final class MyBudiEditViewController: UIViewController {
self?.modalViewBackgoundOff()
}
.store(in: &cancellables)

viewModel.state.loginUserData
.receive(on: DispatchQueue.main)
.sink { [weak self] _ in
guard let self = self else { return }
//
}
.store(in: &cancellables)
}

func modalViewBackgoundOn() {
Expand Down Expand Up @@ -252,7 +260,7 @@ extension MyBudiEditViewController: UITableViewDelegate, UITableViewDataSource {
.receive(on: DispatchQueue.main)
.sink { [weak self] _ in
guard let self = self else { return }
self.coordinatzor?.showProjectViewController(self, viewModel: self.viewModel)
self.coordinator?.showProjectViewController(self, viewModel: self.viewModel)
self.modalViewBackgoundOn()
}
.store(in: &cell.cancellables)
Expand Down Expand Up @@ -330,11 +338,11 @@ extension MyBudiEditViewController: HistoryWriteViewControllerDelegate {
}
}


extension MyBudiEditViewController: PortfolioViewControllerDelegate {
func getPortfolio(_ portfolio: SignupInfoModel) {
var changeData = viewModel.state.loginUserData.value
print("입력받은 포트폴리오", portfolio)

func getPortfolio(_ portfolio: SignupInfoModel?) {
guard var changeData = viewModel.state.loginUserData.value else { return }
changeData.portfolioList.append(portfolio?.porflioLink ?? "")
viewModel.state.loginUserData.send(changeData)
tableView.reloadData()
}
}

0 comments on commit 1c7727a

Please sign in to comment.