1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-18 12:54:27 +01:00

(bug) unable to update the user profile after toggling the organization switch twice

This commit is contained in:
Sylvain 2022-06-22 17:14:19 +02:00
parent c1246092ed
commit d03a34b894
6 changed files with 15 additions and 4 deletions

View File

@ -25,6 +25,7 @@
- Fix a bug: error message during the setup: the input device is not a TTY
- Fix a bug: when Fab-manager was installed as non-root user, unable to compile the assets during the upgrade
- Fix a bug: unable to remove an SSO data mapping field once saved
- Fix a bug: unable to update the user profile after toggling the organization switch twice
- [TODO DEPLOY] `\curl -sSL https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/set-docker-user.sh | bash`
## v5.4.4 2022 June 8

View File

@ -267,7 +267,7 @@ class API::MembersController < API::ApiController
:dailymotion, :github, :echosciences, :pinterest, :lastfm, :flickr,
user_avatar_attributes: %i[id attachment destroy]],
invoicing_profile_attributes: [
:id,
:id, :organization,
address_attributes: %i[id address],
organization_attributes: [:id, :name, address_attributes: %i[id address]],
user_profile_custom_fields_attributes: %i[id value invoicing_profile_id profile_custom_field_id]
@ -282,7 +282,7 @@ class API::MembersController < API::ApiController
:dailymotion, :github, :echosciences, :pinterest, :lastfm, :flickr,
user_avatar_attributes: %i[id attachment destroy]],
invoicing_profile_attributes: [
:id,
:id, :organization,
address_attributes: %i[id address],
organization_attributes: [:id, :name, address_attributes: %i[id address]],
user_profile_custom_fields_attributes: %i[id value invoicing_profile_id profile_custom_field_id]

View File

@ -30,7 +30,10 @@
}
@media (min-width: 1200px) {
.supporting-documents-validation .fab-panel {
width: 56.33%;
}
.supporting-documents-validation .fab-panel.refusal {
width: 33.33333333333333%;
width: 33.33%;
}
}

View File

@ -60,7 +60,7 @@
</uib-tab>
<uib-tab heading="{{ 'app.admin.members_edit.proof_of_identity_files' | translate }}" ng-show="hasProofOfIdentityTypes">
<uib-tab heading="{{ 'app.admin.members_edit.supporting_documents' | translate }}" ng-show="hasProofOfIdentityTypes">
<supporting-documents-validation
operator="currentUser"
member="user"

View File

@ -36,6 +36,12 @@ class Members::MembersService
end
end
if params[:invoicing_profile_attributes][:organization] == 'false'
params[:invoicing_profile_attributes].reject! { |p| %w[organization_attributes organization].include?(p) }
else
params[:invoicing_profile_attributes].reject! { |p| p == 'organization' }
end
not_complete = member.need_completion?
up_result = member.update(params)

View File

@ -1027,6 +1027,7 @@ en:
invalidate_member_success: "The member is invalidated"
validate_member_error: "An error occurred: impossible to validate from this member."
invalidate_member_error: "An error occurred: impossible to invalidate from this member."
supporting_documents: "Supporting documents"
# extend a subscription for free
free_extend_modal:
extend_subscription: "Extend the subscription"