GWM:UpdateNotesApi
This commit is contained in:
parent
05f1395e9d
commit
0ecbb1b756
@ -15,7 +15,7 @@ exports.createNotes = async (req, res) =>
|
|||||||
module_name: req.body.module_name,
|
module_name: req.body.module_name,
|
||||||
entity_reference: req.body.entity_reference,
|
entity_reference: req.body.entity_reference,
|
||||||
notes: notes,
|
notes: notes,
|
||||||
sheet_no : value.name,
|
sheet_no : value.index + 1,
|
||||||
user_id: req.body.user_id,
|
user_id: req.body.user_id,
|
||||||
createdby: req.body.createdby
|
createdby: req.body.createdby
|
||||||
};
|
};
|
||||||
@ -45,7 +45,8 @@ exports.updateNotes = async (req, res) =>
|
|||||||
|
|
||||||
for (const value of req.body.notes)
|
for (const value of req.body.notes)
|
||||||
{
|
{
|
||||||
notesData = await Workingnotes.findOne({where :{losid : req.body.losid , module_name : req.body.module_name, sheet_no : value.name , is_active:1}});
|
sheet_no = value.index + 1;
|
||||||
|
notesData = await Workingnotes.findOne({where :{losid : req.body.losid , module_name : req.body.module_name, sheet_no : sheet_no , is_active:1}});
|
||||||
id = notesData.dataValues.id;
|
id = notesData.dataValues.id;
|
||||||
notes = JSON.stringify(value);
|
notes = JSON.stringify(value);
|
||||||
|
|
||||||
@ -96,233 +97,3 @@ exports.notesList = async (req, res) =>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const myData = [ {
|
|
||||||
"name": "sheet1",
|
|
||||||
"freeze": "A1",
|
|
||||||
"styles": [
|
|
||||||
{
|
|
||||||
"font": {
|
|
||||||
"italic": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#f7ccac"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#f7ccac",
|
|
||||||
"bgcolor": "#93d051"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#7030a0",
|
|
||||||
"bgcolor": "#93d051"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"merges": [],
|
|
||||||
"rows": {
|
|
||||||
"0": {
|
|
||||||
"cells": {
|
|
||||||
"0": {
|
|
||||||
"text": "ddsd"
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"text": "fdfdf",
|
|
||||||
"style": 0
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
"text": "ddd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"cells": {
|
|
||||||
"6": {
|
|
||||||
"text": "dfdfd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
"cells": {
|
|
||||||
"4": {
|
|
||||||
"text": "dfdf"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"4": {
|
|
||||||
"cells": {
|
|
||||||
"6": {
|
|
||||||
"text": "dfd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"5": {
|
|
||||||
"cells": {
|
|
||||||
"3": {
|
|
||||||
"text": "dfddf"
|
|
||||||
},
|
|
||||||
"5": {
|
|
||||||
"text": "df"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"6": {
|
|
||||||
"cells": {
|
|
||||||
"8": {
|
|
||||||
"text": "dfdf"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"9": {
|
|
||||||
"cells": {
|
|
||||||
"2": {
|
|
||||||
"text": "dfdf"
|
|
||||||
},
|
|
||||||
"6": {
|
|
||||||
"text": "dfdf",
|
|
||||||
"style": 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"10": {
|
|
||||||
"cells": {
|
|
||||||
"4": {
|
|
||||||
"text": "ddsd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"11": {
|
|
||||||
"cells": {
|
|
||||||
"3": {
|
|
||||||
"text": "fff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"12": {
|
|
||||||
"cells": {
|
|
||||||
"1": {
|
|
||||||
"text": "dfdf"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"len": 100
|
|
||||||
},
|
|
||||||
"cols": {
|
|
||||||
"len": 26
|
|
||||||
},
|
|
||||||
"validations": [],
|
|
||||||
"autofilter": {}
|
|
||||||
},{
|
|
||||||
"name": "sheet2",
|
|
||||||
"freeze": "A1",
|
|
||||||
"styles": [
|
|
||||||
{
|
|
||||||
"font": {
|
|
||||||
"italic": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#f7ccac"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#f7ccac",
|
|
||||||
"bgcolor": "#93d051"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#7030a0",
|
|
||||||
"bgcolor": "#93d051"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"merges": [],
|
|
||||||
"rows": {
|
|
||||||
"0": {
|
|
||||||
"cells": {
|
|
||||||
"0": {
|
|
||||||
"text": "123"
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"text": "123",
|
|
||||||
"style": 0
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
"text": "123"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"cells": {
|
|
||||||
"6": {
|
|
||||||
"text": "dfdfd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
"cells": {
|
|
||||||
"4": {
|
|
||||||
"text": "dfdf"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"4": {
|
|
||||||
"cells": {
|
|
||||||
"6": {
|
|
||||||
"text": "dfd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"5": {
|
|
||||||
"cells": {
|
|
||||||
"3": {
|
|
||||||
"text": "dfddf"
|
|
||||||
},
|
|
||||||
"5": {
|
|
||||||
"text": "df"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"6": {
|
|
||||||
"cells": {
|
|
||||||
"8": {
|
|
||||||
"text": "dfdf"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"9": {
|
|
||||||
"cells": {
|
|
||||||
"2": {
|
|
||||||
"text": "dfdf"
|
|
||||||
},
|
|
||||||
"6": {
|
|
||||||
"text": "dfdf",
|
|
||||||
"style": 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"10": {
|
|
||||||
"cells": {
|
|
||||||
"4": {
|
|
||||||
"text": "ddsd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"11": {
|
|
||||||
"cells": {
|
|
||||||
"3": {
|
|
||||||
"text": "fff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"12": {
|
|
||||||
"cells": {
|
|
||||||
"1": {
|
|
||||||
"text": "dfdf"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"len": 100
|
|
||||||
},
|
|
||||||
"cols": {
|
|
||||||
"len": 26
|
|
||||||
},
|
|
||||||
"validations": [],
|
|
||||||
"autofilter": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@ -99,7 +99,7 @@ module.exports = app => {
|
|||||||
*/
|
*/
|
||||||
router.post("/createNotes", Notescontroller.createNotes);
|
router.post("/createNotes", Notescontroller.createNotes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
* definitions:
|
* definitions:
|
||||||
* updateNotes:
|
* updateNotes:
|
||||||
@ -134,8 +134,9 @@ module.exports = app => {
|
|||||||
* @swagger
|
* @swagger
|
||||||
* /api/updateNotes:
|
* /api/updateNotes:
|
||||||
* post:
|
* post:
|
||||||
* summary:
|
* summary:
|
||||||
* description:
|
* description:
|
||||||
|
* requestBody:
|
||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user