is_recurring boolean, WorkflowRun model

This commit is contained in:
shamoon
2024-10-23 16:55:52 -07:00
parent ae9bf6d286
commit a5f0f7efeb
10 changed files with 280 additions and 76 deletions

View File

@@ -124,13 +124,14 @@
<div class="row">
<div class="col-4">
<pngx-input-text i18n-title title="Delay" formControlName="schedule_delay" i18n-hint hint="Delay time string such as '3months', '1y'." [error]="error?.schedule_delay"></pngx-input-text>
<pngx-input-check i18n-title title="Repeat" formControlName="schedule_is_recurring" i18n-hint hint="Repeat the trigger after the delay." [error]="error?.schedule_is_recurring"></pngx-input-check>
</div>
<div class="col-4">
<pngx-input-select i18n-title title="Delay field" formControlName="schedule_delay_field" [items]="scheduleDelayFieldOptions" [error]="error?.schedule_delay_field"></pngx-input-select>
<pngx-input-select i18n-title title="Relative to" formControlName="schedule_delay_field" [items]="scheduleDelayFieldOptions" [error]="error?.schedule_delay_field"></pngx-input-select>
</div>
@if (formGroup.get('schedule_delay_field').value === 'custom_field') {
<div class="col-4">
<pngx-input-select i18n-title title="Custom delay field" formControlName="schedule_delay_custom_field" [items]="dateCustomFields" i18n-hint hint="Custom field to use for delay." [error]="error?.schedule_delay_custom_field"></pngx-input-select>
<pngx-input-select i18n-title title="Delay custom field" formControlName="schedule_delay_custom_field" [items]="dateCustomFields" i18n-hint hint="Custom field to use for delay." [error]="error?.schedule_delay_custom_field"></pngx-input-select>
</div>
}
</div>

View File

@@ -339,6 +339,7 @@ export class WorkflowEditDialogComponent
trigger.filter_has_document_type
),
schedule_delay: new FormControl(trigger.schedule_delay),
schedule_is_recurring: new FormControl(trigger.schedule_is_recurring),
schedule_delay_field: new FormControl(trigger.schedule_delay_field),
schedule_delay_custom_field: new FormControl(
trigger.schedule_delay_custom_field
@@ -448,6 +449,7 @@ export class WorkflowEditDialogComponent
match: '',
is_insensitive: true,
schedule_delay: null,
schedule_is_recurring: false,
schedule_delay_field: ScheduleDelayField.Added,
schedule_delay_custom_field: null,
}