Skip to content

Commit 2fcaf99

Browse files
committed
Update identityForm actions and logs routing
1 parent d1ec611 commit 2fcaf99

File tree

5 files changed

+49
-8
lines changed

5 files changed

+49
-8
lines changed

src/components/identityForm/actions.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ async function sync() {
5757
}
5858
5959
function logs() {
60-
console.log('logs')
61-
router.push(`/logs?filters[^concernedTo]=/${(props.identity as any)._id}/i&sort[metadata.lastUpdatedAt]=desc`)
60+
router.push(`/jobs?filters[=concernedTo]=${(props.identity as any)._id}`)
6261
}
6362
6463
function back() {

src/pages/identities/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ async function sync(identity: Identity) {
227227
}
228228
229229
function logs(identity: Identity & { _id: string }) {
230-
router.push({ name: 'identities-logs', query: { id: identity._id } })
230+
router.push(`/logs?filters[concernedTo]=${identity._id}`)
231231
}
232232
233233
const actions = {

src/pages/jobs/index.vue

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<template lang="pug">
2+
div.fit
3+
//- .q-px-md
4+
//- sesame-searchfilters(:fields="fieldsList")
5+
q-scroll-area.fit.q-px-lg
6+
q-timeline.q-px-lg
7+
q-timeline-entry(heading) November, 2017
8+
q-timeline-entry(
9+
v-for="(job, key) in jobs.data" :key="key"
10+
:title="job.jobId" :subtitle="job.action" icon="mdi-account" color="orange"
11+
)
12+
div
13+
pre(v-html="JSON.stringify(job, null, 2)")
14+
</template>
15+
16+
<script lang="ts" setup>
17+
// const fieldsList = computed(() => {
18+
// return columns.value!.reduce((acc: { name: string; label: string; type?: string }[], column) => {
19+
// if (visibleColumns.value!.includes(column.name) && column.name !== 'actions' && column.name !== 'states') {
20+
// const type = columnsType.value.find((type) => type.name === column.name)?.type
21+
// acc.push({
22+
// name: column.name,
23+
// label: column.label,
24+
// type,
25+
// })
26+
// }
27+
// return acc
28+
// }, [])
29+
// })
30+
31+
const $route = useRoute();
32+
33+
const query = computed(() => {
34+
return {
35+
limit: 100,
36+
'sort[metadata.lastUpdatedAt]': 'desc',
37+
...$route.query,
38+
};
39+
});
40+
41+
const { data: jobs, pending, error, refresh } = await useHttp(`/core/jobs/`, {
42+
method: 'GET',
43+
query,
44+
});
45+
</script>

src/pages/logs/index.vue

Lines changed: 0 additions & 3 deletions
This file was deleted.

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"extends": "./.nuxt/tsconfig.json",
44
"compilerOptions": {
55
"moduleResolution": "node",
6-
"noImplicitAny": false,
7-
"esModuleInterop": true
6+
"noImplicitAny": false
7+
// "esModuleInterop": true
88
//"types": ["./types/auth.d.ts"]
99
},
1010
"vueCompilerOptions": {

0 commit comments

Comments
 (0)