diff --git a/app/controllers/working.notes.controller.js b/app/controllers/working.notes.controller.js index 52d6abc..c901d32 100644 --- a/app/controllers/working.notes.controller.js +++ b/app/controllers/working.notes.controller.js @@ -15,7 +15,7 @@ exports.createNotes = async (req, res) => module_name: req.body.module_name, entity_reference: req.body.entity_reference, notes: notes, - sheet_no : value.name, + sheet_no : value.index + 1, user_id: req.body.user_id, createdby: req.body.createdby }; @@ -45,7 +45,8 @@ exports.updateNotes = async (req, res) => 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; 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": {} - } - ] \ No newline at end of file diff --git a/app/routes/routes.js b/app/routes/routes.js index d482488..a303a04 100644 --- a/app/routes/routes.js +++ b/app/routes/routes.js @@ -99,7 +99,7 @@ module.exports = app => { */ router.post("/createNotes", Notescontroller.createNotes); - /** +/** * @swagger * definitions: * updateNotes: @@ -134,8 +134,9 @@ module.exports = app => { * @swagger * /api/updateNotes: * post: -* summary: +* summary: * description: +* requestBody: * content: * application/json: * schema: