add distribution column in a ticket

This commit is contained in:
Yinyin Liu 2026-04-29 14:57:17 +02:00
parent a8b371e1da
commit 8d43687829
3 changed files with 17 additions and 8 deletions

View File

@ -2542,7 +2542,8 @@ public class Controller : ControllerBase
t.Id, t.Subject, t.Status, t.Priority, t.Category, t.SubCategory, t.Id, t.Subject, t.Status, t.Priority, t.Category, t.SubCategory,
t.InstallationId, t.CreatedAt, t.UpdatedAt, t.InstallationId, t.CreatedAt, t.UpdatedAt,
t.CustomSubCategory, t.CustomCategory, t.CustomSubCategory, t.CustomCategory,
installationName = installation?.Name ?? (t.InstallationId.HasValue ? $"#{t.InstallationId}" : "No installation") installationName = installation?.Name ?? (t.InstallationId.HasValue ? $"#{t.InstallationId}" : "No installation"),
distributionPartner = installation?.DistributionPartner ?? ""
}; };
}); });

View File

@ -167,6 +167,18 @@ function TicketList() {
defaultMessage="Status" defaultMessage="Status"
/> />
</TableCell> </TableCell>
<TableCell>
<FormattedMessage
id="installation"
defaultMessage="Installation"
/>
</TableCell>
<TableCell>
<FormattedMessage
id="distributionPartner"
defaultMessage="Distribution Partner"
/>
</TableCell>
<TableCell> <TableCell>
<FormattedMessage <FormattedMessage
id="priority" id="priority"
@ -179,12 +191,6 @@ function TicketList() {
defaultMessage="Category" defaultMessage="Category"
/> />
</TableCell> </TableCell>
<TableCell>
<FormattedMessage
id="installation"
defaultMessage="Installation"
/>
</TableCell>
<TableCell> <TableCell>
<FormattedMessage <FormattedMessage
id="createdAt" id="createdAt"
@ -213,6 +219,8 @@ function TicketList() {
<TableCell> <TableCell>
<StatusChip status={ticket.status} /> <StatusChip status={ticket.status} />
</TableCell> </TableCell>
<TableCell>{ticket.installationName}</TableCell>
<TableCell>{ticket.distributionPartner}</TableCell>
<TableCell>{intl.formatMessage(priorityKeys[ticket.priority] ?? { id: 'unknown', defaultMessage: '-' })}</TableCell> <TableCell>{intl.formatMessage(priorityKeys[ticket.priority] ?? { id: 'unknown', defaultMessage: '-' })}</TableCell>
<TableCell> <TableCell>
{ticket.customCategory {ticket.customCategory
@ -224,7 +232,6 @@ function TicketList() {
? `${ticket.customSubCategory}` ? `${ticket.customSubCategory}`
: ''} : ''}
</TableCell> </TableCell>
<TableCell>{ticket.installationName}</TableCell>
<TableCell> <TableCell>
{new Date(ticket.createdAt).toLocaleDateString()} {new Date(ticket.createdAt).toLocaleDateString()}
</TableCell> </TableCell>

View File

@ -264,6 +264,7 @@ export type TicketSummary = {
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
installationName: string; installationName: string;
distributionPartner: string;
customSubCategory: string | null; customSubCategory: string | null;
customCategory: string | null; customCategory: string | null;
}; };