Skip to content

[IDLE-000] 센터는 요양보호사에게 통화를 걸 수 있다. #64

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

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ public class BaseNetworkService<TagetAPI: BaseAPI> {
let configuration = URLSessionConfiguration.default

// 단일 요청이 완료되는데 걸리는 최대 시간, 초과시 타임아웃
configuration.timeoutIntervalForRequest = 10
configuration.timeoutIntervalForRequest = 20

// 하나의 리소스를 로드하는데 걸리는 시간, 재시도를 포함한다 초과시 타임아웃
configuration.timeoutIntervalForResource = 10
configuration.timeoutIntervalForResource = 20

// Cache policy: 로컬캐시를 무시하고 항상 새로운 데이터를 가져온다.
configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ public class ApplicantCard: UIView {
button.label.textString = "프로필 보기"
return button
}()
let employButton: IdlePrimaryButton = {
let button = IdlePrimaryButton(level: .medium)
button.label.textString = "채용하기"
return button
}()
// let employButton: IdlePrimaryButton = {
// let button = IdlePrimaryButton(level: .medium)
// button.label.textString = "채용하기"
// return button
// }()

// Observable
private let disposeBag = DisposeBag()
Expand Down Expand Up @@ -228,7 +228,8 @@ public class ApplicantCard: UIView {
// ])

let buttonStack = HStack([
showProfileButton, employButton
showProfileButton,
// employButton
], spacing: 8, distribution: .fillEqually)

let mainStack = VStack([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public class ApplicantCardCell: UITableViewCell {
.showProfileButton.rx.tap
.bind(to: viewModel.showProfileButtonClicked),

cardView
.employButton.rx.tap
.bind(to: viewModel.employButtonClicked),
// cardView
// .employButton.rx.tap
// .bind(to: viewModel.employButtonClicked),
]

self.disposables = disposables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class CustomerInformationDisplayingView: VStack {

let keyStack = VStack([], spacing: 6, alignment: .leading)
let valueStack = VStack([], spacing: 6, alignment: .leading)
let keyValueStack = HStack([keyStack, valueStack, Spacer()], spacing: 32)
let keyValueStack = HStack([keyStack, Spacer(width: 32), valueStack, Spacer()])

addViewListToStack(viewList: viewList, keyStack: keyStack, valueStack: valueStack, keyValueStack: keyValueStack)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public class WorkConditionDisplayingView: HStack {

public init() {
super.init(
[keyStack, valueStack],
spacing: 32,
[keyStack, Spacer(width: 32), valueStack, Spacer()],
distribution: .fill
)
setAppearance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable {


// 최신 값들 + 버튼이 눌릴 경우 변경 로직이 실행된다.
let editingRequestResult = editingFinishButtonPressed
let editingRequestResult = mapEndLoading(mapStartLoading(editingFinishButtonPressed.asObservable())
.map({ [unowned self] _ in
checkModification()
})
Expand All @@ -214,7 +214,7 @@ public class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable {
introduction: introduction,
imageInfo: imageInfo
)
}
})
.share()

let editingValidation = editingRequestResult
Expand All @@ -235,8 +235,8 @@ public class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable {
.map({ error in
// 변경 실패 Alert
return DefaultAlertContentVO(
title: "변경 실패",
message: "변경 싪패 이유"
title: "프로필 수정 실패",
message: error.message
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public class EditPostVM: BaseViewModel, EditPostViewModelable {
let inputValidationSuccess = inputValidationResult.filter { $0 == nil }
let inputValidationFailure = inputValidationResult.compactMap { $0 }

let editingRequestResult = inputValidationSuccess
let editingRequestResult = mapEndLoading(mapStartLoading(inputValidationSuccess)
.flatMap { [weak self] _ -> Single<Result<Void, DomainError>> in
guard let self else { return .never() }

Expand All @@ -398,7 +398,7 @@ public class EditPostVM: BaseViewModel, EditPostViewModelable {
addressInfo: editing_addressInfo.value
)
)
}
})
.share()

let editingRequestSuccess = editingRequestResult.compactMap { $0.value }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ public class WorkerProfileViewModel: OtherWorkerProfileViewModelable {
.disposed(by: disposbag)

phoneCallButtonClicked
.subscribe(onNext: { _ in
.withLatestFrom(fetchedProfileVOSuccess)
.subscribe(onNext: { profileVO in

// 안심번호 전화연결
let phoneNumber = profileVO.phoneNumber

if let phoneURL = URL(string: "tel://\(phoneNumber)"), UIApplication.shared.canOpenURL(phoneURL) {
UIApplication.shared.open(phoneURL, options: [:], completionHandler: nil)
}
})
.disposed(by: disposbag)

Expand Down
Loading