Transactions
This commit is contained in:
parent
aff80c2e7b
commit
f2cbcf408d
|
|
@ -118,7 +118,7 @@ part 'serializers.g.dart';
|
|||
TransactionEntity,
|
||||
TransactionListResponse,
|
||||
TransactionItemResponse,
|
||||
|
||||
TransactionStatusEntity,
|
||||
BankAccountEntity,
|
||||
BankAccountListResponse,
|
||||
BankAccountItemResponse,
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||
..add(TransactionItemResponse.serializer)
|
||||
..add(TransactionListResponse.serializer)
|
||||
..add(TransactionState.serializer)
|
||||
..add(TransactionStatusEntity.serializer)
|
||||
..add(TransactionUIState.serializer)
|
||||
..add(UIState.serializer)
|
||||
..add(UserCompanyEntity.serializer)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ Reducer<String> selectedIdReducer = combineReducers([
|
|||
TypedReducer<String, SortTransactions>((selectedId, action) => ''),
|
||||
TypedReducer<String, FilterTransactions>((selectedId, action) => ''),
|
||||
TypedReducer<String, FilterTransactionsByState>((selectedId, action) => ''),
|
||||
TypedReducer<String, FilterTransactionsByStatus>((selectedId, action) => ''),
|
||||
TypedReducer<String, FilterTransactionsByCustom1>((selectedId, action) => ''),
|
||||
TypedReducer<String, FilterTransactionsByCustom2>((selectedId, action) => ''),
|
||||
TypedReducer<String, FilterTransactionsByCustom3>((selectedId, action) => ''),
|
||||
|
|
|
|||
|
|
@ -135,6 +135,15 @@ class _MatchDepositsState extends State<_MatchDeposits> {
|
|||
_focusNode = FocusNode();
|
||||
_selectedInvoices = [];
|
||||
|
||||
final transactions = widget.viewModel.transactions;
|
||||
final state = widget.viewModel.state;
|
||||
if (transactions.isNotEmpty) {
|
||||
_selectedInvoices = transactions.first.invoiceIds
|
||||
.split(',')
|
||||
.map((invoiceId) => state.invoiceState.get(invoiceId))
|
||||
.toList();
|
||||
}
|
||||
|
||||
updateInvoiceList();
|
||||
}
|
||||
|
||||
|
|
@ -447,6 +456,19 @@ class _MatchWithdrawalsState extends State<_MatchWithdrawals> {
|
|||
_vendorFocusNode = FocusNode();
|
||||
_categoryFocusNode = FocusNode();
|
||||
|
||||
final transactions = widget.viewModel.transactions;
|
||||
final state = widget.viewModel.state;
|
||||
if (transactions.isNotEmpty) {
|
||||
final transaction = transactions.first;
|
||||
if ((transaction.categoryId ?? '').isNotEmpty) {
|
||||
_selectedCategory =
|
||||
state.expenseCategoryState.get(transaction.categoryId);
|
||||
}
|
||||
if ((transaction.vendorId ?? '').isNotEmpty) {
|
||||
_selectedVendor = state.vendorState.get(transaction.vendorId);
|
||||
}
|
||||
}
|
||||
|
||||
updateVendorList();
|
||||
updateCategoryList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue