feat(tenancy): add profile editing in merchant team edit modal
Some checks failed
Some checks failed
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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user