@fluxhub/fluxhub-lib 1.0.295 → 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.
@@ -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, Pipe, Inject, PLATFORM_ID, Input, forwardRef, Output, EventEmitter, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
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';
@@ -5067,7 +5067,7 @@ var win_riassegna_select_user = /** @class */ (function () {
5067
5067
  };
5068
5068
  win_riassegna_select_user.decorators = [
5069
5069
  { type: Component, args: [{
5070
- template: "\n <mat-toolbar>{{title}}\n </mat-toolbar>\n\n <div mat-dialog-content style=\"min-width:700px\">\n\n <div style=\"height:370px;\">\n <FHPickUsers #up [users_list]=\"arrAutori\" [vis_buttons]=\"false\"></FHPickUsers>\n </div>\n <br><br><br>\n\n <mat-form-field [hidden]=\"commento_hidden\" >\n <textarea matInput placeholder=\"Commento {{nota_commento}}\" [(ngModel)]=\"nota\"\n rows=\"6\"></textarea>\n\n </mat-form-field>\n\n \n\n </div>\n <br>\n <div style=\"width:100%;text-align:center;\">\n <button mat-raised-button color=\"primary\" (click)=\"ok()\"> OK</button>&nbsp;&nbsp;&nbsp;\n <button mat-raised-button color=\"warn\" (click)=\"annulla()\">ANNULLA</button>\n </div>\n\n "
5070
+ template: "\n <mat-toolbar>{{title}}\n </mat-toolbar>\n\n <div mat-dialog-content style=\"min-width:700px\" fxLayout=\"column\">\n\n <div style=\"min-width:370px;\">\n <FHPickUsers #up [users_list]=\"arrAutori\" [vis_buttons]=\"false\"></FHPickUsers>\n </div>\n <br><br><br>\n <br><br>\n <mat-form-field [hidden]=\"commento_hidden\" >\n <textarea matInput placeholder=\"Commento {{nota_commento}}\" [(ngModel)]=\"nota\"\n rows=\"6\"></textarea>\n\n </mat-form-field>\n\n \n\n </div>\n <br>\n <div style=\"width:100%;text-align:center;\">\n <button mat-raised-button color=\"primary\" (click)=\"ok()\"> OK</button>&nbsp;&nbsp;&nbsp;\n <button mat-raised-button color=\"warn\" (click)=\"annulla()\">ANNULLA</button>\n </div>\n\n "
5071
5071
  }] }
5072
5072
  ];
5073
5073
  /** @nocollapse */
@@ -15682,7 +15682,7 @@ var dati_aggiuntivi = /** @class */ (function () {
15682
15682
  function () {
15683
15683
  var _this = this;
15684
15684
  /** @type {?} */
15685
- var dialogRef = this.m_dialog.open(win_log, { 'disableClose': true });
15685
+ var dialogRef = this.m_dialog.open(win_log, { 'disableClose': true, width: "90%" });
15686
15686
  dialogRef.componentInstance.subject = this.app_info.descrizione_breve + ", <OP>: " + this.m_obj.codice + " " + this.getTitle();
15687
15687
  dialogRef.componentInstance.lettori = this.m_obj.lettori;
15688
15688
  dialogRef.componentInstance.link = this.app_s.COMPANY_SITE_ROOT + '#/' + this.app_info.modulo_swf + '/' + this.id_applicativo + "/" + this.id_documento + "/edit";
@@ -15706,7 +15706,7 @@ var dati_aggiuntivi = /** @class */ (function () {
15706
15706
  function () {
15707
15707
  var _this = this;
15708
15708
  /** @type {?} */
15709
- var dialogRef = this.m_dialog.open(win_commenti, { 'disableClose': true });
15709
+ var dialogRef = this.m_dialog.open(win_commenti, { 'disableClose': true, width: "90%" });
15710
15710
  dialogRef.componentInstance.subject = this.app_info.descrizione_breve + ", <OP>: " + this.m_obj.codice + " " + this.getTitle();
15711
15711
  dialogRef.componentInstance.lettori = this.m_obj.lettori;
15712
15712
  dialogRef.componentInstance.link = this.app_s.COMPANY_SITE_ROOT + '#/' + this.app_info.modulo_swf + '/' + this.id_applicativo + "/" + this.id_documento + "/edit";
@@ -15730,7 +15730,7 @@ var dati_aggiuntivi = /** @class */ (function () {
15730
15730
  function () {
15731
15731
  var _this = this;
15732
15732
  /** @type {?} */
15733
- var dialogRef = this.m_dialog.open(win_uploads, { 'disableClose': true });
15733
+ var dialogRef = this.m_dialog.open(win_uploads, { 'disableClose': true, width: "90%" });
15734
15734
  dialogRef.afterClosed().subscribe((/**
15735
15735
  * @param {?} result
15736
15736
  * @return {?}
@@ -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, appService, slimLoadingBarService, app_s) {
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.appService.user == null) {
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.appService.user_roles = data.result_data[0].roles;
18091
- if (_this.appService.user_roles.length > 0)
18092
- _this.appService.user_roles = _this.appService.user_roles.substr(1);
18093
- _this.appService.user_isadmin = data.result_data[0].isadmin;
18094
- _this.appService.user = data.result_data[0].username;
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.appService.getState().app_enabled = new Array();
18108
+ _this.app_s.getState().app_enabled = new Array();
18105
18109
  p_1.types = ['string'];
18106
- p_1.values = [_this.appService.user];
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.appService.getState().app_enabled = new Array();
18151
+ _this.app_s.getState().app_enabled = new Array();
18143
18152
  p_2.types = ['string'];
18144
- p_2.values = [_this.appService.user];
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
@@ -18160,7 +18169,7 @@ var FHGuard = /** @class */ (function () {
18160
18169
  }
18161
18170
  }
18162
18171
  //console.log('canActivate 11');
18163
- _this.toast.error("ACCESS DENIED [0X0001]");
18172
+ _this.toast.error("ACCESS DENIED [0X0005]");
18164
18173
  resolve(false);
18165
18174
  _this.slimLoadingBarService.complete();
18166
18175
  return;
@@ -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
  ]; };