diff --git a/api/legalconsenthub.yml b/api/legalconsenthub.yml index 359e534..a0cb03b 100644 --- a/api/legalconsenthub.yml +++ b/api/legalconsenthub.yml @@ -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 diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/ApplicationFormFormatService.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/ApplicationFormFormatService.kt index 68c3612..c46c85b 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/ApplicationFormFormatService.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/ApplicationFormFormatService.kt @@ -11,6 +11,7 @@ import com.betriebsratkanzlei.legalconsenthub_api.model.ApplicationFormSnapshotD import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementSectionSnapshotDto import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementSnapshotDto import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementSubSectionSnapshotDto +import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementVisibilityCondition import com.fasterxml.jackson.core.type.TypeReference import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import org.springframework.stereotype.Service @@ -80,6 +81,7 @@ class ApplicationFormFormatService( title = LatexEscaper.escape(element.title ?: ""), description = LatexEscaper.escape(element.description ?: ""), value = renderElementValue(element), + isTable = element.type.name == "TABLE", ) }, ) @@ -152,8 +154,10 @@ class ApplicationFormFormatService( val rowCount = columnData.maxOfOrNull { col -> col.size } ?: 0 if (rowCount == 0) return "Keine Daten" - val columnSpec = headers.joinToString(" | ") { "l" } - val headerRow = headers.joinToString(" & ") + // Use tabularx with Y columns (auto-wrapping) for flexible width distribution + // Y is defined as >{\raggedright\arraybackslash}X in the template + val columnSpec = headers.joinToString("") { "Y" } + val headerRow = headers.joinToString(" & ") { "\\textbf{$it}" } val dataRows = (0 until rowCount).map { rowIndex -> columnData.joinToString(" & ") { col: List -> @@ -163,15 +167,15 @@ class ApplicationFormFormatService( } return buildString { - appendLine("\\begin{tabular}{$columnSpec}") - appendLine("\\hline") + appendLine("\\begin{tabularx}{\\textwidth}{$columnSpec}") + appendLine("\\toprule") appendLine("$headerRow \\\\") - appendLine("\\hline") + appendLine("\\midrule") dataRows.forEach { row: String -> appendLine("$row \\\\") } - appendLine("\\hline") - appendLine("\\end{tabular}") + appendLine("\\bottomrule") + appendLine("\\end{tabularx}") } } @@ -213,8 +217,17 @@ class ApplicationFormFormatService( element: FormElementSnapshotDto, formElementsByRef: Map, ): Boolean { - val condition = element.visibilityCondition ?: return true + val conditions = element.visibilityConditions + if (conditions.isNullOrEmpty()) return true + // All conditions must be met (AND logic) + return conditions.all { condition -> evaluateSingleCondition(condition, formElementsByRef) } + } + + private fun evaluateSingleCondition( + condition: FormElementVisibilityCondition, + formElementsByRef: Map, + ): Boolean { val sourceElement = formElementsByRef[condition.sourceFormElementReference] ?: return false val sourceValue = getFormElementValue(sourceElement) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexEscaper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexEscaper.kt index cf4d4bc..eaac0ba 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexEscaper.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexEscaper.kt @@ -3,7 +3,10 @@ package com.betriebsratkanzlei.legalconsenthub.application_form.export.latex object LatexEscaper { fun escape(text: String?): String { if (text == null) return "" - return text + // First decode common HTML entities that may be present in user input + val decoded = decodeHtmlEntities(text) + // Then escape for LaTeX + return decoded .replace("\\", "\\textbackslash{}") .replace("{", "\\{") .replace("}", "\\}") @@ -16,4 +19,14 @@ object LatexEscaper { .replace("~", "\\textasciitilde{}") .replace("\n", "\\\\") } + + private fun decodeHtmlEntities(text: String): String = + text + .replace("&", "&") + .replace("<", "<") + .replace(">", ">") + .replace(""", "\"") + .replace("'", "'") + .replace("'", "'") + .replace(" ", " ") } diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexExportModel.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexExportModel.kt index 794d9b3..3872975 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexExportModel.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form/export/latex/LatexExportModel.kt @@ -28,4 +28,5 @@ data class LatexFormElement( val title: String, val description: String?, val value: String, + val isTable: Boolean = false, ) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form_version/ApplicationFormVersionService.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form_version/ApplicationFormVersionService.kt index b3d43cb..4272e04 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form_version/ApplicationFormVersionService.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/application_form_version/ApplicationFormVersionService.kt @@ -8,14 +8,14 @@ import com.betriebsratkanzlei.legalconsenthub.form_element.FormElement import com.betriebsratkanzlei.legalconsenthub.form_element.FormElementSection import com.betriebsratkanzlei.legalconsenthub.form_element.FormElementSubSection import com.betriebsratkanzlei.legalconsenthub.form_element.FormElementVisibilityConditionMapper -import com.betriebsratkanzlei.legalconsenthub.form_element.FormOption +import com.betriebsratkanzlei.legalconsenthub.form_element.FormOptionMapper import com.betriebsratkanzlei.legalconsenthub.form_element.SectionSpawnTriggerMapper +import com.betriebsratkanzlei.legalconsenthub.form_element.TableRowPresetMapper import com.betriebsratkanzlei.legalconsenthub.user.User import com.betriebsratkanzlei.legalconsenthub_api.model.ApplicationFormSnapshotDto import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementSectionSnapshotDto import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementSnapshotDto import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementSubSectionSnapshotDto -import com.betriebsratkanzlei.legalconsenthub_api.model.FormOptionDto import com.fasterxml.jackson.databind.ObjectMapper import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional @@ -28,6 +28,8 @@ class ApplicationFormVersionService( private val objectMapper: ObjectMapper, private val spawnTriggerMapper: SectionSpawnTriggerMapper, private val visibilityConditionMapper: FormElementVisibilityConditionMapper, + private val tableRowPresetMapper: TableRowPresetMapper, + private val formOptionMapper: FormOptionMapper, ) { @Transactional fun createVersion( @@ -123,26 +125,22 @@ class ApplicationFormVersionService( title = element.title, description = element.description, type = element.type, - options = - element.options.map { option -> - FormOptionDto( - value = option.value, - label = option.label, - processingPurpose = option.processingPurpose, - employeeDataCategory = option.employeeDataCategory, - ) - }, - visibilityCondition = - element.visibilityCondition?.let { - visibilityConditionMapper.toFormElementVisibilityConditionDto( - it, - ) - }, - sectionSpawnTrigger = - element.sectionSpawnTrigger?.let { + options = element.options.map { formOptionMapper.toFormOptionDto(it) }, + visibilityConditions = + element.visibilityConditions + .map { + visibilityConditionMapper + .toFormElementVisibilityConditionDto(it) + }, + sectionSpawnTriggers = + element.sectionSpawnTriggers.map { spawnTriggerMapper.toSectionSpawnTriggerDto(it) }, isClonable = element.isClonable, + tableRowPreset = + element.tableRowPreset?.let { + tableRowPresetMapper.toTableRowPresetDto(it) + }, ) }, ) @@ -185,23 +183,23 @@ class ApplicationFormVersionService( formElementSubSection = subsection, options = elementSnapshot.options - .map { optionDto -> - FormOption( - value = optionDto.value, - label = optionDto.label, - processingPurpose = optionDto.processingPurpose, - employeeDataCategory = optionDto.employeeDataCategory, - ) - }.toMutableList(), - visibilityCondition = - elementSnapshot.visibilityCondition?.let { - visibilityConditionMapper.toFormElementVisibilityCondition(it) - }, - sectionSpawnTrigger = - elementSnapshot.sectionSpawnTrigger?.let { - spawnTriggerMapper.toSectionSpawnTrigger(it) - }, + .map { formOptionMapper.toFormOption(it) } + .toMutableList(), + visibilityConditions = + elementSnapshot.visibilityConditions + ?.map { visibilityConditionMapper.toFormElementVisibilityCondition(it) } + ?.toMutableList() + ?: mutableListOf(), + sectionSpawnTriggers = + elementSnapshot.sectionSpawnTriggers + ?.map { spawnTriggerMapper.toSectionSpawnTrigger(it) } + ?.toMutableList() + ?: mutableListOf(), isClonable = elementSnapshot.isClonable ?: false, + tableRowPreset = + elementSnapshot.tableRowPreset?.let { + tableRowPresetMapper.toTableRowPreset(it) + }, ) subsection.formElements.add(element) } diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElement.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElement.kt index a574fd6..8ac7f3e 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElement.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElement.kt @@ -1,6 +1,8 @@ package com.betriebsratkanzlei.legalconsenthub.form_element import com.betriebsratkanzlei.legalconsenthub_api.model.FormElementType +import jakarta.persistence.AttributeOverride +import jakarta.persistence.AttributeOverrides import jakarta.persistence.CollectionTable import jakarta.persistence.Column import jakarta.persistence.ElementCollection @@ -28,9 +30,25 @@ class FormElement( @ManyToOne @JoinColumn(name = "form_element_sub_section_id", nullable = false) var formElementSubSection: FormElementSubSection? = null, - @Embedded - var visibilityCondition: FormElementVisibilityCondition? = null, - @Embedded - var sectionSpawnTrigger: SectionSpawnTrigger? = null, + @ElementCollection + @CollectionTable(name = "visibility_conditions", joinColumns = [JoinColumn(name = "form_element_id")]) + var visibilityConditions: MutableList = mutableListOf(), + @ElementCollection + @CollectionTable(name = "section_spawn_triggers", joinColumns = [JoinColumn(name = "form_element_id")]) + var sectionSpawnTriggers: MutableList = mutableListOf(), var isClonable: Boolean = false, + @Embedded + @AttributeOverrides( + AttributeOverride(name = "sourceTableReference", column = Column(name = "row_preset_source_table_ref")), + AttributeOverride( + name = "filterCondition.sourceColumnIndex", + column = Column(name = "row_preset_filter_src_col_idx"), + ), + AttributeOverride( + name = "filterCondition.expectedValue", + column = Column(name = "row_preset_filter_expected_val"), + ), + AttributeOverride(name = "filterCondition.operator", column = Column(name = "row_preset_filter_operator")), + ) + var tableRowPreset: TableRowPreset? = null, ) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElementMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElementMapper.kt index 1167083..e810cd7 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElementMapper.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormElementMapper.kt @@ -8,6 +8,7 @@ class FormElementMapper( private val formOptionMapper: FormOptionMapper, private val visibilityConditionMapper: FormElementVisibilityConditionMapper, private val spawnTriggerMapper: SectionSpawnTriggerMapper, + private val tableRowPresetMapper: TableRowPresetMapper, ) { fun toFormElementDto(formElement: FormElement): FormElementDto = FormElementDto( @@ -20,15 +21,19 @@ class FormElementMapper( formElementSubSectionId = formElement.formElementSubSection?.id ?: throw IllegalStateException("FormElementSubSection ID must not be null!"), - visibilityCondition = - formElement.visibilityCondition?.let { + visibilityConditions = + formElement.visibilityConditions.map { visibilityConditionMapper.toFormElementVisibilityConditionDto(it) }, - sectionSpawnTrigger = - formElement.sectionSpawnTrigger?.let { + sectionSpawnTriggers = + formElement.sectionSpawnTriggers.map { spawnTriggerMapper.toSectionSpawnTriggerDto(it) }, isClonable = formElement.isClonable, + tableRowPreset = + formElement.tableRowPreset?.let { + tableRowPresetMapper.toTableRowPresetDto(it) + }, ) fun toFormElement( @@ -43,15 +48,21 @@ class FormElementMapper( options = formElement.options.map { formOptionMapper.toFormOption(it) }.toMutableList(), type = formElement.type, formElementSubSection = formElementSubSection, - visibilityCondition = - formElement.visibilityCondition?.let { - visibilityConditionMapper.toFormElementVisibilityCondition(it) - }, - sectionSpawnTrigger = - formElement.sectionSpawnTrigger?.let { - spawnTriggerMapper.toSectionSpawnTrigger(it) - }, + visibilityConditions = + formElement.visibilityConditions + ?.map { visibilityConditionMapper.toFormElementVisibilityCondition(it) } + ?.toMutableList() + ?: mutableListOf(), + sectionSpawnTriggers = + formElement.sectionSpawnTriggers + ?.map { spawnTriggerMapper.toSectionSpawnTrigger(it) } + ?.toMutableList() + ?: mutableListOf(), isClonable = formElement.isClonable ?: false, + tableRowPreset = + formElement.tableRowPreset?.let { + tableRowPresetMapper.toTableRowPreset(it) + }, ) fun toNewFormElement( @@ -66,14 +77,20 @@ class FormElementMapper( options = formElement.options.map { formOptionMapper.toFormOption(it) }.toMutableList(), type = formElement.type, formElementSubSection = formElementSubSection, - visibilityCondition = - formElement.visibilityCondition?.let { - visibilityConditionMapper.toFormElementVisibilityCondition(it) - }, - sectionSpawnTrigger = - formElement.sectionSpawnTrigger?.let { - spawnTriggerMapper.toSectionSpawnTrigger(it) - }, + visibilityConditions = + formElement.visibilityConditions + ?.map { visibilityConditionMapper.toFormElementVisibilityCondition(it) } + ?.toMutableList() + ?: mutableListOf(), + sectionSpawnTriggers = + formElement.sectionSpawnTriggers + ?.map { spawnTriggerMapper.toSectionSpawnTrigger(it) } + ?.toMutableList() + ?: mutableListOf(), isClonable = formElement.isClonable ?: false, + tableRowPreset = + formElement.tableRowPreset?.let { + tableRowPresetMapper.toTableRowPreset(it) + }, ) } diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOption.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOption.kt index a68a178..2c767fa 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOption.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOption.kt @@ -2,8 +2,11 @@ package com.betriebsratkanzlei.legalconsenthub.form_element import com.betriebsratkanzlei.legalconsenthub_api.model.EmployeeDataCategory import com.betriebsratkanzlei.legalconsenthub_api.model.ProcessingPurpose +import jakarta.persistence.AttributeOverride +import jakarta.persistence.AttributeOverrides import jakarta.persistence.Column import jakarta.persistence.Embeddable +import jakarta.persistence.Embedded @Embeddable class FormOption( @@ -15,4 +18,21 @@ class FormOption( var processingPurpose: ProcessingPurpose, @Column(nullable = false) var employeeDataCategory: EmployeeDataCategory, + @Embedded + @AttributeOverrides( + AttributeOverride(name = "sourceTableReference", column = Column(name = "col_config_source_table_ref")), + AttributeOverride(name = "sourceColumnIndex", column = Column(name = "col_config_source_col_idx")), + AttributeOverride( + name = "filterCondition.sourceColumnIndex", + column = Column(name = "col_config_filter_src_col_idx"), + ), + AttributeOverride( + name = "filterCondition.expectedValue", + column = Column(name = "col_config_filter_expected_val"), + ), + AttributeOverride(name = "filterCondition.operator", column = Column(name = "col_config_filter_operator")), + AttributeOverride(name = "isReadOnly", column = Column(name = "col_config_is_read_only")), + AttributeOverride(name = "isCheckbox", column = Column(name = "col_config_is_checkbox")), + ) + var columnConfig: TableColumnConfig? = null, ) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOptionMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOptionMapper.kt index 4d8e81f..8faf9d9 100644 --- a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOptionMapper.kt +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/FormOptionMapper.kt @@ -4,13 +4,16 @@ import com.betriebsratkanzlei.legalconsenthub_api.model.FormOptionDto import org.springframework.stereotype.Component @Component -class FormOptionMapper { +class FormOptionMapper( + private val columnConfigMapper: TableColumnConfigMapper, +) { fun toFormOptionDto(formOption: FormOption): FormOptionDto = FormOptionDto( value = formOption.value, label = formOption.label, processingPurpose = formOption.processingPurpose, employeeDataCategory = formOption.employeeDataCategory, + columnConfig = formOption.columnConfig?.let { columnConfigMapper.toTableColumnConfigDto(it) }, ) fun toFormOption(formOptionDto: FormOptionDto): FormOption = @@ -19,5 +22,6 @@ class FormOptionMapper { label = formOptionDto.label, processingPurpose = formOptionDto.processingPurpose, employeeDataCategory = formOptionDto.employeeDataCategory, + columnConfig = formOptionDto.columnConfig?.let { columnConfigMapper.toTableColumnConfig(it) }, ) } diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnConfig.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnConfig.kt new file mode 100644 index 0000000..9196b2c --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnConfig.kt @@ -0,0 +1,32 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import jakarta.persistence.AttributeOverride +import jakarta.persistence.AttributeOverrides +import jakarta.persistence.Column +import jakarta.persistence.Embeddable +import jakarta.persistence.Embedded + +@Embeddable +data class TableColumnConfig( + val sourceTableReference: String? = null, + val sourceColumnIndex: Int? = null, + @Embedded + val filterCondition: TableColumnFilter? = null, + @Embedded + @AttributeOverrides( + AttributeOverride(name = "constraintTableReference", column = Column(name = "row_constraint_table_reference")), + AttributeOverride(name = "constraintKeyColumnIndex", column = Column(name = "row_constraint_key_column_index")), + AttributeOverride( + name = "constraintValueColumnIndex", + column = Column(name = "row_constraint_value_column_index"), + ), + AttributeOverride( + name = "currentRowKeyColumnIndex", + column = Column(name = "row_constraint_current_row_key_column_index"), + ), + ) + val rowConstraint: TableRowConstraint? = null, + val isReadOnly: Boolean = false, + val isMultipleAllowed: Boolean = false, + val isCheckbox: Boolean = false, +) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnConfigMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnConfigMapper.kt new file mode 100644 index 0000000..258fa26 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnConfigMapper.kt @@ -0,0 +1,32 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import com.betriebsratkanzlei.legalconsenthub_api.model.TableColumnConfigDto +import org.springframework.stereotype.Component + +@Component +class TableColumnConfigMapper( + private val filterMapper: TableColumnFilterMapper, + private val rowConstraintMapper: TableRowConstraintMapper, +) { + fun toTableColumnConfigDto(config: TableColumnConfig): TableColumnConfigDto = + TableColumnConfigDto( + sourceTableReference = config.sourceTableReference, + sourceColumnIndex = config.sourceColumnIndex, + filterCondition = config.filterCondition?.let { filterMapper.toTableColumnFilterDto(it) }, + rowConstraint = config.rowConstraint?.let { rowConstraintMapper.toTableRowConstraintDto(it) }, + isReadOnly = config.isReadOnly, + isMultipleAllowed = config.isMultipleAllowed, + isCheckbox = config.isCheckbox, + ) + + fun toTableColumnConfig(dto: TableColumnConfigDto): TableColumnConfig = + TableColumnConfig( + sourceTableReference = dto.sourceTableReference, + sourceColumnIndex = dto.sourceColumnIndex, + filterCondition = dto.filterCondition?.let { filterMapper.toTableColumnFilter(it) }, + rowConstraint = dto.rowConstraint?.let { rowConstraintMapper.toTableRowConstraint(it) }, + isReadOnly = dto.isReadOnly ?: false, + isMultipleAllowed = dto.isMultipleAllowed ?: false, + isCheckbox = dto.isCheckbox ?: false, + ) +} diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnFilter.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnFilter.kt new file mode 100644 index 0000000..d263056 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnFilter.kt @@ -0,0 +1,13 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import jakarta.persistence.Embeddable +import jakarta.persistence.EnumType +import jakarta.persistence.Enumerated + +@Embeddable +data class TableColumnFilter( + val sourceColumnIndex: Int? = null, + val expectedValue: String? = null, + @Enumerated(EnumType.STRING) + val operator: VisibilityConditionOperator = VisibilityConditionOperator.EQUALS, +) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnFilterMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnFilterMapper.kt new file mode 100644 index 0000000..7c7fa91 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnFilterMapper.kt @@ -0,0 +1,38 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import com.betriebsratkanzlei.legalconsenthub_api.model.TableColumnFilterDto +import org.springframework.stereotype.Component +import com.betriebsratkanzlei.legalconsenthub_api.model.VisibilityConditionOperator as VisibilityConditionOperatorDto + +@Component +class TableColumnFilterMapper { + fun toTableColumnFilterDto(filter: TableColumnFilter): TableColumnFilterDto = + TableColumnFilterDto( + sourceColumnIndex = filter.sourceColumnIndex, + expectedValue = filter.expectedValue, + operator = filter.operator.toDto(), + ) + + fun toTableColumnFilter(dto: TableColumnFilterDto): TableColumnFilter = + TableColumnFilter( + sourceColumnIndex = dto.sourceColumnIndex, + expectedValue = dto.expectedValue, + operator = dto.operator?.toEntity() ?: VisibilityConditionOperator.EQUALS, + ) + + private fun VisibilityConditionOperator.toDto(): VisibilityConditionOperatorDto = + when (this) { + VisibilityConditionOperator.EQUALS -> VisibilityConditionOperatorDto.EQUALS + VisibilityConditionOperator.NOT_EQUALS -> VisibilityConditionOperatorDto.NOT_EQUALS + VisibilityConditionOperator.IS_EMPTY -> VisibilityConditionOperatorDto.IS_EMPTY + VisibilityConditionOperator.IS_NOT_EMPTY -> VisibilityConditionOperatorDto.IS_NOT_EMPTY + } + + private fun VisibilityConditionOperatorDto.toEntity(): VisibilityConditionOperator = + when (this) { + VisibilityConditionOperatorDto.EQUALS -> VisibilityConditionOperator.EQUALS + VisibilityConditionOperatorDto.NOT_EQUALS -> VisibilityConditionOperator.NOT_EQUALS + VisibilityConditionOperatorDto.IS_EMPTY -> VisibilityConditionOperator.IS_EMPTY + VisibilityConditionOperatorDto.IS_NOT_EMPTY -> VisibilityConditionOperator.IS_NOT_EMPTY + } +} diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnMapping.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnMapping.kt new file mode 100644 index 0000000..bda2b7b --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnMapping.kt @@ -0,0 +1,9 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import jakarta.persistence.Embeddable + +@Embeddable +data class TableColumnMapping( + val sourceColumnIndex: Int, + val targetColumnIndex: Int, +) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnMappingMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnMappingMapper.kt new file mode 100644 index 0000000..0154f13 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableColumnMappingMapper.kt @@ -0,0 +1,19 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import com.betriebsratkanzlei.legalconsenthub_api.model.TableColumnMappingDto +import org.springframework.stereotype.Component + +@Component +class TableColumnMappingMapper { + fun toTableColumnMappingDto(mapping: TableColumnMapping): TableColumnMappingDto = + TableColumnMappingDto( + sourceColumnIndex = mapping.sourceColumnIndex, + targetColumnIndex = mapping.targetColumnIndex, + ) + + fun toTableColumnMapping(dto: TableColumnMappingDto): TableColumnMapping = + TableColumnMapping( + sourceColumnIndex = dto.sourceColumnIndex ?: 0, + targetColumnIndex = dto.targetColumnIndex ?: 0, + ) +} diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowConstraint.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowConstraint.kt new file mode 100644 index 0000000..d857d48 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowConstraint.kt @@ -0,0 +1,11 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import jakarta.persistence.Embeddable + +@Embeddable +data class TableRowConstraint( + val constraintTableReference: String? = null, + val constraintKeyColumnIndex: Int? = null, + val constraintValueColumnIndex: Int? = null, + val currentRowKeyColumnIndex: Int? = null, +) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowConstraintMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowConstraintMapper.kt new file mode 100644 index 0000000..f69a94b --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowConstraintMapper.kt @@ -0,0 +1,23 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import com.betriebsratkanzlei.legalconsenthub_api.model.TableRowConstraintDto +import org.springframework.stereotype.Component + +@Component +class TableRowConstraintMapper { + fun toTableRowConstraintDto(constraint: TableRowConstraint): TableRowConstraintDto = + TableRowConstraintDto( + constraintTableReference = constraint.constraintTableReference, + constraintKeyColumnIndex = constraint.constraintKeyColumnIndex, + constraintValueColumnIndex = constraint.constraintValueColumnIndex, + currentRowKeyColumnIndex = constraint.currentRowKeyColumnIndex, + ) + + fun toTableRowConstraint(dto: TableRowConstraintDto): TableRowConstraint = + TableRowConstraint( + constraintTableReference = dto.constraintTableReference, + constraintKeyColumnIndex = dto.constraintKeyColumnIndex, + constraintValueColumnIndex = dto.constraintValueColumnIndex, + currentRowKeyColumnIndex = dto.currentRowKeyColumnIndex, + ) +} diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowPreset.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowPreset.kt new file mode 100644 index 0000000..505cb66 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowPreset.kt @@ -0,0 +1,18 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import jakarta.persistence.CollectionTable +import jakarta.persistence.ElementCollection +import jakarta.persistence.Embeddable +import jakarta.persistence.Embedded +import jakarta.persistence.JoinColumn + +@Embeddable +data class TableRowPreset( + val sourceTableReference: String? = null, + @Embedded + val filterCondition: TableColumnFilter? = null, + @ElementCollection + @CollectionTable(name = "table_column_mappings", joinColumns = [JoinColumn(name = "form_element_id")]) + val columnMappings: MutableList = mutableListOf(), + val canAddRows: Boolean? = null, +) diff --git a/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowPresetMapper.kt b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowPresetMapper.kt new file mode 100644 index 0000000..d33d097 --- /dev/null +++ b/legalconsenthub-backend/src/main/kotlin/com/betriebsratkanzlei/legalconsenthub/form_element/TableRowPresetMapper.kt @@ -0,0 +1,27 @@ +package com.betriebsratkanzlei.legalconsenthub.form_element + +import com.betriebsratkanzlei.legalconsenthub_api.model.TableRowPresetDto +import org.springframework.stereotype.Component + +@Component +class TableRowPresetMapper( + private val filterMapper: TableColumnFilterMapper, + private val mappingMapper: TableColumnMappingMapper, +) { + fun toTableRowPresetDto(preset: TableRowPreset): TableRowPresetDto = + TableRowPresetDto( + sourceTableReference = preset.sourceTableReference, + filterCondition = preset.filterCondition?.let { filterMapper.toTableColumnFilterDto(it) }, + columnMappings = preset.columnMappings.map { mappingMapper.toTableColumnMappingDto(it) }, + canAddRows = preset.canAddRows ?: true, + ) + + fun toTableRowPreset(dto: TableRowPresetDto): TableRowPreset = + TableRowPreset( + sourceTableReference = dto.sourceTableReference, + filterCondition = dto.filterCondition?.let { filterMapper.toTableColumnFilter(it) }, + columnMappings = + dto.columnMappings?.map { mappingMapper.toTableColumnMapping(it) }?.toMutableList() ?: mutableListOf(), + canAddRows = dto.canAddRows, + ) +} diff --git a/legalconsenthub-backend/src/main/resources/db/migrations/001-schema.sql b/legalconsenthub-backend/src/main/resources/db/migrations/001-schema.sql index ccd78af..73707f3 100644 --- a/legalconsenthub-backend/src/main/resources/db/migrations/001-schema.sql +++ b/legalconsenthub-backend/src/main/resources/db/migrations/001-schema.sql @@ -53,33 +53,43 @@ create table comment create table form_element_options ( - employee_data_category smallint not null check (employee_data_category between 0 and 3), - processing_purpose smallint not null check (processing_purpose between 0 and 3), - form_element_id uuid not null, - label varchar(255) not null, - option_value TEXT not null + col_config_filter_src_col_idx integer, + col_config_is_checkbox boolean, + col_config_is_read_only boolean, + col_config_source_col_idx integer, + employee_data_category smallint not null check (employee_data_category between 0 and 3), + is_multiple_allowed boolean, + processing_purpose smallint not null check (processing_purpose between 0 and 3), + row_constraint_current_row_key_column_index integer, + row_constraint_key_column_index integer, + row_constraint_value_column_index integer, + form_element_id uuid not null, + col_config_filter_expected_val varchar(255), + col_config_filter_operator varchar(255) check (col_config_filter_operator in + ('EQUALS', 'NOT_EQUALS', 'IS_EMPTY', + 'IS_NOT_EMPTY')), + col_config_source_table_ref varchar(255), + label varchar(255) not null, + option_value TEXT not null, + row_constraint_table_reference varchar(255) ); create table form_element ( - form_element_order integer, - is_clonable boolean not null, - type smallint not null check (type between 0 and 7), - form_element_sub_section_id uuid not null, - id uuid not null, - description varchar(255), - form_element_condition_type varchar(255) check (form_element_condition_type in ('SHOW', 'HIDE')), - form_element_expected_value varchar(255), - form_element_operator varchar(255) check (form_element_operator in - ('EQUALS', 'NOT_EQUALS', 'IS_EMPTY', 'IS_NOT_EMPTY')), - reference varchar(255), - section_spawn_condition_type varchar(255) check (section_spawn_condition_type in ('SHOW', 'HIDE')), - section_spawn_expected_value varchar(255), - section_spawn_operator varchar(255) check (section_spawn_operator in - ('EQUALS', 'NOT_EQUALS', 'IS_EMPTY', 'IS_NOT_EMPTY')), - source_form_element_reference varchar(255), - template_reference varchar(255), - title varchar(255), + can_add_rows boolean, + form_element_order integer, + is_clonable boolean not null, + row_preset_filter_src_col_idx integer, + type smallint not null check (type between 0 and 8), + form_element_sub_section_id uuid not null, + id uuid not null, + description varchar(255), + reference varchar(255), + row_preset_filter_expected_val varchar(255), + row_preset_filter_operator varchar(255) check (row_preset_filter_operator in + ('EQUALS', 'NOT_EQUALS', 'IS_EMPTY', 'IS_NOT_EMPTY')), + row_preset_source_table_ref varchar(255), + title varchar(255), primary key (id) ); @@ -122,6 +132,33 @@ create table notification primary key (id) ); +create table section_spawn_triggers +( + form_element_id uuid not null, + section_spawn_condition_type varchar(255) check (section_spawn_condition_type in ('SHOW', 'HIDE')), + section_spawn_expected_value varchar(255), + section_spawn_operator varchar(255) check (section_spawn_operator in + ('EQUALS', 'NOT_EQUALS', 'IS_EMPTY', 'IS_NOT_EMPTY')), + template_reference varchar(255) +); + +create table table_column_mappings +( + source_column_index integer, + target_column_index integer, + form_element_id uuid not null +); + +create table visibility_conditions +( + form_element_id uuid not null, + form_element_condition_type varchar(255) check (form_element_condition_type in ('SHOW', 'HIDE')), + form_element_expected_value varchar(255), + form_element_operator varchar(255) check (form_element_operator in + ('EQUALS', 'NOT_EQUALS', 'IS_EMPTY', 'IS_NOT_EMPTY')), + source_form_element_reference varchar(255) +); + alter table if exists application_form add constraint FKhtad5onoy2jknhtyfmx6cvvey foreign key (created_by_id) @@ -182,3 +219,18 @@ alter table if exists notification add constraint FKeg1j4hnp0y4lbm0y35hgr4e8r foreign key (recipient_id) references app_user; + +alter table if exists section_spawn_triggers + add constraint FK7lf0hf8cepm2o9nty147x2ahm + foreign key (form_element_id) + references form_element; + +alter table if exists table_column_mappings + add constraint FK2t3a4fl5kqtqky39r7boqegf9 + foreign key (form_element_id) + references form_element; + +alter table if exists visibility_conditions + add constraint FK5xuf7bd179ogpq5a1m3g8q7jb + foreign key (form_element_id) + references form_element; diff --git a/legalconsenthub-backend/src/main/resources/seed/initial_application_form_template.yaml b/legalconsenthub-backend/src/main/resources/seed/initial_application_form_template.yaml index b59d45b..8fa633a 100644 --- a/legalconsenthub-backend/src/main/resources/seed/initial_application_form_template.yaml +++ b/legalconsenthub-backend/src/main/resources/seed/initial_application_form_template.yaml @@ -34,6 +34,15 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON + sectionSpawnTriggers: + - templateReference: rollen_berechtigungen_template + sectionSpawnConditionType: SHOW + sectionSpawnExpectedValue: Einführung + sectionSpawnOperator: EQUALS + - templateReference: verarbeitung_mitarbeiterdaten_template + sectionSpawnConditionType: SHOW + sectionSpawnExpectedValue: Einführung + sectionSpawnOperator: EQUALS # Einführung: Allgemeine Informationen - title: Allgemeine Informationen @@ -52,8 +61,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -70,8 +79,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: testphase_findet_statt formElementExpectedValue: Ja formElementOperator: EQUALS @@ -84,8 +93,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: mitarbeiterdaten_nicht_anonymisiert formElementExpectedValue: Ja formElementOperator: EQUALS @@ -98,8 +107,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: mitarbeiterdaten_nicht_anonymisiert formElementExpectedValue: Ja formElementOperator: EQUALS @@ -112,8 +121,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: testphase_findet_statt formElementExpectedValue: Ja formElementOperator: EQUALS @@ -131,8 +140,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -145,8 +154,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -159,8 +168,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -173,8 +182,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -192,8 +201,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -206,8 +215,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -224,8 +233,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: SENSITIVE type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -242,8 +251,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: REVIEW_REQUIRED type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -260,8 +269,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: SENSITIVE type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -278,8 +287,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -293,12 +302,12 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: TEXTAREA isClonable: true - sectionSpawnTrigger: - templateReference: module_details_template + sectionSpawnTriggers: + - templateReference: module_details_template sectionSpawnConditionType: SHOW sectionSpawnOperator: IS_NOT_EMPTY - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: einfuehrung_module_komponenten formElementExpectedValue: Modul formElementOperator: EQUALS @@ -312,12 +321,12 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: TEXTAREA isClonable: true - sectionSpawnTrigger: - templateReference: component_details_template + sectionSpawnTriggers: + - templateReference: component_details_template sectionSpawnConditionType: SHOW sectionSpawnOperator: IS_NOT_EMPTY - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: einfuehrung_module_komponenten formElementExpectedValue: Komponente formElementOperator: EQUALS @@ -335,13 +344,13 @@ formElementSections: employeeDataCategory: SENSITIVE type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: ki_details_template + sectionSpawnTriggers: + - templateReference: ki_details_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -358,8 +367,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung formElementOperator: EQUALS @@ -372,12 +381,11 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: wirtschaftliche_auswirkungen formElementExpectedValue: Ja formElementOperator: EQUALS - # Einstellung IT-System - title: Einstellung IT-System subtitle: Informationen zur Einstellung des IT-Systems @@ -391,8 +399,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -405,8 +413,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -423,8 +431,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -437,8 +445,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: einstellung_ersatz_system formElementExpectedValue: Ja formElementOperator: EQUALS @@ -455,8 +463,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -469,8 +477,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: einstellung_auswirkungen_arbeitsablaeufe formElementExpectedValue: Ja formElementOperator: EQUALS @@ -487,8 +495,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -501,8 +509,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: einstellung_auswirkungen_personalplanung formElementExpectedValue: Ja formElementOperator: EQUALS @@ -519,8 +527,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -533,8 +541,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: einstellung_wirtschaftliche_auswirkungen formElementExpectedValue: Ja formElementOperator: EQUALS @@ -547,8 +555,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: DATE - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -561,8 +569,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -575,8 +583,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einstellung IT-System formElementOperator: EQUALS @@ -594,8 +602,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -612,8 +620,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -630,8 +638,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_testphase_findet_statt formElementExpectedValue: Ja formElementOperator: EQUALS @@ -644,8 +652,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_mitarbeiterdaten_nicht_anonymisiert formElementExpectedValue: Ja formElementOperator: EQUALS @@ -658,8 +666,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_mitarbeiterdaten_nicht_anonymisiert formElementExpectedValue: Ja formElementOperator: EQUALS @@ -672,8 +680,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_testphase_findet_statt formElementExpectedValue: Ja formElementOperator: EQUALS @@ -691,8 +699,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -705,8 +713,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -719,8 +727,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -733,8 +741,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -752,8 +760,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -766,8 +774,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -784,8 +792,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: SENSITIVE type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -802,8 +810,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: REVIEW_REQUIRED type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -820,8 +828,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: SENSITIVE type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -838,8 +846,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -853,12 +861,12 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: TEXTAREA isClonable: true - sectionSpawnTrigger: - templateReference: module_details_template + sectionSpawnTriggers: + - templateReference: module_details_template sectionSpawnConditionType: SHOW sectionSpawnOperator: IS_NOT_EMPTY - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_einfuehrung_module_komponenten formElementExpectedValue: Modul formElementOperator: EQUALS @@ -872,12 +880,12 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: TEXTAREA isClonable: true - sectionSpawnTrigger: - templateReference: component_details_template + sectionSpawnTriggers: + - templateReference: component_details_template sectionSpawnConditionType: SHOW sectionSpawnOperator: IS_NOT_EMPTY - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_einfuehrung_module_komponenten formElementExpectedValue: Komponente formElementOperator: EQUALS @@ -885,23 +893,23 @@ formElementSections: title: Kommt im IT-System Künstliche Intelligenz zum Einsatz? description: Kommt im IT-System Künstliche Intelligenz zum Einsatz? options: - - value: Nein - label: Nein - processingPurpose: SYSTEM_OPERATION - employeeDataCategory: NON_CRITICAL - value: Ja label: Ja processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE + - value: Nein + label: Nein + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: ki_details_template + sectionSpawnTriggers: + - templateReference: ki_details_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -918,8 +926,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Einführung mit einhergehender Ablösung formElementOperator: EQUALS @@ -932,8 +940,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: abloesung_wirtschaftliche_auswirkungen formElementExpectedValue: Ja formElementOperator: EQUALS @@ -951,8 +959,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: DATE - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -969,8 +977,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -987,8 +995,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_testphase_findet_statt formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1001,8 +1009,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_mitarbeiterdaten_nicht_anonymisiert formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1015,8 +1023,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_mitarbeiterdaten_nicht_anonymisiert formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1029,8 +1037,8 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_testphase_findet_statt formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1048,8 +1056,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1062,8 +1070,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1076,8 +1084,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1090,8 +1098,8 @@ formElementSections: processingPurpose: BUSINESS_PROCESS employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1113,8 +1121,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1128,12 +1136,12 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: TEXTAREA isClonable: true - sectionSpawnTrigger: - templateReference: aenderung_modul_details_template + sectionSpawnTriggers: + - templateReference: aenderung_modul_details_template sectionSpawnConditionType: SHOW sectionSpawnOperator: IS_NOT_EMPTY - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_modul_komponenten_erweiterung formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1150,8 +1158,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1168,8 +1176,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: REVIEW_REQUIRED type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_funktionserweiterung formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1183,12 +1191,12 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: TEXTAREA isClonable: true - sectionSpawnTrigger: - templateReference: aenderung_funktionserweiterung_modul_template + sectionSpawnTriggers: + - templateReference: aenderung_funktionserweiterung_modul_template sectionSpawnConditionType: SHOW sectionSpawnOperator: IS_NOT_EMPTY - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_funktionserweiterung_art formElementExpectedValue: Modulbezogene Funktionserweiterung formElementOperator: EQUALS @@ -1201,8 +1209,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: REVIEW_REQUIRED type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_funktionserweiterung_art formElementExpectedValue: Allgemeine Funktionserweiterung formElementOperator: EQUALS @@ -1220,13 +1228,17 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: aenderung_rollen_berechtigungen_template + sectionSpawnTriggers: + - templateReference: rollen_berechtigungen_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + - templateReference: verarbeitung_mitarbeiterdaten_template + sectionSpawnConditionType: SHOW + sectionSpawnExpectedValue: Ja + sectionSpawnOperator: EQUALS + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1244,13 +1256,13 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: aenderung_schnittstellen_template + sectionSpawnTriggers: + - templateReference: aenderung_schnittstellen_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1268,13 +1280,13 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: aenderung_aufbewahrungs_loeschfristen_template + sectionSpawnTriggers: + - templateReference: aenderung_aufbewahrungs_loeschfristen_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1292,13 +1304,13 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: ki_details_template + sectionSpawnTriggers: + - templateReference: ki_details_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1316,13 +1328,13 @@ formElementSections: employeeDataCategory: NON_CRITICAL type: RADIOBUTTON isClonable: false - sectionSpawnTrigger: - templateReference: aenderung_personenbezogene_daten_template + sectionSpawnTriggers: + - templateReference: aenderung_personenbezogene_daten_template sectionSpawnConditionType: SHOW sectionSpawnExpectedValue: Ja sectionSpawnOperator: EQUALS - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1339,8 +1351,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: RADIOBUTTON - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: art_der_massnahme formElementExpectedValue: Änderung IT-System formElementOperator: EQUALS @@ -1353,8 +1365,8 @@ formElementSections: processingPurpose: SYSTEM_OPERATION employeeDataCategory: NON_CRITICAL type: TEXTAREA - visibilityCondition: - formElementConditionType: SHOW + visibilityConditions: + - formElementConditionType: SHOW sourceFormElementReference: aenderung_sonstige formElementExpectedValue: Ja formElementOperator: EQUALS @@ -1608,53 +1620,599 @@ formElementSections: processingPurpose: DATA_ANALYSIS employeeDataCategory: SENSITIVE -# Änderung: Rollen/Berechtigungen -- title: Änderung Rollen-/Berechtigungskonzept +# Eingabeseite 2: Rollen und Berechtigungen (comprehensive template) +- title: Rollen und Berechtigungen shortTitle: Rollen/Berechtigungen - description: Informationen zu Änderungen am Rollen- und Berechtigungskonzept + description: Vollständiges Rollen- und Berechtigungskonzept für das IT-System isTemplate: true - templateReference: aenderung_rollen_berechtigungen_template - titleTemplate: Änderung Rollen-/Berechtigungskonzept + templateReference: rollen_berechtigungen_template + titleTemplate: Rollen und Berechtigungen formElementSubSections: - - title: Rollen- und Berechtigungsänderungen + + # Question: Performance/Behavior monitoring + - title: Leistungs-/Verhaltensüberwachung formElements: - - reference: aenderung_rollen_beschreibung - title: Beschreibung der Änderungen - description: Beschreiben Sie die Änderungen am Rollen- und Berechtigungskonzept - type: TEXTAREA + - reference: luv_beabsichtigt + title: Soll durch das IT-System Leistung und/oder Verhalten von Arbeitnehmern überwacht werden? + description: Wenn JA wird eine ausführliche Rollen- und Berechtigungsmatrix benötigt + type: RADIOBUTTON options: - - value: '' + - value: Ja + label: Ja + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: Nein + label: Nein + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + + # Simple roles table (shown when LuV = Nein) + - title: Einfache Darstellung Rollen/Berechtigungen + formElements: + - reference: einfache_rollen_tabelle + title: Rollen und Berechtigungen + description: Übersicht der Rollen und deren Zugriffsberechtigungen + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Nein + formElementOperator: EQUALS + options: + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Fachliche Rolle + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Rollenzahl + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' label: Beschreibung processingPurpose: SYSTEM_OPERATION - employeeDataCategory: REVIEW_REQUIRED - - reference: aenderung_rollen_neue_rollen - title: Neue Rollen - description: Welche neuen Rollen werden eingeführt? - type: TEXTAREA - options: - - value: '' - label: Neue Rollen + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Zugriffsberechtigungen processingPurpose: SYSTEM_OPERATION employeeDataCategory: REVIEW_REQUIRED - - reference: aenderung_rollen_geaenderte_berechtigungen - title: Geänderte Berechtigungen - description: Welche Berechtigungen werden geändert? - type: TEXTAREA - options: - - value: '' - label: Geänderte Berechtigungen - processingPurpose: SYSTEM_OPERATION - employeeDataCategory: REVIEW_REQUIRED - - reference: aenderung_rollen_betroffene_nutzer - title: Betroffene Nutzergruppen - description: Welche Nutzergruppen sind von den Änderungen betroffen? - type: TEXTAREA - options: - - value: '' - label: Betroffene Nutzergruppen - processingPurpose: BUSINESS_PROCESS - employeeDataCategory: REVIEW_REQUIRED + # Detailed roles matrix (shown when LuV = Ja) + - title: 1. Rollenstamm + formElements: + - reference: rollenstamm_tabelle + title: Rollenstamm + description: Definition der Systemrollen + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Rollenname + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Beschreibung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + + - title: 2. Permission-Katalog + formElements: + - reference: permission_katalog_tabelle + title: Permission-Katalog + description: Definition der Systemberechtigungen + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Permission-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Permission-Name + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Kurzbeschreibung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + + - title: 3. Scope-Katalog + formElements: + - reference: scope_katalog_tabelle + title: Scope-Katalog + description: Auf welche Objekte/Organisationseinheiten werden Berechtigungen angewendet? + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Scope-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Scope-Name + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Bedeutung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + + - title: 4. Schranken Rolle → erlaubte Permissions + formElements: + - reference: schranken_rolle_permissions_tabelle + title: Schranken Rolle → erlaubte Permissions (Leitplanken) + description: Zuordnung der Rollen zu den jeweiligen Berechtigungen (Maximalrahmen) + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: rollenstamm_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Permission-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: permission_katalog_tabelle + sourceColumnIndex: 0 + isMultipleAllowed: true + - value: '[]' + label: Einschränkungen + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: REVIEW_REQUIRED + + - title: 5. Schranke Rolle → Erlaubte Scopes + formElements: + - reference: schranken_rolle_scopes_tabelle + title: Schranke Rolle → Erlaubte Scopes + description: Beschränkung des Zugriffs über die Rollen auf bestimmte Organisationseinheiten + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: rollenstamm_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Scope-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: scope_katalog_tabelle + sourceColumnIndex: 0 + isMultipleAllowed: true + - value: '[]' + label: Einschränkung / Kommentar + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: REVIEW_REQUIRED + +# Eingabeseite 3: Verarbeitung Mitarbeiterdaten (comprehensive template) +- title: Verarbeitung von Mitarbeiterdaten + shortTitle: Mitarbeiterdaten + description: Angaben zur Verarbeitung von personenbezogenen Arbeitnehmerdaten + isTemplate: true + templateReference: verarbeitung_mitarbeiterdaten_template + titleTemplate: Verarbeitung von Mitarbeiterdaten + formElementSubSections: + + # Question: Personal data processing + - title: Grundlegende Fragen + formElements: + - reference: personenbezogene_daten_verarbeitet + title: Werden durch das IT-System personenbezogene Daten von Arbeitnehmern verarbeitet? + description: '' + type: RADIOBUTTON + options: + - value: Ja + label: Ja + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: Nein + label: Nein + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + + # ============================================================================ + # CASE 1: Leistungs-/Verhaltenskontrolle NICHT beabsichtigt (LuV = Nein) + # ============================================================================ + + - title: Verarbeitete personenbezogene Daten (Einfache Darstellung) + formElements: + - reference: einfache_datenverarbeitung_tabelle + title: Verarbeitete personenbezogene Daten + description: Übersicht der verarbeiteten Daten (ohne Leistungs-/Verhaltenskontrolle) + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: personenbezogene_daten_verarbeitet + formElementExpectedValue: Ja + formElementOperator: EQUALS + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Nein + formElementOperator: EQUALS + options: + - value: '[]' + label: Verarbeitungs-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Bezeichnung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Systemfunktion/Verarbeitungsform + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Kurzbeschreibung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Datenkategorien + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Allgemeiner Zweck + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Betroffene Mitarbeiter + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Häufigkeit/Anlass + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Leistungs-/Verhaltenskontrolle + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + + # ============================================================================ + # CASE 1: Rollen-Sichtbarkeit (Simple case - when luv_beabsichtigt = Nein) + # ============================================================================ + + - title: Rollen-Sichtbarkeit (Einfache Darstellung) + formElements: + - reference: rollen_sichtbarkeit_einfach_tabelle + title: Rollen-Sichtbarkeit + description: Welche Rollen können welche Verarbeitungsvorgänge sehen? (Einfache Darstellung) + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: personenbezogene_daten_verarbeitet + formElementExpectedValue: Ja + formElementOperator: EQUALS + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Nein + formElementOperator: EQUALS + options: + - value: '[]' + label: Verarbeitungsvorgang-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: einfache_datenverarbeitung_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: einfache_rollen_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Export/Weitergabe + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Empfänger + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Personenbezug möglich + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Hinweise + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + + # ============================================================================ + # CASE 2: Leistungs-/Verhaltenskontrolle beabsichtigt (LuV = Ja) + # ============================================================================ + + - title: Verarbeitete personenbezogene Daten (Umfassende Darstellung) + formElements: + - reference: umfassende_datenverarbeitung_tabelle + title: Verarbeitete personenbezogene Daten + description: Umfassende Übersicht der verarbeiteten Daten mit Leistungs-/Verhaltenskontrolle + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: personenbezogene_daten_verarbeitet + formElementExpectedValue: Ja + formElementOperator: EQUALS + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Verarbeitungsvorgang-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Bezeichnung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Systemfunktion/Verarbeitungsform + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Kurzbeschreibung + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Datenkategorien + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Verarbeitete Arbeitnehmerdaten + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Betroffene Mitarbeiter + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Allgemeiner Zweck + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Häufigkeit/Anlass + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Rollen-Sichtbarkeit (grob) + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + columnConfig: + sourceTableReference: rollenstamm_tabelle + sourceColumnIndex: 0 + isMultipleAllowed: true + - value: '[]' + label: Export/Weitergabe (Ja/Nein + Ziel) + processingPurpose: DATA_ANALYSIS + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Leistungs-/Verhaltenskontrolle beabsichtigt? + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + columnConfig: + isCheckbox: true + + # ============================================================================ + # CASE 2: Additional tables for LuV = Ja + # ============================================================================ + + - title: Angaben zur Leistungs-/Verhaltenskontrolle + formElements: + - reference: luv_details_tabelle + title: Angaben zur Leistungs-/Verhaltenskontrolle + description: Detaillierte Angaben zu Verarbeitungsvorgängen mit Leistungs-/Verhaltenskontrolle + type: TABLE + tableRowPreset: + sourceTableReference: umfassende_datenverarbeitung_tabelle + filterCondition: + sourceColumnIndex: 11 + expectedValue: 'true' + operator: EQUALS + columnMappings: + - sourceColumnIndex: 0 + targetColumnIndex: 0 + canAddRows: false + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: personenbezogene_daten_verarbeitet + formElementExpectedValue: Ja + formElementOperator: EQUALS + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Verarbeitungsvorgang-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: umfassende_datenverarbeitung_tabelle + sourceColumnIndex: 0 + isReadOnly: true + - value: '[]' + label: Konkreter Kontrollzweck + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Kontrollart + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Entscheidungswirkung + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Granularität/Bezugsebene + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Drilldown bis Person möglich? + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Ranking/Scoring + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Mindestgruppe/Schwelle + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Automatisierte Alerts/Entscheidungen + processingPurpose: DATA_ANALYSIS + employeeDataCategory: SENSITIVE + - value: '[]' + label: Schutzmaßnahmen/Governance + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: REVIEW_REQUIRED + - value: '[]' + label: Audit-Logging erforderlich + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: REVIEW_REQUIRED + columnConfig: + isCheckbox: true + + # Access rules table - references comprehensive rollenstamm_tabelle when LuV = Ja + - title: Zugriffsregeln hinsichtlich der Verarbeitungsvorgänge + formElements: + - reference: zugriffsregeln_tabelle + title: Zugriffsregeln hinsichtlich der Verarbeitungsvorgänge + description: Detaillierte Zugriffsregeln pro Verarbeitungsvorgang und Rolle + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: personenbezogene_daten_verarbeitet + formElementExpectedValue: Ja + formElementOperator: EQUALS + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Verarbeitungsvorgang-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: umfassende_datenverarbeitung_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: rollenstamm_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Sichtbar (Ja/Nein) + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + isCheckbox: true + - value: '[]' + label: Scope-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: scope_katalog_tabelle + sourceColumnIndex: 0 + isMultipleAllowed: true + - value: '[]' + label: Bedingungen/Restriktionen + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: REVIEW_REQUIRED + + # Permissions per processing operation table + - title: Berechtigungen für die jeweiligen Verarbeitungsvorgänge + formElements: + - reference: berechtigungen_verarbeitung_tabelle + title: Berechtigungen für die jeweiligen Verarbeitungsvorgänge + description: Welche Berechtigungen haben welche Rollen für welche Verarbeitungsvorgänge? + type: TABLE + visibilityConditions: + - formElementConditionType: SHOW + sourceFormElementReference: personenbezogene_daten_verarbeitet + formElementExpectedValue: Ja + formElementOperator: EQUALS + - formElementConditionType: SHOW + sourceFormElementReference: luv_beabsichtigt + formElementExpectedValue: Ja + formElementOperator: EQUALS + options: + - value: '[]' + label: Verarbeitungsvorgang-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: umfassende_datenverarbeitung_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Rollen-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: rollenstamm_tabelle + sourceColumnIndex: 0 + - value: '[]' + label: Permission-ID + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + columnConfig: + sourceTableReference: permission_katalog_tabelle + sourceColumnIndex: 0 + rowConstraint: + constraintTableReference: schranken_rolle_permissions_tabelle + constraintKeyColumnIndex: 0 + constraintValueColumnIndex: 1 + currentRowKeyColumnIndex: 1 + - value: '[]' + label: Erlaubt (Ja/Nein/bedingt) + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: NON_CRITICAL + - value: '[]' + label: Bedingungen + processingPurpose: SYSTEM_OPERATION + employeeDataCategory: REVIEW_REQUIRED + +# AI GENERATED TEMPLATES BELOW THIS LINE - WILL BE REPLACED LATER # Änderung: Schnittstellen - title: Änderung Schnittstellen shortTitle: Schnittstellen diff --git a/legalconsenthub-backend/src/main/resources/templates/application_form_latex_template.tex b/legalconsenthub-backend/src/main/resources/templates/application_form_latex_template.tex index 318702c..3e94596 100644 --- a/legalconsenthub-backend/src/main/resources/templates/application_form_latex_template.tex +++ b/legalconsenthub-backend/src/main/resources/templates/application_form_latex_template.tex @@ -15,6 +15,12 @@ \usepackage{xcolor} \usepackage{tcolorbox} \usepackage[normalem]{ulem} +\usepackage{tabularx} +\usepackage{array} +\usepackage{booktabs} + +% Define column type for auto-wrapping text +\newcolumntype{Y}{>{\raggedright\arraybackslash}X} \hypersetup{ colorlinks=true, @@ -73,12 +79,22 @@ Dieses Dokument enthält die Details der Betriebsvereinbarung "[[${applicationFo \textit{\small [[${element.description}]]} [/] +[# th:if="${element.isTable}"] +\vspace{0.5em} +\noindent +\small +[(${element.value})] +\normalsize +\vspace{0.5em} +[/] +[# th:if="${!element.isTable}"] \begin{tcolorbox}[colback=gray!5, colframe=gray!20, arc=0mm, boxrule=0.5pt] [[${element.value}]] \end{tcolorbox} [/] [/] [/] +[/] \vspace{3cm} diff --git a/legalconsenthub/app/components/FormEngine.vue b/legalconsenthub/app/components/FormEngine.vue index 0bdc496..d0b6265 100644 --- a/legalconsenthub/app/components/FormEngine.vue +++ b/legalconsenthub/app/components/FormEngine.vue @@ -13,6 +13,8 @@ :is="getResolvedComponent(formElementItem.formElement)" :form-options="formElementItem.formElement.options" :disabled="props.disabled" + :all-form-elements="props.allFormElements" + :table-row-preset="formElementItem.formElement.tableRowPreset" @update:form-options="updateFormOptions($event, formElementItem)" />
@@ -102,6 +104,7 @@ const props = defineProps<{ visibilityMap: Map applicationFormId?: string disabled?: boolean + allFormElements?: FormElementDto[] }>() const emit = defineEmits<{ diff --git a/legalconsenthub/app/components/FormStepperWithNavigation.vue b/legalconsenthub/app/components/FormStepperWithNavigation.vue index 62f6428..2727165 100644 --- a/legalconsenthub/app/components/FormStepperWithNavigation.vue +++ b/legalconsenthub/app/components/FormStepperWithNavigation.vue @@ -23,6 +23,7 @@ :visibility-map="visibilityMap" :application-form-id="applicationFormId" :disabled="disabled" + :all-form-elements="allFormElements" @update:model-value=" (elements) => handleFormElementUpdate(elements, getSubsectionKey(currentFormElementSection, sectionIndex, subsection)) @@ -107,9 +108,9 @@ const { cloneElement } = useClonableElements() const previousVisibilityMap = ref>(new Map()) const allFormElements = computed(() => { - return props.formElementSections.flatMap( - (section) => section.formElementSubSections?.flatMap((subsection) => subsection.formElements) ?? [] - ) + return props.formElementSections + .filter((section) => section.isTemplate !== true) + .flatMap((section) => section.formElementSubSections?.flatMap((subsection) => subsection.formElements) ?? []) }) const visibilityMap = computed(() => { diff --git a/legalconsenthub/app/components/formelements/TheTable.vue b/legalconsenthub/app/components/formelements/TheTable.vue index 0464c74..226b1e8 100644 --- a/legalconsenthub/app/components/formelements/TheTable.vue +++ b/legalconsenthub/app/components/formelements/TheTable.vue @@ -1,8 +1,39 @@