tnx-shared 5.0.17 → 5.0.21
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/assets/gulpfile.js +10 -4
- package/bundles/tnx-shared.umd.js +1170 -528
- 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/public-function.d.ts +1 -1
- package/components/common-app-component/app-topbar-v1/app-topbar-v1.component.d.ts.map +1 -1
- package/components/common-app-component/app-topbar-v2/app-topbar-v2.component.d.ts +78 -0
- package/components/common-app-component/app-topbar-v2/app-topbar-v2.component.d.ts.map +1 -0
- package/components/common-app-component/app-topbar-v2/app-topbar-v2.component.ngfactory.d.ts.map +1 -0
- package/components/common-app-component/app-topbar-v2/app-topbar-v2.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/components/common-app-component/app.topbar.component.d.ts.map +1 -1
- package/components/crud/crud-form/crud-form.component.d.ts +2 -2
- package/components/splash-component/splash-component-v1/splash-component-v1.component.d.ts.map +1 -1
- package/components/splash-component/splash-component-v2/splash-component-v2.component.d.ts +41 -0
- package/components/splash-component/splash-component-v2/splash-component-v2.component.d.ts.map +1 -0
- package/components/splash-component/splash-component-v2/splash-component-v2.component.ngfactory.d.ts.map +1 -0
- package/components/splash-component/splash-component-v2/splash-component-v2.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/components/splash-component/splash-component.component.d.ts +2 -1
- package/components/splash-component/splash-component.component.d.ts.map +1 -1
- package/esm2015/components/common-app-component/app-topbar-v1/app-topbar-v1.component.js +6 -4
- package/esm2015/components/common-app-component/app-topbar-v2/app-topbar-v2.component.js +412 -0
- package/esm2015/components/common-app-component/app.topbar.component.js +5 -3
- package/esm2015/components/crud/advance-search/advance-search.component.js +1 -1
- package/esm2015/components/query-builders/query-builder/query-builder.component.js +1 -1
- package/esm2015/components/splash-component/splash-component-v1/splash-component-v1.component.js +4 -4
- package/esm2015/components/splash-component/splash-component-v2/splash-component-v2.component.js +194 -0
- package/esm2015/components/splash-component/splash-component.component.js +4 -3
- package/esm2015/components/tn-tabview/tn-tabview.component.js +1 -1
- package/esm2015/components/user-picker/user-picker-box/user-picker-box.component.js +1 -1
- package/esm2015/components/workflow/workflow-picker/workflow-picker.component.js +1 -1
- package/esm2015/components/workflow/workflow-setting-new/workflow-setting-new.component.js +1 -1
- package/esm2015/tnx-shared.js +93 -91
- package/esm2015/tnx-shared.module.js +7 -3
- package/fesm2015/tnx-shared.js +997 -410
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.d.ts +92 -90
- package/tnx-shared.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
- package/tnx-shared.module.d.ts +5 -3
- package/tnx-shared.module.d.ts.map +1 -1
- package/tnx-shared.module.ngfactory.d.ts.map +1 -1
|
@@ -9706,6 +9706,7 @@
|
|
|
9706
9706
|
(function (EnumTypeSplash) {
|
|
9707
9707
|
EnumTypeSplash["DEFAULT"] = "Default";
|
|
9708
9708
|
EnumTypeSplash["NEW_V1"] = "v1";
|
|
9709
|
+
EnumTypeSplash["NEW_V2"] = "v2";
|
|
9709
9710
|
})(exports.EnumTypeSplash || (exports.EnumTypeSplash = {}));
|
|
9710
9711
|
var SplashComponentComponent = /** @class */ (function (_super) {
|
|
9711
9712
|
__extends(SplashComponentComponent, _super);
|
|
@@ -9905,9 +9906,9 @@
|
|
|
9905
9906
|
SplashComponentComponent.decorators = [
|
|
9906
9907
|
{ type: i0.Component, args: [{
|
|
9907
9908
|
selector: 'splash-component',
|
|
9908
|
-
template: "<ng-container
|
|
9909
|
+
template: "<ng-container [ngSwitch]=\"uiSplash\">\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"defaultSplash\">\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"EnumTypeSplash.NEW_V1\">\r\n <splash-component-v1></splash-component-v1>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"EnumTypeSplash.NEW_V2\">\r\n <splash-component-v2></splash-component-v2>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #defaultSplash>\r\n <div *ngIf=\"!loaded\" class=\"wrp-loader\">\r\n <div class=\"loader\"></div>\r\n </div>\r\n <div *ngIf=\"loaded\" class=\"modules\">\r\n <div class=\"welcome-user\">\r\n <img class=\"profile-image custom-avatar\" [src-fallback]=\"defaultAvatar\" [src]=\"getCurrentUserAvatar()\" />\r\n <h2>Xin ch\u00E0o\r\n <span *ngIf=\"currentUser\">{{currentUser.fullName}}</span>\r\n <span *ngIf=\"!currentUser\">kh\u00E1ch</span>!\r\n </h2>\r\n <ng-container *ngIf=\"currentUser\">\r\n <a (click)=\"goToPersonal()\"><i class=\"fas fa-user\"></i>Trang c\u00E1 nh\u00E2n</a>\r\n <ng-container>|</ng-container>\r\n <a style=\"background: #f7e08b;\" (click)=\"logout()\">\r\n <i class=\"fas fa-sign-out-alt\"></i>\u0110\u0103ng xu\u1EA5t\r\n </a>\r\n </ng-container>\r\n <a *ngIf=\"!currentUser\" style=\"background: #f7e08b;\" (click)=\"login()\">\r\n <i class=\"fas fa-sign-in-alt\"></i>\u0110\u0103ng nh\u1EADp\r\n </a>\r\n </div>\r\n <div class=\"module-icons\">\r\n <h1>{{environment.appMetadata.main.title}}</h1>\r\n <h2>{{environment.appMetadata.main.owner}}</h2>\r\n <div class=\"div1111-wrapper\">\r\n <tn-custom-scrollbar *ngIf=\"!isOnMobile\" [config]=\"{'suppressScrollY': true}\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </tn-custom-scrollbar>\r\n\r\n <ng-container *ngIf=\"isOnMobile\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"clock-wrapper\">\r\n <h1 class=\"clock\">{{currentDate | date:'HH:mm:ss'}}</h1>\r\n <h4 class=\"data-time\">{{getNgayTrongTuan()}}, ng\u00E0y {{currentDate | date:'dd/MM/yyyy'}}</h4>\r\n </div>\r\n </div>\r\n\r\n <ng-template #appSwitcher>\r\n <div class=\"div1111\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <span>\r\n <a [style.background]=\"item.background\" (click)=\"switchApp(item)\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon\" [style.color]=\"item.colorIcon\"></i>\r\n <span [style.color]=\"item.colorTitle\">{{ item.title | translate}}</span>\r\n </a>\r\n </span>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n</ng-template>",
|
|
9909
9910
|
providers: [ComponentContextService],
|
|
9910
|
-
styles: [".modules{align-items:center;background:url(/assets/images/splash-bg.png);background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;flex-direction:column;font-family:monospace;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules div>span{box-shadow:1px 2px 9px 1px #bbb;height:100px;margin:10px;min-width:100px;white-space:normal;width:100px}.modules div>span,.modules div>span>a{border-radius:5px;display:inline-block}.modules div>span>a{color:#fff;cursor:pointer;font-weight:700;height:100%;position:relative;text-align:center;text-decoration:unset;text-shadow:2px 3px 3px hsla(0,0%,42.7%,.4392156862745098);width:100%}.modules div>span>a i{-webkit-animation:in 1s;animation:in 1s}.modules div>span>a:hover i{-webkit-animation:out 1s;animation:out 1s}@-webkit-keyframes in{0%{-webkit-transform:rotateY(0deg)}to{-webkit-transform:rotateY(1turn)}}@-webkit-keyframes out{0%{-webkit-transform:rotateY(1turn)}to{-webkit-transform:rotateY(0deg)}}@media (max-width:1370px){.modules{justify-content:flex-start;overflow:auto}.module-icons.module-icons{margin-bottom:20px}.welcome-user.welcome-user{margin-bottom:30px;margin-top:30px}.welcome-user.welcome-user img{height:100px;width:100px}.clock{font-size:1.5em;margin:0 20px}.data-time{font-size:1em;margin:10px 0 20px}}.modules div>span>a>span{bottom:10px;color:#fff;display:inline-block;left:0;position:absolute;text-align:center;text-decoration:unset;width:100%}.modules div>span.implementing{background-color:#fff;box-shadow:none}.modules div>span>a>i{font-size:3em;left:0;position:absolute;top:10px;width:100%}.div22{width:240px}.div33{width:360px}.div44{width:480px}.div55{width:600px}.div88{width:960px}::ng-deep .flexcolumn{max-width:calc(100vh - 20px)}.div1111-wrapper{overflow:auto;width:100%}.div1111{white-space:nowrap}.module-icons{color:#666;width:100%}.module-icons,.welcome-user{margin-bottom:80px;text-align:center}.welcome-user a{background:#c2f3c3;border-radius:3px;cursor:pointer;padding:6px}.welcome-user a i{margin-right:6px}.welcome-user img{-o-object-fit:contain;border:2px dashed rgba(0,144,162,.5019607843137255);border-radius:50%;height:200px;object-fit:contain;width:200px}.welcome-user h2{color:#0090a2}.clock-wrapper{color:rgba(0,144,162,.6666666666666666);font-size:2em;text-align:center}.loader{-webkit-animation:load4 1.3s linear infinite;animation:load4 1.3s linear infinite;border-radius:50%;color:#607d8b;font-size:
|
|
9911
|
+
styles: [".modules{align-items:center;background:url(/assets/images/splash-bg.png);background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;flex-direction:column;font-family:monospace;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules div>span{box-shadow:1px 2px 9px 1px #bbb;height:100px;margin:10px;min-width:100px;white-space:normal;width:100px}.modules div>span,.modules div>span>a{border-radius:5px;display:inline-block}.modules div>span>a{color:#fff;cursor:pointer;font-weight:700;height:100%;position:relative;text-align:center;text-decoration:unset;text-shadow:2px 3px 3px hsla(0,0%,42.7%,.4392156862745098);width:100%}.modules div>span>a i{-webkit-animation:in 1s;animation:in 1s}.modules div>span>a:hover i{-webkit-animation:out 1s;animation:out 1s}@-webkit-keyframes in{0%{-webkit-transform:rotateY(0deg)}to{-webkit-transform:rotateY(1turn)}}@-webkit-keyframes out{0%{-webkit-transform:rotateY(1turn)}to{-webkit-transform:rotateY(0deg)}}@media (max-width:1370px){.modules{justify-content:flex-start;overflow:auto}.module-icons.module-icons{margin-bottom:20px}.welcome-user.welcome-user{margin-bottom:30px;margin-top:30px}.welcome-user.welcome-user img{height:100px;width:100px}.clock{font-size:1.5em;margin:0 20px}.data-time{font-size:1em;margin:10px 0 20px}}.modules div>span>a>span{bottom:10px;color:#fff;display:inline-block;left:0;position:absolute;text-align:center;text-decoration:unset;width:100%}.modules div>span.implementing{background-color:#fff;box-shadow:none}.modules div>span>a>i{font-size:3em;left:0;position:absolute;top:10px;width:100%}.div22{width:240px}.div33{width:360px}.div44{width:480px}.div55{width:600px}.div88{width:960px}::ng-deep .flexcolumn{max-width:calc(100vh - 20px)}.div1111-wrapper{overflow:auto;width:100%}.div1111{white-space:nowrap}.module-icons{color:#666;width:100%}.module-icons,.welcome-user{margin-bottom:80px;text-align:center}.welcome-user a{background:#c2f3c3;border-radius:3px;cursor:pointer;padding:6px}.welcome-user a i{margin-right:6px}.welcome-user img{-o-object-fit:contain;border:2px dashed rgba(0,144,162,.5019607843137255);border-radius:50%;height:200px;object-fit:contain;width:200px}.welcome-user h2{color:#0090a2}.clock-wrapper{color:rgba(0,144,162,.6666666666666666);font-size:2em;text-align:center}.wrp-loader{display:inline-block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:101}.wrp-loader .loader{-webkit-animation:load4 1.3s linear infinite;animation:load4 1.3s linear infinite;border:2px solid #bcdbf5;border-radius:50%;border-top-color:#3192e1;color:#607d8b;display:block;font-size:10px;height:10px;width:10px}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
|
|
9911
9912
|
},] }
|
|
9912
9913
|
];
|
|
9913
9914
|
SplashComponentComponent.ctorParameters = function () { return [
|
|
@@ -20357,430 +20358,6 @@
|
|
|
20357
20358
|
{ type: i0.Injector }
|
|
20358
20359
|
]; };
|
|
20359
20360
|
|
|
20360
|
-
var AppTopBarV1Component = /** @class */ (function (_super) {
|
|
20361
|
-
__extends(AppTopBarV1Component, _super);
|
|
20362
|
-
function AppTopBarV1Component(
|
|
20363
|
-
// public app: AppComponent,
|
|
20364
|
-
_customRouteService, _router, _commonService, _authenService, _cd, _injector, _permissionService, _moduleConfigService, _userService, _notifierService, _translateService) {
|
|
20365
|
-
var _this = _super.call(this, _injector) || this;
|
|
20366
|
-
_this._customRouteService = _customRouteService;
|
|
20367
|
-
_this._router = _router;
|
|
20368
|
-
_this._commonService = _commonService;
|
|
20369
|
-
_this._authenService = _authenService;
|
|
20370
|
-
_this._cd = _cd;
|
|
20371
|
-
_this._permissionService = _permissionService;
|
|
20372
|
-
_this._moduleConfigService = _moduleConfigService;
|
|
20373
|
-
_this._userService = _userService;
|
|
20374
|
-
_this._notifierService = _notifierService;
|
|
20375
|
-
_this._translateService = _translateService;
|
|
20376
|
-
_this.defaultAvatar = '';
|
|
20377
|
-
_this.key = '';
|
|
20378
|
-
_this.currentRoute = '';
|
|
20379
|
-
_this.fileApi = '';
|
|
20380
|
-
_this.currentUser = null;
|
|
20381
|
-
_this.appSwitcherItems = [];
|
|
20382
|
-
_this.isFirstTime = false;
|
|
20383
|
-
_this.showSettings = false;
|
|
20384
|
-
_this.allSubscriptions = [];
|
|
20385
|
-
_this.message = '';
|
|
20386
|
-
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
20387
|
-
_this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
|
|
20388
|
-
_this.fileApi = _this.environment.apiDomain.fileEndpoint;
|
|
20389
|
-
if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
|
|
20390
|
-
_this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
|
|
20391
|
-
}
|
|
20392
|
-
else {
|
|
20393
|
-
if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
|
|
20394
|
-
_this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
|
|
20395
|
-
}
|
|
20396
|
-
else {
|
|
20397
|
-
_this.showDefaultSetting = false;
|
|
20398
|
-
}
|
|
20399
|
-
}
|
|
20400
|
-
if (!_this.rootContext.data.currentUser) {
|
|
20401
|
-
_this.rootContext.data.currentUser = {};
|
|
20402
|
-
}
|
|
20403
|
-
// this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT.USER_INFO_CHANGED, rs => {
|
|
20404
|
-
// this._cd.detectChanges();
|
|
20405
|
-
// }));
|
|
20406
|
-
_this.rootContext.replaySubscribeOnce(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
|
|
20407
|
-
_this.currentUser = _this._userService.getCurrentUser();
|
|
20408
|
-
_this.loadMenuMetadata();
|
|
20409
|
-
});
|
|
20410
|
-
if (_this.rootModel.allowAnonymous) {
|
|
20411
|
-
_this.loadMenuMetadata();
|
|
20412
|
-
}
|
|
20413
|
-
return _this;
|
|
20414
|
-
}
|
|
20415
|
-
AppTopBarV1Component.prototype.loadMenuMetadata = function () {
|
|
20416
|
-
var _this = this;
|
|
20417
|
-
var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
20418
|
-
var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
|
|
20419
|
-
return __generator(this, function (_c) {
|
|
20420
|
-
switch (_c.label) {
|
|
20421
|
-
case 0:
|
|
20422
|
-
arr = [];
|
|
20423
|
-
_a = [];
|
|
20424
|
-
for (_b in this.environment.appMetadata.appSwitcher)
|
|
20425
|
-
_a.push(_b);
|
|
20426
|
-
_i = 0;
|
|
20427
|
-
_c.label = 1;
|
|
20428
|
-
case 1:
|
|
20429
|
-
if (!(_i < _a.length)) return [3 /*break*/, 5];
|
|
20430
|
-
ind = _a[_i];
|
|
20431
|
-
element = this.environment.appMetadata.appSwitcher[ind];
|
|
20432
|
-
clientId = this.environment.authenticationSettings.clientId;
|
|
20433
|
-
if (!(this.rootContext.data.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
|
|
20434
|
-
arr.push(element);
|
|
20435
|
-
return [3 /*break*/, 4];
|
|
20436
|
-
case 2:
|
|
20437
|
-
if (!this.currentUser) return [3 /*break*/, 4];
|
|
20438
|
-
return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
|
|
20439
|
-
case 3:
|
|
20440
|
-
isAuthorized = _c.sent();
|
|
20441
|
-
if (isAuthorized) {
|
|
20442
|
-
arr.push(element);
|
|
20443
|
-
}
|
|
20444
|
-
_c.label = 4;
|
|
20445
|
-
case 4:
|
|
20446
|
-
_i++;
|
|
20447
|
-
return [3 /*break*/, 1];
|
|
20448
|
-
case 5:
|
|
20449
|
-
resolve(arr);
|
|
20450
|
-
return [2 /*return*/];
|
|
20451
|
-
}
|
|
20452
|
-
});
|
|
20453
|
-
}); });
|
|
20454
|
-
prmsAppSwicherItem.then(function (rs) {
|
|
20455
|
-
if (rs) {
|
|
20456
|
-
var currentUser_1 = _this._userService.getCurrentUser();
|
|
20457
|
-
_this.appSwitcherItems.length = 0;
|
|
20458
|
-
rs.forEach(function (element) {
|
|
20459
|
-
if (element.visible) {
|
|
20460
|
-
if (element.allowAnonymous) {
|
|
20461
|
-
_this.appSwitcherItems.push(element);
|
|
20462
|
-
}
|
|
20463
|
-
else {
|
|
20464
|
-
if (currentUser_1.maNguoiHoc && currentUser_1.issuperuser && currentUser_1.issuperuser.toLowerCase() != 'true') {
|
|
20465
|
-
if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
|
|
20466
|
-
_this.appSwitcherItems.push(element);
|
|
20467
|
-
}
|
|
20468
|
-
}
|
|
20469
|
-
else {
|
|
20470
|
-
_this.appSwitcherItems.push(element);
|
|
20471
|
-
}
|
|
20472
|
-
}
|
|
20473
|
-
}
|
|
20474
|
-
});
|
|
20475
|
-
}
|
|
20476
|
-
});
|
|
20477
|
-
};
|
|
20478
|
-
AppTopBarV1Component.prototype.ngOnInit = function () {
|
|
20479
|
-
var _this = this;
|
|
20480
|
-
if (this.rootContext.data.currentUser) {
|
|
20481
|
-
if (this.rootContext.data.currentUser.gender == 0) {
|
|
20482
|
-
this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
|
|
20483
|
-
}
|
|
20484
|
-
else {
|
|
20485
|
-
this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
|
|
20486
|
-
}
|
|
20487
|
-
this.userProfile = this._userService.getProfileInfo();
|
|
20488
|
-
}
|
|
20489
|
-
this.rootContext.subscribe(ComCtxConstants.ROOT.BODY_MOUSE_DOWN, function (e) {
|
|
20490
|
-
setTimeout(function () { _this.hideAdvanceSearch(e); });
|
|
20491
|
-
});
|
|
20492
|
-
this.rootContext.subscribe(ComCtxConstants.ROOT.KEY_DOWN_CTRL_F, function (e) {
|
|
20493
|
-
_this.focusToSearchBox();
|
|
20494
|
-
});
|
|
20495
|
-
this.rootContext.subscribe(ComCtxConstants.COMMON.FORCE_RELOAD, function (e) {
|
|
20496
|
-
_this.showNotificationReload();
|
|
20497
|
-
});
|
|
20498
|
-
this.rootContext.subscribe(ComCtxConstants.COMMON.SHOW_NOTIFY, function (e) {
|
|
20499
|
-
_this.setNotify(e.message);
|
|
20500
|
-
});
|
|
20501
|
-
this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT_USMART.SHOW_CONFIG_DATA_DEFAULT, function (e) {
|
|
20502
|
-
_this.model.dataModelSetting.showSettings = true;
|
|
20503
|
-
}));
|
|
20504
|
-
this.model.dataModelSetting = {
|
|
20505
|
-
data: {},
|
|
20506
|
-
showSettings: false
|
|
20507
|
-
};
|
|
20508
|
-
this.subscribe(ComCtxConstants.COMMON.SAVE_DATA_DEFAULT, function (data) {
|
|
20509
|
-
_this.formatDefaultDataSetting(data);
|
|
20510
|
-
_this.reloadWindow();
|
|
20511
|
-
});
|
|
20512
|
-
var stringDataDefault = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.DEFAULT_DATA);
|
|
20513
|
-
if (stringDataDefault) {
|
|
20514
|
-
var dataCacheDefault = JSON.parse(stringDataDefault);
|
|
20515
|
-
this.formatDefaultDataSetting(dataCacheDefault);
|
|
20516
|
-
}
|
|
20517
|
-
else {
|
|
20518
|
-
this.defaultDataSetting = 'Thiết lập tham số mặc định';
|
|
20519
|
-
}
|
|
20520
|
-
};
|
|
20521
|
-
AppTopBarV1Component.prototype.ngOnDestroy = function () {
|
|
20522
|
-
this.allSubscriptions.forEach(function (element) {
|
|
20523
|
-
element.unsubscribe();
|
|
20524
|
-
});
|
|
20525
|
-
if (this.intervalCountdown) {
|
|
20526
|
-
clearInterval(this.intervalCountdown);
|
|
20527
|
-
}
|
|
20528
|
-
_super.prototype.ngOnDestroy.call(this);
|
|
20529
|
-
};
|
|
20530
|
-
AppTopBarV1Component.prototype.formatDefaultDataSetting = function (data) {
|
|
20531
|
-
var _this = this;
|
|
20532
|
-
var dataSetting = '';
|
|
20533
|
-
var fields = ['instanceIdHeDaoTao', 'heDaoTao', 'namHoc', 'hocKy', 'instanceIdNamHoc', 'instanceIdHocKy', 'idDotThi'];
|
|
20534
|
-
var fieldPluses = ['code', 'code', 'ten', 'ten', 'ten', 'ten', 'ten'];
|
|
20535
|
-
fields.forEach(function (field, index) {
|
|
20536
|
-
if (!_this.checkHidden(field)) {
|
|
20537
|
-
var _f = "" + field + fieldPluses[index];
|
|
20538
|
-
if (data[_f]) {
|
|
20539
|
-
dataSetting += data[_f] + '/';
|
|
20540
|
-
}
|
|
20541
|
-
}
|
|
20542
|
-
});
|
|
20543
|
-
if (dataSetting.length > 0) {
|
|
20544
|
-
dataSetting = dataSetting.substring(0, dataSetting.length - 1);
|
|
20545
|
-
}
|
|
20546
|
-
this.defaultDataSetting = dataSetting;
|
|
20547
|
-
};
|
|
20548
|
-
AppTopBarV1Component.prototype.checkHidden = function (field) {
|
|
20549
|
-
return this.rootModel.currentAppMetadata.configDefaultSetting && !this.rootModel.currentAppMetadata.configDefaultSetting.column.some(function (p) { return p.field == field; });
|
|
20550
|
-
};
|
|
20551
|
-
AppTopBarV1Component.prototype.getCurrentUserFullName = function () {
|
|
20552
|
-
return this.rootContext.data.currentUser && this.rootContext.data.currentUser.fullName ? this.rootContext.data.currentUser.fullName : 'Khách';
|
|
20553
|
-
};
|
|
20554
|
-
AppTopBarV1Component.prototype.getCurrentUserPosition = function () {
|
|
20555
|
-
return this.userProfile ? this.userProfile.tenDonVi : null;
|
|
20556
|
-
};
|
|
20557
|
-
AppTopBarV1Component.prototype.getCurrentUserAvatar = function () {
|
|
20558
|
-
if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
|
|
20559
|
-
return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
|
|
20560
|
-
}
|
|
20561
|
-
else {
|
|
20562
|
-
return this.defaultAvatar;
|
|
20563
|
-
}
|
|
20564
|
-
};
|
|
20565
|
-
AppTopBarV1Component.prototype.clearFilter = function (input) {
|
|
20566
|
-
var _this = this;
|
|
20567
|
-
setTimeout(function () {
|
|
20568
|
-
_this.model.searchModel[_this.model.fieldKey] = '';
|
|
20569
|
-
_this._customRouteService.updateFragment(_this.model.fieldKey, null);
|
|
20570
|
-
_this._customRouteService.updateWithoutFireEvent();
|
|
20571
|
-
_this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
|
|
20572
|
-
input.value = '';
|
|
20573
|
-
input.focus();
|
|
20574
|
-
_this._cd.detectChanges();
|
|
20575
|
-
});
|
|
20576
|
-
};
|
|
20577
|
-
AppTopBarV1Component.prototype.toggleAdvanceSearch = function (evt) {
|
|
20578
|
-
this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_TOGGLE_BOX, { event: evt });
|
|
20579
|
-
evt.preventDefault();
|
|
20580
|
-
evt.cancelBubble = true;
|
|
20581
|
-
};
|
|
20582
|
-
AppTopBarV1Component.prototype.hideAdvanceSearch = function (evt) {
|
|
20583
|
-
if (document.getElementById('advance-search-box')) {
|
|
20584
|
-
var mask = document.body.querySelectorAll('div[class~="ui-dialog-mask"]');
|
|
20585
|
-
if (!mask.length) {
|
|
20586
|
-
var closestDropdown = evt.target.closest('.dropdown-advs');
|
|
20587
|
-
if (closestDropdown == null || closestDropdown.length == 0) {
|
|
20588
|
-
this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_HIDE_BOX, { event: evt });
|
|
20589
|
-
}
|
|
20590
|
-
}
|
|
20591
|
-
}
|
|
20592
|
-
};
|
|
20593
|
-
AppTopBarV1Component.prototype.focusToSearchBox = function () {
|
|
20594
|
-
if (!document.body.querySelector('div[class~="ui-dialog-mask"]')) {
|
|
20595
|
-
this.input.nativeElement.focus();
|
|
20596
|
-
}
|
|
20597
|
-
};
|
|
20598
|
-
AppTopBarV1Component.prototype.onTopbarSearchClick = function (event, input) {
|
|
20599
|
-
var _this = this;
|
|
20600
|
-
if (!this.model.fieldKey) {
|
|
20601
|
-
return;
|
|
20602
|
-
}
|
|
20603
|
-
setTimeout(function () {
|
|
20604
|
-
_this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
|
|
20605
|
-
_this._customRouteService.updateFragment(_this.model.fieldKey, input.value);
|
|
20606
|
-
_this._customRouteService.updateWithoutFireEvent();
|
|
20607
|
-
input.focus();
|
|
20608
|
-
});
|
|
20609
|
-
};
|
|
20610
|
-
AppTopBarV1Component.prototype.onEsc = function (event, input) {
|
|
20611
|
-
this.clearFilter(input);
|
|
20612
|
-
};
|
|
20613
|
-
AppTopBarV1Component.prototype.onEnter = function (event, input) {
|
|
20614
|
-
this.onTopbarSearchClick(event, input);
|
|
20615
|
-
};
|
|
20616
|
-
AppTopBarV1Component.prototype.switchApp = function (item, openNewTab) {
|
|
20617
|
-
if (openNewTab === void 0) { openNewTab = false; }
|
|
20618
|
-
if (item.target == '_blank') {
|
|
20619
|
-
if (!item.defaultRedirect) {
|
|
20620
|
-
item.defaultRedirect = '';
|
|
20621
|
-
}
|
|
20622
|
-
// NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
|
|
20623
|
-
if (item.url == item.defaultRedirect) {
|
|
20624
|
-
item.url = '/' + item.code.toLowerCase();
|
|
20625
|
-
}
|
|
20626
|
-
if (!openNewTab) {
|
|
20627
|
-
top.location.href = item.url + "/" + item.defaultRedirect;
|
|
20628
|
-
}
|
|
20629
|
-
else {
|
|
20630
|
-
window.open(item.url + "/" + item.defaultRedirect, '_blank');
|
|
20631
|
-
}
|
|
20632
|
-
}
|
|
20633
|
-
else {
|
|
20634
|
-
if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
|
|
20635
|
-
this._router.navigateByUrl(item.defaultRedirect);
|
|
20636
|
-
this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
|
|
20637
|
-
if (this.rootContext.data.currentAppMetadata
|
|
20638
|
-
&& this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined
|
|
20639
|
-
&& this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
|
|
20640
|
-
this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
|
|
20641
|
-
}
|
|
20642
|
-
}
|
|
20643
|
-
}
|
|
20644
|
-
};
|
|
20645
|
-
AppTopBarV1Component.prototype.hasAdvanceSearchBox = function () {
|
|
20646
|
-
return this.model.searchModel.hasAdvanceSearch;
|
|
20647
|
-
};
|
|
20648
|
-
AppTopBarV1Component.prototype.isAdvanceSearching = function () {
|
|
20649
|
-
return this.hasAdvanceSearchValue(this.model.searchModel);
|
|
20650
|
-
};
|
|
20651
|
-
AppTopBarV1Component.prototype.hasAdvanceSearchValue = function (obj) {
|
|
20652
|
-
for (var key in obj) {
|
|
20653
|
-
if (key === '_k' || key === 'hasAdvanceSearch') {
|
|
20654
|
-
continue;
|
|
20655
|
-
}
|
|
20656
|
-
if (obj[key] != null && obj[key] != '') {
|
|
20657
|
-
return false;
|
|
20658
|
-
}
|
|
20659
|
-
}
|
|
20660
|
-
return true;
|
|
20661
|
-
};
|
|
20662
|
-
AppTopBarV1Component.prototype.getComponentId = function () {
|
|
20663
|
-
return 'TOPBAR';
|
|
20664
|
-
};
|
|
20665
|
-
AppTopBarV1Component.prototype.goToHome = function () {
|
|
20666
|
-
this.rootContext.fireEvent('GO_HOME');
|
|
20667
|
-
};
|
|
20668
|
-
AppTopBarV1Component.prototype.onEditInfo = function (event) {
|
|
20669
|
-
event.preventDefault();
|
|
20670
|
-
var currentAppSetting = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
|
|
20671
|
-
if (currentAppSetting) {
|
|
20672
|
-
this.switchApp(currentAppSetting);
|
|
20673
|
-
}
|
|
20674
|
-
else {
|
|
20675
|
-
console.error('Bạn chưa thiết lập metadata cho trang cá nhân');
|
|
20676
|
-
}
|
|
20677
|
-
};
|
|
20678
|
-
AppTopBarV1Component.prototype.onChangePassword = function (event) {
|
|
20679
|
-
event.preventDefault();
|
|
20680
|
-
// this.changePassword.showPopup(this._userService.getId());
|
|
20681
|
-
};
|
|
20682
|
-
AppTopBarV1Component.prototype.onTopbarLogout = function () {
|
|
20683
|
-
if (!localStorage.getItem('currentUrl')) {
|
|
20684
|
-
localStorage.setItem('currentUrl', top.location.href);
|
|
20685
|
-
}
|
|
20686
|
-
this._authenService.logout();
|
|
20687
|
-
};
|
|
20688
|
-
AppTopBarV1Component.prototype.settingDefault = function () {
|
|
20689
|
-
this.model.dataModelSetting = {
|
|
20690
|
-
data: {},
|
|
20691
|
-
showSettings: true
|
|
20692
|
-
};
|
|
20693
|
-
};
|
|
20694
|
-
AppTopBarV1Component.prototype.onShowSettings = function (ev) {
|
|
20695
|
-
this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_OPENED);
|
|
20696
|
-
};
|
|
20697
|
-
AppTopBarV1Component.prototype.onCloseSettings = function (ev) {
|
|
20698
|
-
this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_CLOSED);
|
|
20699
|
-
};
|
|
20700
|
-
AppTopBarV1Component.prototype.showProfilePage = function () {
|
|
20701
|
-
if (this._userService.isSinhVienAccount()) {
|
|
20702
|
-
return false;
|
|
20703
|
-
}
|
|
20704
|
-
return true;
|
|
20705
|
-
};
|
|
20706
|
-
AppTopBarV1Component.prototype.login = function () {
|
|
20707
|
-
this.rootContext.fireEvent('LOGIN');
|
|
20708
|
-
};
|
|
20709
|
-
AppTopBarV1Component.prototype.setNotify = function (message) {
|
|
20710
|
-
this.message = message;
|
|
20711
|
-
};
|
|
20712
|
-
AppTopBarV1Component.prototype.handleMouseOver = function (evt) {
|
|
20713
|
-
evt.target.stop();
|
|
20714
|
-
};
|
|
20715
|
-
AppTopBarV1Component.prototype.handleMouseOut = function (evt) {
|
|
20716
|
-
evt.target.start();
|
|
20717
|
-
};
|
|
20718
|
-
AppTopBarV1Component.prototype.showNotificationReload = function () {
|
|
20719
|
-
var _this = this;
|
|
20720
|
-
this.message = 'Hệ thống có phiên bản mới, hãy refresh trình duyệt để cập nhật';
|
|
20721
|
-
this.rootContext.fireEvent(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, false);
|
|
20722
|
-
this._notifierService.showConfirm(this.message).then(function (res) {
|
|
20723
|
-
_this.reloadWindow();
|
|
20724
|
-
});
|
|
20725
|
-
// if (this.intervalCountdown) {
|
|
20726
|
-
// clearInterval(this.intervalCountdown);
|
|
20727
|
-
// }
|
|
20728
|
-
// const date = new Date();
|
|
20729
|
-
// const goalDate = (new Date(date.getTime() + 10 * 1000)).getTime(); // Đếm 10s
|
|
20730
|
-
// this.intervalCountdown = setInterval(f => {
|
|
20731
|
-
// const now = new Date().getTime();
|
|
20732
|
-
// const distance = goalDate - now;
|
|
20733
|
-
// var seconds = Math.floor(distance / 1000);
|
|
20734
|
-
// // If the count down is finished, write some text
|
|
20735
|
-
// if (distance < 0) {
|
|
20736
|
-
// clearInterval(this.intervalCountdown);
|
|
20737
|
-
// this.reloadWindow();
|
|
20738
|
-
// return;
|
|
20739
|
-
// }
|
|
20740
|
-
// let message = `Trình duyệt sẽ khởi động lại sau ${seconds}s`;
|
|
20741
|
-
// if (seconds < 1) {
|
|
20742
|
-
// message = 'Trình duyệt sẽ khởi động lại ngay bây giờ';
|
|
20743
|
-
// }
|
|
20744
|
-
// this._notifierService.showConfirm(
|
|
20745
|
-
// message, null, null, false, this._translateService.instant('CONFIRM.ACCEPT_LABEL'),
|
|
20746
|
-
// 'pi pi-check'
|
|
20747
|
-
// ).then(res => {
|
|
20748
|
-
// clearInterval(this.intervalCountdown);
|
|
20749
|
-
// this.reloadWindow();
|
|
20750
|
-
// });
|
|
20751
|
-
// }, 1000);
|
|
20752
|
-
};
|
|
20753
|
-
AppTopBarV1Component.prototype.reloadWindow = function () {
|
|
20754
|
-
top.location.reload();
|
|
20755
|
-
};
|
|
20756
|
-
return AppTopBarV1Component;
|
|
20757
|
-
}(ComponentBase));
|
|
20758
|
-
AppTopBarV1Component.decorators = [
|
|
20759
|
-
{ type: i0.Component, args: [{
|
|
20760
|
-
selector: 'app-topbar-v1',
|
|
20761
|
-
template: "<div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\" (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\" [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li #profile class=\"profile-item tn-l-top-bar-menu-item\"\r\n *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-inbox\"></i>\r\n <span>Th\u01B0 m\u1EE5c c\u00E1 nh\u00E2n</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-user-edit\"></i>\r\n <span>C\u1EADp nh\u1EADt th\u00F4ng tin</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-book\"></i>\r\n <span>Ghi ch\u00FA</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" class=\"tn-l-top-bar-menu-item-inner\" style=\"height: 30px;\"\r\n pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n (click)=\"_commonService.onTopbarItemClick($event,modules)\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" class=\"wrapper-appswitch\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>",
|
|
20762
|
-
providers: [ComponentContextService],
|
|
20763
|
-
styles: [".topBarSearchButton:disabled{background-color:#eee!important;border:1px solid #c8c8c8!important;border-right:none!important;color:#c1c1c1!important;opacity:1}::ng-deep app-topbar a{outline:none}input:disabled::-moz-placeholder{color:#b1b1b1}input:disabled:-ms-input-placeholder{color:#b1b1b1}input:disabled::placeholder{color:#b1b1b1}.UserPane.UserPane{display:flex}.profile-image-wrapper{order:1}.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name{float:none;margin-top:0}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{display:inline-flex;flex-direction:column;float:none;justify-content:center;order:0;text-align:right}.tn-l-logo{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.tn-l-default-detting{color:#fff;cursor:pointer;margin:0}.tn-l-left-menu-toggle-block{-ms-grid-row-align:stretch;align-items:center;align-self:stretch;box-shadow:0 0 5px 0 rgba(0,0,0,.3764705882352941);display:flex}.tn-l-left-menu-toggle{color:#fff;padding:8px;transition:transform .25s ease-in-out}::ng-deep .layout-menu-static-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-left:0;margin-right:30px}.topbar-logo.topbar-logo.topbar-logo{float:none}.tn-l-logo.tn-l-logo.tn-l-logo.tn-l-logo{height:40px;margin:0;width:auto}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{font-size:0;height:auto;margin:0;padding-left:8px;padding-right:8px;width:auto}.tn-l-top-bar{display:flex}.topbar-description,.topbar-owner{white-space:nowrap}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:15px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:11px;text-transform:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{display:flex;float:none;width:auto}.tn-l-top-bar-left{align-items:center}.tn-m-topbar-menu-toggle{display:block;height:28px;margin:auto;width:30px}.tn-m-topbar-menu-toggle g{stroke:#fff}.tn-m-topbar-menu-toggle path{fill:#fff}.tn-l-m-default-setting{display:none}.setting-default-container{justify-content:center}.notify-message,.setting-default-container{align-items:center;display:flex;margin-left:30px}.notify-message{flex:1 1;overflow:hidden}.notify-message>marquee{color:#ff0;font-size:500;white-space:nowrap}.search-item{margin-right:10px}.tn-l-switcher-item-inner{padding-top:4px}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{align-items:center;background:#fff;display:inline-flex;justify-content:center}.tn-l-switcher-item-label{color:#52abff;margin-top:4px;text-shadow:none}.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon{color:#52abff;font-size:38px;margin:0 auto;text-shadow:none}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{padding:8px}.tn-l-switcher.tn-l-switcher{margin-bottom:0}::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item,::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+1):last-child,::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+2):last-child{width:unset}::ng-deep .layout-wrapper app-topbar-v1 .wrapper-appswitch{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));text-align:center}@media (max-width:1024px){.layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item{width:unset}}@media (min-width:1025px){.tn-l-top-bar-right{align-items:center;display:flex;justify-content:space-between}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding:0 15px}.topbar-items.topbar-items.topbar-items{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-start;margin:0}.topbar-items.topbar-items.topbar-items,.topbar-items.topbar-items.topbar-items>li{float:none}::ng-deep .topbar .topbar-items>li>a{margin-top:0}::ng-deep .topbar .topbar-items>li>a>span>i{color:#fff;font-size:24px}.topbar .topbar-items>li>a.UserPane{height:auto;line-height:inherit;top:0}a.UserPane .profile-image.profile-image.profile-image.profile-image{margin-top:0}}@media (min-width:1025px) and (max-width:1400px){.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-right:19px}.search-item{margin-right:0}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding-left:15px}.topbar-items>li.profile-item{margin-left:14px}}@media (max-width:1024px){.tn-l-m-default-setting{align-items:center;color:#fff;display:flex;font-size:28px;height:36px;justify-content:center;width:36px}.tn-l-default-detting{display:none}::ng-deep .layout-menu-static-mobile-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{text-align:left}.topbar .topbar-right #topbar-menu-button{align-items:center;display:flex;justify-content:center;width:36px}.tn-l-top-bar-right-block-1{display:flex}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{padding-left:5px;padding-right:5px}.tn-l-logo-title-block,.tn-l-top-bar-left,.topbar-description,.topbar-owner{overflow:hidden}.topbar-description,.topbar-owner{text-overflow:ellipsis}.tn-l-top-bar-menu-item:empty{display:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{padding-left:0;padding-right:0}.topbar-title.topbar-title.topbar-title.topbar-title{margin:0}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:14px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:10px}.tn-l-top-bar-right{flex:1;position:relative}.topbar-menu-button span.topbar-badge{right:-4px}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{align-items:center;display:flex;justify-content:flex-end;padding:0 .5em}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right #topbar-menu-button{margin-left:.5em;position:relative;right:0;top:0}.app-switcher.layout-menu.layout-menu.layout-menu.layout-menu{width:270px}.profile-image-wrapper{order:0}.tn-l-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:220px}::ng-deep app-topbar .tn-l-top-bar-menu-item .topbar-icon-left{align-items:center;display:flex;justify-content:center}.tn-l-topbar-item-role-wrapper{display:none}}"]
|
|
20764
|
-
},] }
|
|
20765
|
-
];
|
|
20766
|
-
AppTopBarV1Component.ctorParameters = function () { return [
|
|
20767
|
-
{ type: CustomRouterService },
|
|
20768
|
-
{ type: i3.Router },
|
|
20769
|
-
{ type: CommonService },
|
|
20770
|
-
{ type: AuthenService },
|
|
20771
|
-
{ type: i0.ChangeDetectorRef },
|
|
20772
|
-
{ type: i0.Injector },
|
|
20773
|
-
{ type: PermissionService },
|
|
20774
|
-
{ type: ModuleConfigService },
|
|
20775
|
-
{ type: UserService },
|
|
20776
|
-
{ type: NotifierService },
|
|
20777
|
-
{ type: i2.TranslateService }
|
|
20778
|
-
]; };
|
|
20779
|
-
AppTopBarV1Component.propDecorators = {
|
|
20780
|
-
input: [{ type: i0.ViewChild, args: ['input',] }],
|
|
20781
|
-
notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
|
|
20782
|
-
};
|
|
20783
|
-
|
|
20784
20361
|
var MenuService = /** @class */ (function () {
|
|
20785
20362
|
function MenuService(_moduleConfigService, _permissionService, _commonService, _applicationContext) {
|
|
20786
20363
|
this._moduleConfigService = _moduleConfigService;
|
|
@@ -21465,7 +21042,9 @@
|
|
|
21465
21042
|
this.userProfile = this._userService.getProfileInfo();
|
|
21466
21043
|
}
|
|
21467
21044
|
this.rootContext.subscribe(ComCtxConstants.ROOT.BODY_MOUSE_DOWN, function (e) {
|
|
21468
|
-
setTimeout(function () {
|
|
21045
|
+
setTimeout(function () {
|
|
21046
|
+
_this.hideAdvanceSearch(e);
|
|
21047
|
+
});
|
|
21469
21048
|
});
|
|
21470
21049
|
this.rootContext.subscribe(ComCtxConstants.ROOT.KEY_DOWN_CTRL_F, function (e) {
|
|
21471
21050
|
_this.focusToSearchBox();
|
|
@@ -21737,7 +21316,7 @@
|
|
|
21737
21316
|
{ type: i0.Component, args: [{
|
|
21738
21317
|
// tslint:disable-next-line: component-selector
|
|
21739
21318
|
selector: 'app-topbar',
|
|
21740
|
-
template: "<ng-container [ngSwitch]=\"layoutAppSwitcher\">\r\n <ng-container *ngSwitchCase=\"EnumTypeSplash.NEW_V1\">\r\n <app-topbar-v1></app-topbar-v1>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"appSwitcherDefault\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #appSwitcherDefault>\r\n <div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\"\r\n (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\"\r\n [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li #profile class=\"profile-item tn-l-top-bar-menu-item\"\r\n *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-inbox\"></i>\r\n <span>Th\u01B0 m\u1EE5c c\u00E1 nh\u00E2n</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-user-edit\"></i>\r\n <span>C\u1EADp nh\u1EADt th\u00F4ng tin</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-book\"></i>\r\n <span>Ghi ch\u00FA</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" (click)=\"_commonService.onTopbarItemClick($event,modules)\"\r\n style=\"height: 30px;\" pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n class=\"tn-l-top-bar-menu-item-inner\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" style=\"text-align: center;\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n [style.background]=\"item.background\" (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\" [style.color]=\"item.colorTitle\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"\r\n [style.color]=\"item.colorIcon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
21319
|
+
template: "<ng-container [ngSwitch]=\"layoutAppSwitcher\">\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"appSwitcherDefault\">\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"EnumTypeSplash.NEW_V1\">\r\n <app-topbar-v1></app-topbar-v1>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"EnumTypeSplash.NEW_V2\">\r\n <app-topbar-v2></app-topbar-v2>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #appSwitcherDefault>\r\n <div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\"\r\n (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\"\r\n [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\" #profile\r\n class=\"profile-item tn-l-top-bar-menu-item\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <ng-container *ngIf=\"currentUser\">\r\n <li role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-inbox\"></i>\r\n <span>Th\u01B0 m\u1EE5c c\u00E1 nh\u00E2n</span>\r\n </a>\r\n </li>\r\n <li role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-user-edit\"></i>\r\n <span>C\u1EADp nh\u1EADt th\u00F4ng tin</span>\r\n </a>\r\n </li>\r\n <li role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-book\"></i>\r\n <span>Ghi ch\u00FA</span>\r\n </a>\r\n </li>\r\n <li role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n </ng-container>\r\n\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" (click)=\"_commonService.onTopbarItemClick($event,modules)\"\r\n style=\"height: 30px;\" pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n class=\"tn-l-top-bar-menu-item-inner\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" style=\"text-align: center;\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n [style.background]=\"item.background\" (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\" [style.color]=\"item.colorTitle\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"\r\n [style.color]=\"item.colorIcon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
21741
21320
|
providers: [ComponentContextService],
|
|
21742
21321
|
styles: [".topBarSearchButton:disabled{background-color:#eee!important;border:1px solid #c8c8c8!important;border-right:none!important;color:#c1c1c1!important;opacity:1}::ng-deep app-topbar a{outline:none}input:disabled::-moz-placeholder{color:#b1b1b1}input:disabled:-ms-input-placeholder{color:#b1b1b1}input:disabled::placeholder{color:#b1b1b1}.UserPane.UserPane{display:flex}.profile-image-wrapper{order:1}.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name{float:none;margin-top:0}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{display:inline-flex;flex-direction:column;float:none;justify-content:center;order:0;text-align:right}.tn-l-logo{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.tn-l-default-detting{color:#fff;cursor:pointer;margin:0}.tn-l-left-menu-toggle-block{-ms-grid-row-align:stretch;align-items:center;align-self:stretch;box-shadow:0 0 5px 0 rgba(0,0,0,.3764705882352941);display:flex}.tn-l-left-menu-toggle{color:#fff;padding:8px;transition:transform .25s ease-in-out}::ng-deep .layout-menu-static-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-left:0;margin-right:30px}.topbar-logo.topbar-logo.topbar-logo{float:none}.tn-l-logo.tn-l-logo.tn-l-logo.tn-l-logo{height:40px;margin:0;width:auto}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{font-size:0;height:auto;margin:0;padding-left:8px;padding-right:8px;width:auto}.tn-l-top-bar{display:flex}.topbar-description,.topbar-owner{white-space:nowrap}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:15px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:11px;text-transform:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{display:flex;float:none;width:auto}.tn-l-top-bar-left{align-items:center}.tn-m-topbar-menu-toggle{display:block;height:28px;margin:auto;width:30px}.tn-m-topbar-menu-toggle g{stroke:#fff}.tn-m-topbar-menu-toggle path{fill:#fff}.tn-l-m-default-setting{display:none}.setting-default-container{justify-content:center}.notify-message,.setting-default-container{align-items:center;display:flex;margin-left:30px}.notify-message{flex:1 1;overflow:hidden}.notify-message>marquee{color:#ff0;font-size:500;white-space:nowrap}.search-item{margin-right:10px}.tn-l-switcher-item-inner{padding-top:4px}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{align-items:center;display:inline-flex;justify-content:center}.tn-l-switcher-item-label{line-height:1.2;margin-top:4px}.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon{font-size:38px;margin:0 auto}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{padding:8px}.tn-l-switcher.tn-l-switcher{margin-bottom:0}@media (min-width:1025px){.tn-l-top-bar-right{align-items:center;display:flex;justify-content:space-between}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding:0 15px}.topbar-items.topbar-items.topbar-items{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-start;margin:0}.topbar-items.topbar-items.topbar-items,.topbar-items.topbar-items.topbar-items>li{float:none}::ng-deep .topbar .topbar-items>li>a{margin-top:0}::ng-deep .topbar .topbar-items>li>a>span>i{color:#fff;font-size:24px}.topbar .topbar-items>li>a.UserPane{height:auto;line-height:inherit;top:0}a.UserPane .profile-image.profile-image.profile-image.profile-image{margin-top:0}}@media (min-width:1025px) and (max-width:1400px){.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-right:19px}.search-item{margin-right:0}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding-left:15px}.topbar-items>li.profile-item{margin-left:14px}}@media (max-width:1024px){.tn-l-m-default-setting{align-items:center;color:#fff;display:flex;font-size:28px;height:36px;justify-content:center;width:36px}.tn-l-default-detting{display:none}::ng-deep .layout-menu-static-mobile-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{text-align:left}.topbar .topbar-right #topbar-menu-button{align-items:center;display:flex;justify-content:center;width:36px}.tn-l-top-bar-right-block-1{display:flex}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{padding-left:5px;padding-right:5px}.tn-l-logo-title-block,.tn-l-top-bar-left,.topbar-description,.topbar-owner{overflow:hidden}.topbar-description,.topbar-owner{text-overflow:ellipsis}.tn-l-top-bar-menu-item:empty{display:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{padding-left:0;padding-right:0}.topbar-title.topbar-title.topbar-title.topbar-title{margin:0}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:14px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:10px}.tn-l-top-bar-right{flex:1;position:relative}.topbar-menu-button span.topbar-badge{right:-4px}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{align-items:center;display:flex;justify-content:flex-end;padding:0 .5em}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right #topbar-menu-button{margin-left:.5em;position:relative;right:0;top:0}.app-switcher.layout-menu.layout-menu.layout-menu.layout-menu{width:270px}.profile-image-wrapper{order:0}.tn-l-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:220px}::ng-deep app-topbar .tn-l-top-bar-menu-item .topbar-icon-left{align-items:center;display:flex;justify-content:center}.tn-l-topbar-item-role-wrapper{display:none}}"]
|
|
21743
21322
|
},] }
|
|
@@ -21760,6 +21339,858 @@
|
|
|
21760
21339
|
notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
|
|
21761
21340
|
};
|
|
21762
21341
|
|
|
21342
|
+
var AppTopBarV1Component = /** @class */ (function (_super) {
|
|
21343
|
+
__extends(AppTopBarV1Component, _super);
|
|
21344
|
+
function AppTopBarV1Component(
|
|
21345
|
+
// public app: AppComponent,
|
|
21346
|
+
_customRouteService, _router, _commonService, _authenService, _cd, _injector, _permissionService, _moduleConfigService, _userService, _notifierService, _translateService) {
|
|
21347
|
+
var _this = _super.call(this, _injector) || this;
|
|
21348
|
+
_this._customRouteService = _customRouteService;
|
|
21349
|
+
_this._router = _router;
|
|
21350
|
+
_this._commonService = _commonService;
|
|
21351
|
+
_this._authenService = _authenService;
|
|
21352
|
+
_this._cd = _cd;
|
|
21353
|
+
_this._permissionService = _permissionService;
|
|
21354
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
21355
|
+
_this._userService = _userService;
|
|
21356
|
+
_this._notifierService = _notifierService;
|
|
21357
|
+
_this._translateService = _translateService;
|
|
21358
|
+
_this.defaultAvatar = '';
|
|
21359
|
+
_this.key = '';
|
|
21360
|
+
_this.currentRoute = '';
|
|
21361
|
+
_this.fileApi = '';
|
|
21362
|
+
_this.currentUser = null;
|
|
21363
|
+
_this.appSwitcherItems = [];
|
|
21364
|
+
_this.isFirstTime = false;
|
|
21365
|
+
_this.showSettings = false;
|
|
21366
|
+
_this.allSubscriptions = [];
|
|
21367
|
+
_this.message = '';
|
|
21368
|
+
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
21369
|
+
_this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
|
|
21370
|
+
_this.fileApi = _this.environment.apiDomain.fileEndpoint;
|
|
21371
|
+
if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
|
|
21372
|
+
_this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
|
|
21373
|
+
}
|
|
21374
|
+
else {
|
|
21375
|
+
if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
|
|
21376
|
+
_this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
|
|
21377
|
+
}
|
|
21378
|
+
else {
|
|
21379
|
+
_this.showDefaultSetting = false;
|
|
21380
|
+
}
|
|
21381
|
+
}
|
|
21382
|
+
if (!_this.rootContext.data.currentUser) {
|
|
21383
|
+
_this.rootContext.data.currentUser = {};
|
|
21384
|
+
}
|
|
21385
|
+
// this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT.USER_INFO_CHANGED, rs => {
|
|
21386
|
+
// this._cd.detectChanges();
|
|
21387
|
+
// }));
|
|
21388
|
+
_this.rootContext.replaySubscribeOnce(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
|
|
21389
|
+
_this.currentUser = _this._userService.getCurrentUser();
|
|
21390
|
+
_this.loadMenuMetadata();
|
|
21391
|
+
});
|
|
21392
|
+
if (_this.rootModel.allowAnonymous) {
|
|
21393
|
+
_this.loadMenuMetadata();
|
|
21394
|
+
}
|
|
21395
|
+
return _this;
|
|
21396
|
+
}
|
|
21397
|
+
AppTopBarV1Component.prototype.loadMenuMetadata = function () {
|
|
21398
|
+
var _this = this;
|
|
21399
|
+
var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
21400
|
+
var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
|
|
21401
|
+
return __generator(this, function (_c) {
|
|
21402
|
+
switch (_c.label) {
|
|
21403
|
+
case 0:
|
|
21404
|
+
arr = [];
|
|
21405
|
+
_a = [];
|
|
21406
|
+
for (_b in this.environment.appMetadata.appSwitcher)
|
|
21407
|
+
_a.push(_b);
|
|
21408
|
+
_i = 0;
|
|
21409
|
+
_c.label = 1;
|
|
21410
|
+
case 1:
|
|
21411
|
+
if (!(_i < _a.length)) return [3 /*break*/, 5];
|
|
21412
|
+
ind = _a[_i];
|
|
21413
|
+
element = this.environment.appMetadata.appSwitcher[ind];
|
|
21414
|
+
clientId = this.environment.authenticationSettings.clientId;
|
|
21415
|
+
if (!(this.rootContext.data.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
|
|
21416
|
+
arr.push(element);
|
|
21417
|
+
return [3 /*break*/, 4];
|
|
21418
|
+
case 2:
|
|
21419
|
+
if (!this.currentUser) return [3 /*break*/, 4];
|
|
21420
|
+
return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
|
|
21421
|
+
case 3:
|
|
21422
|
+
isAuthorized = _c.sent();
|
|
21423
|
+
if (isAuthorized) {
|
|
21424
|
+
arr.push(element);
|
|
21425
|
+
}
|
|
21426
|
+
_c.label = 4;
|
|
21427
|
+
case 4:
|
|
21428
|
+
_i++;
|
|
21429
|
+
return [3 /*break*/, 1];
|
|
21430
|
+
case 5:
|
|
21431
|
+
resolve(arr);
|
|
21432
|
+
return [2 /*return*/];
|
|
21433
|
+
}
|
|
21434
|
+
});
|
|
21435
|
+
}); });
|
|
21436
|
+
prmsAppSwicherItem.then(function (rs) {
|
|
21437
|
+
if (rs) {
|
|
21438
|
+
var currentUser_1 = _this._userService.getCurrentUser();
|
|
21439
|
+
_this.appSwitcherItems.length = 0;
|
|
21440
|
+
rs.forEach(function (element) {
|
|
21441
|
+
if (element.visible) {
|
|
21442
|
+
if (element.allowAnonymous) {
|
|
21443
|
+
_this.appSwitcherItems.push(element);
|
|
21444
|
+
}
|
|
21445
|
+
else {
|
|
21446
|
+
if (currentUser_1.maNguoiHoc && currentUser_1.issuperuser && currentUser_1.issuperuser.toLowerCase() != 'true') {
|
|
21447
|
+
if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
|
|
21448
|
+
_this.appSwitcherItems.push(element);
|
|
21449
|
+
}
|
|
21450
|
+
}
|
|
21451
|
+
else {
|
|
21452
|
+
_this.appSwitcherItems.push(element);
|
|
21453
|
+
}
|
|
21454
|
+
}
|
|
21455
|
+
}
|
|
21456
|
+
});
|
|
21457
|
+
}
|
|
21458
|
+
});
|
|
21459
|
+
};
|
|
21460
|
+
AppTopBarV1Component.prototype.ngOnInit = function () {
|
|
21461
|
+
var _this = this;
|
|
21462
|
+
if (this.rootContext.data.currentUser) {
|
|
21463
|
+
if (this.rootContext.data.currentUser.gender == 0) {
|
|
21464
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
|
|
21465
|
+
}
|
|
21466
|
+
else {
|
|
21467
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
|
|
21468
|
+
}
|
|
21469
|
+
this.userProfile = this._userService.getProfileInfo();
|
|
21470
|
+
}
|
|
21471
|
+
this.rootContext.subscribe(ComCtxConstants.ROOT.BODY_MOUSE_DOWN, function (e) {
|
|
21472
|
+
setTimeout(function () {
|
|
21473
|
+
_this.hideAdvanceSearch(e);
|
|
21474
|
+
});
|
|
21475
|
+
});
|
|
21476
|
+
this.rootContext.subscribe(ComCtxConstants.ROOT.KEY_DOWN_CTRL_F, function (e) {
|
|
21477
|
+
_this.focusToSearchBox();
|
|
21478
|
+
});
|
|
21479
|
+
this.rootContext.subscribe(ComCtxConstants.COMMON.FORCE_RELOAD, function (e) {
|
|
21480
|
+
_this.showNotificationReload();
|
|
21481
|
+
});
|
|
21482
|
+
this.rootContext.subscribe(ComCtxConstants.COMMON.SHOW_NOTIFY, function (e) {
|
|
21483
|
+
_this.setNotify(e.message);
|
|
21484
|
+
});
|
|
21485
|
+
this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT_USMART.SHOW_CONFIG_DATA_DEFAULT, function (e) {
|
|
21486
|
+
_this.model.dataModelSetting.showSettings = true;
|
|
21487
|
+
}));
|
|
21488
|
+
this.model.dataModelSetting = {
|
|
21489
|
+
data: {},
|
|
21490
|
+
showSettings: false
|
|
21491
|
+
};
|
|
21492
|
+
this.subscribe(ComCtxConstants.COMMON.SAVE_DATA_DEFAULT, function (data) {
|
|
21493
|
+
_this.formatDefaultDataSetting(data);
|
|
21494
|
+
_this.reloadWindow();
|
|
21495
|
+
});
|
|
21496
|
+
var stringDataDefault = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.DEFAULT_DATA);
|
|
21497
|
+
if (stringDataDefault) {
|
|
21498
|
+
var dataCacheDefault = JSON.parse(stringDataDefault);
|
|
21499
|
+
this.formatDefaultDataSetting(dataCacheDefault);
|
|
21500
|
+
}
|
|
21501
|
+
else {
|
|
21502
|
+
this.defaultDataSetting = 'Thiết lập tham số mặc định';
|
|
21503
|
+
}
|
|
21504
|
+
};
|
|
21505
|
+
AppTopBarV1Component.prototype.ngOnDestroy = function () {
|
|
21506
|
+
this.allSubscriptions.forEach(function (element) {
|
|
21507
|
+
element.unsubscribe();
|
|
21508
|
+
});
|
|
21509
|
+
if (this.intervalCountdown) {
|
|
21510
|
+
clearInterval(this.intervalCountdown);
|
|
21511
|
+
}
|
|
21512
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
21513
|
+
};
|
|
21514
|
+
AppTopBarV1Component.prototype.formatDefaultDataSetting = function (data) {
|
|
21515
|
+
var _this = this;
|
|
21516
|
+
var dataSetting = '';
|
|
21517
|
+
var fields = ['instanceIdHeDaoTao', 'heDaoTao', 'namHoc', 'hocKy', 'instanceIdNamHoc', 'instanceIdHocKy', 'idDotThi'];
|
|
21518
|
+
var fieldPluses = ['code', 'code', 'ten', 'ten', 'ten', 'ten', 'ten'];
|
|
21519
|
+
fields.forEach(function (field, index) {
|
|
21520
|
+
if (!_this.checkHidden(field)) {
|
|
21521
|
+
var _f = "" + field + fieldPluses[index];
|
|
21522
|
+
if (data[_f]) {
|
|
21523
|
+
dataSetting += data[_f] + '/';
|
|
21524
|
+
}
|
|
21525
|
+
}
|
|
21526
|
+
});
|
|
21527
|
+
if (dataSetting.length > 0) {
|
|
21528
|
+
dataSetting = dataSetting.substring(0, dataSetting.length - 1);
|
|
21529
|
+
}
|
|
21530
|
+
this.defaultDataSetting = dataSetting;
|
|
21531
|
+
};
|
|
21532
|
+
AppTopBarV1Component.prototype.checkHidden = function (field) {
|
|
21533
|
+
return this.rootModel.currentAppMetadata.configDefaultSetting && !this.rootModel.currentAppMetadata.configDefaultSetting.column.some(function (p) { return p.field == field; });
|
|
21534
|
+
};
|
|
21535
|
+
AppTopBarV1Component.prototype.getCurrentUserFullName = function () {
|
|
21536
|
+
return this.rootContext.data.currentUser && this.rootContext.data.currentUser.fullName ? this.rootContext.data.currentUser.fullName : 'Khách';
|
|
21537
|
+
};
|
|
21538
|
+
AppTopBarV1Component.prototype.getCurrentUserPosition = function () {
|
|
21539
|
+
return this.userProfile ? this.userProfile.tenDonVi : null;
|
|
21540
|
+
};
|
|
21541
|
+
AppTopBarV1Component.prototype.getCurrentUserAvatar = function () {
|
|
21542
|
+
if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
|
|
21543
|
+
return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
|
|
21544
|
+
}
|
|
21545
|
+
else {
|
|
21546
|
+
return this.defaultAvatar;
|
|
21547
|
+
}
|
|
21548
|
+
};
|
|
21549
|
+
AppTopBarV1Component.prototype.clearFilter = function (input) {
|
|
21550
|
+
var _this = this;
|
|
21551
|
+
setTimeout(function () {
|
|
21552
|
+
_this.model.searchModel[_this.model.fieldKey] = '';
|
|
21553
|
+
_this._customRouteService.updateFragment(_this.model.fieldKey, null);
|
|
21554
|
+
_this._customRouteService.updateWithoutFireEvent();
|
|
21555
|
+
_this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
|
|
21556
|
+
input.value = '';
|
|
21557
|
+
input.focus();
|
|
21558
|
+
_this._cd.detectChanges();
|
|
21559
|
+
});
|
|
21560
|
+
};
|
|
21561
|
+
AppTopBarV1Component.prototype.toggleAdvanceSearch = function (evt) {
|
|
21562
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_TOGGLE_BOX, { event: evt });
|
|
21563
|
+
evt.preventDefault();
|
|
21564
|
+
evt.cancelBubble = true;
|
|
21565
|
+
};
|
|
21566
|
+
AppTopBarV1Component.prototype.hideAdvanceSearch = function (evt) {
|
|
21567
|
+
if (document.getElementById('advance-search-box')) {
|
|
21568
|
+
var mask = document.body.querySelectorAll('div[class~="ui-dialog-mask"]');
|
|
21569
|
+
if (!mask.length) {
|
|
21570
|
+
var closestDropdown = evt.target.closest('.dropdown-advs');
|
|
21571
|
+
if (closestDropdown == null || closestDropdown.length == 0) {
|
|
21572
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_HIDE_BOX, { event: evt });
|
|
21573
|
+
}
|
|
21574
|
+
}
|
|
21575
|
+
}
|
|
21576
|
+
};
|
|
21577
|
+
AppTopBarV1Component.prototype.focusToSearchBox = function () {
|
|
21578
|
+
if (!document.body.querySelector('div[class~="ui-dialog-mask"]')) {
|
|
21579
|
+
this.input.nativeElement.focus();
|
|
21580
|
+
}
|
|
21581
|
+
};
|
|
21582
|
+
AppTopBarV1Component.prototype.onTopbarSearchClick = function (event, input) {
|
|
21583
|
+
var _this = this;
|
|
21584
|
+
if (!this.model.fieldKey) {
|
|
21585
|
+
return;
|
|
21586
|
+
}
|
|
21587
|
+
setTimeout(function () {
|
|
21588
|
+
_this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
|
|
21589
|
+
_this._customRouteService.updateFragment(_this.model.fieldKey, input.value);
|
|
21590
|
+
_this._customRouteService.updateWithoutFireEvent();
|
|
21591
|
+
input.focus();
|
|
21592
|
+
});
|
|
21593
|
+
};
|
|
21594
|
+
AppTopBarV1Component.prototype.onEsc = function (event, input) {
|
|
21595
|
+
this.clearFilter(input);
|
|
21596
|
+
};
|
|
21597
|
+
AppTopBarV1Component.prototype.onEnter = function (event, input) {
|
|
21598
|
+
this.onTopbarSearchClick(event, input);
|
|
21599
|
+
};
|
|
21600
|
+
AppTopBarV1Component.prototype.switchApp = function (item, openNewTab) {
|
|
21601
|
+
if (openNewTab === void 0) { openNewTab = false; }
|
|
21602
|
+
if (item.target == '_blank') {
|
|
21603
|
+
if (!item.defaultRedirect) {
|
|
21604
|
+
item.defaultRedirect = '';
|
|
21605
|
+
}
|
|
21606
|
+
// NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
|
|
21607
|
+
if (item.url == item.defaultRedirect) {
|
|
21608
|
+
item.url = '/' + item.code.toLowerCase();
|
|
21609
|
+
}
|
|
21610
|
+
if (!openNewTab) {
|
|
21611
|
+
top.location.href = item.url + "/" + item.defaultRedirect;
|
|
21612
|
+
}
|
|
21613
|
+
else {
|
|
21614
|
+
window.open(item.url + "/" + item.defaultRedirect, '_blank');
|
|
21615
|
+
}
|
|
21616
|
+
}
|
|
21617
|
+
else {
|
|
21618
|
+
if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
|
|
21619
|
+
this._router.navigateByUrl(item.defaultRedirect);
|
|
21620
|
+
this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
|
|
21621
|
+
if (this.rootContext.data.currentAppMetadata
|
|
21622
|
+
&& this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined
|
|
21623
|
+
&& this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
|
|
21624
|
+
this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
|
|
21625
|
+
}
|
|
21626
|
+
}
|
|
21627
|
+
}
|
|
21628
|
+
};
|
|
21629
|
+
AppTopBarV1Component.prototype.hasAdvanceSearchBox = function () {
|
|
21630
|
+
return this.model.searchModel.hasAdvanceSearch;
|
|
21631
|
+
};
|
|
21632
|
+
AppTopBarV1Component.prototype.isAdvanceSearching = function () {
|
|
21633
|
+
return this.hasAdvanceSearchValue(this.model.searchModel);
|
|
21634
|
+
};
|
|
21635
|
+
AppTopBarV1Component.prototype.hasAdvanceSearchValue = function (obj) {
|
|
21636
|
+
for (var key in obj) {
|
|
21637
|
+
if (key === '_k' || key === 'hasAdvanceSearch') {
|
|
21638
|
+
continue;
|
|
21639
|
+
}
|
|
21640
|
+
if (obj[key] != null && obj[key] != '') {
|
|
21641
|
+
return false;
|
|
21642
|
+
}
|
|
21643
|
+
}
|
|
21644
|
+
return true;
|
|
21645
|
+
};
|
|
21646
|
+
AppTopBarV1Component.prototype.getComponentId = function () {
|
|
21647
|
+
return 'TOPBAR';
|
|
21648
|
+
};
|
|
21649
|
+
AppTopBarV1Component.prototype.goToHome = function () {
|
|
21650
|
+
this.rootContext.fireEvent('GO_HOME');
|
|
21651
|
+
};
|
|
21652
|
+
AppTopBarV1Component.prototype.onEditInfo = function (event) {
|
|
21653
|
+
event.preventDefault();
|
|
21654
|
+
var currentAppSetting = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
|
|
21655
|
+
if (currentAppSetting) {
|
|
21656
|
+
this.switchApp(currentAppSetting);
|
|
21657
|
+
}
|
|
21658
|
+
else {
|
|
21659
|
+
console.error('Bạn chưa thiết lập metadata cho trang cá nhân');
|
|
21660
|
+
}
|
|
21661
|
+
};
|
|
21662
|
+
AppTopBarV1Component.prototype.onChangePassword = function (event) {
|
|
21663
|
+
event.preventDefault();
|
|
21664
|
+
// this.changePassword.showPopup(this._userService.getId());
|
|
21665
|
+
};
|
|
21666
|
+
AppTopBarV1Component.prototype.onTopbarLogout = function () {
|
|
21667
|
+
if (!localStorage.getItem('currentUrl')) {
|
|
21668
|
+
localStorage.setItem('currentUrl', top.location.href);
|
|
21669
|
+
}
|
|
21670
|
+
this._authenService.logout();
|
|
21671
|
+
};
|
|
21672
|
+
AppTopBarV1Component.prototype.settingDefault = function () {
|
|
21673
|
+
this.model.dataModelSetting = {
|
|
21674
|
+
data: {},
|
|
21675
|
+
showSettings: true
|
|
21676
|
+
};
|
|
21677
|
+
};
|
|
21678
|
+
AppTopBarV1Component.prototype.onShowSettings = function (ev) {
|
|
21679
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_OPENED);
|
|
21680
|
+
};
|
|
21681
|
+
AppTopBarV1Component.prototype.onCloseSettings = function (ev) {
|
|
21682
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_CLOSED);
|
|
21683
|
+
};
|
|
21684
|
+
AppTopBarV1Component.prototype.showProfilePage = function () {
|
|
21685
|
+
if (this._userService.isSinhVienAccount()) {
|
|
21686
|
+
return false;
|
|
21687
|
+
}
|
|
21688
|
+
return true;
|
|
21689
|
+
};
|
|
21690
|
+
AppTopBarV1Component.prototype.login = function () {
|
|
21691
|
+
this.rootContext.fireEvent('LOGIN');
|
|
21692
|
+
};
|
|
21693
|
+
AppTopBarV1Component.prototype.setNotify = function (message) {
|
|
21694
|
+
this.message = message;
|
|
21695
|
+
};
|
|
21696
|
+
AppTopBarV1Component.prototype.handleMouseOver = function (evt) {
|
|
21697
|
+
evt.target.stop();
|
|
21698
|
+
};
|
|
21699
|
+
AppTopBarV1Component.prototype.handleMouseOut = function (evt) {
|
|
21700
|
+
evt.target.start();
|
|
21701
|
+
};
|
|
21702
|
+
AppTopBarV1Component.prototype.showNotificationReload = function () {
|
|
21703
|
+
var _this = this;
|
|
21704
|
+
this.message = 'Hệ thống có phiên bản mới, hãy refresh trình duyệt để cập nhật';
|
|
21705
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, false);
|
|
21706
|
+
this._notifierService.showConfirm(this.message).then(function (res) {
|
|
21707
|
+
_this.reloadWindow();
|
|
21708
|
+
});
|
|
21709
|
+
// if (this.intervalCountdown) {
|
|
21710
|
+
// clearInterval(this.intervalCountdown);
|
|
21711
|
+
// }
|
|
21712
|
+
// const date = new Date();
|
|
21713
|
+
// const goalDate = (new Date(date.getTime() + 10 * 1000)).getTime(); // Đếm 10s
|
|
21714
|
+
// this.intervalCountdown = setInterval(f => {
|
|
21715
|
+
// const now = new Date().getTime();
|
|
21716
|
+
// const distance = goalDate - now;
|
|
21717
|
+
// var seconds = Math.floor(distance / 1000);
|
|
21718
|
+
// // If the count down is finished, write some text
|
|
21719
|
+
// if (distance < 0) {
|
|
21720
|
+
// clearInterval(this.intervalCountdown);
|
|
21721
|
+
// this.reloadWindow();
|
|
21722
|
+
// return;
|
|
21723
|
+
// }
|
|
21724
|
+
// let message = `Trình duyệt sẽ khởi động lại sau ${seconds}s`;
|
|
21725
|
+
// if (seconds < 1) {
|
|
21726
|
+
// message = 'Trình duyệt sẽ khởi động lại ngay bây giờ';
|
|
21727
|
+
// }
|
|
21728
|
+
// this._notifierService.showConfirm(
|
|
21729
|
+
// message, null, null, false, this._translateService.instant('CONFIRM.ACCEPT_LABEL'),
|
|
21730
|
+
// 'pi pi-check'
|
|
21731
|
+
// ).then(res => {
|
|
21732
|
+
// clearInterval(this.intervalCountdown);
|
|
21733
|
+
// this.reloadWindow();
|
|
21734
|
+
// });
|
|
21735
|
+
// }, 1000);
|
|
21736
|
+
};
|
|
21737
|
+
AppTopBarV1Component.prototype.reloadWindow = function () {
|
|
21738
|
+
top.location.reload();
|
|
21739
|
+
};
|
|
21740
|
+
return AppTopBarV1Component;
|
|
21741
|
+
}(ComponentBase));
|
|
21742
|
+
AppTopBarV1Component.decorators = [
|
|
21743
|
+
{ type: i0.Component, args: [{
|
|
21744
|
+
selector: 'app-topbar-v1',
|
|
21745
|
+
template: "<div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\" (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\" [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\" #profile\r\n class=\"profile-item tn-l-top-bar-menu-item\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <ng-container *ngIf=\"currentUser\">\r\n <li role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-inbox\"></i>\r\n <span>Th\u01B0 m\u1EE5c c\u00E1 nh\u00E2n</span>\r\n </a>\r\n </li>\r\n <li role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-user-edit\"></i>\r\n <span>C\u1EADp nh\u1EADt th\u00F4ng tin</span>\r\n </a>\r\n </li>\r\n <li role=\"menuitem\">\r\n <a href=\"#\" (click)=\"onEditInfo($event)\">\r\n <i class=\"pi pi-book\"></i>\r\n <span>Ghi ch\u00FA</span>\r\n </a>\r\n </li>\r\n <li role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n </ng-container>\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" class=\"tn-l-top-bar-menu-item-inner\" style=\"height: 30px;\"\r\n pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n (click)=\"_commonService.onTopbarItemClick($event,modules)\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" class=\"wrapper-appswitch\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>",
|
|
21746
|
+
providers: [ComponentContextService],
|
|
21747
|
+
styles: [".topBarSearchButton:disabled{background-color:#eee!important;border:1px solid #c8c8c8!important;border-right:none!important;color:#c1c1c1!important;opacity:1}::ng-deep app-topbar a{outline:none}input:disabled::-moz-placeholder{color:#b1b1b1}input:disabled:-ms-input-placeholder{color:#b1b1b1}input:disabled::placeholder{color:#b1b1b1}.UserPane.UserPane{display:flex}.profile-image-wrapper{order:1}.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name{float:none;margin-top:0}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{display:inline-flex;flex-direction:column;float:none;justify-content:center;order:0;text-align:right}.tn-l-logo{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.tn-l-default-detting{color:#fff;cursor:pointer;margin:0}.tn-l-left-menu-toggle-block{-ms-grid-row-align:stretch;align-items:center;align-self:stretch;box-shadow:0 0 5px 0 rgba(0,0,0,.3764705882352941);display:flex}.tn-l-left-menu-toggle{color:#fff;padding:8px;transition:transform .25s ease-in-out}::ng-deep .layout-menu-static-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-left:0;margin-right:30px}.topbar-logo.topbar-logo.topbar-logo{float:none}.tn-l-logo.tn-l-logo.tn-l-logo.tn-l-logo{height:40px;margin:0;width:auto}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{font-size:0;height:auto;margin:0;padding-left:8px;padding-right:8px;width:auto}.tn-l-top-bar{display:flex}.topbar-description,.topbar-owner{white-space:nowrap}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:15px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:11px;text-transform:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{display:flex;float:none;width:auto}.tn-l-top-bar-left{align-items:center}.tn-m-topbar-menu-toggle{display:block;height:28px;margin:auto;width:30px}.tn-m-topbar-menu-toggle g{stroke:#fff}.tn-m-topbar-menu-toggle path{fill:#fff}.tn-l-m-default-setting{display:none}.setting-default-container{justify-content:center}.notify-message,.setting-default-container{align-items:center;display:flex;margin-left:30px}.notify-message{flex:1 1;overflow:hidden}.notify-message>marquee{color:#ff0;font-size:500;white-space:nowrap}.search-item{margin-right:10px}.tn-l-switcher-item-inner{padding-top:4px}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{align-items:center;background:#fff;display:inline-flex;justify-content:center}.tn-l-switcher-item-label{color:#52abff;margin-top:4px;text-shadow:none}.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon{color:#52abff;font-size:38px;margin:0 auto;text-shadow:none}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{padding:8px}.tn-l-switcher.tn-l-switcher{margin-bottom:0}::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item{width:unset}::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+0){border-left:none}::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+1){border-right:none}::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+2){border:none}::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+1):last-child,::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item:nth-child(3n+2):last-child{width:unset}::ng-deep .layout-wrapper app-topbar-v1 .wrapper-appswitch{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));text-align:center}@media (max-width:1024px){::ng-deep .layout-wrapper app-topbar-v1 .layout-menu li a.switcher-item{width:unset}}@media (min-width:1025px){.tn-l-top-bar-right{align-items:center;display:flex;justify-content:space-between}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding:0 15px}.topbar-items.topbar-items.topbar-items{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-start;margin:0}.topbar-items.topbar-items.topbar-items,.topbar-items.topbar-items.topbar-items>li{float:none}::ng-deep .topbar .topbar-items>li>a{margin-top:0}::ng-deep .topbar .topbar-items>li>a>span>i{color:#fff;font-size:24px}.topbar .topbar-items>li>a.UserPane{height:auto;line-height:inherit;top:0}a.UserPane .profile-image.profile-image.profile-image.profile-image{margin-top:0}}@media (min-width:1025px) and (max-width:1400px){.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-right:19px}.search-item{margin-right:0}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding-left:15px}.topbar-items>li.profile-item{margin-left:14px}}@media (max-width:1024px){.tn-l-m-default-setting{align-items:center;color:#fff;display:flex;font-size:28px;height:36px;justify-content:center;width:36px}.tn-l-default-detting{display:none}::ng-deep .layout-menu-static-mobile-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{text-align:left}.topbar .topbar-right #topbar-menu-button{align-items:center;display:flex;justify-content:center;width:36px}.tn-l-top-bar-right-block-1{display:flex}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{padding-left:5px;padding-right:5px}.tn-l-logo-title-block,.tn-l-top-bar-left,.topbar-description,.topbar-owner{overflow:hidden}.topbar-description,.topbar-owner{text-overflow:ellipsis}.tn-l-top-bar-menu-item:empty{display:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{padding-left:0;padding-right:0}.topbar-title.topbar-title.topbar-title.topbar-title{margin:0}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:14px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:10px}.tn-l-top-bar-right{flex:1;position:relative}.topbar-menu-button span.topbar-badge{right:-4px}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{align-items:center;display:flex;justify-content:flex-end;padding:0 .5em}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right #topbar-menu-button{margin-left:.5em;position:relative;right:0;top:0}.app-switcher.layout-menu.layout-menu.layout-menu.layout-menu{width:270px}.profile-image-wrapper{order:0}.tn-l-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:220px}::ng-deep app-topbar .tn-l-top-bar-menu-item .topbar-icon-left{align-items:center;display:flex;justify-content:center}.tn-l-topbar-item-role-wrapper{display:none}}"]
|
|
21748
|
+
},] }
|
|
21749
|
+
];
|
|
21750
|
+
AppTopBarV1Component.ctorParameters = function () { return [
|
|
21751
|
+
{ type: CustomRouterService },
|
|
21752
|
+
{ type: i3.Router },
|
|
21753
|
+
{ type: CommonService },
|
|
21754
|
+
{ type: AuthenService },
|
|
21755
|
+
{ type: i0.ChangeDetectorRef },
|
|
21756
|
+
{ type: i0.Injector },
|
|
21757
|
+
{ type: PermissionService },
|
|
21758
|
+
{ type: ModuleConfigService },
|
|
21759
|
+
{ type: UserService },
|
|
21760
|
+
{ type: NotifierService },
|
|
21761
|
+
{ type: i2.TranslateService }
|
|
21762
|
+
]; };
|
|
21763
|
+
AppTopBarV1Component.propDecorators = {
|
|
21764
|
+
input: [{ type: i0.ViewChild, args: ['input',] }],
|
|
21765
|
+
notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
|
|
21766
|
+
};
|
|
21767
|
+
|
|
21768
|
+
var AppTopBarV2Component = /** @class */ (function (_super) {
|
|
21769
|
+
__extends(AppTopBarV2Component, _super);
|
|
21770
|
+
function AppTopBarV2Component(
|
|
21771
|
+
// public app: AppComponent,
|
|
21772
|
+
_customRouteService, _router, _commonService, _authenService, _cd, _injector, _permissionService, _moduleConfigService, _userService, _notifierService, _translateService) {
|
|
21773
|
+
var _this = _super.call(this, _injector) || this;
|
|
21774
|
+
_this._customRouteService = _customRouteService;
|
|
21775
|
+
_this._router = _router;
|
|
21776
|
+
_this._commonService = _commonService;
|
|
21777
|
+
_this._authenService = _authenService;
|
|
21778
|
+
_this._cd = _cd;
|
|
21779
|
+
_this._permissionService = _permissionService;
|
|
21780
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
21781
|
+
_this._userService = _userService;
|
|
21782
|
+
_this._notifierService = _notifierService;
|
|
21783
|
+
_this._translateService = _translateService;
|
|
21784
|
+
_this.defaultAvatar = '';
|
|
21785
|
+
_this.key = '';
|
|
21786
|
+
_this.currentRoute = '';
|
|
21787
|
+
_this.fileApi = '';
|
|
21788
|
+
_this.currentUser = null;
|
|
21789
|
+
_this.appSwitcherItems = [];
|
|
21790
|
+
_this.isFirstTime = false;
|
|
21791
|
+
_this.showSettings = false;
|
|
21792
|
+
_this.allSubscriptions = [];
|
|
21793
|
+
_this.message = '';
|
|
21794
|
+
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
21795
|
+
_this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
|
|
21796
|
+
_this.fileApi = _this.environment.apiDomain.fileEndpoint;
|
|
21797
|
+
if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
|
|
21798
|
+
_this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
|
|
21799
|
+
}
|
|
21800
|
+
else {
|
|
21801
|
+
if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
|
|
21802
|
+
_this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
|
|
21803
|
+
}
|
|
21804
|
+
else {
|
|
21805
|
+
_this.showDefaultSetting = false;
|
|
21806
|
+
}
|
|
21807
|
+
}
|
|
21808
|
+
if (!_this.rootContext.data.currentUser) {
|
|
21809
|
+
_this.rootContext.data.currentUser = {};
|
|
21810
|
+
}
|
|
21811
|
+
// this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT.USER_INFO_CHANGED, rs => {
|
|
21812
|
+
// this._cd.detectChanges();
|
|
21813
|
+
// }));
|
|
21814
|
+
_this.rootContext.replaySubscribeOnce(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
|
|
21815
|
+
_this.currentUser = _this._userService.getCurrentUser();
|
|
21816
|
+
_this.loadMenuMetadata();
|
|
21817
|
+
});
|
|
21818
|
+
if (_this.rootModel.allowAnonymous) {
|
|
21819
|
+
_this.loadMenuMetadata();
|
|
21820
|
+
}
|
|
21821
|
+
return _this;
|
|
21822
|
+
}
|
|
21823
|
+
AppTopBarV2Component.prototype.loadMenuMetadata = function () {
|
|
21824
|
+
var _this = this;
|
|
21825
|
+
var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
21826
|
+
var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
|
|
21827
|
+
return __generator(this, function (_c) {
|
|
21828
|
+
switch (_c.label) {
|
|
21829
|
+
case 0:
|
|
21830
|
+
arr = [];
|
|
21831
|
+
_a = [];
|
|
21832
|
+
for (_b in this.environment.appMetadata.appSwitcher)
|
|
21833
|
+
_a.push(_b);
|
|
21834
|
+
_i = 0;
|
|
21835
|
+
_c.label = 1;
|
|
21836
|
+
case 1:
|
|
21837
|
+
if (!(_i < _a.length)) return [3 /*break*/, 5];
|
|
21838
|
+
ind = _a[_i];
|
|
21839
|
+
element = this.environment.appMetadata.appSwitcher[ind];
|
|
21840
|
+
clientId = this.environment.authenticationSettings.clientId;
|
|
21841
|
+
if (!(this.rootContext.data.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
|
|
21842
|
+
arr.push(element);
|
|
21843
|
+
return [3 /*break*/, 4];
|
|
21844
|
+
case 2:
|
|
21845
|
+
if (!this.currentUser) return [3 /*break*/, 4];
|
|
21846
|
+
return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
|
|
21847
|
+
case 3:
|
|
21848
|
+
isAuthorized = _c.sent();
|
|
21849
|
+
if (isAuthorized) {
|
|
21850
|
+
arr.push(element);
|
|
21851
|
+
}
|
|
21852
|
+
_c.label = 4;
|
|
21853
|
+
case 4:
|
|
21854
|
+
_i++;
|
|
21855
|
+
return [3 /*break*/, 1];
|
|
21856
|
+
case 5:
|
|
21857
|
+
resolve(arr);
|
|
21858
|
+
return [2 /*return*/];
|
|
21859
|
+
}
|
|
21860
|
+
});
|
|
21861
|
+
}); });
|
|
21862
|
+
prmsAppSwicherItem.then(function (rs) {
|
|
21863
|
+
if (rs) {
|
|
21864
|
+
var currentUser_1 = _this._userService.getCurrentUser();
|
|
21865
|
+
_this.appSwitcherItems.length = 0;
|
|
21866
|
+
rs.forEach(function (element) {
|
|
21867
|
+
if (element.visible) {
|
|
21868
|
+
if (element.allowAnonymous) {
|
|
21869
|
+
_this.appSwitcherItems.push(element);
|
|
21870
|
+
}
|
|
21871
|
+
else {
|
|
21872
|
+
if (currentUser_1.maNguoiHoc && currentUser_1.issuperuser && currentUser_1.issuperuser.toLowerCase() != 'true') {
|
|
21873
|
+
if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
|
|
21874
|
+
_this.appSwitcherItems.push(element);
|
|
21875
|
+
}
|
|
21876
|
+
}
|
|
21877
|
+
else {
|
|
21878
|
+
_this.appSwitcherItems.push(element);
|
|
21879
|
+
}
|
|
21880
|
+
}
|
|
21881
|
+
}
|
|
21882
|
+
});
|
|
21883
|
+
}
|
|
21884
|
+
});
|
|
21885
|
+
};
|
|
21886
|
+
AppTopBarV2Component.prototype.ngOnInit = function () {
|
|
21887
|
+
var _this = this;
|
|
21888
|
+
if (this.rootContext.data.currentUser) {
|
|
21889
|
+
if (this.rootContext.data.currentUser.gender == 0) {
|
|
21890
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
|
|
21891
|
+
}
|
|
21892
|
+
else {
|
|
21893
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
|
|
21894
|
+
}
|
|
21895
|
+
this.userProfile = this._userService.getProfileInfo();
|
|
21896
|
+
}
|
|
21897
|
+
this.rootContext.subscribe(ComCtxConstants.ROOT.BODY_MOUSE_DOWN, function (e) {
|
|
21898
|
+
setTimeout(function () {
|
|
21899
|
+
_this.hideAdvanceSearch(e);
|
|
21900
|
+
});
|
|
21901
|
+
});
|
|
21902
|
+
this.rootContext.subscribe(ComCtxConstants.ROOT.KEY_DOWN_CTRL_F, function (e) {
|
|
21903
|
+
_this.focusToSearchBox();
|
|
21904
|
+
});
|
|
21905
|
+
this.rootContext.subscribe(ComCtxConstants.COMMON.FORCE_RELOAD, function (e) {
|
|
21906
|
+
_this.showNotificationReload();
|
|
21907
|
+
});
|
|
21908
|
+
this.rootContext.subscribe(ComCtxConstants.COMMON.SHOW_NOTIFY, function (e) {
|
|
21909
|
+
_this.setNotify(e.message);
|
|
21910
|
+
});
|
|
21911
|
+
this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT_USMART.SHOW_CONFIG_DATA_DEFAULT, function (e) {
|
|
21912
|
+
_this.model.dataModelSetting.showSettings = true;
|
|
21913
|
+
}));
|
|
21914
|
+
this.model.dataModelSetting = {
|
|
21915
|
+
data: {},
|
|
21916
|
+
showSettings: false
|
|
21917
|
+
};
|
|
21918
|
+
this.subscribe(ComCtxConstants.COMMON.SAVE_DATA_DEFAULT, function (data) {
|
|
21919
|
+
_this.formatDefaultDataSetting(data);
|
|
21920
|
+
_this.reloadWindow();
|
|
21921
|
+
});
|
|
21922
|
+
var stringDataDefault = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.DEFAULT_DATA);
|
|
21923
|
+
if (stringDataDefault) {
|
|
21924
|
+
var dataCacheDefault = JSON.parse(stringDataDefault);
|
|
21925
|
+
this.formatDefaultDataSetting(dataCacheDefault);
|
|
21926
|
+
}
|
|
21927
|
+
else {
|
|
21928
|
+
this.defaultDataSetting = 'Thiết lập tham số mặc định';
|
|
21929
|
+
}
|
|
21930
|
+
};
|
|
21931
|
+
AppTopBarV2Component.prototype.ngOnDestroy = function () {
|
|
21932
|
+
this.allSubscriptions.forEach(function (element) {
|
|
21933
|
+
element.unsubscribe();
|
|
21934
|
+
});
|
|
21935
|
+
if (this.intervalCountdown) {
|
|
21936
|
+
clearInterval(this.intervalCountdown);
|
|
21937
|
+
}
|
|
21938
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
21939
|
+
};
|
|
21940
|
+
AppTopBarV2Component.prototype.formatDefaultDataSetting = function (data) {
|
|
21941
|
+
var _this = this;
|
|
21942
|
+
var dataSetting = '';
|
|
21943
|
+
var fields = ['instanceIdHeDaoTao', 'heDaoTao', 'namHoc', 'hocKy', 'instanceIdNamHoc', 'instanceIdHocKy', 'idDotThi'];
|
|
21944
|
+
var fieldPluses = ['code', 'code', 'ten', 'ten', 'ten', 'ten', 'ten'];
|
|
21945
|
+
fields.forEach(function (field, index) {
|
|
21946
|
+
if (!_this.checkHidden(field)) {
|
|
21947
|
+
var _f = "" + field + fieldPluses[index];
|
|
21948
|
+
if (data[_f]) {
|
|
21949
|
+
dataSetting += data[_f] + '/';
|
|
21950
|
+
}
|
|
21951
|
+
}
|
|
21952
|
+
});
|
|
21953
|
+
if (dataSetting.length > 0) {
|
|
21954
|
+
dataSetting = dataSetting.substring(0, dataSetting.length - 1);
|
|
21955
|
+
}
|
|
21956
|
+
this.defaultDataSetting = dataSetting;
|
|
21957
|
+
};
|
|
21958
|
+
AppTopBarV2Component.prototype.checkHidden = function (field) {
|
|
21959
|
+
return this.rootModel.currentAppMetadata.configDefaultSetting && !this.rootModel.currentAppMetadata.configDefaultSetting.column.some(function (p) { return p.field == field; });
|
|
21960
|
+
};
|
|
21961
|
+
AppTopBarV2Component.prototype.getCurrentUserFullName = function () {
|
|
21962
|
+
return this.rootContext.data.currentUser && this.rootContext.data.currentUser.fullName ? this.rootContext.data.currentUser.fullName : 'Khách';
|
|
21963
|
+
};
|
|
21964
|
+
AppTopBarV2Component.prototype.getCurrentUserPosition = function () {
|
|
21965
|
+
return this.userProfile ? this.userProfile.tenDonVi : null;
|
|
21966
|
+
};
|
|
21967
|
+
AppTopBarV2Component.prototype.getCurrentUserAvatar = function () {
|
|
21968
|
+
if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
|
|
21969
|
+
return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
|
|
21970
|
+
}
|
|
21971
|
+
else {
|
|
21972
|
+
return this.defaultAvatar;
|
|
21973
|
+
}
|
|
21974
|
+
};
|
|
21975
|
+
AppTopBarV2Component.prototype.clearFilter = function (input) {
|
|
21976
|
+
var _this = this;
|
|
21977
|
+
setTimeout(function () {
|
|
21978
|
+
_this.model.searchModel[_this.model.fieldKey] = '';
|
|
21979
|
+
_this._customRouteService.updateFragment(_this.model.fieldKey, null);
|
|
21980
|
+
_this._customRouteService.updateWithoutFireEvent();
|
|
21981
|
+
_this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
|
|
21982
|
+
input.value = '';
|
|
21983
|
+
input.focus();
|
|
21984
|
+
_this._cd.detectChanges();
|
|
21985
|
+
});
|
|
21986
|
+
};
|
|
21987
|
+
AppTopBarV2Component.prototype.toggleAdvanceSearch = function (evt) {
|
|
21988
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_TOGGLE_BOX, { event: evt });
|
|
21989
|
+
evt.preventDefault();
|
|
21990
|
+
evt.cancelBubble = true;
|
|
21991
|
+
};
|
|
21992
|
+
AppTopBarV2Component.prototype.hideAdvanceSearch = function (evt) {
|
|
21993
|
+
if (document.getElementById('advance-search-box')) {
|
|
21994
|
+
var mask = document.body.querySelectorAll('div[class~="ui-dialog-mask"]');
|
|
21995
|
+
if (!mask.length) {
|
|
21996
|
+
var closestDropdown = evt.target.closest('.dropdown-advs');
|
|
21997
|
+
if (closestDropdown == null || closestDropdown.length == 0) {
|
|
21998
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_HIDE_BOX, { event: evt });
|
|
21999
|
+
}
|
|
22000
|
+
}
|
|
22001
|
+
}
|
|
22002
|
+
};
|
|
22003
|
+
AppTopBarV2Component.prototype.focusToSearchBox = function () {
|
|
22004
|
+
if (!document.body.querySelector('div[class~="ui-dialog-mask"]')) {
|
|
22005
|
+
this.input.nativeElement.focus();
|
|
22006
|
+
}
|
|
22007
|
+
};
|
|
22008
|
+
AppTopBarV2Component.prototype.onTopbarSearchClick = function (event, input) {
|
|
22009
|
+
var _this = this;
|
|
22010
|
+
if (!this.model.fieldKey) {
|
|
22011
|
+
return;
|
|
22012
|
+
}
|
|
22013
|
+
setTimeout(function () {
|
|
22014
|
+
_this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
|
|
22015
|
+
_this._customRouteService.updateFragment(_this.model.fieldKey, input.value);
|
|
22016
|
+
_this._customRouteService.updateWithoutFireEvent();
|
|
22017
|
+
input.focus();
|
|
22018
|
+
});
|
|
22019
|
+
};
|
|
22020
|
+
AppTopBarV2Component.prototype.onEsc = function (event, input) {
|
|
22021
|
+
this.clearFilter(input);
|
|
22022
|
+
};
|
|
22023
|
+
AppTopBarV2Component.prototype.onEnter = function (event, input) {
|
|
22024
|
+
this.onTopbarSearchClick(event, input);
|
|
22025
|
+
};
|
|
22026
|
+
AppTopBarV2Component.prototype.switchApp = function (item, openNewTab) {
|
|
22027
|
+
if (openNewTab === void 0) { openNewTab = false; }
|
|
22028
|
+
if (item.target == '_blank') {
|
|
22029
|
+
if (!item.defaultRedirect) {
|
|
22030
|
+
item.defaultRedirect = '';
|
|
22031
|
+
}
|
|
22032
|
+
// NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
|
|
22033
|
+
if (item.url == item.defaultRedirect) {
|
|
22034
|
+
item.url = '/' + item.code.toLowerCase();
|
|
22035
|
+
}
|
|
22036
|
+
if (!openNewTab) {
|
|
22037
|
+
top.location.href = item.url + "/" + item.defaultRedirect;
|
|
22038
|
+
}
|
|
22039
|
+
else {
|
|
22040
|
+
window.open(item.url + "/" + item.defaultRedirect, '_blank');
|
|
22041
|
+
}
|
|
22042
|
+
}
|
|
22043
|
+
else {
|
|
22044
|
+
if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
|
|
22045
|
+
this._router.navigateByUrl(item.defaultRedirect);
|
|
22046
|
+
this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
|
|
22047
|
+
if (this.rootContext.data.currentAppMetadata
|
|
22048
|
+
&& this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined
|
|
22049
|
+
&& this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
|
|
22050
|
+
this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
|
|
22051
|
+
}
|
|
22052
|
+
}
|
|
22053
|
+
}
|
|
22054
|
+
};
|
|
22055
|
+
AppTopBarV2Component.prototype.hasAdvanceSearchBox = function () {
|
|
22056
|
+
return this.model.searchModel.hasAdvanceSearch;
|
|
22057
|
+
};
|
|
22058
|
+
AppTopBarV2Component.prototype.isAdvanceSearching = function () {
|
|
22059
|
+
return this.hasAdvanceSearchValue(this.model.searchModel);
|
|
22060
|
+
};
|
|
22061
|
+
AppTopBarV2Component.prototype.hasAdvanceSearchValue = function (obj) {
|
|
22062
|
+
for (var key in obj) {
|
|
22063
|
+
if (key === '_k' || key === 'hasAdvanceSearch') {
|
|
22064
|
+
continue;
|
|
22065
|
+
}
|
|
22066
|
+
if (obj[key] != null && obj[key] != '') {
|
|
22067
|
+
return false;
|
|
22068
|
+
}
|
|
22069
|
+
}
|
|
22070
|
+
return true;
|
|
22071
|
+
};
|
|
22072
|
+
AppTopBarV2Component.prototype.getComponentId = function () {
|
|
22073
|
+
return 'TOPBAR';
|
|
22074
|
+
};
|
|
22075
|
+
AppTopBarV2Component.prototype.goToHome = function () {
|
|
22076
|
+
this.rootContext.fireEvent('GO_HOME');
|
|
22077
|
+
};
|
|
22078
|
+
AppTopBarV2Component.prototype.onEditInfo = function (event) {
|
|
22079
|
+
event.preventDefault();
|
|
22080
|
+
var currentAppSetting = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
|
|
22081
|
+
if (currentAppSetting) {
|
|
22082
|
+
this.switchApp(currentAppSetting);
|
|
22083
|
+
}
|
|
22084
|
+
else {
|
|
22085
|
+
console.error('Bạn chưa thiết lập metadata cho trang cá nhân');
|
|
22086
|
+
}
|
|
22087
|
+
};
|
|
22088
|
+
AppTopBarV2Component.prototype.onChangePassword = function (event) {
|
|
22089
|
+
event.preventDefault();
|
|
22090
|
+
// this.changePassword.showPopup(this._userService.getId());
|
|
22091
|
+
};
|
|
22092
|
+
AppTopBarV2Component.prototype.onTopbarLogout = function () {
|
|
22093
|
+
if (!localStorage.getItem('currentUrl')) {
|
|
22094
|
+
localStorage.setItem('currentUrl', top.location.href);
|
|
22095
|
+
}
|
|
22096
|
+
this._authenService.logout();
|
|
22097
|
+
};
|
|
22098
|
+
AppTopBarV2Component.prototype.settingDefault = function () {
|
|
22099
|
+
this.model.dataModelSetting = {
|
|
22100
|
+
data: {},
|
|
22101
|
+
showSettings: true
|
|
22102
|
+
};
|
|
22103
|
+
};
|
|
22104
|
+
AppTopBarV2Component.prototype.onShowSettings = function (ev) {
|
|
22105
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_OPENED);
|
|
22106
|
+
};
|
|
22107
|
+
AppTopBarV2Component.prototype.onCloseSettings = function (ev) {
|
|
22108
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_CLOSED);
|
|
22109
|
+
};
|
|
22110
|
+
AppTopBarV2Component.prototype.showProfilePage = function () {
|
|
22111
|
+
if (this._userService.isSinhVienAccount()) {
|
|
22112
|
+
return false;
|
|
22113
|
+
}
|
|
22114
|
+
return true;
|
|
22115
|
+
};
|
|
22116
|
+
AppTopBarV2Component.prototype.login = function () {
|
|
22117
|
+
this.rootContext.fireEvent('LOGIN');
|
|
22118
|
+
};
|
|
22119
|
+
AppTopBarV2Component.prototype.setNotify = function (message) {
|
|
22120
|
+
this.message = message;
|
|
22121
|
+
};
|
|
22122
|
+
AppTopBarV2Component.prototype.handleMouseOver = function (evt) {
|
|
22123
|
+
evt.target.stop();
|
|
22124
|
+
};
|
|
22125
|
+
AppTopBarV2Component.prototype.handleMouseOut = function (evt) {
|
|
22126
|
+
evt.target.start();
|
|
22127
|
+
};
|
|
22128
|
+
AppTopBarV2Component.prototype.showNotificationReload = function () {
|
|
22129
|
+
var _this = this;
|
|
22130
|
+
this.message = 'Hệ thống có phiên bản mới, hãy refresh trình duyệt để cập nhật';
|
|
22131
|
+
this.rootContext.fireEvent(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, false);
|
|
22132
|
+
this._notifierService.showConfirm(this.message).then(function (res) {
|
|
22133
|
+
_this.reloadWindow();
|
|
22134
|
+
});
|
|
22135
|
+
// if (this.intervalCountdown) {
|
|
22136
|
+
// clearInterval(this.intervalCountdown);
|
|
22137
|
+
// }
|
|
22138
|
+
// const date = new Date();
|
|
22139
|
+
// const goalDate = (new Date(date.getTime() + 10 * 1000)).getTime(); // Đếm 10s
|
|
22140
|
+
// this.intervalCountdown = setInterval(f => {
|
|
22141
|
+
// const now = new Date().getTime();
|
|
22142
|
+
// const distance = goalDate - now;
|
|
22143
|
+
// var seconds = Math.floor(distance / 1000);
|
|
22144
|
+
// // If the count down is finished, write some text
|
|
22145
|
+
// if (distance < 0) {
|
|
22146
|
+
// clearInterval(this.intervalCountdown);
|
|
22147
|
+
// this.reloadWindow();
|
|
22148
|
+
// return;
|
|
22149
|
+
// }
|
|
22150
|
+
// let message = `Trình duyệt sẽ khởi động lại sau ${seconds}s`;
|
|
22151
|
+
// if (seconds < 1) {
|
|
22152
|
+
// message = 'Trình duyệt sẽ khởi động lại ngay bây giờ';
|
|
22153
|
+
// }
|
|
22154
|
+
// this._notifierService.showConfirm(
|
|
22155
|
+
// message, null, null, false, this._translateService.instant('CONFIRM.ACCEPT_LABEL'),
|
|
22156
|
+
// 'pi pi-check'
|
|
22157
|
+
// ).then(res => {
|
|
22158
|
+
// clearInterval(this.intervalCountdown);
|
|
22159
|
+
// this.reloadWindow();
|
|
22160
|
+
// });
|
|
22161
|
+
// }, 1000);
|
|
22162
|
+
};
|
|
22163
|
+
AppTopBarV2Component.prototype.reloadWindow = function () {
|
|
22164
|
+
top.location.reload();
|
|
22165
|
+
};
|
|
22166
|
+
return AppTopBarV2Component;
|
|
22167
|
+
}(ComponentBase));
|
|
22168
|
+
AppTopBarV2Component.decorators = [
|
|
22169
|
+
{ type: i0.Component, args: [{
|
|
22170
|
+
selector: 'app-topbar-v2',
|
|
22171
|
+
template: "<div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\" (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\" [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li #profile class=\"profile-item tn-l-top-bar-menu-item\"\r\n *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" class=\"tn-l-top-bar-menu-item-inner\" style=\"height: 30px;\"\r\n pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n (click)=\"_commonService.onTopbarItemClick($event,modules)\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" class=\"wrapper-appswitch\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>",
|
|
22172
|
+
providers: [ComponentContextService],
|
|
22173
|
+
styles: [".topBarSearchButton:disabled{background-color:#eee!important;border:1px solid #c8c8c8!important;border-right:none!important;color:#c1c1c1!important;opacity:1}::ng-deep app-topbar a{outline:none}input:disabled::-moz-placeholder{color:#b1b1b1}input:disabled:-ms-input-placeholder{color:#b1b1b1}input:disabled::placeholder{color:#b1b1b1}.UserPane.UserPane{display:flex}.profile-image-wrapper{order:1}.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name{float:none;margin-top:0}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{display:inline-flex;flex-direction:column;float:none;justify-content:center;order:0;text-align:right}.tn-l-logo{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.tn-l-default-detting{color:#fff;cursor:pointer;margin:0}.tn-l-left-menu-toggle-block{-ms-grid-row-align:stretch;align-items:center;align-self:stretch;box-shadow:0 0 5px 0 rgba(0,0,0,.3764705882352941);display:flex}.tn-l-left-menu-toggle{color:#fff;padding:8px;transition:transform .25s ease-in-out}::ng-deep .layout-menu-static-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-left:0;margin-right:30px}.topbar-logo.topbar-logo.topbar-logo{float:none}.tn-l-logo.tn-l-logo.tn-l-logo.tn-l-logo{height:40px;margin:0;width:auto}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{font-size:0;height:auto;margin:0;padding-left:8px;padding-right:8px;width:auto}.tn-l-top-bar{display:flex}.topbar-description,.topbar-owner{white-space:nowrap}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:15px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:11px;text-transform:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{display:flex;float:none;width:auto}.tn-l-top-bar-left{align-items:center}.tn-m-topbar-menu-toggle{display:block;height:28px;margin:auto;width:30px}.tn-m-topbar-menu-toggle g{stroke:#fff}.tn-m-topbar-menu-toggle path{fill:#fff}.tn-l-m-default-setting{display:none}.setting-default-container{justify-content:center}.notify-message,.setting-default-container{align-items:center;display:flex;margin-left:30px}.notify-message{flex:1 1;overflow:hidden}.notify-message>marquee{color:#ff0;font-size:500;white-space:nowrap}.search-item{margin-right:10px}.tn-l-switcher-item-inner{padding-top:4px}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{align-items:center;background:#fff;display:inline-flex;justify-content:center}.tn-l-switcher-item-label{color:#52abff;line-height:20px;margin-top:4px;text-align:center;text-shadow:none}.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon{color:#52abff;font-size:38px;margin:0 auto;text-shadow:none}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{padding:8px}.tn-l-switcher.tn-l-switcher{margin-bottom:0}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item{width:unset}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+0){border-left:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+1){border-right:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+2){border:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+1):last-child,::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+2):last-child{width:unset}::ng-deep .layout-wrapper app-topbar-v2 .topbar .topbar-left{box-shadow:none}::ng-deep .layout-wrapper app-topbar-v2 .wrapper-appswitch{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));text-align:center}@media (max-width:1024px){::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item{width:unset}}@media (min-width:1025px){.tn-l-top-bar-right{align-items:center;display:flex;justify-content:space-between}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding:0 15px}.topbar-items.topbar-items.topbar-items{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-start;margin:0}.topbar-items.topbar-items.topbar-items,.topbar-items.topbar-items.topbar-items>li{float:none}::ng-deep .topbar .topbar-items>li>a{margin-top:0}::ng-deep .topbar .topbar-items>li>a>span>i{color:#fff;font-size:24px}.topbar .topbar-items>li>a.UserPane{height:auto;line-height:inherit;top:0}a.UserPane .profile-image.profile-image.profile-image.profile-image{margin-top:0}}@media (min-width:1025px) and (max-width:1400px){.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-right:19px}.search-item{margin-right:0}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding-left:15px}.topbar-items>li.profile-item{margin-left:14px}}@media (max-width:1024px){.tn-l-m-default-setting{align-items:center;color:#fff;display:flex;font-size:28px;height:36px;justify-content:center;width:36px}.tn-l-default-detting{display:none}::ng-deep .layout-menu-static-mobile-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{text-align:left}.topbar .topbar-right #topbar-menu-button{align-items:center;display:flex;justify-content:center;width:36px}.tn-l-top-bar-right-block-1{display:flex}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{padding-left:5px;padding-right:5px}.tn-l-logo-title-block,.tn-l-top-bar-left,.topbar-description,.topbar-owner{overflow:hidden}.topbar-description,.topbar-owner{text-overflow:ellipsis}.tn-l-top-bar-menu-item:empty{display:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{padding-left:0;padding-right:0}.topbar-title.topbar-title.topbar-title.topbar-title{margin:0}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:14px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:10px}.tn-l-top-bar-right{flex:1;position:relative}.topbar-menu-button span.topbar-badge{right:-4px}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{align-items:center;display:flex;justify-content:flex-end;padding:0 .5em}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right #topbar-menu-button{margin-left:.5em;position:relative;right:0;top:0}.app-switcher.layout-menu.layout-menu.layout-menu.layout-menu{width:270px}.profile-image-wrapper{order:0}.tn-l-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:220px}::ng-deep app-topbar .tn-l-top-bar-menu-item .topbar-icon-left{align-items:center;display:flex;justify-content:center}.tn-l-topbar-item-role-wrapper{display:none}}"]
|
|
22174
|
+
},] }
|
|
22175
|
+
];
|
|
22176
|
+
AppTopBarV2Component.ctorParameters = function () { return [
|
|
22177
|
+
{ type: CustomRouterService },
|
|
22178
|
+
{ type: i3.Router },
|
|
22179
|
+
{ type: CommonService },
|
|
22180
|
+
{ type: AuthenService },
|
|
22181
|
+
{ type: i0.ChangeDetectorRef },
|
|
22182
|
+
{ type: i0.Injector },
|
|
22183
|
+
{ type: PermissionService },
|
|
22184
|
+
{ type: ModuleConfigService },
|
|
22185
|
+
{ type: UserService },
|
|
22186
|
+
{ type: NotifierService },
|
|
22187
|
+
{ type: i2.TranslateService }
|
|
22188
|
+
]; };
|
|
22189
|
+
AppTopBarV2Component.propDecorators = {
|
|
22190
|
+
input: [{ type: i0.ViewChild, args: ['input',] }],
|
|
22191
|
+
notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
|
|
22192
|
+
};
|
|
22193
|
+
|
|
21763
22194
|
var TnClientCommand = /** @class */ (function () {
|
|
21764
22195
|
function TnClientCommand() {
|
|
21765
22196
|
}
|
|
@@ -24383,7 +24814,7 @@
|
|
|
24383
24814
|
])
|
|
24384
24815
|
])
|
|
24385
24816
|
],
|
|
24386
|
-
styles: [".advance-search-box{border:1px solid #eee;border-radius:0;overflow:hidden}.advance-filter-close{background:#fff;color:#666;font-size:.9em;position:absolute;right:3px;top:3px;z-index:1}.action-trigger{outline:none;padding:0}.action-trigger>span:first-child{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.footer-search{background:#f7f7f7;border-top:1px solid #dee2e6;bottom:0;padding:10px 1rem 10px 10px;position:sticky}.box-advance-search-inline{justify-content:flex-end}.box-advance-search-inline input{padding:5px 12px}.box-advance-search-inline .action{cursor:pointer}.box-advance-search-inline .action.dirty{color:#008eff;pointer-events:unset}.box-advance-search-inline .action.disabled{background:#e9ecef;color:#d6d6d6;cursor:unset;pointer-events:none}.box-advance-search-inline .action:hover{background:#f5f6f8}::ng-deep .advance-search-mask-overlay{background:rgba(0,0,0,.1450980392156863);bottom:0;left:0;position:fixed;right:0;top:0;z-index:999}::ng-deep .advance-search-overlay-panel{-webkit-animation-duration:.5s;animation-duration:.5s;border:0;box-shadow:0 6px 12px 0 rgba(0,0,0,.26);margin-top:0;max-width:calc(100vw - 2rem);padding:0;position:fixed;width:800px;z-index:1000}::ng-deep .advance-search-overlay-panel perfect-scrollbar{display:flex;flex-direction:column}::ng-deep .advance-search-overlay-panel:not(.hide){display:block!important}@media (min-width:768px){.box-advance-search-inline input{max-width:300px}}"]
|
|
24817
|
+
styles: [".advance-search-box{border:1px solid #eee;border-radius:0;overflow:hidden}.advance-filter-close{background:#fff;color:#666;font-size:.9em;position:absolute;right:3px;top:3px;z-index:1}.action-trigger{outline:none;padding:0}.action-trigger>span:first-child{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.footer-search{background:#f7f7f7;border-top:1px solid #dee2e6;bottom:0;padding:10px 1rem 10px 10px;position:-webkit-sticky;position:sticky}.box-advance-search-inline{justify-content:flex-end}.box-advance-search-inline input{padding:5px 12px}.box-advance-search-inline .action{cursor:pointer}.box-advance-search-inline .action.dirty{color:#008eff;pointer-events:unset}.box-advance-search-inline .action.disabled{background:#e9ecef;color:#d6d6d6;cursor:unset;pointer-events:none}.box-advance-search-inline .action:hover{background:#f5f6f8}::ng-deep .advance-search-mask-overlay{background:rgba(0,0,0,.1450980392156863);bottom:0;left:0;position:fixed;right:0;top:0;z-index:999}::ng-deep .advance-search-overlay-panel{-webkit-animation-duration:.5s;animation-duration:.5s;border:0;box-shadow:0 6px 12px 0 rgba(0,0,0,.26);margin-top:0;max-width:calc(100vw - 2rem);padding:0;position:fixed;width:800px;z-index:1000}::ng-deep .advance-search-overlay-panel perfect-scrollbar{display:flex;flex-direction:column}::ng-deep .advance-search-overlay-panel:not(.hide){display:block!important}@media (min-width:768px){.box-advance-search-inline input{max-width:300px}}"]
|
|
24387
24818
|
},] }
|
|
24388
24819
|
];
|
|
24389
24820
|
AdvanceSearchComponent.ctorParameters = function () { return [
|
|
@@ -30155,7 +30586,7 @@
|
|
|
30155
30586
|
{ type: i0.Component, args: [{
|
|
30156
30587
|
selector: 'query-builder',
|
|
30157
30588
|
template: "<tn-custom-scrollbar *ngIf=\"useScrollBar\" #scrollbar [style]=\"style\">\r\n <div [class]=\"styleClass\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n</tn-custom-scrollbar>\r\n<ng-container *ngIf=\"!useScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n</ng-container>\r\n<ng-template #content>\r\n <query-builder-group [dataSourceFields]=\"_dataSourceFields\" [query]=\"query\" [isRoot]=\"true\">\r\n </query-builder-group>\r\n</ng-template>\r\n<div *ngIf=\"!hiddenButtons\" class=\"footer-search\">\r\n <div class=\"footer-search-buttons-group\">\r\n <div>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text p-button-success\"\r\n [pTooltip]=\"'L\u01B0u b\u1ED9 l\u1ECDc hi\u1EC7n t\u1EA1i' | translate\" tooltipPosition=\"top\" (click)=\"saveFilter()\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-trash\" class=\"p-button-text p-button-danger\"\r\n [pTooltip]=\"'X\u00F3a b\u1ED9 l\u1ECDc \u0111\u00E3 l\u01B0u' | translate\" tooltipPosition=\"top\" (click)=\"deleteSave()\"></button>\r\n </div>\r\n <div>\r\n <button type=\"button\" pButton icon=\"pi pi-search\" class=\"p-button-text p-button-info\"\r\n [label]=\"'T\u00ECm ki\u1EBFm' | translate\" (click)=\"search()\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-undo\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'X\u00F3a t\u00ECm ki\u1EBFm' | translate\" (click)=\"clearFilter()\"></button>\r\n </div>\r\n </div>\r\n</div>",
|
|
30158
|
-
styles: [".footer-search{background:#f7f7f7;border-top:1px solid #dee2e6;bottom:0;padding:10px 20px 10px 10px;position:sticky}.footer-search-buttons-group{display:flex}.footer-search-buttons-group>div:first-child{flex:1 1;text-align:left}@media (max-width:640px){.footer-search-buttons-group{white-space:nowrap}}"]
|
|
30589
|
+
styles: [".footer-search{background:#f7f7f7;border-top:1px solid #dee2e6;bottom:0;padding:10px 20px 10px 10px;position:-webkit-sticky;position:sticky}.footer-search-buttons-group{display:flex}.footer-search-buttons-group>div:first-child{flex:1 1;text-align:left}@media (max-width:640px){.footer-search-buttons-group{white-space:nowrap}}"]
|
|
30159
30590
|
},] }
|
|
30160
30591
|
];
|
|
30161
30592
|
QueryBuilderComponent.ctorParameters = function () { return [
|
|
@@ -36332,10 +36763,10 @@
|
|
|
36332
36763
|
}(ComponentBase));
|
|
36333
36764
|
SplashComponentV1Component.decorators = [
|
|
36334
36765
|
{ type: i0.Component, args: [{
|
|
36335
|
-
selector: '
|
|
36336
|
-
template: "<div *ngIf=\"!loaded\" class=\"loader\">\r\n</div>\r\n<div
|
|
36766
|
+
selector: 'splash-component-v1',
|
|
36767
|
+
template: "<div *ngIf=\"!loaded\" class=\"wrp-loader\">\r\n <div class=\"loader\"></div>\r\n</div>\r\n<div *ngIf=\"loaded\" class=\"modules-v1\">\r\n <div class=\"welcome-user\">\r\n <div class=\"profile-image\">\r\n <img class=\"custom-avatar\" [src-fallback]=\"defaultAvatar\" [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n\r\n <div class=\"wrp-login\">\r\n <h2>Xin ch\u00E0o!</h2>\r\n <b>{{currentUser.fullName}}</b>\r\n <div *ngIf=\"currentUser\" class=\"login\">\r\n <a (click)=\"goToPersonal()\"><i class=\"far fa-folder-open\"></i>Trang c\u00E1 nh\u00E2n</a>\r\n <a style=\"background: #fabc01;\" (click)=\"logout()\"><i class=\"far fa-arrow-alt-circle-right\"></i>\u0110\u0103ng\r\n xu\u1EA5t</a>\r\n </div>\r\n <div *ngIf=\"!currentUser\" class=\"login\"><a style=\"background: #fabc01;\" (click)=\"login()\"><i\r\n class=\"fas fa-sign-out-alt\"></i>\u0110\u0103ng nh\u1EADp</a></div>\r\n </div>\r\n\r\n <div class=\"clock-wrapper\">\r\n <h1 class=\"clock\">{{currentDate | date:'HH:mm:ss'}}</h1>\r\n <h4 class=\"data-time\">{{getNgayTrongTuan()}}, ng\u00E0y {{currentDate | date:'dd/MM/yyyy'}}</h4>\r\n </div>\r\n </div>\r\n\r\n <div class=\"module-icons\">\r\n <div class=\"img-title\">\r\n <img class=\"tn-custom-logo\" [src]=\"environment.appMetadata.main.logo\"\r\n [alt]=\"environment.appMetadata.main.owner\">\r\n <div class=\"title\">\r\n <h2>{{environment.appMetadata.main.title}}</h2>\r\n <h1>{{environment.appMetadata.main.owner}}</h1>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div1111-wrapper\">\r\n <tn-custom-scrollbar *ngIf=\"!isOnMobile\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </tn-custom-scrollbar>\r\n\r\n <ng-container *ngIf=\"isOnMobile\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #appSwitcher>\r\n <div class=\"div1111\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <span>\r\n <a class=\"bg-switcher\" (click)=\"switchApp(item)\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon\"></i>\r\n <span>{{ item.title | translate}}</span>\r\n </a>\r\n </span>\r\n </ng-container>\r\n </div>\r\n</ng-template>",
|
|
36337
36768
|
providers: [ComponentContextService],
|
|
36338
|
-
styles: ["body{background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.modules-v1{align-items:center;background-image:url(/assets/images/background-splash.png);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules-v1 div>span{border-radius:5px;box-shadow:1px 2px 9px 1px #dadada;display:inline-block;height:120px;margin:10px;min-width:100px;white-space:normal;width:120px}.modules-v1 div>span>a{border-radius:5px;cursor:pointer;font-weight:700;height:100%;position:relative}.modules-v1 div>span>a,.modules-v1 div>span>a>span{color:#fff;display:inline-block;text-align:center;text-decoration:unset;width:100%}.modules-v1 div>span>a>span{bottom:10px;left:0;position:absolute}.modules-v1 div>span.implementing{background-color:#fff;box-shadow:none}.modules-v1 div>span>a>i{font-size:3.5em;left:0;position:absolute;top:20px;width:100%}.modules-v1 .div1111-wrapper{height:420px;margin:0 auto;max-width:700px;overflow:auto}.modules-v1 .div1111-wrapper .div1111{display:flex;flex-wrap:wrap;white-space:nowrap;width:100%}.modules-v1 .div1111-wrapper .div1111 .bg-switcher{background:#fff;transition:.3s}.modules-v1 .div1111-wrapper .div1111 .bg-switcher .app-switcher-item-icon{color:#52abff;transition:.3s}.modules-v1 .div1111-wrapper .div1111 .bg-switcher span{color:#2f70ac;font-weight:500;text-shadow:none;transition:.3s}.modules-v1 .div1111-wrapper .div1111 .bg-switcher:hover{background:#fabc01;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804)}.modules-v1 .div1111-wrapper .div1111 .bg-switcher:hover .app-switcher-item-icon,.modules-v1 .div1111-wrapper .div1111 .bg-switcher:hover span{color:#2f70ac}.modules-v1 .module-icons{-ms-grid-row-align:stretch;align-self:stretch;background-color:rgba(249,244,244,.9215686274509803);color:#666;display:flex;flex-direction:column;justify-content:space-evenly;text-align:center;width:65%}.modules-v1 .module-icons h2{color:#271756;font-size:25px;margin-bottom:15px;margin-top:15px}.modules-v1 .module-icons h1{color:#2f70ac;font-size:35px;margin-bottom:0;margin-top:0}.modules-v1 .
|
|
36769
|
+
styles: ["body{background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.wrp-loader{display:inline-block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:101}.wrp-loader .loader{-webkit-animation:load4 1.3s linear infinite;animation:load4 1.3s linear infinite;border:2px solid #bcdbf5;border-radius:50%;border-top-color:#3192e1;color:#607d8b;display:block;font-size:10px;height:10px;width:10px}.modules-v1{align-items:center;background-image:url(/assets/images/background-splash.png);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules-v1 div>span{border-radius:5px;box-shadow:1px 2px 9px 1px #dadada;display:inline-block;height:120px;margin:10px;min-width:100px;white-space:normal;width:120px}.modules-v1 div>span>a{border-radius:5px;cursor:pointer;font-weight:700;height:100%;position:relative}.modules-v1 div>span>a,.modules-v1 div>span>a>span{color:#fff;display:inline-block;text-align:center;text-decoration:unset;width:100%}.modules-v1 div>span>a>span{bottom:10px;left:0;position:absolute}.modules-v1 div>span.implementing{background-color:#fff;box-shadow:none}.modules-v1 div>span>a>i{font-size:3.5em;left:0;position:absolute;top:20px;width:100%}.modules-v1 .div1111-wrapper{height:420px;margin:0 auto;max-width:700px;overflow:auto}.modules-v1 .div1111-wrapper .div1111{display:flex;flex-wrap:wrap;white-space:nowrap;width:100%}.modules-v1 .div1111-wrapper .div1111 .bg-switcher{background:#fff;transition:.3s}.modules-v1 .div1111-wrapper .div1111 .bg-switcher .app-switcher-item-icon{color:#52abff;transition:.3s}.modules-v1 .div1111-wrapper .div1111 .bg-switcher span{color:#2f70ac;font-weight:500;text-shadow:none;transition:.3s}.modules-v1 .div1111-wrapper .div1111 .bg-switcher:hover{background:#fabc01;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804)}.modules-v1 .div1111-wrapper .div1111 .bg-switcher:hover .app-switcher-item-icon,.modules-v1 .div1111-wrapper .div1111 .bg-switcher:hover span{color:#2f70ac}.modules-v1 .module-icons{-ms-grid-row-align:stretch;align-self:stretch;background-color:rgba(249,244,244,.9215686274509803);color:#666;display:flex;flex-direction:column;justify-content:space-evenly;text-align:center;width:65%}.modules-v1 .module-icons h2{color:#271756;font-size:25px;margin-bottom:15px;margin-top:15px}.modules-v1 .module-icons h1{color:#2f70ac;font-size:35px;margin-bottom:0;margin-top:0}.modules-v1 .welcome-user{-ms-grid-row-align:stretch;align-self:stretch;background-color:rgba(47,112,172,.9215686274509803);display:flex;flex-direction:column;text-align:center;width:35%}.modules-v1 .welcome-user .wrp-login{align-items:center;color:#fff;display:flex;flex-direction:column;margin:20px auto auto}.modules-v1 .welcome-user .wrp-login h2{font-size:20px;font-weight:500;margin-bottom:5px;margin-top:0}.modules-v1 .welcome-user .wrp-login b{display:block;font-size:25px;text-transform:uppercase}.modules-v1 .welcome-user .wrp-login .login{-ms-grid-columns:(150px)[2];display:-ms-grid;display:grid;grid-gap:10px;grid-template-columns:repeat(2,150px);margin-top:30px}.modules-v1 .welcome-user .wrp-login .login a{background:#fff;border-radius:5px;color:#5d5d5d;cursor:pointer;display:inline-block;padding:6px}.modules-v1 .welcome-user .wrp-login .login a i{margin-right:10px}.modules-v1 .welcome-user .profile-image{margin:auto auto 0}.modules-v1 .welcome-user .profile-image img{-o-object-fit:contain;background:#fff;border-radius:50%;box-shadow:1px 1px 11px 6px #2a659b;height:200px;object-fit:contain;width:200px}.modules-v1 .welcome-user .clock-wrapper{color:#fff;margin-bottom:auto;margin-top:auto;text-align:center}.modules-v1 .welcome-user .clock-wrapper h4{font-size:18px;font-weight:500;margin-top:10px}.modules-v1 .welcome-user .clock-wrapper h1{font-size:40px;margin-bottom:0}.modules-v1 .underconstruction{color:red;font-size:4em;font-weight:700;text-transform:uppercase}@media (max-width:1368px){.modules-v1 .clock{font-size:1.5em;margin:0 20px}.modules-v1 .data-time{font-size:1em;margin:10px 0 20px}}@media (max-width:1024px){.modules-v1 .div1111-wrapper{max-width:560px}}@media (max-width:768px){.modules-v1{flex-direction:column}.modules-v1 .welcome-user{align-items:center;flex-direction:row;height:270px;padding-bottom:87px;width:100%}.modules-v1 .welcome-user .profile-image{margin-bottom:auto}.modules-v1 .welcome-user .profile-image img{height:150px;width:150px}.modules-v1 .welcome-user .wrp-login{margin-top:auto}.modules-v1 .welcome-user .wrp-login .login{margin-top:20px}.modules-v1 .welcome-user .clock-wrapper{padding-right:15px}.modules-v1 .module-icons{height:calc(100% - 270px);width:100%}.modules-v1 .module-icons .img-title{background-image:url(/assets/images/logo.png);background-position:50%;background-repeat:no-repeat;margin-top:-200px;z-index:9}.modules-v1 .module-icons .img-title img{display:none}.modules-v1 .module-icons .img-title .title{background:hsla(0,0%,100%,.9019607843137255);box-shadow:1px 4px 9px 2px #67a0d4;height:100%;margin-left:20px;margin-right:20px;padding:20px 10px}.modules-v1 .module-icons .img-title .title h2{font-size:30px}.modules-v1 .module-icons .img-title .title h1{font-size:34px}}@media (max-width:640px){.modules-v1 .welcome-user{display:block;padding-top:20px}.modules-v1 .welcome-user .wrp-login{float:right;padding:0 20px 0 0;width:50%}.modules-v1 .welcome-user .wrp-login h2{font-size:14px;margin-bottom:3px}.modules-v1 .welcome-user .wrp-login b{font-size:14px}.modules-v1 .welcome-user .wrp-login .login{display:flex;flex-direction:column;margin-top:10px;padding:0 15px;text-align:left}.modules-v1 .welcome-user .wrp-login .login a{font-size:14px}.modules-v1 .welcome-user .profile-image{float:left;width:50%}.modules-v1 .welcome-user .profile-image img{display:block;height:130px;margin-left:35px;width:130px}.modules-v1 .welcome-user .clock-wrapper{clear:both;padding-right:0;padding-top:10px}.modules-v1 .welcome-user .clock-wrapper h4{font-size:14px;margin-top:5px}.modules-v1 .welcome-user .clock-wrapper h1{font-size:1.3em}.modules-v1 .module-icons .img-title{background-size:80px 80px;margin-top:-8.1em}.modules-v1 .module-icons .img-title .title h1{font-size:16px}.modules-v1 .module-icons .img-title .title h2{font-size:16px;margin-top:0}.modules-v1 .module-icons .div1111-wrapper{height:360px;margin-top:0;max-width:360px}.modules-v1 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}.modules-v1 .module-icons div>span{height:100px;width:100px}.modules-v1 .module-icons div>span>a>i{font-size:2.5em;top:10px}}@media (max-width:375px){.modules-v1 .module-icons{height:calc(100% - 250px)}.modules-v1 .module-icons .img-title{background-size:60px 60px}.modules-v1 .module-icons .img-title .title{padding:10px}.modules-v1 .module-icons .img-title .title h2{margin-bottom:10px}.modules-v1 .module-icons .img-title .title h1,.modules-v1 .module-icons .img-title .title h2{font-size:14px}.modules-v1 .welcome-user{height:250px}}@media (max-width:360px){.modules-v1 .module-icons .img-title{margin-top:-2em}.modules-v1 .module-icons .img-title .title{margin-left:10px;margin-right:10px}}@media (max-height:810px){.modules-v1 .module-icons .img-title{margin-top:-6.7em}}@media (max-height:745px){.modules-v1 .module-icons .img-title{margin-top:-4.7em}}@media (max-height:675px){.modules-v1 .module-icons .img-title{margin-top:-2.6em}}@media (max-height:625px){.modules-v1 .module-icons .img-title{margin-top:1.5em}}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
|
|
36339
36770
|
},] }
|
|
36340
36771
|
];
|
|
36341
36772
|
SplashComponentV1Component.ctorParameters = function () { return [
|
|
@@ -36349,6 +36780,213 @@
|
|
|
36349
36780
|
{ type: GlobalService }
|
|
36350
36781
|
]; };
|
|
36351
36782
|
|
|
36783
|
+
var SplashComponentV2Component = /** @class */ (function (_super) {
|
|
36784
|
+
__extends(SplashComponentV2Component, _super);
|
|
36785
|
+
function SplashComponentV2Component(injector, _moduleConfigService, _permissionService, _deviceDetectorService, _userService, _router, _authenService, _globalService) {
|
|
36786
|
+
var _this = _super.call(this, injector) || this;
|
|
36787
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
36788
|
+
_this._permissionService = _permissionService;
|
|
36789
|
+
_this._deviceDetectorService = _deviceDetectorService;
|
|
36790
|
+
_this._userService = _userService;
|
|
36791
|
+
_this._router = _router;
|
|
36792
|
+
_this._authenService = _authenService;
|
|
36793
|
+
_this._globalService = _globalService;
|
|
36794
|
+
_this.defaultAvatar = '';
|
|
36795
|
+
_this.appSwitcherItems = [];
|
|
36796
|
+
_this.loaded = false;
|
|
36797
|
+
_this.currentDate = new Date();
|
|
36798
|
+
_this.showDefaultSetting = false;
|
|
36799
|
+
_this.fileApi = '';
|
|
36800
|
+
_this.isOnMobile = false;
|
|
36801
|
+
_this.daysInWeek = ['Chủ nhật', 'Thứ 2', 'Thứ 3', 'Thứ 4', 'Thứ 5', 'Thứ 6', 'Thứ 7'];
|
|
36802
|
+
_this.rootContext.fireEvent('MAIN_CONTENT_ONLY', true);
|
|
36803
|
+
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
36804
|
+
_this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
|
|
36805
|
+
_this.fileApi = _this.environment.apiDomain.fileEndpoint;
|
|
36806
|
+
setInterval(function () {
|
|
36807
|
+
_this.currentDate = new Date();
|
|
36808
|
+
}, 1000);
|
|
36809
|
+
if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
|
|
36810
|
+
_this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
|
|
36811
|
+
}
|
|
36812
|
+
else {
|
|
36813
|
+
if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
|
|
36814
|
+
_this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
|
|
36815
|
+
}
|
|
36816
|
+
else {
|
|
36817
|
+
_this.showDefaultSetting = false;
|
|
36818
|
+
}
|
|
36819
|
+
}
|
|
36820
|
+
// Config for authentication
|
|
36821
|
+
_this._globalService.setHeaderState(false);
|
|
36822
|
+
_this._globalService.setMenuState(false);
|
|
36823
|
+
_this.underconstruction = _this.environment.underconstruction;
|
|
36824
|
+
return _this;
|
|
36825
|
+
}
|
|
36826
|
+
SplashComponentV2Component.prototype.ngOnInit = function () {
|
|
36827
|
+
var _this = this;
|
|
36828
|
+
if (this._deviceDetectorService.isMobile()) {
|
|
36829
|
+
this.isOnMobile = true;
|
|
36830
|
+
}
|
|
36831
|
+
if (this.rootContext.data.currentUser) {
|
|
36832
|
+
if (this.rootContext.data.currentUser.gender == 0) {
|
|
36833
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
|
|
36834
|
+
}
|
|
36835
|
+
else {
|
|
36836
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
|
|
36837
|
+
}
|
|
36838
|
+
}
|
|
36839
|
+
this.rootContext.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
|
|
36840
|
+
_this.currentUser = _this._userService.getCurrentUser();
|
|
36841
|
+
_this.loadAppMetadata();
|
|
36842
|
+
_this.loaded = true;
|
|
36843
|
+
});
|
|
36844
|
+
if (this.rootModel.allowAnonymous) {
|
|
36845
|
+
this.loaded = true;
|
|
36846
|
+
this.loadAppMetadata();
|
|
36847
|
+
}
|
|
36848
|
+
};
|
|
36849
|
+
SplashComponentV2Component.prototype.loadAppMetadata = function () {
|
|
36850
|
+
var _this = this;
|
|
36851
|
+
var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
36852
|
+
var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
|
|
36853
|
+
return __generator(this, function (_c) {
|
|
36854
|
+
switch (_c.label) {
|
|
36855
|
+
case 0:
|
|
36856
|
+
arr = [];
|
|
36857
|
+
_a = [];
|
|
36858
|
+
for (_b in this.environment.appMetadata.appSwitcher)
|
|
36859
|
+
_a.push(_b);
|
|
36860
|
+
_i = 0;
|
|
36861
|
+
_c.label = 1;
|
|
36862
|
+
case 1:
|
|
36863
|
+
if (!(_i < _a.length)) return [3 /*break*/, 5];
|
|
36864
|
+
ind = _a[_i];
|
|
36865
|
+
element = this.environment.appMetadata.appSwitcher[ind];
|
|
36866
|
+
clientId = this.environment.authenticationSettings.clientId;
|
|
36867
|
+
if (!(this.rootModel.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
|
|
36868
|
+
arr.push(element);
|
|
36869
|
+
return [3 /*break*/, 4];
|
|
36870
|
+
case 2:
|
|
36871
|
+
if (!this.currentUser) return [3 /*break*/, 4];
|
|
36872
|
+
return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
|
|
36873
|
+
case 3:
|
|
36874
|
+
isAuthorized = _c.sent();
|
|
36875
|
+
if (isAuthorized) {
|
|
36876
|
+
arr.push(element);
|
|
36877
|
+
}
|
|
36878
|
+
_c.label = 4;
|
|
36879
|
+
case 4:
|
|
36880
|
+
_i++;
|
|
36881
|
+
return [3 /*break*/, 1];
|
|
36882
|
+
case 5:
|
|
36883
|
+
resolve(arr);
|
|
36884
|
+
return [2 /*return*/];
|
|
36885
|
+
}
|
|
36886
|
+
});
|
|
36887
|
+
}); });
|
|
36888
|
+
prmsAppSwicherItem.then(function (rs) {
|
|
36889
|
+
_this.appSwitcherItems.length = 0;
|
|
36890
|
+
if (rs) {
|
|
36891
|
+
rs.forEach(function (element) {
|
|
36892
|
+
if (element.visible) {
|
|
36893
|
+
if (!_this.currentUser) { // allow anonymous
|
|
36894
|
+
_this.appSwitcherItems.push(element);
|
|
36895
|
+
}
|
|
36896
|
+
else {
|
|
36897
|
+
if (_this.currentUser.maNguoiHoc && _this.currentUser.issuperuser.toLowerCase() != 'true') {
|
|
36898
|
+
if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
|
|
36899
|
+
_this.appSwitcherItems.push(element);
|
|
36900
|
+
}
|
|
36901
|
+
}
|
|
36902
|
+
else {
|
|
36903
|
+
_this.appSwitcherItems.push(element);
|
|
36904
|
+
}
|
|
36905
|
+
}
|
|
36906
|
+
}
|
|
36907
|
+
});
|
|
36908
|
+
}
|
|
36909
|
+
});
|
|
36910
|
+
};
|
|
36911
|
+
SplashComponentV2Component.prototype.switchApp = function (item) {
|
|
36912
|
+
this.loaded = false;
|
|
36913
|
+
if (item.target == '_blank') {
|
|
36914
|
+
if (!item.defaultRedirect) {
|
|
36915
|
+
item.defaultRedirect = '';
|
|
36916
|
+
}
|
|
36917
|
+
// NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
|
|
36918
|
+
if (item.url == item.defaultRedirect) {
|
|
36919
|
+
item.url = '/' + item.code.toLowerCase();
|
|
36920
|
+
}
|
|
36921
|
+
var link = item.url + "/" + item.defaultRedirect;
|
|
36922
|
+
if (!link.startsWith('/') && !link.startsWith('http')) {
|
|
36923
|
+
link = '/' + link;
|
|
36924
|
+
}
|
|
36925
|
+
top.location.href = link;
|
|
36926
|
+
}
|
|
36927
|
+
else {
|
|
36928
|
+
if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
|
|
36929
|
+
this._router.navigateByUrl(item.defaultRedirect);
|
|
36930
|
+
this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
|
|
36931
|
+
if (this.rootContext.data.currentAppMetadata && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
|
|
36932
|
+
this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
|
|
36933
|
+
}
|
|
36934
|
+
}
|
|
36935
|
+
}
|
|
36936
|
+
};
|
|
36937
|
+
SplashComponentV2Component.prototype.logout = function () {
|
|
36938
|
+
this._authenService.logout();
|
|
36939
|
+
};
|
|
36940
|
+
SplashComponentV2Component.prototype.goToPersonal = function () {
|
|
36941
|
+
var userMenu = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
|
|
36942
|
+
this.switchApp(userMenu);
|
|
36943
|
+
};
|
|
36944
|
+
SplashComponentV2Component.prototype.getCurrentUserAvatar = function () {
|
|
36945
|
+
if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
|
|
36946
|
+
return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
|
|
36947
|
+
}
|
|
36948
|
+
else {
|
|
36949
|
+
return this.defaultAvatar;
|
|
36950
|
+
}
|
|
36951
|
+
};
|
|
36952
|
+
SplashComponentV2Component.prototype.getNgayTrongTuan = function () {
|
|
36953
|
+
return this.daysInWeek[this.currentDate.getDay()];
|
|
36954
|
+
};
|
|
36955
|
+
SplashComponentV2Component.prototype.showProfilePage = function () {
|
|
36956
|
+
if (this._userService.isSinhVienAccount()) {
|
|
36957
|
+
return false;
|
|
36958
|
+
}
|
|
36959
|
+
return true;
|
|
36960
|
+
};
|
|
36961
|
+
SplashComponentV2Component.prototype.ngOnDestroy = function () {
|
|
36962
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
36963
|
+
this._globalService.setHeaderState(true);
|
|
36964
|
+
this._globalService.setMenuState(true);
|
|
36965
|
+
};
|
|
36966
|
+
SplashComponentV2Component.prototype.login = function () {
|
|
36967
|
+
this.rootContext.fireEvent('LOGIN');
|
|
36968
|
+
};
|
|
36969
|
+
return SplashComponentV2Component;
|
|
36970
|
+
}(ComponentBase));
|
|
36971
|
+
SplashComponentV2Component.decorators = [
|
|
36972
|
+
{ type: i0.Component, args: [{
|
|
36973
|
+
selector: 'splash-component-v2',
|
|
36974
|
+
template: "<div *ngIf=\"!loaded\" class=\"wrp-loader\">\r\n <div class=\"loader\"></div>\r\n</div>\r\n<div *ngIf=\"loaded\" class=\"modules-v2\">\r\n <div class=\"welcome-user\">\r\n <div class=\"profile-image\">\r\n <div class=\"tn-full-name\">{{currentUser.fullName}}</div>\r\n <img class=\"custom-avatar\" [src-fallback]=\"defaultAvatar\" [src]=\"getCurrentUserAvatar()\" />\r\n <div *ngIf=\"currentUser\" class=\"login\">\r\n <a class=\"tn-icon-signout\" title=\"\u0110\u0103ng xu\u1EA5t\" (click)=\"logout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"module-icons\">\r\n <div class=\"img-title\">\r\n <img class=\"tn-custom-logo\" [src]=\"environment.appMetadata.main.logo\"\r\n [alt]=\"environment.appMetadata.main.owner\">\r\n <div class=\"title\">\r\n <h2>{{environment.appMetadata.main.title}}</h2>\r\n <h1>{{environment.appMetadata.main.owner}}</h1>\r\n </div>\r\n <div *ngIf=\"!currentUser\" class=\"login\">\r\n <a class=\"tn-icon-signin\" title=\"\u0110\u0103ng nh\u1EADp\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\u0110\u0103ng nh\u1EADp\r\n </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div1111-wrapper\">\r\n <tn-custom-scrollbar *ngIf=\"!isOnMobile\" [config]=\"{'suppressScrollY': true}\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </tn-custom-scrollbar>\r\n\r\n <ng-container *ngIf=\"isOnMobile\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"clock-wrapper\">\r\n <h1 class=\"clock\">{{currentDate | date:'HH:mm:ss'}}</h1>\r\n <h4 class=\"data-time\">{{getNgayTrongTuan()}}, ng\u00E0y {{currentDate | date:'dd/MM/yyyy'}}</h4>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #appSwitcher>\r\n <div class=\"div1111\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <span>\r\n <a class=\"bg-switcher\" (click)=\"switchApp(item)\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon\"></i>\r\n <span>{{ item.title | translate}}</span>\r\n </a>\r\n </span>\r\n </ng-container>\r\n </div>\r\n</ng-template>",
|
|
36975
|
+
providers: [ComponentContextService],
|
|
36976
|
+
styles: ["body{background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.wrp-loader{display:inline-block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:101}.wrp-loader .loader{-webkit-animation:load4 1.3s linear infinite;animation:load4 1.3s linear infinite;border:2px solid #bcdbf5;border-radius:50%;border-top-color:#3192e1;color:#607d8b;display:block;font-size:10px;height:10px;width:10px}.modules-v2{align-items:center;background-image:url(/assets/images/background-splash.png);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules-v2 div>span{border-radius:5px;box-shadow:1px 2px 9px 1px #dfd1d1;display:inline-block;height:120px;margin:10px;min-width:100px;white-space:normal;width:120px}.modules-v2 div>span>a{border-radius:5px;cursor:pointer;font-weight:700;height:100%;position:relative}.modules-v2 div>span>a,.modules-v2 div>span>a>span{color:#fff;display:inline-block;text-align:center;text-decoration:unset;width:100%}.modules-v2 div>span>a>span{bottom:10px;left:0;position:absolute}.modules-v2 div>span.implementing{background-color:#fff;box-shadow:none}.modules-v2 div>span>a>i{font-size:3.5em;left:0;position:absolute;top:20px;width:100%}.modules-v2 .module-icons{background:hsla(0,0%,100%,.9490196078431372);border-radius:10px;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804);color:#666;display:flex;flex-direction:column;justify-content:center;padding:30px;text-align:center}.modules-v2 .module-icons h2{color:#271756;font-size:25px;margin-bottom:15px;margin-top:15px}.modules-v2 .module-icons h1{color:#2f70ac;font-size:35px;margin-bottom:0;margin-top:0}.modules-v2 .module-icons .img-title{margin-bottom:80px}.modules-v2 .module-icons .img-title img.tn-custom-logo{margin-bottom:30px}.modules-v2 .module-icons .img-title a.tn-icon-signin{align-items:center;background:#002c6c;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;justify-content:center;padding:10px}.modules-v2 .module-icons .img-title a.tn-icon-signin i{margin-right:5px}.modules-v2 .module-icons .div1111-wrapper{margin:0 auto 80px}.modules-v2 .module-icons .div1111-wrapper .div1111{display:flex;flex-wrap:wrap;white-space:nowrap;width:100%}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher{background:#fff;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher .app-switcher-item-icon{color:#2f70ac;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{color:#2f70ac;font-weight:500;text-shadow:none;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover{background:#002c6c;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804)}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover .app-switcher-item-icon,.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover span{color:#fff}.modules-v2 .module-icons .clock-wrapper{color:#fff;margin-bottom:auto;margin-top:auto;text-align:center}.modules-v2 .module-icons .clock-wrapper h4{color:#2f70ac;font-size:20px;font-weight:500;margin-bottom:0;margin-top:10px}.modules-v2 .module-icons .clock-wrapper h1{font-size:40px;margin-bottom:0}.modules-v2 .welcome-user{background:hsla(0,0%,100%,.9019607843137255);border-radius:10px;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804);color:#333;display:flex;padding:10px;position:absolute;right:20px;text-align:center;top:20px}.modules-v2 .welcome-user .wrp-login{align-items:center;color:#333;display:flex;flex-direction:column;margin:auto}.modules-v2 .welcome-user .wrp-login h2{font-size:20px;font-weight:500;margin-bottom:5px;margin-top:0}.modules-v2 .profile-image{align-items:center;display:flex;justify-content:center}.modules-v2 .profile-image .tn-full-name{font-size:18px;margin-right:10px}.modules-v2 .profile-image img{-o-object-fit:contain;background:#fff;border-radius:50%;height:40px;margin-right:10px;object-fit:contain;width:40px}.modules-v2 .profile-image .login{display:-ms-grid;display:grid;grid-gap:10px}.modules-v2 .profile-image .login a.tn-icon-signout{align-items:center;background:#002c6c;border-radius:50%;cursor:pointer;display:flex;height:40px;justify-content:center;width:40px}.modules-v2 .profile-image .login a.tn-icon-signout i{color:#edc16f;font-size:16px}@media (max-width:1368px){.modules-v2 .clock{font-size:1.5em;margin:0 20px}.modules-v2 .data-time{font-size:1em;margin:10px 0 20px}}@media (max-width:1200px){.modules-v2 .welcome-user{right:10px;top:10px}}@media (max-width:768px){.modules-v2 .module-icons .img-title .title h2{font-size:28px}.modules-v2 .module-icons .img-title .title h1{font-size:32px}}@media (max-width:640px){.modules-v2 .welcome-user{justify-content:flex-end;right:10px;top:10px;width:calc(100% - 20px)}.modules-v2 .module-icons{margin:10px;padding:20px}.modules-v2 .module-icons .img-title{margin-bottom:40px}.modules-v2 .module-icons .img-title img.tn-custom-logo{width:150px}.modules-v2 .module-icons .img-title .title h1{font-size:19px}.modules-v2 .module-icons .img-title .title h2{font-size:16px;margin-bottom:10px;margin-top:0}.modules-v2 .module-icons .div1111-wrapper{margin-bottom:50px}.modules-v2 .module-icons .div1111-wrapper .div1111{-ms-grid-columns:(minmax(100px,1fr))[3];display:-ms-grid;display:grid;grid-template-columns:repeat(3,minmax(100px,1fr))}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}.modules-v2 .module-icons div>span{height:100px;width:100px}.modules-v2 .module-icons div>span>a>i{font-size:3em;top:15px}.modules-v2 .module-icons .clock-wrapper h4{font-size:16px;margin-top:5px}.modules-v2 .module-icons .clock-wrapper h1{font-size:30px}}@media (max-width:375px){.modules-v2 .module-icons .img-title{margin-bottom:0}.modules-v2 .module-icons .img-title img.tn-custom-logo{margin-bottom:10px;width:100px}.modules-v2 .module-icons .img-title .title{padding:0}.modules-v2 .module-icons .img-title .title h2{font-size:14px;margin-bottom:10px}.modules-v2 .module-icons .div1111-wrapper{margin-bottom:0}.modules-v2 .module-icons .div1111-wrapper .div1111{display:flex;justify-content:center}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
|
|
36977
|
+
},] }
|
|
36978
|
+
];
|
|
36979
|
+
SplashComponentV2Component.ctorParameters = function () { return [
|
|
36980
|
+
{ type: i0.Injector },
|
|
36981
|
+
{ type: ModuleConfigService },
|
|
36982
|
+
{ type: PermissionService },
|
|
36983
|
+
{ type: ngxDeviceDetector.DeviceDetectorService },
|
|
36984
|
+
{ type: UserService },
|
|
36985
|
+
{ type: i3.Router },
|
|
36986
|
+
{ type: AuthenService },
|
|
36987
|
+
{ type: GlobalService }
|
|
36988
|
+
]; };
|
|
36989
|
+
|
|
36352
36990
|
var DynamicNodeComponent = /** @class */ (function (_super) {
|
|
36353
36991
|
__extends(DynamicNodeComponent, _super);
|
|
36354
36992
|
function DynamicNodeComponent(injector) {
|
|
@@ -39766,7 +40404,7 @@
|
|
|
39766
40404
|
{ type: i0.Component, args: [{
|
|
39767
40405
|
selector: 'tn-tabview',
|
|
39768
40406
|
template: "<div style=\"height: 100%\">\r\n <p-tabView #tab orientation=\"top\" [styleClass]=\"styleClass\"\r\n [activeIndex]=\"currentTabIndex\" (onChange)=\"handleTabChange($event)\">\r\n <ng-container *ngFor=\"let item of data; let i = index\">\r\n <p-tabPanel [leftIcon]=\"item.icon\" [header]=\"item.label\">\r\n <ng-container *ngIf=\"allowViewAll || currentTabIndex == i\">\r\n <ng-container *ngTemplateOutlet=\"template[item.code]; context: {$implicit: item}\">\r\n </ng-container>\r\n </ng-container>\r\n </p-tabPanel>\r\n </ng-container>\r\n </p-tabView>\r\n</div>",
|
|
39769
|
-
styles: [".accordion-link{flex:1 1;text-align:right}.accordion-link ul{list-style:none;margin-bottom:0;margin-top:0;padding-left:0}.accordion-link ul li{background-color:#a4a5a4;border-radius:4px;color:#fff;display:inline-block;line-height:20px;margin-bottom:.5rem;margin-left:.5rem;padding:6px 12px;transition:all .3s ease-out}.accordion-link ul li:hover{background-color:#3db762;cursor:pointer}.accordion-link ul li.tab-active{background-color:#23a349}.tn-l-toolbar{display:flex;padding:.5rem .5rem 0}.hoso-container{height:auto;max-height:none}.tab-number{align-items:center;background:#a4a5a4;border-radius:2px;color:#fff;display:inline-flex;font-size:.9em;height:20px;justify-content:center;margin-right:.5rem;padding-top:2px;width:20px}.tab-number.active{background:#23a349}::ng-deep tn-accordion-tab{display:flex;flex-direction:column;height:100%}::ng-deep tn-accordion-tab .p-accordion-header{position:sticky;top:1px;z-index:6}::ng-deep tn-accordion-tab .tn-l-p-accordion-wrapper{border-radius:4px;display:flex;flex:1;margin-left:.5rem;margin-right:.5rem;overflow:auto}::ng-deep tn-accordion-tab .tn-l-p-accordion-wrapper tn-custom-scrollbar{width:100%}::ng-deep tn-accordion-tab .ps__rail-x,::ng-deep tn-accordion-tab .ps__rail-y{z-index:7}::ng-deep tn-accordion-tab .tn-l-toolbar .toolbar{flex:0 0 auto;padding-top:0}@media (max-width:640px){.accordion-link,.toolbar{overflow-x:auto;white-space:nowrap}.tn-l-custom-wrapper{display:block}.accordion-link ul{margin-top:0}.tn-l-toolbar{display:block}}"]
|
|
40407
|
+
styles: [".accordion-link{flex:1 1;text-align:right}.accordion-link ul{list-style:none;margin-bottom:0;margin-top:0;padding-left:0}.accordion-link ul li{background-color:#a4a5a4;border-radius:4px;color:#fff;display:inline-block;line-height:20px;margin-bottom:.5rem;margin-left:.5rem;padding:6px 12px;transition:all .3s ease-out}.accordion-link ul li:hover{background-color:#3db762;cursor:pointer}.accordion-link ul li.tab-active{background-color:#23a349}.tn-l-toolbar{display:flex;padding:.5rem .5rem 0}.hoso-container{height:auto;max-height:none}.tab-number{align-items:center;background:#a4a5a4;border-radius:2px;color:#fff;display:inline-flex;font-size:.9em;height:20px;justify-content:center;margin-right:.5rem;padding-top:2px;width:20px}.tab-number.active{background:#23a349}::ng-deep tn-accordion-tab{display:flex;flex-direction:column;height:100%}::ng-deep tn-accordion-tab .p-accordion-header{position:-webkit-sticky;position:sticky;top:1px;z-index:6}::ng-deep tn-accordion-tab .tn-l-p-accordion-wrapper{border-radius:4px;display:flex;flex:1;margin-left:.5rem;margin-right:.5rem;overflow:auto}::ng-deep tn-accordion-tab .tn-l-p-accordion-wrapper tn-custom-scrollbar{width:100%}::ng-deep tn-accordion-tab .ps__rail-x,::ng-deep tn-accordion-tab .ps__rail-y{z-index:7}::ng-deep tn-accordion-tab .tn-l-toolbar .toolbar{flex:0 0 auto;padding-top:0}@media (max-width:640px){.accordion-link,.toolbar{overflow-x:auto;white-space:nowrap}.tn-l-custom-wrapper{display:block}.accordion-link ul{margin-top:0}.tn-l-toolbar{display:block}}"]
|
|
39770
40408
|
},] }
|
|
39771
40409
|
];
|
|
39772
40410
|
TnTabViewComponent.ctorParameters = function () { return [
|
|
@@ -40387,7 +41025,7 @@
|
|
|
40387
41025
|
selector: 'user-picker-box',
|
|
40388
41026
|
template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <div class=\"p-col-12 p-md-3 tn-l-left-sidebar-wrapper\">\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 ph\u00F2ng ban\" selectionMode=\"single\" [filter]=\"true\"\r\n [(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 </div>\r\n <div class=\"p-col-12 p-md-9 tn-l-right-content-wrapper\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [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 </div>\r\n</div>\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>\r\n",
|
|
40389
41027
|
providers: [ComponentContextService],
|
|
40390
|
-
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: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}}"]
|
|
41028
|
+
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}}"]
|
|
40391
41029
|
},] }
|
|
40392
41030
|
];
|
|
40393
41031
|
UserPickerBoxComponent.ctorParameters = function () { return [
|
|
@@ -43118,7 +43756,7 @@
|
|
|
43118
43756
|
selector: 'workflow-picker',
|
|
43119
43757
|
template: "<crud-form *ngIf=\"readyCrudForm\" #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\"\r\n [styleClass]=\"'workflow-setting'\" [disableCaching]=\"true\" (onFormReady)=\"_handleFormReady($event)\">\r\n <ng-template #designer>\r\n <div *ngFor=\"let wfCode of model.data._workflowCodes\">\r\n <div class=\"title-workflow\">\r\n Quy tr\u00ECnh {{dicMachinesData[wfCode].ten}} ({{wfCode}})\r\n <span *ngIf=\"wfCode == model.data.workflowCode\" class=\"pi pi-star\" pTooltip=\"\u0110\u00E2y l\u00E0 quy tr\u00ECnh ch\u00EDnh\"\r\n tooltipPosition=\"top\"></span>\r\n </div>\r\n <statemachines-designer #designer [data]=\"dicMachinesData[wfCode]\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n </div>\r\n </ng-template>\r\n</crud-form>\r\n<div *ngIf=\"showButtonSave\" class=\"container-button-workflow\">\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'L\u01B0u c\u1EA5u h\u00ECnh' | translate\"\r\n (click)=\"_handleSave($event)\"></button>\r\n</div>",
|
|
43120
43758
|
providers: [ComponentContextService],
|
|
43121
|
-
styles: [".title-workflow{font-size:.9em;font-weight:700;padding:1em 0 .5em}.title-workflow .pi-star{color:orange}.container-button-workflow{background:#fff;border-top:1px solid #ddd;bottom:0;padding:.5em;position:sticky;text-align:right;z-index:10}"]
|
|
43759
|
+
styles: [".title-workflow{font-size:.9em;font-weight:700;padding:1em 0 .5em}.title-workflow .pi-star{color:orange}.container-button-workflow{background:#fff;border-top:1px solid #ddd;bottom:0;padding:.5em;position:-webkit-sticky;position:sticky;text-align:right;z-index:10}"]
|
|
43122
43760
|
},] }
|
|
43123
43761
|
];
|
|
43124
43762
|
WorkflowPickerComponent.ctorParameters = function () { return [
|
|
@@ -43350,7 +43988,7 @@
|
|
|
43350
43988
|
selector: 'workflow-setting-new',
|
|
43351
43989
|
template: "<crud-form *ngIf=\"readyCrudForm\" #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\"\r\n [styleClass]=\"'workflow-setting'\" [disableCaching]=\"true\" (onFormReady)=\"_handleFormReady($event)\">\r\n <ng-template #workflowPicker>\r\n <workflow-picker [data]=\"model.data\"></workflow-picker>\r\n </ng-template>\r\n</crud-form>\r\n<ng-template #buttonTemplate>\r\n <div class=\"footer-workflow-setting\">\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'FORM.SAVE' | translate\"\r\n (click)=\"_handleSave($event)\"></button>\r\n <button *ngIf=\"model.data.id\" type=\"button\" pButton icon=\"pi pi-trash\" class=\"p-button-danger p-button-text\"\r\n [label]=\"'H\u1EE7y quy tr\u00ECnh' | translate\" (click)=\"handleCancelWorkflow($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)=\"_handleCancel($event)\"></button>\r\n </div>\r\n</ng-template>",
|
|
43352
43990
|
providers: [ComponentContextService],
|
|
43353
|
-
styles: [".title-workflow{font-size:.9em;font-weight:700;padding:1em 0 .5em}.title-workflow .pi-star{color:orange}.container-button-workflow{background:#fff;border-top:1px solid #ddd;bottom:0;padding:.5em;position:sticky;text-align:right;z-index:10}"]
|
|
43991
|
+
styles: [".title-workflow{font-size:.9em;font-weight:700;padding:1em 0 .5em}.title-workflow .pi-star{color:orange}.container-button-workflow{background:#fff;border-top:1px solid #ddd;bottom:0;padding:.5em;position:-webkit-sticky;position:sticky;text-align:right;z-index:10}"]
|
|
43354
43992
|
},] }
|
|
43355
43993
|
];
|
|
43356
43994
|
WorkflowSettingNewComponent.ctorParameters = function () { return [
|
|
@@ -44822,6 +45460,7 @@
|
|
|
44822
45460
|
AppRootMenuComponent,
|
|
44823
45461
|
AppTopBarComponent,
|
|
44824
45462
|
AppTopBarV1Component,
|
|
45463
|
+
AppTopBarV2Component,
|
|
44825
45464
|
AppProfileComponent,
|
|
44826
45465
|
AppMenuComponent,
|
|
44827
45466
|
AppSubMenuComponent,
|
|
@@ -44864,6 +45503,7 @@
|
|
|
44864
45503
|
ProcessWorkflowTargetComponent,
|
|
44865
45504
|
SplashComponentComponent,
|
|
44866
45505
|
SplashComponentV1Component,
|
|
45506
|
+
SplashComponentV2Component,
|
|
44867
45507
|
StateComponent,
|
|
44868
45508
|
StateMetadataComponent,
|
|
44869
45509
|
StateMachinesConnectionMetadataComponent,
|
|
@@ -47212,105 +47852,107 @@
|
|
|
47212
47852
|
exports.ɵ9 = ɵ9;
|
|
47213
47853
|
exports.ɵa = AddressComponent;
|
|
47214
47854
|
exports.ɵb = DropdownService;
|
|
47215
|
-
exports.ɵba =
|
|
47216
|
-
exports.ɵbb =
|
|
47217
|
-
exports.ɵbc =
|
|
47218
|
-
exports.ɵbd =
|
|
47219
|
-
exports.ɵbe =
|
|
47220
|
-
exports.ɵbf =
|
|
47221
|
-
exports.ɵbg =
|
|
47222
|
-
exports.ɵbh =
|
|
47223
|
-
exports.ɵbi =
|
|
47224
|
-
exports.ɵbj =
|
|
47225
|
-
exports.ɵbk =
|
|
47226
|
-
exports.ɵbl =
|
|
47227
|
-
exports.ɵbm =
|
|
47228
|
-
exports.ɵbn =
|
|
47229
|
-
exports.ɵbo =
|
|
47230
|
-
exports.ɵbp =
|
|
47231
|
-
exports.ɵbq =
|
|
47232
|
-
exports.ɵbr =
|
|
47233
|
-
exports.ɵbs =
|
|
47234
|
-
exports.ɵbt =
|
|
47235
|
-
exports.ɵbu =
|
|
47236
|
-
exports.ɵbv =
|
|
47237
|
-
exports.ɵbw =
|
|
47238
|
-
exports.ɵbx =
|
|
47239
|
-
exports.ɵby =
|
|
47240
|
-
exports.ɵbz =
|
|
47855
|
+
exports.ɵba = EntityPermissionComponent;
|
|
47856
|
+
exports.ɵbb = DM_ChucVuService;
|
|
47857
|
+
exports.ɵbc = RoleService;
|
|
47858
|
+
exports.ɵbd = EntityPermissionService;
|
|
47859
|
+
exports.ɵbe = EquationEditorComponent;
|
|
47860
|
+
exports.ɵbf = MaskComponent;
|
|
47861
|
+
exports.ɵbg = NumberPickerRangeComponent;
|
|
47862
|
+
exports.ɵbh = PagingNextBackOnlyComponent;
|
|
47863
|
+
exports.ɵbi = RadioButtonListComponent;
|
|
47864
|
+
exports.ɵbj = VanBanPickerComponent;
|
|
47865
|
+
exports.ɵbk = VanBanDenService;
|
|
47866
|
+
exports.ɵbl = VanBanDiService;
|
|
47867
|
+
exports.ɵbm = VanBanPickerDialogComponent;
|
|
47868
|
+
exports.ɵbn = VanbanDiPickerComponent;
|
|
47869
|
+
exports.ɵbo = VanbanDenPickerComponent;
|
|
47870
|
+
exports.ɵbp = CongViecPickerComponent;
|
|
47871
|
+
exports.ɵbq = CongViecService;
|
|
47872
|
+
exports.ɵbr = TaskWorkflowHistoriesService;
|
|
47873
|
+
exports.ɵbs = SettingsComponent;
|
|
47874
|
+
exports.ɵbt = SettingsRowComponent;
|
|
47875
|
+
exports.ɵbu = SettingsWorkflowComponent;
|
|
47876
|
+
exports.ɵbv = SettingsWorkflowNo1Component;
|
|
47877
|
+
exports.ɵbw = SimpleWorkflowFormComponent;
|
|
47878
|
+
exports.ɵbx = ProcessWorkflowFormComponent;
|
|
47879
|
+
exports.ɵby = WorkflowHistoryService;
|
|
47880
|
+
exports.ɵbz = ProcessWorkflowTargetComponent;
|
|
47241
47881
|
exports.ɵc = EntityPickerService;
|
|
47242
|
-
exports.ɵca =
|
|
47243
|
-
exports.ɵcb =
|
|
47244
|
-
exports.ɵcc =
|
|
47245
|
-
exports.ɵcd =
|
|
47246
|
-
exports.ɵce =
|
|
47247
|
-
exports.ɵcf =
|
|
47248
|
-
exports.ɵcg =
|
|
47249
|
-
exports.ɵch =
|
|
47250
|
-
exports.ɵci =
|
|
47251
|
-
exports.ɵcj =
|
|
47252
|
-
exports.ɵck =
|
|
47253
|
-
exports.ɵcl =
|
|
47254
|
-
exports.ɵcm =
|
|
47255
|
-
exports.ɵcn =
|
|
47256
|
-
exports.ɵco =
|
|
47257
|
-
exports.ɵcp =
|
|
47258
|
-
exports.ɵcq =
|
|
47259
|
-
exports.ɵcr =
|
|
47260
|
-
exports.ɵcs =
|
|
47261
|
-
exports.ɵct =
|
|
47262
|
-
exports.ɵcu =
|
|
47263
|
-
exports.ɵcv =
|
|
47264
|
-
exports.ɵcw =
|
|
47265
|
-
exports.ɵcx =
|
|
47266
|
-
exports.ɵcy =
|
|
47267
|
-
exports.ɵcz =
|
|
47882
|
+
exports.ɵca = SplashComponentV1Component;
|
|
47883
|
+
exports.ɵcb = SplashComponentV2Component;
|
|
47884
|
+
exports.ɵcc = StateMachinesConnectionReceiverComponent;
|
|
47885
|
+
exports.ɵcd = StateMachinesConnectionReceiverUserComponent;
|
|
47886
|
+
exports.ɵce = StateMachinesConnectionReceiverDepartmentComponent;
|
|
47887
|
+
exports.ɵcf = StateMachinesConnectionReceiverGroupComponent;
|
|
47888
|
+
exports.ɵcg = StateMachinesConnectionReceiverRoleComponent;
|
|
47889
|
+
exports.ɵch = StateMachinesConnectionSenderComponent;
|
|
47890
|
+
exports.ɵci = StartWorkflowComponent;
|
|
47891
|
+
exports.ɵcj = WorkflowSettingsService;
|
|
47892
|
+
exports.ɵck = WorkflowSettingNewComponent;
|
|
47893
|
+
exports.ɵcl = DmLoaiCongViecService;
|
|
47894
|
+
exports.ɵcm = TnDialogComponent;
|
|
47895
|
+
exports.ɵcn = TnColorPickerComponent;
|
|
47896
|
+
exports.ɵco = TnTinymceComponent;
|
|
47897
|
+
exports.ɵcp = TnTabViewComponent;
|
|
47898
|
+
exports.ɵcq = TableDetailFormComponent;
|
|
47899
|
+
exports.ɵcr = FileIconPipe;
|
|
47900
|
+
exports.ɵcs = FileSizePipe;
|
|
47901
|
+
exports.ɵct = QuickAddFormComponent;
|
|
47902
|
+
exports.ɵcu = PreventShiftTabDirective;
|
|
47903
|
+
exports.ɵcv = UserPickerComponent;
|
|
47904
|
+
exports.ɵcw = UserPickerBoxComponent;
|
|
47905
|
+
exports.ɵcx = TnAppHelpComponent;
|
|
47906
|
+
exports.ɵcy = PathNameService;
|
|
47907
|
+
exports.ɵcz = HelperCurrentPageComponent;
|
|
47268
47908
|
exports.ɵd = ExceptionHandlerService;
|
|
47269
|
-
exports.ɵda =
|
|
47270
|
-
exports.ɵdb =
|
|
47271
|
-
exports.ɵdc =
|
|
47272
|
-
exports.ɵdd =
|
|
47273
|
-
exports.ɵde =
|
|
47274
|
-
exports.ɵdf =
|
|
47275
|
-
exports.ɵdg =
|
|
47276
|
-
exports.ɵdh =
|
|
47277
|
-
exports.ɵdi =
|
|
47278
|
-
exports.ɵdj =
|
|
47279
|
-
exports.ɵdk =
|
|
47280
|
-
exports.ɵdl =
|
|
47281
|
-
exports.ɵdm =
|
|
47282
|
-
exports.ɵdn =
|
|
47283
|
-
exports.ɵdo =
|
|
47284
|
-
exports.ɵdp =
|
|
47285
|
-
exports.ɵdq =
|
|
47286
|
-
exports.ɵdr =
|
|
47287
|
-
exports.ɵds =
|
|
47288
|
-
exports.ɵdt =
|
|
47289
|
-
exports.ɵdu =
|
|
47290
|
-
exports.ɵdv =
|
|
47291
|
-
exports.ɵdw =
|
|
47909
|
+
exports.ɵda = TnAppNotificationListComponent;
|
|
47910
|
+
exports.ɵdb = TnAppNotificationComponent;
|
|
47911
|
+
exports.ɵdc = MyDriveService;
|
|
47912
|
+
exports.ɵdd = FileVersionService;
|
|
47913
|
+
exports.ɵde = FileExplorerNewService;
|
|
47914
|
+
exports.ɵdf = FolderFormComponent;
|
|
47915
|
+
exports.ɵdg = FileFormComponent;
|
|
47916
|
+
exports.ɵdh = FileViewerComponent;
|
|
47917
|
+
exports.ɵdi = FileVersionListComponent;
|
|
47918
|
+
exports.ɵdj = WorkflowHistoryComponent;
|
|
47919
|
+
exports.ɵdk = EntityWorkflowHistoryService;
|
|
47920
|
+
exports.ɵdl = WorkflowHistoryDialogComponent;
|
|
47921
|
+
exports.ɵdm = WorkflowHistoryNewComponent;
|
|
47922
|
+
exports.ɵdn = WorkflowSettingComponent;
|
|
47923
|
+
exports.ɵdo = EntityWorkflowSettingService;
|
|
47924
|
+
exports.ɵdp = WorkflowSettingDialogComponent;
|
|
47925
|
+
exports.ɵdq = QrCodeGeneratorComponent;
|
|
47926
|
+
exports.ɵdr = AccessDeniedV1Component;
|
|
47927
|
+
exports.ɵds = AddNewsComponent;
|
|
47928
|
+
exports.ɵdt = ArticleService;
|
|
47929
|
+
exports.ɵdu = NewsCategoryService;
|
|
47930
|
+
exports.ɵdv = CheckReadyComponent;
|
|
47931
|
+
exports.ɵdw = SendAccessTokenInterceptor;
|
|
47932
|
+
exports.ɵdx = LogInterceptor;
|
|
47933
|
+
exports.ɵdy = PermissionUtilsInterceptor;
|
|
47292
47934
|
exports.ɵe = CanBo_HoSoService;
|
|
47293
47935
|
exports.ɵf = AfterViewCheckedComponent;
|
|
47294
47936
|
exports.ɵg = AdvanceSearchComponent;
|
|
47295
47937
|
exports.ɵh = AppRootMenuComponent;
|
|
47296
47938
|
exports.ɵi = AppTopBarComponent;
|
|
47297
47939
|
exports.ɵj = AppTopBarV1Component;
|
|
47298
|
-
exports.ɵk =
|
|
47299
|
-
exports.ɵl =
|
|
47300
|
-
exports.ɵm =
|
|
47301
|
-
exports.ɵn =
|
|
47302
|
-
exports.ɵo =
|
|
47303
|
-
exports.ɵp =
|
|
47304
|
-
exports.ɵq =
|
|
47305
|
-
exports.ɵr =
|
|
47306
|
-
exports.ɵs =
|
|
47307
|
-
exports.ɵt =
|
|
47308
|
-
exports.ɵu =
|
|
47309
|
-
exports.ɵv =
|
|
47310
|
-
exports.ɵw =
|
|
47311
|
-
exports.ɵx =
|
|
47312
|
-
exports.ɵy =
|
|
47313
|
-
exports.ɵz =
|
|
47940
|
+
exports.ɵk = AppTopBarV2Component;
|
|
47941
|
+
exports.ɵl = AppProfileComponent;
|
|
47942
|
+
exports.ɵm = AppSubMenuComponent;
|
|
47943
|
+
exports.ɵn = AppMenuComponent;
|
|
47944
|
+
exports.ɵo = AutoCompletePickerComponent;
|
|
47945
|
+
exports.ɵp = CheckBoxListComponent;
|
|
47946
|
+
exports.ɵq = ReportQueueComponent;
|
|
47947
|
+
exports.ɵr = CoCauToChucPickerListComponent;
|
|
47948
|
+
exports.ɵs = DatetimePickerComponent;
|
|
47949
|
+
exports.ɵt = DatetimePickerRangeComponent;
|
|
47950
|
+
exports.ɵu = DynamicNodeComponent;
|
|
47951
|
+
exports.ɵv = EntityPickerBoxComponent;
|
|
47952
|
+
exports.ɵw = EntityPickerDataComponent;
|
|
47953
|
+
exports.ɵx = EntityPickerSelectedComponent;
|
|
47954
|
+
exports.ɵy = EntityPickerComponent;
|
|
47955
|
+
exports.ɵz = EntityPickerDialogComponent;
|
|
47314
47956
|
|
|
47315
47957
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
47316
47958
|
|