When viewing logs via the ui, you can now click on the item to show it
This commit is contained in:
parent
0030372879
commit
db5e3a7cbc
|
@ -145,14 +145,42 @@
|
||||||
time: ('0' + c.getHours()).slice(-2) + ':' + ('0' + c.getMinutes()).slice(-2)
|
time: ('0' + c.getHours()).slice(-2) + ':' + ('0' + c.getMinutes()).slice(-2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let logAction = ls[l].log
|
||||||
|
|
||||||
this.logs[i] = {
|
this.logs[i] = {
|
||||||
id: {content: ls[l].id, hide: true}, // Don't show the id
|
id: {content: ls[l].id, hide: true}, // Don't show the id
|
||||||
user: ls[l].userID,
|
user: ls[l].userID,
|
||||||
log: this.logActions[ls[l].log],
|
log: this.logActions[logAction],
|
||||||
item: ls[l].itemID,
|
item: {content: ls[l].itemID, link: '#'},
|
||||||
time: time.date + ' ' + time.time
|
time: time.date + ' ' + time.time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Build the item link
|
||||||
|
// Book
|
||||||
|
if (logAction === 1 || logAction === 2 || logAction === 3) {
|
||||||
|
this.logs[i].item.link = '/books/' + ls[l].itemID
|
||||||
|
}
|
||||||
|
|
||||||
|
// Author
|
||||||
|
if (logAction === 4 || logAction === 5 || logAction === 6) {
|
||||||
|
this.logs[i].item.link = '/authors/' + ls[l].itemID
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publisher
|
||||||
|
if (logAction === 7 || logAction === 8 || logAction === 9) {
|
||||||
|
this.logs[i].item.link = '/publishers/' + ls[l].itemID
|
||||||
|
}
|
||||||
|
|
||||||
|
// Item
|
||||||
|
if (logAction === 10 || logAction === 11 || logAction === 12) {
|
||||||
|
this.logs[i].item.link = '/items/' + ls[l].itemID
|
||||||
|
}
|
||||||
|
|
||||||
|
// User
|
||||||
|
if (logAction === 13 || logAction === 14 || logAction === 15 || logAction === 16) {
|
||||||
|
this.logs[i].item.link = '/users/' + ls[l].itemID
|
||||||
|
}
|
||||||
|
|
||||||
// increment dat shit
|
// increment dat shit
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue