The product in the SubTransactionRowResponse is a BaseProductResponse but also has a revision so its neither a BaseProductResponse nor a ProductResponse.
Solution would be to do use the Revision to correctly create an index key but for the response drop the revision from the respons as the revision should be hidden to the end-user.
Even better, actually create a query for the TransactionReport instead of the heavy post-query processing we do now. Should also reduce the runtime of the end-point. With the new TypeOrm this query should be doable.
The
product
in theSubTransactionRowResponse
is aBaseProductResponse
but also has arevision
so its neither aBaseProductResponse
nor aProductResponse
.Solution would be to do use the Revision to correctly create an index key but for the response drop the revision from the respons as the revision should be hidden to the end-user.
Even better, actually create a query for the
TransactionReport
instead of the heavy post-query processing we do now. Should also reduce the runtime of the end-point. With the new TypeOrm this query should be doable.See line 387 of the
transaction-service.ts