feat: add time entry manager, controller, and API routes

This commit is contained in:
2026-04-21 00:52:35 +00:00
parent 38654601c9
commit a55850e2c1
39 changed files with 4700 additions and 440 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -90,12 +90,22 @@ export const ModelName = {
ScheduleType: 'ScheduleType',
ScheduleSpan: 'ScheduleSpan',
Schedule: 'Schedule',
Activity: 'Activity',
ActivityNotes: 'ActivityNotes',
ActivityType: 'ActivityType',
ActivityStatus: 'ActivityStatus',
TimeEntry: 'TimeEntry',
TimeEntryStatus: 'TimeEntryStatus',
TimeEntryChargeCode: 'TimeEntryChargeCode',
TimeActivityClass: 'TimeActivityClass',
TimeActivityType: 'TimeActivityType',
CredentialType: 'CredentialType',
SecureValue: 'SecureValue',
Credential: 'Credential',
GeneratedQuotes: 'GeneratedQuotes',
TaxCode: 'TaxCode',
CwMember: 'CwMember'
CwMember: 'CwMember',
CwMemberType: 'CwMemberType'
} as const
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -888,6 +898,204 @@ export const ScheduleScalarFieldEnum = {
export type ScheduleScalarFieldEnum = (typeof ScheduleScalarFieldEnum)[keyof typeof ScheduleScalarFieldEnum]
export const ActivityScalarFieldEnum = {
id: 'id',
uid: 'uid',
subject: 'subject',
startTime: 'startTime',
endTime: 'endTime',
assignToId: 'assignToId',
assignedById: 'assignedById',
enteredBy: 'enteredBy',
automated: 'automated',
closedFlag: 'closedFlag',
notifyCompleteFlag: 'notifyCompleteFlag',
notificationSentFlat: 'notificationSentFlat',
opportunityId: 'opportunityId',
serviceTicketId: 'serviceTicketId',
contactId: 'contactId',
companyId: 'companyId',
activityTypeId: 'activityTypeId',
activityStatusId: 'activityStatusId',
createdById: 'createdById',
updatedById: 'updatedById',
closedById: 'closedById',
closedAt: 'closedAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type ActivityScalarFieldEnum = (typeof ActivityScalarFieldEnum)[keyof typeof ActivityScalarFieldEnum]
export const ActivityNotesScalarFieldEnum = {
id: 'id',
uid: 'uid',
notes: 'notes',
activityId: 'activityId',
internalAnalysisFlag: 'internalAnalysisFlag',
enteredById: 'enteredById',
updatedById: 'updatedById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type ActivityNotesScalarFieldEnum = (typeof ActivityNotesScalarFieldEnum)[keyof typeof ActivityNotesScalarFieldEnum]
export const ActivityTypeScalarFieldEnum = {
id: 'id',
uid: 'uid',
name: 'name',
description: 'description',
inactiveFlag: 'inactiveFlag',
historyFlag: 'historyFlag',
defaultFlag: 'defaultFlag',
importFlag: 'importFlag',
emailFlag: 'emailFlag',
memoFlag: 'memoFlag',
pointsValue: 'pointsValue',
updatedById: 'updatedById',
createdById: 'createdById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type ActivityTypeScalarFieldEnum = (typeof ActivityTypeScalarFieldEnum)[keyof typeof ActivityTypeScalarFieldEnum]
export const ActivityStatusScalarFieldEnum = {
id: 'id',
uid: 'uid',
name: 'name',
description: 'description',
closedFlag: 'closedFlag',
inactiveFlag: 'inactiveFlag',
defaultFlag: 'defaultFlag',
spawnFollowupFlag: 'spawnFollowupFlag',
updatedById: 'updatedById',
createdById: 'createdById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type ActivityStatusScalarFieldEnum = (typeof ActivityStatusScalarFieldEnum)[keyof typeof ActivityStatusScalarFieldEnum]
export const TimeEntryScalarFieldEnum = {
id: 'id',
uid: 'uid',
memberId: 'memberId',
serviceTicketId: 'serviceTicketId',
activityId: 'activityId',
projectId: 'projectId',
chargeCodeId: 'chargeCodeId',
companyId: 'companyId',
statusId: 'statusId',
locationId: 'locationId',
contactId: 'contactId',
dateStart: 'dateStart',
timeStart: 'timeStart',
timeEnd: 'timeEnd',
notes: 'notes',
notesMd: 'notesMd',
internalNote: 'internalNote',
billableHours: 'billableHours',
actualHours: 'actualHours',
invoicedHours: 'invoicedHours',
deductedHours: 'deductedHours',
hourlyRate: 'hourlyRate',
effectiveRate: 'effectiveRate',
issueFlag: 'issueFlag',
mergedFlag: 'mergedFlag',
invoiceFlag: 'invoiceFlag',
billableFlag: 'billableFlag',
documentFlag: 'documentFlag',
teProblemFlag: 'teProblemFlag',
teResolutionFlag: 'teResolutionFlag',
teInternalAnalysisFlag: 'teInternalAnalysisFlag',
chargeToRecId: 'chargeToRecId',
chargeToType: 'chargeToType',
createdById: 'createdById',
updatedById: 'updatedById',
originalAuthorId: 'originalAuthorId',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type TimeEntryScalarFieldEnum = (typeof TimeEntryScalarFieldEnum)[keyof typeof TimeEntryScalarFieldEnum]
export const TimeEntryStatusScalarFieldEnum = {
id: 'id',
uid: 'uid',
statusId: 'statusId',
description: 'description',
action: 'action',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type TimeEntryStatusScalarFieldEnum = (typeof TimeEntryStatusScalarFieldEnum)[keyof typeof TimeEntryStatusScalarFieldEnum]
export const TimeEntryChargeCodeScalarFieldEnum = {
id: 'id',
uid: 'uid',
chargeCodeId: 'chargeCodeId',
description: 'description',
expenseFlag: 'expenseFlag',
timeFlag: 'timeFlag',
billableFlag: 'billableFlag',
invoiceFlag: 'invoiceFlag',
updatedById: 'updatedById',
createdById: 'createdById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type TimeEntryChargeCodeScalarFieldEnum = (typeof TimeEntryChargeCodeScalarFieldEnum)[keyof typeof TimeEntryChargeCodeScalarFieldEnum]
export const TimeActivityClassScalarFieldEnum = {
id: 'id',
uid: 'uid',
description: 'description',
hourlyRate: 'hourlyRate',
inactiveFlag: 'inactiveFlag',
taxExemptFlag: 'taxExemptFlag',
createdById: 'createdById',
updatedById: 'updatedById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type TimeActivityClassScalarFieldEnum = (typeof TimeActivityClassScalarFieldEnum)[keyof typeof TimeActivityClassScalarFieldEnum]
export const TimeActivityTypeScalarFieldEnum = {
id: 'id',
uid: 'uid',
description: 'description',
minHours: 'minHours',
maxHours: 'maxHours',
rate: 'rate',
costMultiplier: 'costMultiplier',
inactiveFlag: 'inactiveFlag',
invoiceFlag: 'invoiceFlag',
billableFlag: 'billableFlag',
utilizationFlag: 'utilizationFlag',
defaultFlag: 'defaultFlag',
multiplierFlag: 'multiplierFlag',
createdById: 'createdById',
updatedById: 'updatedById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type TimeActivityTypeScalarFieldEnum = (typeof TimeActivityTypeScalarFieldEnum)[keyof typeof TimeActivityTypeScalarFieldEnum]
export const CredentialTypeScalarFieldEnum = {
id: 'id',
name: 'name',
@@ -980,6 +1188,20 @@ export const CwMemberScalarFieldEnum = {
export type CwMemberScalarFieldEnum = (typeof CwMemberScalarFieldEnum)[keyof typeof CwMemberScalarFieldEnum]
export const CwMemberTypeScalarFieldEnum = {
id: 'id',
uid: 'uid',
description: 'description',
inactiveFlag: 'inactiveFlag',
updatedById: 'updatedById',
createdById: 'createdById',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type CwMemberTypeScalarFieldEnum = (typeof CwMemberTypeScalarFieldEnum)[keyof typeof CwMemberTypeScalarFieldEnum]
export const SortOrder = {
asc: 'asc',
desc: 'desc'