update for client questionnaire: add birthdate, place_of_birth to PDF generation, fix doctype for personal data
This commit is contained in:
parent
1a4d6ce64b
commit
cbf09433d1
@ -68,6 +68,7 @@ export const getQuestionnaire = ({ dispatch, id }) =>
|
|||||||
founder_number: 0,
|
founder_number: 0,
|
||||||
founder_part: "",
|
founder_part: "",
|
||||||
is_beneficial: false,
|
is_beneficial: false,
|
||||||
|
birthdate: "",
|
||||||
identity_document:
|
identity_document:
|
||||||
{
|
{
|
||||||
doctype: "",
|
doctype: "",
|
||||||
@ -165,6 +166,11 @@ export const getQuestionnaire = ({ dispatch, id }) =>
|
|||||||
{
|
{
|
||||||
questionnaire.founder_persons[i].identity_document = JSON.parse(JSON.stringify(identity_document_template));
|
questionnaire.founder_persons[i].identity_document = JSON.parse(JSON.stringify(identity_document_template));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(questionnaire.founder_persons[i].birthdate === null)
|
||||||
|
{
|
||||||
|
questionnaire.founder_persons[i].birthdate = moment().subtract(18, 'years').toDate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,6 +190,11 @@ export const getQuestionnaire = ({ dispatch, id }) =>
|
|||||||
{
|
{
|
||||||
questionnaire.client_contacts[i].identity_document = JSON.parse(JSON.stringify(identity_document_template));
|
questionnaire.client_contacts[i].identity_document = JSON.parse(JSON.stringify(identity_document_template));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(questionnaire.client_contacts[i].birthdate === null)
|
||||||
|
{
|
||||||
|
questionnaire.client_contacts[i].birthdate = moment().subtract(18, 'years').toDate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -739,10 +739,10 @@ class Form_3_Signer extends QuestionnaireForm
|
|||||||
|
|
||||||
<div className="formgroup">
|
<div className="formgroup">
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<label>Серия паспорта <sup className="required_label">*</sup></label>
|
<label>Серия { parseInt(head_person.identity_document.doctype, 10) === 100000002 ? "ВНЖ" : "паспорта" } <sup className="required_label">*</sup></label>
|
||||||
<InputMask
|
<InputMask
|
||||||
className={ errors.indexOf("head_person.identity_document.seria") > -1 ? "error" : "" }
|
className={ errors.indexOf("head_person.identity_document.seria") > -1 ? "error" : "" }
|
||||||
mask='9999'
|
mask={ parseInt(head_person.identity_document.doctype, 10) === 100000000 ? "9999" : parseInt(head_person.identity_document.doctype, 10) === 100000002 ? "99" : undefined }
|
||||||
id="head_person.identity_document.seria"
|
id="head_person.identity_document.seria"
|
||||||
name="head_person.identity_document.seria"
|
name="head_person.identity_document.seria"
|
||||||
value={ this._checkStrValue(head_person.identity_document.seria) }
|
value={ this._checkStrValue(head_person.identity_document.seria) }
|
||||||
@ -753,10 +753,10 @@ class Form_3_Signer extends QuestionnaireForm
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<label>Номер паспорта <sup className="required_label">*</sup></label>
|
<label>Номер { parseInt(head_person.identity_document.doctype, 10) === 100000002 ? "ВНЖ" : "паспорта" } <sup className="required_label">*</sup></label>
|
||||||
<InputMask
|
<InputMask
|
||||||
className={ errors.indexOf("head_person.identity_document.docnumber") > -1 ? "error" : "" }
|
className={ errors.indexOf("head_person.identity_document.docnumber") > -1 ? "error" : "" }
|
||||||
mask='999999'
|
mask={ parseInt(head_person.identity_document.doctype, 10) === 100000000 ? "999999" : parseInt(head_person.identity_document.doctype, 10) === 100000002 ? "9999999" : undefined }
|
||||||
id="head_person.identity_document.docnumber"
|
id="head_person.identity_document.docnumber"
|
||||||
name="head_person.identity_document.docnumber"
|
name="head_person.identity_document.docnumber"
|
||||||
value={ this._checkStrValue(head_person.identity_document.docnumber) }
|
value={ this._checkStrValue(head_person.identity_document.docnumber) }
|
||||||
@ -1243,10 +1243,10 @@ class Form_3_Signer extends QuestionnaireForm
|
|||||||
|
|
||||||
<div className="formgroup">
|
<div className="formgroup">
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<label>Серия паспорта <sup className="required_label">*</sup></label>
|
<label>Серия { parseInt(signatory_person.identity_document.doctype, 10) === 100000002 ? "ВНЖ" : "паспорта" } <sup className="required_label">*</sup></label>
|
||||||
<InputMask
|
<InputMask
|
||||||
className={ errors.indexOf("signatory_person.identity_document.seria") > -1 ? "error" : "" }
|
className={ errors.indexOf("signatory_person.identity_document.seria") > -1 ? "error" : "" }
|
||||||
mask='9999'
|
mask={ parseInt(signatory_person.identity_document.doctype, 10) === 100000000 ? "9999" : parseInt(signatory_person.identity_document.doctype, 10) === 100000002 ? "99" : undefined }
|
||||||
id="signatory_person.identity_document.seria"
|
id="signatory_person.identity_document.seria"
|
||||||
name="signatory_person.identity_document.seria"
|
name="signatory_person.identity_document.seria"
|
||||||
value={ this._checkStrValue(signatory_person.identity_document.seria) }
|
value={ this._checkStrValue(signatory_person.identity_document.seria) }
|
||||||
@ -1258,10 +1258,10 @@ class Form_3_Signer extends QuestionnaireForm
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<label>Номер паспорта <sup className="required_label">*</sup></label>
|
<label>Номер { parseInt(signatory_person.identity_document.doctype, 10) === 100000002 ? "ВНЖ" : "паспорта" } <sup className="required_label">*</sup></label>
|
||||||
<InputMask
|
<InputMask
|
||||||
className={ errors.indexOf("signatory_person.identity_document.docnumber") > -1 ? "error" : "" }
|
className={ errors.indexOf("signatory_person.identity_document.docnumber") > -1 ? "error" : "" }
|
||||||
mask='999999'
|
mask={ parseInt(signatory_person.identity_document.doctype, 10) === 100000000 ? "999999" : parseInt(signatory_person.identity_document.doctype, 10) === 100000002 ? "9999999" : undefined }
|
||||||
id="signatory_person.identity_document.docnumber"
|
id="signatory_person.identity_document.docnumber"
|
||||||
name="signatory_person.identity_document.docnumber"
|
name="signatory_person.identity_document.docnumber"
|
||||||
value={ this._checkStrValue(signatory_person.identity_document.docnumber) }
|
value={ this._checkStrValue(signatory_person.identity_document.docnumber) }
|
||||||
@ -1289,21 +1289,23 @@ class Form_3_Signer extends QuestionnaireForm
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form_field">
|
{ parseInt(signatory_person.identity_document.doctype, 10) === 100000000 && (
|
||||||
<label>Код подразделения <sup className="required_label">*</sup></label>
|
<div className="form_field">
|
||||||
<DocumentIssuerSuggestsInput
|
<label>Код подразделения <sup className="required_label">*</sup></label>
|
||||||
className={ errors.indexOf("signatory_person.identity_document.code") > -1 ? "error" : "" }
|
<DocumentIssuerSuggestsInput
|
||||||
type="issuer"
|
className={ errors.indexOf("signatory_person.identity_document.code") > -1 ? "error" : "" }
|
||||||
id="signatory_person.identity_document.code"
|
type="issuer"
|
||||||
name="signatory_person.identity_document.code"
|
id="signatory_person.identity_document.code"
|
||||||
value={ this._checkStrValue(signatory_person.identity_document.code) }
|
name="signatory_person.identity_document.code"
|
||||||
placeholder="Введите код"
|
value={ this._checkStrValue(signatory_person.identity_document.code) }
|
||||||
onChange={ (value) => { this._removeError("signatory_person.identity_document.code"); this._handle_onIssuerCodeChange("signatory_person", value); } }
|
placeholder="Введите код"
|
||||||
maxResults={ 5 }
|
onChange={ (value) => { this._removeError("signatory_person.identity_document.code"); this._handle_onIssuerCodeChange("signatory_person", value); } }
|
||||||
required={ true }
|
maxResults={ 5 }
|
||||||
disabled={ checking }
|
required={ true }
|
||||||
/>
|
disabled={ checking }
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
) }
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
|
|||||||
@ -50,8 +50,6 @@ class ShareholderForm extends React.Component
|
|||||||
const { index, shareholder, checking, errors } = this.props;
|
const { index, shareholder, checking, errors } = this.props;
|
||||||
|
|
||||||
let citizenship = { label: getCitizenshipTitleByCode(shareholder.identity_document.citizenship.code), code: shareholder.identity_document.citizenship.code };
|
let citizenship = { label: getCitizenshipTitleByCode(shareholder.identity_document.citizenship.code), code: shareholder.identity_document.citizenship.code };
|
||||||
//console.log({ errors });
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
@ -169,12 +167,12 @@ class ShareholderForm extends React.Component
|
|||||||
|
|
||||||
<div className="form_field ">
|
<div className="form_field ">
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<label>Серия и номер паспорта <sup className="required_label">*</sup></label>
|
<label>Серия и номер { parseInt(shareholder.identity_document.doctype, 10) === 100000002 ? "ВНЖ" : "паспорта" } <sup className="required_label">*</sup></label>
|
||||||
<div className="formgroup">
|
<div className="formgroup">
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<InputMask
|
<InputMask
|
||||||
className={ errors.indexOf("identity_document.seria") > -1 ? "error" : "" }
|
className={ errors.indexOf("identity_document.seria") > -1 ? "error" : "" }
|
||||||
mask='9999'
|
mask={ parseInt(shareholder.identity_document.doctype, 10) === 100000000 ? "9999" : parseInt(shareholder.identity_document.doctype, 10) === 100000002 ? "99" : undefined }
|
||||||
id={ `founder_persons[${ index }].identity_document.seria` }
|
id={ `founder_persons[${ index }].identity_document.seria` }
|
||||||
name={ `founder_persons[${ index }].identity_document.seria` }
|
name={ `founder_persons[${ index }].identity_document.seria` }
|
||||||
value={ this._checkStrValue(shareholder.identity_document.seria) }
|
value={ this._checkStrValue(shareholder.identity_document.seria) }
|
||||||
@ -187,7 +185,7 @@ class ShareholderForm extends React.Component
|
|||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<InputMask
|
<InputMask
|
||||||
className={ errors.indexOf("identity_document.docnumber") > -1 ? "error" : "" }
|
className={ errors.indexOf("identity_document.docnumber") > -1 ? "error" : "" }
|
||||||
mask='999999'
|
mask={ parseInt(shareholder.identity_document.doctype, 10) === 100000000 ? "999999" : parseInt(shareholder.identity_document.doctype, 10) === 100000002 ? "9999999" : undefined }
|
||||||
id={ `founder_persons[${ index }].identity_document.docnumber` }
|
id={ `founder_persons[${ index }].identity_document.docnumber` }
|
||||||
name={ `founder_persons[${ index }].identity_document.docnumber` }
|
name={ `founder_persons[${ index }].identity_document.docnumber` }
|
||||||
value={ this._checkStrValue(shareholder.identity_document.docnumber) }
|
value={ this._checkStrValue(shareholder.identity_document.docnumber) }
|
||||||
@ -203,7 +201,7 @@ class ShareholderForm extends React.Component
|
|||||||
|
|
||||||
<div className="form_field ">
|
<div className="form_field ">
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<label>Дата выдачи и код подразделения <sup className="required_label">*</sup></label>
|
<label>{ parseInt(shareholder.identity_document.doctype, 10) === 100000000 ? "Дата выдачи и код подразделения" : "Дата выдачи" } <sup className="required_label">*</sup></label>
|
||||||
<div className="formgroup">
|
<div className="formgroup">
|
||||||
<div className="form_field">
|
<div className="form_field">
|
||||||
<CalendarDatePicker
|
<CalendarDatePicker
|
||||||
@ -218,22 +216,24 @@ class ShareholderForm extends React.Component
|
|||||||
disabled={ checking }
|
disabled={ checking }
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form_field">
|
{ parseInt(shareholder.identity_document.doctype, 10) === 100000000 && (
|
||||||
<DocumentIssuerSuggestsInput
|
<div className="form_field">
|
||||||
className={ errors.indexOf("identity_document.code") > -1 ? "error" : "" }
|
<DocumentIssuerSuggestsInput
|
||||||
style={{ width: "calc(100% - 198px)" }}
|
className={ errors.indexOf("identity_document.code") > -1 ? "error" : "" }
|
||||||
innerStyle={{ width: "100%", }}
|
style={{ width: "calc(100% - 198px)" }}
|
||||||
type="issuer"
|
innerStyle={{ width: "100%", }}
|
||||||
id={ `founder_persons[${ index }].identity_document.code` }
|
type="issuer"
|
||||||
name={ `founder_persons[${ index }].identity_document.code` }
|
id={ `founder_persons[${ index }].identity_document.code` }
|
||||||
value={ this._checkStrValue(shareholder.identity_document.code) }
|
name={ `founder_persons[${ index }].identity_document.code` }
|
||||||
placeholder="Введите код"
|
value={ this._checkStrValue(shareholder.identity_document.code) }
|
||||||
onChange={ (value) => { this._handle_onIssuerCodeChange(`founder_persons[${ index }]`, index, value); } }
|
placeholder="Введите код"
|
||||||
maxResults={ 5 }
|
onChange={ (value) => { this._handle_onIssuerCodeChange(`founder_persons[${ index }]`, index, value); } }
|
||||||
required={ true }
|
maxResults={ 5 }
|
||||||
disabled={ checking }
|
required={ true }
|
||||||
/>
|
disabled={ checking }
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -254,6 +254,22 @@ class ShareholderForm extends React.Component
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="form_field">
|
||||||
|
<label>Дата рождения <sup className="required_label">*</sup></label>
|
||||||
|
<CalendarDatePicker
|
||||||
|
className={ errors.indexOf("birthdate") > -1 ? "error" : "" }
|
||||||
|
//style={{ width: "calc(100% - 198px)" }}
|
||||||
|
placeholder="ДД.ММ.ГГГГ"
|
||||||
|
min={ moment().subtract(90, 'years').toDate() }
|
||||||
|
max={ moment().subtract(18, 'years').toDate() }
|
||||||
|
id={ `founder_persons[${ index }].birthdate` }
|
||||||
|
value={ this._checkStrValue(shareholder.birthdate) !== "" ? this._checkStrValue(shareholder.birthdate) : moment().subtract(18, 'years').toDate() }
|
||||||
|
onChange={ (date) => { this._removeError("birthdate"); this._handle_onTextFieldChange(`founder_persons[${ index }].birthdate`, date) } }
|
||||||
|
required={ true }
|
||||||
|
disabled={ checking }
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="form_field" style={{ flex: 1 }}>
|
<div className="form_field" style={{ flex: 1 }}>
|
||||||
<label>Место рождения <sup className="required_label">*</sup></label>
|
<label>Место рождения <sup className="required_label">*</sup></label>
|
||||||
<AddressSuggests
|
<AddressSuggests
|
||||||
@ -497,6 +513,7 @@ class Form_4_Shareholders extends QuestionnaireForm
|
|||||||
founder_number: 0,
|
founder_number: 0,
|
||||||
founder_part: null,
|
founder_part: null,
|
||||||
is_beneficial: false,
|
is_beneficial: false,
|
||||||
|
birthdate: moment().subtract(18, 'years').toDate(),
|
||||||
identity_document:
|
identity_document:
|
||||||
{
|
{
|
||||||
doctype: 100000000,
|
doctype: 100000000,
|
||||||
@ -588,7 +605,7 @@ class Form_4_Shareholders extends QuestionnaireForm
|
|||||||
{
|
{
|
||||||
this._handle_onFieldChange(name, { ...values } );
|
this._handle_onFieldChange(name, { ...values } );
|
||||||
const { errors } = this.state;
|
const { errors } = this.state;
|
||||||
errors.splice(index, 1);
|
errors.splice(index, 1, []);
|
||||||
this.setState({ errors });
|
this.setState({ errors });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -807,11 +824,6 @@ class Form_4_Shareholders extends QuestionnaireForm
|
|||||||
const { checking } = this.props;
|
const { checking } = this.props;
|
||||||
const { founder_persons, client_contacts, loading, address, status, errors, } = this.state;
|
const { founder_persons, client_contacts, loading, address, status, errors, } = this.state;
|
||||||
|
|
||||||
if(errors.length > 0)
|
|
||||||
{
|
|
||||||
console.error(errors);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form ref={ this.ref_form } onSubmit={ this._handle_onFormSubmit } onKeyDown={(e) => {if (e.key === 'Enter') e.preventDefault() }} className={`questionnaire questionnaire_4 ${ checking && "disabled" }`}>
|
<form ref={ this.ref_form } onSubmit={ this._handle_onFormSubmit } onKeyDown={(e) => {if (e.key === 'Enter') e.preventDefault() }} className={`questionnaire questionnaire_4 ${ checking && "disabled" }`}>
|
||||||
<p className="title">4. Сведения об участниках (акционерах) и бенефициарных владельцах</p>
|
<p className="title">4. Сведения об участниках (акционерах) и бенефициарных владельцах</p>
|
||||||
@ -825,28 +837,30 @@ class Form_4_Shareholders extends QuestionnaireForm
|
|||||||
(
|
(
|
||||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
||||||
) }
|
) }
|
||||||
{ founder_persons.map((shareholder, index) => (
|
{ founder_persons.map((shareholder, index) => {
|
||||||
<Shareholder
|
return (
|
||||||
key={ index }
|
<Shareholder
|
||||||
index={ index }
|
key={ index }
|
||||||
shareholders={ founder_persons }
|
index={ index }
|
||||||
address={ address }
|
shareholders={ founder_persons }
|
||||||
errors={ errors[index] }
|
address={ address }
|
||||||
_handle_onTextFieldChange={ this._handle_onTextFieldChange }
|
errors={ errors[index] }
|
||||||
_handle_onCheckboxFieldChange={ this._handle_onCheckboxFieldChange }
|
_handle_onTextFieldChange={ this._handle_onTextFieldChange }
|
||||||
_handle_onFieldChange={ this._handle_onFieldChange }
|
_handle_onCheckboxFieldChange={ this._handle_onCheckboxFieldChange }
|
||||||
_handle_onIssuerCodeChange={ this._handle_onIssuerCodeChange }
|
_handle_onFieldChange={ this._handle_onFieldChange }
|
||||||
_handle_onIssuerChange={ this._handle_onIssuerChange }
|
_handle_onIssuerCodeChange={ this._handle_onIssuerCodeChange }
|
||||||
_handle_onDocumentTypeChange={ this._handle_onDocumentTypeChange }
|
_handle_onIssuerChange={ this._handle_onIssuerChange }
|
||||||
_checkStrValue={ this._checkStrValue }
|
_handle_onDocumentTypeChange={ this._handle_onDocumentTypeChange }
|
||||||
_removeError={ (name) => this._onRemoveError(index, name) }
|
_checkStrValue={ this._checkStrValue }
|
||||||
removeShareholder={ this._handle_onRemoveShareholder }
|
_removeError={ (name) => this._onRemoveError(index, name) }
|
||||||
clearFounderFromListSelection={ this._handle_onClearFounderFromListSelection }
|
removeShareholder={ this._handle_onRemoveShareholder }
|
||||||
changeFounderSelectionFromList={ this._handle_onChangeFounderSelectionFromList }
|
clearFounderFromListSelection={ this._handle_onClearFounderFromListSelection }
|
||||||
contacts={ client_contacts }
|
changeFounderSelectionFromList={ this._handle_onChangeFounderSelectionFromList }
|
||||||
checking={ checking }
|
contacts={ client_contacts }
|
||||||
/>
|
checking={ checking }
|
||||||
)) }
|
/>
|
||||||
|
) }
|
||||||
|
) }
|
||||||
|
|
||||||
{ !checking && (
|
{ !checking && (
|
||||||
<div className="action">
|
<div className="action">
|
||||||
|
|||||||
@ -16,6 +16,12 @@ const address = {
|
|||||||
100000002: "postal",
|
100000002: "postal",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const personal_doctypes = {
|
||||||
|
100000000: "Паспорт РФ",
|
||||||
|
100000001: "Иностранный паспорт",
|
||||||
|
100000002: "Вид на жительство",
|
||||||
|
};
|
||||||
|
|
||||||
const fields = {
|
const fields = {
|
||||||
main: {
|
main: {
|
||||||
title: { name: "main_title", type: "text", bind: null, },
|
title: { name: "main_title", type: "text", bind: null, },
|
||||||
@ -159,10 +165,11 @@ export default async function handler(req, res)
|
|||||||
}
|
}
|
||||||
else if(field === "personal")
|
else if(field === "personal")
|
||||||
{
|
{
|
||||||
const { citizenship, doctype, seria, docnumber, code, issueby, issuedate, } = questionnaire[group][p].identity_document;
|
const { birthdate, } = questionnaire[group][p];
|
||||||
|
const { placebirth, citizenship, doctype, seria, docnumber, code, issueby, issuedate, } = questionnaire[group][p].identity_document;
|
||||||
fields[group][p][field].bind = form.getTextField(fields[group][p][field].name);
|
fields[group][p][field].bind = form.getTextField(fields[group][p][field].name);
|
||||||
if(fields[group][p][field].size !== undefined) { fields[group][p][field].bind.setFontSize(fields[group][p][field].size); }
|
if(fields[group][p][field].size !== undefined) { fields[group][p][field].bind.setFontSize(fields[group][p][field].size); }
|
||||||
fields[group][p][field].bind.setText(`Гражданство: ${ citizenship.title }, паспорт ${ seria.toString() } ${ docnumber.toString() }, выдан \n${ issueby.toString() }, ${ code.toString() } ${ moment(issuedate).format("DD.MM.YYYY") }`.toUpperCase());
|
fields[group][p][field].bind.setText(`${ moment(birthdate).format("DD.MM.YYYY") }, ${ placebirth }, ${ citizenship.title }, ${ personal_doctypes[doctype].toString().toUpperCase() } ${ seria.toString() } ${ docnumber.toString() }, выдан ${ issueby.toString() }, ${ code.toString() } ${ moment(issuedate).format("DD.MM.YYYY") }`.toUpperCase());
|
||||||
}
|
}
|
||||||
else if(field === "registration")
|
else if(field === "registration")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -192,6 +192,7 @@ export default async function handler(req, res)
|
|||||||
founder_persons[i].telephone = checkNullEmpty(founder_persons[i].telephone) ? founder_persons[i].telephone.replace(/[^0-9]/g, '') : null;
|
founder_persons[i].telephone = checkNullEmpty(founder_persons[i].telephone) ? founder_persons[i].telephone.replace(/[^0-9]/g, '') : null;
|
||||||
founder_persons[i].identity_document.issuedate = checkNullEmpty(founder_persons[i].identity_document.issuedate) ? moment(founder_persons[i].identity_document.issuedate).format("YYYY-MM-DD") : null;
|
founder_persons[i].identity_document.issuedate = checkNullEmpty(founder_persons[i].identity_document.issuedate) ? moment(founder_persons[i].identity_document.issuedate).format("YYYY-MM-DD") : null;
|
||||||
founder_persons[i].identity_document.citizenship_code = founder_persons[i].identity_document.citizenship.code.toString();
|
founder_persons[i].identity_document.citizenship_code = founder_persons[i].identity_document.citizenship.code.toString();
|
||||||
|
founder_persons[i].birthdate = checkNullEmpty(founder_persons[i].birthdate) ? moment(founder_persons[i].birthdate).format("YYYY-MM-DD") : null;
|
||||||
|
|
||||||
if(founder_persons[i].middlename !== "" && founder_persons[i].middlename !== null)
|
if(founder_persons[i].middlename !== "" && founder_persons[i].middlename !== null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user