projects
This commit is contained in:
@@ -11,6 +11,8 @@ export const permissions = {
|
||||
ganttRead: "gantt.read",
|
||||
salesRead: "sales.read",
|
||||
salesWrite: "sales.write",
|
||||
projectsRead: "projects.read",
|
||||
projectsWrite: "projects.write",
|
||||
purchasingRead: "purchasing.read",
|
||||
purchasingWrite: "purchasing.write",
|
||||
shippingRead: "shipping.read",
|
||||
|
||||
@@ -6,6 +6,7 @@ export * from "./crm/types.js";
|
||||
export * from "./files/types.js";
|
||||
export * from "./gantt/types.js";
|
||||
export * from "./inventory/types.js";
|
||||
export * from "./projects/types.js";
|
||||
export * from "./purchasing/types.js";
|
||||
export * from "./sales/types.js";
|
||||
export * from "./shipping/types.js";
|
||||
|
||||
72
shared/src/projects/types.ts
Normal file
72
shared/src/projects/types.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
export const projectStatuses = ["PLANNED", "ACTIVE", "ON_HOLD", "AT_RISK", "COMPLETE"] as const;
|
||||
export const projectPriorities = ["LOW", "MEDIUM", "HIGH", "CRITICAL"] as const;
|
||||
|
||||
export type ProjectStatus = (typeof projectStatuses)[number];
|
||||
export type ProjectPriority = (typeof projectPriorities)[number];
|
||||
|
||||
export interface ProjectCustomerOptionDto {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface ProjectDocumentOptionDto {
|
||||
id: string;
|
||||
documentNumber: string;
|
||||
customerName: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface ProjectShipmentOptionDto {
|
||||
id: string;
|
||||
shipmentNumber: string;
|
||||
salesOrderNumber: string;
|
||||
customerName: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface ProjectOwnerOptionDto {
|
||||
id: string;
|
||||
fullName: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface ProjectSummaryDto {
|
||||
id: string;
|
||||
projectNumber: string;
|
||||
name: string;
|
||||
status: ProjectStatus;
|
||||
priority: ProjectPriority;
|
||||
customerId: string;
|
||||
customerName: string;
|
||||
ownerId: string | null;
|
||||
ownerName: string | null;
|
||||
dueDate: string | null;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ProjectDetailDto extends ProjectSummaryDto {
|
||||
notes: string;
|
||||
createdAt: string;
|
||||
salesQuoteId: string | null;
|
||||
salesQuoteNumber: string | null;
|
||||
salesOrderId: string | null;
|
||||
salesOrderNumber: string | null;
|
||||
shipmentId: string | null;
|
||||
shipmentNumber: string | null;
|
||||
customerEmail: string;
|
||||
customerPhone: string;
|
||||
}
|
||||
|
||||
export interface ProjectInput {
|
||||
name: string;
|
||||
status: ProjectStatus;
|
||||
priority: ProjectPriority;
|
||||
customerId: string;
|
||||
salesQuoteId: string | null;
|
||||
salesOrderId: string | null;
|
||||
shipmentId: string | null;
|
||||
ownerId: string | null;
|
||||
dueDate: string | null;
|
||||
notes: string;
|
||||
}
|
||||
Reference in New Issue
Block a user