merge:GWM
This commit is contained in:
parent
a25a70714a
commit
26a1a9b9ba
@ -130,8 +130,9 @@ exports.FinantialsSummary = async (req, res) => {
|
||||
taskid.then(function(result){
|
||||
formVariable = camundaHelper.financialsFormVariables(result);
|
||||
formVariable.then(function(form_result){
|
||||
camunda_status = JSON.parse(form_result);
|
||||
res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag,status:camunda_status, "summary" : summary } });
|
||||
formVariableResult = JSON.parse(form_result);
|
||||
if(formVariableResult.type){ camunda_status = {"process_status":"NULL"}; } else { camunda_status =JSON.parse(form_result); }
|
||||
res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag , status:camunda_status, "summary" : summary } });
|
||||
});
|
||||
});
|
||||
//res.send({'status':200,'message':"success",'data':{"years" : three_years_data ,"add_new_finyear_flag" : add_new_FY_flag, "summary" : result } });
|
||||
@ -149,8 +150,9 @@ exports.FinantialsSummary = async (req, res) => {
|
||||
taskid.then(function(result){
|
||||
formVariable = camundaHelper.financialsFormVariables(result);
|
||||
formVariable.then(function(form_result){
|
||||
camunda_status = JSON.parse(form_result);
|
||||
res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag,status:camunda_status, "summary" : summary } });
|
||||
formVariableResult = JSON.parse(form_result);
|
||||
if(formVariableResult.type){ camunda_status = {"process_status":"NULL"}; } else { camunda_status =JSON.parse(form_result); }
|
||||
res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag , status:camunda_status, "summary" : summary } });
|
||||
});
|
||||
});
|
||||
//res.send({'status':200,'message':"success",'data':{"years" : four_years_data ,"add_new_finyear_flag" : add_new_FY_flag, "summary" : result } });
|
||||
@ -803,3 +805,4 @@ exports.camunda = async (req, res) => {
|
||||
message: err.message || "Some error occurred while inserting statements." ,'data': "No data"
|
||||
}); }
|
||||
};
|
||||
|
||||
|
||||
@ -8,7 +8,8 @@ module.exports = app => {
|
||||
var router = require("express").Router();
|
||||
|
||||
|
||||
router.get("/camunda", financials.camunda);
|
||||
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/ConsolidatedSummary:
|
||||
|
||||
@ -49,16 +49,12 @@ const URL = process.env.CAMUNDA_URL
|
||||
body: myJSONObject
|
||||
}, function (error, response, body){
|
||||
let data = body;
|
||||
|
||||
if(data.length)
|
||||
task_id = data[0].id;
|
||||
if(task_id)
|
||||
{
|
||||
task_id = data[0].id;
|
||||
resolve(task_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
resolve(false);
|
||||
}
|
||||
else{ resolve(false); }
|
||||
|
||||
});
|
||||
|
||||
@ -75,7 +71,7 @@ const URL = process.env.CAMUNDA_URL
|
||||
{
|
||||
try
|
||||
{
|
||||
const task_complete_url = URL+"task/"+taskid+"/complete";
|
||||
const task_complete_url = URL+"/task/"+taskid+"/complete";
|
||||
const myJSONObject = {"variables":{"review_status":{"value":true}}};
|
||||
request({
|
||||
url: task_complete_url,
|
||||
@ -83,6 +79,7 @@ const URL = process.env.CAMUNDA_URL
|
||||
json: true,
|
||||
body: myJSONObject
|
||||
}, function (error, response, body){
|
||||
|
||||
return body;
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user