29 lines
917 B
TypeScript
29 lines
917 B
TypeScript
import { SrUrgency as CwServiceTicketPriority } from "../../generated/prisma/client";
|
|
import { ServiceTicketPriority as ApiServiceTicketPriority } from "../../../api/generated/prisma/client";
|
|
import { Translation } from "./types";
|
|
|
|
export const serviceTicketPriorityTranslation: Translation<
|
|
CwServiceTicketPriority,
|
|
ApiServiceTicketPriority
|
|
> = {
|
|
values: [
|
|
{ from: "srUrgencyRecId", to: "id" },
|
|
{
|
|
from: "description",
|
|
to: "name",
|
|
process: (value) => (value ? value : "Unknown Priority"),
|
|
},
|
|
{ from: "description", to: "description" },
|
|
{ from: "color", to: "color" },
|
|
{
|
|
from: "defaultFlag",
|
|
to: "defaultFlag",
|
|
process: (value) => Boolean(value),
|
|
},
|
|
{ from: "createdBy", to: "createdById" },
|
|
{ from: "updatedBy", to: "updatedById" },
|
|
{ from: "dateCreatedUtc", to: "createdAt" },
|
|
{ from: "lastUpdatedUtc", to: "updatedAt" },
|
|
],
|
|
};
|