@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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +21 -13
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/docs/coverage.html +1 -1
- package/docs/guards/FHGuard.html +1 -17
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/auth_guard.js +18 -18
- package/esm2015/lib/wkf_engine/wkfdatiaggiuntivi.js +6 -1
- package/esm5/lib/auth_guard.js +18 -17
- package/esm5/lib/wkf_engine/wkfdatiaggiuntivi.js +6 -1
- package/fesm2015/fluxhub-fluxhub-lib.js +22 -15
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +22 -14
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/auth_guard.d.ts +2 -3
- package/package.json +1 -1
|
@@ -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,
|
|
37
|
+
import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, forwardRef, ViewChild, Output, EventEmitter, 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';
|
|
@@ -15798,6 +15798,11 @@ var dati_aggiuntivi = /** @class */ (function () {
|
|
|
15798
15798
|
p.types.push(arr[i].types);
|
|
15799
15799
|
p.names.push(arr[i].names);
|
|
15800
15800
|
if (arr[i].values != null) {
|
|
15801
|
+
if (arr[i].types[i] == 'boolean')
|
|
15802
|
+
if (arr[i].values[i])
|
|
15803
|
+
p.values.push('1');
|
|
15804
|
+
else
|
|
15805
|
+
p.values.push('0');
|
|
15801
15806
|
if (arr[i].types == 'int')
|
|
15802
15807
|
if (isNaN(arr[i].values))
|
|
15803
15808
|
p.values.push('0');
|
|
@@ -18016,12 +18021,11 @@ var FluxhubLibModule = /** @class */ (function () {
|
|
|
18016
18021
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
18017
18022
|
*/
|
|
18018
18023
|
var FHGuard = /** @class */ (function () {
|
|
18019
|
-
function FHGuard(http, auth, router, toast, querys,
|
|
18024
|
+
function FHGuard(http, auth, router, toast, querys, slimLoadingBarService, app_s) {
|
|
18020
18025
|
this.http = http;
|
|
18021
18026
|
this.auth = auth;
|
|
18022
18027
|
this.toast = toast;
|
|
18023
18028
|
this.querys = querys;
|
|
18024
|
-
this.appService = appService;
|
|
18025
18029
|
this.slimLoadingBarService = slimLoadingBarService;
|
|
18026
18030
|
this.app_s = app_s;
|
|
18027
18031
|
this.url = this.app_s.API_ENDPOINT + this.app_s.QUERY_ENDPOINT;
|
|
@@ -18077,7 +18081,7 @@ var FHGuard = /** @class */ (function () {
|
|
|
18077
18081
|
p.sql = "SELECT_USER_ACCESS_AUTH";
|
|
18078
18082
|
p.values = [];
|
|
18079
18083
|
p.types = [];
|
|
18080
|
-
if (_this.
|
|
18084
|
+
if (_this.app_s.user == null) {
|
|
18081
18085
|
_this.querys.doQuery(p).subscribe((/**
|
|
18082
18086
|
* @param {?} data
|
|
18083
18087
|
* @return {?}
|
|
@@ -18087,11 +18091,11 @@ var FHGuard = /** @class */ (function () {
|
|
|
18087
18091
|
if (data.result_msg == "OK")
|
|
18088
18092
|
if (data.result_data.length > 0) {
|
|
18089
18093
|
//console.log('canActivate 6');
|
|
18090
|
-
_this.
|
|
18091
|
-
if (_this.
|
|
18092
|
-
_this.
|
|
18093
|
-
_this.
|
|
18094
|
-
_this.
|
|
18094
|
+
_this.app_s.user_roles = data.result_data[0].roles;
|
|
18095
|
+
if (_this.app_s.user_roles.length > 0)
|
|
18096
|
+
_this.app_s.user_roles = _this.app_s.user_roles.substr(1);
|
|
18097
|
+
_this.app_s.user_isadmin = data.result_data[0].isadmin;
|
|
18098
|
+
_this.app_s.user = data.result_data[0].username;
|
|
18095
18099
|
console.log('this.app_s.user_isadmin ', _this.app_s.user_isadmin);
|
|
18096
18100
|
if (_this.app_s.user_isadmin != null)
|
|
18097
18101
|
if (_this.app_s.user_isadmin == "1") {
|
|
@@ -18101,9 +18105,9 @@ var FHGuard = /** @class */ (function () {
|
|
|
18101
18105
|
/** @type {?} */
|
|
18102
18106
|
var p_1 = new QParam();
|
|
18103
18107
|
p_1.sql = "SELECT_APPS_USER_ALL";
|
|
18104
|
-
_this.
|
|
18108
|
+
_this.app_s.getState().app_enabled = new Array();
|
|
18105
18109
|
p_1.types = ['string'];
|
|
18106
|
-
p_1.values = [_this.
|
|
18110
|
+
p_1.values = [_this.app_s.user];
|
|
18107
18111
|
//console.log('canActivate 8');
|
|
18108
18112
|
_this.querys.doQuery(p_1).subscribe((/**
|
|
18109
18113
|
* @param {?} data
|
|
@@ -18138,10 +18142,15 @@ var FHGuard = /** @class */ (function () {
|
|
|
18138
18142
|
else {
|
|
18139
18143
|
/** @type {?} */
|
|
18140
18144
|
var p_2 = new QParam();
|
|
18145
|
+
if (_this.app_s.user_isadmin != null)
|
|
18146
|
+
if (_this.app_s.user_isadmin == "1") {
|
|
18147
|
+
resolve(true);
|
|
18148
|
+
return;
|
|
18149
|
+
}
|
|
18141
18150
|
p_2.sql = "SELECT_APPS_USER_ALL";
|
|
18142
|
-
_this.
|
|
18151
|
+
_this.app_s.getState().app_enabled = new Array();
|
|
18143
18152
|
p_2.types = ['string'];
|
|
18144
|
-
p_2.values = [_this.
|
|
18153
|
+
p_2.values = [_this.app_s.user];
|
|
18145
18154
|
//console.log('canActivate 8');
|
|
18146
18155
|
_this.querys.doQuery(p_2).subscribe((/**
|
|
18147
18156
|
* @param {?} data
|
|
@@ -18185,7 +18194,6 @@ var FHGuard = /** @class */ (function () {
|
|
|
18185
18194
|
{ type: Router },
|
|
18186
18195
|
{ type: ToastrService },
|
|
18187
18196
|
{ type: QueryService },
|
|
18188
|
-
{ type: AppService },
|
|
18189
18197
|
{ type: SlimLoadingBarService },
|
|
18190
18198
|
{ type: AppService }
|
|
18191
18199
|
]; };
|