@fluxhub/fluxhub-lib 1.0.296 → 1.0.298
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 +28 -18
- 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 +13 -6
- package/esm5/lib/auth_guard.js +18 -17
- package/esm5/lib/wkf_engine/wkfdatiaggiuntivi.js +13 -6
- package/fesm2015/fluxhub-fluxhub-lib.js +29 -20
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +29 -19
- 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, 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';
|
|
@@ -15082,11 +15082,13 @@ var dati_aggiuntivi = /** @class */ (function () {
|
|
|
15082
15082
|
this.app_s.getState().wkf_doc_info.title = 'Avanzamento';
|
|
15083
15083
|
/** @type {?} */
|
|
15084
15084
|
var sp = "";
|
|
15085
|
-
for (var i_2 = 0; i_2 < arrAutori.length; i_2++)
|
|
15086
|
-
if (
|
|
15087
|
-
sp
|
|
15088
|
-
|
|
15089
|
-
|
|
15085
|
+
for (var i_2 = 0; i_2 < arrAutori.length; i_2++)
|
|
15086
|
+
if (arrAutori[i_2].nc != null)
|
|
15087
|
+
if (sp.indexOf(arrAutori[i_2].nc) == -1) {
|
|
15088
|
+
if (sp != '')
|
|
15089
|
+
sp = sp + ';';
|
|
15090
|
+
sp = sp + arrAutori[i_2].nc;
|
|
15091
|
+
}
|
|
15090
15092
|
this.app_s.getState().wkf_doc_info.utenti = "";
|
|
15091
15093
|
if (this.nlevel.livello < 900)
|
|
15092
15094
|
this.app_s.getState().wkf_doc_info.lbl = "Il documento verrà inviato a " + this.nlevel.descri_livello;
|
|
@@ -15798,6 +15800,11 @@ var dati_aggiuntivi = /** @class */ (function () {
|
|
|
15798
15800
|
p.types.push(arr[i].types);
|
|
15799
15801
|
p.names.push(arr[i].names);
|
|
15800
15802
|
if (arr[i].values != null) {
|
|
15803
|
+
if (arr[i].types[i] == 'boolean')
|
|
15804
|
+
if (arr[i].values[i])
|
|
15805
|
+
p.values.push('1');
|
|
15806
|
+
else
|
|
15807
|
+
p.values.push('0');
|
|
15801
15808
|
if (arr[i].types == 'int')
|
|
15802
15809
|
if (isNaN(arr[i].values))
|
|
15803
15810
|
p.values.push('0');
|
|
@@ -18016,12 +18023,11 @@ var FluxhubLibModule = /** @class */ (function () {
|
|
|
18016
18023
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
18017
18024
|
*/
|
|
18018
18025
|
var FHGuard = /** @class */ (function () {
|
|
18019
|
-
function FHGuard(http, auth, router, toast, querys,
|
|
18026
|
+
function FHGuard(http, auth, router, toast, querys, slimLoadingBarService, app_s) {
|
|
18020
18027
|
this.http = http;
|
|
18021
18028
|
this.auth = auth;
|
|
18022
18029
|
this.toast = toast;
|
|
18023
18030
|
this.querys = querys;
|
|
18024
|
-
this.appService = appService;
|
|
18025
18031
|
this.slimLoadingBarService = slimLoadingBarService;
|
|
18026
18032
|
this.app_s = app_s;
|
|
18027
18033
|
this.url = this.app_s.API_ENDPOINT + this.app_s.QUERY_ENDPOINT;
|
|
@@ -18077,7 +18083,7 @@ var FHGuard = /** @class */ (function () {
|
|
|
18077
18083
|
p.sql = "SELECT_USER_ACCESS_AUTH";
|
|
18078
18084
|
p.values = [];
|
|
18079
18085
|
p.types = [];
|
|
18080
|
-
if (_this.
|
|
18086
|
+
if (_this.app_s.user == null) {
|
|
18081
18087
|
_this.querys.doQuery(p).subscribe((/**
|
|
18082
18088
|
* @param {?} data
|
|
18083
18089
|
* @return {?}
|
|
@@ -18087,11 +18093,11 @@ var FHGuard = /** @class */ (function () {
|
|
|
18087
18093
|
if (data.result_msg == "OK")
|
|
18088
18094
|
if (data.result_data.length > 0) {
|
|
18089
18095
|
//console.log('canActivate 6');
|
|
18090
|
-
_this.
|
|
18091
|
-
if (_this.
|
|
18092
|
-
_this.
|
|
18093
|
-
_this.
|
|
18094
|
-
_this.
|
|
18096
|
+
_this.app_s.user_roles = data.result_data[0].roles;
|
|
18097
|
+
if (_this.app_s.user_roles.length > 0)
|
|
18098
|
+
_this.app_s.user_roles = _this.app_s.user_roles.substr(1);
|
|
18099
|
+
_this.app_s.user_isadmin = data.result_data[0].isadmin;
|
|
18100
|
+
_this.app_s.user = data.result_data[0].username;
|
|
18095
18101
|
console.log('this.app_s.user_isadmin ', _this.app_s.user_isadmin);
|
|
18096
18102
|
if (_this.app_s.user_isadmin != null)
|
|
18097
18103
|
if (_this.app_s.user_isadmin == "1") {
|
|
@@ -18101,9 +18107,9 @@ var FHGuard = /** @class */ (function () {
|
|
|
18101
18107
|
/** @type {?} */
|
|
18102
18108
|
var p_1 = new QParam();
|
|
18103
18109
|
p_1.sql = "SELECT_APPS_USER_ALL";
|
|
18104
|
-
_this.
|
|
18110
|
+
_this.app_s.getState().app_enabled = new Array();
|
|
18105
18111
|
p_1.types = ['string'];
|
|
18106
|
-
p_1.values = [_this.
|
|
18112
|
+
p_1.values = [_this.app_s.user];
|
|
18107
18113
|
//console.log('canActivate 8');
|
|
18108
18114
|
_this.querys.doQuery(p_1).subscribe((/**
|
|
18109
18115
|
* @param {?} data
|
|
@@ -18138,10 +18144,15 @@ var FHGuard = /** @class */ (function () {
|
|
|
18138
18144
|
else {
|
|
18139
18145
|
/** @type {?} */
|
|
18140
18146
|
var p_2 = new QParam();
|
|
18147
|
+
if (_this.app_s.user_isadmin != null)
|
|
18148
|
+
if (_this.app_s.user_isadmin == "1") {
|
|
18149
|
+
resolve(true);
|
|
18150
|
+
return;
|
|
18151
|
+
}
|
|
18141
18152
|
p_2.sql = "SELECT_APPS_USER_ALL";
|
|
18142
|
-
_this.
|
|
18153
|
+
_this.app_s.getState().app_enabled = new Array();
|
|
18143
18154
|
p_2.types = ['string'];
|
|
18144
|
-
p_2.values = [_this.
|
|
18155
|
+
p_2.values = [_this.app_s.user];
|
|
18145
18156
|
//console.log('canActivate 8');
|
|
18146
18157
|
_this.querys.doQuery(p_2).subscribe((/**
|
|
18147
18158
|
* @param {?} data
|
|
@@ -18185,7 +18196,6 @@ var FHGuard = /** @class */ (function () {
|
|
|
18185
18196
|
{ type: Router },
|
|
18186
18197
|
{ type: ToastrService },
|
|
18187
18198
|
{ type: QueryService },
|
|
18188
|
-
{ type: AppService },
|
|
18189
18199
|
{ type: SlimLoadingBarService },
|
|
18190
18200
|
{ type: AppService }
|
|
18191
18201
|
]; };
|