TASK 2024-02-08 : remove from questionnaire assignment_date, credentials_dateend from head person form
This commit is contained in:
parent
44d316cafc
commit
09fa505fbe
@ -157,9 +157,13 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
fias_id: "",
|
||||
}
|
||||
},
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
assignment_date: "",
|
||||
credentials_dateend: "",
|
||||
indefinite: false,
|
||||
*/
|
||||
},
|
||||
signatory_person: {
|
||||
not_head_person: false,
|
||||
@ -228,10 +232,13 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
componentDidMount()
|
||||
{
|
||||
const { main, signatory_person } = this.state;
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
if( main.inn !== null && main.inn.length === 12)
|
||||
{
|
||||
this._handle_onCheckboxFieldChange("head_person.indefinite", true);
|
||||
}
|
||||
*/
|
||||
|
||||
if(signatory_person.lastname !== null || signatory_person.lastname !== undefined || signatory_person.lastname !== "")
|
||||
{
|
||||
@ -285,6 +292,8 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
_handle_onIndefiniteChange = () =>
|
||||
{
|
||||
const { head_person } = this.state;
|
||||
@ -300,6 +309,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
_handle_onChangeDelegationAgreement = () =>
|
||||
{
|
||||
@ -407,7 +417,11 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
"identity_document.placebirth",
|
||||
"identity_document.citizenship_code",
|
||||
"identity_document.registration_address.name",
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
"assignment_date",
|
||||
*/
|
||||
];
|
||||
|
||||
if(parseInt(_get(head_person, "identity_document.doctype"), 10) === 100000000)
|
||||
@ -426,6 +440,9 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
if(head_person.assignment_date !== undefined && head_person.assignment_date !== null && head_person.assignment_date !== "")
|
||||
{
|
||||
try
|
||||
@ -473,6 +490,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(head_person.telephone === "" || head_person.telephone === null || isNaN(parseInt(head_person.telephone.replace(/[^\d]+/g, ''), 10)) || parseInt(head_person.telephone.replace(/[^\d]+/g, ''), 10).toString().length < 11)
|
||||
{
|
||||
@ -906,6 +924,9 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/*}
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
{ errors.indexOf("head_person.assignment_date_invalid") > -1 &&
|
||||
(
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, укажите прошедшую дату."/>
|
||||
@ -938,6 +959,8 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
*/}
|
||||
{/*}
|
||||
{ !head_person.indefinite && (
|
||||
<React.Fragment>
|
||||
{ errors.indexOf("head_person.credentials_dateend_invalid") > -1 &&
|
||||
@ -962,6 +985,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
</div>
|
||||
</React.Fragment>
|
||||
) }
|
||||
{*/}
|
||||
|
||||
{ errors.indexOf("head_person_files") > -1 &&
|
||||
(
|
||||
|
||||
BIN
lib/evo_anketa_v2_empty_licenses_20240208.pdf
Normal file
BIN
lib/evo_anketa_v2_empty_licenses_20240208.pdf
Normal file
Binary file not shown.
@ -52,9 +52,13 @@ const fields = {
|
||||
head_person: {
|
||||
fullname: { name: "head_fullname", type: "text", bind: null },
|
||||
jobtitle: { name: "head_jobtitle", type: "text", bind: null },
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
assignment_date: { name: "head_date", type: "text", bind: null, date: true },
|
||||
credentials_dateend: { name: "head_dateend", type: "text", bind: null, date: true },
|
||||
indefinite: { name: "head_date_infinite", type: "checkbox", bind: null },
|
||||
*/
|
||||
telephone: { name: "head_phone", type: "text", bind: null },
|
||||
email: { name: "head_email", type: "text", bind: null },
|
||||
},
|
||||
@ -143,7 +147,7 @@ export default async function handler(req, res)
|
||||
var crm_jwt = jwt.sign({ acc_number: client_jwt_decoded.acc_number }, process.env.JWT_SECRET_CRM, { noTimestamp: true });
|
||||
|
||||
console.log("API", "download", "__dirname", __dirname);
|
||||
const formPdfBytes = fs.readFileSync(`${ __dirname }/../../../../../lib/evo_anketa_v2_empty_licenses.pdf`);
|
||||
const formPdfBytes = fs.readFileSync(`${ __dirname }/../../../../../lib/evo_anketa_v2_empty_licenses_20240208.pdf`);
|
||||
const fontBytes = fs.readFileSync(`${ __dirname }/../../../../../lib/ubuntu_mono_regular.ttf`);
|
||||
|
||||
const pdfDoc = await PDFDocument.load(formPdfBytes);
|
||||
@ -298,6 +302,9 @@ export default async function handler(req, res)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
if(group === "head_person")
|
||||
{
|
||||
if(field === "credentials_dateend")
|
||||
@ -308,6 +315,15 @@ export default async function handler(req, res)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(group === "head_person")
|
||||
{
|
||||
if(field === "assignment_date" || field === "credentials_dateend" || field === "indefinite")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(field === "fullname")
|
||||
{
|
||||
|
||||
@ -161,8 +161,14 @@ export default async function handler(req, res)
|
||||
payload.head_person.identity_document.citizenship_code = payload.head_person.identity_document.citizenship.code.toString();
|
||||
payload.head_person.telephone = checkNullEmpty(payload.head_person.telephone) ? payload.head_person.telephone.replace(/[^0-9]/g, '') : null;
|
||||
payload.head_person.identity_document.issuedate = checkNullEmpty(payload.head_person.identity_document.issuedate) ? moment(payload.head_person.identity_document.issuedate).format("YYYY-MM-DD") : null;
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
payload.head_person.assignment_date = checkNullEmpty(payload.head_person.assignment_date) ? moment(payload.head_person.assignment_date).format("YYYY-MM-DD") : null;
|
||||
payload.head_person.credentials_dateend = checkNullEmpty(payload.head_person.credentials_dateend) ? moment(payload.head_person.credentials_dateend).format("YYYY-MM-DD") : null;
|
||||
*/
|
||||
payload.head_person.assignment_date = null;
|
||||
payload.head_person.credentials_dateend = null;
|
||||
|
||||
if(payload.signatory_person.not_head_person)
|
||||
{
|
||||
@ -178,15 +184,25 @@ export default async function handler(req, res)
|
||||
else
|
||||
{
|
||||
payload.signatory_person = { ...payload.signatory_person, ..._pick(payload.head_person, [
|
||||
"lastname", "firstname", "middlename", "no_middle_name", "jobtitle", "telephone", "email", "identity_document", "assignment_date", "credentials_dateend", "indefinite",
|
||||
"lastname", "firstname", "middlename", "no_middle_name", "jobtitle", "telephone", "email", "identity_document",
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
"assignment_date", "credentials_dateend", "indefinite",
|
||||
*/
|
||||
]) };
|
||||
}
|
||||
payload.signatory_person.identity_document.citizenship_code = payload.signatory_person.identity_document.citizenship.code.toString();
|
||||
payload.signatory_person.telephone = checkNullEmpty(payload.signatory_person.telephone) ? payload.signatory_person.telephone.replace(/[^0-9]/g, '') : null;
|
||||
payload.signatory_person.identity_document.issuedate = checkNullEmpty(payload.signatory_person.identity_document.issuedate) ? moment(payload.signatory_person.identity_document.issuedate).format("YYYY-MM-DD") : null;
|
||||
payload.signatory_person.docdate = checkNullEmpty(payload.signatory_person.docdate) ? moment(payload.signatory_person.docdate).format("YYYY-MM-DD") : null;
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
payload.signatory_person.assignment_date = checkNullEmpty(payload.signatory_person.assignment_date) ? moment(payload.signatory_person.assignment_date).format("YYYY-MM-DD") : null;
|
||||
payload.signatory_person.credentials_dateend = checkNullEmpty(payload.signatory_person.credentials_dateend) ? moment(payload.signatory_person.credentials_dateend).format("YYYY-MM-DD") : null;
|
||||
*/
|
||||
|
||||
payload.signatory_person.birthdate = checkNullEmpty(payload.signatory_person.birthdate) ? moment(payload.signatory_person.birthdate).format("YYYY-MM-DD") : null;
|
||||
|
||||
const founder_persons = parsed.founder_persons;
|
||||
|
||||
@ -74,9 +74,13 @@ export const questionnaire_template = {
|
||||
fias_id: null,
|
||||
}
|
||||
},
|
||||
/*
|
||||
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
|
||||
|
||||
assignment_date: null,
|
||||
credentials_dateend: null,
|
||||
indefinite: false,
|
||||
*/
|
||||
},
|
||||
head_person_files: [],
|
||||
signatory_person: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user