Conversation
mindtrace/apps/mindtrace/apps/poseidon/poseidon/state/grid_state.py
Outdated
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/components_v2/core/filter_table.py
Outdated
Show resolved
Hide resolved
| # Verify password against stored hash | ||
| if not verify_password(password, user.password_hash): | ||
| raise InvalidCredentialsError("Invalid password.") | ||
| # if not verify_password(password, user.password_hash): |
mindtrace/apps/mindtrace/apps/poseidon/poseidon/pages/filter_table_demo.py
Outdated
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/components_v2/core/filter_table.py
Outdated
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/components_v2/layout/sidebar/sidebar.py
Outdated
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/components_v2/core/filter_table.py
Outdated
Show resolved
Hide resolved
|
Thanks for the PR, I've left some comments on the individual parts and I'll test out the UI later, overall most immediate thing to do is hook it up with dataset and reflect the data models we have. That would guide the fields used in the UI side as well, right now we have unnecessary fields that are not in the db.
|
|
also in case we want to render table in other pages, we might need table to have its own component state rather than a global one: |
There was a problem hiding this comment.
this file seems redundant, can we remove this and move this final page to filter_table.py ?
There was a problem hiding this comment.
That would break the structure, since we are keeping pages separate from components. I think it's better to wrap page_container in the page file and have clarity in how we will use it, etc. Avoids confusion and is clear; we need to do that with other pages, too. I'll change the name and remove the demo.
mindtrace/apps/mindtrace/apps/poseidon/poseidon/pages/lineview/filter_table.py
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/pages/lineview/filter_table.py
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/state/line_view_state.py
Outdated
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/state/line_view_state.py
Outdated
Show resolved
Hide resolved
mindtrace/apps/mindtrace/apps/poseidon/poseidon/state/line_view_state.py
Outdated
Show resolved
Hide resolved
| page_size: int = DEFAULT_PAGE_SIZE | ||
|
|
||
| # Modal (row-level details) | ||
| modal_open: bool = False |
There was a problem hiding this comment.
these many selected fields look crowded, same way we store a single rows, can we store a single details object?
also let's type rows and this, example:
@dataclass
class PartPreview:
... serial_ids, other preview info
@dataclass
class PartDetails:
images: List[str]
etc.
and then within the state:
self.rows:List[PartPreview]
self.selected_part_detail:PartDetail
this will be more safe, right now it's pretty hard to track what part details or what rows are
This pull request introduces a new "Audit Trail" page featuring a filterable, sortable, and paginated table for inspection traceability and accountability. It adds a reusable generic table state, integrates the new page into the sidebar and routing, and includes supporting style and dependency updates. Additionally, there is a temporary change to the authentication service that disables password verification.
Audit Trail Table Feature:
filter_table_demo.pypage that displays an "Audit Trail" using theFilterTablecomponent and the newGridStatefor managing table data, filters, sorting, and modal state. (mindtrace/apps/mindtrace/apps/poseidon/poseidon/pages/filter_table_demo.py, mindtrace/apps/mindtrace/apps/poseidon/poseidon/pages/filter_table_demo.pyR1-R15)GridState, a reusable state class providing static table data, filter configuration, sorting, pagination, and modal logic for the audit trail table. (mindtrace/apps/mindtrace/apps/poseidon/poseidon/state/grid_state.py, mindtrace/apps/mindtrace/apps/poseidon/poseidon/state/grid_state.pyR1-R252)/filter-table-demoand adding an entry labeled "Audit Trail with Modal". (mindtrace/apps/mindtrace/apps/poseidon/poseidon/poseidon.py, [1] [2];mindtrace/apps/mindtrace/apps/poseidon/poseidon/pages/__init__.py, [3] [4];mindtrace/apps/mindtrace/apps/poseidon/poseidon/components_v2/layout/sidebar/sidebar.py, [5]Supporting Updates:
table_accordianfor future table UI improvements. (mindtrace/apps/mindtrace/apps/poseidon/poseidon/styles/variants.py, mindtrace/apps/mindtrace/apps/poseidon/poseidon/styles/variants.pyR280-R284)reflex==0.7.6.post1torequirements.txtto ensure the required UI library is available. (mindtrace/apps/mindtrace/apps/poseidon/requirements.txt, mindtrace/apps/mindtrace/apps/poseidon/requirements.txtR1-R2).gitignoreto exclude.env.devfiles. (mindtrace/apps/mindtrace/apps/poseidon/.gitignore, mindtrace/apps/mindtrace/apps/poseidon/.gitignoreR7)Temporary Authentication Change:
authenticate_user(likely for development/demo purposes; this should be reverted before production). (mindtrace/apps/mindtrace/apps/poseidon/poseidon/backend/services/auth_service.py, mindtrace/apps/mindtrace/apps/poseidon/poseidon/backend/services/auth_service.pyL103-R104)