@sumaris-net/ngx-components 2.2.9 → 2.3.0
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/esm2020/src/app/core/menu/menu.component.mjs +5 -4
- package/fesm2015/sumaris-net.ngx-components.mjs +4 -3
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +4 -3
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -21384,11 +21384,11 @@ class MenuComponent {
|
|
|
21384
21384
|
.pipe(distinctUntilChanged())
|
|
21385
21385
|
.subscribe((value) => value ? this.open() : this.close());
|
|
21386
21386
|
// Update component when refresh is need (=login events or config changed)
|
|
21387
|
-
let
|
|
21387
|
+
let lastAccountUpdateDate;
|
|
21388
21388
|
this._subscription.add(merge(merge(this.accountService.onLogin
|
|
21389
21389
|
.pipe(
|
|
21390
21390
|
// Filter on account changes
|
|
21391
|
-
filter(account => !DateUtils.isSame(account?.updateDate,
|
|
21391
|
+
filter(account => !DateUtils.isSame(account?.updateDate, lastAccountUpdateDate))), this.configService.config
|
|
21392
21392
|
.pipe(
|
|
21393
21393
|
// Store the config
|
|
21394
21394
|
tap(config => this._config = config)))
|
|
@@ -21401,10 +21401,11 @@ class MenuComponent {
|
|
|
21401
21401
|
this.accountService.onLogout.pipe(mapTo(null)))
|
|
21402
21402
|
.subscribe(account => {
|
|
21403
21403
|
if (account?.updateDate) {
|
|
21404
|
-
|
|
21404
|
+
lastAccountUpdateDate = account.updateDate;
|
|
21405
21405
|
this.onLogin(account);
|
|
21406
21406
|
}
|
|
21407
21407
|
else {
|
|
21408
|
+
lastAccountUpdateDate = null;
|
|
21408
21409
|
this.onLogout(true);
|
|
21409
21410
|
}
|
|
21410
21411
|
}));
|