-
Notifications
You must be signed in to change notification settings - Fork 1
Audit Log In Detail Pages #1025
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
base: main
Are you sure you want to change the base?
Conversation
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.
This is looking really great! I'm only seeing audit columns in the General Remarks table - should I be seeing others? If not we can get this merged in once the minor changes are made and then build on the fields that are displayed in a subsequent PR.
Maybe it's an idea to show/hide the audit columns - we could target them with CSS to manage visibility? Once again - just an idea for a future PR.
Once this is done and working, maybe we should move some of the generic components (view, url) to bcgov-arches-common
so that it can be leveraged by other apps.
def _get_nodegroup_id_from_alias(self, graph: str, alias: str) -> str | None: | ||
with connection.cursor() as cursor: | ||
query = """ | ||
SELECT DISTINCT n.nodegroupid::text |
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 graphs are now versioned so we need to filter by graphs.sourceidentifier is null
.
Maybe we could use something like this to make it more Django-y?:
https://github.com/archesproject/arches-component-lab/blob/16b55f4a86f0b4c29222cf8baedb86d4aac92408/arches_component_lab/views/node_config_mixin.py#L30-L33
|
||
<template> | ||
<Button | ||
:label="loading ? 'Loading...' : 'Populate All Entered On/By Fields'" |
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.
How about something like "Audit info" with an open / slash eye?
AliasedNodeData, | ||
} from '@/arches_component_lab/types.ts'; | ||
|
||
export interface EditLogEntry { |
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.
Let's pull these interfaces out into the src/bcgov_arches_common/types.ts
file, and include all attributes that are returned by the view?
Maybe we should extend the AlaisedNodeData
to have an audit
field (or something similar) so it can be strongly typed in Vue components?.
export function applyEditLogToTile( | ||
tile: AliasedTileData, | ||
editLogData: EditLogData | undefined, | ||
enteredOnField = 'entered_on', |
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.
Constants could be pulled out into a constants.ts
file at the same level as the types.ts
export function useSingleTileEditLog( | ||
sourceData: Ref<AliasedTileData | undefined>, | ||
editLogData: Ref<EditLogData | undefined>, | ||
options?: { |
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.
Can we default this value in the parameter list so we don't have to check for them in the body?
) { | ||
const processedData = ref<AliasedTileData | null>(null); | ||
|
||
const enteredOnField = options?.enteredOnField || 'entered_on'; |
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.
Lets use the constants you defined above.
ArchaeologicalSite
andSiteVisit
detail pages to populate "Entered By" and "Entered On" fields upon clicking it.