@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.
@@ -33,7 +33,7 @@ import { DomSanitizer } from '@angular/platform-browser';
33
33
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
34
34
  import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
35
35
  import { ActivatedRoute, Router } from '@angular/router';
36
- import { Injectable, Component, Pipe, Directive, Input, forwardRef, Output, EventEmitter, ViewChild, ElementRef, Inject, PLATFORM_ID, Optional, HostListener, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
36
+ import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, forwardRef, Output, EventEmitter, ViewChild, ElementRef, Optional, HostListener, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
37
37
  import { Http } from '@angular/http';
38
38
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
39
39
  import { ToastrService } from 'ngx-toastr';
@@ -15151,6 +15151,11 @@ class dati_aggiuntivi {
15151
15151
  p.types.push(arr[i].types);
15152
15152
  p.names.push(arr[i].names);
15153
15153
  if (arr[i].values != null) {
15154
+ if (arr[i].types[i] == 'boolean')
15155
+ if (arr[i].values[i])
15156
+ p.values.push('1');
15157
+ else
15158
+ p.values.push('0');
15154
15159
  if (arr[i].types == 'int')
15155
15160
  if (isNaN(arr[i].values))
15156
15161
  p.values.push('0');
@@ -17298,16 +17303,14 @@ class FHGuard {
17298
17303
  * @param {?} router
17299
17304
  * @param {?} toast
17300
17305
  * @param {?} querys
17301
- * @param {?} appService
17302
17306
  * @param {?} slimLoadingBarService
17303
17307
  * @param {?} app_s
17304
17308
  */
17305
- constructor(http, auth, router, toast, querys, appService, slimLoadingBarService, app_s) {
17309
+ constructor(http, auth, router, toast, querys, slimLoadingBarService, app_s) {
17306
17310
  this.http = http;
17307
17311
  this.auth = auth;
17308
17312
  this.toast = toast;
17309
17313
  this.querys = querys;
17310
- this.appService = appService;
17311
17314
  this.slimLoadingBarService = slimLoadingBarService;
17312
17315
  this.app_s = app_s;
17313
17316
  this.url = this.app_s.API_ENDPOINT + this.app_s.QUERY_ENDPOINT;
@@ -17357,7 +17360,7 @@ class FHGuard {
17357
17360
  p.sql = "SELECT_USER_ACCESS_AUTH";
17358
17361
  p.values = [];
17359
17362
  p.types = [];
17360
- if (this.appService.user == null) {
17363
+ if (this.app_s.user == null) {
17361
17364
  this.querys.doQuery(p).subscribe((/**
17362
17365
  * @param {?} data
17363
17366
  * @return {?}
@@ -17367,11 +17370,11 @@ class FHGuard {
17367
17370
  if (data.result_msg == "OK")
17368
17371
  if (data.result_data.length > 0) {
17369
17372
  //console.log('canActivate 6');
17370
- this.appService.user_roles = data.result_data[0].roles;
17371
- if (this.appService.user_roles.length > 0)
17372
- this.appService.user_roles = this.appService.user_roles.substr(1);
17373
- this.appService.user_isadmin = data.result_data[0].isadmin;
17374
- this.appService.user = data.result_data[0].username;
17373
+ this.app_s.user_roles = data.result_data[0].roles;
17374
+ if (this.app_s.user_roles.length > 0)
17375
+ this.app_s.user_roles = this.app_s.user_roles.substr(1);
17376
+ this.app_s.user_isadmin = data.result_data[0].isadmin;
17377
+ this.app_s.user = data.result_data[0].username;
17375
17378
  console.log('this.app_s.user_isadmin ', this.app_s.user_isadmin);
17376
17379
  if (this.app_s.user_isadmin != null)
17377
17380
  if (this.app_s.user_isadmin == "1") {
@@ -17381,9 +17384,9 @@ class FHGuard {
17381
17384
  /** @type {?} */
17382
17385
  let p = new QParam();
17383
17386
  p.sql = "SELECT_APPS_USER_ALL";
17384
- this.appService.getState().app_enabled = new Array();
17387
+ this.app_s.getState().app_enabled = new Array();
17385
17388
  p.types = ['string'];
17386
- p.values = [this.appService.user];
17389
+ p.values = [this.app_s.user];
17387
17390
  //console.log('canActivate 8');
17388
17391
  this.querys.doQuery(p).subscribe((/**
17389
17392
  * @param {?} data
@@ -17418,10 +17421,15 @@ class FHGuard {
17418
17421
  else {
17419
17422
  /** @type {?} */
17420
17423
  let p = new QParam();
17424
+ if (this.app_s.user_isadmin != null)
17425
+ if (this.app_s.user_isadmin == "1") {
17426
+ resolve(true);
17427
+ return;
17428
+ }
17421
17429
  p.sql = "SELECT_APPS_USER_ALL";
17422
- this.appService.getState().app_enabled = new Array();
17430
+ this.app_s.getState().app_enabled = new Array();
17423
17431
  p.types = ['string'];
17424
- p.values = [this.appService.user];
17432
+ p.values = [this.app_s.user];
17425
17433
  //console.log('canActivate 8');
17426
17434
  this.querys.doQuery(p).subscribe((/**
17427
17435
  * @param {?} data
@@ -17466,7 +17474,6 @@ FHGuard.ctorParameters = () => [
17466
17474
  { type: Router },
17467
17475
  { type: ToastrService },
17468
17476
  { type: QueryService },
17469
- { type: AppService },
17470
17477
  { type: SlimLoadingBarService },
17471
17478
  { type: AppService }
17472
17479
  ];