Transactions
This commit is contained in:
parent
aff80c2e7b
commit
f2cbcf408d
|
|
@ -118,7 +118,7 @@ part 'serializers.g.dart';
|
||||||
TransactionEntity,
|
TransactionEntity,
|
||||||
TransactionListResponse,
|
TransactionListResponse,
|
||||||
TransactionItemResponse,
|
TransactionItemResponse,
|
||||||
|
TransactionStatusEntity,
|
||||||
BankAccountEntity,
|
BankAccountEntity,
|
||||||
BankAccountListResponse,
|
BankAccountListResponse,
|
||||||
BankAccountItemResponse,
|
BankAccountItemResponse,
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,7 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..add(TransactionItemResponse.serializer)
|
..add(TransactionItemResponse.serializer)
|
||||||
..add(TransactionListResponse.serializer)
|
..add(TransactionListResponse.serializer)
|
||||||
..add(TransactionState.serializer)
|
..add(TransactionState.serializer)
|
||||||
|
..add(TransactionStatusEntity.serializer)
|
||||||
..add(TransactionUIState.serializer)
|
..add(TransactionUIState.serializer)
|
||||||
..add(UIState.serializer)
|
..add(UIState.serializer)
|
||||||
..add(UserCompanyEntity.serializer)
|
..add(UserCompanyEntity.serializer)
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ Reducer<String> selectedIdReducer = combineReducers([
|
||||||
TypedReducer<String, SortTransactions>((selectedId, action) => ''),
|
TypedReducer<String, SortTransactions>((selectedId, action) => ''),
|
||||||
TypedReducer<String, FilterTransactions>((selectedId, action) => ''),
|
TypedReducer<String, FilterTransactions>((selectedId, action) => ''),
|
||||||
TypedReducer<String, FilterTransactionsByState>((selectedId, action) => ''),
|
TypedReducer<String, FilterTransactionsByState>((selectedId, action) => ''),
|
||||||
|
TypedReducer<String, FilterTransactionsByStatus>((selectedId, action) => ''),
|
||||||
TypedReducer<String, FilterTransactionsByCustom1>((selectedId, action) => ''),
|
TypedReducer<String, FilterTransactionsByCustom1>((selectedId, action) => ''),
|
||||||
TypedReducer<String, FilterTransactionsByCustom2>((selectedId, action) => ''),
|
TypedReducer<String, FilterTransactionsByCustom2>((selectedId, action) => ''),
|
||||||
TypedReducer<String, FilterTransactionsByCustom3>((selectedId, action) => ''),
|
TypedReducer<String, FilterTransactionsByCustom3>((selectedId, action) => ''),
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,15 @@ class _MatchDepositsState extends State<_MatchDeposits> {
|
||||||
_focusNode = FocusNode();
|
_focusNode = FocusNode();
|
||||||
_selectedInvoices = [];
|
_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();
|
updateInvoiceList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -447,6 +456,19 @@ class _MatchWithdrawalsState extends State<_MatchWithdrawals> {
|
||||||
_vendorFocusNode = FocusNode();
|
_vendorFocusNode = FocusNode();
|
||||||
_categoryFocusNode = 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();
|
updateVendorList();
|
||||||
updateCategoryList();
|
updateCategoryList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue