interfaces.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. import { IssueStatus, IssuePriority, IssueType } from '../../../../modules/project/services/project-issue.service';
  2. export interface ProjectStage {
  3. id: string;
  4. name: string;
  5. order: number;
  6. }
  7. export interface ProjectPhase {
  8. name: string;
  9. percentage: number;
  10. startPercentage: number;
  11. isCompleted: boolean;
  12. isCurrent: boolean;
  13. }
  14. export interface Project {
  15. id: string;
  16. name: string;
  17. type: 'soft' | 'hard';
  18. memberType: 'vip' | 'normal';
  19. designerName: string;
  20. status: string;
  21. expectedEndDate: Date;
  22. deadline: Date;
  23. createdAt?: Date;
  24. isOverdue: boolean;
  25. overdueDays: number;
  26. dueSoon: boolean;
  27. urgency: 'high' | 'medium' | 'low';
  28. phases: ProjectPhase[];
  29. currentStage: string;
  30. qualityRating?: 'excellent' | 'qualified' | 'unqualified' | 'pending';
  31. lastCustomerFeedback?: string;
  32. searchIndex?: string;
  33. // 可选扩展字段
  34. contact?: any;
  35. customer?: string;
  36. designerId?: string;
  37. space?: string;
  38. demoday?: Date;
  39. updatedAt?: Date | string;
  40. data?: any;
  41. }
  42. export interface TodoTask {
  43. id: string;
  44. title: string;
  45. description: string;
  46. deadline: Date;
  47. priority: 'high' | 'medium' | 'low';
  48. type: 'review' | 'assign' | 'performance';
  49. targetId: string;
  50. }
  51. export interface TodoTaskFromIssue {
  52. id: string;
  53. title: string;
  54. description?: string;
  55. priority: IssuePriority;
  56. type: IssueType;
  57. status: IssueStatus;
  58. projectId: string;
  59. projectName: string;
  60. relatedSpace?: string;
  61. relatedStage?: string;
  62. assigneeName?: string;
  63. creatorName?: string;
  64. createdAt: Date;
  65. updatedAt: Date;
  66. dueDate?: Date;
  67. tags?: string[];
  68. }
  69. export interface UrgentEvent {
  70. id: string;
  71. title: string;
  72. description: string;
  73. eventType: 'review' | 'delivery' | 'phase_deadline' | 'customer_alert';
  74. phaseName?: string;
  75. deadline: Date;
  76. projectId: string;
  77. projectName: string;
  78. designerName?: string;
  79. urgencyLevel: 'critical' | 'high' | 'medium';
  80. overdueDays?: number;
  81. completionRate?: number;
  82. category?: 'customer' | 'phase' | 'review' | 'delivery';
  83. statusType?: 'dueSoon' | 'overdue' | 'stagnant';
  84. followUpNeeded?: boolean;
  85. allowConfirmOnTime?: boolean;
  86. allowMarkHandled?: boolean;
  87. allowCreateTodo?: boolean;
  88. stagnationDays?: number;
  89. customerIssueType?: 'feedback_pending' | 'complaint' | 'idle';
  90. labels?: string[];
  91. isMuted?: boolean;
  92. }
  93. export interface LeaveRecord {
  94. id: string;
  95. employeeName: string;
  96. date: string;
  97. isLeave: boolean;
  98. leaveType?: 'sick' | 'personal' | 'annual' | 'other';
  99. reason?: string;
  100. }
  101. export interface EmployeeDetail {
  102. name: string;
  103. currentProjects: number;
  104. projectNames: string[];
  105. projectData: Array<{ id: string; name: string }>;
  106. leaveRecords: LeaveRecord[];
  107. redMarkExplanation: string;
  108. calendarData?: EmployeeCalendarData;
  109. surveyCompleted?: boolean;
  110. surveyData?: any;
  111. profileId?: string;
  112. }
  113. export interface EmployeeCalendarData {
  114. currentMonth: Date;
  115. days: EmployeeCalendarDay[];
  116. }
  117. export interface EmployeeCalendarDay {
  118. date: Date;
  119. projectCount: number;
  120. projects: Array<{ id: string; name: string; deadline?: Date }>;
  121. isToday: boolean;
  122. isCurrentMonth: boolean;
  123. }