Minor code and style fixes (#5398)

* type fixes

* import fixes

* fix typos

* fix warning for private props that init in ctor only

* typing fixes

* typing fixes

* style cleanup

* fix test template
This commit is contained in:
Denys Vuika
2020-02-09 22:03:32 +00:00
committed by GitHub
parent 3459c98bd0
commit a0926a38d8
74 changed files with 171 additions and 71 deletions

View File

@@ -41,7 +41,7 @@ export class CommentProcessService {
addTaskComment(taskId: string, message: string): Observable<CommentModel> {
return from(this.apiService.getInstance().activiti.taskApi.addTaskComment({ message: message }, taskId))
.pipe(
map((response: CommentModel) => {
map((response) => {
return new CommentModel({
id: response.id,
message: response.message,
@@ -61,9 +61,9 @@ export class CommentProcessService {
getTaskComments(taskId: string): Observable<CommentModel[]> {
return from(this.apiService.getInstance().activiti.taskApi.getTaskComments(taskId))
.pipe(
map((response: any) => {
map((response) => {
const comments: CommentModel[] = [];
response.data.forEach((comment: CommentModel) => {
response.data.forEach((comment) => {
const user = new UserProcessModel(comment.createdBy);
comments.push(new CommentModel({
id: comment.id,
@@ -86,9 +86,9 @@ export class CommentProcessService {
getProcessInstanceComments(processInstanceId: string): Observable<CommentModel[]> {
return from(this.apiService.getInstance().activiti.commentsApi.getProcessInstanceComments(processInstanceId))
.pipe(
map((response: any) => {
map((response) => {
const comments: CommentModel[] = [];
response.data.forEach((comment: CommentModel) => {
response.data.forEach((comment) => {
const user = new UserProcessModel(comment.createdBy);
comments.push(new CommentModel({
id: comment.id,
@@ -113,7 +113,7 @@ export class CommentProcessService {
return from(
this.apiService.getInstance().activiti.commentsApi.addProcessInstanceComment({ message: message }, processInstanceId)
).pipe(
map((response: CommentModel) => {
map((response) => {
return new CommentModel({
id: response.id,
message: response.message,