Skip to content

Commit

Permalink
Merge pull request #282 from bcgov/feature/validation-rework
Browse files Browse the repository at this point in the history
[FIX][INSPECT-252, INSPECT-283] - Fix to Inspection Validation
  • Loading branch information
davidclaveau authored Jan 24, 2024
2 parents 1a8d45c + 3ff55ec commit 6d0e5de
Show file tree
Hide file tree
Showing 2 changed files with 520 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,7 @@ class FormButtonCollectionViewCell: UICollectionViewCell, Theme {
}

var disableMajorCityButton: Bool {
if (dryStorageSwitch?.isOn ?? true) {
return false
} else if (unknownWaterBodySwitch?.isOn ?? true) {
return false
} else if (commercialManufacturerSwitch?.isOn ?? true) {
return false
} else {
return true
}
return false
}

var result: Result {
Expand Down Expand Up @@ -119,13 +111,12 @@ class FormButtonCollectionViewCell: UICollectionViewCell, Theme {

func set(status: Bool) {
self.button?.isEnabled = !status
self.majorCityButton?.isEnabled = status;
if status {
styleDisable(button: self.button)
styleHollowButton(button: self.majorCityButton)
} else {
styleHollowButton(button: button)
styleDisable(button: majorCityButton)
styleHollowButton(button: self.majorCityButton)
}
}

Expand Down
Loading

0 comments on commit 6d0e5de

Please sign in to comment.