tnx-shared 5.1.441 → 5.1.443
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 +43 -11
- 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/classes/base/list-component-base.d.ts +3 -2
- package/classes/base/list-component-base.d.ts.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/classes/base/list-component-base.js +8 -5
- 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 +32 -10
- 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" });
|
|
@@ -21929,7 +21933,11 @@
|
|
|
21929
21933
|
};
|
|
21930
21934
|
this._templateInstanceService.fillTemplateByCode('ExportWordCommon', dataExport, header);
|
|
21931
21935
|
};
|
|
21932
|
-
ListComponentBase.prototype.
|
|
21936
|
+
ListComponentBase.prototype.exportAll = function () {
|
|
21937
|
+
this.exportByReadingHtml(true);
|
|
21938
|
+
};
|
|
21939
|
+
ListComponentBase.prototype.exportByReadingHtml = function (exportAll) {
|
|
21940
|
+
if (exportAll === void 0) { exportAll = false; }
|
|
21933
21941
|
if (this._groupField) {
|
|
21934
21942
|
this._notifierService.showWarning('Chưa hỗ trợ xuất có nhóm dữ liệu!');
|
|
21935
21943
|
return;
|
|
@@ -21944,7 +21952,7 @@
|
|
|
21944
21952
|
return;
|
|
21945
21953
|
}
|
|
21946
21954
|
// body.
|
|
21947
|
-
var arrRowData = this.getArrRowDataByHtml(bodyEle, arrHead);
|
|
21955
|
+
var arrRowData = this.getArrRowDataByHtml(bodyEle, arrHead, exportAll);
|
|
21948
21956
|
// export.
|
|
21949
21957
|
var dataExport = __spread([arrHead.map(function (i) { return i.value; })], arrRowData);
|
|
21950
21958
|
var fileName = "Danh s\u00E1ch " + this.setting.objectName;
|
|
@@ -21991,9 +21999,10 @@
|
|
|
21991
21999
|
}
|
|
21992
22000
|
return arrHeader;
|
|
21993
22001
|
};
|
|
21994
|
-
ListComponentBase.prototype.getArrRowDataByHtml = function (bodyEle, arrHead) {
|
|
22002
|
+
ListComponentBase.prototype.getArrRowDataByHtml = function (bodyEle, arrHead, exportAll) {
|
|
21995
22003
|
var _this = this;
|
|
21996
|
-
|
|
22004
|
+
if (exportAll === void 0) { exportAll = false; }
|
|
22005
|
+
var arrRow = exportAll ? bodyEle.querySelectorAll('tr') : bodyEle.querySelectorAll('tr.ui-state-highlight');
|
|
21997
22006
|
if (!arrRow.length) {
|
|
21998
22007
|
return [];
|
|
21999
22008
|
}
|
|
@@ -31590,8 +31599,9 @@
|
|
|
31590
31599
|
};
|
|
31591
31600
|
|
|
31592
31601
|
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) {
|
|
31602
|
+
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
31603
|
var _this = this;
|
|
31604
|
+
this.document = document;
|
|
31595
31605
|
this._globalService = _globalService;
|
|
31596
31606
|
this._commonService = _commonService;
|
|
31597
31607
|
this.renderer = renderer;
|
|
@@ -31647,7 +31657,7 @@
|
|
|
31647
31657
|
this.currentKeyPressIndex = 0;
|
|
31648
31658
|
this.EnumTypeSplash = exports.EnumTypeSplash;
|
|
31649
31659
|
this.layoutLoadingPage = exports.EnumTypeSplash.NEW_V1;
|
|
31650
|
-
this.favIcon = document.querySelector('#appFavicon');
|
|
31660
|
+
this.favIcon = this.document.querySelector('#appFavicon');
|
|
31651
31661
|
this.icon = '';
|
|
31652
31662
|
this.environment = this._moduleConfigService.getConfig().environment;
|
|
31653
31663
|
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
@@ -31698,19 +31708,40 @@
|
|
|
31698
31708
|
this._componentContextService.data.personalize = {};
|
|
31699
31709
|
}
|
|
31700
31710
|
this._componentContextService.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) { return __awaiter(_this, void 0, void 0, function () {
|
|
31701
|
-
var subPath, oldUrl;
|
|
31711
|
+
var domain, subPath, linkRedirect_1, oldUrl;
|
|
31702
31712
|
var _this = this;
|
|
31703
31713
|
return __generator(this, function (_a) {
|
|
31704
31714
|
this._entityMetadataService.setupSyncCacheEntityMetadata();
|
|
31705
31715
|
this._router.config
|
|
31706
31716
|
.forEach(function (route) { return _this.addGuard(route); });
|
|
31707
31717
|
if (this.environment.authenticationSettings.isCheckFirstTimeLogin && this.rootData.currentUser.isFirstLogin) {
|
|
31708
|
-
|
|
31718
|
+
domain = this.environment.clientDomain.appDomain;
|
|
31719
|
+
subPath = '/user';
|
|
31720
|
+
// vì DHGTVT dùng đồng thời userv5 và userv4
|
|
31709
31721
|
if (this.environment.maTruong == 'DHGTVT') {
|
|
31710
|
-
subPath = 'userv5';
|
|
31722
|
+
subPath = '/userv5';
|
|
31723
|
+
}
|
|
31724
|
+
linkRedirect_1 = "" + domain + subPath + "/change-password";
|
|
31725
|
+
if (this.document.location.href != linkRedirect_1) {
|
|
31726
|
+
setTimeout(function () {
|
|
31727
|
+
_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 () {
|
|
31728
|
+
return __generator(this, function (_a) {
|
|
31729
|
+
switch (_a.label) {
|
|
31730
|
+
case 0:
|
|
31731
|
+
if (!!rs) return [3 /*break*/, 2];
|
|
31732
|
+
return [4 /*yield*/, this._userService.changeFirstTimeLogin(this.rootData.currentUser.userId)];
|
|
31733
|
+
case 1:
|
|
31734
|
+
_a.sent();
|
|
31735
|
+
this._componentContextService.fireEvent(ComCtxConstants.ROOT.USER_INFO_CHANGED, true);
|
|
31736
|
+
return [2 /*return*/];
|
|
31737
|
+
case 2:
|
|
31738
|
+
this.document.location.href = linkRedirect_1;
|
|
31739
|
+
return [2 /*return*/];
|
|
31740
|
+
}
|
|
31741
|
+
});
|
|
31742
|
+
}); });
|
|
31743
|
+
}, 1000);
|
|
31711
31744
|
}
|
|
31712
|
-
this._router.navigate([subPath + "/change-password"]);
|
|
31713
|
-
this.pageLoaded = true;
|
|
31714
31745
|
}
|
|
31715
31746
|
if (this.firstTimeLogin) {
|
|
31716
31747
|
// lần đầu đăng nhập thì vào trang mặc định
|
|
@@ -32400,6 +32431,7 @@
|
|
|
32400
32431
|
},] }
|
|
32401
32432
|
];
|
|
32402
32433
|
CommonAppComponentComponent.ctorParameters = function () { return [
|
|
32434
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [i4$1.DOCUMENT,] }] },
|
|
32403
32435
|
{ type: GlobalService },
|
|
32404
32436
|
{ type: CommonService },
|
|
32405
32437
|
{ type: i0.Renderer2 },
|