@fluxhub/fluxhub-lib 1.0.296 → 1.0.297

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.
@@ -15225,12 +15225,11 @@
15225
15225
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
15226
15226
  */
15227
15227
  var FHGuard = /** @class */ (function () {
15228
- function FHGuard(http$$1, auth, router, toast, querys, appService, slimLoadingBarService, app_s) {
15228
+ function FHGuard(http$$1, auth, router, toast, querys, slimLoadingBarService, app_s) {
15229
15229
  this.http = http$$1;
15230
15230
  this.auth = auth;
15231
15231
  this.toast = toast;
15232
15232
  this.querys = querys;
15233
- this.appService = appService;
15234
15233
  this.slimLoadingBarService = slimLoadingBarService;
15235
15234
  this.app_s = app_s;
15236
15235
  this.url = this.app_s.API_ENDPOINT + this.app_s.QUERY_ENDPOINT;
@@ -15285,7 +15284,7 @@
15285
15284
  p.sql = "SELECT_USER_ACCESS_AUTH";
15286
15285
  p.values = [];
15287
15286
  p.types = [];
15288
- if (_this.appService.user == null) {
15287
+ if (_this.app_s.user == null) {
15289
15288
  _this.querys.doQuery(p).subscribe(( /**
15290
15289
  * @param {?} data
15291
15290
  * @return {?}
@@ -15294,11 +15293,11 @@
15294
15293
  if (data.result_msg == "OK")
15295
15294
  if (data.result_data.length > 0) {
15296
15295
  //console.log('canActivate 6');
15297
- _this.appService.user_roles = data.result_data[0].roles;
15298
- if (_this.appService.user_roles.length > 0)
15299
- _this.appService.user_roles = _this.appService.user_roles.substr(1);
15300
- _this.appService.user_isadmin = data.result_data[0].isadmin;
15301
- _this.appService.user = data.result_data[0].username;
15296
+ _this.app_s.user_roles = data.result_data[0].roles;
15297
+ if (_this.app_s.user_roles.length > 0)
15298
+ _this.app_s.user_roles = _this.app_s.user_roles.substr(1);
15299
+ _this.app_s.user_isadmin = data.result_data[0].isadmin;
15300
+ _this.app_s.user = data.result_data[0].username;
15302
15301
  console.log('this.app_s.user_isadmin ', _this.app_s.user_isadmin);
15303
15302
  if (_this.app_s.user_isadmin != null)
15304
15303
  if (_this.app_s.user_isadmin == "1") {
@@ -15308,9 +15307,9 @@
15308
15307
  /** @type {?} */
15309
15308
  var p_1 = new QParam();
15310
15309
  p_1.sql = "SELECT_APPS_USER_ALL";
15311
- _this.appService.getState().app_enabled = new Array();
15310
+ _this.app_s.getState().app_enabled = new Array();
15312
15311
  p_1.types = ['string'];
15313
- p_1.values = [_this.appService.user];
15312
+ p_1.values = [_this.app_s.user];
15314
15313
  //console.log('canActivate 8');
15315
15314
  _this.querys.doQuery(p_1).subscribe(( /**
15316
15315
  * @param {?} data
@@ -15344,10 +15343,15 @@
15344
15343
  else {
15345
15344
  /** @type {?} */
15346
15345
  var p_2 = new QParam();
15346
+ if (_this.app_s.user_isadmin != null)
15347
+ if (_this.app_s.user_isadmin == "1") {
15348
+ resolve(true);
15349
+ return;
15350
+ }
15347
15351
  p_2.sql = "SELECT_APPS_USER_ALL";
15348
- _this.appService.getState().app_enabled = new Array();
15352
+ _this.app_s.getState().app_enabled = new Array();
15349
15353
  p_2.types = ['string'];
15350
- p_2.values = [_this.appService.user];
15354
+ p_2.values = [_this.app_s.user];
15351
15355
  //console.log('canActivate 8');
15352
15356
  _this.querys.doQuery(p_2).subscribe(( /**
15353
15357
  * @param {?} data
@@ -15391,7 +15395,6 @@
15391
15395
  { type: i4.Router },
15392
15396
  { type: i3.ToastrService },
15393
15397
  { type: QueryService },
15394
- { type: AppService },
15395
15398
  { type: ng2SlimLoadingBar.SlimLoadingBarService },
15396
15399
  { type: AppService }
15397
15400
  ];
@@ -17417,6 +17420,11 @@
17417
17420
  p.types.push(arr[i].types);
17418
17421
  p.names.push(arr[i].names);
17419
17422
  if (arr[i].values != null) {
17423
+ if (arr[i].types[i] == 'boolean')
17424
+ if (arr[i].values[i])
17425
+ p.values.push('1');
17426
+ else
17427
+ p.values.push('0');
17420
17428
  if (arr[i].types == 'int')
17421
17429
  if (isNaN(arr[i].values))
17422
17430
  p.values.push('0');