diff --git a/actions/questionnaireActions.js b/actions/questionnaireActions.js index ede9d08..989aa21 100644 --- a/actions/questionnaireActions.js +++ b/actions/questionnaireActions.js @@ -74,13 +74,13 @@ export const getQuestionnaire = ({ dispatch, id }) => seria: "", docnumber: "", issuedate: "", - icode: "", + code: "", issueby: "", issueby_search_dadata: "", placebirth: "", citizenship: { - title: "", - code: "", + title: getCitizenshipTitleByCode(643), + code: 643, }, registration_address: { title: "", @@ -95,13 +95,13 @@ export const getQuestionnaire = ({ dispatch, id }) => seria: "", docnumber: "", issuedate: "", - icode: "", + code: "", issueby: "", issueby_search_dadata: "", placebirth: "", citizenship: { - title: "", - code: "", + title: getCitizenshipTitleByCode(643), + code: 643, }, registration_address: { title: "", @@ -129,7 +129,7 @@ export const getQuestionnaire = ({ dispatch, id }) => questionnaire.head_person = { ...questionnaire.head_person, ...response.data.head_person }; if(questionnaire.head_person.identity_document === null) { - questionnaire.head_person.identity_document = head_person_identity_document; + questionnaire.head_person.identity_document = JSON.parse(JSON.stringify(identity_document_template)); } questionnaire.head_person.identity_document.citizenship = { @@ -141,7 +141,7 @@ export const getQuestionnaire = ({ dispatch, id }) => questionnaire.signatory_person = { ...questionnaire.signatory_person, ...response.data.signatory_person }; if(questionnaire.signatory_person.identity_document === null) { - questionnaire.signatory_person.identity_document = signatory_person_identity_document; + questionnaire.signatory_person.identity_document = JSON.parse(JSON.stringify(identity_document_template)); } questionnaire.signatory_person.identity_document.citizenship = { @@ -163,7 +163,7 @@ export const getQuestionnaire = ({ dispatch, id }) => } else { - questionnaire.founder_persons[i].identity_document = { ...founder_persons_template.identity_document }; + questionnaire.founder_persons[i].identity_document = JSON.parse(JSON.stringify(identity_document_template)); } } } @@ -182,7 +182,7 @@ export const getQuestionnaire = ({ dispatch, id }) => } else { - questionnaire.client_contacts[i].identity_document = { ...founder_persons_template.identity_document }; + questionnaire.client_contacts[i].identity_document = JSON.parse(JSON.stringify(identity_document_template)); } } } diff --git a/components/questionnaire/forms/Form_4_Shareholders/index.js b/components/questionnaire/forms/Form_4_Shareholders/index.js index 79a249b..d6314ca 100644 --- a/components/questionnaire/forms/Form_4_Shareholders/index.js +++ b/components/questionnaire/forms/Form_4_Shareholders/index.js @@ -807,6 +807,11 @@ class Form_4_Shareholders extends QuestionnaireForm const { checking } = this.props; const { founder_persons, client_contacts, loading, address, status, errors, } = this.state; + if(errors.length > 0) + { + console.error(errors); + } + return (
{if (e.key === 'Enter') e.preventDefault() }} className={`questionnaire questionnaire_4 ${ checking && "disabled" }`}>

4. Сведения об участниках (акционерах) и бенефициарных владельцах

diff --git a/pages/api/questionnaire/download.js b/pages/api/questionnaire/download.js index e9389c8..aa6a272 100644 --- a/pages/api/questionnaire/download.js +++ b/pages/api/questionnaire/download.js @@ -140,9 +140,9 @@ export default async function handler(req, res) const pdfDoc = await PDFDocument.load(formPdfBytes); pdfDoc.registerFontkit(fontkit); const formFont = await pdfDoc.embedFont(fontBytes); - + const form = pdfDoc.getForm(); - + for(let group in fields) { if(group === "founder_persons") @@ -223,7 +223,7 @@ export default async function handler(req, res) { if(group === "main") { - if(!questionnaire[group].is_individual_executive) + if(!questionnaire.signatory_person.delegation_agreement) { const r = ["individual_executive_oop", "individual_executive_inn", "individual_executive_kpp", "individual_executive_docnum", "individual_executive_docdate"]; if(r.indexOf(field) > -1) { continue; } diff --git a/pages/api/questionnaire/send.js b/pages/api/questionnaire/send.js index a573970..c78d760 100644 --- a/pages/api/questionnaire/send.js +++ b/pages/api/questionnaire/send.js @@ -243,13 +243,11 @@ export default async function handler(req, res) //console.log(parsed.head_person_files[i]); files_to_send.push({ ...parsed.head_person_files[i], ...{ number: 1, } }) } - /* for(let i in parsed.delegation_files) { - console.log(parsed.delegation_files[i]); - files_to_send.push({ ...parsed.delegation_files[i], ...{ number: 1, } }) + console.log(parsed.delegation_files[i]) + files_to_send.push({ ...parsed.delegation_files[i], ...{ number: 166, } }) } - */ for(let i in parsed.signatory_person_files) { //console.log(parsed.signatory_person_files[i]);