[AAE-12318] Adjustments for HxP Attach-File widget (#8425)

This commit is contained in:
Robert Duda
2023-04-03 13:57:49 +02:00
committed by GitHub
parent ba90131e61
commit 2bd72f71d5
3 changed files with 17 additions and 5 deletions

View File

@@ -91,7 +91,13 @@ export class FormModel implements ProcessFormModel {
processVariables: ProcessVariableModel[] = [];
variables: FormVariableModel[] = [];
constructor(json?: any, formValues?: FormValues, readOnly: boolean = false, protected formService?: FormValidationService, enableFixedSpace?: boolean) {
constructor(
json?: any,
formValues?: FormValues,
readOnly: boolean = false,
protected formService?: FormValidationService,
enableFixedSpace?: boolean
) {
this.readOnly = readOnly;
this.json = json;
@@ -415,8 +421,10 @@ export class FormModel implements ProcessFormModel {
}
setNodeIdValueForViewersLinkedToUploadWidget(linkedUploadWidgetContentSelected: UploadWidgetContentLinkModel) {
const linkedWidgetType = linkedUploadWidgetContentSelected?.options?.linkedWidgetType ?? 'uploadWidget';
const subscribedViewers = this.fieldsCache.filter(field =>
linkedUploadWidgetContentSelected.uploadWidgetId === field.params['uploadWidget']
linkedUploadWidgetContentSelected.uploadWidgetId === field.params[linkedWidgetType]
);
subscribedViewers.forEach(viewer => {

View File

@@ -16,11 +16,13 @@
*/
import { ContentLinkModel } from './content-link.model';
export class UploadWidgetContentLinkModelOptions {
linkedWidgetType: string;
}
export class UploadWidgetContentLinkModel extends ContentLinkModel {
uploadWidgetId: string;
constructor(obj?: any, uploadWidgetId?: string) {
constructor(obj?: any, uploadWidgetId?: string, public options?: UploadWidgetContentLinkModelOptions) {
super(obj);
this.uploadWidgetId = uploadWidgetId;
}