Skip to content
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

[INSPECT-333][FEATURE] feat: updated conditional field about drain plugs #344

Merged
merged 1 commit into from
Dec 23, 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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
ARCHIVE_NAME: ${{ 'invasivesbc-mussels.iOS.xcarchive' }}
EXPORT_DIR: ${{ 'export' }}
IPA_NAME: ${{ 'invasivesbc-mussels.iOS.ipa' }}
APP_BUILD_VERSION: "2.7.4"
APP_BUILD_VERSION: "2.7.5"

steps:
- uses: maxim-lobanov/setup-xcode@v1
Expand Down
4 changes: 2 additions & 2 deletions ipad.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.8.6;
MARKETING_VERSION = 2.8.7;
PRODUCT_BUNDLE_IDENTIFIER = ca.bc.gov.InvasivesBC;
PRODUCT_NAME = Inspect;
PROVISIONING_PROFILE_SPECIFIER = "InvasivesBC Muscles - 2023/24";
Expand Down Expand Up @@ -2093,7 +2093,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.8.6;
MARKETING_VERSION = 2.8.7;
PRODUCT_BUNDLE_IDENTIFIER = ca.bc.gov.InvasivesBC;
PRODUCT_NAME = Inspect;
PROVISIONING_PROFILE_SPECIFIER = "InvasivesBC Muscles - 2023/24";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class WatercraftInspectionViewController: BaseViewController {
// Basic
case errorInspectionTime = "Time of Inspection."
case errorNumberOfPeopleInParty = "Number of people in the party."
case errorIsNoWatercraftTypeSelected = "Watercraft Type needed:\n · Non-Motorized\n · Simple\n · Complex\n · Very Complex"
case errorIsNoWatercraftTypeSelected = "Watercraft Type needed:\n Non-Motorized\n Simple\n Complex\n Very Complex"

// Watercraft Details
case errorPreviousAISKnowledge = "Source for Previous Knowledge of AIS or Clean, Drain, Dry."
Expand Down Expand Up @@ -715,16 +715,8 @@ class WatercraftInspectionViewController: BaseViewController {
private func getEmoji(for error: String) -> String {
if error.lowercased().contains("time") {
return "⏰"
} else if error.lowercased().contains("waterbody") {
return "🌊"
} else if error.lowercased().contains("destination") {
return "🎯"
} else if error.lowercased().contains("seal") {
return "🏷️"
} else if error.lowercased().contains("decontamination") {
return "💧"
} else {
return ""
return "🔴"
}
}

Expand All @@ -751,6 +743,17 @@ class WatercraftInspectionViewController: BaseViewController {
// Keys that need a pop up/ additional actions
let highRiskFieldKeys = WatercraftInspectionFormHelper.getHighriskAssessmentFieldsFields().map{ $0.key}

// Handle watercraftHasDrainplugs changes
if item.key == "watercraftHasDrainplugs" {
let newValue = item.value.get(type: item.type) as? Bool ?? false
if !newValue {
// If watercraftHasDrainplugs is set to false, also set drainplugRemovedAtInspection to false
model.set(value: false, for: "drainplugRemovedAtInspection")
model.set(value: false, for: "drainplugRemovedAtInspectionInteracted")
self.collectionView.reloadData()
}
}

if highRiskFieldKeys.contains(item.key) {
let value = item.value.get(type: item.type) as? Bool
let alreadyHasHighRiskForm = !model.highRiskAssessments.isEmpty
Expand Down
Loading