diff --git a/frontend/src/hooks/tools/changeMetadata/useChangeMetadataParameters.ts b/frontend/src/hooks/tools/changeMetadata/useChangeMetadataParameters.ts index 74dc7010e..580edd68e 100644 --- a/frontend/src/hooks/tools/changeMetadata/useChangeMetadataParameters.ts +++ b/frontend/src/hooks/tools/changeMetadata/useChangeMetadataParameters.ts @@ -89,6 +89,7 @@ const validateParameters = (params: ChangeMetadataParameters): boolean => { } // At least one field should have content for the operation to be meaningful + /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ const hasStandardMetadata = !!( params.title.trim() || params.author.trim() @@ -97,8 +98,8 @@ const validateParameters = (params: ChangeMetadataParameters): boolean => { || params.creator.trim() || params.producer.trim() || params.creationDate - ?? params.modificationDate - ?? params.trapped !== TrappedStatus.UNKNOWN + || params.modificationDate + || params.trapped !== TrappedStatus.UNKNOWN ); const hasCustomMetadata = params.customMetadata.some( diff --git a/frontend/src/types/automation.ts b/frontend/src/types/automation.ts index cd65cb9c8..08a5b0a56 100644 --- a/frontend/src/types/automation.ts +++ b/frontend/src/types/automation.ts @@ -4,7 +4,7 @@ export interface AutomationOperation { operation: string; - parameters: Record; + parameters: Record; } export interface AutomationConfig { @@ -22,7 +22,7 @@ export interface AutomationTool { operation: string; name: string; configured: boolean; - parameters?: Record; + parameters?: Record; } export type AutomationStep = typeof import('../constants/automation').AUTOMATION_STEPS[keyof typeof import('../constants/automation').AUTOMATION_STEPS]; @@ -82,34 +82,4 @@ export type JsonValue = | JsonValue[] | { [key: string]: JsonValue }; -export type JsonObject = Record; - -export interface AutomationOperation { - operation: string; - // Wurde von Record auf JSON erweitert - parameters: Record; -} - -export interface AutomationConfig { - id: string; - name: string; - description?: string; - icon?: string; - operations: AutomationOperation[]; - createdAt: string; - updatedAt: string; -} - -export interface AutomationStepData { - step: AutomationStep; - mode?: AutomationMode; - automation?: AutomationConfig; -} - -export interface ExecutionStep { - id: string; - operation: string; - name: string; - status: 'pending' | 'running' | 'completed' | 'error'; - error?: string; -} +export type JsonObject = { [key: string]: JsonValue };