feat(tenancy): add profile editing in merchant team edit modal
Some checks failed
CI / ruff (push) Successful in 16s
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / pytest (push) Has been cancelled

Edit modal now has editable first_name, last_name, email fields with
a "Save Profile" button, alongside the existing per-store role management.

New:
- PUT /merchants/account/team/members/{user_id}/profile endpoint
- MerchantTeamProfileUpdate schema
- update_team_member_profile() service method with ownership validation
- 2 new i18n keys across 4 locales (personal_info, save_profile)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 13:31:23 +02:00
parent 211c46ebbc
commit 157b4c6ec3
9 changed files with 147 additions and 15 deletions

View File

@@ -201,6 +201,31 @@ function merchantTeam() {
this.showEditModal = true;
},
/**
* Update member profile (first name, last name, email)
*/
async updateMemberProfile(userId, firstName, lastName, email) {
this.saving = true;
try {
await apiClient.put(
`/merchants/account/team/members/${userId}/profile`,
{ first_name: firstName, last_name: lastName, email: email }
);
Utils.showToast(I18n.t('tenancy.messages.team_member_updated'), 'success');
merchantTeamLog.info('Updated member profile:', userId);
this.showEditModal = false;
this.selectedMember = null;
await this.loadTeamData();
} catch (error) {
merchantTeamLog.error('Failed to update member profile:', error);
Utils.showToast(error.message || 'Failed to update member profile', 'error');
} finally {
this.saving = false;
}
},
/**
* Update member role for a specific store
*/