diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 5cf4b0898..e144497a1 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -4769,14 +4769,14 @@ Create new workflow src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 166 + 172 Edit workflow src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 170 + 176 diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html index 93cf7d8c2..90f7b07df 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -123,7 +123,7 @@

Set scheduled trigger offset and which field to use.

- +
diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts index d0170ce13..cba00bc38 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts @@ -120,6 +120,7 @@ export class WorkflowEditDialogComponent storagePaths: StoragePath[] mailRules: MailRule[] customFields: CustomField[] + dateCustomFields: CustomField[] expandedItem: number = null @@ -159,7 +160,12 @@ export class WorkflowEditDialogComponent customFieldsService .listAll() .pipe(first()) - .subscribe((result) => (this.customFields = result.results)) + .subscribe((result) => { + this.customFields = result.results + this.dateCustomFields = this.customFields?.filter( + (f) => f.data_type === CustomFieldDataType.Date + ) + }) } getCreateTitle() { @@ -422,12 +428,6 @@ export class WorkflowEditDialogComponent return SCHEDULE_DATE_FIELD_OPTIONS } - get dateCustomFields() { - return this.customFields?.filter( - (f) => f.data_type === CustomFieldDataType.Date - ) - } - getTriggerTypeOptionName(type: WorkflowTriggerType): string { return this.triggerTypeOptions.find((t) => t.id === type)?.name ?? '' } @@ -448,7 +448,7 @@ export class WorkflowEditDialogComponent matching_algorithm: MATCH_NONE, match: '', is_insensitive: true, - schedule_offset_days: null, + schedule_offset_days: 0, schedule_is_recurring: false, schedule_date_field: ScheduleDateField.Added, schedule_date_custom_field: null,