dynamic list of new workflows in workflow builder and some code refactoring

This commit is contained in:
Joao Correia
2025-01-20 23:32:32 +00:00
parent 39a397d262
commit 01222b3a13
7 changed files with 435 additions and 217 deletions

View File

@@ -1,12 +1,29 @@
import {Module} from ".";
export interface ApprovalWorkflow {
id: string;
name: string;
module: Module;
status: ApprovalWorkflowStatus;
approvers: string;
step: string;
id: string,
name: string,
modules: Module[],
status: ApprovalWorkflowStatus,
steps: WorkflowStep[],
}
export type StepType = "form-intake" | "approval-by";
export interface WorkflowStep {
key?: number,
stepType: StepType,
stepNumber: number,
completed: boolean,
completedBy?: string,
assignees?: string[],
editView?: boolean,
firstStep?: boolean,
finalStep?: boolean,
isSelected?: boolean,
requestedBy?: string,
//requestedBy: TeacherUser | CorporateUser | MasterCorporateUser,
onDelete?: () => void;
}
export type ApprovalWorkflowStatus = "approved" | "pending" | "rejected";