@fluxhub/fluxhub-lib 1.0.197 → 1.0.199

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.
@@ -32,7 +32,7 @@ import { TranslateModule } from '@ngx-translate/core';
32
32
  import { DragulaService, DragulaModule } from 'ng2-dragula';
33
33
  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';
34
34
  import { ActivatedRoute, Router } from '@angular/router';
35
- import { Injectable, Component, Input, ViewChild, Output, EventEmitter, Directive, forwardRef, ElementRef, Inject, PLATFORM_ID, Pipe, ViewContainerRef, NgModule, defineInjectable, inject, HostListener } from '@angular/core';
35
+ import { Injectable, forwardRef, Component, Input, ViewChild, Output, EventEmitter, ElementRef, Directive, Inject, PLATFORM_ID, Pipe, ViewContainerRef, NgModule, defineInjectable, inject, HostListener } from '@angular/core';
36
36
  import { Http } from '@angular/http';
37
37
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
38
38
  import { ToastrService } from 'ngx-toastr';
@@ -6884,6 +6884,7 @@ class FHAutoCompleteComponent extends FHValueAccessor {
6884
6884
  * @return {?}
6885
6885
  */
6886
6886
  selectedSearchItem(event) {
6887
+ console.log('selectedSearchItem ', event);
6887
6888
  this.setByDescri(event.option.value);
6888
6889
  this.sItem = event.option.value;
6889
6890
  this.ch(event);
@@ -6893,6 +6894,7 @@ class FHAutoCompleteComponent extends FHValueAccessor {
6893
6894
  * @return {?}
6894
6895
  */
6895
6896
  ch($event) {
6897
+ console.log('ch ', $event);
6896
6898
  /** @type {?} */
6897
6899
  const value = this.getValue();
6898
6900
  this
@@ -7195,7 +7197,7 @@ FHAutoCompleteComponent.decorators = [
7195
7197
  <input matInput
7196
7198
  class="field_style" [disabled]="!enabled || hidden" [matAutocomplete]="auto" [placeholder]="label" [required]="required"
7197
7199
  (keyup)="onChange($event)" [(ngModel)]="sItem" (focus)="fi_search()" (focusout)="fo_search()"
7198
- (change)="ch($event)" #searchp>
7200
+ (ngModelChange)="ch($event)" #searchp>
7199
7201
  </mat-form-field>
7200
7202
  <mat-autocomplete #auto="matAutocomplete" (optionSelected)="selectedSearchItem($event)">
7201
7203
  <mat-option *ngFor="let objx of searchItemsFiltered" class="search_home" [value]="objx.descrizione_valore">
@@ -11402,7 +11404,7 @@ class win_log {
11402
11404
  */
11403
11405
  refresh_list() {
11404
11406
  /** @type {?} */
11405
- var p = new QParam();
11407
+ let p = new QParam();
11406
11408
  p.sql = "SELECT_WORKFLOW_LOG";
11407
11409
  p.types = ['string', 'string'];
11408
11410
  p.values = [this.m_appService.getState().wkf_doc_info.uiid_app, this.m_appService.getState().wkf_doc_info.uiid_doc];
@@ -15372,52 +15374,80 @@ class FHGuard {
15372
15374
  p.sql = "SELECT_USER_ACCESS_AUTH";
15373
15375
  p.values = [];
15374
15376
  p.types = [];
15375
- this.querys.doQuery(p).subscribe(data => {
15376
- if (data != null)
15377
- if (data.result_msg == "OK")
15378
- if (data.result_data.length > 0) {
15379
- console.log('canActivate 6');
15380
- this.appService.user_roles = data.result_data[0].roles;
15381
- if (this.appService.user_roles.length > 0)
15382
- this.appService.user_roles = this.appService.user_roles.substr(1);
15383
- this.appService.user_isadmin = data.result_data[0].isadmin;
15384
- this.appService.user = data.result_data[0].user;
15385
- if (this.app_s.user_isadmin != null)
15386
- if (this.app_s.user_isadmin == "1")
15387
- return true;
15388
- console.log('canActivate 7');
15389
- /** @type {?} */
15390
- let p = new QParam();
15391
- p.sql = "SELECT_APPS_USER_ALL";
15392
- this.appService.getState().app_enabled = new Array();
15393
- p.types = ['string'];
15394
- p.values = [this.appService.user];
15395
- console.log('canActivate 8');
15396
- this.querys.doQuery(p).subscribe(data => {
15397
- console.log('canActivate 9');
15398
- this.arr_accessi = data.result_data;
15399
- for (let i = 0; i < this.arr_accessi.length; i++) {
15400
- console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
15401
- if (this.arr_accessi[i].type == 'M') {
15402
- if ('[' + this.arr_accessi[i].url.split('/')[0] + ']' == '[' + this.routingDestination.split('/')[0] + ']') {
15403
- resolve(true);
15404
- return;
15377
+ if (this.appService.user == null) {
15378
+ this.querys.doQuery(p).subscribe(data => {
15379
+ if (data != null)
15380
+ if (data.result_msg == "OK")
15381
+ if (data.result_data.length > 0) {
15382
+ console.log('canActivate 6');
15383
+ this.appService.user_roles = data.result_data[0].roles;
15384
+ if (this.appService.user_roles.length > 0)
15385
+ this.appService.user_roles = this.appService.user_roles.substr(1);
15386
+ this.appService.user_isadmin = data.result_data[0].isadmin;
15387
+ this.appService.user = data.result_data[0].username;
15388
+ if (this.app_s.user_isadmin != null)
15389
+ if (this.app_s.user_isadmin == "1")
15390
+ return true;
15391
+ /** @type {?} */
15392
+ let p = new QParam();
15393
+ p.sql = "SELECT_APPS_USER_ALL";
15394
+ this.appService.getState().app_enabled = new Array();
15395
+ p.types = ['string'];
15396
+ p.values = [this.appService.user];
15397
+ console.log('canActivate 8');
15398
+ this.querys.doQuery(p).subscribe(data => {
15399
+ console.log('canActivate 9');
15400
+ this.arr_accessi = data.result_data;
15401
+ for (let i = 0; i < this.arr_accessi.length; i++) {
15402
+ console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
15403
+ if (this.arr_accessi[i].type == 'M') {
15404
+ if ('[' + this.arr_accessi[i].url.split('/')[0] + ']' == '[' + this.routingDestination.split('/')[0] + ']') {
15405
+ resolve(true);
15406
+ return;
15407
+ }
15405
15408
  }
15406
15409
  }
15407
- }
15408
- console.log('canActivate 11');
15409
- this.toast.error("ACCESS DENIED [0X0001]");
15410
- resolve(false);
15410
+ console.log('canActivate 11');
15411
+ this.toast.error("ACCESS DENIED [0X0001]");
15412
+ resolve(false);
15413
+ this.slimLoadingBarService.complete();
15414
+ return;
15415
+ });
15416
+ }
15417
+ else {
15418
+ this.toast.error("ACCESS DENIED [0X0002]");
15411
15419
  this.slimLoadingBarService.complete();
15420
+ return false;
15421
+ }
15422
+ });
15423
+ }
15424
+ else {
15425
+ /** @type {?} */
15426
+ let p = new QParam();
15427
+ p.sql = "SELECT_APPS_USER_ALL";
15428
+ this.appService.getState().app_enabled = new Array();
15429
+ p.types = ['string'];
15430
+ p.values = [this.appService.user];
15431
+ console.log('canActivate 8');
15432
+ this.querys.doQuery(p).subscribe(data => {
15433
+ console.log('canActivate 9');
15434
+ this.arr_accessi = data.result_data;
15435
+ for (let i = 0; i < this.arr_accessi.length; i++) {
15436
+ console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
15437
+ if (this.arr_accessi[i].type == 'M') {
15438
+ if ('[' + this.arr_accessi[i].url.split('/')[0] + ']' == '[' + this.routingDestination.split('/')[0] + ']') {
15439
+ resolve(true);
15412
15440
  return;
15413
- });
15414
- }
15415
- else {
15416
- this.toast.error("ACCESS DENIED [0X0002]");
15417
- this.slimLoadingBarService.complete();
15418
- return false;
15441
+ }
15419
15442
  }
15420
- });
15443
+ }
15444
+ console.log('canActivate 11');
15445
+ this.toast.error("ACCESS DENIED [0X0001]");
15446
+ resolve(false);
15447
+ this.slimLoadingBarService.complete();
15448
+ return;
15449
+ });
15450
+ }
15421
15451
  });
15422
15452
  console.log('canActivate 12');
15423
15453
  }