Work on workflow builder:

- Made number of approvers dynamic with many select inputs as needed
- Tracking approval select input changes with step.assignees
- Fetching teachers and corporates from backend
- Responsive styling when rendering several select inputs
This commit is contained in:
Joao Correia
2025-01-23 02:48:25 +00:00
parent 4e81c08adb
commit aa76c2b54b
7 changed files with 165 additions and 102 deletions

View File

@@ -1,4 +1,5 @@
import {Module} from ".";
import Option from "./option";
import { CorporateUser, MasterCorporateUser, TeacherUser, userTypeLabels } from "./user";
export interface ApprovalWorkflow {
@@ -24,7 +25,7 @@ export interface WorkflowStep {
stepNumber: number,
completed?: boolean,
completedBy?: string,
assignees?: string[],
assignees?: (string | null | undefined)[]; // bit of an hack, but allowing null or undefined values allows us to match one to one the select input components with the assignees array. And since select inputs allow undefined or null values, it is allowed here too, but must validate required input before form submission
assigneesType?: AssigneesType,
editView?: boolean,
firstStep?: boolean,