Skip to content

Swe 12 enable payment suite #13

Merged
merged 14 commits into from Apr 8, 2019

SWE-12 disable payment buttons in given situations

- if the minimum payment due is $0, we disable the button to allow paying that amount
- if the current account balance is $0, we disable the button to allow paying that amount
  • Loading branch information
ahm11003 committed Apr 5, 2019
commit fff4ae06c1dddac29946fa9005173db1ea7b24a4
@@ -60,6 +60,9 @@ class PayBillInterfaceController: WKInterfaceController {
let minimumFormatted = String(format: "$%.2f", valid.minPayDue)
minimumLabel.setText("Minimum Payment:\n\(minimumFormatted)")
payMinimumButton.setTitle("Pay \(minimumFormatted)")

payMinimumButton.setEnabled(valid.minPayDue > 0.0)
payBalanceButton.setEnabled(valid.curBalance > 0.0)
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.