결함 #13950
[통합결재] BOSS 승인 시 토스트 문구 잘못된 건(iOS)
90%
설명
[문제점]
: 통합결재(개발) 앱 > BOSS > 미결함 중 맨 밑에 있는 문서 > 문서 상세화면 > 승인 클릭 > 승인 클릭 > 승인의견 미입력 후 승인 클릭 시 토스트 문구가 '반송되었습니다.'로 노출됨. (iOS)
[개선점]
: AOS와 동일하게, 승인 시 '승인 되었습니다.'로 표기되어야 함.
[테스트 계정]
: yong79 / 추가 테스트 데이터 필요 시 요청바랍니다.
이력
#1 조정후이(가) 5일 전에 변경
- 상태을(를) 신규에서 해결(으)로 변경되었습니다.
- 진척도을(를) 0에서 100(으)로 변경되었습니다.
- 기존 상황
func requestAction(_ actionType: String, opinion: String, approve: Bool) {
...
//승인, 반송을 UserDefaults.standard.set
if (actionType == "C00203"){
UserDefaults.standard.set(true, forKey: "apprSuccess")
}
else{
UserDefaults.standard.set(false, forKey: "apprSuccess")
}
...
//Notifixcation 전달
NotificationCenter.default.post(name: Notification.Name.approvalSuccess, object: nil)
}
@objc func ApprovalSuccess(notification: NSNotification) {
//UserDefaults.standard.bool에 저장된 값을 토대로 토스트 메시지 처리
let approve = UserDefaults.standard.bool(forKey: "apprSuccess")
UserDefaults.standard.set(nil, forKey: "apprSuccess")
let tMessage = (approve ? "txt_service_confirm".localized() : "txt_approval_bottom_menu_3".localized()) + "txt_approval_success".localized() self.delegate?.showToast(message: tMessage)
}
- 개선상황
func requestAction(_ actionType: String, opinion: String, approve: Bool) {
...
/*
//승인, 반송을 UserDefaults.standard.set 주석처리
if (actionType == "C00203"){
UserDefaults.standard.set(true, forKey: "apprSuccess")
}
else{
UserDefaults.standard.set(false, forKey: "apprSuccess")
}
*/
...
//Notifixcation with userinfo 전달
let approve = (actionType == "C00203")
NotificationCenter.default.post(
name: Notification.Name.approvalSuccess,
object: nil,
userInfo: ["approve": approve])
}
@objc func ApprovalSuccess(notification: NSNotification) {
//20250930 : UserDefaults방식 => notification userInfo전달 방식으로 변경
/*
let approve = UserDefaults.standard.bool(forKey: "apprSuccess")
UserDefaults.standard.set(nil, forKey: "apprSuccess")
*/
let approve = notification.userInfo?["approve"] as? Bool ?? false //userInfo로 전달된 approve값을 취하여 토스트 메시지 보여줌!!! let tMessage = (approve ? "txt_service_confirm".localized() : "txt_approval_bottom_menu_3".localized()) + "txt_approval_success".localized() self.delegate?.showToast(message: tMessage)
}
#3 조정후이(가) 5일 전에 변경
SapContentViewController
BossContentViewController
두군데에서 노티피케이션 등록을 하고 있습니다.
selector: #selector(ApprovalSuccess(notification:)), name: Notification.Name.approvalSuccess, object: nil)
현재 두군데 모두 userinfo 방식으로 처리완료했습니다.
마직막으로 Sap 데이터 확보되면 최종 테스트를 수행할 예정입니다.
두군데 notification을 받는 상황이 존재한다면 post시 분리할 예정입니다.