diff --git a/components/questionnaire/forms/Form_1_Main/index.js b/components/questionnaire/forms/Form_1_Main/index.js index dced84c..1099353 100644 --- a/components/questionnaire/forms/Form_1_Main/index.js +++ b/components/questionnaire/forms/Form_1_Main/index.js @@ -332,7 +332,7 @@ class Form_1_Main extends QuestionnaireForm name="licenses" placeholder="Укажите, если деятельность подлежит лицензированию" onChange={ (event) => { this._removeError("licenses"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } - required={ true } + required={ false } disabled={ checking } defaultValue={ this._checkStrValue(licenses) } /> diff --git a/pages/api/questionnaire/download.js b/pages/api/questionnaire/download.js index 4350937..e331b63 100644 --- a/pages/api/questionnaire/download.js +++ b/pages/api/questionnaire/download.js @@ -169,15 +169,18 @@ export default async function handler(req, res) color: rgb(0.87, 0.87, 0.87), }); - page.drawText(questionnaire[group], { - x: 152, - y: questionnaire[group].length > 500 ? 195 : (questionnaire[group].length > 400) ? 195 : 193, - size: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6, - font: formFont, - color: rgb(0, 0, 0), - maxWidth: 412, - lineHeight: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6, - }); + if(questionnaire[group] !== null) + { + page.drawText(questionnaire[group], { + x: 152, + y: questionnaire[group].length > 500 ? 195 : (questionnaire[group].length > 400) ? 195 : 193, + size: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6, + font: formFont, + color: rgb(0, 0, 0), + maxWidth: 412, + lineHeight: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6, + }); + } } else if(group === "founder_persons") {