mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4454] Map upload field to UploadCloudWidget in task cloud form (#4672)
* [ADF-4454] Moved upload widget maping to task form * Update community-task-details-cloud.component.ts
This commit is contained in:
committed by
Eugenio Romano
parent
0c7581acba
commit
7016dabb6c
@@ -17,8 +17,7 @@
|
|||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { UploadCloudWidgetComponent } from '@alfresco/adf-process-services-cloud';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
import { NotificationService, FormRenderingService } from '@alfresco/adf-core';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './community-task-details-cloud.component.html',
|
templateUrl: './community-task-details-cloud.component.html',
|
||||||
@@ -32,7 +31,6 @@ export class CommunityTaskDetailsCloudDemoComponent {
|
|||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private formRenderingService: FormRenderingService,
|
|
||||||
private notificationService: NotificationService
|
private notificationService: NotificationService
|
||||||
) {
|
) {
|
||||||
this.route.params.subscribe((params) => {
|
this.route.params.subscribe((params) => {
|
||||||
@@ -41,8 +39,6 @@ export class CommunityTaskDetailsCloudDemoComponent {
|
|||||||
this.route.parent.params.subscribe((params) => {
|
this.route.parent.params.subscribe((params) => {
|
||||||
this.appName = params.appName;
|
this.appName = params.appName;
|
||||||
});
|
});
|
||||||
this.formRenderingService.setComponentTypeResolver('upload', () => UploadCloudWidgetComponent, true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isTaskValid(): boolean {
|
isTaskValid(): boolean {
|
||||||
|
@@ -17,8 +17,7 @@
|
|||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { UploadCloudWidgetComponent } from '@alfresco/adf-process-services-cloud';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
import { NotificationService, FormRenderingService } from '@alfresco/adf-core';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './task-details-cloud-demo.component.html',
|
templateUrl: './task-details-cloud-demo.component.html',
|
||||||
@@ -32,7 +31,6 @@ export class TaskDetailsCloudDemoComponent {
|
|||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private formRenderingService: FormRenderingService,
|
|
||||||
private notificationService: NotificationService
|
private notificationService: NotificationService
|
||||||
) {
|
) {
|
||||||
this.route.params.subscribe((params) => {
|
this.route.params.subscribe((params) => {
|
||||||
@@ -41,7 +39,6 @@ export class TaskDetailsCloudDemoComponent {
|
|||||||
this.route.parent.params.subscribe((params) => {
|
this.route.parent.params.subscribe((params) => {
|
||||||
this.appName = params.appName;
|
this.appName = params.appName;
|
||||||
});
|
});
|
||||||
this.formRenderingService.setComponentTypeResolver('upload', () => UploadCloudWidgetComponent, true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,6 +22,8 @@ import {
|
|||||||
import { FormCloud } from '../../../form/models/form-cloud.model';
|
import { FormCloud } from '../../../form/models/form-cloud.model';
|
||||||
import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model';
|
import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model';
|
||||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||||
|
import { FormRenderingService } from '@alfresco/adf-core';
|
||||||
|
import { UploadCloudWidgetComponent } from '../../../form/components/upload-cloud.widget';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-task-form',
|
selector: 'adf-cloud-task-form',
|
||||||
@@ -89,7 +91,9 @@ export class TaskFormCloudComponent implements OnChanges {
|
|||||||
taskDetails: TaskDetailsCloudModel;
|
taskDetails: TaskDetailsCloudModel;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private taskCloudService: TaskCloudService) {
|
private taskCloudService: TaskCloudService,
|
||||||
|
private formRenderingService: FormRenderingService) {
|
||||||
|
this.formRenderingService.setComponentTypeResolver('upload', () => UploadCloudWidgetComponent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
|
Reference in New Issue
Block a user