Skip to content

Commit

Permalink
Get audittrails on update
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 committed Oct 23, 2024
1 parent 1c67913 commit bc416fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/store/modules/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export const useObjectStore = defineStore('object', {
})
const data = await response.json()
this.setObjectItem(data)
this.getAuditTrails(data.id)

return data
} catch (err) {
console.error(err)
Expand Down Expand Up @@ -138,6 +140,7 @@ export const useObjectStore = defineStore('object', {

this.refreshObjectList()
this.setObjectItem(data)
this.getAuditTrails(data.id)

return { response, data }
},
Expand Down
6 changes: 3 additions & 3 deletions src/views/object/ObjectDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ import { objectStore, navigationStore } from '../../store/store.js'
</div>
</BTab>
<BTab title="Audit Trails">
<div v-if="auditTrails.length">
<NcListItem v-for="(auditTrail, key) in auditTrails"
<div v-if="objectStore.auditTrails.length">
<NcListItem v-for="(auditTrail, key) in objectStore.auditTrails"
:key="key"
:name="new Date(auditTrail.created).toLocaleString()"
:bold="false"
Expand All @@ -87,7 +87,7 @@ import { objectStore, navigationStore } from '../../store/store.js'
</template>
</NcListItem>
</div>
<div v-if="!auditTrails.length">
<div v-if="!objectStore.auditTrails.length">
No audit trails found
</div>
</BTab>
Expand Down

0 comments on commit bc416fe

Please sign in to comment.