Tagessteuerung
This commit is contained in:
1 parent
560b747d5d
commit
904b123884
8 files changed
+744
-80
No files matched your search
@@ -23,7 +23,7 @@ import {
|
||||
} from "../api";
|
||||
import { getLocalStorageValue, setLocalStorageValue } from "@/lib/local-storage.client";
|
||||
import type { AuthUser } from "../types";
|
||||
import { zammadPriorityLabel, zammadStateLabel } from "../zammad-meta";
|
||||
import { zammadPriorityLabel, zammadStateId, zammadStateLabel } from "../zammad-meta";
|
||||
|
||||
type ZammadSyncPageProps = {
|
||||
currentUser: AuthUser;
|
||||
@@ -289,7 +289,8 @@ function formatZammadPriority(value: unknown) {
|
||||
}
|
||||
|
||||
function formatZammadState(value: unknown) {
|
||||
const stateId = numericValue(value);
|
||||
const normalizedStateId = zammadStateId(value);
|
||||
const stateId = normalizedStateId ? numericValue(normalizedStateId) : null;
|
||||
|
||||
if (stateId !== null) {
|
||||
return `${stateId} (${zammadStateLabel(stateId)})`;
|
||||
@@ -512,7 +513,11 @@ function comparablePreviewIdValue(value: unknown) {
|
||||
}
|
||||
|
||||
function comparablePreviewValueForField(field: string, value: unknown) {
|
||||
if (field === "Organisation" || field === "Zammad-Priorität" || field === "Zammad-Status") {
|
||||
if (field === "Zammad-Status") {
|
||||
return zammadStateId(value);
|
||||
}
|
||||
|
||||
if (field === "Organisation" || field === "Zammad-Priorität") {
|
||||
return comparablePreviewIdValue(value);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user