-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asset list report update #2289
Asset list report update #2289
Conversation
78419ee
to
433f6d7
Compare
c597118
to
38b9cc0
Compare
PR deployed in Google Cloud |
PR deployed in Google Cloud |
@kattylucy I was curious to test the new asset list report for the LTF pool (https://pr2289-app-ff-production.k-f.dev/#/pools/4139607887/reporting/asset-list) but ran into a few small issues, fixed those here: #2323 Besides that, it looks great though! Nice job refactoring the centrifuge.js code to use the subquery data :) One main comment: it would be great if the |
Awesome, thanks for the help - I will fix the date @hieronx |
Seeing it now in action, a few more small comments:
And two issues I noticed in the DYF pool (see https://pr2289-app-ff-production.k-f.dev/#/pools/1655476167/reporting/asset-list, put date to
|
Nice work! Also just tested it and noticed a few things:
|
The first one is definitely a bug, thanks for pointing out. The second question, I kept the previous logic regarding which loans to display, based on prev log we shouldn't display 'created' status loans. Do we want to change this? @hieronx @sophialittlejohn |
@kattylucy I would include |
I apologize but it seems like the subquery only returns ongoing assets - is not returning 'created' assets at all |
Ah ok, then just leave them out. Would still default the status to |
9d31c90
to
137590d
Compare
@kattylucy looking great! One more comment: could you change the quantity col formatting from |
@hieronx Let me look into it! Thanks!! |
e295e84
to
27809cc
Compare
One thing here, when clicking like this reporting -> asset list report -> asset name we go to the route for the specific asset. When clicking back, it takes me to the asset list instead of the table for reporting, should we change the behavior so the back button takes back to the prev page based on the user last page? hope my question makes sense |
Good point. Seems to make sense to me to change it like you suggest. @sophialittlejohn any thoughts? |
@kattylucy two more comments from latest check: The sorting by maturity date doesn't seem to fully work yet. Also, when the face value is |
@hieronx do you mind sending me the pool and the date you are using so I can confirm the issues? having a hard time reproducing the errors - thank you! |
The face value I tested on https://pr2289-app-ff-production.k-f.dev/#/pools/1655476167/reporting/asset-list, with today's date. The maturity dates I tested on https://pr2289-app-ff-production.k-f.dev/#/pools/4139607887/reporting/asset-list, also with today's date. |
778e825
to
b7d1dc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
@@ -144,22 +144,36 @@ export type SubqueryAssetTransaction = { | |||
export type SubqueryAssetSnapshot = { | |||
__typename?: 'AssetSnapshot' | |||
asset: { | |||
actualOriginationDate: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Subquery never returns Rates or CurrencyBalances so this type is now misleading. getAssetSnapshots
also uses this type and doesn't return any of the new additions, so consumers of that function may now expect values to be there that aren't there. I would suggest creating separate SubqueryPoolAssetSnapshot and PoolAssetSnapshot types to have the functions accurately reflect what they return
@@ -182,12 +296,15 @@ export function AssetList({ pool }: { pool: Pool }) { | |||
setCsvData(undefined) | |||
URL.revokeObjectURL(dataUrl) | |||
} | |||
// eslint-disable-next-line react-hooks/exhaustive-deps | |||
}, [data]) | |||
}, [snapshots]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some lint warnings in this file. for this line it's fine to disable
React.useEffect(() => { | ||
if (!data.length) { | ||
useEffect(() => { | ||
if (!snapshots?.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why check for snapshots
now and not data
? data may end up having no items because of the snapshots being filtered
const basePath = useBasePath() | ||
const { loanStatus, startDate, setCsvData } = useContext(ReportContext) | ||
const { data: poolMetadata } = usePoolMetadata(pool) | ||
const poolCreditType = useMemo(() => poolMetadata?.pool?.asset.class || 'privateCredit', [poolMetadata]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would only keep the useMemo
for data
, the others here do more harm than good
fc30639
to
788ced4
Compare
e6a8fa3
to
f563a16
Compare
- Name should be a link to asset page - Undefined should display as '-' - Undefined maturity date should display as open-end - Data table should sort by default using maturity date desc - Remove id column
f563a16
to
bcf0f74
Compare
this is unrelated to this work but when running the linter I found two warning of unused values just a cleanup
bcf0f74
to
4b4e7b5
Compare
Update asset list report
#2273