tnx-shared 5.1.296 → 5.1.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tnx-shared.umd.js +795 -722
- 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/form-schema.d.ts.map +1 -1
- package/components/access-denied-component/access-denied.component.d.ts +1 -1
- package/components/access-denied-component/access-denied.component.d.ts.map +1 -1
- package/components/common-app-component/app.topbar.component.d.ts +1 -1
- package/components/common-app-component/app.topbar.component.d.ts.map +1 -1
- package/components/common-app-component/common-app-component.d.ts +3 -0
- package/components/common-app-component/common-app-component.d.ts.map +1 -1
- package/components/common-app-component/loading-page-v1/loading-page-v1.component.d.ts +7 -0
- package/components/common-app-component/loading-page-v1/loading-page-v1.component.d.ts.map +1 -0
- package/components/common-app-component/loading-page-v1/loading-page-v1.component.ngfactory.d.ts.map +1 -0
- package/components/common-app-component/loading-page-v1/loading-page-v1.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/components/not-found/not-found.component.d.ts +1 -1
- package/components/not-found/not-found.component.d.ts.map +1 -1
- package/components/splash-component/splash-component.component.d.ts +1 -5
- package/components/splash-component/splash-component.component.d.ts.map +1 -1
- package/congviec/congviec/congviec.component.d.ts +4 -1
- package/congviec/congviec/congviec.component.d.ts.map +1 -1
- package/congviec/congviec/services/congviec-thaydoi.service.d.ts +15 -0
- package/congviec/congviec/services/congviec-thaydoi.service.d.ts.map +1 -0
- package/congviec/congviec/services/congviec-thaydoi.service.ngfactory.d.ts.map +1 -0
- package/enums/common.d.ts +5 -0
- package/enums/common.d.ts.map +1 -1
- package/esm2015/classes/form-schema.js +2 -2
- package/esm2015/components/access-denied-component/access-denied.component.js +2 -2
- package/esm2015/components/common-app-component/app.topbar.component.js +2 -2
- package/esm2015/components/common-app-component/common-app-component.js +11 -2
- package/esm2015/components/common-app-component/loading-page-v1/loading-page-v1.component.js +20 -0
- package/esm2015/components/not-found/not-found.component.js +2 -2
- package/esm2015/components/splash-component/splash-component.component.js +2 -7
- package/esm2015/congviec/congviec/congviec.component.js +11 -4
- package/esm2015/congviec/congviec/services/congviec-thaydoi.service.js +37 -0
- package/esm2015/enums/common.js +7 -1
- package/esm2015/services/base.service.js +4 -1
- package/esm2015/tnx-shared.js +120 -118
- package/esm2015/tnx-shared.module.js +4 -2
- package/fesm2015/tnx-shared.js +566 -501
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/base.service.d.ts +1 -0
- package/services/base.service.d.ts.map +1 -1
- package/tnx-shared.d.ts +119 -117
- package/tnx-shared.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
- package/tnx-shared.module.d.ts +1 -1
- package/tnx-shared.module.d.ts.map +1 -1
- package/tnx-shared.module.ngfactory.d.ts.map +1 -1
|
@@ -720,7 +720,7 @@
|
|
|
720
720
|
this.hiddenTrinhKy = true;
|
|
721
721
|
this.useBaseTrinhKy = true;
|
|
722
722
|
this.disableShare = false;
|
|
723
|
-
this.disableViewWorkflowAttach =
|
|
723
|
+
this.disableViewWorkflowAttach = false;
|
|
724
724
|
this.hiddenWorkflowCoreStatus = true;
|
|
725
725
|
this.requiredVanBanDiAfterTrinhKy = false;
|
|
726
726
|
this.showExportAll = false;
|
|
@@ -4629,7 +4629,12 @@
|
|
|
4629
4629
|
PermissionBase[PermissionBase["DELETE"] = 4] = "DELETE";
|
|
4630
4630
|
PermissionBase[PermissionBase["FULL"] = 7] = "FULL";
|
|
4631
4631
|
})(exports.PermissionBase || (exports.PermissionBase = {}));
|
|
4632
|
-
var FieldOrderCrudList = '_index';
|
|
4632
|
+
var FieldOrderCrudList = '_index';
|
|
4633
|
+
(function (EnumTypeSplash) {
|
|
4634
|
+
EnumTypeSplash["DEFAULT"] = "Default";
|
|
4635
|
+
EnumTypeSplash["NEW_V1"] = "v1";
|
|
4636
|
+
EnumTypeSplash["NEW_V2"] = "v2";
|
|
4637
|
+
})(exports.EnumTypeSplash || (exports.EnumTypeSplash = {}));
|
|
4633
4638
|
|
|
4634
4639
|
var ExportItem = /** @class */ (function () {
|
|
4635
4640
|
function ExportItem(init) {
|
|
@@ -6792,6 +6797,9 @@
|
|
|
6792
6797
|
BaseService.prototype.getCacheResponse = function (key) {
|
|
6793
6798
|
return this.defaultPost(this.serviceUri + "/BaseGetCacheInfo/" + key, {});
|
|
6794
6799
|
};
|
|
6800
|
+
BaseService.prototype.getObjectDisplayModel = function (id) {
|
|
6801
|
+
return this.defaultPost(this.serviceUri + "/GetObjectDisplayModel/" + id, {});
|
|
6802
|
+
};
|
|
6795
6803
|
BaseService.prototype.postGridInfo = function (url, gridInfo) {
|
|
6796
6804
|
if (!gridInfo)
|
|
6797
6805
|
gridInfo = new GridInfo();
|
|
@@ -10189,604 +10197,6 @@
|
|
|
10189
10197
|
{ type: AuthenService }
|
|
10190
10198
|
]; };
|
|
10191
10199
|
|
|
10192
|
-
var GlobalService = /** @class */ (function () {
|
|
10193
|
-
function GlobalService() {
|
|
10194
|
-
this._state = true;
|
|
10195
|
-
this._headerState = true;
|
|
10196
|
-
this._menuState = true;
|
|
10197
|
-
this._advanceSearchState = false;
|
|
10198
|
-
this._advanceSearch = new rxjs.Subject();
|
|
10199
|
-
this._hasAdvanceFilter = new rxjs.Subject();
|
|
10200
|
-
this._searchKeyWithoutAdvance = new rxjs.Subject();
|
|
10201
|
-
}
|
|
10202
|
-
GlobalService.prototype.setSearchKeyWithoutAdvance = function (key) {
|
|
10203
|
-
this._searchKeyWithoutAdvance.next(key);
|
|
10204
|
-
};
|
|
10205
|
-
GlobalService.prototype.getSearchKeyWithoutAdvance = function () {
|
|
10206
|
-
return this._searchKeyWithoutAdvance;
|
|
10207
|
-
};
|
|
10208
|
-
GlobalService.prototype.setSearchBoxState = function (state) {
|
|
10209
|
-
this._state = state;
|
|
10210
|
-
};
|
|
10211
|
-
GlobalService.prototype.getSearchBoxState = function () {
|
|
10212
|
-
return this._state;
|
|
10213
|
-
};
|
|
10214
|
-
GlobalService.prototype.setHeaderState = function (state) {
|
|
10215
|
-
this._headerState = state;
|
|
10216
|
-
};
|
|
10217
|
-
GlobalService.prototype.getHeaderState = function () {
|
|
10218
|
-
return this._headerState;
|
|
10219
|
-
};
|
|
10220
|
-
GlobalService.prototype.setMenuState = function (state) {
|
|
10221
|
-
this._menuState = state;
|
|
10222
|
-
};
|
|
10223
|
-
GlobalService.prototype.getMenuState = function () {
|
|
10224
|
-
return this._menuState;
|
|
10225
|
-
};
|
|
10226
|
-
GlobalService.prototype.setAdvanceSearchStateWithoutFireEvent = function (state) {
|
|
10227
|
-
this._advanceSearchState = state;
|
|
10228
|
-
};
|
|
10229
|
-
GlobalService.prototype.toggleAdvanceSearchState = function (evt) {
|
|
10230
|
-
this._advanceSearchState = !this._advanceSearchState;
|
|
10231
|
-
this._advanceSearch.next({ state: this._advanceSearchState, event: evt });
|
|
10232
|
-
};
|
|
10233
|
-
GlobalService.prototype.getAdvanceSearch = function () {
|
|
10234
|
-
return this._advanceSearch;
|
|
10235
|
-
};
|
|
10236
|
-
GlobalService.prototype.setAdvanceFilter = function (state) {
|
|
10237
|
-
this._hasAdvanceFilter.next({ type: 'hasAdvanceFilter', state: state });
|
|
10238
|
-
};
|
|
10239
|
-
GlobalService.prototype.setAdvanceFilterBox = function (state) {
|
|
10240
|
-
this._hasAdvanceFilter.next({ type: 'hasAdvanceFilterBox', state: state });
|
|
10241
|
-
};
|
|
10242
|
-
GlobalService.prototype.advanceFilterEvent = function () {
|
|
10243
|
-
return this._hasAdvanceFilter;
|
|
10244
|
-
};
|
|
10245
|
-
return GlobalService;
|
|
10246
|
-
}());
|
|
10247
|
-
GlobalService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GlobalService_Factory() { return new GlobalService(); }, token: GlobalService, providedIn: "root" });
|
|
10248
|
-
GlobalService.decorators = [
|
|
10249
|
-
{ type: i0.Injectable, args: [{
|
|
10250
|
-
providedIn: 'root'
|
|
10251
|
-
},] }
|
|
10252
|
-
];
|
|
10253
|
-
GlobalService.ctorParameters = function () { return []; };
|
|
10254
|
-
|
|
10255
|
-
var PhanQuyenModel = /** @class */ (function () {
|
|
10256
|
-
function PhanQuyenModel(init) {
|
|
10257
|
-
this.addRoleIds = [];
|
|
10258
|
-
this.removeRoleIds = [];
|
|
10259
|
-
this.addPermissionIds = [];
|
|
10260
|
-
this.removePermissionIds = [];
|
|
10261
|
-
for (var key in init) {
|
|
10262
|
-
this[key] = init[key];
|
|
10263
|
-
}
|
|
10264
|
-
}
|
|
10265
|
-
return PhanQuyenModel;
|
|
10266
|
-
}());
|
|
10267
|
-
var PermissionService = /** @class */ (function (_super) {
|
|
10268
|
-
__extends(PermissionService, _super);
|
|
10269
|
-
function PermissionService(http, injector, _moduleConfigService, _userService, _oauthService, _appContext) {
|
|
10270
|
-
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/permission") || this;
|
|
10271
|
-
_this._moduleConfigService = _moduleConfigService;
|
|
10272
|
-
_this._userService = _userService;
|
|
10273
|
-
_this._oauthService = _oauthService;
|
|
10274
|
-
_this._appContext = _appContext;
|
|
10275
|
-
_this.storage = sessionStorage;
|
|
10276
|
-
_this.delayCheckPermissions = [];
|
|
10277
|
-
_this.ignoreAdmin = false;
|
|
10278
|
-
_this.appCode = null;
|
|
10279
|
-
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint;
|
|
10280
|
-
_this.ignoreAdmin = _this._moduleConfigService.getConfig().environment.isIgnoreAdmin;
|
|
10281
|
-
_this.appCode = _this._moduleConfigService.getConfig().appCode;
|
|
10282
|
-
return _this;
|
|
10283
|
-
}
|
|
10284
|
-
PermissionService.prototype.clearPermissionCacheAll = function () {
|
|
10285
|
-
var _a, _b, _c;
|
|
10286
|
-
var lstAppCodes = (_c = (_b = (_a = this._moduleConfigService.getConfig().environment.appMetadata) === null || _a === void 0 ? void 0 : _a.appSwitcher) === null || _b === void 0 ? void 0 : _b.map(function (app) { return app.code; })) !== null && _c !== void 0 ? _c : [];
|
|
10287
|
-
var lstApiEndpoint = [];
|
|
10288
|
-
var apiDomain = this._moduleConfigService.getConfig().environment.apiDomain;
|
|
10289
|
-
for (var domainName in apiDomain) {
|
|
10290
|
-
if (domainName.startsWith('-') || domainName.startsWith('1') || domainName == 'gateway')
|
|
10291
|
-
continue;
|
|
10292
|
-
var realDomainName = domainName.split('Endpoint') ? domainName.split('Endpoint')[0] : domainName;
|
|
10293
|
-
lstApiEndpoint.push(realDomainName.toUpperCase());
|
|
10294
|
-
}
|
|
10295
|
-
return this.clearPermissionCache(__spread(lstAppCodes, lstApiEndpoint));
|
|
10296
|
-
};
|
|
10297
|
-
PermissionService.prototype.clearPermissionCache = function (lstModule) {
|
|
10298
|
-
var url = this.serviceUri + "/ClearPermissionCache";
|
|
10299
|
-
return this.defaultPost(url, lstModule);
|
|
10300
|
-
};
|
|
10301
|
-
PermissionService.prototype.getCurrentUserPermission = function () {
|
|
10302
|
-
var url = this.serviceUri + "/GetCurrentUserPermission";
|
|
10303
|
-
return this.defaultGet(url);
|
|
10304
|
-
};
|
|
10305
|
-
PermissionService.prototype.getAllBasePermission = function () {
|
|
10306
|
-
var _a, _b, _c, _d;
|
|
10307
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
10308
|
-
var url, user, res, lstAppCodes, promiseArr, code, service, permissions, key, storageItem;
|
|
10309
|
-
return __generator(this, function (_e) {
|
|
10310
|
-
switch (_e.label) {
|
|
10311
|
-
case 0:
|
|
10312
|
-
url = this.serviceUri + "/GetAllBasePermission";
|
|
10313
|
-
user = this._userService.getCurrentUser();
|
|
10314
|
-
if (user
|
|
10315
|
-
&& (user.issuperuser && user.issuperuser.toLowerCase() == 'true')
|
|
10316
|
-
|| (user.isadmin && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin)) {
|
|
10317
|
-
return [2 /*return*/];
|
|
10318
|
-
}
|
|
10319
|
-
return [4 /*yield*/, this.defaultGet(url)];
|
|
10320
|
-
case 1:
|
|
10321
|
-
res = _e.sent();
|
|
10322
|
-
lstAppCodes = (_c = (_b = (_a = this._moduleConfigService.getConfig().environment.appMetadata) === null || _a === void 0 ? void 0 : _a.appSwitcher) === null || _b === void 0 ? void 0 : _b.map(function (app) { return app.code; })) !== null && _c !== void 0 ? _c : [];
|
|
10323
|
-
if (!(!res.success || res.data == null)) return [3 /*break*/, 3];
|
|
10324
|
-
promiseArr = [];
|
|
10325
|
-
for (code in lstAppCodes) {
|
|
10326
|
-
promiseArr.push(this.getPermissions(code));
|
|
10327
|
-
}
|
|
10328
|
-
return [4 /*yield*/, Promise.all(promiseArr)];
|
|
10329
|
-
case 2:
|
|
10330
|
-
_e.sent();
|
|
10331
|
-
return [2 /*return*/];
|
|
10332
|
-
case 3:
|
|
10333
|
-
for (service in lstAppCodes) {
|
|
10334
|
-
permissions = (_d = res.data[service]) !== null && _d !== void 0 ? _d : [];
|
|
10335
|
-
key = "AUTHORIZATION." + service.toUpperCase();
|
|
10336
|
-
storageItem = this.storage.getItem(key);
|
|
10337
|
-
if (storageItem != null) {
|
|
10338
|
-
this.storage.removeItem(key);
|
|
10339
|
-
}
|
|
10340
|
-
this.storage.setItem(key, JSON.stringify(permissions));
|
|
10341
|
-
}
|
|
10342
|
-
return [2 /*return*/];
|
|
10343
|
-
}
|
|
10344
|
-
});
|
|
10345
|
-
});
|
|
10346
|
-
};
|
|
10347
|
-
/**
|
|
10348
|
-
* Truyền vào danh sách permision cần check
|
|
10349
|
-
* @param lstPermissionCode những perrmision code cần check => nên dùng trong trường hợp check các button trong code
|
|
10350
|
-
* @returns trả ra các perrmisionCode có quyền
|
|
10351
|
-
*/
|
|
10352
|
-
PermissionService.prototype.getPermissionAuthorized = function (lstPermissionCode) {
|
|
10353
|
-
var _this = this;
|
|
10354
|
-
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
10355
|
-
var user, result, lstPermissionCode_1, lstPermissionCode_1_1, item, e_1_1;
|
|
10356
|
-
var e_1, _e;
|
|
10357
|
-
return __generator(this, function (_f) {
|
|
10358
|
-
switch (_f.label) {
|
|
10359
|
-
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
10360
|
-
case 1:
|
|
10361
|
-
user = (_f.sent());
|
|
10362
|
-
if (user && user.issuperuser.toLowerCase() == 'true') {
|
|
10363
|
-
resolve(lstPermissionCode);
|
|
10364
|
-
return [2 /*return*/];
|
|
10365
|
-
}
|
|
10366
|
-
if (user && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin) {
|
|
10367
|
-
resolve(lstPermissionCode);
|
|
10368
|
-
return [2 /*return*/];
|
|
10369
|
-
}
|
|
10370
|
-
result = [];
|
|
10371
|
-
_f.label = 2;
|
|
10372
|
-
case 2:
|
|
10373
|
-
_f.trys.push([2, 7, 8, 9]);
|
|
10374
|
-
lstPermissionCode_1 = __values(lstPermissionCode), lstPermissionCode_1_1 = lstPermissionCode_1.next();
|
|
10375
|
-
_f.label = 3;
|
|
10376
|
-
case 3:
|
|
10377
|
-
if (!!lstPermissionCode_1_1.done) return [3 /*break*/, 6];
|
|
10378
|
-
item = lstPermissionCode_1_1.value;
|
|
10379
|
-
return [4 /*yield*/, this.isAuthorizedPermission(item)];
|
|
10380
|
-
case 4:
|
|
10381
|
-
if (_f.sent()) {
|
|
10382
|
-
result.push(item);
|
|
10383
|
-
}
|
|
10384
|
-
_f.label = 5;
|
|
10385
|
-
case 5:
|
|
10386
|
-
lstPermissionCode_1_1 = lstPermissionCode_1.next();
|
|
10387
|
-
return [3 /*break*/, 3];
|
|
10388
|
-
case 6: return [3 /*break*/, 9];
|
|
10389
|
-
case 7:
|
|
10390
|
-
e_1_1 = _f.sent();
|
|
10391
|
-
e_1 = { error: e_1_1 };
|
|
10392
|
-
return [3 /*break*/, 9];
|
|
10393
|
-
case 8:
|
|
10394
|
-
try {
|
|
10395
|
-
if (lstPermissionCode_1_1 && !lstPermissionCode_1_1.done && (_e = lstPermissionCode_1.return)) _e.call(lstPermissionCode_1);
|
|
10396
|
-
}
|
|
10397
|
-
finally { if (e_1) throw e_1.error; }
|
|
10398
|
-
return [7 /*endfinally*/];
|
|
10399
|
-
case 9:
|
|
10400
|
-
resolve(result);
|
|
10401
|
-
return [2 /*return*/];
|
|
10402
|
-
}
|
|
10403
|
-
});
|
|
10404
|
-
}); });
|
|
10405
|
-
};
|
|
10406
|
-
PermissionService.prototype.isAuthorizedPermission = function (permission) {
|
|
10407
|
-
var _this = this;
|
|
10408
|
-
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
10409
|
-
var retryCount;
|
|
10410
|
-
return __generator(this, function (_e) {
|
|
10411
|
-
switch (_e.label) {
|
|
10412
|
-
case 0:
|
|
10413
|
-
retryCount = 0;
|
|
10414
|
-
_e.label = 1;
|
|
10415
|
-
case 1:
|
|
10416
|
-
if (!!this._oauthService.hasValidAccessToken()) return [3 /*break*/, 3];
|
|
10417
|
-
return [4 /*yield*/, this._commonService.delay(100)];
|
|
10418
|
-
case 2:
|
|
10419
|
-
_e.sent();
|
|
10420
|
-
retryCount++;
|
|
10421
|
-
if (retryCount > 50) {
|
|
10422
|
-
return [3 /*break*/, 3];
|
|
10423
|
-
}
|
|
10424
|
-
return [3 /*break*/, 1];
|
|
10425
|
-
case 3: return [4 /*yield*/, this.checkPermission(this.appCode, permission, resolve, reject)];
|
|
10426
|
-
case 4:
|
|
10427
|
-
_e.sent();
|
|
10428
|
-
return [2 /*return*/];
|
|
10429
|
-
}
|
|
10430
|
-
});
|
|
10431
|
-
}); });
|
|
10432
|
-
};
|
|
10433
|
-
PermissionService.prototype.isAuthorized = function (service, permission, ignoreAdmin) {
|
|
10434
|
-
var _this = this;
|
|
10435
|
-
if (ignoreAdmin === void 0) { ignoreAdmin = false; }
|
|
10436
|
-
this.root = this._appContext.getRootContext();
|
|
10437
|
-
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
10438
|
-
var retryCount;
|
|
10439
|
-
return __generator(this, function (_e) {
|
|
10440
|
-
switch (_e.label) {
|
|
10441
|
-
case 0:
|
|
10442
|
-
retryCount = 0;
|
|
10443
|
-
_e.label = 1;
|
|
10444
|
-
case 1:
|
|
10445
|
-
if (!!this._oauthService.hasValidAccessToken()) return [3 /*break*/, 3];
|
|
10446
|
-
return [4 /*yield*/, this._commonService.delay(100)];
|
|
10447
|
-
case 2:
|
|
10448
|
-
_e.sent();
|
|
10449
|
-
retryCount++;
|
|
10450
|
-
if (retryCount > 50) {
|
|
10451
|
-
return [3 /*break*/, 3];
|
|
10452
|
-
}
|
|
10453
|
-
return [3 /*break*/, 1];
|
|
10454
|
-
case 3: return [4 /*yield*/, this.checkPermission(service, permission, resolve, reject)];
|
|
10455
|
-
case 4:
|
|
10456
|
-
_e.sent();
|
|
10457
|
-
return [2 /*return*/];
|
|
10458
|
-
}
|
|
10459
|
-
});
|
|
10460
|
-
}); });
|
|
10461
|
-
};
|
|
10462
|
-
PermissionService.prototype.checkPermission = function (service, permission, resolve, reject) {
|
|
10463
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
10464
|
-
var user;
|
|
10465
|
-
return __generator(this, function (_e) {
|
|
10466
|
-
switch (_e.label) {
|
|
10467
|
-
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
10468
|
-
case 1:
|
|
10469
|
-
user = (_e.sent());
|
|
10470
|
-
resolve(true);
|
|
10471
|
-
return [2 /*return*/];
|
|
10472
|
-
}
|
|
10473
|
-
});
|
|
10474
|
-
});
|
|
10475
|
-
};
|
|
10476
|
-
PermissionService.prototype.isAuthorizedByPermissions = function (permissions, operator, ignoreAdmin) {
|
|
10477
|
-
var _this = this;
|
|
10478
|
-
if (operator === void 0) { operator = 'OR'; }
|
|
10479
|
-
if (ignoreAdmin === void 0) { ignoreAdmin = false; }
|
|
10480
|
-
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
10481
|
-
var user, isAuthorized;
|
|
10482
|
-
var _this = this;
|
|
10483
|
-
return __generator(this, function (_e) {
|
|
10484
|
-
switch (_e.label) {
|
|
10485
|
-
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
10486
|
-
case 1:
|
|
10487
|
-
user = (_e.sent());
|
|
10488
|
-
if (user && user.issuperuser.toLowerCase() == 'true') {
|
|
10489
|
-
resolve(true);
|
|
10490
|
-
return [2 /*return*/];
|
|
10491
|
-
}
|
|
10492
|
-
if (user && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin) {
|
|
10493
|
-
resolve(true);
|
|
10494
|
-
return [2 /*return*/];
|
|
10495
|
-
}
|
|
10496
|
-
isAuthorized = true;
|
|
10497
|
-
if (operator.toUpperCase() == 'OR') {
|
|
10498
|
-
isAuthorized = false;
|
|
10499
|
-
}
|
|
10500
|
-
return [4 /*yield*/, permissions.forEach(function (item) {
|
|
10501
|
-
_this.getPermissions(item.service).then(function (permissionResult) {
|
|
10502
|
-
if (operator.toUpperCase() == 'OR') {
|
|
10503
|
-
if (permissionResult.includes(item.permission)) {
|
|
10504
|
-
isAuthorized = true;
|
|
10505
|
-
return;
|
|
10506
|
-
}
|
|
10507
|
-
}
|
|
10508
|
-
else {
|
|
10509
|
-
if (!permissionResult.includes(item.permission)) {
|
|
10510
|
-
isAuthorized = false;
|
|
10511
|
-
return;
|
|
10512
|
-
}
|
|
10513
|
-
}
|
|
10514
|
-
}, function (error) {
|
|
10515
|
-
reject(false);
|
|
10516
|
-
});
|
|
10517
|
-
})];
|
|
10518
|
-
case 2:
|
|
10519
|
-
_e.sent();
|
|
10520
|
-
resolve(isAuthorized);
|
|
10521
|
-
return [2 /*return*/];
|
|
10522
|
-
}
|
|
10523
|
-
});
|
|
10524
|
-
}); });
|
|
10525
|
-
};
|
|
10526
|
-
PermissionService.prototype.getPermissions = function (service) {
|
|
10527
|
-
var _this = this;
|
|
10528
|
-
return new Promise(function (resolve, reject) {
|
|
10529
|
-
var url = _this.serviceUri + "/GetPermissionsByService?service=" + service;
|
|
10530
|
-
var key = "AUTHORIZATION." + service.toUpperCase();
|
|
10531
|
-
var storageItem = _this.storage.getItem(key);
|
|
10532
|
-
if (storageItem && storageItem !== 'null' && storageItem !== 'undefined') {
|
|
10533
|
-
var result = JSON.parse(storageItem);
|
|
10534
|
-
resolve(result);
|
|
10535
|
-
}
|
|
10536
|
-
else {
|
|
10537
|
-
_this.defaultGet(url).then(function (response) {
|
|
10538
|
-
_this.storage.setItem(key, JSON.stringify(response.data));
|
|
10539
|
-
resolve(response.data);
|
|
10540
|
-
}, function (error) {
|
|
10541
|
-
reject();
|
|
10542
|
-
});
|
|
10543
|
-
}
|
|
10544
|
-
});
|
|
10545
|
-
};
|
|
10546
|
-
PermissionService.prototype.getPermissionIdsByModule = function (moduleCode) {
|
|
10547
|
-
var url = this.serviceUri + "/GetPermissionIdsByModule/" + moduleCode;
|
|
10548
|
-
return this.defaultGet(url);
|
|
10549
|
-
};
|
|
10550
|
-
PermissionService.prototype.phanQuyenNguoiDung = function (model) {
|
|
10551
|
-
var url = this.serviceUri + "/PhanQuyenNguoiDung";
|
|
10552
|
-
return this.defaultPost(url, model);
|
|
10553
|
-
};
|
|
10554
|
-
return PermissionService;
|
|
10555
|
-
}(BaseService));
|
|
10556
|
-
PermissionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PermissionService_Factory() { return new PermissionService(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(UserService), i0.ɵɵinject(i4.OAuthService), i0.ɵɵinject(ApplicationContextService)); }, token: PermissionService, providedIn: "root" });
|
|
10557
|
-
PermissionService.decorators = [
|
|
10558
|
-
{ type: i0.Injectable, args: [{
|
|
10559
|
-
providedIn: 'root'
|
|
10560
|
-
},] }
|
|
10561
|
-
];
|
|
10562
|
-
PermissionService.ctorParameters = function () { return [
|
|
10563
|
-
{ type: i1$1.HttpClient },
|
|
10564
|
-
{ type: i0.Injector },
|
|
10565
|
-
{ type: ModuleConfigService },
|
|
10566
|
-
{ type: UserService },
|
|
10567
|
-
{ type: i4.OAuthService },
|
|
10568
|
-
{ type: ApplicationContextService }
|
|
10569
|
-
]; };
|
|
10570
|
-
|
|
10571
|
-
(function (EnumTypeSplash) {
|
|
10572
|
-
EnumTypeSplash["DEFAULT"] = "Default";
|
|
10573
|
-
EnumTypeSplash["NEW_V1"] = "v1";
|
|
10574
|
-
EnumTypeSplash["NEW_V2"] = "v2";
|
|
10575
|
-
})(exports.EnumTypeSplash || (exports.EnumTypeSplash = {}));
|
|
10576
|
-
var SplashComponentComponent = /** @class */ (function (_super) {
|
|
10577
|
-
__extends(SplashComponentComponent, _super);
|
|
10578
|
-
function SplashComponentComponent(injector, _moduleConfigService, _permissionService, _deviceDetectorService, _userService, _router, _authenService, _globalService) {
|
|
10579
|
-
var _this = _super.call(this, injector) || this;
|
|
10580
|
-
_this._moduleConfigService = _moduleConfigService;
|
|
10581
|
-
_this._permissionService = _permissionService;
|
|
10582
|
-
_this._deviceDetectorService = _deviceDetectorService;
|
|
10583
|
-
_this._userService = _userService;
|
|
10584
|
-
_this._router = _router;
|
|
10585
|
-
_this._authenService = _authenService;
|
|
10586
|
-
_this._globalService = _globalService;
|
|
10587
|
-
_this.defaultAvatar = '';
|
|
10588
|
-
_this.appSwitcherItems = [];
|
|
10589
|
-
_this.loaded = false;
|
|
10590
|
-
_this.currentDate = new Date();
|
|
10591
|
-
_this.showDefaultSetting = false;
|
|
10592
|
-
_this.fileApi = '';
|
|
10593
|
-
_this.isOnMobile = false;
|
|
10594
|
-
_this.EnumTypeSplash = exports.EnumTypeSplash;
|
|
10595
|
-
_this.uiSplash = exports.EnumTypeSplash.DEFAULT;
|
|
10596
|
-
_this.daysInWeek = ['Chủ nhật', 'Thứ hai', 'Thứ ba', 'Thứ tư', 'Thứ năm', 'Thứ sáu', 'Thứ bảy'];
|
|
10597
|
-
_this.rootContext.fireEvent('MAIN_CONTENT_ONLY', true);
|
|
10598
|
-
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
10599
|
-
_this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
|
|
10600
|
-
_this.fileApi = _this.environment.apiDomain.fileEndpoint;
|
|
10601
|
-
setInterval(function () {
|
|
10602
|
-
_this.currentDate = new Date();
|
|
10603
|
-
}, 1000);
|
|
10604
|
-
if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
|
|
10605
|
-
_this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
|
|
10606
|
-
}
|
|
10607
|
-
else {
|
|
10608
|
-
if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
|
|
10609
|
-
_this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
|
|
10610
|
-
}
|
|
10611
|
-
else {
|
|
10612
|
-
_this.showDefaultSetting = false;
|
|
10613
|
-
}
|
|
10614
|
-
}
|
|
10615
|
-
if (!_this.environment.splashScreen || _this.environment.splashScreen == '') {
|
|
10616
|
-
_this.uiSplash = exports.EnumTypeSplash.DEFAULT;
|
|
10617
|
-
}
|
|
10618
|
-
else {
|
|
10619
|
-
_this.uiSplash = _this.environment.splashScreen;
|
|
10620
|
-
}
|
|
10621
|
-
// Config for authentication
|
|
10622
|
-
_this._globalService.setHeaderState(false);
|
|
10623
|
-
_this._globalService.setMenuState(false);
|
|
10624
|
-
return _this;
|
|
10625
|
-
}
|
|
10626
|
-
SplashComponentComponent.prototype.ngOnInit = function () {
|
|
10627
|
-
var _this = this;
|
|
10628
|
-
if (this._deviceDetectorService.isMobile()) {
|
|
10629
|
-
this.isOnMobile = true;
|
|
10630
|
-
}
|
|
10631
|
-
if (this.rootContext.data.currentUser) {
|
|
10632
|
-
if (this.rootContext.data.currentUser.gender == 0) {
|
|
10633
|
-
this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
|
|
10634
|
-
}
|
|
10635
|
-
else {
|
|
10636
|
-
this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
|
|
10637
|
-
}
|
|
10638
|
-
}
|
|
10639
|
-
this.rootContext.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
|
|
10640
|
-
_this.currentUser = _this._userService.getCurrentUser();
|
|
10641
|
-
_this.loadAppMetadata();
|
|
10642
|
-
_this.loaded = true;
|
|
10643
|
-
});
|
|
10644
|
-
if (this.rootModel.allowAnonymous) {
|
|
10645
|
-
this.loaded = true;
|
|
10646
|
-
this.loadAppMetadata();
|
|
10647
|
-
}
|
|
10648
|
-
};
|
|
10649
|
-
SplashComponentComponent.prototype.loadAppMetadata = function () {
|
|
10650
|
-
var _this = this;
|
|
10651
|
-
var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
10652
|
-
var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
|
|
10653
|
-
return __generator(this, function (_c) {
|
|
10654
|
-
switch (_c.label) {
|
|
10655
|
-
case 0:
|
|
10656
|
-
arr = [];
|
|
10657
|
-
_a = [];
|
|
10658
|
-
for (_b in this.environment.appMetadata.appSwitcher)
|
|
10659
|
-
_a.push(_b);
|
|
10660
|
-
_i = 0;
|
|
10661
|
-
_c.label = 1;
|
|
10662
|
-
case 1:
|
|
10663
|
-
if (!(_i < _a.length)) return [3 /*break*/, 5];
|
|
10664
|
-
ind = _a[_i];
|
|
10665
|
-
element = this.environment.appMetadata.appSwitcher[ind];
|
|
10666
|
-
clientId = this.environment.authenticationSettings.clientId;
|
|
10667
|
-
if (!(this.rootModel.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
|
|
10668
|
-
arr.push(element);
|
|
10669
|
-
return [3 /*break*/, 4];
|
|
10670
|
-
case 2:
|
|
10671
|
-
if (!this.currentUser) return [3 /*break*/, 4];
|
|
10672
|
-
return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
|
|
10673
|
-
case 3:
|
|
10674
|
-
isAuthorized = _c.sent();
|
|
10675
|
-
if (isAuthorized) {
|
|
10676
|
-
arr.push(element);
|
|
10677
|
-
}
|
|
10678
|
-
_c.label = 4;
|
|
10679
|
-
case 4:
|
|
10680
|
-
_i++;
|
|
10681
|
-
return [3 /*break*/, 1];
|
|
10682
|
-
case 5:
|
|
10683
|
-
resolve(arr);
|
|
10684
|
-
return [2 /*return*/];
|
|
10685
|
-
}
|
|
10686
|
-
});
|
|
10687
|
-
}); });
|
|
10688
|
-
prmsAppSwicherItem.then(function (rs) {
|
|
10689
|
-
_this.appSwitcherItems.length = 0;
|
|
10690
|
-
if (rs) {
|
|
10691
|
-
rs.forEach(function (element) {
|
|
10692
|
-
if (element.visible) {
|
|
10693
|
-
if (!_this.currentUser) { // allow anonymous
|
|
10694
|
-
_this.appSwitcherItems.push(element);
|
|
10695
|
-
}
|
|
10696
|
-
else {
|
|
10697
|
-
if (_this.currentUser.maNguoiHoc && _this.currentUser.issuperuser.toLowerCase() != 'true') {
|
|
10698
|
-
if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
|
|
10699
|
-
_this.appSwitcherItems.push(element);
|
|
10700
|
-
}
|
|
10701
|
-
}
|
|
10702
|
-
else {
|
|
10703
|
-
_this.appSwitcherItems.push(element);
|
|
10704
|
-
}
|
|
10705
|
-
}
|
|
10706
|
-
}
|
|
10707
|
-
});
|
|
10708
|
-
}
|
|
10709
|
-
});
|
|
10710
|
-
};
|
|
10711
|
-
SplashComponentComponent.prototype.switchApp = function (item) {
|
|
10712
|
-
this.loaded = false;
|
|
10713
|
-
if (item.target == '_blank') {
|
|
10714
|
-
if (!item.defaultRedirect) {
|
|
10715
|
-
item.defaultRedirect = '';
|
|
10716
|
-
}
|
|
10717
|
-
// NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
|
|
10718
|
-
if (item.url == item.defaultRedirect) {
|
|
10719
|
-
item.url = '/' + item.code.toLowerCase();
|
|
10720
|
-
}
|
|
10721
|
-
var link = item.url + "/" + item.defaultRedirect;
|
|
10722
|
-
if (!link.startsWith('/') && !link.startsWith('http')) {
|
|
10723
|
-
link = '/' + link;
|
|
10724
|
-
}
|
|
10725
|
-
top.location.href = link;
|
|
10726
|
-
}
|
|
10727
|
-
else {
|
|
10728
|
-
if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
|
|
10729
|
-
this._router.navigateByUrl(item.defaultRedirect);
|
|
10730
|
-
this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
|
|
10731
|
-
if (this.rootContext.data.currentAppMetadata && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
|
|
10732
|
-
this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
|
|
10733
|
-
}
|
|
10734
|
-
}
|
|
10735
|
-
}
|
|
10736
|
-
};
|
|
10737
|
-
SplashComponentComponent.prototype.logout = function () {
|
|
10738
|
-
this._authenService.logout();
|
|
10739
|
-
};
|
|
10740
|
-
SplashComponentComponent.prototype.goToPersonal = function () {
|
|
10741
|
-
var userMenu = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
|
|
10742
|
-
this.switchApp(userMenu);
|
|
10743
|
-
};
|
|
10744
|
-
SplashComponentComponent.prototype.getCurrentUserAvatar = function () {
|
|
10745
|
-
if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
|
|
10746
|
-
return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
|
|
10747
|
-
}
|
|
10748
|
-
else {
|
|
10749
|
-
return this.defaultAvatar;
|
|
10750
|
-
}
|
|
10751
|
-
};
|
|
10752
|
-
SplashComponentComponent.prototype.getNgayTrongTuan = function () {
|
|
10753
|
-
return this.daysInWeek[this.currentDate.getDay()];
|
|
10754
|
-
};
|
|
10755
|
-
SplashComponentComponent.prototype.showProfilePage = function () {
|
|
10756
|
-
if (this._userService.isSinhVienAccount()) {
|
|
10757
|
-
return false;
|
|
10758
|
-
}
|
|
10759
|
-
return true;
|
|
10760
|
-
};
|
|
10761
|
-
SplashComponentComponent.prototype.ngOnDestroy = function () {
|
|
10762
|
-
_super.prototype.ngOnDestroy.call(this);
|
|
10763
|
-
this._globalService.setHeaderState(true);
|
|
10764
|
-
this._globalService.setMenuState(true);
|
|
10765
|
-
};
|
|
10766
|
-
SplashComponentComponent.prototype.login = function () {
|
|
10767
|
-
this.rootContext.fireEvent('LOGIN');
|
|
10768
|
-
};
|
|
10769
|
-
return SplashComponentComponent;
|
|
10770
|
-
}(ComponentBase));
|
|
10771
|
-
SplashComponentComponent.decorators = [
|
|
10772
|
-
{ type: i0.Component, args: [{
|
|
10773
|
-
selector: 'splash-component',
|
|
10774
|
-
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}} 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>",
|
|
10775
|
-
providers: [ComponentContextService],
|
|
10776
|
-
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:8px;height:1em;left:50%;position:absolute;text-indent:-9999em;top:50%;transform:translate(-50%,-50%);width:1em}@-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}}"]
|
|
10777
|
-
},] }
|
|
10778
|
-
];
|
|
10779
|
-
SplashComponentComponent.ctorParameters = function () { return [
|
|
10780
|
-
{ type: i0.Injector },
|
|
10781
|
-
{ type: ModuleConfigService },
|
|
10782
|
-
{ type: PermissionService },
|
|
10783
|
-
{ type: ngxDeviceDetector.DeviceDetectorService },
|
|
10784
|
-
{ type: UserService },
|
|
10785
|
-
{ type: i3$1.Router },
|
|
10786
|
-
{ type: AuthenService },
|
|
10787
|
-
{ type: GlobalService }
|
|
10788
|
-
]; };
|
|
10789
|
-
|
|
10790
10200
|
var AccessDeniedComponent = /** @class */ (function (_super) {
|
|
10791
10201
|
__extends(AccessDeniedComponent, _super);
|
|
10792
10202
|
function AccessDeniedComponent(injector, _userService, _router, _moduleConfigService, _authenService) {
|
|
@@ -11639,6 +11049,322 @@
|
|
|
11639
11049
|
{ type: ModuleConfigService }
|
|
11640
11050
|
]; };
|
|
11641
11051
|
|
|
11052
|
+
var PhanQuyenModel = /** @class */ (function () {
|
|
11053
|
+
function PhanQuyenModel(init) {
|
|
11054
|
+
this.addRoleIds = [];
|
|
11055
|
+
this.removeRoleIds = [];
|
|
11056
|
+
this.addPermissionIds = [];
|
|
11057
|
+
this.removePermissionIds = [];
|
|
11058
|
+
for (var key in init) {
|
|
11059
|
+
this[key] = init[key];
|
|
11060
|
+
}
|
|
11061
|
+
}
|
|
11062
|
+
return PhanQuyenModel;
|
|
11063
|
+
}());
|
|
11064
|
+
var PermissionService = /** @class */ (function (_super) {
|
|
11065
|
+
__extends(PermissionService, _super);
|
|
11066
|
+
function PermissionService(http, injector, _moduleConfigService, _userService, _oauthService, _appContext) {
|
|
11067
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/permission") || this;
|
|
11068
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
11069
|
+
_this._userService = _userService;
|
|
11070
|
+
_this._oauthService = _oauthService;
|
|
11071
|
+
_this._appContext = _appContext;
|
|
11072
|
+
_this.storage = sessionStorage;
|
|
11073
|
+
_this.delayCheckPermissions = [];
|
|
11074
|
+
_this.ignoreAdmin = false;
|
|
11075
|
+
_this.appCode = null;
|
|
11076
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint;
|
|
11077
|
+
_this.ignoreAdmin = _this._moduleConfigService.getConfig().environment.isIgnoreAdmin;
|
|
11078
|
+
_this.appCode = _this._moduleConfigService.getConfig().appCode;
|
|
11079
|
+
return _this;
|
|
11080
|
+
}
|
|
11081
|
+
PermissionService.prototype.clearPermissionCacheAll = function () {
|
|
11082
|
+
var _a, _b, _c;
|
|
11083
|
+
var lstAppCodes = (_c = (_b = (_a = this._moduleConfigService.getConfig().environment.appMetadata) === null || _a === void 0 ? void 0 : _a.appSwitcher) === null || _b === void 0 ? void 0 : _b.map(function (app) { return app.code; })) !== null && _c !== void 0 ? _c : [];
|
|
11084
|
+
var lstApiEndpoint = [];
|
|
11085
|
+
var apiDomain = this._moduleConfigService.getConfig().environment.apiDomain;
|
|
11086
|
+
for (var domainName in apiDomain) {
|
|
11087
|
+
if (domainName.startsWith('-') || domainName.startsWith('1') || domainName == 'gateway')
|
|
11088
|
+
continue;
|
|
11089
|
+
var realDomainName = domainName.split('Endpoint') ? domainName.split('Endpoint')[0] : domainName;
|
|
11090
|
+
lstApiEndpoint.push(realDomainName.toUpperCase());
|
|
11091
|
+
}
|
|
11092
|
+
return this.clearPermissionCache(__spread(lstAppCodes, lstApiEndpoint));
|
|
11093
|
+
};
|
|
11094
|
+
PermissionService.prototype.clearPermissionCache = function (lstModule) {
|
|
11095
|
+
var url = this.serviceUri + "/ClearPermissionCache";
|
|
11096
|
+
return this.defaultPost(url, lstModule);
|
|
11097
|
+
};
|
|
11098
|
+
PermissionService.prototype.getCurrentUserPermission = function () {
|
|
11099
|
+
var url = this.serviceUri + "/GetCurrentUserPermission";
|
|
11100
|
+
return this.defaultGet(url);
|
|
11101
|
+
};
|
|
11102
|
+
PermissionService.prototype.getAllBasePermission = function () {
|
|
11103
|
+
var _a, _b, _c, _d;
|
|
11104
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11105
|
+
var url, user, res, lstAppCodes, promiseArr, code, service, permissions, key, storageItem;
|
|
11106
|
+
return __generator(this, function (_e) {
|
|
11107
|
+
switch (_e.label) {
|
|
11108
|
+
case 0:
|
|
11109
|
+
url = this.serviceUri + "/GetAllBasePermission";
|
|
11110
|
+
user = this._userService.getCurrentUser();
|
|
11111
|
+
if (user
|
|
11112
|
+
&& (user.issuperuser && user.issuperuser.toLowerCase() == 'true')
|
|
11113
|
+
|| (user.isadmin && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin)) {
|
|
11114
|
+
return [2 /*return*/];
|
|
11115
|
+
}
|
|
11116
|
+
return [4 /*yield*/, this.defaultGet(url)];
|
|
11117
|
+
case 1:
|
|
11118
|
+
res = _e.sent();
|
|
11119
|
+
lstAppCodes = (_c = (_b = (_a = this._moduleConfigService.getConfig().environment.appMetadata) === null || _a === void 0 ? void 0 : _a.appSwitcher) === null || _b === void 0 ? void 0 : _b.map(function (app) { return app.code; })) !== null && _c !== void 0 ? _c : [];
|
|
11120
|
+
if (!(!res.success || res.data == null)) return [3 /*break*/, 3];
|
|
11121
|
+
promiseArr = [];
|
|
11122
|
+
for (code in lstAppCodes) {
|
|
11123
|
+
promiseArr.push(this.getPermissions(code));
|
|
11124
|
+
}
|
|
11125
|
+
return [4 /*yield*/, Promise.all(promiseArr)];
|
|
11126
|
+
case 2:
|
|
11127
|
+
_e.sent();
|
|
11128
|
+
return [2 /*return*/];
|
|
11129
|
+
case 3:
|
|
11130
|
+
for (service in lstAppCodes) {
|
|
11131
|
+
permissions = (_d = res.data[service]) !== null && _d !== void 0 ? _d : [];
|
|
11132
|
+
key = "AUTHORIZATION." + service.toUpperCase();
|
|
11133
|
+
storageItem = this.storage.getItem(key);
|
|
11134
|
+
if (storageItem != null) {
|
|
11135
|
+
this.storage.removeItem(key);
|
|
11136
|
+
}
|
|
11137
|
+
this.storage.setItem(key, JSON.stringify(permissions));
|
|
11138
|
+
}
|
|
11139
|
+
return [2 /*return*/];
|
|
11140
|
+
}
|
|
11141
|
+
});
|
|
11142
|
+
});
|
|
11143
|
+
};
|
|
11144
|
+
/**
|
|
11145
|
+
* Truyền vào danh sách permision cần check
|
|
11146
|
+
* @param lstPermissionCode những perrmision code cần check => nên dùng trong trường hợp check các button trong code
|
|
11147
|
+
* @returns trả ra các perrmisionCode có quyền
|
|
11148
|
+
*/
|
|
11149
|
+
PermissionService.prototype.getPermissionAuthorized = function (lstPermissionCode) {
|
|
11150
|
+
var _this = this;
|
|
11151
|
+
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
11152
|
+
var user, result, lstPermissionCode_1, lstPermissionCode_1_1, item, e_1_1;
|
|
11153
|
+
var e_1, _e;
|
|
11154
|
+
return __generator(this, function (_f) {
|
|
11155
|
+
switch (_f.label) {
|
|
11156
|
+
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
11157
|
+
case 1:
|
|
11158
|
+
user = (_f.sent());
|
|
11159
|
+
if (user && user.issuperuser.toLowerCase() == 'true') {
|
|
11160
|
+
resolve(lstPermissionCode);
|
|
11161
|
+
return [2 /*return*/];
|
|
11162
|
+
}
|
|
11163
|
+
if (user && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin) {
|
|
11164
|
+
resolve(lstPermissionCode);
|
|
11165
|
+
return [2 /*return*/];
|
|
11166
|
+
}
|
|
11167
|
+
result = [];
|
|
11168
|
+
_f.label = 2;
|
|
11169
|
+
case 2:
|
|
11170
|
+
_f.trys.push([2, 7, 8, 9]);
|
|
11171
|
+
lstPermissionCode_1 = __values(lstPermissionCode), lstPermissionCode_1_1 = lstPermissionCode_1.next();
|
|
11172
|
+
_f.label = 3;
|
|
11173
|
+
case 3:
|
|
11174
|
+
if (!!lstPermissionCode_1_1.done) return [3 /*break*/, 6];
|
|
11175
|
+
item = lstPermissionCode_1_1.value;
|
|
11176
|
+
return [4 /*yield*/, this.isAuthorizedPermission(item)];
|
|
11177
|
+
case 4:
|
|
11178
|
+
if (_f.sent()) {
|
|
11179
|
+
result.push(item);
|
|
11180
|
+
}
|
|
11181
|
+
_f.label = 5;
|
|
11182
|
+
case 5:
|
|
11183
|
+
lstPermissionCode_1_1 = lstPermissionCode_1.next();
|
|
11184
|
+
return [3 /*break*/, 3];
|
|
11185
|
+
case 6: return [3 /*break*/, 9];
|
|
11186
|
+
case 7:
|
|
11187
|
+
e_1_1 = _f.sent();
|
|
11188
|
+
e_1 = { error: e_1_1 };
|
|
11189
|
+
return [3 /*break*/, 9];
|
|
11190
|
+
case 8:
|
|
11191
|
+
try {
|
|
11192
|
+
if (lstPermissionCode_1_1 && !lstPermissionCode_1_1.done && (_e = lstPermissionCode_1.return)) _e.call(lstPermissionCode_1);
|
|
11193
|
+
}
|
|
11194
|
+
finally { if (e_1) throw e_1.error; }
|
|
11195
|
+
return [7 /*endfinally*/];
|
|
11196
|
+
case 9:
|
|
11197
|
+
resolve(result);
|
|
11198
|
+
return [2 /*return*/];
|
|
11199
|
+
}
|
|
11200
|
+
});
|
|
11201
|
+
}); });
|
|
11202
|
+
};
|
|
11203
|
+
PermissionService.prototype.isAuthorizedPermission = function (permission) {
|
|
11204
|
+
var _this = this;
|
|
11205
|
+
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
11206
|
+
var retryCount;
|
|
11207
|
+
return __generator(this, function (_e) {
|
|
11208
|
+
switch (_e.label) {
|
|
11209
|
+
case 0:
|
|
11210
|
+
retryCount = 0;
|
|
11211
|
+
_e.label = 1;
|
|
11212
|
+
case 1:
|
|
11213
|
+
if (!!this._oauthService.hasValidAccessToken()) return [3 /*break*/, 3];
|
|
11214
|
+
return [4 /*yield*/, this._commonService.delay(100)];
|
|
11215
|
+
case 2:
|
|
11216
|
+
_e.sent();
|
|
11217
|
+
retryCount++;
|
|
11218
|
+
if (retryCount > 50) {
|
|
11219
|
+
return [3 /*break*/, 3];
|
|
11220
|
+
}
|
|
11221
|
+
return [3 /*break*/, 1];
|
|
11222
|
+
case 3: return [4 /*yield*/, this.checkPermission(this.appCode, permission, resolve, reject)];
|
|
11223
|
+
case 4:
|
|
11224
|
+
_e.sent();
|
|
11225
|
+
return [2 /*return*/];
|
|
11226
|
+
}
|
|
11227
|
+
});
|
|
11228
|
+
}); });
|
|
11229
|
+
};
|
|
11230
|
+
PermissionService.prototype.isAuthorized = function (service, permission, ignoreAdmin) {
|
|
11231
|
+
var _this = this;
|
|
11232
|
+
if (ignoreAdmin === void 0) { ignoreAdmin = false; }
|
|
11233
|
+
this.root = this._appContext.getRootContext();
|
|
11234
|
+
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
11235
|
+
var retryCount;
|
|
11236
|
+
return __generator(this, function (_e) {
|
|
11237
|
+
switch (_e.label) {
|
|
11238
|
+
case 0:
|
|
11239
|
+
retryCount = 0;
|
|
11240
|
+
_e.label = 1;
|
|
11241
|
+
case 1:
|
|
11242
|
+
if (!!this._oauthService.hasValidAccessToken()) return [3 /*break*/, 3];
|
|
11243
|
+
return [4 /*yield*/, this._commonService.delay(100)];
|
|
11244
|
+
case 2:
|
|
11245
|
+
_e.sent();
|
|
11246
|
+
retryCount++;
|
|
11247
|
+
if (retryCount > 50) {
|
|
11248
|
+
return [3 /*break*/, 3];
|
|
11249
|
+
}
|
|
11250
|
+
return [3 /*break*/, 1];
|
|
11251
|
+
case 3: return [4 /*yield*/, this.checkPermission(service, permission, resolve, reject)];
|
|
11252
|
+
case 4:
|
|
11253
|
+
_e.sent();
|
|
11254
|
+
return [2 /*return*/];
|
|
11255
|
+
}
|
|
11256
|
+
});
|
|
11257
|
+
}); });
|
|
11258
|
+
};
|
|
11259
|
+
PermissionService.prototype.checkPermission = function (service, permission, resolve, reject) {
|
|
11260
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11261
|
+
var user;
|
|
11262
|
+
return __generator(this, function (_e) {
|
|
11263
|
+
switch (_e.label) {
|
|
11264
|
+
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
11265
|
+
case 1:
|
|
11266
|
+
user = (_e.sent());
|
|
11267
|
+
resolve(true);
|
|
11268
|
+
return [2 /*return*/];
|
|
11269
|
+
}
|
|
11270
|
+
});
|
|
11271
|
+
});
|
|
11272
|
+
};
|
|
11273
|
+
PermissionService.prototype.isAuthorizedByPermissions = function (permissions, operator, ignoreAdmin) {
|
|
11274
|
+
var _this = this;
|
|
11275
|
+
if (operator === void 0) { operator = 'OR'; }
|
|
11276
|
+
if (ignoreAdmin === void 0) { ignoreAdmin = false; }
|
|
11277
|
+
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
11278
|
+
var user, isAuthorized;
|
|
11279
|
+
var _this = this;
|
|
11280
|
+
return __generator(this, function (_e) {
|
|
11281
|
+
switch (_e.label) {
|
|
11282
|
+
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
11283
|
+
case 1:
|
|
11284
|
+
user = (_e.sent());
|
|
11285
|
+
if (user && user.issuperuser.toLowerCase() == 'true') {
|
|
11286
|
+
resolve(true);
|
|
11287
|
+
return [2 /*return*/];
|
|
11288
|
+
}
|
|
11289
|
+
if (user && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin) {
|
|
11290
|
+
resolve(true);
|
|
11291
|
+
return [2 /*return*/];
|
|
11292
|
+
}
|
|
11293
|
+
isAuthorized = true;
|
|
11294
|
+
if (operator.toUpperCase() == 'OR') {
|
|
11295
|
+
isAuthorized = false;
|
|
11296
|
+
}
|
|
11297
|
+
return [4 /*yield*/, permissions.forEach(function (item) {
|
|
11298
|
+
_this.getPermissions(item.service).then(function (permissionResult) {
|
|
11299
|
+
if (operator.toUpperCase() == 'OR') {
|
|
11300
|
+
if (permissionResult.includes(item.permission)) {
|
|
11301
|
+
isAuthorized = true;
|
|
11302
|
+
return;
|
|
11303
|
+
}
|
|
11304
|
+
}
|
|
11305
|
+
else {
|
|
11306
|
+
if (!permissionResult.includes(item.permission)) {
|
|
11307
|
+
isAuthorized = false;
|
|
11308
|
+
return;
|
|
11309
|
+
}
|
|
11310
|
+
}
|
|
11311
|
+
}, function (error) {
|
|
11312
|
+
reject(false);
|
|
11313
|
+
});
|
|
11314
|
+
})];
|
|
11315
|
+
case 2:
|
|
11316
|
+
_e.sent();
|
|
11317
|
+
resolve(isAuthorized);
|
|
11318
|
+
return [2 /*return*/];
|
|
11319
|
+
}
|
|
11320
|
+
});
|
|
11321
|
+
}); });
|
|
11322
|
+
};
|
|
11323
|
+
PermissionService.prototype.getPermissions = function (service) {
|
|
11324
|
+
var _this = this;
|
|
11325
|
+
return new Promise(function (resolve, reject) {
|
|
11326
|
+
var url = _this.serviceUri + "/GetPermissionsByService?service=" + service;
|
|
11327
|
+
var key = "AUTHORIZATION." + service.toUpperCase();
|
|
11328
|
+
var storageItem = _this.storage.getItem(key);
|
|
11329
|
+
if (storageItem && storageItem !== 'null' && storageItem !== 'undefined') {
|
|
11330
|
+
var result = JSON.parse(storageItem);
|
|
11331
|
+
resolve(result);
|
|
11332
|
+
}
|
|
11333
|
+
else {
|
|
11334
|
+
_this.defaultGet(url).then(function (response) {
|
|
11335
|
+
_this.storage.setItem(key, JSON.stringify(response.data));
|
|
11336
|
+
resolve(response.data);
|
|
11337
|
+
}, function (error) {
|
|
11338
|
+
reject();
|
|
11339
|
+
});
|
|
11340
|
+
}
|
|
11341
|
+
});
|
|
11342
|
+
};
|
|
11343
|
+
PermissionService.prototype.getPermissionIdsByModule = function (moduleCode) {
|
|
11344
|
+
var url = this.serviceUri + "/GetPermissionIdsByModule/" + moduleCode;
|
|
11345
|
+
return this.defaultGet(url);
|
|
11346
|
+
};
|
|
11347
|
+
PermissionService.prototype.phanQuyenNguoiDung = function (model) {
|
|
11348
|
+
var url = this.serviceUri + "/PhanQuyenNguoiDung";
|
|
11349
|
+
return this.defaultPost(url, model);
|
|
11350
|
+
};
|
|
11351
|
+
return PermissionService;
|
|
11352
|
+
}(BaseService));
|
|
11353
|
+
PermissionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PermissionService_Factory() { return new PermissionService(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(UserService), i0.ɵɵinject(i4.OAuthService), i0.ɵɵinject(ApplicationContextService)); }, token: PermissionService, providedIn: "root" });
|
|
11354
|
+
PermissionService.decorators = [
|
|
11355
|
+
{ type: i0.Injectable, args: [{
|
|
11356
|
+
providedIn: 'root'
|
|
11357
|
+
},] }
|
|
11358
|
+
];
|
|
11359
|
+
PermissionService.ctorParameters = function () { return [
|
|
11360
|
+
{ type: i1$1.HttpClient },
|
|
11361
|
+
{ type: i0.Injector },
|
|
11362
|
+
{ type: ModuleConfigService },
|
|
11363
|
+
{ type: UserService },
|
|
11364
|
+
{ type: i4.OAuthService },
|
|
11365
|
+
{ type: ApplicationContextService }
|
|
11366
|
+
]; };
|
|
11367
|
+
|
|
11642
11368
|
var sort_by;
|
|
11643
11369
|
(function () {
|
|
11644
11370
|
var defaultCompareFunc = function (a, b) {
|
|
@@ -31955,6 +31681,69 @@
|
|
|
31955
31681
|
{ type: i0.Injector }
|
|
31956
31682
|
]; };
|
|
31957
31683
|
|
|
31684
|
+
var GlobalService = /** @class */ (function () {
|
|
31685
|
+
function GlobalService() {
|
|
31686
|
+
this._state = true;
|
|
31687
|
+
this._headerState = true;
|
|
31688
|
+
this._menuState = true;
|
|
31689
|
+
this._advanceSearchState = false;
|
|
31690
|
+
this._advanceSearch = new rxjs.Subject();
|
|
31691
|
+
this._hasAdvanceFilter = new rxjs.Subject();
|
|
31692
|
+
this._searchKeyWithoutAdvance = new rxjs.Subject();
|
|
31693
|
+
}
|
|
31694
|
+
GlobalService.prototype.setSearchKeyWithoutAdvance = function (key) {
|
|
31695
|
+
this._searchKeyWithoutAdvance.next(key);
|
|
31696
|
+
};
|
|
31697
|
+
GlobalService.prototype.getSearchKeyWithoutAdvance = function () {
|
|
31698
|
+
return this._searchKeyWithoutAdvance;
|
|
31699
|
+
};
|
|
31700
|
+
GlobalService.prototype.setSearchBoxState = function (state) {
|
|
31701
|
+
this._state = state;
|
|
31702
|
+
};
|
|
31703
|
+
GlobalService.prototype.getSearchBoxState = function () {
|
|
31704
|
+
return this._state;
|
|
31705
|
+
};
|
|
31706
|
+
GlobalService.prototype.setHeaderState = function (state) {
|
|
31707
|
+
this._headerState = state;
|
|
31708
|
+
};
|
|
31709
|
+
GlobalService.prototype.getHeaderState = function () {
|
|
31710
|
+
return this._headerState;
|
|
31711
|
+
};
|
|
31712
|
+
GlobalService.prototype.setMenuState = function (state) {
|
|
31713
|
+
this._menuState = state;
|
|
31714
|
+
};
|
|
31715
|
+
GlobalService.prototype.getMenuState = function () {
|
|
31716
|
+
return this._menuState;
|
|
31717
|
+
};
|
|
31718
|
+
GlobalService.prototype.setAdvanceSearchStateWithoutFireEvent = function (state) {
|
|
31719
|
+
this._advanceSearchState = state;
|
|
31720
|
+
};
|
|
31721
|
+
GlobalService.prototype.toggleAdvanceSearchState = function (evt) {
|
|
31722
|
+
this._advanceSearchState = !this._advanceSearchState;
|
|
31723
|
+
this._advanceSearch.next({ state: this._advanceSearchState, event: evt });
|
|
31724
|
+
};
|
|
31725
|
+
GlobalService.prototype.getAdvanceSearch = function () {
|
|
31726
|
+
return this._advanceSearch;
|
|
31727
|
+
};
|
|
31728
|
+
GlobalService.prototype.setAdvanceFilter = function (state) {
|
|
31729
|
+
this._hasAdvanceFilter.next({ type: 'hasAdvanceFilter', state: state });
|
|
31730
|
+
};
|
|
31731
|
+
GlobalService.prototype.setAdvanceFilterBox = function (state) {
|
|
31732
|
+
this._hasAdvanceFilter.next({ type: 'hasAdvanceFilterBox', state: state });
|
|
31733
|
+
};
|
|
31734
|
+
GlobalService.prototype.advanceFilterEvent = function () {
|
|
31735
|
+
return this._hasAdvanceFilter;
|
|
31736
|
+
};
|
|
31737
|
+
return GlobalService;
|
|
31738
|
+
}());
|
|
31739
|
+
GlobalService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GlobalService_Factory() { return new GlobalService(); }, token: GlobalService, providedIn: "root" });
|
|
31740
|
+
GlobalService.decorators = [
|
|
31741
|
+
{ type: i0.Injectable, args: [{
|
|
31742
|
+
providedIn: 'root'
|
|
31743
|
+
},] }
|
|
31744
|
+
];
|
|
31745
|
+
GlobalService.ctorParameters = function () { return []; };
|
|
31746
|
+
|
|
31958
31747
|
var StorageService = /** @class */ (function () {
|
|
31959
31748
|
function StorageService(_moduleConfigService) {
|
|
31960
31749
|
this._moduleConfigService = _moduleConfigService;
|
|
@@ -32934,6 +32723,8 @@
|
|
|
32934
32723
|
this.showRejectConfirm = true;
|
|
32935
32724
|
this.keyPressPermissionUtils = 'ppppppppp';
|
|
32936
32725
|
this.currentKeyPressIndex = 0;
|
|
32726
|
+
this.EnumTypeSplash = exports.EnumTypeSplash;
|
|
32727
|
+
this.layoutLoadingPage = exports.EnumTypeSplash.NEW_V1;
|
|
32937
32728
|
this.environment = this._moduleConfigService.getConfig().environment;
|
|
32938
32729
|
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
32939
32730
|
if (this.environment.keyPressPermissionUtils) {
|
|
@@ -33064,6 +32855,12 @@
|
|
|
33064
32855
|
this._componentContextService.subscribe(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, function (data) {
|
|
33065
32856
|
_this.showRejectConfirm = data;
|
|
33066
32857
|
});
|
|
32858
|
+
if (!this.environment.splashScreen || this.environment.splashScreen == '') {
|
|
32859
|
+
this.layoutLoadingPage = exports.EnumTypeSplash.DEFAULT;
|
|
32860
|
+
}
|
|
32861
|
+
else {
|
|
32862
|
+
this.layoutLoadingPage = this.environment.splashScreen;
|
|
32863
|
+
}
|
|
33067
32864
|
}
|
|
33068
32865
|
CommonAppComponentComponent.prototype.ngOnInit = function () {
|
|
33069
32866
|
var _this = this;
|
|
@@ -33620,7 +33417,7 @@
|
|
|
33620
33417
|
CommonAppComponentComponent.decorators = [
|
|
33621
33418
|
{ type: i0.Component, args: [{
|
|
33622
33419
|
selector: 'common-app-component',
|
|
33623
|
-
template: "<div *ngIf=\"pageLoaded\" [style.display]=\"pageLoaded ? '' : 'none'\" class=\"layout-wrapper\"\r\n (click)=\"_commonService.onLayoutClick()\" [ngClass]=\"{'menu-layout-static': !_commonService.isOverlay(),\r\n 'menu-layout-overlay': _commonService.isOverlay(),\r\n 'layout-menu-overlay-active': _commonService.overlayMenuActive,\r\n 'menu-layout-horizontal': _commonService.isHorizontal(),\r\n 'menu-layout-slim': _commonService.isSlim(),\r\n 'layout-menu-static-desktop-inactive': _commonService.staticMenuDesktopInactive,\r\n 'layout-menu-static-desktop-active': !_commonService.staticMenuDesktopInactive,\r\n 'layout-menu-static-mobile-inactive': !_commonService.staticMenuMobileActive,\r\n 'layout-menu-static-mobile-active': _commonService.staticMenuMobileActive,\r\n 'layout-menu-static-inactive': _commonService.staticMenuDesktopInactive,\r\n 'layout-menu-static-active': _commonService.staticMenuMobileActive}\">\r\n\r\n <app-topbar *ngIf=\"_globalService.getHeaderState()\"></app-topbar>\r\n\r\n <div *ngIf=\"_globalService.getMenuState()\" class=\"layout-menu-container\"\r\n [ngClass]=\"{'layout-menu-dark':_commonService.darkMenu}\" (click)=\"_commonService.onMenuClick($event)\">\r\n <app-root-menu></app-root-menu>\r\n <div class=\"layout-menu-block\">\r\n <tn-custom-scrollbar #scrollbar [style]=\"{'padding-top': '16px'}\">\r\n <app-inline-profile *ngIf=\"_commonService.profileMode == 'inline' &&!_commonService.isHorizontal()\">\r\n </app-inline-profile>\r\n <app-menu [reset]=\"_commonService.resetMenu\" (onMenuActive)=\"handleMenuActive($event)\"></app-menu>\r\n </tn-custom-scrollbar>\r\n </div>\r\n <div class=\"search-area layout-menu-search-area\">\r\n <p-autoComplete [(ngModel)]=\"searchMenuInput\" [style]=\"{'width':'100%'}\" [suggestions]=\"searchMenuResult\"\r\n (completeMethod)=\"onSearchMenu($event)\" [autoHighlight]=\"true\"\r\n [placeholder]=\"'T\u00ECm ki\u1EBFm ch\u1EE9c n\u0103ng' | translate\" [delay]=\"200\" [scrollHeight]=\"'400px'\"\r\n class=\"search-input\" [readonly]=\"!(menuModel && menuModel.length)\"\r\n (onSelect)=\"onSelectMenuSuggestion($event)\" field=\"label\">\r\n <ng-template let-item pTemplate=\"item\">\r\n <div innerHTML=\"{{ item.label | highlight : searchMenuInput}}\"></div>\r\n </ng-template>\r\n </p-autoComplete>\r\n <span class=\"icon-search\"><i class=\"pi pi-search\"></i></span>\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"'layout-main'\" [ngClass]=\"{'no-header': _globalService.getHeaderState() ? false : true}\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n\r\n <div class=\"layout-mask\"></div>\r\n <div #quickNoteBt *ngIf=\"!onlyShowMainContent && showQuickNote\" class=\"quick-note-button-holder\" cdkDrag\r\n cdkDragBoundary=\".layout-wrapper\" oncontextmenu=\"return false\" (cdkDragEnded)=\"quickNoteDropped($event)\"\r\n (cdkDragStarted)=\"quickNoteStarted($event)\">\r\n <a #quickNoteBt1 href=\"javascript:;\" class=\"all-note-button\" tabindex=\"0\" (click)=\"quickNoteShowAllNotes()\">\r\n <i class=\"fas fa-sticky-note\"></i></a>\r\n <a #quickNoteBt2 href=\"javascript:;\" class=\"setting-note-button\" tabindex=\"0\" (click)=\"quickNoteShowSettings()\">\r\n <i class=\"fas fa-cog\"></i></a>\r\n <a href=\"javascript:;\" (press)=\"quickNotePress($event)\" (pressup)=\"quickNotePressUp($event)\"\r\n class=\"quick-note-button\" tabindex=\"0\" (click)=\"quickNoteAddNote()\">\r\n <i class=\"fas fa-plus\"></i></a>\r\n </div>\r\n <div #pinnedNotes *ngIf=\"!onlyShowMainContent\" class=\"pinned-notes-holder\" cdkDrag cdkDragBoundary=\".layout-wrapper\"\r\n oncontextmenu=\"return false\" (cdkDragEnded)=\"pinnedNotesDropped($event)\"\r\n (cdkDragStarted)=\"pinnedNotesStarted($event)\">\r\n <div class=\"pinned-notes ui-g\" tabindex=\"0\">\r\n <div *ngIf=\"pinnedNotesMinimizeStatus\" class=\"pinned-notes-minimize-button\"\r\n (click)=\"pinnedNotesMinimize(pinnedNotesMinimizeStatus)\">\r\n <i class=\"pi pi-window-maximize\"></i>\r\n </div>\r\n <div *ngIf=\"pinnedNotesMaximizeStatus\" class=\" pinned-notes-minimize-button\"\r\n (click)=\"pinnedNotesMinimize(pinnedNotesMinimizeStatus)\">\r\n <i class=\"pi pi-window-minimize\"></i>\r\n </div>\r\n <div *ngFor=\"let note of pinnedNoteData\" class=\"pinned-note ui-g-12\">\r\n <div class=\"pinned-note-header-line\" [style.background-color]=\"note.colorCode\">\r\n </div>\r\n <div class=\"pinned-note-body\">\r\n <span class=\"pinned-note-line-title\" [style.paddingBottom]=\"note.titlePaddingBottom\">\r\n <div class=\"pinned-note-header-right\">\r\n <span class=\"pinned-note-header-time\">{{note.created | date: 'dd/MM'}}</span>\r\n <img src=\"../assets/layout/images/ico/unpin-1.ico\" class=\"pinned-note-header-button-unpin\"\r\n (click)=\"unPinNote(note)\">\r\n <i *ngIf=\"!note.isCompleted\" class=\"far fa-flag pinned-note-header-button-complete\"\r\n (click)=\"completeNote(note)\"></i>\r\n <i *ngIf=\"note.isCompleted\" class=\"fas fa-flag-checkered pinned-note-header-button-complete\"\r\n (click)=\"inCompleteNote(note)\"></i>\r\n </div>\r\n <div>{{note.name}}</div>\r\n </span>\r\n <div class=\"pinned-note-contents\" [style.display]=\"note.contentDisplay\">\r\n <span *ngFor=\"let content of note.contents\" class=\"pinned-note-line\">\r\n {{content}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <report-queue [header]=\"'Xu\u1EA5t d\u1EEF li\u1EC7u'\">\r\n </report-queue>\r\n</div>\r\n<div class=\"waiting-box\" [class.show]=\"waiting\">\r\n <div class=\"overlay\"></div>\r\n <div class=\"content-loading\">\r\n <div class=\"lds-ellipsis\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n <div class=\"message-loading\">\r\n <span *ngFor=\"let x of messageWaiting\">{{x}}</span>\r\n </div>\r\n </div>\r\n</div>\r\n<p-toast [position]=\"'top-right'\" [autoZIndex]=\"true\"></p-toast>\r\n<p-confirmDialog #cd [closable]=\"false\">\r\n <p-footer>\r\n <button #okButton type=\"button\" pButton icon=\"pi pi-check\" class=\"p-button-rounded p-button-text\" label=\"\u0110\u1ED3ng \u00FD\"\r\n (keydown.shift.tab)=\"focusTrap($event, false)\" (click)=\"cd.accept()\"></button>\r\n <button *ngIf=\"showRejectConfirm\" #cancelButton type=\"button\" pButton
|
|
33420
|
+
template: "<ng-container *ngIf=\"!pageLoaded\">\r\n <ng-container [ngSwitch]=\"layoutLoadingPage\">\r\n <ng-container *ngSwitchDefault>\r\n <loading-page-v1></loading-page-v1>\r\n </ng-container>\r\n\r\n <!-- <ng-container *ngSwitchCase=\"EnumTypeSplash.NEW_V2\">\r\n <loading-page-v2></loading-page-v2>\r\n </ng-container> -->\r\n </ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"pageLoaded\" [style.display]=\"pageLoaded ? '' : 'none'\" class=\"layout-wrapper\"\r\n (click)=\"_commonService.onLayoutClick()\" [ngClass]=\"{'menu-layout-static': !_commonService.isOverlay(),\r\n 'menu-layout-overlay': _commonService.isOverlay(),\r\n 'layout-menu-overlay-active': _commonService.overlayMenuActive,\r\n 'menu-layout-horizontal': _commonService.isHorizontal(),\r\n 'menu-layout-slim': _commonService.isSlim(),\r\n 'layout-menu-static-desktop-inactive': _commonService.staticMenuDesktopInactive,\r\n 'layout-menu-static-desktop-active': !_commonService.staticMenuDesktopInactive,\r\n 'layout-menu-static-mobile-inactive': !_commonService.staticMenuMobileActive,\r\n 'layout-menu-static-mobile-active': _commonService.staticMenuMobileActive,\r\n 'layout-menu-static-inactive': _commonService.staticMenuDesktopInactive,\r\n 'layout-menu-static-active': _commonService.staticMenuMobileActive}\">\r\n\r\n <app-topbar *ngIf=\"_globalService.getHeaderState()\"></app-topbar>\r\n\r\n <div *ngIf=\"_globalService.getMenuState()\" class=\"layout-menu-container\"\r\n [ngClass]=\"{'layout-menu-dark':_commonService.darkMenu}\" (click)=\"_commonService.onMenuClick($event)\">\r\n <app-root-menu></app-root-menu>\r\n <div class=\"layout-menu-block\">\r\n <tn-custom-scrollbar #scrollbar [style]=\"{'padding-top': '16px'}\">\r\n <app-inline-profile *ngIf=\"_commonService.profileMode == 'inline' &&!_commonService.isHorizontal()\">\r\n </app-inline-profile>\r\n <app-menu [reset]=\"_commonService.resetMenu\" (onMenuActive)=\"handleMenuActive($event)\"></app-menu>\r\n </tn-custom-scrollbar>\r\n </div>\r\n <div class=\"search-area layout-menu-search-area\">\r\n <p-autoComplete [(ngModel)]=\"searchMenuInput\" [style]=\"{'width':'100%'}\" [suggestions]=\"searchMenuResult\"\r\n (completeMethod)=\"onSearchMenu($event)\" [autoHighlight]=\"true\"\r\n [placeholder]=\"'T\u00ECm ki\u1EBFm ch\u1EE9c n\u0103ng' | translate\" [delay]=\"200\" [scrollHeight]=\"'400px'\"\r\n class=\"search-input\" [readonly]=\"!(menuModel && menuModel.length)\"\r\n (onSelect)=\"onSelectMenuSuggestion($event)\" field=\"label\">\r\n <ng-template let-item pTemplate=\"item\">\r\n <div innerHTML=\"{{ item.label | highlight : searchMenuInput}}\"></div>\r\n </ng-template>\r\n </p-autoComplete>\r\n <span class=\"icon-search\"><i class=\"pi pi-search\"></i></span>\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"'layout-main'\" [ngClass]=\"{'no-header': _globalService.getHeaderState() ? false : true}\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n\r\n <div class=\"layout-mask\"></div>\r\n <div #quickNoteBt *ngIf=\"!onlyShowMainContent && showQuickNote\" class=\"quick-note-button-holder\" cdkDrag\r\n cdkDragBoundary=\".layout-wrapper\" oncontextmenu=\"return false\" (cdkDragEnded)=\"quickNoteDropped($event)\"\r\n (cdkDragStarted)=\"quickNoteStarted($event)\">\r\n <a #quickNoteBt1 href=\"javascript:;\" class=\"all-note-button\" tabindex=\"0\" (click)=\"quickNoteShowAllNotes()\">\r\n <i class=\"fas fa-sticky-note\"></i></a>\r\n <a #quickNoteBt2 href=\"javascript:;\" class=\"setting-note-button\" tabindex=\"0\" (click)=\"quickNoteShowSettings()\">\r\n <i class=\"fas fa-cog\"></i></a>\r\n <a href=\"javascript:;\" (press)=\"quickNotePress($event)\" (pressup)=\"quickNotePressUp($event)\"\r\n class=\"quick-note-button\" tabindex=\"0\" (click)=\"quickNoteAddNote()\">\r\n <i class=\"fas fa-plus\"></i></a>\r\n </div>\r\n <div #pinnedNotes *ngIf=\"!onlyShowMainContent\" class=\"pinned-notes-holder\" cdkDrag cdkDragBoundary=\".layout-wrapper\"\r\n oncontextmenu=\"return false\" (cdkDragEnded)=\"pinnedNotesDropped($event)\"\r\n (cdkDragStarted)=\"pinnedNotesStarted($event)\">\r\n <div class=\"pinned-notes ui-g\" tabindex=\"0\">\r\n <div *ngIf=\"pinnedNotesMinimizeStatus\" class=\"pinned-notes-minimize-button\"\r\n (click)=\"pinnedNotesMinimize(pinnedNotesMinimizeStatus)\">\r\n <i class=\"pi pi-window-maximize\"></i>\r\n </div>\r\n <div *ngIf=\"pinnedNotesMaximizeStatus\" class=\" pinned-notes-minimize-button\"\r\n (click)=\"pinnedNotesMinimize(pinnedNotesMinimizeStatus)\">\r\n <i class=\"pi pi-window-minimize\"></i>\r\n </div>\r\n <div *ngFor=\"let note of pinnedNoteData\" class=\"pinned-note ui-g-12\">\r\n <div class=\"pinned-note-header-line\" [style.background-color]=\"note.colorCode\">\r\n </div>\r\n <div class=\"pinned-note-body\">\r\n <span class=\"pinned-note-line-title\" [style.paddingBottom]=\"note.titlePaddingBottom\">\r\n <div class=\"pinned-note-header-right\">\r\n <span class=\"pinned-note-header-time\">{{note.created | date: 'dd/MM'}}</span>\r\n <img src=\"../assets/layout/images/ico/unpin-1.ico\" class=\"pinned-note-header-button-unpin\"\r\n (click)=\"unPinNote(note)\">\r\n <i *ngIf=\"!note.isCompleted\" class=\"far fa-flag pinned-note-header-button-complete\"\r\n (click)=\"completeNote(note)\"></i>\r\n <i *ngIf=\"note.isCompleted\" class=\"fas fa-flag-checkered pinned-note-header-button-complete\"\r\n (click)=\"inCompleteNote(note)\"></i>\r\n </div>\r\n <div>{{note.name}}</div>\r\n </span>\r\n <div class=\"pinned-note-contents\" [style.display]=\"note.contentDisplay\">\r\n <span *ngFor=\"let content of note.contents\" class=\"pinned-note-line\">\r\n {{content}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <report-queue [header]=\"'Xu\u1EA5t d\u1EEF li\u1EC7u'\">\r\n </report-queue>\r\n</div>\r\n<div class=\"waiting-box\" [class.show]=\"waiting\">\r\n <div class=\"overlay\"></div>\r\n <div class=\"content-loading\">\r\n <div class=\"lds-ellipsis\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n <div class=\"message-loading\">\r\n <span *ngFor=\"let x of messageWaiting\">{{x}}</span>\r\n </div>\r\n </div>\r\n</div>\r\n<p-toast [position]=\"'top-right'\" [autoZIndex]=\"true\"></p-toast>\r\n<p-confirmDialog #cd [closable]=\"false\">\r\n <p-footer>\r\n <button #okButton type=\"button\" pButton icon=\"pi pi-check\" class=\"p-button-rounded p-button-text\" label=\"\u0110\u1ED3ng \u00FD\"\r\n (keydown.shift.tab)=\"focusTrap($event, false)\" (click)=\"cd.accept()\"></button>\r\n <button *ngIf=\"showRejectConfirm\" #cancelButton type=\"button\" pButton\r\n class=\"p-button-rounded p-button-text p-button-secondary\" icon=\"pi pi-times\" label=\"B\u1ECF qua\"\r\n (keydown.tab)=\"focusTrap($event, true)\" (click)=\"cd.reject()\"></button>\r\n </p-footer>\r\n</p-confirmDialog>\r\n<!-- <user-action-manager></user-action-manager> -->\r\n<permission-utils *ngIf=\"rootData.showPermissionUtils\"></permission-utils>\r\n",
|
|
33624
33421
|
providers: [ComponentContextService, EntityMetadataService],
|
|
33625
33422
|
styles: [".layout-menu-search-area{position:relative}.icon-search{align-items:center;background-color:transparent;box-shadow:none;color:#888;display:flex;font-size:14px;height:100%;justify-content:center;position:absolute;right:0;top:0;width:30px}.layout-menu-static-inactive .search-area{margin-left:-303px}.layout-menu-container{bottom:0;display:flex;flex-direction:column;height:auto;overflow:hidden;top:60px}.layout-menu-block{display:flex;flex:1;overflow:hidden}.layout-menu-block>tn-custom-scrollbar{width:100%}::ng-deep .layout-menu-search-area .ui-inputtext{border-color:#dadada;border-radius:0;padding-right:40px;width:calc(100% + 1px)}::ng-deep .layout-menu-search-area .ui-inputtext:not(:focus){box-shadow:none}::ng-deep .layout-menu-search-area input{border-left:0;border-radius:0;border-right:0;width:100%}::ng-deep .layout-menu-search-area .p-autocomplete-panel{max-width:100%}::ng-deep .layout-menu-search-area .p-autocomplete-item{white-space:normal}::ng-deep .layout-menu-search-area .p-autocomplete-item mark{background-color:var(--tn-primary-color);border-radius:0;color:#fff;padding:0}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.waiting-box .content-loading .lds-ellipsis{display:inline-block;height:60px;position:relative;width:80px}.waiting-box .content-loading .lds-ellipsis div{-webkit-animation-timing-function:cubic-bezier(0,1,1,0);animation-timing-function:cubic-bezier(0,1,1,0);background:#fff;border-radius:50%;height:13px;position:absolute;top:33px;width:13px}.waiting-box .content-loading .lds-ellipsis div:first-child{-webkit-animation:lds-ellipsis1 .6s infinite;animation:lds-ellipsis1 .6s infinite;left:8px}.waiting-box .content-loading .lds-ellipsis div:nth-child(2){-webkit-animation:lds-ellipsis2 .6s infinite;animation:lds-ellipsis2 .6s infinite;left:8px}.waiting-box .content-loading .lds-ellipsis div:nth-child(3){-webkit-animation:lds-ellipsis2 .6s infinite;animation:lds-ellipsis2 .6s infinite;left:32px}.waiting-box .content-loading .lds-ellipsis div:nth-child(4){-webkit-animation:lds-ellipsis3 .6s infinite;animation:lds-ellipsis3 .6s infinite;left:56px}.waiting-box .message-loading{font-size:1.75em}.waiting-box .message-loading span{-webkit-animation:message-opacity 1s infinite;animation:message-opacity 1s infinite;color:#fff;margin-right:1px}.waiting-box .message-loading span:last-child{margin-right:0}.waiting-box .message-loading span:nth-child(16n+1){-webkit-animation-delay:0;-webkit-animation-delay:0s;animation-delay:0;animation-delay:0s}.waiting-box .message-loading span:nth-child(16n+2){-webkit-animation-delay:.1s;animation-delay:.1s}.waiting-box .message-loading span:nth-child(16n+3){-webkit-animation-delay:.2s;animation-delay:.2s}.waiting-box .message-loading span:nth-child(16n+4){-webkit-animation-delay:.3s;animation-delay:.3s}.waiting-box .message-loading span:nth-child(16n+5){-webkit-animation-delay:.4s;animation-delay:.4s}.waiting-box .message-loading span:nth-child(16n+6){-webkit-animation-delay:.5s;animation-delay:.5s}.waiting-box .message-loading span:nth-child(16n+7){-webkit-animation-delay:.6s;animation-delay:.6s}.waiting-box .message-loading span:nth-child(16n+8){-webkit-animation-delay:.7s;animation-delay:.7s}.waiting-box .message-loading span:nth-child(16n+9){-webkit-animation-delay:.8s;animation-delay:.8s}.waiting-box .message-loading span:nth-child(16n+10){-webkit-animation-delay:.9s;animation-delay:.9s}.waiting-box .message-loading span:nth-child(16n+11){-webkit-animation-delay:1s;animation-delay:1s}.waiting-box .message-loading span:nth-child(16n+12){-webkit-animation-delay:1.1s;animation-delay:1.1s}.waiting-box .message-loading span:nth-child(16n+13){-webkit-animation-delay:1.2s;animation-delay:1.2s}.waiting-box .message-loading span:nth-child(16n+14){-webkit-animation-delay:1.3s;animation-delay:1.3s}.waiting-box .message-loading span:nth-child(16n+15){-webkit-animation-delay:1.4s;animation-delay:1.4s}.waiting-box .message-loading span:nth-child(16n+16){-webkit-animation-delay:1.5s;animation-delay:1.5s}.waiting-box.show{display:block}@-webkit-keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}@-webkit-keyframes message-opacity{0%{opacity:1}50%{opacity:.5}to{opacity:1}}@keyframes message-opacity{0%{opacity:1}50%{opacity:.5}to{opacity:1}}"]
|
|
33626
33423
|
},] }
|
|
@@ -43775,6 +43572,220 @@
|
|
|
43775
43572
|
{ type: GlobalService }
|
|
43776
43573
|
]; };
|
|
43777
43574
|
|
|
43575
|
+
var SplashComponentComponent = /** @class */ (function (_super) {
|
|
43576
|
+
__extends(SplashComponentComponent, _super);
|
|
43577
|
+
function SplashComponentComponent(injector, _moduleConfigService, _permissionService, _deviceDetectorService, _userService, _router, _authenService, _globalService) {
|
|
43578
|
+
var _this = _super.call(this, injector) || this;
|
|
43579
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
43580
|
+
_this._permissionService = _permissionService;
|
|
43581
|
+
_this._deviceDetectorService = _deviceDetectorService;
|
|
43582
|
+
_this._userService = _userService;
|
|
43583
|
+
_this._router = _router;
|
|
43584
|
+
_this._authenService = _authenService;
|
|
43585
|
+
_this._globalService = _globalService;
|
|
43586
|
+
_this.defaultAvatar = '';
|
|
43587
|
+
_this.appSwitcherItems = [];
|
|
43588
|
+
_this.loaded = false;
|
|
43589
|
+
_this.currentDate = new Date();
|
|
43590
|
+
_this.showDefaultSetting = false;
|
|
43591
|
+
_this.fileApi = '';
|
|
43592
|
+
_this.isOnMobile = false;
|
|
43593
|
+
_this.EnumTypeSplash = exports.EnumTypeSplash;
|
|
43594
|
+
_this.uiSplash = exports.EnumTypeSplash.DEFAULT;
|
|
43595
|
+
_this.daysInWeek = ['Chủ nhật', 'Thứ hai', 'Thứ ba', 'Thứ tư', 'Thứ năm', 'Thứ sáu', 'Thứ bảy'];
|
|
43596
|
+
_this.rootContext.fireEvent('MAIN_CONTENT_ONLY', true);
|
|
43597
|
+
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
43598
|
+
_this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
|
|
43599
|
+
_this.fileApi = _this.environment.apiDomain.fileEndpoint;
|
|
43600
|
+
setInterval(function () {
|
|
43601
|
+
_this.currentDate = new Date();
|
|
43602
|
+
}, 1000);
|
|
43603
|
+
if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
|
|
43604
|
+
_this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
|
|
43605
|
+
}
|
|
43606
|
+
else {
|
|
43607
|
+
if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
|
|
43608
|
+
_this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
|
|
43609
|
+
}
|
|
43610
|
+
else {
|
|
43611
|
+
_this.showDefaultSetting = false;
|
|
43612
|
+
}
|
|
43613
|
+
}
|
|
43614
|
+
if (!_this.environment.splashScreen || _this.environment.splashScreen == '') {
|
|
43615
|
+
_this.uiSplash = exports.EnumTypeSplash.DEFAULT;
|
|
43616
|
+
}
|
|
43617
|
+
else {
|
|
43618
|
+
_this.uiSplash = _this.environment.splashScreen;
|
|
43619
|
+
}
|
|
43620
|
+
// Config for authentication
|
|
43621
|
+
_this._globalService.setHeaderState(false);
|
|
43622
|
+
_this._globalService.setMenuState(false);
|
|
43623
|
+
return _this;
|
|
43624
|
+
}
|
|
43625
|
+
SplashComponentComponent.prototype.ngOnInit = function () {
|
|
43626
|
+
var _this = this;
|
|
43627
|
+
if (this._deviceDetectorService.isMobile()) {
|
|
43628
|
+
this.isOnMobile = true;
|
|
43629
|
+
}
|
|
43630
|
+
if (this.rootContext.data.currentUser) {
|
|
43631
|
+
if (this.rootContext.data.currentUser.gender == 0) {
|
|
43632
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
|
|
43633
|
+
}
|
|
43634
|
+
else {
|
|
43635
|
+
this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
|
|
43636
|
+
}
|
|
43637
|
+
}
|
|
43638
|
+
this.rootContext.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
|
|
43639
|
+
_this.currentUser = _this._userService.getCurrentUser();
|
|
43640
|
+
_this.loadAppMetadata();
|
|
43641
|
+
_this.loaded = true;
|
|
43642
|
+
});
|
|
43643
|
+
if (this.rootModel.allowAnonymous) {
|
|
43644
|
+
this.loaded = true;
|
|
43645
|
+
this.loadAppMetadata();
|
|
43646
|
+
}
|
|
43647
|
+
};
|
|
43648
|
+
SplashComponentComponent.prototype.loadAppMetadata = function () {
|
|
43649
|
+
var _this = this;
|
|
43650
|
+
var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
43651
|
+
var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
|
|
43652
|
+
return __generator(this, function (_c) {
|
|
43653
|
+
switch (_c.label) {
|
|
43654
|
+
case 0:
|
|
43655
|
+
arr = [];
|
|
43656
|
+
_a = [];
|
|
43657
|
+
for (_b in this.environment.appMetadata.appSwitcher)
|
|
43658
|
+
_a.push(_b);
|
|
43659
|
+
_i = 0;
|
|
43660
|
+
_c.label = 1;
|
|
43661
|
+
case 1:
|
|
43662
|
+
if (!(_i < _a.length)) return [3 /*break*/, 5];
|
|
43663
|
+
ind = _a[_i];
|
|
43664
|
+
element = this.environment.appMetadata.appSwitcher[ind];
|
|
43665
|
+
clientId = this.environment.authenticationSettings.clientId;
|
|
43666
|
+
if (!(this.rootModel.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
|
|
43667
|
+
arr.push(element);
|
|
43668
|
+
return [3 /*break*/, 4];
|
|
43669
|
+
case 2:
|
|
43670
|
+
if (!this.currentUser) return [3 /*break*/, 4];
|
|
43671
|
+
return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
|
|
43672
|
+
case 3:
|
|
43673
|
+
isAuthorized = _c.sent();
|
|
43674
|
+
if (isAuthorized) {
|
|
43675
|
+
arr.push(element);
|
|
43676
|
+
}
|
|
43677
|
+
_c.label = 4;
|
|
43678
|
+
case 4:
|
|
43679
|
+
_i++;
|
|
43680
|
+
return [3 /*break*/, 1];
|
|
43681
|
+
case 5:
|
|
43682
|
+
resolve(arr);
|
|
43683
|
+
return [2 /*return*/];
|
|
43684
|
+
}
|
|
43685
|
+
});
|
|
43686
|
+
}); });
|
|
43687
|
+
prmsAppSwicherItem.then(function (rs) {
|
|
43688
|
+
_this.appSwitcherItems.length = 0;
|
|
43689
|
+
if (rs) {
|
|
43690
|
+
rs.forEach(function (element) {
|
|
43691
|
+
if (element.visible) {
|
|
43692
|
+
if (!_this.currentUser) { // allow anonymous
|
|
43693
|
+
_this.appSwitcherItems.push(element);
|
|
43694
|
+
}
|
|
43695
|
+
else {
|
|
43696
|
+
if (_this.currentUser.maNguoiHoc && _this.currentUser.issuperuser.toLowerCase() != 'true') {
|
|
43697
|
+
if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
|
|
43698
|
+
_this.appSwitcherItems.push(element);
|
|
43699
|
+
}
|
|
43700
|
+
}
|
|
43701
|
+
else {
|
|
43702
|
+
_this.appSwitcherItems.push(element);
|
|
43703
|
+
}
|
|
43704
|
+
}
|
|
43705
|
+
}
|
|
43706
|
+
});
|
|
43707
|
+
}
|
|
43708
|
+
});
|
|
43709
|
+
};
|
|
43710
|
+
SplashComponentComponent.prototype.switchApp = function (item) {
|
|
43711
|
+
this.loaded = false;
|
|
43712
|
+
if (item.target == '_blank') {
|
|
43713
|
+
if (!item.defaultRedirect) {
|
|
43714
|
+
item.defaultRedirect = '';
|
|
43715
|
+
}
|
|
43716
|
+
// NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
|
|
43717
|
+
if (item.url == item.defaultRedirect) {
|
|
43718
|
+
item.url = '/' + item.code.toLowerCase();
|
|
43719
|
+
}
|
|
43720
|
+
var link = item.url + "/" + item.defaultRedirect;
|
|
43721
|
+
if (!link.startsWith('/') && !link.startsWith('http')) {
|
|
43722
|
+
link = '/' + link;
|
|
43723
|
+
}
|
|
43724
|
+
top.location.href = link;
|
|
43725
|
+
}
|
|
43726
|
+
else {
|
|
43727
|
+
if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
|
|
43728
|
+
this._router.navigateByUrl(item.defaultRedirect);
|
|
43729
|
+
this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
|
|
43730
|
+
if (this.rootContext.data.currentAppMetadata && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
|
|
43731
|
+
this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
|
|
43732
|
+
}
|
|
43733
|
+
}
|
|
43734
|
+
}
|
|
43735
|
+
};
|
|
43736
|
+
SplashComponentComponent.prototype.logout = function () {
|
|
43737
|
+
this._authenService.logout();
|
|
43738
|
+
};
|
|
43739
|
+
SplashComponentComponent.prototype.goToPersonal = function () {
|
|
43740
|
+
var userMenu = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
|
|
43741
|
+
this.switchApp(userMenu);
|
|
43742
|
+
};
|
|
43743
|
+
SplashComponentComponent.prototype.getCurrentUserAvatar = function () {
|
|
43744
|
+
if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
|
|
43745
|
+
return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
|
|
43746
|
+
}
|
|
43747
|
+
else {
|
|
43748
|
+
return this.defaultAvatar;
|
|
43749
|
+
}
|
|
43750
|
+
};
|
|
43751
|
+
SplashComponentComponent.prototype.getNgayTrongTuan = function () {
|
|
43752
|
+
return this.daysInWeek[this.currentDate.getDay()];
|
|
43753
|
+
};
|
|
43754
|
+
SplashComponentComponent.prototype.showProfilePage = function () {
|
|
43755
|
+
if (this._userService.isSinhVienAccount()) {
|
|
43756
|
+
return false;
|
|
43757
|
+
}
|
|
43758
|
+
return true;
|
|
43759
|
+
};
|
|
43760
|
+
SplashComponentComponent.prototype.ngOnDestroy = function () {
|
|
43761
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
43762
|
+
this._globalService.setHeaderState(true);
|
|
43763
|
+
this._globalService.setMenuState(true);
|
|
43764
|
+
};
|
|
43765
|
+
SplashComponentComponent.prototype.login = function () {
|
|
43766
|
+
this.rootContext.fireEvent('LOGIN');
|
|
43767
|
+
};
|
|
43768
|
+
return SplashComponentComponent;
|
|
43769
|
+
}(ComponentBase));
|
|
43770
|
+
SplashComponentComponent.decorators = [
|
|
43771
|
+
{ type: i0.Component, args: [{
|
|
43772
|
+
selector: 'splash-component',
|
|
43773
|
+
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}} 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>",
|
|
43774
|
+
providers: [ComponentContextService],
|
|
43775
|
+
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:8px;height:1em;left:50%;position:absolute;text-indent:-9999em;top:50%;transform:translate(-50%,-50%);width:1em}@-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}}"]
|
|
43776
|
+
},] }
|
|
43777
|
+
];
|
|
43778
|
+
SplashComponentComponent.ctorParameters = function () { return [
|
|
43779
|
+
{ type: i0.Injector },
|
|
43780
|
+
{ type: ModuleConfigService },
|
|
43781
|
+
{ type: PermissionService },
|
|
43782
|
+
{ type: ngxDeviceDetector.DeviceDetectorService },
|
|
43783
|
+
{ type: UserService },
|
|
43784
|
+
{ type: i3$1.Router },
|
|
43785
|
+
{ type: AuthenService },
|
|
43786
|
+
{ type: GlobalService }
|
|
43787
|
+
]; };
|
|
43788
|
+
|
|
43778
43789
|
var DynamicNodeComponent = /** @class */ (function (_super) {
|
|
43779
43790
|
__extends(DynamicNodeComponent, _super);
|
|
43780
43791
|
function DynamicNodeComponent(injector) {
|
|
@@ -53948,6 +53959,37 @@
|
|
|
53948
53959
|
onAfterSaved: [{ type: i0.Output }]
|
|
53949
53960
|
};
|
|
53950
53961
|
|
|
53962
|
+
var CongViecThayDoiService = /** @class */ (function (_super) {
|
|
53963
|
+
__extends(CongViecThayDoiService, _super);
|
|
53964
|
+
function CongViecThayDoiService(http, injector, _moduleConfigService, _dmLoaiCongViecService) {
|
|
53965
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/CongViecThayDoi") || this;
|
|
53966
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
53967
|
+
_this._dmLoaiCongViecService = _dmLoaiCongViecService;
|
|
53968
|
+
_this.serviceCode = 'congviec';
|
|
53969
|
+
_this.entityName = 'CongViecThayDoi';
|
|
53970
|
+
_this.objectName = 'công việc thay đổi';
|
|
53971
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint;
|
|
53972
|
+
return _this;
|
|
53973
|
+
}
|
|
53974
|
+
CongViecThayDoiService.prototype.triggerSyncTaskPermission = function () {
|
|
53975
|
+
var url = this.serviceUri + "/TriggerSyncTaskPermission";
|
|
53976
|
+
return this.defaultPost(url, {});
|
|
53977
|
+
};
|
|
53978
|
+
return CongViecThayDoiService;
|
|
53979
|
+
}(BaseService));
|
|
53980
|
+
CongViecThayDoiService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CongViecThayDoiService_Factory() { return new CongViecThayDoiService(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(DmLoaiCongViecService)); }, token: CongViecThayDoiService, providedIn: "root" });
|
|
53981
|
+
CongViecThayDoiService.decorators = [
|
|
53982
|
+
{ type: i0.Injectable, args: [{
|
|
53983
|
+
providedIn: 'root'
|
|
53984
|
+
},] }
|
|
53985
|
+
];
|
|
53986
|
+
CongViecThayDoiService.ctorParameters = function () { return [
|
|
53987
|
+
{ type: i1$1.HttpClient },
|
|
53988
|
+
{ type: i0.Injector },
|
|
53989
|
+
{ type: ModuleConfigService },
|
|
53990
|
+
{ type: DmLoaiCongViecService }
|
|
53991
|
+
]; };
|
|
53992
|
+
|
|
53951
53993
|
var CongViecLienQuanService = /** @class */ (function (_super) {
|
|
53952
53994
|
__extends(CongViecLienQuanService, _super);
|
|
53953
53995
|
function CongViecLienQuanService(http, injector, _moduleConfigService) {
|
|
@@ -53983,7 +54025,7 @@
|
|
|
53983
54025
|
|
|
53984
54026
|
var BaseCongViecComponent = /** @class */ (function (_super) {
|
|
53985
54027
|
__extends(BaseCongViecComponent, _super);
|
|
53986
|
-
function BaseCongViecComponent(_injector, _moduleConfigService, _congViecService, _dmLoaiCongViecService, _dmLinhVucCongViecService, _dmPriorityService, _cauHinhWorkflowService, _congViecLienQuanService, _congViecDinhKemService) {
|
|
54028
|
+
function BaseCongViecComponent(_injector, _moduleConfigService, _congViecService, _dmLoaiCongViecService, _dmLinhVucCongViecService, _dmPriorityService, _cauHinhWorkflowService, _congViecLienQuanService, _congViecDinhKemService, _congViecThayDoiService) {
|
|
53987
54029
|
var _this = _super.call(this, _injector) || this;
|
|
53988
54030
|
_this._injector = _injector;
|
|
53989
54031
|
_this._moduleConfigService = _moduleConfigService;
|
|
@@ -53994,6 +54036,7 @@
|
|
|
53994
54036
|
_this._cauHinhWorkflowService = _cauHinhWorkflowService;
|
|
53995
54037
|
_this._congViecLienQuanService = _congViecLienQuanService;
|
|
53996
54038
|
_this._congViecDinhKemService = _congViecDinhKemService;
|
|
54039
|
+
_this._congViecThayDoiService = _congViecThayDoiService;
|
|
53997
54040
|
_this.isFromDashboard = false;
|
|
53998
54041
|
_this.formState = exports.FormState.VIEW;
|
|
53999
54042
|
_this.isChildView = false;
|
|
@@ -54313,6 +54356,11 @@
|
|
|
54313
54356
|
BaseCongViecComponent.prototype.onChonCongViec = function () {
|
|
54314
54357
|
this.showPickerForm = true;
|
|
54315
54358
|
};
|
|
54359
|
+
BaseCongViecComponent.prototype.triggerSyncPermission = function () {
|
|
54360
|
+
var _this = this;
|
|
54361
|
+
this._congViecThayDoiService.triggerSyncTaskPermission()
|
|
54362
|
+
.then(function (res) { return _this.handleResponse(res, 'Đồng bộ thành công'); });
|
|
54363
|
+
};
|
|
54316
54364
|
BaseCongViecComponent.prototype.onAfterSaved = function (id) {
|
|
54317
54365
|
if (this.loaiDanhSach == exports.EnumLoaiDanhSachCongViec.CongViecLienQuan) {
|
|
54318
54366
|
var items = [{
|
|
@@ -54410,7 +54458,7 @@
|
|
|
54410
54458
|
BaseCongViecComponent.decorators = [
|
|
54411
54459
|
{ type: i0.Component, args: [{
|
|
54412
54460
|
selector: 'base-congviec',
|
|
54413
|
-
template: "<crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\" [hiddenAdd]=\"hiddenAdd\"\r\n [hiddenEdit]=\"hiddenEdit\" [hiddenDelete]=\"hiddenDelete\" [hiddenCopyLink]=\"true\" [hiddenAdd]=\"isFromDashboard\"\r\n [showScrollHorizontal]=\"true\" [menuButtons]=\"getMenuButtons\" (onCopyLink)=\"_copyLink($event)\"\r\n (onCopyLinkMultiple)=\"_copyLinkMultiple()\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"addCongViec($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_edit($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\"\r\n (onChangedStatusWorkflow)=\"handleChangedStatusWorkflow($event)\">\r\n <ng-template #buttonAfterToolbar>\r\n <button *ngIf=\"loaiDanhSach > 0 && !isPicker\" type=\"button\" pButton pRipple label=\"Ch\u1ECDn c\u00F4ng vi\u1EC7c\"\r\n icon=\"pi pi-plus\" class=\"p-button-text p-button-success\" (click)=\"onChonCongViec()\"></button>\r\n </ng-template>\r\n <ng-template #congViecInfo let-rowData=\"rowData\">\r\n <div class=\"container-task-info\">\r\n <div class=\"cell-task-info\">\r\n {{rowData.ten}}\r\n </div>\r\n <div class=\"percent-done\">\r\n <div class=\"detail transition-width\" [ngStyle]=\"{\r\n width: rowData.percentWidth\r\n }\">\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #idPriority let-rowData=\"rowData\">\r\n <div class=\"priority\">\r\n <span [ngStyle]=\"{\r\n color: rowData.priorityColor,\r\n background: rowData.priorityBackground\r\n }\">{{rowData.stridPriority}}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template *ngIf=\"loaiDanhSach > 0\" #function let-rowData=\"rowData\" let-crudList=\"crudList\">\r\n <button type=\"button\" pButton pRipple pTooltip=\"{{'FORM.DELETE' | translate}}\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\" icon=\"pi pi-trash\"\r\n (click)=\"deleteCongViecTheoLoaiDanhSach(rowData)\"></button>\r\n </ng-template>\r\n</crud-list>\r\n\r\n<tn-dialog *ngIf=\"loaiCongViecModel.showEditForm\" [styleClass]=\"'tn-form-dialog'\"\r\n [header]=\"loaiCongViecModel.header | translate\" [popupSize]=\"loaiCongViecModel.popupSize\"\r\n (onHide)=\"loaiCongViecModel.showEditForm = false\">\r\n <div class=\"p-col-12\">\r\n <div class=\"p-grid\">\r\n <div class=\"p-md-10 tn-dropdown p-fluid\">\r\n <dropdown [control]=\"searchSchema.loaiCongViec\" [(value)]=\"searchData.loaiCongViec\"></dropdown>\r\n </div>\r\n <div class=\"p-md-2\">\r\n <button type=\"button\" pButton class=\"p-button-primary p-col-12\" label=\"Ok\"\r\n (click)=\"showFormAddTask($event)\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</tn-dialog>\r\n\r\n<tn-dialog *ngIf=\"showDetailForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"setting.popupHeader | translate\" [popupSize]=\"setting.popupSize\" [useDefaultScrollBar]=\"true\"\r\n (onHide)=\"showDetailForm = false\">\r\n <base-congviec-form #formBase [parentModel]=\"model\" [parentSetting]=\"setting\" [parentContext]=\"context\"\r\n [model]=\"formModel\" [crudList]=\"crudList\" [itemId]=\"itemId\" (onSaved)=\"showDetailForm = false;crudList.reload()\"\r\n (onCancel)=\"_handleCancel($event)\" (onAfterSaved)=\"onAfterSaved($event)\">\r\n </base-congviec-form>\r\n</tn-dialog>\r\n\r\n<tn-dialog *ngIf=\"showPickerForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"'Ch\u1ECDn c\u00F4ng vi\u1EC7c' | translate\" [popupSize]=\"setting.popupSize\" [showFooter]=\"true\"\r\n [useDefaultScrollBar]=\"true\" (onHide)=\"showPickerForm = false\">\r\n <base-congviec #congViecPicker [isPicker]=\"true\" [formState]=\"formState\"
|
|
54461
|
+
template: "<crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\" [hiddenAdd]=\"hiddenAdd\"\r\n [hiddenEdit]=\"hiddenEdit\" [hiddenDelete]=\"hiddenDelete\" [hiddenCopyLink]=\"true\" [hiddenAdd]=\"isFromDashboard\"\r\n [showScrollHorizontal]=\"true\" [menuButtons]=\"getMenuButtons\" (onCopyLink)=\"_copyLink($event)\"\r\n (onCopyLinkMultiple)=\"_copyLinkMultiple()\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"addCongViec($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_edit($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\"\r\n (onChangedStatusWorkflow)=\"handleChangedStatusWorkflow($event)\">\r\n <ng-template #buttonAfterToolbar>\r\n <button *ngIf=\"loaiDanhSach > 0 && !isPicker\" type=\"button\" pButton pRipple label=\"Ch\u1ECDn c\u00F4ng vi\u1EC7c\"\r\n icon=\"pi pi-plus\" class=\"p-button-text p-button-success\" (click)=\"onChonCongViec()\"></button>\r\n <button type=\"button\" pButton style=\"display: none\" icon=\"pi pi-replay\" label=\"\u0110\u1ED3ng b\u1ED9 quy\u1EC1n\"\r\n class=\"p-button-text\" (click)=\"triggerSyncPermission()\"></button>\r\n </ng-template>\r\n <ng-template #congViecInfo let-rowData=\"rowData\">\r\n <div class=\"container-task-info\">\r\n <div class=\"cell-task-info\">\r\n {{rowData.ten}}\r\n </div>\r\n <div class=\"percent-done\">\r\n <div class=\"detail transition-width\" [ngStyle]=\"{\r\n width: rowData.percentWidth\r\n }\">\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #idPriority let-rowData=\"rowData\">\r\n <div class=\"priority\">\r\n <span [ngStyle]=\"{\r\n color: rowData.priorityColor,\r\n background: rowData.priorityBackground\r\n }\">{{rowData.stridPriority}}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template *ngIf=\"loaiDanhSach > 0\" #function let-rowData=\"rowData\" let-crudList=\"crudList\">\r\n <button type=\"button\" pButton pRipple pTooltip=\"{{'FORM.DELETE' | translate}}\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\" icon=\"pi pi-trash\"\r\n (click)=\"deleteCongViecTheoLoaiDanhSach(rowData)\"></button>\r\n </ng-template>\r\n</crud-list>\r\n\r\n<tn-dialog *ngIf=\"loaiCongViecModel.showEditForm\" [styleClass]=\"'tn-form-dialog'\"\r\n [header]=\"loaiCongViecModel.header | translate\" [popupSize]=\"loaiCongViecModel.popupSize\"\r\n (onHide)=\"loaiCongViecModel.showEditForm = false\">\r\n <div class=\"p-col-12\">\r\n <div class=\"p-grid\">\r\n <div class=\"p-md-10 tn-dropdown p-fluid\">\r\n <dropdown [control]=\"searchSchema.loaiCongViec\" [(value)]=\"searchData.loaiCongViec\"></dropdown>\r\n </div>\r\n <div class=\"p-md-2\">\r\n <button type=\"button\" pButton class=\"p-button-primary p-col-12\" label=\"Ok\"\r\n (click)=\"showFormAddTask($event)\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</tn-dialog>\r\n\r\n<tn-dialog *ngIf=\"showDetailForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"setting.popupHeader | translate\" [popupSize]=\"setting.popupSize\" [useDefaultScrollBar]=\"true\"\r\n (onHide)=\"showDetailForm = false\">\r\n <base-congviec-form #formBase [parentModel]=\"model\" [parentSetting]=\"setting\" [parentContext]=\"context\"\r\n [model]=\"formModel\" [crudList]=\"crudList\" [itemId]=\"itemId\" (onSaved)=\"showDetailForm = false;crudList.reload()\"\r\n (onCancel)=\"_handleCancel($event)\" (onAfterSaved)=\"onAfterSaved($event)\">\r\n </base-congviec-form>\r\n</tn-dialog>\r\n\r\n<tn-dialog *ngIf=\"showPickerForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"'Ch\u1ECDn c\u00F4ng vi\u1EC7c' | translate\" [popupSize]=\"setting.popupSize\" [showFooter]=\"true\"\r\n [useDefaultScrollBar]=\"true\" (onHide)=\"showPickerForm = false\">\r\n <base-congviec #congViecPicker [isPicker]=\"true\" [formState]=\"formState\" [loaiDanhSach]=\"loaiDanhSach\"\r\n [idCongViec]=\"idCongViec\">\r\n </base-congviec>\r\n <ng-template #footer>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn' | translate\"\r\n (click)=\"onSelectCongViec()\"></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)=\"showPickerForm=false\"></button>\r\n </ng-template>\r\n</tn-dialog>",
|
|
54414
54462
|
providers: [ComponentContextService],
|
|
54415
54463
|
styles: [".container-task-info .percent-done{background-color:#f0f0f0;border-radius:2px;height:5px;margin-top:5px;overflow:hidden;position:relative}.container-task-info .percent-done .detail{background:#3eb839;border-radius:2px;font-size:13px;height:5px;left:0;position:absolute;text-align:center;top:0}.priority{text-align:center}.priority>span{border-radius:3px;font-size:.8em;padding:3px 7px}"]
|
|
54416
54464
|
},] }
|
|
@@ -54424,7 +54472,8 @@
|
|
|
54424
54472
|
{ type: DmPriorityService },
|
|
54425
54473
|
{ type: CauHinhWorkflowService },
|
|
54426
54474
|
{ type: CongViecLienQuanService },
|
|
54427
|
-
{ type: CongViecDinhKemService }
|
|
54475
|
+
{ type: CongViecDinhKemService },
|
|
54476
|
+
{ type: CongViecThayDoiService }
|
|
54428
54477
|
]; };
|
|
54429
54478
|
BaseCongViecComponent.propDecorators = {
|
|
54430
54479
|
congViecForm: [{ type: i0.ViewChild, args: ['formBase', { static: false },] }],
|
|
@@ -56535,6 +56584,27 @@
|
|
|
56535
56584
|
value: [{ type: i0.Input }]
|
|
56536
56585
|
};
|
|
56537
56586
|
|
|
56587
|
+
var LoadingPageV1Component = /** @class */ (function () {
|
|
56588
|
+
function LoadingPageV1Component() {
|
|
56589
|
+
}
|
|
56590
|
+
LoadingPageV1Component.prototype.ngOnInit = function () {
|
|
56591
|
+
};
|
|
56592
|
+
LoadingPageV1Component.prototype.clearStorage = function () {
|
|
56593
|
+
localStorage.clear();
|
|
56594
|
+
sessionStorage.clear();
|
|
56595
|
+
top.location.reload();
|
|
56596
|
+
};
|
|
56597
|
+
return LoadingPageV1Component;
|
|
56598
|
+
}());
|
|
56599
|
+
LoadingPageV1Component.decorators = [
|
|
56600
|
+
{ type: i0.Component, args: [{
|
|
56601
|
+
selector: 'loading-page-v1',
|
|
56602
|
+
template: "<div class=\"loading-page\">\r\n <div class=\"wrapper\">\r\n <section id=\"block-loading\">\r\n <div id=\"top\" class=\"mask\">\r\n <div class=\"plane\"></div>\r\n </div>\r\n\r\n <div id=\"middle\" class=\"mask\">\r\n <div class=\"plane\"></div>\r\n </div>\r\n\r\n <div id=\"bottom\" class=\"mask\">\r\n <div class=\"plane\"></div>\r\n </div>\r\n\r\n <p><i>LOADING...</i></p>\r\n </section>\r\n <h3>Vui l\u00F2ng T\u1EA3i l\u1EA1i trang ho\u1EB7c \u0110\u0103ng xu\u1EA5t t\u00E0i kho\u1EA3n n\u1EBFu th\u1EDDi gian ch\u1EDD qu\u00E1 l\u00E2u!</h3>\r\n <div class=\"wrp-btn\">\r\n <button class=\"\" onclick=\"javascript:location.reload(true)\">\r\n T\u1EA3i l\u1EA1i trang\r\n </button>\r\n <button class=\"\" onclick=\"clearStorage()\">\r\n X\u00F3a cache v\u00E0 t\u1EA3i l\u1EA1i trang\r\n </button>\r\n <button class=\"\" onclick=\"javascript:location.href ='/user/main/force-user-logout'\">\r\n \u0110\u0103ng xu\u1EA5t\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"night\">\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n <div class=\"shooting_star\"></div>\r\n </div>\r\n</div>\r\n",
|
|
56603
|
+
styles: [""]
|
|
56604
|
+
},] }
|
|
56605
|
+
];
|
|
56606
|
+
LoadingPageV1Component.ctorParameters = function () { return []; };
|
|
56607
|
+
|
|
56538
56608
|
function coreDeclaration() {
|
|
56539
56609
|
return [
|
|
56540
56610
|
AddressComponent,
|
|
@@ -56700,7 +56770,8 @@
|
|
|
56700
56770
|
TaiLieuComponent,
|
|
56701
56771
|
TaiLieuCuaToiComponent,
|
|
56702
56772
|
KhaiThacTaiLieuDungChungComponent,
|
|
56703
|
-
TnTemplateComponent
|
|
56773
|
+
TnTemplateComponent,
|
|
56774
|
+
LoadingPageV1Component
|
|
56704
56775
|
];
|
|
56705
56776
|
}
|
|
56706
56777
|
function coreModuleImport() {
|
|
@@ -59188,123 +59259,125 @@
|
|
|
59188
59259
|
exports.ɵ9 = ɵ9;
|
|
59189
59260
|
exports.ɵa = AddressComponent;
|
|
59190
59261
|
exports.ɵb = DropdownService;
|
|
59191
|
-
exports.ɵba =
|
|
59192
|
-
exports.ɵbb =
|
|
59193
|
-
exports.ɵbc =
|
|
59194
|
-
exports.ɵbd =
|
|
59195
|
-
exports.ɵbe =
|
|
59196
|
-
exports.ɵbf =
|
|
59197
|
-
exports.ɵbg =
|
|
59198
|
-
exports.ɵbh =
|
|
59199
|
-
exports.ɵbi =
|
|
59200
|
-
exports.ɵbj =
|
|
59201
|
-
exports.ɵbk =
|
|
59202
|
-
exports.ɵbl =
|
|
59203
|
-
exports.ɵbm =
|
|
59204
|
-
exports.ɵbn =
|
|
59205
|
-
exports.ɵbo =
|
|
59206
|
-
exports.ɵbp =
|
|
59207
|
-
exports.ɵbq =
|
|
59208
|
-
exports.ɵbr =
|
|
59209
|
-
exports.ɵbs =
|
|
59210
|
-
exports.ɵbt =
|
|
59211
|
-
exports.ɵbu =
|
|
59212
|
-
exports.ɵbv =
|
|
59213
|
-
exports.ɵbw =
|
|
59214
|
-
exports.ɵbx =
|
|
59215
|
-
exports.ɵby =
|
|
59216
|
-
exports.ɵbz =
|
|
59262
|
+
exports.ɵba = BaseDmLinhVucCongViecFormComponent;
|
|
59263
|
+
exports.ɵbb = BaseDmPriorityFormComponent;
|
|
59264
|
+
exports.ɵbc = BaseCongviecDinhkemComponent;
|
|
59265
|
+
exports.ɵbd = BaseCongviecDinhkemFormComponent;
|
|
59266
|
+
exports.ɵbe = DatetimePickerComponent;
|
|
59267
|
+
exports.ɵbf = DatetimePickerRangeComponent;
|
|
59268
|
+
exports.ɵbg = DynamicNodeComponent;
|
|
59269
|
+
exports.ɵbh = EntityPickerBoxComponent;
|
|
59270
|
+
exports.ɵbi = EntityPickerDataComponent;
|
|
59271
|
+
exports.ɵbj = EntityPickerSelectedComponent;
|
|
59272
|
+
exports.ɵbk = EntityPickerComponent;
|
|
59273
|
+
exports.ɵbl = EntityPickerDialogComponent;
|
|
59274
|
+
exports.ɵbm = EntityPermissionComponent;
|
|
59275
|
+
exports.ɵbn = DM_ChucVuService;
|
|
59276
|
+
exports.ɵbo = RoleService;
|
|
59277
|
+
exports.ɵbp = EntityPermissionService;
|
|
59278
|
+
exports.ɵbq = EquationEditorComponent;
|
|
59279
|
+
exports.ɵbr = MaskComponent;
|
|
59280
|
+
exports.ɵbs = NumberPickerRangeComponent;
|
|
59281
|
+
exports.ɵbt = PagingNextBackOnlyComponent;
|
|
59282
|
+
exports.ɵbu = RadioButtonListComponent;
|
|
59283
|
+
exports.ɵbv = VanBanPickerComponent;
|
|
59284
|
+
exports.ɵbw = VanBanDenService;
|
|
59285
|
+
exports.ɵbx = VanBanDiService;
|
|
59286
|
+
exports.ɵby = VanBanPickerDialogComponent;
|
|
59287
|
+
exports.ɵbz = VanbanDiPickerComponent;
|
|
59217
59288
|
exports.ɵc = EntityPickerService;
|
|
59218
|
-
exports.ɵca =
|
|
59219
|
-
exports.ɵcb =
|
|
59220
|
-
exports.ɵcc =
|
|
59221
|
-
exports.ɵcd =
|
|
59222
|
-
exports.ɵce =
|
|
59223
|
-
exports.ɵcf =
|
|
59224
|
-
exports.ɵcg =
|
|
59225
|
-
exports.ɵch =
|
|
59226
|
-
exports.ɵci =
|
|
59227
|
-
exports.ɵcj =
|
|
59228
|
-
exports.ɵck =
|
|
59229
|
-
exports.ɵcl =
|
|
59230
|
-
exports.ɵcm =
|
|
59231
|
-
exports.ɵcn =
|
|
59232
|
-
exports.ɵco =
|
|
59233
|
-
exports.ɵcp =
|
|
59234
|
-
exports.ɵcq =
|
|
59235
|
-
exports.ɵcr =
|
|
59236
|
-
exports.ɵcs =
|
|
59237
|
-
exports.ɵct =
|
|
59238
|
-
exports.ɵcu =
|
|
59239
|
-
exports.ɵcv =
|
|
59240
|
-
exports.ɵcw =
|
|
59241
|
-
exports.ɵcx =
|
|
59242
|
-
exports.ɵcy =
|
|
59243
|
-
exports.ɵcz =
|
|
59289
|
+
exports.ɵca = VanbanDenPickerComponent;
|
|
59290
|
+
exports.ɵcb = CongViecPickerComponent;
|
|
59291
|
+
exports.ɵcc = CongViecService$1;
|
|
59292
|
+
exports.ɵcd = TaskWorkflowHistoriesService;
|
|
59293
|
+
exports.ɵce = SettingsComponent;
|
|
59294
|
+
exports.ɵcf = SettingsRowComponent;
|
|
59295
|
+
exports.ɵcg = SettingsWorkflowComponent;
|
|
59296
|
+
exports.ɵch = SettingsWorkflowNo1Component;
|
|
59297
|
+
exports.ɵci = SimpleWorkflowFormComponent;
|
|
59298
|
+
exports.ɵcj = ProcessWorkflowTargetComponent;
|
|
59299
|
+
exports.ɵck = DmChucVuService;
|
|
59300
|
+
exports.ɵcl = ChoYKienFormComponent;
|
|
59301
|
+
exports.ɵcm = SplashComponentV1Component;
|
|
59302
|
+
exports.ɵcn = SplashComponentV2Component;
|
|
59303
|
+
exports.ɵco = StateMachinesConnectionReceiverComponent;
|
|
59304
|
+
exports.ɵcp = StateMachinesConnectionReceiverConditionComponent;
|
|
59305
|
+
exports.ɵcq = StateMachinesConnectionReceiverDepartmentComponent;
|
|
59306
|
+
exports.ɵcr = StateMachinesConnectionReceiverGroupComponent;
|
|
59307
|
+
exports.ɵcs = StateMachinesConnectionReceiverUserComponent;
|
|
59308
|
+
exports.ɵct = StateMachinesConnectionReceiverRoleComponent;
|
|
59309
|
+
exports.ɵcu = StateMachinesConnectionSenderComponent;
|
|
59310
|
+
exports.ɵcv = StartWorkflowComponent;
|
|
59311
|
+
exports.ɵcw = ShareLinkByPermissionComponent;
|
|
59312
|
+
exports.ɵcx = WorkflowSettingNewComponent;
|
|
59313
|
+
exports.ɵcy = PermissionSharingComponent;
|
|
59314
|
+
exports.ɵcz = WorkflowPermissionService;
|
|
59244
59315
|
exports.ɵd = ExceptionHandlerService;
|
|
59245
|
-
exports.ɵda =
|
|
59246
|
-
exports.ɵdb =
|
|
59247
|
-
exports.ɵdc =
|
|
59248
|
-
exports.ɵdd =
|
|
59249
|
-
exports.ɵde =
|
|
59250
|
-
exports.ɵdf =
|
|
59251
|
-
exports.ɵdg =
|
|
59252
|
-
exports.ɵdh =
|
|
59253
|
-
exports.ɵdi =
|
|
59254
|
-
exports.ɵdj =
|
|
59255
|
-
exports.ɵdk =
|
|
59256
|
-
exports.ɵdl =
|
|
59257
|
-
exports.ɵdm =
|
|
59258
|
-
exports.ɵdn =
|
|
59259
|
-
exports.ɵdo =
|
|
59260
|
-
exports.ɵdp =
|
|
59261
|
-
exports.ɵdq =
|
|
59262
|
-
exports.ɵdr =
|
|
59263
|
-
exports.ɵds =
|
|
59264
|
-
exports.ɵdt =
|
|
59265
|
-
exports.ɵdu =
|
|
59266
|
-
exports.ɵdv =
|
|
59267
|
-
exports.ɵdw =
|
|
59268
|
-
exports.ɵdx =
|
|
59269
|
-
exports.ɵdy =
|
|
59270
|
-
exports.ɵdz =
|
|
59316
|
+
exports.ɵda = TnCheckboxComponent;
|
|
59317
|
+
exports.ɵdb = TnDialogComponent;
|
|
59318
|
+
exports.ɵdc = TnColorPickerComponent;
|
|
59319
|
+
exports.ɵdd = TnTinymceComponent;
|
|
59320
|
+
exports.ɵde = TnTabViewComponent;
|
|
59321
|
+
exports.ɵdf = TableDetailFormComponent;
|
|
59322
|
+
exports.ɵdg = FileIconPipe;
|
|
59323
|
+
exports.ɵdh = FileSizePipe;
|
|
59324
|
+
exports.ɵdi = QuickAddFormComponent;
|
|
59325
|
+
exports.ɵdj = PreventShiftTabDirective;
|
|
59326
|
+
exports.ɵdk = TnTemplateDirective;
|
|
59327
|
+
exports.ɵdl = UserPickerComponent;
|
|
59328
|
+
exports.ɵdm = UserPickerBoxComponent;
|
|
59329
|
+
exports.ɵdn = CoCauToChucTestService;
|
|
59330
|
+
exports.ɵdo = TnAppHelpComponent;
|
|
59331
|
+
exports.ɵdp = PathNameService;
|
|
59332
|
+
exports.ɵdq = HelperCurrentPageComponent;
|
|
59333
|
+
exports.ɵdr = TnAppNotificationListComponent;
|
|
59334
|
+
exports.ɵds = TnAppNotificationComponent;
|
|
59335
|
+
exports.ɵdt = MyDriveService;
|
|
59336
|
+
exports.ɵdu = FileVersionService;
|
|
59337
|
+
exports.ɵdv = FileExplorerNewService;
|
|
59338
|
+
exports.ɵdw = FileManagerService;
|
|
59339
|
+
exports.ɵdx = FolderFormComponent;
|
|
59340
|
+
exports.ɵdy = FileFormComponent;
|
|
59341
|
+
exports.ɵdz = FileViewerComponent;
|
|
59271
59342
|
exports.ɵe = CanBo_HoSoService;
|
|
59272
|
-
exports.ɵea =
|
|
59273
|
-
exports.ɵeb =
|
|
59274
|
-
exports.ɵec =
|
|
59275
|
-
exports.ɵed =
|
|
59276
|
-
exports.ɵee =
|
|
59277
|
-
exports.ɵef =
|
|
59278
|
-
exports.ɵeg =
|
|
59279
|
-
exports.ɵeh =
|
|
59280
|
-
exports.ɵei =
|
|
59281
|
-
exports.ɵej =
|
|
59282
|
-
exports.ɵek =
|
|
59283
|
-
exports.ɵel =
|
|
59284
|
-
exports.ɵem =
|
|
59285
|
-
exports.ɵen =
|
|
59286
|
-
exports.ɵeo =
|
|
59287
|
-
exports.ɵep =
|
|
59288
|
-
exports.ɵeq =
|
|
59289
|
-
exports.ɵer =
|
|
59290
|
-
exports.ɵes =
|
|
59291
|
-
exports.ɵet =
|
|
59292
|
-
exports.ɵeu =
|
|
59293
|
-
exports.ɵev =
|
|
59294
|
-
exports.ɵew =
|
|
59295
|
-
exports.ɵex =
|
|
59296
|
-
exports.ɵey =
|
|
59297
|
-
exports.ɵez =
|
|
59343
|
+
exports.ɵea = FileVersionListComponent;
|
|
59344
|
+
exports.ɵeb = WorkflowHistoryComponent;
|
|
59345
|
+
exports.ɵec = EntityWorkflowHistoryService;
|
|
59346
|
+
exports.ɵed = WorkflowHistoryDialogComponent;
|
|
59347
|
+
exports.ɵee = WorkflowHistoryNewComponent;
|
|
59348
|
+
exports.ɵef = WorkflowSettingComponent;
|
|
59349
|
+
exports.ɵeg = EntityWorkflowSettingService;
|
|
59350
|
+
exports.ɵeh = WorkflowSettingDialogComponent;
|
|
59351
|
+
exports.ɵei = WorkflowPermissionComponent;
|
|
59352
|
+
exports.ɵej = WorkflowPermissionFormComponent;
|
|
59353
|
+
exports.ɵek = ReferenceTextBoxComponent;
|
|
59354
|
+
exports.ɵel = QrCodeGeneratorComponent;
|
|
59355
|
+
exports.ɵem = AccessDeniedV1Component;
|
|
59356
|
+
exports.ɵen = AddNewsComponent;
|
|
59357
|
+
exports.ɵeo = ArticleService;
|
|
59358
|
+
exports.ɵep = NewsCategoryService;
|
|
59359
|
+
exports.ɵeq = NotFoundComponent;
|
|
59360
|
+
exports.ɵer = UniversalLinkProcessorComponent;
|
|
59361
|
+
exports.ɵes = SignatureDetailComponent;
|
|
59362
|
+
exports.ɵet = ChatService;
|
|
59363
|
+
exports.ɵeu = ContentsService;
|
|
59364
|
+
exports.ɵev = StatusExtendsService;
|
|
59365
|
+
exports.ɵew = MessageBoardService;
|
|
59366
|
+
exports.ɵex = KySoSimDanhSachChuKyComponent;
|
|
59367
|
+
exports.ɵey = KySoSimChuKyUserService;
|
|
59368
|
+
exports.ɵez = FileKySoSimComponent;
|
|
59298
59369
|
exports.ɵf = AfterViewCheckedComponent;
|
|
59299
|
-
exports.ɵfa =
|
|
59300
|
-
exports.ɵfb =
|
|
59301
|
-
exports.ɵfc =
|
|
59302
|
-
exports.ɵfd =
|
|
59303
|
-
exports.ɵfe =
|
|
59304
|
-
exports.ɵff =
|
|
59305
|
-
exports.ɵfg =
|
|
59306
|
-
exports.ɵfh =
|
|
59307
|
-
exports.ɵfi =
|
|
59370
|
+
exports.ɵfa = KySoSimSignPDFService;
|
|
59371
|
+
exports.ɵfb = TaiLieuCuaToiComponent;
|
|
59372
|
+
exports.ɵfc = KhaiThacTaiLieuDungChungComponent;
|
|
59373
|
+
exports.ɵfd = DanhMucDungChungService;
|
|
59374
|
+
exports.ɵfe = TnTemplateComponent;
|
|
59375
|
+
exports.ɵff = LoadingPageV1Component;
|
|
59376
|
+
exports.ɵfg = CheckReadyComponent;
|
|
59377
|
+
exports.ɵfh = SendAccessTokenInterceptor;
|
|
59378
|
+
exports.ɵfi = LogInterceptor;
|
|
59379
|
+
exports.ɵfj = PermissionUtilsInterceptor;
|
|
59380
|
+
exports.ɵfk = TraceInterceptor;
|
|
59308
59381
|
exports.ɵg = AdvanceSearchComponent;
|
|
59309
59382
|
exports.ɵh = AppRootMenuComponent;
|
|
59310
59383
|
exports.ɵi = AppTopBarComponent;
|
|
@@ -59321,10 +59394,10 @@
|
|
|
59321
59394
|
exports.ɵt = BaseCongViecTestComponent;
|
|
59322
59395
|
exports.ɵu = ListBase;
|
|
59323
59396
|
exports.ɵv = CongViecDinhKemService;
|
|
59324
|
-
exports.ɵw =
|
|
59325
|
-
exports.ɵx =
|
|
59326
|
-
exports.ɵy =
|
|
59327
|
-
exports.ɵz =
|
|
59397
|
+
exports.ɵw = CongViecThayDoiService;
|
|
59398
|
+
exports.ɵx = ProcessWorkflowFormComponent;
|
|
59399
|
+
exports.ɵy = BaseCauHinhWorkflowDetailComponent;
|
|
59400
|
+
exports.ɵz = BaseDmLoaiCongViecFormComponent;
|
|
59328
59401
|
|
|
59329
59402
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
59330
59403
|
|