@influenzanet/case-web-app-core 2.7.5-staging.25 → 2.7.5-staging.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.es.js CHANGED
@@ -27900,12 +27900,20 @@ var UserProfilesSelector = function (props) {
27900
27900
  var listItems = profiles.map(function (profile) {
27901
27901
  var isSelected = profile.id === selectedProfile.id;
27902
27902
  var avatarUri = "assets/avatars/".concat(avatarImg(profile.avatarId));
27903
- return (jsx("li", __assign({ className: "".concat(isSelected ? "selected" : "", " d-flex flex-wrap align-items-center justify-content-center"), onClick: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator$1(this, function (_a) {
27904
- switch (_a.label) {
27905
- case 0: return [4 /*yield*/, props.onProfileChange(profile.id)];
27906
- case 1: return [2 /*return*/, _a.sent()];
27907
- }
27908
- }); }); } }, { children: jsx("img", { src: avatarUri, alt: profile.alias, title: profile.alias }, void 0) }), profile.id));
27903
+ return (jsx("li", __assign({ className: "".concat(isSelected ? "selected" : "", " d-flex flex-wrap align-items-center justify-content-center"), onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
27904
+ return __generator$1(this, function (_a) {
27905
+ switch (_a.label) {
27906
+ case 0:
27907
+ if (props.selectedProfileId === profile.id) {
27908
+ return [2 /*return*/];
27909
+ }
27910
+ return [4 /*yield*/, props.onProfileChange(profile.id)];
27911
+ case 1:
27912
+ _a.sent();
27913
+ return [2 /*return*/];
27914
+ }
27915
+ });
27916
+ }); } }, { children: jsx("img", { src: avatarUri, alt: profile.alias, title: profile.alias }, void 0) }), profile.id));
27909
27917
  });
27910
27918
  return (jsxs("div", __assign({ className: "profile-selector ".concat(props.className, " p-2 d-flex flex-column align-items-center") }, { children: [jsx("h5", __assign({ id: "profile_name", className: "fw-bold flex-grow" }, { children: selectedProfile.alias }), void 0), jsx("ul", __assign({ className: "d-flex flex-wrap align-items-center justify-content-center" }, { children: listItems }), void 0)] }), void 0));
27911
27919
  };