feat: Add table logic for role and permission sections

This commit is contained in:
2025-12-29 08:58:00 +01:00
parent be9d2ec9d7
commit 0490f2357e
31 changed files with 1957 additions and 390 deletions

View File

@@ -1393,14 +1393,51 @@ components:
type: string
format: uuid
nullable: true
visibilityCondition:
$ref: "#/components/schemas/FormElementVisibilityCondition"
sectionSpawnTrigger:
$ref: "#/components/schemas/SectionSpawnTriggerDto"
visibilityConditions:
type: array
items:
$ref: "#/components/schemas/FormElementVisibilityCondition"
description: List of visibility conditions (all must be met for element to be visible - AND logic)
sectionSpawnTriggers:
type: array
items:
$ref: "#/components/schemas/SectionSpawnTriggerDto"
description: List of triggers that can spawn template sections when conditions are met
isClonable:
type: boolean
default: false
description: If true, user can add more instances of this element
tableRowPreset:
$ref: "#/components/schemas/TableRowPresetDto"
TableRowPresetDto:
type: object
description: Configuration for automatically creating table rows based on source table data
properties:
sourceTableReference:
type: string
description: Reference to source table element to pull rows from
filterCondition:
$ref: "#/components/schemas/TableColumnFilterDto"
columnMappings:
type: array
items:
$ref: "#/components/schemas/TableColumnMappingDto"
canAddRows:
type: boolean
default: true
description: If true, users can manually add or remove rows. If false, rows are fully controlled by the source table.
TableColumnMappingDto:
type: object
description: Mapping between source and target columns for row presets
properties:
sourceColumnIndex:
type: integer
description: Index of source column (0-based)
targetColumnIndex:
type: integer
description: Index of target column (0-based)
FormElementSnapshotDto:
type: object
@@ -1420,13 +1457,19 @@ components:
type: array
items:
$ref: "#/components/schemas/FormOptionDto"
visibilityCondition:
$ref: "#/components/schemas/FormElementVisibilityCondition"
sectionSpawnTrigger:
$ref: "#/components/schemas/SectionSpawnTriggerDto"
visibilityConditions:
type: array
items:
$ref: "#/components/schemas/FormElementVisibilityCondition"
sectionSpawnTriggers:
type: array
items:
$ref: "#/components/schemas/SectionSpawnTriggerDto"
isClonable:
type: boolean
default: false
tableRowPreset:
$ref: "#/components/schemas/TableRowPresetDto"
FormOptionDto:
type: object
@@ -1444,6 +1487,66 @@ components:
$ref: "#/components/schemas/ProcessingPurpose"
employeeDataCategory:
$ref: "#/components/schemas/EmployeeDataCategory"
columnConfig:
$ref: "#/components/schemas/TableColumnConfigDto"
TableColumnConfigDto:
type: object
description: Configuration for table column cross-references
properties:
sourceTableReference:
type: string
description: Reference to source table element to get values from
sourceColumnIndex:
type: integer
description: Index of source column to reference (0-based)
filterCondition:
$ref: "#/components/schemas/TableColumnFilterDto"
rowConstraint:
$ref: "#/components/schemas/TableRowConstraintDto"
isReadOnly:
type: boolean
default: false
description: If true, column values cannot be edited by user
isMultipleAllowed:
type: boolean
default: false
description: If true, allows selecting multiple values in this column
isCheckbox:
type: boolean
default: false
description: If true, renders a checkbox instead of text input
TableRowConstraintDto:
type: object
description: Configuration for row-based value constraints from another table
properties:
constraintTableReference:
type: string
description: Reference to the constraint table that defines allowed value mappings
constraintKeyColumnIndex:
type: integer
description: Column index in constraint table that matches the key (e.g., Rollen-ID)
constraintValueColumnIndex:
type: integer
description: Column index in constraint table with allowed values (e.g., Permission-ID)
currentRowKeyColumnIndex:
type: integer
description: Column index in current table row to use as the lookup key
TableColumnFilterDto:
type: object
description: Filter condition for constraining available values
properties:
sourceColumnIndex:
type: integer
description: Index of source column to check for filter condition
expectedValue:
type: string
description: Expected value to match in the source column
operator:
$ref: "#/components/schemas/VisibilityConditionOperator"
default: EQUALS
FormElementType:
type: string