Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tgui/packages/tgui/interfaces/TicketListPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const TicketSummary = (props, context) => {
<Button
icon="reply"
onClick={() => act('reply', {
'id': ticket.id,
'index': ticket.index,
})}>
{ticket.initiator_key_name}
</Button><br />
Expand All @@ -190,7 +190,7 @@ export const TicketSummary = (props, context) => {
disabled={button.disabled}
selected={button.selected}
onClick={(val => () => act(val, {
'id': ticket.id,
'index': ticket.index,
}))(button.act)}>
{button.name}
</Button>
Expand Down
8 changes: 6 additions & 2 deletions yogstation/code/modules/admin/verbs/ticketpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ GLOBAL_VAR_INIT(experimental_adminpanel, TRUE)
.["resolved_tickets"] = list()
.["user_key"] = user.key

for(var/datum/admin_help/ahelp as anything in GLOB.ahelp_tickets.tickets_list)
for(var/i in 1 to tickets_list.len)
var/datum/admin_help/ahelp = tickets_list[i]
if(!istype(ahelp)) return

var/ticket_data = list()
ticket_data["name"] = ahelp.name
ticket_data["id"] = ahelp.id
ticket_data["index"] = i
ticket_data["initiator_key_name"] = ahelp.initiator_key_name
ticket_data["initiator_ckey"] = ahelp.initiator_ckey
ticket_data["admin_key"] = ahelp.handling_admin && ahelp.handling_admin.key
Expand All @@ -36,7 +40,7 @@ GLOBAL_VAR_INIT(experimental_adminpanel, TRUE)
. = ..()
if(.)
return
var/datum/admin_help/ticket = tickets_list[params["id"]]
var/datum/admin_help/ticket = tickets_list[params["index"]]
if(!ticket)
return FALSE

Expand Down