@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
|
@@ -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,
|
|
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';
|
|
@@ -14514,11 +14514,13 @@ class dati_aggiuntivi {
|
|
|
14514
14514
|
this.app_s.getState().wkf_doc_info.title = 'Avanzamento';
|
|
14515
14515
|
/** @type {?} */
|
|
14516
14516
|
let sp = "";
|
|
14517
|
-
for (let i = 0; i < arrAutori.length; i++)
|
|
14518
|
-
if (
|
|
14519
|
-
sp
|
|
14520
|
-
|
|
14521
|
-
|
|
14517
|
+
for (let i = 0; i < arrAutori.length; i++)
|
|
14518
|
+
if (arrAutori[i].nc != null)
|
|
14519
|
+
if (sp.indexOf(arrAutori[i].nc) == -1) {
|
|
14520
|
+
if (sp != '')
|
|
14521
|
+
sp = sp + ';';
|
|
14522
|
+
sp = sp + arrAutori[i].nc;
|
|
14523
|
+
}
|
|
14522
14524
|
this.app_s.getState().wkf_doc_info.utenti = "";
|
|
14523
14525
|
if (this.nlevel.livello < 900)
|
|
14524
14526
|
this.app_s.getState().wkf_doc_info.lbl = "Il documento verrà inviato a " + this.nlevel.descri_livello;
|
|
@@ -15151,6 +15153,11 @@ class dati_aggiuntivi {
|
|
|
15151
15153
|
p.types.push(arr[i].types);
|
|
15152
15154
|
p.names.push(arr[i].names);
|
|
15153
15155
|
if (arr[i].values != null) {
|
|
15156
|
+
if (arr[i].types[i] == 'boolean')
|
|
15157
|
+
if (arr[i].values[i])
|
|
15158
|
+
p.values.push('1');
|
|
15159
|
+
else
|
|
15160
|
+
p.values.push('0');
|
|
15154
15161
|
if (arr[i].types == 'int')
|
|
15155
15162
|
if (isNaN(arr[i].values))
|
|
15156
15163
|
p.values.push('0');
|
|
@@ -17298,16 +17305,14 @@ class FHGuard {
|
|
|
17298
17305
|
* @param {?} router
|
|
17299
17306
|
* @param {?} toast
|
|
17300
17307
|
* @param {?} querys
|
|
17301
|
-
* @param {?} appService
|
|
17302
17308
|
* @param {?} slimLoadingBarService
|
|
17303
17309
|
* @param {?} app_s
|
|
17304
17310
|
*/
|
|
17305
|
-
constructor(http, auth, router, toast, querys,
|
|
17311
|
+
constructor(http, auth, router, toast, querys, slimLoadingBarService, app_s) {
|
|
17306
17312
|
this.http = http;
|
|
17307
17313
|
this.auth = auth;
|
|
17308
17314
|
this.toast = toast;
|
|
17309
17315
|
this.querys = querys;
|
|
17310
|
-
this.appService = appService;
|
|
17311
17316
|
this.slimLoadingBarService = slimLoadingBarService;
|
|
17312
17317
|
this.app_s = app_s;
|
|
17313
17318
|
this.url = this.app_s.API_ENDPOINT + this.app_s.QUERY_ENDPOINT;
|
|
@@ -17357,7 +17362,7 @@ class FHGuard {
|
|
|
17357
17362
|
p.sql = "SELECT_USER_ACCESS_AUTH";
|
|
17358
17363
|
p.values = [];
|
|
17359
17364
|
p.types = [];
|
|
17360
|
-
if (this.
|
|
17365
|
+
if (this.app_s.user == null) {
|
|
17361
17366
|
this.querys.doQuery(p).subscribe((/**
|
|
17362
17367
|
* @param {?} data
|
|
17363
17368
|
* @return {?}
|
|
@@ -17367,11 +17372,11 @@ class FHGuard {
|
|
|
17367
17372
|
if (data.result_msg == "OK")
|
|
17368
17373
|
if (data.result_data.length > 0) {
|
|
17369
17374
|
//console.log('canActivate 6');
|
|
17370
|
-
this.
|
|
17371
|
-
if (this.
|
|
17372
|
-
this.
|
|
17373
|
-
this.
|
|
17374
|
-
this.
|
|
17375
|
+
this.app_s.user_roles = data.result_data[0].roles;
|
|
17376
|
+
if (this.app_s.user_roles.length > 0)
|
|
17377
|
+
this.app_s.user_roles = this.app_s.user_roles.substr(1);
|
|
17378
|
+
this.app_s.user_isadmin = data.result_data[0].isadmin;
|
|
17379
|
+
this.app_s.user = data.result_data[0].username;
|
|
17375
17380
|
console.log('this.app_s.user_isadmin ', this.app_s.user_isadmin);
|
|
17376
17381
|
if (this.app_s.user_isadmin != null)
|
|
17377
17382
|
if (this.app_s.user_isadmin == "1") {
|
|
@@ -17381,9 +17386,9 @@ class FHGuard {
|
|
|
17381
17386
|
/** @type {?} */
|
|
17382
17387
|
let p = new QParam();
|
|
17383
17388
|
p.sql = "SELECT_APPS_USER_ALL";
|
|
17384
|
-
this.
|
|
17389
|
+
this.app_s.getState().app_enabled = new Array();
|
|
17385
17390
|
p.types = ['string'];
|
|
17386
|
-
p.values = [this.
|
|
17391
|
+
p.values = [this.app_s.user];
|
|
17387
17392
|
//console.log('canActivate 8');
|
|
17388
17393
|
this.querys.doQuery(p).subscribe((/**
|
|
17389
17394
|
* @param {?} data
|
|
@@ -17418,10 +17423,15 @@ class FHGuard {
|
|
|
17418
17423
|
else {
|
|
17419
17424
|
/** @type {?} */
|
|
17420
17425
|
let p = new QParam();
|
|
17426
|
+
if (this.app_s.user_isadmin != null)
|
|
17427
|
+
if (this.app_s.user_isadmin == "1") {
|
|
17428
|
+
resolve(true);
|
|
17429
|
+
return;
|
|
17430
|
+
}
|
|
17421
17431
|
p.sql = "SELECT_APPS_USER_ALL";
|
|
17422
|
-
this.
|
|
17432
|
+
this.app_s.getState().app_enabled = new Array();
|
|
17423
17433
|
p.types = ['string'];
|
|
17424
|
-
p.values = [this.
|
|
17434
|
+
p.values = [this.app_s.user];
|
|
17425
17435
|
//console.log('canActivate 8');
|
|
17426
17436
|
this.querys.doQuery(p).subscribe((/**
|
|
17427
17437
|
* @param {?} data
|
|
@@ -17466,7 +17476,6 @@ FHGuard.ctorParameters = () => [
|
|
|
17466
17476
|
{ type: Router },
|
|
17467
17477
|
{ type: ToastrService },
|
|
17468
17478
|
{ type: QueryService },
|
|
17469
|
-
{ type: AppService },
|
|
17470
17479
|
{ type: SlimLoadingBarService },
|
|
17471
17480
|
{ type: AppService }
|
|
17472
17481
|
];
|