Skip to content

Commit

Permalink
Feature(402686):names changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GowthamKumarMVS committed Dec 24, 2024
1 parent 2d9dd3d commit 3c6835c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class WorkflowDiagramComponent implements AfterViewInit {
fieldDetails: newNode.fieldDetails,
fieldOptionDetails : newNode.fieldOptionDetails
};
this.workflowService.updateDiagramData(newNode.chatWorkflowId, newNode.id, workBody).then((result) => {
this.workflowService.updateRule(newNode.chatWorkflowId, newNode.id, workBody).then((result) => {
console.log(result.message);
this.diagram.setProperties({ nodes: [], connectors: [] }, true);
this.diagram.refresh();
Expand All @@ -236,7 +236,7 @@ export class WorkflowDiagramComponent implements AfterViewInit {
public onDeleteNode(nodeObject) : void{
let ruleData : RuleData2 = nodeObject.data as RuleData2;
const index = this.diagram.nodes.findIndex(node => (node.data as RuleData2).successRuleId === ruleData.id);
this.workflowService.deleteDiagramData(ruleData.id).then((result) => {
this.workflowService.deleteRule(ruleData.id).then((result) => {
console.log(result.message);
this.diagram.setProperties({ nodes: [], connectors: [] }, true);
this.diagram.refresh();
Expand Down
4 changes: 2 additions & 2 deletions src/app/services/workflow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class WorkflowService {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};

updateDiagramData(workflowId :number , ruleId: number, body : ChatWorkflowRulesData2) : Promise<{ message: string }> {
updateRule(workflowId :number , ruleId: number, body : ChatWorkflowRulesData2) : Promise<{ message: string }> {
const url = WorkflowApiPaths.updateWorkflowRules
.replace('{baseUrl}', this.baseUrl)
.replace('{workflowId}', workflowId.toString())
Expand All @@ -24,7 +24,7 @@ export class WorkflowService {
return this.http.put<{ message: string }>(url, body, this.httpOptions).toPromise();
}

deleteDiagramData(ruleId: number): Promise<{ message: string }> {
deleteRule(ruleId: number): Promise<{ message: string }> {
const url = WorkflowApiPaths.updateWorkflowRules
.replace('{baseUrl}', this.baseUrl)
.replace('{ruleId}', ruleId.toString());
Expand Down

0 comments on commit 3c6835c

Please sign in to comment.