refactor: split full name
This commit is contained in:
parent
dc9068a30a
commit
970f27b714
1 changed files with 5 additions and 0 deletions
|
|
@ -143,9 +143,14 @@ async function change(e: Event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resOcr.group === 'passport') {
|
if (resOcr.group === 'passport') {
|
||||||
|
const fullName = map['full_name'].split(' ');
|
||||||
|
|
||||||
obj.value[currentIndex.value]._meta = {
|
obj.value[currentIndex.value]._meta = {
|
||||||
type: map['doc_type'],
|
type: map['doc_type'],
|
||||||
number: map['doc_number'],
|
number: map['doc_number'],
|
||||||
|
gender: map['sex'],
|
||||||
|
firstName: fullName[0],
|
||||||
|
lastName: fullName[1],
|
||||||
issueDate: map['issue_date'],
|
issueDate: map['issue_date'],
|
||||||
expireDate: map['expire_date'],
|
expireDate: map['expire_date'],
|
||||||
issuePlace: map['nationality'],
|
issuePlace: map['nationality'],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue