Skip to content

Commit

Permalink
Merge pull request #10 from ITlearning/DevEdit
Browse files Browse the repository at this point in the history
Dev edit
  • Loading branch information
ITlearning authored Jan 11, 2022
2 parents ded0eee + 3b4af1b commit 6ec82b8
Show file tree
Hide file tree
Showing 29 changed files with 1,262 additions and 57 deletions.
44 changes: 44 additions & 0 deletions Budi/Budi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,17 @@
A8CE1193278B1F82008AFEBC /* MyBudiProjectDetailCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8CE1190278B1F82008AFEBC /* MyBudiProjectDetailCollectionViewCell.swift */; };
A8CE1194278B1F82008AFEBC /* MyBudiProjectDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8CE1191278B1F82008AFEBC /* MyBudiProjectDetailViewController.swift */; };
A8CE1196278B1F91008AFEBC /* MyBudiContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8CE1195278B1F90008AFEBC /* MyBudiContentViewController.swift */; };
A8E03CCF278C68A40074DE4B /* NormalTextFieldTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E03CCD278C68A40074DE4B /* NormalTextFieldTableViewCell.swift */; };
A8E03CD0278C68A40074DE4B /* NormalTextFieldTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A8E03CCE278C68A40074DE4B /* NormalTextFieldTableViewCell.xib */; };
A8E03CD3278C693C0074DE4B /* LocationReplaceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E03CD1278C693C0074DE4B /* LocationReplaceTableViewCell.swift */; };
A8E03CD4278C693C0074DE4B /* LocationReplaceTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A8E03CD2278C693C0074DE4B /* LocationReplaceTableViewCell.xib */; };
A8E03CD7278C6B030074DE4B /* PositionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E03CD5278C6B030074DE4B /* PositionTableViewCell.swift */; };
A8E03CD8278C6B030074DE4B /* PositionTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A8E03CD6278C6B030074DE4B /* PositionTableViewCell.xib */; };
A8E03CDB278C79870074DE4B /* ProjectTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E03CD9278C79870074DE4B /* ProjectTableViewCell.swift */; };
A8E03CDC278C79870074DE4B /* ProjectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A8E03CDA278C79870074DE4B /* ProjectTableViewCell.xib */; };
A8E03CDE278C7C3E0074DE4B /* MyBudiEditHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E03CDD278C7C3E0074DE4B /* MyBudiEditHeaderView.swift */; };
A8E03CE0278C7C680074DE4B /* MyBudiEditHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A8E03CDF278C7C680074DE4B /* MyBudiEditHeaderView.xib */; };
A8E03CE2278C98E40074DE4B /* PositionSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E03CE1278C98E40074DE4B /* PositionSwitch.swift */; };
B92D54F9274C02EB00D0E851 /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = B92D54F8274C02EB00D0E851 /* .swiftlint.yml */; };
B92D5505274C03AB00D0E851 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = B92D5504274C03AA00D0E851 /* Post.swift */; };
B94D2D9A277DE9E700DD7FDD /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B94D2D99277DE9E700DD7FDD /* GoogleService-Info.plist */; };
Expand Down Expand Up @@ -404,6 +415,17 @@
A8CE1190278B1F82008AFEBC /* MyBudiProjectDetailCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyBudiProjectDetailCollectionViewCell.swift; sourceTree = "<group>"; };
A8CE1191278B1F82008AFEBC /* MyBudiProjectDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyBudiProjectDetailViewController.swift; sourceTree = "<group>"; };
A8CE1195278B1F90008AFEBC /* MyBudiContentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyBudiContentViewController.swift; sourceTree = "<group>"; };
A8E03CCD278C68A40074DE4B /* NormalTextFieldTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NormalTextFieldTableViewCell.swift; sourceTree = "<group>"; };
A8E03CCE278C68A40074DE4B /* NormalTextFieldTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NormalTextFieldTableViewCell.xib; sourceTree = "<group>"; };
A8E03CD1278C693C0074DE4B /* LocationReplaceTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationReplaceTableViewCell.swift; sourceTree = "<group>"; };
A8E03CD2278C693C0074DE4B /* LocationReplaceTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LocationReplaceTableViewCell.xib; sourceTree = "<group>"; };
A8E03CD5278C6B030074DE4B /* PositionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionTableViewCell.swift; sourceTree = "<group>"; };
A8E03CD6278C6B030074DE4B /* PositionTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PositionTableViewCell.xib; sourceTree = "<group>"; };
A8E03CD9278C79870074DE4B /* ProjectTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProjectTableViewCell.swift; sourceTree = "<group>"; };
A8E03CDA278C79870074DE4B /* ProjectTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProjectTableViewCell.xib; sourceTree = "<group>"; };
A8E03CDD278C7C3E0074DE4B /* MyBudiEditHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyBudiEditHeaderView.swift; sourceTree = "<group>"; };
A8E03CDF278C7C680074DE4B /* MyBudiEditHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyBudiEditHeaderView.xib; sourceTree = "<group>"; };
A8E03CE1278C98E40074DE4B /* PositionSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionSwitch.swift; sourceTree = "<group>"; };
B92D54F8274C02EB00D0E851 /* .swiftlint.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = "<group>"; };
B92D54FE274C037E00D0E851 /* String+date.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+date.swift"; sourceTree = "<group>"; };
B92D5501274C039C00D0E851 /* HomeContentViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeContentViewModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -594,6 +616,16 @@
5E9150A42772355B000578D4 /* Cells */ = {
isa = PBXGroup;
children = (
A8E03CCD278C68A40074DE4B /* NormalTextFieldTableViewCell.swift */,
A8E03CCE278C68A40074DE4B /* NormalTextFieldTableViewCell.xib */,
A8E03CD1278C693C0074DE4B /* LocationReplaceTableViewCell.swift */,
A8E03CD2278C693C0074DE4B /* LocationReplaceTableViewCell.xib */,
A8E03CD5278C6B030074DE4B /* PositionTableViewCell.swift */,
A8E03CD6278C6B030074DE4B /* PositionTableViewCell.xib */,
A8E03CD9278C79870074DE4B /* ProjectTableViewCell.swift */,
A8E03CDA278C79870074DE4B /* ProjectTableViewCell.xib */,
A8E03CDD278C7C3E0074DE4B /* MyBudiEditHeaderView.swift */,
A8E03CDF278C7C680074DE4B /* MyBudiEditHeaderView.xib */,
);
path = Cells;
sourceTree = "<group>";
Expand Down Expand Up @@ -927,6 +959,7 @@
A8CE117D278AC682008AFEBC /* MyLikePost.swift */,
A8CE117F278ACD88008AFEBC /* MyBudiProject.swift */,
5EE7FB452787E11200D9C39F /* ErrorMessage.swift */,
A8E03CE1278C98E40074DE4B /* PositionSwitch.swift */,
);
path = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -1172,6 +1205,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A8E03CD0278C68A40074DE4B /* NormalTextFieldTableViewCell.xib in Resources */,
A8E03CDC278C79870074DE4B /* ProjectTableViewCell.xib in Resources */,
B92D54F9274C02EB00D0E851 /* .swiftlint.yml in Resources */,
5E43FB3E278A95EF0073574F /* ChattingProjectRequestCell.xib in Resources */,
5E820B8B2769F04A004A03E9 /* ProjectMembersBottomDetailCell.xib in Resources */,
Expand All @@ -1181,6 +1216,7 @@
5EB430362758953000283239 /* HomeWritingOnlineCell.xib in Resources */,
5EB4302A2758950400283239 /* HomeWritingNameCell.xib in Resources */,
5EFB0A5B27341C1100F39A4D /* ChattingTimeCell.xib in Resources */,
A8E03CE0278C7C680074DE4B /* MyBudiEditHeaderView.xib in Resources */,
5EA453A12731778000943C94 /* HomeDetailMainCell.xib in Resources */,
B94D2D9A277DE9E700DD7FDD /* GoogleService-Info.plist in Resources */,
5EB430322758952500283239 /* HomeWritingDurationCell.xib in Resources */,
Expand Down Expand Up @@ -1212,6 +1248,7 @@
5E91509B27722213000578D4 /* MyBudiProjectCell.xib in Resources */,
5E2554362732770B00033723 /* HomeDetailPersonCell.xib in Resources */,
5E820B902769F963004A03E9 /* DatePickerBottomViewController.xib in Resources */,
A8E03CD8278C6B030074DE4B /* PositionTableViewCell.xib in Resources */,
5EFB0A462733E36800F39A4D /* TeamSearchCell.xib in Resources */,
5EC2FEFA275E191F00FF5BB0 /* HomeDetailStatusUnitCell.xib in Resources */,
5EA453912731774100943C94 /* HomeDetailMemberCell.xib in Resources */,
Expand All @@ -1229,6 +1266,7 @@
5E503E7827898D1400F13256 /* ProjectMembersBottomViewController.xib in Resources */,
5E7CF4C92770B79E007315F1 /* ProjectMembersBottomPositionCell.xib in Resources */,
5E5517AA2768BCC300DC605E /* HomeWritingPartBottomCell.xib in Resources */,
A8E03CD4278C693C0074DE4B /* LocationReplaceTableViewCell.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1298,6 +1336,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A8E03CDE278C7C3E0074DE4B /* MyBudiEditHeaderView.swift in Sources */,
B9684168277853F3002F5D3D /* alertView.swift in Sources */,
B9684167277853EF002F5D3D /* HomeContentViewModel.swift in Sources */,
B9684166277853E7002F5D3D /* HomeContainerViewController.swift in Sources */,
Expand All @@ -1312,6 +1351,8 @@
B968415F277853BC002F5D3D /* ProjectHistory.swift in Sources */,
5E9150A62772356A000578D4 /* MyBudiEditCellType.swift in Sources */,
5E88636E2767450A0022397A /* HomeWritingCellType.swift in Sources */,
A8E03CD3278C693C0074DE4B /* LocationReplaceTableViewCell.swift in Sources */,
A8E03CDB278C79870074DE4B /* ProjectTableViewCell.swift in Sources */,
5E8863822767AE190022397A /* HomeWritingImageBottomCell.swift in Sources */,
5EF986CA2786E58600874A40 /* Leader.swift in Sources */,
A8CE1196278B1F91008AFEBC /* MyBudiContentViewController.swift in Sources */,
Expand All @@ -1333,6 +1374,7 @@
B97A862D2786D6DB0016CF23 /* TeamSearchProfileCell.swift in Sources */,
A8CD936127384C4900299AB4 /* SearchTableViewCell.swift in Sources */,
A85C920B276A35270097E444 /* PortfolioViewController.swift in Sources */,
A8E03CCF278C68A40074DE4B /* NormalTextFieldTableViewCell.swift in Sources */,
B94D2D9C277DFE2300DD7FDD /* TeamSearchViewModel.swift in Sources */,
B92D5505274C03AB00D0E851 /* Post.swift in Sources */,
5EB4302D2758951600283239 /* HomeWritingPartCell.swift in Sources */,
Expand Down Expand Up @@ -1376,6 +1418,7 @@
B9BF787427004094000BE0EF /* AppDelegate.swift in Sources */,
A81D105F2764828A0022D610 /* HistoryWriteViewController.swift in Sources */,
5E503E7727898D1400F13256 /* ProjectMembersBottomViewController.swift in Sources */,
A8E03CE2278C98E40074DE4B /* PositionSwitch.swift in Sources */,
B96F33BD27859C6D000A0B42 /* UIView+gesturePublisher.swift in Sources */,
5EFB0A522734016600F39A4D /* MyChattingMessageCell.swift in Sources */,
B968416B277862ED002F5D3D /* TeamSearchDetailCell.swift in Sources */,
Expand Down Expand Up @@ -1451,6 +1494,7 @@
5EBD9D5D276DB57B00615319 /* HomeDetailViewModel.swift in Sources */,
5E91508D27721D8B000578D4 /* MyBudiMainViewController.swift in Sources */,
5E58E6B1276B588C00ABBF1C /* AppliesRequest.swift in Sources */,
A8E03CD7278C6B030074DE4B /* PositionTableViewCell.swift in Sources */,
5EB430452758959600283239 /* HomeWritingDescriptionCell.swift in Sources */,
A81D1061276482950022D610 /* DefaultTableViewCell.swift in Sources */,
5E91509627722206000578D4 /* MyBudiLevelCell.swift in Sources */,
Expand Down
2 changes: 0 additions & 2 deletions Budi/Budi/Source/Chatting/ChatManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ final class ChatManager {
// let messages = documents.compactMap { (document) -> ChatMessage? in
// return try? document.data(as: ChatMessage.self)
// }

print("messages: \(documents)")
}

