tnx-shared 5.1.441 → 5.1.442
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 +34 -7
- 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/common-app-component.d.ts +2 -1
- package/components/common-app-component/common-app-component.d.ts.map +1 -1
- package/esm2015/components/common-app-component/common-app-component.js +24 -8
- package/esm2015/services/user.service.js +5 -1
- package/fesm2015/tnx-shared.js +25 -6
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/user.service.d.ts +1 -0
- package/services/user.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -11403,6 +11403,10 @@
|
|
|
11403
11403
|
var url = this.serviceUri + "/ModifyUserInfo/" + id;
|
|
11404
11404
|
return this.defaultPut(url, userInfo);
|
|
11405
11405
|
};
|
|
11406
|
+
UserService.prototype.changeFirstTimeLogin = function (userId) {
|
|
11407
|
+
var url = this.serviceUri + "/ChangeFirstTimeLogin/" + userId;
|
|
11408
|
+
return this.defaultGet(url);
|
|
11409
|
+
};
|
|
11406
11410
|
return UserService;
|
|
11407
11411
|
}(BaseService));
|
|
11408
11412
|
UserService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserService_Factory() { return new UserService(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(AuthenService), i0.ɵɵinject(i4.OAuthService), i0.ɵɵinject(SignalRService), i0.ɵɵinject(ExceptionHandlerService), i0.ɵɵinject(ApplicationContextService)); }, token: UserService, providedIn: "root" });
|
|
@@ -31590,8 +31594,9 @@
|
|
|
31590
31594
|
};
|
|
31591
31595
|
|
|
31592
31596
|
var CommonAppComponentComponent = /** @class */ (function () {
|
|
31593
|
-
function CommonAppComponentComponent(_globalService, _commonService, renderer, translate, _oauthService, _authenService, _userService, _router, _title, _signalRService, _storageUpdatedService, _customRouteService, _applicationContext, _componentContextService, _activatedRoute, _deviceDetectorService, _cd, _tnClientService, _coreConfigService, _notifierService, _entityMetadataService, _moduleConfigService, _translateService, _messageService, _confirmService, _menuService, _primengConfig, _storageService, _permissionService, _customizeUiService) {
|
|
31597
|
+
function CommonAppComponentComponent(document, _globalService, _commonService, renderer, translate, _oauthService, _authenService, _userService, _router, _title, _signalRService, _storageUpdatedService, _customRouteService, _applicationContext, _componentContextService, _activatedRoute, _deviceDetectorService, _cd, _tnClientService, _coreConfigService, _notifierService, _entityMetadataService, _moduleConfigService, _translateService, _messageService, _confirmService, _menuService, _primengConfig, _storageService, _permissionService, _customizeUiService) {
|
|
31594
31598
|
var _this = this;
|
|
31599
|
+
this.document = document;
|
|
31595
31600
|
this._globalService = _globalService;
|
|
31596
31601
|
this._commonService = _commonService;
|
|
31597
31602
|
this.renderer = renderer;
|
|
@@ -31647,7 +31652,7 @@
|
|
|
31647
31652
|
this.currentKeyPressIndex = 0;
|
|
31648
31653
|
this.EnumTypeSplash = exports.EnumTypeSplash;
|
|
31649
31654
|
this.layoutLoadingPage = exports.EnumTypeSplash.NEW_V1;
|
|
31650
|
-
this.favIcon = document.querySelector('#appFavicon');
|
|
31655
|
+
this.favIcon = this.document.querySelector('#appFavicon');
|
|
31651
31656
|
this.icon = '';
|
|
31652
31657
|
this.environment = this._moduleConfigService.getConfig().environment;
|
|
31653
31658
|
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
@@ -31698,19 +31703,40 @@
|
|
|
31698
31703
|
this._componentContextService.data.personalize = {};
|
|
31699
31704
|
}
|
|
31700
31705
|
this._componentContextService.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) { return __awaiter(_this, void 0, void 0, function () {
|
|
31701
|
-
var subPath, oldUrl;
|
|
31706
|
+
var domain, subPath, linkRedirect_1, oldUrl;
|
|
31702
31707
|
var _this = this;
|
|
31703
31708
|
return __generator(this, function (_a) {
|
|
31704
31709
|
this._entityMetadataService.setupSyncCacheEntityMetadata();
|
|
31705
31710
|
this._router.config
|
|
31706
31711
|
.forEach(function (route) { return _this.addGuard(route); });
|
|
31707
31712
|
if (this.environment.authenticationSettings.isCheckFirstTimeLogin && this.rootData.currentUser.isFirstLogin) {
|
|
31708
|
-
|
|
31713
|
+
domain = this.environment.clientDomain.appDomain;
|
|
31714
|
+
subPath = '/user';
|
|
31715
|
+
// vì DHGTVT dùng đồng thời userv5 và userv4
|
|
31709
31716
|
if (this.environment.maTruong == 'DHGTVT') {
|
|
31710
|
-
subPath = 'userv5';
|
|
31717
|
+
subPath = '/userv5';
|
|
31718
|
+
}
|
|
31719
|
+
linkRedirect_1 = "" + domain + subPath + "/change-password";
|
|
31720
|
+
if (this.document.location.href != linkRedirect_1) {
|
|
31721
|
+
setTimeout(function () {
|
|
31722
|
+
_this._notifierService.showConfirm('Bạn vui lòng đổi mật khẩu mặc định trong lần đăng nhập đầu tiên để tăng tính bảo mật của hệ thống!').then(function (rs) { return __awaiter(_this, void 0, void 0, function () {
|
|
31723
|
+
return __generator(this, function (_a) {
|
|
31724
|
+
switch (_a.label) {
|
|
31725
|
+
case 0:
|
|
31726
|
+
if (!!rs) return [3 /*break*/, 2];
|
|
31727
|
+
return [4 /*yield*/, this._userService.changeFirstTimeLogin(this.rootData.currentUser.userId)];
|
|
31728
|
+
case 1:
|
|
31729
|
+
_a.sent();
|
|
31730
|
+
this._componentContextService.fireEvent(ComCtxConstants.ROOT.USER_INFO_CHANGED, true);
|
|
31731
|
+
return [2 /*return*/];
|
|
31732
|
+
case 2:
|
|
31733
|
+
this.document.location.href = linkRedirect_1;
|
|
31734
|
+
return [2 /*return*/];
|
|
31735
|
+
}
|
|
31736
|
+
});
|
|
31737
|
+
}); });
|
|
31738
|
+
}, 1000);
|
|
31711
31739
|
}
|
|
31712
|
-
this._router.navigate([subPath + "/change-password"]);
|
|
31713
|
-
this.pageLoaded = true;
|
|
31714
31740
|
}
|
|
31715
31741
|
if (this.firstTimeLogin) {
|
|
31716
31742
|
// lần đầu đăng nhập thì vào trang mặc định
|
|
@@ -32400,6 +32426,7 @@
|
|
|
32400
32426
|
},] }
|
|
32401
32427
|
];
|
|
32402
32428
|
CommonAppComponentComponent.ctorParameters = function () { return [
|
|
32429
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [i4$1.DOCUMENT,] }] },
|
|
32403
32430
|
{ type: GlobalService },
|
|
32404
32431
|
{ type: CommonService },
|
|
32405
32432
|
{ type: i0.Renderer2 },
|