From 36125608604a816f3fc274fc480facd299e4fda0 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 4 Mar 2022 12:08:35 +0800 Subject: [PATCH] Fix Optimistic concurrency error --- .../ProfileManagementGroup/Password/Default.js | 1 + .../ProfileManagementGroup/PersonalInfo/Default.js | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js index 73e29ce20b8..92f3d5a382c 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js @@ -25,6 +25,7 @@ volo.abp.account.profile.changePassword(input).then(function (result) { abp.message.success(l('PasswordChanged')); + abp.event.trigger('passwordChanged'); }); }); }); diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js index e4f5f826205..55a88e52e3c 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.js @@ -13,11 +13,16 @@ volo.abp.account.profile.update(input).then(function (result) { abp.notify.success(l('PersonalSettingsSaved')); - - volo.abp.account.profile.get().then(function(profile){ - $("#ConcurrencyStamp").val(profile.concurrencyStamp); - }); + updateConcurrencyStamp(); }); }); }); + + abp.event.on('passwordChanged', updateConcurrencyStamp); + + function updateConcurrencyStamp(){ + volo.abp.account.profile.get().then(function(profile){ + $("#ConcurrencyStamp").val(profile.concurrencyStamp); + }); + } })(jQuery);