|
Lines 4-9
$(document).ready(function() {
Link Here
|
| 4 |
let button = $(event.relatedTarget); |
4 |
let button = $(event.relatedTarget); |
| 5 |
let ticket_id = button.data('concern'); |
5 |
let ticket_id = button.data('concern'); |
| 6 |
let resolved = button.data('resolved'); |
6 |
let resolved = button.data('resolved'); |
|
|
7 |
let assignee = button.data('assignee'); |
| 7 |
modal.find('.modal-footer input').val(ticket_id); |
8 |
modal.find('.modal-footer input').val(ticket_id); |
| 8 |
|
9 |
|
| 9 |
if ( resolved ) { |
10 |
if ( resolved ) { |
|
Lines 17-22
$(document).ready(function() {
Link Here
|
| 17 |
// Display ticket details |
18 |
// Display ticket details |
| 18 |
let display = '<div class="list-group">'; |
19 |
let display = '<div class="list-group">'; |
| 19 |
display += '<div class="list-group-item">'; |
20 |
display += '<div class="list-group-item">'; |
|
|
21 |
if (assignee) { |
| 22 |
display += '<span class="pull-right"><span class="label">' + __("Assignee") + '</span>: ' + assignee + '</span>'; |
| 23 |
} |
| 20 |
display += '<span class="wrapfix">' + detail + '</span>'; |
24 |
display += '<span class="wrapfix">' + detail + '</span>'; |
| 21 |
display += '</div>'; |
25 |
display += '</div>'; |
| 22 |
display += '<div id="concern-updates" class="list-group-item">'; |
26 |
display += '<div id="concern-updates" class="list-group-item">'; |
|
Lines 32-38
$(document).ready(function() {
Link Here
|
| 32 |
url: "/api/v1/tickets/" + ticket_id + "/updates", |
36 |
url: "/api/v1/tickets/" + ticket_id + "/updates", |
| 33 |
method: "GET", |
37 |
method: "GET", |
| 34 |
headers: { |
38 |
headers: { |
| 35 |
"x-koha-embed": [ "user", "+strings" ] |
39 |
"x-koha-embed": [ "user", "assignee", "+strings" ] |
| 36 |
}, |
40 |
}, |
| 37 |
}).success(function(data) { |
41 |
}).success(function(data) { |
| 38 |
let updates_display = $('#concern-updates'); |
42 |
let updates_display = $('#concern-updates'); |
|
Lines 52-61
$(document).ready(function() {
Link Here
|
| 52 |
url: true |
56 |
url: true |
| 53 |
}) + ' (' + $datetime(item.date) + ')'; |
57 |
}) + ' (' + $datetime(item.date) + ')'; |
| 54 |
if ( item.status ) { |
58 |
if ( item.status ) { |
| 55 |
updates += '<span class="wrapfix pull-right">'; |
59 |
updates += '<span class="clearfix pull-right">'; |
| 56 |
updates += item._strings.status ? escape_str(item._strings.status.str) : ""; |
60 |
updates += item._strings.status ? escape_str(item._strings.status.str) : ""; |
| 57 |
updates += '</span>' |
61 |
updates += '</span>' |
| 58 |
} |
62 |
} |
|
|
63 |
if ( item.assignee ) { |
| 64 |
updates += '<span class="clearfix pull-right">'; |
| 65 |
updates += $patron_to_html(item.assignee, { |
| 66 |
display_cardnumber: false, |
| 67 |
url: true |
| 68 |
}); |
| 69 |
updates += '</span>' |
| 70 |
} |
| 59 |
updates += '</span>'; |
71 |
updates += '</span>'; |
| 60 |
updates += '</div>'; |
72 |
updates += '</div>'; |
| 61 |
}); |
73 |
}); |
| 62 |
- |
|
|