return messages
Expand Down
2 changes: 1 addition & 1 deletion Budi/Budi/Source/Home/HomeCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extension HomeCoordinator {
}

func showProjectMembersBottomViewController(_ vc: UIViewController, _ viewModel: HomeWritingViewModel) {
let viewController: ProjectMembersBottomViewController = ProjectMembersBottomViewController(nibName: ProjectMembersBottomViewController.identifier, bundle: nil, developerPositions: viewModel.state.developerPositions.value, designerPositions: viewModel.state.designerPositions.value, productManagerPositions: viewModel.state.productManagerPositions.value)
let viewController: ProjectMembersBottomViewController = ProjectMembersBottomViewController(nibName: ProjectMembersBottomViewController.identifier, bundle: nil, developerPositions: viewModel.state.developerPositions.value, designerPositions: viewModel.state.designerPositions.value, productManagerPositions: viewModel.state.productManagerPositions.value, viewSwitch: .writing)
viewController.delegate = vc as? ProjectMembersBottomViewControllerDelegate
viewController.modalPresentationStyle = .overCurrentContext
vc.present(viewController, animated: false, completion: nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,12 @@ private extension HomeDetailViewController {
.receive(on: DispatchQueue.main)
.sink { [weak self] _ in
guard let self = self, let isAlreadyApplied = self.viewModel.state.post.value?.isAlreadyApplied else { return }

if UserDefaults.standard.string(forKey: "accessToken") == "" {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let loginSelectViewController = storyboard.instantiateViewController(identifier: "LoginSelectViewController")
let sceneDelegate = UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate
sceneDelegate?.moveLoginController(loginSelectViewController, animated: true)
} else {

guard let isAlreadyApplied = self.viewModel.state.post.value?.isAlreadyApplied else { return }

if isAlreadyApplied {
let errorAlertVC = ErrorAlertViewController(ErrorMessage.isAlreadyApplied)
errorAlertVC.modalPresentationStyle = .overCurrentContext
Expand Down Expand Up @@ -127,8 +123,6 @@ private extension HomeDetailViewController {

private extension HomeDetailViewController {
func configureNavigationBar() {
// let shareButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareButtonTapped))
// navigationItem.rightBarButtonItem = shareButton
navigationController?.navigationBar.tintColor = .systemGray
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ final class ProjectMembersBottomViewController: UIViewController {
private let developerPositions: [String]
private let designerPositions: [String]
private let productManagerPositions: [String]

private var positionSwitch: PositionSwitch
private var selectedPosition: Position?
private var recruitingPositions: [RecruitingPosition] = []

weak var delegate: ProjectMembersBottomViewControllerDelegate?

init(nibName: String?, bundle: Bundle?, developerPositions: [String], designerPositions: [String], productManagerPositions: [String]) {
init(nibName: String?, bundle: Bundle?, developerPositions: [String], designerPositions: [String], productManagerPositions: [String], viewSwitch: PositionSwitch) {
self.developerPositions = developerPositions
self.designerPositions = designerPositions
self.productManagerPositions = productManagerPositions
self.positionSwitch = viewSwitch
super.init(nibName: nibName, bundle: bundle)
}

Expand Down Expand Up @@ -240,7 +241,13 @@ extension ProjectMembersBottomViewController: UICollectionViewDataSource, UIColl
self.configureCompleteButton(!recruitingPositions.isEmpty)

let count = recruitingPositions.count < 4 ? recruitingPositions.count : 3
self.showBottomView(constant: 350+CGFloat(48*count)+40)

switch positionSwitch {
case .writing:
self.showBottomView(constant: 350+CGFloat(48*count)+40)
case .myBudi:
break
}

self.detailCollectionView.reloadData()
self.memberCollectionView.reloadData()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import UIKit
import CombineCocoa
import Combine



class HistoryManagementViewController: UIViewController {
weak var coordinator: LoginCoordinator?
private let viewModel: SignupViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
import UIKit
import CombineCocoa
import Combine

protocol HistoryWriteViewControllerDelegate: AnyObject {
func getProject(_ project: SignupInfoModel?)
}

class HistoryWriteViewController: UIViewController {
var viewModel: SignupViewModel
weak var coordinator: LoginCoordinator?
weak var myBudiCoordinator: MyBudiCoordinator?
private var cancellables = Set<AnyCancellable>()
private var currentButtonTag: Int = 0
@IBOutlet weak var historyNoSwitchView: UIView!
Expand All @@ -34,7 +40,7 @@ class HistoryWriteViewController: UIViewController {

private var leftDatePicker = UIDatePicker()
private var rightDatePicker = UIDatePicker()

weak var delegate: HistoryWriteViewControllerDelegate?
private var flag = false
private let panGesture = UIPanGestureRecognizer()
private var currentKeyboard: CGFloat = 0.0
Expand Down Expand Up @@ -80,6 +86,7 @@ class HistoryWriteViewController: UIViewController {
viewModel.state.editData
.receive(on: DispatchQueue.main)
.sink { [weak self] editData in
print(editData)
guard let self = self else { return }
guard let editData = editData else { return }
self.mainNameTextField.text = editData.name
Expand Down Expand Up @@ -156,9 +163,15 @@ class HistoryWriteViewController: UIViewController {

saveButton.tapPublisher
.receive(on: DispatchQueue.main)
.sink {
self.viewModel.action.fetchSignupInfoData.send(())
self.viewModel.state.editData.send(nil)
.sink { [weak self] _ in
guard let self = self else { return }
if self.myBudiCoordinator != nil {
let send = self.viewModel.state.writedInfoData.value
self.delegate?.getProject(send)
} else {
self.viewModel.action.fetchSignupInfoData.send(())
self.viewModel.state.editData.send(nil)
}
NotificationCenter.default.post(name: Notification.Name("Dismiss"), object: self)
self.dismiss(animated: true, completion: nil)
}
Expand Down
Loading

0 comments on commit 6ec82b8

Please sign in to comment.