Skip to content

Commit

Permalink
Merge pull request #11 from Ben10083/project/ares/access_tickets
Browse files Browse the repository at this point in the history
Access Ticket Tweaks
  • Loading branch information
realforest2001 committed Aug 14, 2023
2 parents b23f4e2 + 7a91fde commit 27bf422
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
7 changes: 6 additions & 1 deletion code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,13 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
return TRUE

if("new_access")
var/ticket_holder
var/priority_report = FALSE
var/ticket_holder = tgui_input_text(operator, "Who is the ticket for? (Please use precise name, with punctuation and capitalisation.)", "Ticket Holder", encode = FALSE)
var/is_self = tgui_alert(operator, "Is this request for yourself?", "Ticket Holder", list("Yes", "No"))
if(is_self == "No")
ticket_holder = tgui_input_text(operator, "Who is the ticket for? (Please use precise name, with punctuation and capitalisation.)", "Ticket Holder", encode = FALSE)
else if(is_self == "Yes")
ticket_holder = last_login
if(!ticket_holder)
return FALSE
var/details = tgui_input_text(operator, "What is the purpose of this access ticket?", "Ticket Details", encode = FALSE)
Expand Down
16 changes: 11 additions & 5 deletions tgui/packages/tgui/interfaces/WorkingJoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,25 +721,28 @@ const AccessRequests = (props, context) => {
<Flex.Item bold width="6rem" shrink="0" mr="1rem">
Time
</Flex.Item>
<Flex.Item width="8rem" mr="1rem" bold>
For
</Flex.Item>
<Flex.Item width="40rem" bold>
Details
</Flex.Item>
</Flex>
)}
{access_tickets.map((ticket, i) => {
let view_status = 'Ticket is pending assignment.';
let view_status = 'Access Ticket is pending assignment.';
let view_icon = 'circle-question';
if (ticket.status === 'assigned') {
view_status = 'Ticket is assigned.';
view_status = 'Access Ticket is assigned.';
view_icon = 'circle-plus';
} else if (ticket.status === 'rejected') {
view_status = 'Ticket has been rejected.';
view_status = 'Access Ticket has been rejected.';
view_icon = 'circle-xmark';
} else if (ticket.status === 'cancelled') {
view_status = 'Ticket was cancelled by reporter.';
view_status = 'Access Ticket was cancelled by reporter.';
view_icon = 'circle-stop';
} else if (ticket.status === 'completed') {
view_status = 'Ticket has been successfully resolved.';
view_status = 'Access Ticket has been successfully resolved.';
view_icon = 'circle-check';
}
let can_cancel = 'Yes';
Expand All @@ -764,6 +767,9 @@ const AccessRequests = (props, context) => {
<Flex.Item italic width="6rem" shrink="0" mr="1rem">
{ticket.time}
</Flex.Item>
<Flex.Item width="8rem" mr="1rem">
{ticket.title}
</Flex.Item>
<Flex.Item width="40rem" shrink="0" textAlign="left">
{ticket.details}
</Flex.Item>
Expand Down

0 comments on commit 27bf422

Please sign in to comment.