89 lines
2.5 KiB
TypeScript
89 lines
2.5 KiB
TypeScript
export const ROLE_BRIEF_SELECT = { id: true, name: true, color: true } as const;
|
|
export const PROJECT_BRIEF_SELECT = { id: true, name: true, shortCode: true, status: true, endDate: true } as const;
|
|
export const RESOURCE_BRIEF_SELECT = { id: true, displayName: true, eid: true, lcrCents: true, chapter: true } as const;
|
|
|
|
export const RESOURCE_SUMMARY_SELECT = {
|
|
id: true,
|
|
eid: true,
|
|
displayName: true,
|
|
chapter: true,
|
|
isActive: true,
|
|
areaRole: { select: { name: true } },
|
|
country: { select: { code: true, name: true } },
|
|
metroCity: { select: { name: true } },
|
|
orgUnit: { select: { name: true } },
|
|
} as const;
|
|
|
|
export const RESOURCE_SUMMARY_DETAIL_SELECT = {
|
|
...RESOURCE_SUMMARY_SELECT,
|
|
fte: true,
|
|
lcrCents: true,
|
|
chargeabilityTarget: true,
|
|
} as const;
|
|
|
|
export const RESOURCE_IDENTIFIER_SELECT = {
|
|
id: true,
|
|
eid: true,
|
|
displayName: true,
|
|
chapter: true,
|
|
isActive: true,
|
|
} as const;
|
|
|
|
export const RESOURCE_IDENTIFIER_DETAIL_SELECT = {
|
|
...RESOURCE_IDENTIFIER_SELECT,
|
|
email: true,
|
|
fte: true,
|
|
lcrCents: true,
|
|
ucrCents: true,
|
|
chargeabilityTarget: true,
|
|
availability: true,
|
|
skills: true,
|
|
postalCode: true,
|
|
federalState: true,
|
|
areaRole: { select: { name: true, color: true } },
|
|
country: { select: { code: true, name: true, dailyWorkingHours: true } },
|
|
metroCity: { select: { name: true } },
|
|
managementLevelGroup: { select: { name: true, targetPercentage: true } },
|
|
orgUnit: { select: { name: true, level: true } },
|
|
_count: { select: { assignments: true, vacations: true } },
|
|
} as const;
|
|
|
|
export const RESOURCE_DIRECTORY_SELECT = {
|
|
id: true,
|
|
eid: true,
|
|
displayName: true,
|
|
chapter: true,
|
|
isActive: true,
|
|
} as const;
|
|
|
|
/**
|
|
* Explicit select for the resource list endpoint (listStaff).
|
|
* Omits large JSONB columns that are unused in all list consumers:
|
|
* - availability (~several KB per row, only needed for scheduling calculations)
|
|
* - valueScoreBreakdown (JSON, only needed in detail/dashboard views)
|
|
* - aiSummary / aiSummaryUpdatedAt / skillMatrixUpdatedAt / portfolioUrl
|
|
* This keeps skills and dynamicFields because they are rendered in the resource table.
|
|
*/
|
|
export const RESOURCE_LIST_SELECT = {
|
|
id: true,
|
|
eid: true,
|
|
displayName: true,
|
|
email: true,
|
|
chapter: true,
|
|
lcrCents: true,
|
|
ucrCents: true,
|
|
currency: true,
|
|
chargeabilityTarget: true,
|
|
skills: true,
|
|
dynamicFields: true,
|
|
blueprintId: true,
|
|
isActive: true,
|
|
roleId: true,
|
|
federalState: true,
|
|
valueScore: true,
|
|
rolledOff: true,
|
|
departed: true,
|
|
createdAt: true,
|
|
updatedAt: true,
|
|
} as const;
|