From 7f54a7f12a338af993e11740bde453ef3b08cb60 Mon Sep 17 00:00:00 2001 From: shoaibalmasi Date: Fri, 26 Mar 2021 01:59:54 +0430 Subject: [PATCH] add validation --- routes/users.js | 93 +++++++++++++++++++++++++++---------------- services/user.js | 24 +++++++++-- template/Hform4.docx | Bin 26244 -> 26689 bytes tools/docxtemp.js | 17 ++++++-- 4 files changed, 91 insertions(+), 43 deletions(-) diff --git a/routes/users.js b/routes/users.js index 1596941..0c69320 100644 --- a/routes/users.js +++ b/routes/users.js @@ -6,46 +6,68 @@ var path = require('path'); router.post('/add', function (req, res) { + let flag = false; + let emptyFieldsArray =[] const userInfo = { - firstName: req.body.firstName, - lastName: req.body.lastName, - fatherName: req.body.fatherName, - codeMelli: req.body.codeMelli, - workUnit: req.body.workUnit, - workUnitCode: req.body.workUnitCode, - address: req.body.address, - obligationNumber: req.body.obligationNumber, - obligationDate: req.body.obligationDate, - requestNumber: req.body.requestNumber, - requestDate: req.body.requestDate, - writtenOrderNumber: req.body.writtenOrderNumber, - writtenOrderDate: req.body.writtenOrderDate, - deadline: req.body.deadline + firstName: req.body.firstName.trim(), + lastName: req.body.lastName.trim(), + fatherName: req.body.fatherName.trim(), + codeMelli: req.body.codeMelli.trim(), + workUnit: req.body.workUnit.trim(), + workUnitCode: req.body.workUnitCode.trim(), + address: req.body.address.trim(), + obligationNumber: req.body.obligationNumber.trim(), + obligationDate: req.body.obligationDate.trim(), + requestNumber: req.body.requestNumber.trim(), + requestDate: req.body.requestDate.trim(), + writtenOrderNumber: req.body.writtenOrderNumber.trim(), + writtenOrderDate: req.body.writtenOrderDate.trim(), + deadline: req.body.deadline.trim(), + deadlineUnit: req.body.deadlineUnit.trim(), + healthCenter: req.body.healthCenter.trim(), + healthCenterCity: req.body.healthCenterCity.trim() } - userServeice.addUser(userInfo) - .then((result) => { - res.status(200).send({ - success: true, - user: result - }) + for (const key in userInfo) { + if (!userInfo[key] || !userInfo[key].trim()) { + emptyFieldsArray.push(key) + flag = true + + } + } + + if(flag){ + res.status(406).send({ + success: false, + emptyFields : emptyFieldsArray, + error: `پر کردن همه فیلدها الزامی است` }) - .catch(err => { - if (err.eText) { - if (typeof err.eText !== 'string') { - err.eText = err.eText.toString() - } - res.status(err.eCode).send({ - success: false, - error: err.eText + }else { + userServeice.addUser(userInfo) + .then((result) => { + res.status(200).send({ + success: true, + user: result }) - } else { - res.status(500).send({ - success: false, - error: err.toString() - }) - } + }) + .catch(err => { + if (err.eText) { + if (typeof err.eText !== 'string') { + err.eText = err.eText.toString() + } + res.status(err.eCode).send({ + success: false, + error: err.eText + }) + } else { + res.status(500).send({ + success: false, + error: err.toString() + }) + } + + }) + } - }) }); router.post('/complete/form', function (req, res) { @@ -57,6 +79,7 @@ router.post('/complete/form', function (req, res) { }) }) .catch(err => { + console.log(err); if (err.eText) { if (typeof err.eText !== 'string') { err.eText = err.eText.toString() diff --git a/services/user.js b/services/user.js index 18a4c34..e63df25 100644 --- a/services/user.js +++ b/services/user.js @@ -1,5 +1,6 @@ const models = require('../models') const jalali = require("jalali-moment"); +const persianjs = require('persianjs') const docxTemp = require('../tools/docxtemp') @@ -56,11 +57,26 @@ methods.completeForm =(userId)=>{ .then(user=>{ let userInfo = user + userInfo.fullName = user.firstName + ' ' + user.lastName - userInfo.deadlineAndUnit = user.deadline + ' ' + user.deadlineUnit - userInfo.obligationDate = jalali( user.obligationDate, 'YYYY/MM/DD').locale('fa').format('YYYY/MM/DD') - userInfo.requestDate = jalali( user.requestDate, 'YYYY/MM/DD').locale('fa').format('YYYY/MM/DD') - userInfo.writtenOrderDate = jalali( user.writtenOrderDate, 'YYYY/MM/DD').locale('fa').format('YYYY/MM/DD') + + userInfo.codeMelli = persianjs(user.codeMelli).englishNumber().toString(); + userInfo.workUnitCode = persianJs(user.workUnitCode).englishNumber().toString(); + userInfo.obligationNumber = persianJs(user.obligationNumber).englishNumber().toString(); + userInfo.requestNumber = persianJs(user.requestNumber).englishNumber().toString(); + userInfo.writtenOrderNumber = persianJs(user.writtenOrderNumber).englishNumber().toString(); + userInfo.deadline = persianJs(user.deadline).englishNumber().toString(); + + userInfo.deadlineAndUnit = userInfo.deadline + ' ' + userInfo.deadlineUnit + + userInfo.obligationDate = jalali( user.obligationDate, 'YYYY/MM/DD').locale('fa').format('DD/MM/YYYY') + userInfo.requestDate = jalali( user.requestDate, 'YYYY/MM/DD').locale('fa').format('DD/MM/YYYY') + userInfo.writtenOrderDate = jalali( user.writtenOrderDate, 'YYYY/MM/DD').locale('fa').format('DD/MM/YYYY') + userInfo.obligationDate = persianJs(user.obligationDate).englishNumber().toString(); + userInfo.requestDate = persianJs(user.requestDate).englishNumber().toString(); + userInfo.writtenOrderDate = persianJs(user.writtenOrderDate).englishNumber().toString(); + + return docxTemp(userInfo, userInfo.fileName) }).then(link=>{ diff --git a/template/Hform4.docx b/template/Hform4.docx index 05b3012cf792d7619047649c8040e501120edec1..e312d0796811e07541b9430343ff0d40fdacdfdd 100644 GIT binary patch delta 14596 zcmZ9zb8sa<(>EI18*Xgd8{4*>Y;5Di_KBTrY@OJ)oosA7*=+Fb^VGff{qEcI&(u^; z&s23a=Qp9#;Qe#p^+oUqvAIKpKol@AY&&2zJT5?2&vjEAGr%hRt6<*OW<9NLG4u}P zMnk%Yy}i2d13R_Z6x8w!m&n-1B;yl-NP0||J%~-rd)HI?Xx3>)wx?8cDMJ@!Fr?=9 z^7Z!C}Bf#l!Z6eZT$Mm{3tGA>A!5!IB_j<4P?QHN`QA5K|L?5^|RnmFR`m~Jt zybS={JhwTpnVl+Y(FhMbU6{?TX~2qlJ?YPI!z_`0GLEwGJm?s0v1I_wK6)(XwlbXA zwdU@#7`$`vmR?MHu$`rbw9H&)ENrHJF?C(CU!#F*1Z23v0XQB#0z0Hamz(V52q5ii z_(=ynmPtJ?Sfg@jNeEOEz=jjX;qolEe*&cW(gJf>M=OwVGcHgW97jgnEBYtM zqLR#%-r~Budh$>d3A%_n0QcDwhFocLc(yTMx;gV`~?^(N@7g_)381Ce;y3PQ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|IXrKO`0$x!TmqPz7q%t@xMp^ zz3KBOL7DS_U??Vune&4Ys{Dh!Nmcx$5_2Tn|3bWje<5oB7K8c!B$2BnEtrdfn5idW zSdjit { + for (const key in templateInfo) { + if (!templateInfo[key]) { + throw({ + eCode: 406, + eText: 'empty fields' + }) + } + } let content = fs.readFileSync(path.resolve(__dirname, `../template/${fileName}`), 'binary'); let zip = new PizZip(content); let doc; @@ -39,10 +47,11 @@ module.exports = function (userInfo, fileName) { try { doc = new Docxtemplater(zip); } catch (error) { + errorHandler(error); } - doc.setData(userInfo); + doc.setData(templateInfo); try { doc.render() @@ -53,8 +62,8 @@ module.exports = function (userInfo, fileName) { let buf = doc.getZip().generate({ type: 'nodebuffer' }); - fs.writeFileSync(path.resolve(__dirname, `../public/files/${userInfo.firstName}-${userInfo.lastName}-${fileName}`), buf); - resolve(`http://localhost:3000/users/download/${userInfo.firstName}-${userInfo.lastName}-${fileName}`) + fs.writeFileSync(path.resolve(__dirname, `../public/files/${templateInfo.firstName}-${templateInfo.lastName}-${fileName}`), buf); + resolve(`http://localhost:3000/users/download/${templateInfo.firstName}-${templateInfo.lastName}-${fileName}`) .catch(err => { reject({