mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Fix log display for checkins and order splits (Z#23181229) (#4818)
- Fix link in pretix.event.order.changed.split - Add link to existing order in pretix.event.order.changed.split_from - Fix display of checkin entries without datetime in data - Add additional info for admins (action type, linked content object)
This commit is contained in:
@@ -1065,11 +1065,17 @@ function add_log_expand_handlers(el) {
|
||||
} else if ($a.is("[data-expandpayment]")) {
|
||||
url += 'payment/'
|
||||
}
|
||||
function format_data(data) {
|
||||
return Object.entries(data).map(([key, value]) =>
|
||||
$("<div>").append(
|
||||
$("<b>").text(key + ': '),
|
||||
$("<span>").text(JSON.stringify(value, null, 2))));
|
||||
}
|
||||
$.getJSON(url + '?pk=' + id, function (data) {
|
||||
if ($a.parent().tagName === "p") {
|
||||
$("<pre>").text(JSON.stringify(data.data, null, 2)).insertAfter($a.parent());
|
||||
$("<pre>").append(format_data(data)).insertAfter($a.parent());
|
||||
} else {
|
||||
$("<pre>").text(JSON.stringify(data.data, null, 2)).appendTo($a.parent());
|
||||
$("<pre>").append(format_data(data)).appendTo($a.parent());
|
||||
}
|
||||
$a.remove();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user