mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2149] Update ng-packagr to 2.0.0 (#2935)
* ng-packagr version 2.0.0 core fixes * fix content services jsdoc * fix process service jsdoc * last update new build 2.0.0 * fix comment jsdoc
This commit is contained in:
@@ -124,7 +124,6 @@ export class AppsListComponent implements OnInit {
|
||||
/**
|
||||
* Return true if the appId is the current app
|
||||
* @param appId
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isSelected(appId: number): boolean {
|
||||
return (this.currentApp !== undefined && appId === this.currentApp.id);
|
||||
@@ -153,7 +152,6 @@ export class AppsListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Check if the value of the layoutType property is an allowed value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isValidType(): boolean {
|
||||
if (this.layoutType && (this.layoutType === AppsListComponent.LAYOUT_LIST || this.layoutType === AppsListComponent.LAYOUT_GRID)) {
|
||||
@@ -171,7 +169,6 @@ export class AppsListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Return true if the layout type is LIST
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isList(): boolean {
|
||||
return this.layoutType === AppsListComponent.LAYOUT_LIST;
|
||||
@@ -179,7 +176,6 @@ export class AppsListComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* Return true if the layout type is GRID
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isGrid(): boolean {
|
||||
return this.layoutType === AppsListComponent.LAYOUT_GRID;
|
||||
|
29
lib/process-services/ng-package.json
Normal file
29
lib/process-services/ng-package.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
||||
"workingDirectory": "./ng_work",
|
||||
"src": "../process-services/",
|
||||
"dest": "../dist/process-services/",
|
||||
"lib": {
|
||||
"licensePath": "../config/assets/license_header_add.txt",
|
||||
"comments" : "none",
|
||||
"entryFile": "./public-api.ts",
|
||||
"umdModuleIds": {
|
||||
"alfresco-js-api": "alfresco-js-api",
|
||||
"flatModuleFile": "adf-process-services",
|
||||
"minimatch": "minimatch",
|
||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
||||
"@angular/material": "@angular/material",
|
||||
"@angular/flex-layout": "@angular/flex-layout",
|
||||
"@alfresco/adf-core": "@alfresco/adf-core",
|
||||
"@alfresco/adf-content-services": "@alfresco/adf-content-services",
|
||||
"@angular/material-moment-adapter": "@angular/material-moment-adapter",
|
||||
"@angular/animations": "@angular/animations",
|
||||
"@angular/cdk/platform": "@angular/cdk/platform",
|
||||
"@angular/material/core": "@angular/material/core",
|
||||
"moment": "moment",
|
||||
"moment-es6": "moment-es6",
|
||||
"moment/src/moment": "moment/src/moment",
|
||||
"@ngx-translate/core": "@ngx-translate/core"
|
||||
}
|
||||
}
|
||||
}
|
@@ -186,7 +186,6 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
/**
|
||||
* Return the current task
|
||||
* @returns {ProcessInstanceFilterRepresentation}
|
||||
*/
|
||||
getCurrentFilter(): ProcessInstanceFilterRepresentation {
|
||||
return this.currentFilter;
|
||||
@@ -194,7 +193,6 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
/**
|
||||
* Check if the filter list is empty
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isFilterListEmpty(): boolean {
|
||||
return this.filters === undefined || (this.filters && this.filters.length === 0);
|
||||
|
@@ -15,10 +15,34 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DataColumn, DataRowEvent, DataSorting, DataTableAdapter, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/adf-core';
|
||||
import { AppConfigService, DataColumnListComponent, PaginatedComponent, PaginationComponent, PaginationQueryParams, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import {
|
||||
DataColumn,
|
||||
DataRowEvent,
|
||||
DataSorting,
|
||||
DataTableAdapter,
|
||||
ObjectDataColumn,
|
||||
ObjectDataRow,
|
||||
ObjectDataTableAdapter
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
AppConfigService,
|
||||
DataColumnListComponent,
|
||||
PaginatedComponent,
|
||||
PaginationComponent,
|
||||
PaginationQueryParams,
|
||||
UserPreferencesService
|
||||
} from '@alfresco/adf-core';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
|
||||
import {
|
||||
AfterContentInit,
|
||||
Component,
|
||||
ContentChild,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
Output,
|
||||
SimpleChanges
|
||||
} from '@angular/core';
|
||||
import { ProcessFilterParamRepresentationModel } from '../models/filter-process.model';
|
||||
import { processPresetsDefaultModel } from '../models/process-preset.model';
|
||||
import { ProcessService } from '../services/process.service';
|
||||
@@ -200,7 +224,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
/**
|
||||
* Create an array of ObjectDataRow
|
||||
* @param instances
|
||||
* @returns {ObjectDataRow[]}
|
||||
*/
|
||||
private createDataRow(instances: any[]): ObjectDataRow[] {
|
||||
let instancesRows: ObjectDataRow[] = [];
|
||||
@@ -255,7 +278,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
|
||||
/**
|
||||
* Return the current id
|
||||
* @returns {string}
|
||||
*/
|
||||
getCurrentId(): string {
|
||||
return this.currentInstanceId;
|
||||
@@ -263,7 +285,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
|
||||
/**
|
||||
* Check if the list is empty
|
||||
* @returns {ObjectDataTableAdapter|boolean}
|
||||
*/
|
||||
isListEmpty(): boolean {
|
||||
return this.data === undefined ||
|
||||
@@ -295,9 +316,8 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
/**
|
||||
* Optimize name field
|
||||
* @param instances
|
||||
* @returns {any[]}
|
||||
*/
|
||||
private optimizeNames(instances: any[]) {
|
||||
private optimizeNames(instances: any[]): any[] {
|
||||
instances = instances.map(t => {
|
||||
t.obj.name = this.getProcessNameOrDescription(t.obj, 'medium');
|
||||
return t;
|
||||
|
@@ -44,11 +44,7 @@ export class FilterProcessRepresentationModel implements UserProcessInstanceFilt
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This object represent the parameters of a process filter.
|
||||
*
|
||||
*
|
||||
* @returns {ProcessFilterParamRepresentationModel} .
|
||||
*/
|
||||
export class ProcessFilterParamRepresentationModel implements ProcessFilterRequestRepresentation {
|
||||
|
||||
|
@@ -44,7 +44,6 @@ export class ProcessFilterService {
|
||||
* Retrieve the process filter by id
|
||||
* @param filterId - number - The id of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* @returns {Observable<FilterProcessRepresentationModel>}
|
||||
*/
|
||||
getProcessFilterById(filterId: number, appId?: number): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||
@@ -57,7 +56,6 @@ export class ProcessFilterService {
|
||||
* Retrieve the process filter by name
|
||||
* @param filterName - string - The name of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* @returns {Observable<FilterProcessRepresentationModel>}
|
||||
*/
|
||||
getProcessFilterByName(filterName: string, appId?: number): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||
@@ -69,7 +67,6 @@ export class ProcessFilterService {
|
||||
/**
|
||||
* Create and return the default filters
|
||||
* @param appId
|
||||
* @returns {FilterProcessRepresentationModel[]}
|
||||
*/
|
||||
public createDefaultFilters(appId: number): Observable<FilterProcessRepresentationModel[]> {
|
||||
let runningFilter = this.getRunningFilterInstance(appId);
|
||||
@@ -123,7 +120,6 @@ export class ProcessFilterService {
|
||||
/**
|
||||
* Return a static Completed filter instance
|
||||
* @param appId
|
||||
* @returns {FilterProcessRepresentationModel}
|
||||
*/
|
||||
private getCompletedFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||
return new FilterProcessRepresentationModel({
|
||||
@@ -138,7 +134,6 @@ export class ProcessFilterService {
|
||||
/**
|
||||
* Return a static All filter instance
|
||||
* @param appId
|
||||
* @returns {FilterProcessRepresentationModel}
|
||||
*/
|
||||
private getAllFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||
return new FilterProcessRepresentationModel({
|
||||
@@ -153,7 +148,6 @@ export class ProcessFilterService {
|
||||
/**
|
||||
* Add a filter
|
||||
* @param filter - FilterProcessRepresentationModel
|
||||
* @returns {FilterProcessRepresentationModel}
|
||||
*/
|
||||
addProcessFilter(filter: FilterProcessRepresentationModel): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.alfrescoApiService.getInstance().activiti.userFiltersApi.createUserProcessInstanceFilter(filter))
|
||||
|
@@ -16,8 +16,16 @@
|
||||
*/
|
||||
|
||||
import { PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
|
||||
import { AuthenticationService, CardViewUpdateService, ClickNotification, LogService, UpdateNotification, FormRenderingService } from '@alfresco/adf-core';
|
||||
import { Component,
|
||||
import {
|
||||
AuthenticationService,
|
||||
CardViewUpdateService,
|
||||
ClickNotification,
|
||||
LogService,
|
||||
UpdateNotification,
|
||||
FormRenderingService
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
@@ -209,12 +217,11 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
|
||||
/**
|
||||
* Check if the task has a form
|
||||
* @returns {TaskDetailsModel|string|boolean}
|
||||
*/
|
||||
hasFormKey() {
|
||||
hasFormKey(): TaskDetailsModel | string | boolean {
|
||||
return (this.taskDetails
|
||||
&& this.taskDetails.formKey
|
||||
&& this.taskDetails.formKey !== 'null');
|
||||
&& this.taskDetails.formKey
|
||||
&& this.taskDetails.formKey !== 'null');
|
||||
}
|
||||
|
||||
isTaskActive() {
|
||||
@@ -339,7 +346,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
onFormError(error: any): void {
|
||||
this.errorDialogRef = this.dialog.open(this.errorDialog, {width: '500px'});
|
||||
this.errorDialogRef = this.dialog.open(this.errorDialog, { width: '500px' });
|
||||
this.error.emit(error);
|
||||
}
|
||||
|
||||
|
@@ -216,7 +216,6 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
/**
|
||||
* Return the current task
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
getCurrentFilter(): FilterRepresentationModel {
|
||||
return this.currentFilter;
|
||||
@@ -224,7 +223,6 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
/**
|
||||
* Check if the filter list is empty
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isFilterListEmpty(): boolean {
|
||||
return this.filters === undefined || (this.filters && this.filters.length === 0);
|
||||
|
@@ -15,9 +15,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DataColumn, DataRowEvent, DataTableAdapter, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/adf-core';
|
||||
import {
|
||||
DataColumn,
|
||||
DataRowEvent,
|
||||
DataTableAdapter,
|
||||
ObjectDataColumn,
|
||||
ObjectDataRow,
|
||||
ObjectDataTableAdapter
|
||||
} from '@alfresco/adf-core';
|
||||
import { AppConfigService, DataColumnListComponent, PaginationComponent } from '@alfresco/adf-core';
|
||||
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import {
|
||||
AfterContentInit,
|
||||
Component,
|
||||
ContentChild,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnInit,
|
||||
Output,
|
||||
SimpleChanges
|
||||
} from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { TaskListModel } from '../models/task-list.model';
|
||||
@@ -128,7 +145,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
||||
* When enabled the component reloads data from it's current source instead of the server side.
|
||||
* This allows generating and displaying custom data sets (i.e. filtered out content).
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberOf TaskListComponent
|
||||
*/
|
||||
hasCustomDataSource: boolean = false;
|
||||
@@ -218,14 +234,13 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
||||
|
||||
private loadTasksByState(): Observable<TaskListModel> {
|
||||
return this.requestNode.state === 'all'
|
||||
? this.taskListService.findAllTasksWithoutState(this.requestNode)
|
||||
: this.taskListService.findTasksByState(this.requestNode);
|
||||
? this.taskListService.findAllTasksWithoutState(this.requestNode)
|
||||
: this.taskListService.findTasksByState(this.requestNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an array of ObjectDataRow
|
||||
* @param instances
|
||||
* @returns {ObjectDataRow[]}
|
||||
*/
|
||||
private createDataRow(instances: any[]): ObjectDataRow[] {
|
||||
let instancesRows: ObjectDataRow[] = [];
|
||||
@@ -280,7 +295,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
||||
|
||||
/**
|
||||
* Return the current id
|
||||
* @returns {string}
|
||||
*/
|
||||
getCurrentId(): string {
|
||||
return this.currentInstanceId;
|
||||
@@ -289,15 +303,13 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
||||
/**
|
||||
* Check if the taskId is the same of the selected task
|
||||
* @param taskId
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isEqualToCurrentId(taskId: string) {
|
||||
isEqualToCurrentId(taskId: string): boolean {
|
||||
return this.currentInstanceId === taskId ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the list is empty
|
||||
* @returns {ObjectDataTableAdapter|boolean}
|
||||
*/
|
||||
isListEmpty(): boolean {
|
||||
return this.data === undefined ||
|
||||
@@ -330,9 +342,8 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
||||
/**
|
||||
* Optimize name field
|
||||
* @param istances
|
||||
* @returns {any[]}
|
||||
*/
|
||||
private optimizeNames(istances: any[]) {
|
||||
private optimizeNames(istances: any[]): any[] {
|
||||
istances = istances.map(t => {
|
||||
t.obj.name = t.obj.name || 'No name';
|
||||
return t;
|
||||
|
@@ -16,11 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* This object represent of the Form.
|
||||
*
|
||||
*
|
||||
* @returns {Form} .
|
||||
*/
|
||||
export class Form {
|
||||
|
||||
|
@@ -16,11 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* This object represent of the StartTaskModel.
|
||||
*
|
||||
*
|
||||
* @returns {StartTaskModel} .
|
||||
*/
|
||||
import { UserProcessModel } from '@alfresco/adf-core';
|
||||
|
||||
|
@@ -16,11 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* This object represent the details of a task.
|
||||
*
|
||||
*
|
||||
* @returns {TaskDetailsModel} .
|
||||
*/
|
||||
import { UserProcessModel } from '@alfresco/adf-core';
|
||||
import { TaskRepresentation } from 'alfresco-js-api';
|
||||
|
@@ -16,11 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* This object represent the User Event.
|
||||
*
|
||||
*
|
||||
* @returns {UserEventModel} .
|
||||
*/
|
||||
export class UserEventModel {
|
||||
type: string = '';
|
||||
|
@@ -37,7 +37,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Create and return the default filters
|
||||
* @param appId
|
||||
* @returns {FilterRepresentationModel[]}
|
||||
*/
|
||||
public createDefaultFilters(appId: number): Observable<FilterRepresentationModel[]> {
|
||||
let involvedTasksFilter = this.getInvolvedTasksFilterInstance(appId);
|
||||
@@ -87,7 +86,6 @@ export class TaskFilterService {
|
||||
|
||||
/**
|
||||
* Retrieve all the Tasks filters
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
getTaskListFilters(appId?: number): Observable<any> {
|
||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||
@@ -105,7 +103,6 @@ export class TaskFilterService {
|
||||
* Retrieve the Tasks filter by id
|
||||
* @param filterId - number - The id of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* @returns {Observable<FilterRepresentationModel>}
|
||||
*/
|
||||
getTaskFilterById(filterId: number, appId?: number): Observable<FilterRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||
@@ -117,7 +114,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Retrieve the Tasks filter by name
|
||||
* @param taskName - string - The name of the filter
|
||||
* @returns {Observable<FilterRepresentationModel>}
|
||||
*/
|
||||
getTaskFilterByName(taskName: string, appId?: number): Observable<FilterRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||
@@ -129,7 +125,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Add a filter
|
||||
* @param filter - FilterRepresentationModel
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
addFilter(filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().activiti.userFiltersApi.createUserTaskFilter(filter))
|
||||
@@ -150,7 +145,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Return a static Involved filter instance
|
||||
* @param appId
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
@@ -165,7 +159,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Return a static My task filter instance
|
||||
* @param appId
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
getMyTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
@@ -180,7 +173,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Return a static Queued filter instance
|
||||
* @param appId
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
@@ -195,7 +187,6 @@ export class TaskFilterService {
|
||||
/**
|
||||
* Return a static Completed filter instance
|
||||
* @param appId
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||
return new FilterRepresentationModel({
|
||||
|
@@ -43,7 +43,6 @@ export class TaskListService {
|
||||
* Return all the filters in the list where the task id belong
|
||||
* @param taskId - string
|
||||
* @param filter - FilterRepresentationModel []
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
getFilterForTaskById(taskId: string, filterList: FilterRepresentationModel[]): Observable<FilterRepresentationModel> {
|
||||
return Observable.from(filterList)
|
||||
@@ -54,7 +53,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Return the search node for query task based on the given filter
|
||||
* @param filter - FilterRepresentationModel
|
||||
* @returns {TaskQueryRequestRepresentationModel}
|
||||
*/
|
||||
private generateTaskRequestNodeFromFilter(filter: FilterRepresentationModel): TaskQueryRequestRepresentationModel {
|
||||
let requestNode = {
|
||||
@@ -70,7 +68,6 @@ export class TaskListService {
|
||||
* Check if a taskId is filtered with the given filter
|
||||
* @param taskId - string
|
||||
* @param filter - FilterRepresentationModel
|
||||
* @returns {FilterRepresentationModel}
|
||||
*/
|
||||
isTaskRelatedToFilter(taskId: string, filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
||||
let requestNodeForFilter = this.generateTaskRequestNodeFromFilter(filter);
|
||||
@@ -83,7 +80,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Retrieve all the tasks filtered by filterModel
|
||||
* @param filter - TaskFilterRepresentationModel
|
||||
* @returns {any}
|
||||
*/
|
||||
getTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
|
||||
return Observable.fromPromise(this.callApiTasksFiltered(requestNode))
|
||||
@@ -96,7 +92,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Retrieve tasks filtered by filterModel and state
|
||||
* @param filter - TaskFilterRepresentationModel
|
||||
* @returns {any}
|
||||
*/
|
||||
findTasksByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
|
||||
if (state) {
|
||||
@@ -108,7 +103,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Retrieve all tasks filtered by filterModel and state
|
||||
* @param filter - TaskFilterRepresentationModel
|
||||
* @returns {any}
|
||||
*/
|
||||
findAllTaskByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
|
||||
if (state) {
|
||||
@@ -123,7 +117,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Retrieve all tasks filtered by filterModel irrespective of state
|
||||
* @param filter - TaskFilterRepresentationModel
|
||||
* @returns {any}
|
||||
*/
|
||||
findAllTasksWithoutState(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
|
||||
return Observable.forkJoin(
|
||||
@@ -142,7 +135,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Retrieve all the task details
|
||||
* @param id - taskId
|
||||
* @returns {<TaskDetailsModel>}
|
||||
*/
|
||||
getTaskDetails(taskId: string): Observable<TaskDetailsModel> {
|
||||
return Observable.fromPromise(this.callApiTaskDetails(taskId))
|
||||
@@ -155,7 +147,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Retrieve all the task's checklist
|
||||
* @param id - taskId
|
||||
* @returns {TaskDetailsModel}
|
||||
*/
|
||||
getTaskChecklist(id: string): Observable<TaskDetailsModel[]> {
|
||||
return Observable.fromPromise(this.callApiTaskChecklist(id))
|
||||
@@ -171,7 +162,6 @@ export class TaskListService {
|
||||
|
||||
/**
|
||||
* Retrieve all the form shared with this user
|
||||
* @returns {TaskDetailsModel}
|
||||
*/
|
||||
getFormList(): Observable<Form []> {
|
||||
let opts = {
|
||||
@@ -197,7 +187,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Add a task
|
||||
* @param task - TaskDetailsModel
|
||||
* @returns {TaskDetailsModel}
|
||||
*/
|
||||
addTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
|
||||
return Observable.fromPromise(this.callApiAddTask(task))
|
||||
@@ -219,7 +208,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Make the task completed
|
||||
* @param id - taskId
|
||||
* @returns {TaskDetailsModel}
|
||||
*/
|
||||
completeTask(taskId: string) {
|
||||
return Observable.fromPromise(this.apiService.getInstance().activiti.taskApi.completeTask(taskId))
|
||||
@@ -230,7 +218,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Return the total number of the tasks by filter
|
||||
* @param requestNode - TaskFilterRepresentationModel
|
||||
* @returns {any}
|
||||
*/
|
||||
public getTotalTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<any> {
|
||||
requestNode.size = 0;
|
||||
@@ -243,7 +230,6 @@ export class TaskListService {
|
||||
/**
|
||||
* Create a new standalone task
|
||||
* @param task - TaskDetailsModel
|
||||
* @returns {TaskDetailsModel}
|
||||
*/
|
||||
createNewTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
|
||||
return Observable.fromPromise(this.callApiCreateTask(task))
|
||||
@@ -257,7 +243,6 @@ export class TaskListService {
|
||||
* Assign task to user/group
|
||||
* @param taskId - string
|
||||
* @param requestNode - any
|
||||
* @returns {TaskDetailsModel}
|
||||
*/
|
||||
assignTask(taskId: string, requestNode: any): Observable<TaskDetailsModel> {
|
||||
let assignee = {assignee: requestNode.id};
|
||||
|
Reference in New Issue
Block a user