diff --git a/src/app/pages/accounts/account-details/account-details.component.html b/src/app/pages/accounts/account-details/account-details.component.html
index 7042672..646dd4a 100644
--- a/src/app/pages/accounts/account-details/account-details.component.html
+++ b/src/app/pages/accounts/account-details/account-details.component.html
@@ -48,10 +48,19 @@
- Name(s): *
-
- Name is required.
+ First Name: *
+
+ First Name is required.
+
+
+
+
+
+ Last Name(s): *
+
+ Last Name is required.
diff --git a/src/app/pages/accounts/account-details/account-details.component.ts b/src/app/pages/accounts/account-details/account-details.component.ts
index 1abc6a1..d6d9c95 100644
--- a/src/app/pages/accounts/account-details/account-details.component.ts
+++ b/src/app/pages/accounts/account-details/account-details.component.ts
@@ -87,7 +87,8 @@ export class AccountDetailsComponent implements OnInit {
async ngOnInit(): Promise {
this.accountInfoForm = this.formBuilder.group({
- name: ['', Validators.required],
+ firstName: ['', Validators.required],
+ lastName: ['', Validators.required],
phoneNumber: ['', Validators.required],
age: ['', Validators.required],
type: ['', Validators.required],
@@ -109,8 +110,10 @@ export class AccountDetailsComponent implements OnInit {
this.account = res;
this.cdr.detectChanges();
this.loggingService.sendInfoLevelMessage(this.account);
+ const fullName = this.account.vcard?.fn[0].value.split(' ');
this.accountInfoForm.patchValue({
- name: this.account.vcard?.fn[0].value,
+ firstName: fullName[0],
+ lastName: fullName.slice(1).join(' '),
phoneNumber: this.account.vcard?.tel[0].value,
age: this.account.age,
type: this.account.type,
@@ -199,7 +202,7 @@ export class AccountDetailsComponent implements OnInit {
}
const accountKey = await this.userService.changeAccountInfo(
this.accountAddress,
- this.accountInfoFormStub.name.value,
+ this.accountInfoFormStub.firstName.value + ' ' + this.accountInfoFormStub.lastName.value,
this.accountInfoFormStub.phoneNumber.value,
this.accountInfoFormStub.age.value,
this.accountInfoFormStub.type.value,