Skip to content

Commit

Permalink
[Fix] #289 - 하단 수정 완료 버튼 활성화 조건 변경
Browse files Browse the repository at this point in the history
원래 값과 메뉴 이름 또는 가격이 다를 때에만 활성화 되도록
  • Loading branch information
EunsuSeo01 committed Nov 15, 2024
1 parent 4a4b5e7 commit be56afe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ final class ModifyMenuViewController: BaseViewController {
$0.font = .setupSuiteStyle(of: .body3)
$0.textColor = .gray400
}

bottomButtonView.do {
$0.setupEnabledDoneButton()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ final class ModifyMenuViewModel {
extension ModifyMenuViewModel {

func isMenuDataValid() -> Bool {
return !(modifiedMenuData.name.isEmpty) && (modifiedMenuData.price > 0) && (modifiedMenuData.price <= 8000)
return !(modifiedMenuData.name.isEmpty) && (modifiedMenuData.price > 0) && (modifiedMenuData.price <= 8000) && ((modifiedMenuData.name != selectedMenu.name) || (modifiedMenuData.price != selectedMenu.price))
}

/// 메뉴 수정
Expand Down

0 comments on commit be56afe

Please sign in to comment.