tnx-shared 5.1.395 → 5.1.398
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/bundles/tnx-shared.umd.js +95 -97
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/components/common-app-component/app.menu.component.d.ts.map +1 -1
- package/components/common-app-component/common-app-component.d.ts.map +1 -1
- package/components/splash-component/splash-component.component.d.ts.map +1 -1
- package/esm2015/components/common-app-component/app.menu.component.js +23 -12
- package/esm2015/components/common-app-component/common-app-component.js +12 -6
- package/esm2015/components/splash-component/splash-component.component.js +2 -5
- package/esm2015/components/user-picker/user-picker-box/user-picker-box.component.js +1 -1
- package/esm2015/services/common.service.js +9 -3
- package/esm2015/services/core-config.service.js +5 -3
- package/esm2015/services/menu.service.js +14 -15
- package/esm2015/services/module-config.service.js +3 -16
- package/esm2015/services/user.service.js +29 -32
- package/fesm2015/tnx-shared.js +90 -85
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/common.service.d.ts +7 -0
- package/services/common.service.d.ts.map +1 -1
- package/services/core-config.service.d.ts.map +1 -1
- package/services/menu.service.d.ts +4 -0
- package/services/menu.service.d.ts.map +1 -1
- package/services/module-config.service.d.ts.map +1 -1
- package/services/user.service.d.ts +1 -1
- package/services/user.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -2412,20 +2412,7 @@
|
|
|
2412
2412
|
var ModuleConfigService = /** @class */ (function () {
|
|
2413
2413
|
function ModuleConfigService(moduleConfigVal) {
|
|
2414
2414
|
if (moduleConfigVal === void 0) { moduleConfigVal = null; }
|
|
2415
|
-
|
|
2416
|
-
// get from session storage
|
|
2417
|
-
var data = sessionStorage.getItem('moduleConfigVal');
|
|
2418
|
-
if (data) {
|
|
2419
|
-
this._config = JSON.parse(data);
|
|
2420
|
-
}
|
|
2421
|
-
else {
|
|
2422
|
-
console.error('cannot find moduleConfigVal');
|
|
2423
|
-
}
|
|
2424
|
-
}
|
|
2425
|
-
else {
|
|
2426
|
-
this._config = moduleConfigVal();
|
|
2427
|
-
sessionStorage.setItem('moduleConfigVal', JSON.stringify(this._config));
|
|
2428
|
-
}
|
|
2415
|
+
this._config = moduleConfigVal();
|
|
2429
2416
|
}
|
|
2430
2417
|
ModuleConfigService.prototype.getConfig = function () {
|
|
2431
2418
|
return this._config;
|
|
@@ -3451,8 +3438,7 @@
|
|
|
3451
3438
|
}
|
|
3452
3439
|
else {
|
|
3453
3440
|
if (this.isDesktop()) {
|
|
3454
|
-
this.staticMenuDesktopInactive = !this
|
|
3455
|
-
.staticMenuDesktopInactive;
|
|
3441
|
+
this.staticMenuDesktopInactive = !this.staticMenuDesktopInactive;
|
|
3456
3442
|
}
|
|
3457
3443
|
else {
|
|
3458
3444
|
this.staticMenuMobileActive = !this.staticMenuMobileActive;
|
|
@@ -3965,6 +3951,13 @@
|
|
|
3965
3951
|
CommonService.prototype.guidEmpty = function () {
|
|
3966
3952
|
return '00000000-0000-0000-0000-000000000000';
|
|
3967
3953
|
};
|
|
3954
|
+
/**
|
|
3955
|
+
* kiểm tra xem chuỗi có phải một guid khác với cả guidEmpty
|
|
3956
|
+
* @date 8/11/2022 - 11:51:31 AM
|
|
3957
|
+
*
|
|
3958
|
+
* @param {string} guid
|
|
3959
|
+
* @returns {boolean}
|
|
3960
|
+
*/
|
|
3968
3961
|
CommonService.prototype.isValidGuid = function (guid) {
|
|
3969
3962
|
return guid != null && guid !== '' && guid !== this.guidEmpty();
|
|
3970
3963
|
};
|
|
@@ -10230,19 +10223,20 @@
|
|
|
10230
10223
|
// Chuyển đổi sang dùng instanceId nếu đăng nhập bằng identityv4 nhưng phải sử dụng base userOrgv5
|
|
10231
10224
|
var userId = _this.getUserIdFromToken(decoded);
|
|
10232
10225
|
_this.getStaffInfo(userId).then(function (rs1) {
|
|
10233
|
-
var
|
|
10234
|
-
var userPublicInfo = _this.getUserPublicInfo(
|
|
10235
|
-
if ((!
|
|
10236
|
-
|
|
10226
|
+
var mappedUser = _this.mapUserInfo(decoded, rs1, userId);
|
|
10227
|
+
var userPublicInfo = _this.getUserPublicInfo(mappedUser);
|
|
10228
|
+
if ((!mappedUser.avatar || mappedUser.avatar == '') && mappedUser.gender != null) {
|
|
10229
|
+
mappedUser.avatar = mappedUser.gender == 0 ? _this.DEFAULT_AVATAR_FEMALE : _this.DEFAULT_AVATAR_MALE;
|
|
10237
10230
|
}
|
|
10238
10231
|
localStorage.setItem(_this.CURRENT_USER_KEY, JSON.stringify(userPublicInfo));
|
|
10239
|
-
rootContext.data.currentUser =
|
|
10232
|
+
rootContext.data.currentUser = mappedUser;
|
|
10240
10233
|
if (firstTimeLogin) {
|
|
10241
10234
|
rootContext.fireEvent(ComCtxConstants.ROOT.NEED_CLEAR_PERMISSION_CACHE);
|
|
10242
10235
|
return;
|
|
10243
10236
|
}
|
|
10244
10237
|
rootContext.fireReplayEvent(ComCtxConstants.ROOT.USER_LOADED, true);
|
|
10245
10238
|
}, function (err) {
|
|
10239
|
+
console.log(err);
|
|
10246
10240
|
});
|
|
10247
10241
|
});
|
|
10248
10242
|
};
|
|
@@ -10260,34 +10254,30 @@
|
|
|
10260
10254
|
};
|
|
10261
10255
|
UserService.prototype.mergePublicAndPrivateInfo = function (userPublicInfo, infoFromToken) {
|
|
10262
10256
|
var _this = this;
|
|
10263
|
-
if (userPublicInfo == null
|
|
10257
|
+
if (userPublicInfo == null || infoFromToken == null) {
|
|
10264
10258
|
return null;
|
|
10265
10259
|
}
|
|
10266
10260
|
var result = new TnUser();
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
destination.origin = original[key];
|
|
10279
|
-
if (!_this._commonService.isValidGuid(destination.userId)) {
|
|
10280
|
-
destination.userId = _this.getUserIdFromToken(infoFromToken);
|
|
10281
|
-
}
|
|
10282
|
-
}
|
|
10283
|
-
if (key === 'username' && (destination.userName == null || destination.userName === '')) {
|
|
10284
|
-
destination.userName = original[key];
|
|
10285
|
-
return true;
|
|
10261
|
+
this.addProperty(result, userPublicInfo);
|
|
10262
|
+
// mapping mot so truong trong token co key != trong TnUser
|
|
10263
|
+
var customProcess = function (destination, original, key) {
|
|
10264
|
+
if (key === 'fullname') {
|
|
10265
|
+
destination.fullName = original[key];
|
|
10266
|
+
return true;
|
|
10267
|
+
}
|
|
10268
|
+
if (key === 'sub') {
|
|
10269
|
+
destination.origin = original[key];
|
|
10270
|
+
if (!_this._commonService.isValidGuid(destination.userId)) {
|
|
10271
|
+
destination.userId = _this.getUserIdFromToken(infoFromToken);
|
|
10286
10272
|
}
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10273
|
+
}
|
|
10274
|
+
if (key === 'username' && (destination.userName == null || destination.userName === '')) {
|
|
10275
|
+
destination.userName = original[key];
|
|
10276
|
+
return true;
|
|
10277
|
+
}
|
|
10278
|
+
return false;
|
|
10279
|
+
};
|
|
10280
|
+
this.addProperty(result, infoFromToken, customProcess);
|
|
10291
10281
|
return result;
|
|
10292
10282
|
};
|
|
10293
10283
|
/**
|
|
@@ -10515,7 +10505,7 @@
|
|
|
10515
10505
|
* Hàm dùng để lấy thông tin cơ bản nhiều người dùng dựa vào userName,
|
|
10516
10506
|
* hiện tại chưa có thông tin về đơn vị và chức vụ người dùng để giảm load và vì chưa dùng đến
|
|
10517
10507
|
* @param {string} userName
|
|
10518
|
-
* @return {Promise<BasicUserInfo[]>
|
|
10508
|
+
* @return {Promise<BasicUserInfo[]>}
|
|
10519
10509
|
*/
|
|
10520
10510
|
UserService.prototype.getBasicUserInfoByUserName = function (userName) {
|
|
10521
10511
|
var _this = this;
|
|
@@ -10562,24 +10552,23 @@
|
|
|
10562
10552
|
var storageItem, userInfos, check, svUrl;
|
|
10563
10553
|
var _this = this;
|
|
10564
10554
|
return __generator(this, function (_c) {
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
})).toPromise().catch(function (err) { return []; })];
|
|
10581
|
-
case 2: return [2 /*return*/, _c.sent()];
|
|
10555
|
+
storageItem = localStorage.getItem(this.USER_INFO_KEY);
|
|
10556
|
+
userInfos = JSON.parse(storageItem);
|
|
10557
|
+
check = userInfos ? userNames.indexOf(userInfos['userName']) > -1 : null;
|
|
10558
|
+
if (check) {
|
|
10559
|
+
return [2 /*return*/, userInfos];
|
|
10560
|
+
}
|
|
10561
|
+
else {
|
|
10562
|
+
svUrl = this.serviceUri + "/GetBasicUsersInfoByUserNames?userNames=" + userNames;
|
|
10563
|
+
return [2 /*return*/, this._http.get(svUrl).pipe(operators.shareReplay(this.REPLAY_COUNT), operators.retry(this.RETRY_COUNT), operators.catchError(function (err) { return _this.handleError(err, _this._injector); }), operators.map(function (repsonse) {
|
|
10564
|
+
localStorage.setItem(_this.USER_INFO_KEY + '_' + repsonse.data.map(function (x) {
|
|
10565
|
+
if (x.userName)
|
|
10566
|
+
return x.userName;
|
|
10567
|
+
}), JSON.stringify(repsonse.data));
|
|
10568
|
+
return repsonse.data;
|
|
10569
|
+
})).toPromise().catch(function (err) { return []; })];
|
|
10582
10570
|
}
|
|
10571
|
+
return [2 /*return*/];
|
|
10583
10572
|
});
|
|
10584
10573
|
});
|
|
10585
10574
|
};
|
|
@@ -25350,10 +25339,7 @@
|
|
|
25350
25339
|
}
|
|
25351
25340
|
});
|
|
25352
25341
|
if (_this.appSwitcherItems.length === 1) {
|
|
25353
|
-
|
|
25354
|
-
return;
|
|
25355
|
-
}
|
|
25356
|
-
_this.switchApp(_this.appSwitcherItems[0]);
|
|
25342
|
+
setTimeout(function (x) { return _this.switchApp(_this.appSwitcherItems[0]); }, 100);
|
|
25357
25343
|
}
|
|
25358
25344
|
}
|
|
25359
25345
|
});
|
|
@@ -26057,7 +26043,7 @@
|
|
|
26057
26043
|
return c;
|
|
26058
26044
|
};
|
|
26059
26045
|
CoreConfigService.prototype.getAuthConfig = function () {
|
|
26060
|
-
var scope = 'openid profile email';
|
|
26046
|
+
var scope = 'openid profile email offline_access';
|
|
26061
26047
|
if (this.environment.authenticationSettings.scope) {
|
|
26062
26048
|
scope = this.environment.authenticationSettings.scope;
|
|
26063
26049
|
}
|
|
@@ -26072,7 +26058,9 @@
|
|
|
26072
26058
|
showDebugInformation: false,
|
|
26073
26059
|
requestAccessToken: true,
|
|
26074
26060
|
useSilentRefresh: false,
|
|
26075
|
-
clearHashAfterLogin: true
|
|
26061
|
+
clearHashAfterLogin: true,
|
|
26062
|
+
timeoutFactor: 0.5,
|
|
26063
|
+
sessionCheckIntervall: 1 * 60 * 1000
|
|
26076
26064
|
};
|
|
26077
26065
|
};
|
|
26078
26066
|
return CoreConfigService;
|
|
@@ -29486,6 +29474,10 @@
|
|
|
29486
29474
|
{ type: i0.Injector }
|
|
29487
29475
|
]; };
|
|
29488
29476
|
|
|
29477
|
+
(function (MenuSource) {
|
|
29478
|
+
MenuSource[MenuSource["JSON"] = 0] = "JSON";
|
|
29479
|
+
MenuSource[MenuSource["LocalStorage"] = 1] = "LocalStorage";
|
|
29480
|
+
})(exports.MenuSource || (exports.MenuSource = {}));
|
|
29489
29481
|
var TnMenu = /** @class */ (function () {
|
|
29490
29482
|
function TnMenu() {
|
|
29491
29483
|
this.isRootMenu = false;
|
|
@@ -29551,24 +29543,17 @@
|
|
|
29551
29543
|
MenuService.prototype.setMenuItems = function (menus, clearPrevMenu) {
|
|
29552
29544
|
var _this = this;
|
|
29553
29545
|
if (clearPrevMenu === void 0) { clearPrevMenu = false; }
|
|
29554
|
-
return this.setVisibleMenus(menus)
|
|
29546
|
+
return this.setVisibleMenus(menus)
|
|
29547
|
+
.then(function (rs) {
|
|
29555
29548
|
var _a;
|
|
29556
|
-
var
|
|
29549
|
+
var oldMenu = clearPrevMenu ? [] : _this._commonService.cloneObject(_this.getMenuItems());
|
|
29557
29550
|
menus.forEach(function (m) {
|
|
29558
29551
|
if (!m.isRootMenu) {
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
else {
|
|
29562
|
-
_this._rootMenu.label = m.label;
|
|
29552
|
+
oldMenu.push(m);
|
|
29553
|
+
return;
|
|
29563
29554
|
}
|
|
29555
|
+
_this._rootMenu.label = m.label;
|
|
29564
29556
|
});
|
|
29565
|
-
var oldMenu = _this._commonService.cloneObject(_this.getMenuItems());
|
|
29566
|
-
if (clearPrevMenu) {
|
|
29567
|
-
oldMenu = temp;
|
|
29568
|
-
}
|
|
29569
|
-
else {
|
|
29570
|
-
oldMenu.push.apply(oldMenu, __spread(temp));
|
|
29571
|
-
}
|
|
29572
29557
|
_this._menuItems.length = 0;
|
|
29573
29558
|
(_a = _this._menuItems).push.apply(_a, __spread(_this.recursiveOrderBy(oldMenu)));
|
|
29574
29559
|
_this.menuChanged.next(_this._menuItems);
|
|
@@ -29695,7 +29680,7 @@
|
|
|
29695
29680
|
if (menuElem.isRootMenu) {
|
|
29696
29681
|
return [2 /*return*/];
|
|
29697
29682
|
}
|
|
29698
|
-
if (pathPrefix != null && pathPrefix !== '' && menuElem.routerLink != null &&
|
|
29683
|
+
if (pathPrefix != null && pathPrefix !== '' && menuElem.routerLink != null && menuElem.ignoreBasePath !== true) {
|
|
29699
29684
|
menuElem.routerLink = (pathPrefix || '') + (menuElem.routerLink || '');
|
|
29700
29685
|
}
|
|
29701
29686
|
if (!menuElem.isCustomAuthen) return [3 /*break*/, 1];
|
|
@@ -30959,12 +30944,10 @@
|
|
|
30959
30944
|
}
|
|
30960
30945
|
};
|
|
30961
30946
|
CommonAppComponentComponent.prototype.ngAfterContentInit = function () {
|
|
30962
|
-
//
|
|
30963
|
-
// console.log(this.children);
|
|
30947
|
+
// Set dynamic all children
|
|
30964
30948
|
};
|
|
30965
30949
|
CommonAppComponentComponent.prototype.ngOnInit = function () {
|
|
30966
30950
|
var _this = this;
|
|
30967
|
-
// console.log(this.children);
|
|
30968
30951
|
var root = this._applicationContext.getRootContext();
|
|
30969
30952
|
this.rootData = root.data;
|
|
30970
30953
|
root.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code.toLowerCase() == _this.appCode.toLowerCase(); });
|
|
@@ -31230,11 +31213,11 @@
|
|
|
31230
31213
|
}
|
|
31231
31214
|
else if (evt.type === 'logout') {
|
|
31232
31215
|
// cleanup storage
|
|
31233
|
-
_this._applicationContext.getRootContext().data.isLoggingOut = true;
|
|
31234
31216
|
_this._authenService.cleanupLocalStorage();
|
|
31235
31217
|
_this._authenService.cleanupSessionStorage();
|
|
31236
31218
|
_this._storageUpdatedService.cleanupStorageService();
|
|
31237
|
-
_this._oauthService.revokeTokenAndLogout(null, true)
|
|
31219
|
+
_this._oauthService.revokeTokenAndLogout(null, true)
|
|
31220
|
+
.then(function (res) {
|
|
31238
31221
|
});
|
|
31239
31222
|
}
|
|
31240
31223
|
else if (evt.type == 'session_terminated') {
|
|
@@ -31254,6 +31237,14 @@
|
|
|
31254
31237
|
if (this._oauthService.hasValidAccessToken()) {
|
|
31255
31238
|
this._componentContextService.fireReplayEvent(ComCtxConstants.ROOT.USER_READY, this.firstTimeLogin);
|
|
31256
31239
|
this._oauthService.setupAutomaticSilentRefresh();
|
|
31240
|
+
// setInterval(() => {
|
|
31241
|
+
// console.log('start silent refresh');
|
|
31242
|
+
// this._oauthService.silentRefresh().then(rs => {
|
|
31243
|
+
// console.log('silent refresh', rs);
|
|
31244
|
+
// }).catch(err => {
|
|
31245
|
+
// console.log('silent refresh error', err);
|
|
31246
|
+
// });
|
|
31247
|
+
// }, 20000);
|
|
31257
31248
|
}
|
|
31258
31249
|
else {
|
|
31259
31250
|
if (!this._storageService.getItem('currentUrl')) {
|
|
@@ -46130,7 +46121,7 @@
|
|
|
46130
46121
|
AppSubMenuComponent.decorators = [
|
|
46131
46122
|
{ type: i0.Component, args: [{
|
|
46132
46123
|
selector: '[app-submenu]',
|
|
46133
|
-
template: "\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"(root ? item : item.items)\">\n\n <li *ngIf=\"child.visible !== false\"
|
|
46124
|
+
template: "\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"(root ? item : item.items)\">\n\n <li *ngIf=\"child.visible !== false\"\n [ngClass]=\"{'active-menuitem': child.activated, 'active-menuitem-2': !root}\">\n <a [href]=\"child.href\" class=\"ripplelink\" [attr.tabindex]=\"!visible ? '-1' : null\"\n [attr.level]=\"child.level\"\n [ngClass]=\"{'active-menuitem-routerlink': child.activated}\" (click)=\"itemClick($event, child)\"\n (mouseenter)=\"onMouseEnter(child)\"\n >\n <i [ngClass]=\"child.icon\" [attr.level]=\"level\"></i>\n <span *ngIf=\"child.fullLabel\" class=\"menu-label\" [pTooltip]=\"child.fullLabel\" tooltipPosition=\"top\">\n {{child.label}}\n <b *ngIf=\"child.count\" class=\"count-container\">\n <span>{{child.count}}</span>\n </b>\n </span>\n <span *ngIf=\"!child.fullLabel\" class=\"menu-label\">\n {{child.label}}\n <b *ngIf=\"child.count\" class=\"count-container\">\n <span>{{child.count}}</span>\n </b>\n </span>\n <i *ngIf=\"child.items\" class=\"pi pi-angle-down menuitem-toggle-icon\"></i>\n </a>\n\n <ul *ngIf=\"child.items\" app-submenu [item]=\"child\" [level]=\"level + 1\" [visible]=\"child.activated\"\n [@children]=\"((_commonService.isSlim()||_commonService.isHorizontal()) && root ? (child.activated ? 'visible' : 'hidden') : child.activated) ? 'visibleAnimated' : 'hiddenAnimated'\">\n </ul>\n </li>\n\n </ng-template>\n ",
|
|
46134
46125
|
animations: [
|
|
46135
46126
|
animations$1.trigger('children', [
|
|
46136
46127
|
animations$1.state('hiddenAnimated', animations$1.style({
|
|
@@ -46187,18 +46178,24 @@
|
|
|
46187
46178
|
// Nếu là môi trường triển khai thì cộng thêm tiền tố phân hệ vào router link để có thể chuột phải mở tab mới
|
|
46188
46179
|
funcSetNewTabLink = function (link) { return "/" + appCodeLowerCase + link; };
|
|
46189
46180
|
}
|
|
46190
|
-
this._router
|
|
46181
|
+
this._router
|
|
46182
|
+
.events
|
|
46183
|
+
.pipe(operators.filter(function (event) { return event instanceof i3$1.NavigationEnd; }))
|
|
46191
46184
|
.subscribe(function (event) {
|
|
46192
46185
|
for (var i in _this.model) {
|
|
46193
46186
|
var item = _this.model[i];
|
|
46194
46187
|
_this.activeItem(item);
|
|
46195
46188
|
}
|
|
46196
46189
|
});
|
|
46197
|
-
this._menuService
|
|
46190
|
+
this._menuService
|
|
46191
|
+
.menuChanged
|
|
46192
|
+
.subscribe(function (rawMenus) {
|
|
46198
46193
|
// reformat lại toàn bộ menu
|
|
46199
46194
|
_this.model = rawMenus;
|
|
46200
46195
|
_this.deQuySetNewTabLink(_this.model, funcSetNewTabLink, 1);
|
|
46201
|
-
_this._applicationContext
|
|
46196
|
+
_this._applicationContext
|
|
46197
|
+
.getRootContext()
|
|
46198
|
+
.fireEvent(ComCtxConstants.ROOT.MENU_RELOAD);
|
|
46202
46199
|
});
|
|
46203
46200
|
}
|
|
46204
46201
|
AppMenuComponent.prototype.deQuySetNewTabLink = function (menus, func, level) {
|
|
@@ -46221,12 +46218,12 @@
|
|
|
46221
46218
|
});
|
|
46222
46219
|
};
|
|
46223
46220
|
AppMenuComponent.prototype.ngOnInit = function () {
|
|
46224
|
-
if (this.autoRenderMenu
|
|
46221
|
+
if (this.autoRenderMenu) {
|
|
46225
46222
|
this.environment = this._moduleConfigService.getConfig().environment;
|
|
46226
46223
|
var appCode = this._moduleConfigService.getConfig().appCode;
|
|
46227
46224
|
this._menuService.renderMenuByAppCode(appCode);
|
|
46228
|
-
this.model = this._menuService.getMenuItems();
|
|
46229
46225
|
}
|
|
46226
|
+
this.model = this._menuService.getMenuItems();
|
|
46230
46227
|
};
|
|
46231
46228
|
AppMenuComponent.prototype.activeItem = function (item) {
|
|
46232
46229
|
if (item.url) {
|
|
@@ -46251,8 +46248,9 @@
|
|
|
46251
46248
|
this._title.setTitle(item.label + " - " + this.environment.appMetadata.main.owner);
|
|
46252
46249
|
item.activated = true;
|
|
46253
46250
|
}
|
|
46254
|
-
else
|
|
46251
|
+
else {
|
|
46255
46252
|
item.activated = false;
|
|
46253
|
+
}
|
|
46256
46254
|
}
|
|
46257
46255
|
return item.activated;
|
|
46258
46256
|
};
|
|
@@ -46310,7 +46308,7 @@
|
|
|
46310
46308
|
AppMenuComponent.decorators = [
|
|
46311
46309
|
{ type: i0.Component, args: [{
|
|
46312
46310
|
selector: 'app-menu',
|
|
46313
|
-
template: "\n <ul app-submenu [item]=\"model\" [level]=\"0\" [root]=\"true\" class=\"layout-menu layout-main-menu clearfix\"
|
|
46311
|
+
template: "\n <ul app-submenu [item]=\"model\" [level]=\"0\" [root]=\"true\" class=\"layout-menu layout-main-menu clearfix\"\n visible=\"true\"></ul>\n ",
|
|
46314
46312
|
styles: ["\n\n "]
|
|
46315
46313
|
},] }
|
|
46316
46314
|
];
|
|
@@ -55901,7 +55899,7 @@
|
|
|
55901
55899
|
UserPickerBoxComponent.decorators = [
|
|
55902
55900
|
{ type: i0.Component, args: [{
|
|
55903
55901
|
selector: 'user-picker-box',
|
|
55904
|
-
template: "<div [ngClass]=\"{'p-grid p-m-0': controlSetting.userType == userType.CanBo}\" class=\"tn-l-user-picker-box\">\r\n <ng-
|
|
55902
|
+
template: "<div [ngClass]=\"{'p-grid p-m-0': controlSetting.userType == userType.CanBo}\" class=\"tn-l-user-picker-box\">\r\n <ng-template [ngIf]=\"controlSetting.userType == userType.CanBo\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"'*'\">\r\n <ng-container *ngTemplateOutlet=\"entityPickerBox\"></ng-container>\r\n </as-split-area>\r\n </as-split>\r\n </ng-template>\r\n <ng-template [ngIf]=\"controlSetting.userType == userType.Normal\">\r\n <ng-container *ngTemplateOutlet=\"entityPickerBox\"></ng-container>\r\n </ng-template>\r\n\r\n</div>\r\n<ng-template #entityPickerBox>\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\" [advanceData]=\"advanceData\"\r\n [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\" (onChanged)=\"handleChangedEntity($event)\"\r\n (onSelect)=\"handleSelectEntity($event)\" (onUnSelect)=\"handleUnSelectEntity($event)\"\r\n (onDone)=\"handleDone($event)\" (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n</ng-template>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>",
|
|
55905
55903
|
providers: [ComponentContextService],
|
|
55906
55904
|
styles: [".action-btn{background-color:#fff;border:1px solid #0a89bf;color:#0a89bf;cursor:pointer;font-size:16px;margin:4px 2px;text-align:center;width:40px}.content-all{display:flex;flex-direction:column}.content-top{flex-grow:1}.content-bottom,.content-top{overflow:hidden;padding:5px 0}.content-bottom{border-top:1px solid #ddd;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{background:#fff;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{border-right:1px solid #aaa;height:100%}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{height:100%;padding-bottom:0;padding-top:0}@media (max-width:640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{left:auto;padding-bottom:5px;position:static;top:auto;transform:none}.tn-l-left-sidebar-wrapper{border-bottom:1px solid #aaa;border-right:unset;height:calc(100vh - 300px)}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{border:none;padding:0}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{background-color:#fff;margin-bottom:0;padding:.5em;position:-webkit-sticky;position:sticky;top:0;z-index:4}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width:640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}"]
|
|
55907
55905
|
},] }
|