mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-1711] Task Attachment list - Fix the TaskService dependency (#2752)
* Fix the TaskService dependency * Improve doc and remove unused dep
This commit is contained in:
parent
820763ba0e
commit
18dc0711f9
@ -72,7 +72,8 @@
|
||||
"REPORTS-TAB": "Reports",
|
||||
"START-TASK": "Start task",
|
||||
"START-PROCESS": "Start process",
|
||||
"AUDIT-LOG": "Process Audit log"
|
||||
"PROCESS-AUDIT-LOG": "Process Audit log",
|
||||
"TASK-AUDIT-LOG": "Task Audit log"
|
||||
},
|
||||
"FORM-LIST": {
|
||||
"STORE": "Store",
|
||||
|
@ -17,13 +17,16 @@
|
||||
|
||||
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ProcessInstance, ProcessService ,
|
||||
ProcessAttachmentListComponent } from '@alfresco/adf-process-services';
|
||||
ProcessAttachmentListComponent, ProcessUploadService } from '@alfresco/adf-process-services';
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-process-attachments',
|
||||
templateUrl: './process-attachments.component.html',
|
||||
styleUrls: ['./process-attachments.component.css']
|
||||
styleUrls: ['./process-attachments.component.css'],
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: ProcessUploadService }
|
||||
]
|
||||
})
|
||||
|
||||
export class ProcessAttachmentsComponent implements OnInit, OnChanges {
|
||||
|
@ -73,7 +73,7 @@
|
||||
</adf-task-details>
|
||||
<hr>
|
||||
<div *ngIf="currentTaskId">
|
||||
{{'PS-TAB.AUDIT-LOG' | translate}}
|
||||
{{'PS-TAB.TASK-AUDIT-LOG' | translate}}
|
||||
<button
|
||||
adf-task-audit
|
||||
[task-id]="currentTaskId"
|
||||
@ -158,7 +158,7 @@
|
||||
</adf-process-instance-details>
|
||||
<hr>
|
||||
<div *ngIf="currentProcessInstanceId">
|
||||
{{'PS-TAB.AUDIT-LOG' | translate}}
|
||||
{{'PS-TAB.PROCESS-AUDIT-LOG' | translate}}
|
||||
<button adf-process-audit
|
||||
[process-id]="currentProcessInstanceId"
|
||||
[download]="true" mat-icon-button
|
||||
|
@ -49,11 +49,10 @@ import {
|
||||
TaskDetailsEvent,
|
||||
TaskFiltersComponent,
|
||||
TaskListComponent,
|
||||
TaskListService,
|
||||
ProcessUploadService
|
||||
TaskListService
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { LogService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, UploadService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import {
|
||||
DataSorting,
|
||||
ObjectDataRow,
|
||||
@ -70,9 +69,6 @@ const currentTaskIdNew = '__NEW__';
|
||||
selector: 'app-process-service',
|
||||
templateUrl: './process-service.component.html',
|
||||
styleUrls: ['./process-service.component.scss'],
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: ProcessUploadService }
|
||||
],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit {
|
||||
|
@ -16,13 +16,16 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { TaskListService, TaskAttachmentListComponent, TaskDetailsModel } from '@alfresco/adf-process-services';
|
||||
import { TaskListService, TaskAttachmentListComponent, TaskDetailsModel, TaskUploadService } from '@alfresco/adf-process-services';
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-attachments',
|
||||
templateUrl: './task-attachments.component.html',
|
||||
styleUrls: ['./task-attachments.component.css']
|
||||
styleUrls: ['./task-attachments.component.css'],
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: TaskUploadService }
|
||||
]
|
||||
})
|
||||
|
||||
export class TaskAttachmentsComponent implements OnInit, OnChanges {
|
||||
|
@ -11,6 +11,23 @@ Displays attached documents on a specified process instance
|
||||
</adf-process-attachment-list>
|
||||
```
|
||||
|
||||
Make sure to override the UploadService with the ProcessUploadService
|
||||
```ts
|
||||
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
import { ProcessUploadService } from '@alfresco/adf-process-services';
|
||||
|
||||
@Component({
|
||||
selector: 'my-custom-process-attachment',
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: ProcessUploadService }
|
||||
]
|
||||
})
|
||||
export class MyCustomProcessAttachmentComponent {
|
||||
constructor() {}
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
|
@ -37,6 +37,22 @@ If we want user to be able to upload attachments for empty lists, We can wrap ou
|
||||
</adf-upload-drag-area>
|
||||
```
|
||||
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
import { TaskUploadService } from '@alfresco/adf-process-services';
|
||||
|
||||
Make sure to override the UploadService with the TaskUploadService
|
||||
```ts
|
||||
@Component({
|
||||
selector: 'my-custom-task-attachment',
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: TaskUploadService }
|
||||
]
|
||||
})
|
||||
export class MyCustomTaskAttachmentComponent {
|
||||
constructor() {}
|
||||
}
|
||||
```
|
||||
|
||||
[Upload Drag Area Component](./upload-drag-area.component.md)
|
||||
|
||||
If the List is empty, the custom no-content template we passed is displayed.
|
||||
|
@ -25,7 +25,6 @@ import { TaskAttachmentListComponent } from './task-attachment-list.component';
|
||||
import { ProcessAttachmentListComponent } from './process-attachment-list.component';
|
||||
import { CreateProcessAttachmentComponent } from './create-process-attachment.component';
|
||||
import { AttachmentComponent } from './create-task-attachment.component';
|
||||
import { ProcessUploadService } from '../task-list/services/process-upload.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -36,9 +35,6 @@ import { ProcessUploadService } from '../task-list/services/process-upload.servi
|
||||
TranslateModule,
|
||||
DirectiveModule
|
||||
],
|
||||
providers: [
|
||||
ProcessUploadService
|
||||
],
|
||||
declarations: [
|
||||
TaskAttachmentListComponent,
|
||||
ProcessAttachmentListComponent,
|
||||
|
@ -17,16 +17,12 @@
|
||||
|
||||
import { ContentService, ThumbnailService } from '@alfresco/adf-core';
|
||||
import { Component, EventEmitter, Input, NgZone, OnChanges, Output, SimpleChanges } from '@angular/core';
|
||||
import { ProcessContentService, UploadService } from '@alfresco/adf-core';
|
||||
import { ProcessUploadService } from '../task-list/services/process-upload.service';
|
||||
import { ProcessContentService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-process-attachment-list',
|
||||
styleUrls: ['./process-attachment-list.component.scss'],
|
||||
templateUrl: './process-attachment-list.component.html',
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: ProcessUploadService }
|
||||
]
|
||||
templateUrl: './process-attachment-list.component.html'
|
||||
})
|
||||
export class ProcessAttachmentListComponent implements OnChanges {
|
||||
|
||||
|
@ -17,17 +17,13 @@
|
||||
|
||||
import { ContentService, ThumbnailService, EmptyListComponent } from '@alfresco/adf-core';
|
||||
import { AfterContentInit, ContentChild, Component, ElementRef, EventEmitter, Input, NgZone, OnChanges, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { ProcessContentService, UploadService } from '@alfresco/adf-core';
|
||||
import { TaskUploadService } from '../task-list/services/task-upload.service';
|
||||
import { ProcessContentService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-attachment-list',
|
||||
styleUrls: ['./task-attachment-list.component.scss'],
|
||||
templateUrl: './task-attachment-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: TaskUploadService }
|
||||
]
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class TaskAttachmentListComponent implements OnChanges, AfterContentInit {
|
||||
|
||||
|
@ -27,6 +27,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { PeopleModule } from '../people/people.module';
|
||||
import { CommentsModule } from '../comments/comments.module';
|
||||
import { TaskUploadService } from './services/task-upload.service';
|
||||
import { ProcessUploadService } from './services/process-upload.service';
|
||||
import { TaskListService } from './services/tasklist.service';
|
||||
import { TaskFilterService } from './services/task-filter.service';
|
||||
@ -70,6 +71,7 @@ import { TaskListComponent } from './components/task-list.component';
|
||||
providers: [
|
||||
TaskListService,
|
||||
TaskFilterService,
|
||||
TaskUploadService,
|
||||
ProcessUploadService,
|
||||
DatePipe
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user