fix: align frontend status types with API string enum serialization
ASP.NET serializes C# enums as strings by default ("Pending", "Active"),
but frontend types used numeric values (0, 1). Changed WorkTaskStatus and
NoteType to string values matching API output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
export const WorkTaskStatus = {
|
||||
Pending: 0,
|
||||
Active: 1,
|
||||
Paused: 2,
|
||||
Completed: 3,
|
||||
Abandoned: 4,
|
||||
Pending: 'Pending',
|
||||
Active: 'Active',
|
||||
Paused: 'Paused',
|
||||
Completed: 'Completed',
|
||||
Abandoned: 'Abandoned',
|
||||
} as const
|
||||
export type WorkTaskStatus = (typeof WorkTaskStatus)[keyof typeof WorkTaskStatus]
|
||||
|
||||
export const NoteType = {
|
||||
PauseNote: 0,
|
||||
ResumeNote: 1,
|
||||
General: 2,
|
||||
PauseNote: 'PauseNote',
|
||||
ResumeNote: 'ResumeNote',
|
||||
General: 'General',
|
||||
} as const
|
||||
export type NoteType = (typeof NoteType)[keyof typeof NoteType]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user