Move status and audit label constants to shared/constants/labels
STATUS_LABELS was defined in the server, AUDIT_LABELS and AUDIT_COLORS in the client. Both layers now import from a single shared source. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,29 +63,7 @@ const SEVERITY_OPTIONS = [
|
||||
{ value: 5, label: 'SEV 5 — Minimal' },
|
||||
];
|
||||
|
||||
const AUDIT_LABELS: Record<string, string> = {
|
||||
CREATED: 'created this ticket',
|
||||
STATUS_CHANGED: 'changed status',
|
||||
ASSIGNEE_CHANGED: 'changed assignee',
|
||||
SEVERITY_CHANGED: 'changed severity',
|
||||
REROUTED: 'rerouted ticket',
|
||||
TITLE_CHANGED: 'updated title',
|
||||
OVERVIEW_CHANGED: 'updated overview',
|
||||
COMMENT_ADDED: 'added a comment',
|
||||
COMMENT_DELETED: 'deleted a comment',
|
||||
};
|
||||
|
||||
const AUDIT_COLORS: Record<string, string> = {
|
||||
CREATED: 'bg-green-500',
|
||||
STATUS_CHANGED: 'bg-blue-500',
|
||||
ASSIGNEE_CHANGED: 'bg-purple-500',
|
||||
SEVERITY_CHANGED: 'bg-orange-500',
|
||||
REROUTED: 'bg-cyan-500',
|
||||
TITLE_CHANGED: 'bg-gray-500',
|
||||
OVERVIEW_CHANGED: 'bg-gray-500',
|
||||
COMMENT_ADDED: 'bg-gray-500',
|
||||
COMMENT_DELETED: 'bg-red-500',
|
||||
};
|
||||
import { AUDIT_LABELS, AUDIT_COLORS } from '../../../shared/constants/labels';
|
||||
|
||||
const COMMENT_ACTIONS = new Set(['COMMENT_ADDED', 'COMMENT_DELETED']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user