@fluxhub/fluxhub-lib 1.0.282 → 1.0.286

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.
@@ -34,7 +34,7 @@ import { DomSanitizer } from '@angular/platform-browser';
34
34
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
35
35
  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';
36
36
  import { ActivatedRoute, Router } from '@angular/router';
37
- import { Injectable, Component, Directive, Inject, PLATFORM_ID, Pipe, Input, forwardRef, ViewChild, Output, EventEmitter, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
37
+ import { Injectable, Directive, Pipe, Component, Inject, PLATFORM_ID, Input, forwardRef, Output, EventEmitter, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
38
38
  import { Http } from '@angular/http';
39
39
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
40
40
  import { ToastrService } from 'ngx-toastr';
@@ -18015,29 +18015,23 @@ var FHGuard = /** @class */ (function () {
18015
18015
  function (next, state) {
18016
18016
  var _this = this;
18017
18017
  this.routingDestination = next.url[0].path;
18018
- console.log('qui1');
18019
18018
  if (this.routingDestination == '')
18020
18019
  return true;
18021
18020
  if (this.routingDestination == 'login' || this.routingDestination == 'rp' || this.routingDestination == 'pr' || this.routingDestination == '/')
18022
18021
  return true;
18023
- console.log('qui2');
18024
18022
  if (this.auth.checkCredentials()) {
18025
- console.log('qui3');
18026
18023
  if (this.routingDestination == 'home')
18027
18024
  return true;
18028
18025
  //console.log('canActivate 1');
18029
18026
  if (this.app_s.user_isadmin != null)
18030
18027
  if (this.app_s.user_isadmin == "1")
18031
18028
  return true;
18032
- console.log('qui4');
18033
18029
  return new Promise((/**
18034
18030
  * @param {?} resolve
18035
18031
  * @return {?}
18036
18032
  */
18037
18033
  function (resolve) {
18038
- console.log('qui5');
18039
18034
  if (_this.arr_accessi != null) {
18040
- console.log('qui6');
18041
18035
  for (var i = 0; i < _this.arr_accessi.length; i++) {
18042
18036
  if (_this.arr_accessi[i].type == 'M')
18043
18037
  if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
@@ -18051,7 +18045,6 @@ var FHGuard = /** @class */ (function () {
18051
18045
  resolve(false);
18052
18046
  return;
18053
18047
  }
18054
- console.log('qui7');
18055
18048
  //console.log('canActivate 5');
18056
18049
  /** @type {?} */
18057
18050
  var p = new QParam();
@@ -18067,7 +18060,6 @@ var FHGuard = /** @class */ (function () {
18067
18060
  if (data != null)
18068
18061
  if (data.result_msg == "OK")
18069
18062
  if (data.result_data.length > 0) {
18070
- console.log('qui8');
18071
18063
  //console.log('canActivate 6');
18072
18064
  _this.appService.user_roles = data.result_data[0].roles;
18073
18065
  if (_this.appService.user_roles.length > 0)
@@ -18075,8 +18067,10 @@ var FHGuard = /** @class */ (function () {
18075
18067
  _this.appService.user_isadmin = data.result_data[0].isadmin;
18076
18068
  _this.appService.user = data.result_data[0].username;
18077
18069
  if (_this.app_s.user_isadmin != null)
18078
- if (_this.app_s.user_isadmin == "1")
18079
- return true;
18070
+ if (_this.app_s.user_isadmin == "1") {
18071
+ resolve(true);
18072
+ return;
18073
+ }
18080
18074
  /** @type {?} */
18081
18075
  var p_1 = new QParam();
18082
18076
  p_1.sql = "SELECT_APPS_USER_ALL";
@@ -18089,7 +18083,6 @@ var FHGuard = /** @class */ (function () {
18089
18083
  * @return {?}
18090
18084
  */
18091
18085
  function (data) {
18092
- console.log('qui9');
18093
18086
  _this.arr_accessi = data.result_data;
18094
18087
  for (var i = 0; i < _this.arr_accessi.length; i++) {
18095
18088
  //console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
@@ -18110,6 +18103,7 @@ var FHGuard = /** @class */ (function () {
18110
18103
  else {
18111
18104
  _this.toast.error("ACCESS DENIED [0X0002]");
18112
18105
  _this.slimLoadingBarService.complete();
18106
+ resolve(false);
18113
18107
  return false;
18114
18108
  }
18115
18109
  }));
@@ -18117,7 +18111,6 @@ var FHGuard = /** @class */ (function () {
18117
18111
  else {
18118
18112
  /** @type {?} */
18119
18113
  var p_2 = new QParam();
18120
- console.log('qui10');
18121
18114
  p_2.sql = "SELECT_APPS_USER_ALL";
18122
18115
  _this.appService.getState().app_enabled = new Array();
18123
18116
  p_2.types = ['string'];
@@ -18130,9 +18123,7 @@ var FHGuard = /** @class */ (function () {
18130
18123
  function (data) {
18131
18124
  //console.log('canActivate 9');
18132
18125
  _this.arr_accessi = data.result_data;
18133
- console.log('qui11');
18134
18126
  for (var i = 0; i < _this.arr_accessi.length; i++) {
18135
- console.log('qui12');
18136
18127
  //console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
18137
18128
  if (_this.arr_accessi[i].type == 'M') {
18138
18129
  if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {