Skip to content

Commit

Permalink
Version 1.2.1 hotfix
Browse files Browse the repository at this point in the history
Fix for adding finances without digits after the point
  • Loading branch information
Julessh05 committed Apr 20, 2023
1 parent 5c51788 commit 1d6386b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions iOS/Financer/Financer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.jules.Financer;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -635,7 +635,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.jules.Financer;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ internal struct FinanceEditor: View {
private func validateAmount() -> String {
var result : String = amount
result = result.replacingOccurrences(of: ",", with: ".")
guard result.contains(".") else {
return result
}
while result.components(separatedBy: ".").count > 2 {
result.removeLast()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,20 @@ internal struct LegalPersonEditor: View {
.textContentType(.name)
.textInputAutocapitalization(.words)
.lineLimit(1)
.onSubmit { checkBtn() }
.onChange(of: name) {
_ in
checkBtn()
}
Picker("Type", selection: $legalPersonType) {
ForEach(LegalPerson.LegalPersonType.allCases) {
person in
Text(person.rawValue.capitalized)
}
}
.onChange(of: name) {
.onChange(of: legalPersonType) {
_ in
checkBtn()
}
.onSubmit { checkBtn() }
.pickerStyle(.automatic)
} header: {
Text("Required Information")
Expand Down Expand Up @@ -177,15 +179,15 @@ internal struct LegalPersonEditor: View {
if btnActive {
let legalPerson : LegalPerson
switch legalPersonType {
case .organization:
legalPerson = Organization(context: viewContext)
case .company:
legalPerson = Company(context: viewContext)
case .person:
legalPerson = Person(context: viewContext)
default:
errMissingArgumentsPresented.toggle()
return
case .organization:
legalPerson = Organization(context: viewContext)
case .company:
legalPerson = Company(context: viewContext)
case .person:
legalPerson = Person(context: viewContext)
default:
errMissingArgumentsPresented.toggle()
return
}
legalPerson.name = name
legalPerson.notes = notes
Expand Down

0 comments on commit 1d6386b

Please sign in to comment.