diff --git a/ios/Runner/RecordTransactionIntent.swift b/ios/Runner/RecordTransactionIntent.swift index dce62e1e..2b2e5bf8 100644 --- a/ios/Runner/RecordTransactionIntent.swift +++ b/ios/Runner/RecordTransactionIntent.swift @@ -4,20 +4,26 @@ struct RecordTransactionIntent: AppIntent { static var title: LocalizedStringResource = "Record an Expense" static var description: IntentDescription = "Log expenses" - @Parameter(title: "Account", description: "Exact name, or UUID of the target account") + @Parameter(title: "Account", description: "Exact name, or UUID of the target account.") var account: String @Parameter(title: "Amount", description: "Expense amount. Sign doesn't matter.") var amount: Double - @Parameter(title: "Category", description: "Exact name, or UUID of the target account") + @Parameter(title: "Category", description: "Exact name, or UUID of the target account.") var category: String + + @Parameter(title: "Notes", description: "Transaction notes. Markdown supported.") + var notes: String + + @Parameter(title: "Title", description: "Transaction title.") + var title: String static var openAppWhenRun = false func perform() async throws -> some IntentResult & ProvidesDialog { - let tx = RecordedTransaction(type: .expense, amount: amount, fromAccount: account, category: category) + let tx = RecordedTransaction(type: .expense, amount: amount, fromAccount: account, category: category, title: title, notes: notes) try RecordedTransactionService.append(tx) - return .result(dialog: "Recorded transaction for \(account): $\(amount) in category \(category).") + return .result(dialog: "Expense recorded ✅") } } diff --git a/pubspec.yaml b/pubspec.yaml index f9d3054c..55e11933 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A personal finance managing app publish_to: "none" # Remove this line if you wish to publish to pub.dev -version: "0.19.0+321" +version: "0.19.0+322" environment: sdk: ">=3.10.0 <4.0.0"