Helptickets: Display language in ticket list

This commit is contained in:
Annika 2021-05-03 10:35:30 -07:00
parent da1cb53002
commit 2df7307ca2
7 changed files with 10 additions and 1 deletions

View File

@ -851,7 +851,7 @@ export const pages: Chat.PageTable = {
this.checkCan('lock');
let buf = `<div class="pad ladder"><button class="button" name="send" value="/helpticket list" style="float:left"><i class="fa fa-refresh"></i> ${this.tr`Refresh`}</button> <button class="button" name="send" value="/helpticket stats" style="float: right"><i class="fa fa-th-list"></i> ${this.tr`Help Ticket Stats`}</button><br /><br />`;
buf += `<table style="margin-left: auto; margin-right: auto"><tbody><tr><th colspan="5"><h2 style="margin: 5px auto">${this.tr`Help tickets`}</h1></th></tr>`;
buf += `<tr><th>${this.tr`Status`}</th><th>${this.tr`Creator`}</th><th>${this.tr`Ticket Type`}</th><th>${this.tr`Claimed by`}</th><th>${this.tr`Action`}</th></tr>`;
buf += `<tr><th>${this.tr`Status`}</th><th>${this.tr`Creator`}</th><th>${this.tr`Ticket Type`}</th><th>${this.tr`Language`}</th><th>${this.tr`Claimed by`}</th><th>${this.tr`Action`}</th></tr>`;
const sortedTickets = Utils.sortBy(Object.values(tickets), ticket => [
ticket.open,
@ -873,9 +873,12 @@ export const pages: Chat.PageTable = {
icon = `<span style="color:orange"><i class="fa fa-circle-o"></i> <strong>${this.tr`Unclaimed`}</strong></span>`;
}
}
const ticketRoom = Rooms.get(`help-${ticket.userid}`);
buf += `<tr><td>${icon}</td>`;
buf += Utils.html`<td>${ticket.creator}</td>`;
buf += `<td>${ticket.type}</td>`;
buf += `<td>${Chat.languages.get(ticketRoom?.settings.language || '') || '-'}</td>`;
buf += Utils.html`<td>${ticket.claimed ? ticket.claimed : `-`}</td>`;
buf += `<td>`;
const roomid = 'help-' + ticket.userid;

View File

@ -82,6 +82,7 @@ export const translations: Translations = {
"Status": "Status",
"Creator": "Maker",
"Ticket Type": "Ticket Soort",
"Language": "",
"Claimed by": "Geclaimed door",
"Action": "Actie",
"And ${keys.length - count} more tickets.": "En ${keys.length - count} more tickets.",

View File

@ -82,6 +82,7 @@ export const translations: Translations = {
"Status": "",
"Creator": "",
"Ticket Type": "",
"Language": "",
"Claimed by": "",
"Action": "",
"And ${keys.length - count} more tickets.": "",

View File

@ -82,6 +82,7 @@ export const translations: Translations = {
"Status": "Status",
"Creator": "Ersteller",
"Ticket Type": "Ticket-Typ",
"Language": "",
"Claimed by": "Angenommen von",
"Action": "Aktion",
"And ${keys.length - count} more tickets.": "Und ${keys.length - count} weitere Tickets",

View File

@ -82,6 +82,7 @@ export const translations: Translations = {
"Status": "Stato",
"Creator": "Creatore",
"Ticket Type": "Tipo di Ticket",
"Language": "",
"Claimed by": "Preso in carico da",
"Action": "Azione",
"And ${keys.length - count} more tickets.": "E ${keys.length - count} ulteriori ticket",

View File

@ -82,6 +82,7 @@ export const translations: Translations = {
"Status": "Status",
"Creator": "Criador",
"Ticket Type": "Tipo de pedido",
"Language": "",
"Claimed by": "Atendido por",
"Action": "Ação",
"And ${keys.length - count} more tickets.": "E $${keys.length - count} outros pedidos",

View File

@ -82,6 +82,7 @@ export const translations: Translations = {
"Status": "Status",
"Creator": "Creador",
"Ticket Type": "Tipo de Ticket",
"Language": "Idioma",
"Claimed by": "Tomado por",
"Action": "Acción",
"And ${keys.length - count} more tickets.": "Y ${keys.length - count} tickets más.",