mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-2005] Cannot view document in tasklist attachment list (#2701)
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
<div id="attachment-task-list" *ngIf="taskId">
|
||||
<h5>Attachments</h5>
|
||||
<div class="adf-no-form-container">
|
||||
<adf-upload-drag-area
|
||||
[parentId]="taskId"
|
||||
[disabled]="isCompletedTask()"
|
||||
[showNotificationBar]="false">
|
||||
<adf-task-attachment-list #taskAttachList
|
||||
*ngIf="taskId"
|
||||
[taskId]="taskId"
|
||||
[disabled]="isCompletedTask()"
|
||||
(attachmentClick)="onAttachmentClick($event)">
|
||||
</adf-task-attachment-list>
|
||||
</adf-upload-drag-area>
|
||||
|
||||
<adf-create-task-attachment
|
||||
*ngIf="!isCompletedTask()"
|
||||
[taskId]="taskId"
|
||||
(success)="onFileUploadComplete($event)">
|
||||
</adf-create-task-attachment>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="fileShowed">
|
||||
<adf-viewer
|
||||
[(showViewer)]="fileShowed"
|
||||
[blobFile]="content"
|
||||
[displayName]="contentName"
|
||||
[overlayMode]="true">
|
||||
</adf-viewer>
|
||||
</div>
|
@@ -20,7 +20,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-file-view',
|
||||
selector: 'app-file-view',
|
||||
templateUrl: 'file-view.component.html'
|
||||
})
|
||||
export class FileViewComponent implements OnInit {
|
||||
@@ -33,6 +33,10 @@ export class FileViewComponent implements OnInit {
|
||||
private apiService: AlfrescoApiService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route
|
||||
.data
|
||||
.subscribe(v => console.log(v));
|
||||
|
||||
this.route.params.subscribe(params => {
|
||||
const id = params.nodeId;
|
||||
if (id) {
|
||||
|
@@ -20,10 +20,10 @@ import { Router } from '@angular/router';
|
||||
import { AppDefinitionRepresentationModel } from '@alfresco/adf-process-services';
|
||||
|
||||
@Component({
|
||||
selector: 'activiti-apps-view',
|
||||
selector: 'app-process-list-view',
|
||||
templateUrl: './apps-view.component.html'
|
||||
})
|
||||
export class ActivitiAppsViewComponent {
|
||||
export class AppsViewComponent {
|
||||
|
||||
constructor(private router: Router) {
|
||||
}
|
@@ -35,7 +35,7 @@ export class CustomEditorComponent extends WidgetComponent {
|
||||
|
||||
@Component({
|
||||
selector: 'custom-stencil-01',
|
||||
template: `<div style="color: green">ADF version of custom Activiti stencil</div>`
|
||||
template: `<div style="color: green">ADF version of custom ProcessService stencil</div>`
|
||||
})
|
||||
export class CustomStencil01 extends WidgetComponent {
|
||||
|
@@ -20,7 +20,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
import { Subscription } from 'rxjs/Rx';
|
||||
|
||||
@Component({
|
||||
selector: 'form-viewer',
|
||||
selector: 'app-form-viewer',
|
||||
templateUrl: './form-viewer.component.html',
|
||||
styleUrls: ['./form-viewer.component.css']
|
||||
})
|
@@ -1,21 +1,21 @@
|
||||
<div id="attachment-process-list" *ngIf="processId">
|
||||
<div id="attachment-process-list" *ngIf="processInstanceId">
|
||||
<h5>Attachments</h5>
|
||||
<div class="adf-no-form-container">
|
||||
<adf-upload-drag-area
|
||||
[parentId]="processId"
|
||||
[parentId]="processInstanceId"
|
||||
[disabled]="isCompletedProcess()"
|
||||
[showNotificationBar]="false">
|
||||
<adf-process-attachment-list #processAttachList
|
||||
*ngIf="processId"
|
||||
*ngIf="processInstanceId"
|
||||
[disabled]="isCompletedProcess()"
|
||||
[processInstanceId]="processId"
|
||||
[processInstanceId]="processInstanceId"
|
||||
(attachmentClick)="onAttachmentClick($event)">
|
||||
</adf-process-attachment-list>
|
||||
</adf-upload-drag-area>
|
||||
|
||||
<adf-create-process-attachment
|
||||
*ngIf="!isCompletedProcess()"
|
||||
[processInstanceId]="processId"
|
||||
[processInstanceId]="processInstanceId"
|
||||
(success)="onFileUploadComplete($event)">
|
||||
</adf-create-process-attachment>
|
||||
|
@@ -21,18 +21,18 @@ import { ProcessInstance, ProcessService ,
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'activiti-process-attachments',
|
||||
templateUrl: './activiti-process-attachments.component.html',
|
||||
styleUrls: ['./activiti-process-attachments.component.css'],
|
||||
selector: 'app-process-attachments',
|
||||
templateUrl: './process-attachments.component.html',
|
||||
styleUrls: ['./process-attachments.component.css'],
|
||||
providers: [
|
||||
{provide: UploadService, useClass: ProcessUploadService}
|
||||
]
|
||||
})
|
||||
|
||||
export class ActivitiProcessAttachmentsComponent implements OnInit, OnChanges {
|
||||
export class ProcessAttachmentsComponent implements OnInit, OnChanges {
|
||||
|
||||
@Input()
|
||||
processId: string;
|
||||
processInstanceId: string;
|
||||
|
||||
@ViewChild(ProcessAttachmentListComponent)
|
||||
processAttachList: ProcessAttachmentListComponent;
|
||||
@@ -50,8 +50,8 @@ export class ActivitiProcessAttachmentsComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
if (this.processId) {
|
||||
this.processService.getProcess(this.processId).subscribe((processInstance: ProcessInstance) => {
|
||||
if (this.processInstanceId) {
|
||||
this.processService.getProcess(this.processInstanceId).subscribe((processInstance: ProcessInstance) => {
|
||||
this.processInstance = processInstance;
|
||||
});
|
||||
}
|
@@ -1,10 +1,10 @@
|
||||
<mat-tab-group [(selectedIndex)]="activeTab">
|
||||
<mat-tab id="tasks-header" href="#tasks" label="{{'PS-TAB.TASKS-TAB' | translate}}">
|
||||
<div class="page-content">
|
||||
<div class="activiti-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="activiti-grid-item activiti-tasks-menu" fxFlex.gt-md="225px">
|
||||
<div class="activiti-list-buttons">
|
||||
<button color="primary" mat-raised-button data-automation-id="btn-start-task" class="activiti-list-buttons-start" (click)="navigateStartTask()">
|
||||
<div class="adf-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="adf-grid-item adf-tasks-menu" fxFlex.gt-md="225px">
|
||||
<div class="adf-list-buttons">
|
||||
<button color="primary" mat-raised-button data-automation-id="btn-start-task" class="adf-list-buttons-start" (click)="navigateStartTask()">
|
||||
<mat-icon>add</mat-icon>
|
||||
<span>{{'PS-TAB.START-TASK' | translate}}</span>
|
||||
</button>
|
||||
@@ -23,7 +23,7 @@
|
||||
</adf-accordion-group>
|
||||
</adf-accordion>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-tasks-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
|
||||
<div class="adf-grid-item adf-tasks-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
|
||||
*ngIf="taskFilter && !isStartTaskMode()">
|
||||
<adf-tasklist
|
||||
[appId]="taskFilter?.appId"
|
||||
@@ -60,7 +60,7 @@
|
||||
[supportedPageSizes]="[2, 4, 6, 8, 10, 12]">
|
||||
</adf-pagination>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-tasks-details" *ngIf="!isStartTaskMode()" fxFlex.gt-md="1 1 auto">
|
||||
<div class="adf-grid-item adf-tasks-details" *ngIf="!isStartTaskMode()" fxFlex.gt-md="1 1 auto">
|
||||
<adf-task-details #activitidetails
|
||||
[debugMode]="true"
|
||||
[taskId]="currentTaskId"
|
||||
@@ -85,24 +85,11 @@
|
||||
</div>
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<adf-upload-drag-area
|
||||
[parentId]="currentTaskId"
|
||||
[showNotificationBar]="false">
|
||||
<adf-task-attachment-list #taskAttachList
|
||||
[taskId]="currentTaskId">
|
||||
<div adf-empty-list>
|
||||
<div adf-empty-list-header class="adf-empty-list-header"> {{'ADF_TASK_LIST.ATTACHMENT.EMPTY.HEADER' | translate}} </div>
|
||||
<div adf-empty-list-body>
|
||||
<div fxHide.lt-md="true" class="adf-empty-list-drag_drop">{{'ADF_TASK_LIST.ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE' | translate}}</div>
|
||||
<div fxHide.lt-md="true" class="adf-empty-list__any-files-here-to-add"> {{'ADF_TASK_LIST.ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</adf-task-attachment-list>
|
||||
</adf-upload-drag-area>
|
||||
<app-task-attachments [taskId]="currentTaskId" ></app-task-attachments>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-tasks-start" *ngIf="isStartTaskMode()" fxFlex.gt-md="1 1 auto">
|
||||
<div class="adf-grid-item adf-tasks-start" *ngIf="isStartTaskMode()" fxFlex.gt-md="1 1 auto">
|
||||
<adf-start-task
|
||||
[appId]="appId"
|
||||
(success)="onStartTaskSuccess($event)"
|
||||
@@ -115,13 +102,13 @@
|
||||
<mat-tab id="processes-header" href="#processes"
|
||||
label="{{'PS-TAB.PROCESSES-TAB' | translate}}">
|
||||
<div class="page-content">
|
||||
<div class="activiti-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="activiti-grid-item activiti-processes-menu" fxFlex.gt-md="225px">
|
||||
<div class="activiti-list-buttons">
|
||||
<div class="adf-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="adf-grid-item adf-processes-menu" fxFlex.gt-md="225px">
|
||||
<div class="adf-list-buttons">
|
||||
<button
|
||||
color="primary"
|
||||
mat-raised-button
|
||||
class="activiti-list-buttons-start"
|
||||
class="adf-list-buttons-start"
|
||||
data-automation-id="btn-start-process"
|
||||
(click)="navigateStartProcess()">
|
||||
<mat-icon>add</mat-icon>
|
||||
@@ -140,7 +127,7 @@
|
||||
</adf-accordion-group>
|
||||
</adf-accordion>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-processes-list activiti-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
|
||||
<div class="adf-grid-item adf-processes-list adf-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
|
||||
*ngIf="processFilter && !isStartProcessMode()">
|
||||
<adf-process-instance-list
|
||||
*ngIf="processFilter?.hasFilter()" [appId]="processFilter.appId"
|
||||
@@ -162,7 +149,7 @@
|
||||
|
||||
</adf-process-instance-list>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-processes-details" *ngIf="!isStartProcessMode()" fxFlex.gt-md="1 1 auto">
|
||||
<div class="adf-grid-item adf-processes-details" *ngIf="!isStartProcessMode()" fxFlex.gt-md="1 1 auto">
|
||||
<adf-process-instance-details
|
||||
[processInstanceId]="currentProcessInstanceId"
|
||||
(processCancelled)="processCancelled()"
|
||||
@@ -184,14 +171,11 @@
|
||||
</div>
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<adf-process-attachment-list
|
||||
[processInstanceId]="currentProcessInstanceId"
|
||||
(attachmentClick)="onContentClick($event)">
|
||||
</adf-process-attachment-list>
|
||||
<app-process-attachments [processInstanceId]="currentProcessInstanceId" ></app-process-attachments>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-processes-start" fxFlex.gt-md="1 1 auto"
|
||||
<div class="adf-grid-item adf-processes-start" fxFlex.gt-md="1 1 auto"
|
||||
*ngIf="isStartProcessMode()">
|
||||
<adf-start-process
|
||||
[appId]="appId"
|
||||
@@ -204,8 +188,8 @@
|
||||
</mat-tab>
|
||||
<mat-tab id="report-header" href="#report"
|
||||
label="{{'PS-TAB.REPORTS-TAB' | translate}}">
|
||||
<div class="activiti-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="activiti-grid-item activiti-reports-menu" fxFlex.gt-md="300px">
|
||||
<div class="adf-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="adf-grid-item adf-reports-menu" fxFlex.gt-md="300px">
|
||||
<span><h5>Report List</h5></span>
|
||||
<hr>
|
||||
<analytics-report-list
|
||||
@@ -215,7 +199,7 @@
|
||||
#analyticsreportlist>
|
||||
</analytics-report-list>
|
||||
</div>
|
||||
<div class="activiti-grid-item activiti-reports-details" fxFlex.gt-md="1 1 auto">
|
||||
<div class="adf-grid-item adf-reports-details" fxFlex.gt-md="1 1 auto">
|
||||
<adf-analytics
|
||||
*ngIf="report"
|
||||
[appId]="appId"
|
@@ -5,24 +5,24 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.activiti-grid {
|
||||
.adf-grid {
|
||||
|
||||
.activiti-grid-item {
|
||||
.adf-grid-item {
|
||||
margin: 4px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.activiti-list-buttons {
|
||||
.adf-list-buttons {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.activiti-list-buttons-start {
|
||||
.adf-list-buttons-start {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.activiti-tasks-list.small-pagination,
|
||||
.activiti-processes-list.small-pagination {
|
||||
.adf-tasks-list.small-pagination,
|
||||
.adf-processes-list.small-pagination {
|
||||
.adf-pagination {
|
||||
|
||||
flex-wrap: wrap;
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.activiti-list {
|
||||
.adf-list {
|
||||
.adf-data-table {
|
||||
border: none;
|
||||
}
|
@@ -68,15 +68,15 @@ const currentProcessIdNew = '__NEW__';
|
||||
const currentTaskIdNew = '__NEW__';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-activiti',
|
||||
templateUrl: './activiti.component.html',
|
||||
styleUrls: ['./activiti.component.scss'],
|
||||
selector: 'app-process-service',
|
||||
templateUrl: './process-service.component.html',
|
||||
styleUrls: ['./process-service.component.scss'],
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: ProcessUploadService }
|
||||
],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class ActivitiComponent implements AfterViewInit, OnDestroy, OnInit {
|
||||
export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit {
|
||||
|
||||
@ViewChild(TaskFiltersComponent)
|
||||
activitifilter: TaskFiltersComponent;
|
||||
@@ -422,10 +422,10 @@ export class ActivitiComponent implements AfterViewInit, OnDestroy, OnInit {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.loadStencilScriptsInPageFromActiviti();
|
||||
this.loadStencilScriptsInPageFromProcessService();
|
||||
}
|
||||
|
||||
loadStencilScriptsInPageFromActiviti() {
|
||||
loadStencilScriptsInPageFromProcessService() {
|
||||
this.apiService.getInstance().activiti.scriptFileApi.getControllers().then(response => {
|
||||
if (response) {
|
||||
let s = document.createElement('script');
|
@@ -19,11 +19,11 @@ import { Component } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'activiti-show-diagram',
|
||||
templateUrl: './activiti-show-diagram.component.html',
|
||||
styleUrls: ['./activiti-show-diagram.component.css']
|
||||
selector: 'app-show-diagram',
|
||||
templateUrl: './show-diagram.component.html',
|
||||
styleUrls: ['./show-diagram.component.css']
|
||||
})
|
||||
export class ActivitiShowDiagramComponent {
|
||||
export class ShowDiagramComponent {
|
||||
|
||||
processDefinitionId: string;
|
||||
appId: string;
|
@@ -0,0 +1,39 @@
|
||||
<div id="attachment-task-list" *ngIf="taskId">
|
||||
<div class="adf-no-form-container">
|
||||
<adf-upload-drag-area
|
||||
[parentId]="currentTaskId"
|
||||
[showNotificationBar]="false">
|
||||
|
||||
<adf-task-attachment-list #taskAttachList
|
||||
[disabled]="isCompletedTask()"
|
||||
(attachmentClick)="onAttachmentClick($event)"
|
||||
[taskId]="currentTaskId">
|
||||
<div adf-empty-list>
|
||||
<div adf-empty-list-header class="adf-empty-list-header"> {{'ADF_TASK_LIST.ATTACHMENT.EMPTY.HEADER' | translate}} </div>
|
||||
<div adf-empty-list-body>
|
||||
<div fxHide.lt-md="true" class="adf-empty-list-drag_drop">{{'ADF_TASK_LIST.ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE' | translate}}</div>
|
||||
<div fxHide.lt-md="true" class="adf-empty-list__any-files-here-to-add"> {{'ADF_TASK_LIST.ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</adf-task-attachment-list>
|
||||
|
||||
</adf-upload-drag-area>
|
||||
|
||||
|
||||
<adf-create-task-attachment
|
||||
*ngIf="!isCompletedTask()"
|
||||
[taskId]="taskId"
|
||||
(success)="onFileUploadComplete($event)">
|
||||
</adf-create-task-attachment>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="fileShowed">
|
||||
<adf-viewer
|
||||
[(showViewer)]="fileShowed"
|
||||
[blobFile]="content"
|
||||
[displayName]="contentName"
|
||||
[overlayMode]="true">
|
||||
</adf-viewer>
|
||||
</div>
|
@@ -20,15 +20,15 @@ import { ProcessUploadService, TaskListService, TaskAttachmentListComponent } fr
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'activiti-task-attachments',
|
||||
templateUrl: './activiti-task-attachments.component.html',
|
||||
styleUrls: ['./activiti-task-attachments.component.css'],
|
||||
selector: 'app-task-attachments',
|
||||
templateUrl: './task-attachments.component.html',
|
||||
styleUrls: ['./task-attachments.component.css'],
|
||||
providers: [
|
||||
{ provide: UploadService, useClass: ProcessUploadService }
|
||||
]
|
||||
})
|
||||
|
||||
export class ActivitiTaskAttachmentsComponent implements OnInit, OnChanges {
|
||||
export class TaskAttachmentsComponent implements OnInit, OnChanges {
|
||||
|
||||
@Input()
|
||||
taskId: string;
|
Reference in New Issue
Block a user