Skip to content

Commit

Permalink
Addressses Review Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gbdubs committed Jan 22, 2024
1 parent cf86524 commit 8a6045f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion frontend/components/standard/Nav.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { type MenuItem } from 'primevue/menuitem'
import type * as PrimeVueMenu from 'primevue/menu'
const { t } = useI18n()
const localePath = useLocalePath()
Expand Down
15 changes: 10 additions & 5 deletions frontend/pages/audit-logs.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { type AuditLogQuerySort, type AuditLogQueryWhere, type AuditLogQueryReq, AuditLogAction, AuditLogTargetType, AuditLogQuerySortBy, type AuditLog } from '@/openapi/generated/pacta'
import { urlReactiveAuditLogQuery } from '@/lib/auditlogquery'
import { type DataTableSortMeta, type DataTableFilterMeta } from 'primevue/datatable'
import { type DataTableSortMeta } from 'primevue/datatable'
import { FilterMatchMode } from 'primevue/api'
const prefix = 'pages/audit-logs'
Expand Down Expand Up @@ -196,7 +196,7 @@ const allColumns: Column[] = [
customBody: true,
filterType: FilterType.EnumBased,
enumValues: Object.values(AuditLogAction).map((a: AuditLogAction) => ({
label: `${a}`.replace('AuditLogAction', ''),
label: a.replace('AuditLogAction', ''),
value: a,
})).sort((a, b) => a.label.localeCompare(b.label)),
},
Expand Down Expand Up @@ -231,7 +231,7 @@ const allColumns: Column[] = [
sortBy: AuditLogQuerySortBy.AUDIT_LOG_QUERY_SORT_BY_PRIMARY_TARGET_TYPE,
filterType: FilterType.EnumBased,
enumValues: Object.values(AuditLogTargetType).map((a: AuditLogTargetType) => ({
label: `${a}`.replace('AuditLogTargetType', ''),
label: a.replace('AuditLogTargetType', ''),
value: a,
})).sort((a, b) => a.label.localeCompare(b.label)),
},
Expand Down Expand Up @@ -439,9 +439,14 @@ const getTargetLink = (t: AuditLogTargetType, id: string): string => {
return '#'
}
const columnControlOverlay = useState<{ toggle: (e: Event) => void }>(`${prefix}.columnControlOverlay`)
const columnControlOverlay = ref<{ toggle: (e: Event) => void }>()
const toggleColumnControl = (e: Event) => {
columnControlOverlay.value.toggle(e)
const c = columnControlOverlay.value
if (c) {
c.toggle(e)
} else {
console.warn('columnControlOverlay is not available')
}
}
const defaultAuditLogQuery = (): AuditLogQueryReq => {
Expand Down

0 comments on commit 8a6045f

Please sign in to comment.