feat(#4): Add comparison for versions, refactor version restoring
This commit is contained in:
31
legalconsenthub/types/formDiff.ts
Normal file
31
legalconsenthub/types/formDiff.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export interface FormDiff {
|
||||
elementsAdded: ElementChange[]
|
||||
elementsRemoved: ElementChange[]
|
||||
elementsModified: ElementModification[]
|
||||
}
|
||||
|
||||
export interface ElementChange {
|
||||
sectionTitle: string
|
||||
title: string | undefined
|
||||
type: string
|
||||
position: number
|
||||
}
|
||||
|
||||
export interface ElementModification {
|
||||
sectionTitle: string
|
||||
position: number
|
||||
optionsAdded: OptionChange[]
|
||||
optionsRemoved: OptionChange[]
|
||||
optionsModified: OptionModification[]
|
||||
}
|
||||
|
||||
export interface OptionChange {
|
||||
value: string
|
||||
label: string
|
||||
}
|
||||
|
||||
export interface OptionModification {
|
||||
value: string
|
||||
labelChanged: { from: string; to: string }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user