Skip to content
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

4001 - Datatable use Datagrid - Fix Growing Stock Composition 2025 header row & Minor fixes #4190

Conversation

yaguzmang
Copy link
Contributor

@yaguzmang yaguzmang commented Dec 24, 2024

Before:
Pasted Graphic 8

After:
Pasted Graphic 9

Minor fixes:
table_1_4b_2020 labels before:
image

now:
image

join ${schemaAssessment}.table t on r.table_id = t.id
where r.props ->> 'index' = 'header_1'
and t.props ->> 'name' = 'growingStockComposition2025'
);`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any alternatives to handle moving cols from one row to another? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having two cols ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having two cols as in duplicating them?

I was trying to simplify the query move the cols, but this was the most concise I could get it to.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand then 😅
Why would you need to move a column ? A column is associated to a row through row_id .

Copy link
Contributor Author

@yaguzmang yaguzmang Dec 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see 😅 Allow me to explain:
This issue with the header:
image

was there because the cols "FRA 2025 categories", "Scientific name", "Common name" were associated to a row_id, and "Million m³" with "% of total" were associated to a different row_id.
When the actions are visible, we render an empty div for each header row, and because in the data we had two different rows for the same header, an extra empty div was added unnecessarily.

So, in the query I change the row_id of "Million m³" and "% of total" to the row_id of "FRA 2025 categories", "Scientific name" and "Common name". That way those are all in the same row. I then delete the row that is left with no cols.

My question is if any other alternatives to that query come to mind

@yaguzmang yaguzmang changed the title 4001 - Datatable use Datagrid - Fix Growing Stock Composition 2025 header row 4001 - Datatable use Datagrid - Fix Growing Stock Composition 2025 header row & Minor fixes Dec 24, 2024
@yaguzmang yaguzmang marked this pull request as ready for review December 25, 2024 00:24
@mergify mergify bot merged commit 325b649 into 4001-datatable-use-datagrid Dec 25, 2024
5 checks passed
@mergify mergify bot deleted the 4001-datatable-use-datagrid-fix-growing-stock-composition-2025-header-rows branch December 25, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants