mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Messing around with notification action to start
This commit is contained in:
@@ -322,6 +322,17 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@case (WorkflowActionType.Notification) {
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<pngx-input-text i18n-title title="Notification subject" formControlName="notification_subject" [error]="error?.actions?.[i]?.notification_subject"></pngx-input-text>
|
||||
<pngx-input-text i18n-title title="Notification body" formControlName="notification_body" [error]="error?.actions?.[i]?.notification_body"></pngx-input-text>
|
||||
<pngx-input-text i18n-title title="Notification emails" formControlName="notification_destination_emails" [error]="error?.actions?.[i]?.notification_destination_emails"></pngx-input-text>
|
||||
<pngx-input-text i18n-title title="Notification url" formControlName="notification_destination_url" [error]="error?.actions?.[i]?.notification_destination_url"></pngx-input-text>
|
||||
<pngx-input-switch i18n-title title="Notification include document" formControlName="notification_include_document"></pngx-input-switch>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@@ -96,6 +96,10 @@ export const WORKFLOW_ACTION_OPTIONS = [
|
||||
id: WorkflowActionType.Removal,
|
||||
name: $localize`Removal`,
|
||||
},
|
||||
{
|
||||
id: WorkflowActionType.Notification,
|
||||
name: $localize`Notification`,
|
||||
},
|
||||
]
|
||||
|
||||
const TRIGGER_MATCHING_ALGORITHMS = MATCHING_ALGORITHMS.filter(
|
||||
@@ -402,6 +406,17 @@ export class WorkflowEditDialogComponent
|
||||
remove_all_custom_fields: new FormControl(
|
||||
action.remove_all_custom_fields
|
||||
),
|
||||
notification_subject: new FormControl(action.notification_subject),
|
||||
notification_body: new FormControl(action.notification_body),
|
||||
notification_destination_emails: new FormControl(
|
||||
action.notification_destination_emails
|
||||
),
|
||||
notification_destination_url: new FormControl(
|
||||
action.notification_destination_url
|
||||
),
|
||||
notification_include_document: new FormControl(
|
||||
action.notification_include_document
|
||||
),
|
||||
}),
|
||||
{ emitEvent }
|
||||
)
|
||||
@@ -503,6 +518,11 @@ export class WorkflowEditDialogComponent
|
||||
remove_all_permissions: false,
|
||||
remove_custom_fields: [],
|
||||
remove_all_custom_fields: false,
|
||||
notification_subject: null,
|
||||
notification_body: null,
|
||||
notification_destination_emails: null,
|
||||
notification_destination_url: null,
|
||||
notification_include_document: null,
|
||||
}
|
||||
this.object.actions.push(action)
|
||||
this.createActionField(action)
|
||||
|
@@ -3,6 +3,7 @@ import { ObjectWithId } from './object-with-id'
|
||||
export enum WorkflowActionType {
|
||||
Assignment = 1,
|
||||
Removal = 2,
|
||||
Notification = 3,
|
||||
}
|
||||
export interface WorkflowAction extends ObjectWithId {
|
||||
type: WorkflowActionType
|
||||
@@ -62,4 +63,14 @@ export interface WorkflowAction extends ObjectWithId {
|
||||
remove_custom_fields?: number[] // [CustomField.id]
|
||||
|
||||
remove_all_custom_fields?: boolean
|
||||
|
||||
notification_subject?: string
|
||||
|
||||
notification_body?: string
|
||||
|
||||
notification_destination_emails?: string
|
||||
|
||||
notification_destination_url?: string
|
||||
|
||||
notification_include_document?: boolean
|
||||
}
|
||||
|
Reference in New Issue
Block a user