-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from AOT-Technologies/feature/update-lob
Added workflow activities section
- Loading branch information
Showing
21 changed files
with
733 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...w_core/microservices/server/src/workflow_activities/dto/create-workflow_activity.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { InputType, Field } from '@nestjs/graphql'; | ||
import { IsNotEmpty, IsNumber, IsString } from 'class-validator'; | ||
|
||
|
||
@InputType() | ||
export class CreateWorkflowActivityInput { | ||
@Field({ nullable: true }) | ||
@IsNumber() | ||
@IsNotEmpty() | ||
caseid: number; | ||
|
||
@Field({ defaultValue: new Date() }) | ||
creationdate: Date; | ||
|
||
@Field({ nullable: true }) | ||
@IsString() | ||
@IsNotEmpty() | ||
userid: string; | ||
|
||
@Field({ nullable: false }) | ||
@IsString() | ||
@IsNotEmpty() | ||
taskid: string; | ||
|
||
@Field({ nullable: true }) | ||
@IsString() | ||
@IsNotEmpty() | ||
taskname: string; | ||
|
||
@Field({ nullable: true }) | ||
@IsString() | ||
@IsNotEmpty() | ||
formurl: string; | ||
|
||
@Field({ nullable: true }) | ||
@IsString() | ||
@Field({ nullable: true }) | ||
status: string; | ||
|
||
@Field({ nullable: true }) | ||
@IsString() | ||
@IsNotEmpty() | ||
selectedform: string; | ||
} |
16 changes: 16 additions & 0 deletions
16
...w_core/microservices/server/src/workflow_activities/dto/update-workflow_activity.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { InputType, Field, Int, PartialType } from '@nestjs/graphql'; | ||
import { IsNotEmpty, IsString } from 'class-validator'; | ||
|
||
@InputType() | ||
export class UpdateWorkflowActivityInput{ | ||
@Field({ nullable: true }) | ||
@IsString() | ||
@IsNotEmpty() | ||
taskid: string; | ||
|
||
@Field({ nullable: true }) | ||
@IsString() | ||
@IsNotEmpty() | ||
status: string; | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
...ow_core/microservices/server/src/workflow_activities/entities/workflow_activity.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
import { ObjectType, Field, ID } from '@nestjs/graphql'; | ||
import { Cases } from 'src/cases/entities/cases.entity'; | ||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn, PrimaryGeneratedColumn } from 'typeorm'; | ||
|
||
@Entity() | ||
@ObjectType() | ||
export class WorkflowActivity { | ||
|
||
@PrimaryGeneratedColumn() | ||
@Field((type) => ID) | ||
id: number; | ||
|
||
@Column({ nullable: true }) | ||
@Field({ nullable: true }) | ||
taskid: string; | ||
|
||
@Column({ nullable: true }) | ||
@Field({ nullable: true }) | ||
caseid: number; | ||
|
||
@Column({ nullable: true }) | ||
@Field() | ||
creationdate: Date; | ||
|
||
@Column({ nullable: true }) | ||
@Field() | ||
userid: string; | ||
|
||
@Column({ nullable: true }) | ||
@Field({ nullable: true }) | ||
taskname: string; | ||
|
||
@Column({ nullable: true }) | ||
@Field({ nullable: true }) | ||
formurl: string; | ||
|
||
@Column({ nullable: true }) | ||
@Field({ nullable: true }) | ||
status: string; | ||
|
||
@Column({ nullable: true }) | ||
@Field({ nullable: true }) | ||
selectedform: string; | ||
|
||
@ManyToOne(() => Cases, (cases) => cases.id) | ||
@Field(() => Cases, { nullable: true }) | ||
@JoinColumn({ name: 'id' }) | ||
case: Cases; | ||
} |
29 changes: 29 additions & 0 deletions
29
...aseflow_core/microservices/server/src/workflow_activities/workflow_activities.resolver.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
import { Resolver, Query, Mutation, Args, Int } from '@nestjs/graphql'; | ||
import { WorkflowActivitiesService } from './workflow_activities.service'; | ||
import { WorkflowActivity } from './entities/workflow_activity.entity'; | ||
import { CreateWorkflowActivityInput } from './dto/create-workflow_activity.input'; | ||
import { UpdateWorkflowActivityInput } from './dto/update-workflow_activity.input'; | ||
|
||
@Resolver(() => WorkflowActivity) | ||
export class WorkflowActivityResolver { | ||
constructor(private readonly workflowActivityService: WorkflowActivitiesService) {} | ||
|
||
@Mutation(() => WorkflowActivity) | ||
createWorkflowActivity(@Args('createWorkflowActivityInput') createWorkflowActivityInput: CreateWorkflowActivityInput) { | ||
return this.workflowActivityService.create(createWorkflowActivityInput); | ||
} | ||
|
||
@Query(() => [WorkflowActivity], { name: 'workflowActivitiesByCaseId' }) | ||
workflowActivitiesByCaseId(@Args('id', { type: () => Int }) id: number) { | ||
return this.workflowActivityService.findByCaseId(id); | ||
} | ||
|
||
@Mutation(() => WorkflowActivity) | ||
updateWorkflowActivity(@Args('updateWorkflowActivityInput') updateWorkflowActivityInput: UpdateWorkflowActivityInput) { | ||
return this.workflowActivityService.update(updateWorkflowActivityInput.taskid, updateWorkflowActivityInput); | ||
} | ||
} | ||
|
||
|
||
|
Oops, something went wrong.