Skip to content

Commit

Permalink
Feat✨: 인증대학정보가 없는 경우 조직상세정보를 눌렀을때 alert처리
Browse files Browse the repository at this point in the history
  • Loading branch information
chaneeii committed Nov 23, 2022
1 parent 4e542f9 commit 1767bcc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Network

protocol AddPlaceUseCaseType {
func searchKakaoPlaces(with name: String) -> AnyPublisher<[KakaoPlace], Error>
// func checkRegisterdPlace(with kakaoPlaceId: Int) -> AnyPublisher<Bool, Error>
func checkRegisterdPlace(with kakaoPlaceId: Int) -> AnyPublisher<Bool, AddPlaceError>
func fetchCategories() -> AnyPublisher<[Category], Error>
func addNewPlace(with place: KakaoPlace, category: Int) -> AnyPublisher<PlaceResult, Error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ extension OrgDetailViewController {
orgDetailInformationView2.informationLabel.text = "등록된 맛집"
orgDetailInformationView2.numberLabel.text = "0곳"

// TODO: - 백엔드 작업 완료 후 복구
// orgInfoImageView3.image = UIImage(.img_reviewfriends_photo)
// orgInfoImageView3.contentMode = .scaleAspectFit
// orgInfoImageView3.layer.applyFigmaShadow(color: .black, opacity: 0.1, xCoord: 0, yCoord: 0, blur: 5, spread: 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,21 @@ extension PlaceListViewController: QuestionButtonTapDelegate, UIAdaptivePresenta
func addPlaceButtonTapped() {
navigationController?.pushViewController(AddPlaceSearchViewController(viewModel: AddPlaceSearchViewModel()), animated: true)
}

@objc func orgDetailButtonTapped() {
navigationController?.pushViewController(OrgDetailViewController(viewModel: OrgDetailViewModel(orgId: UserInfoManager.userInfo?.userOrganization[0] ?? 400)), animated: true)

@objc func orgDetailButtonTapped() throws {

if let orgId = UserInfoManager.userInfo?.userOrganization.first {
navigationController?.pushViewController(OrgDetailViewController(viewModel: OrgDetailViewModel(orgId: orgId)),
animated: true)
} else {
let alert = UIAlertController(title: "인증대학없음",
message: "등록되어 있는 대학 정보가 없습니다",
preferredStyle: .alert)
let okAction = UIAlertAction(title: "닫기", style: .default)
alert.addAction(okAction)
self.present(alert, animated: false)
}

FirebaseAnalytics.Analytics.logEvent(AnalyticsEventSelectItem, parameters: [
AnalyticsParameterItemListName: "org_detail_button"
])
Expand Down
2 changes: 0 additions & 2 deletions Projects/Network/Sources/DTO/RequestDTO/SignUpUserDTO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
import Foundation

public struct SignUpUserDTO: Encodable {
// public let id: Int
public let email: String
public let organizationName: String

public init(email: String, organizationName: String) {
// self.id = id
self.email = email
self.organizationName = organizationName
}
Expand Down

0 comments on commit 1767bcc

Please sign in to comment.