@fluxhub/fluxhub-lib 1.0.597 → 1.0.599

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.
@@ -2781,881 +2781,477 @@ WinWait.propDecorators = {
2781
2781
  * @fileoverview added by tsickle
2782
2782
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2783
2783
  */
2784
- class FHUploadComponent {
2784
+ class FHComboboxComponent {
2785
2785
  /**
2786
2786
  * @param {?} _dataService
2787
- * @param {?} toastr
2788
- * @param {?} dialog
2789
- * @param {?} app_s
2787
+ * @param {?} _dataService_odbc
2790
2788
  */
2791
- constructor(_dataService, toastr, dialog, app_s) {
2789
+ constructor(_dataService, _dataService_odbc) {
2792
2790
  this._dataService = _dataService;
2793
- this.toastr = toastr;
2794
- this.dialog = dialog;
2795
- this.app_s = app_s;
2796
- this.show_descri = true;
2791
+ this._dataService_odbc = _dataService_odbc;
2792
+ this.init_fill = true;
2793
+ this.sql = "";
2794
+ this.types = [];
2795
+ this.values = [];
2796
+ this.hidden = false;
2797
+ this.label = "";
2797
2798
  this.enabled = true;
2798
- this.single = true;
2799
- this.descri_obb = false;
2800
- this.programma_da_eseguire = '';
2801
- this.label_attendere = 'ATTENDERE UPLOAD IN CORSO';
2802
- this.fixed_label = ' (INSERISCI QUI LA DESCRIZIONE PRIMA DI CARICARE IL FILE)';
2803
- this.limit_string = 'Il file di <size>MB supera il limite di 500MB';
2804
- this.allegato_inserito = 'ALLEGATO INSERITO';
2805
- this.inserire_descrizione = 'Descrizione Obbligatoria';
2806
- this.lista_allegati = [];
2807
- this.change = new EventEmitter();
2808
- this.upload_ended = new EventEmitter();
2809
- this.allow_delete = false;
2810
- this.loading = false;
2811
- this.App = '';
2812
- this.K = '';
2813
- this.label_b = "";
2814
- this.descrizione = '';
2815
- this.file_name = '';
2816
- this.label = '';
2817
- this.username = '';
2818
- this.b_edit_loaded = false;
2819
- this.tipo = '';
2820
- this.b_ini = false;
2821
- this.uploader = new FileUploader({
2822
- url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
2823
- 'maxFileSize': 500 * 1024 * 1024
2824
- });
2825
- this.id = null;
2826
- this.username = this.app_s.user;
2827
- this.uploader.onBeforeUploadItem = (/**
2828
- * @param {?} item
2829
- * @return {?}
2830
- */
2831
- (item) => {
2832
- item.withCredentials = false;
2833
- });
2834
- this.uploader.onCompleteItem = (/**
2835
- * @param {?} item
2836
- * @param {?} response
2837
- * @param {?} status
2838
- * @param {?} header
2839
- * @return {?}
2840
- */
2841
- (item, response, status, header) => {
2842
- if (status === 200) {
2843
- this.descrizione = "";
2844
- this.toastr.info("INFO", this.allegato_inserito, {
2845
- timeOut: 1000,
2846
- progressBar: true
2847
- });
2848
- this.ref_allegato();
2849
- this.change.emit({ item: item, response: response, status: status, header: header });
2850
- }
2851
- });
2799
+ this.required = false;
2800
+ this.sel_label = "";
2801
+ this.fillend = new EventEmitter();
2802
+ this.selchange = new EventEmitter();
2803
+ this.initend = new EventEmitter();
2804
+ this.myData = [];
2805
+ this.valDef = "-1";
2806
+ this.selval = "-1";
2807
+ this.errorMsg = "";
2808
+ this.db_type = "1";
2809
+ this.dis_value = '';
2810
+ this.descri_val = "";
2852
2811
  }
2853
2812
  /**
2813
+ * @private
2854
2814
  * @return {?}
2855
2815
  */
2856
- del_doc() {
2857
- localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
2858
- localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
2859
- /** @type {?} */
2860
- let dialogRef = this
2861
- .dialog
2862
- .open(FHConfirmComponent);
2863
- dialogRef
2864
- .afterClosed()
2865
- .subscribe((/**
2866
- * @param {?} result
2867
- * @return {?}
2868
- */
2869
- result => {
2870
- if (result) {
2871
- /** @type {?} */
2872
- let p = new QParam();
2873
- p.sql = "DELETE_ALLEGATO";
2874
- p.types = ['int', 'string'];
2875
- p.values = [this.id, this.app_s.user];
2876
- this
2877
- ._dataService
2878
- .doQuery(p)
2879
- .subscribe((/**
2880
- * @param {?} data
2881
- * @return {?}
2882
- */
2883
- data => {
2884
- if (data != null)
2885
- if (data.result_msg == "OK") {
2886
- // this.arr_g = data.result_data;
2887
- this.ref_allegato();
2888
- this
2889
- .toastr
2890
- .info("INFO", "ALLEGATO ELIMINATO", {
2891
- timeOut: 1000,
2892
- progressBar: true
2893
- });
2894
- }
2895
- }), (/**
2896
- * @param {?} err
2897
- * @return {?}
2898
- */
2899
- err => {
2900
- }));
2901
- }
2902
- }));
2816
+ update_dis() {
2817
+ this.dis_value = '';
2818
+ try {
2819
+ if (this.descri_val != null)
2820
+ if (this.descri_val != "") {
2821
+ this.dis_value = this.descri_val;
2822
+ return;
2823
+ }
2824
+ if (this.valDef == null)
2825
+ this.dis_value = '';
2826
+ else
2827
+ this.dis_value = this.valDef.split('-1').join('');
2828
+ }
2829
+ catch (e) {
2830
+ console.log('errore split -> this.valDef ', this.valDef);
2831
+ }
2903
2832
  }
2904
2833
  /**
2905
2834
  * @return {?}
2906
2835
  */
2907
- ngOnInit() {
2908
- /** @type {?} */
2909
- let uo = {};
2910
- uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
2911
- this.uploader.setOptions(uo);
2912
- this.uploader.onCompleteAll = (/**
2913
- * @return {?}
2914
- */
2915
- () => {
2916
- this.loading = false;
2917
- this.upload_ended.emit();
2918
- if (this.dialogRef != null)
2919
- if (this.dialogRef.componentInstance != null) {
2920
- this.dialogRef.componentInstance.update_progess(100);
2921
- this.dialogRef = null;
2922
- }
2923
- });
2924
- this.uploader.onErrorItem = (/**
2925
- * @param {?} a
2926
- * @param {?} b
2927
- * @param {?} c
2928
- * @param {?} d
2929
- * @return {?}
2930
- */
2931
- (a, b, c, d) => {
2932
- this.toastr.error(b);
2933
- });
2934
- this.uploader.onAfterAddingFile = (/**
2935
- * @param {?} fileItem
2936
- * @return {?}
2937
- */
2938
- (fileItem) => {
2939
- this.ch(fileItem);
2940
- });
2941
- this.uploader.onProgressItem = (/**
2942
- * @param {?} fileItem
2943
- * @param {?} progress
2944
- * @return {?}
2945
- */
2946
- (fileItem, progress) => {
2947
- // console.log(fileItem);
2948
- // console.log(progress);
2949
- this.loading = true;
2950
- if (this.dialogRef != null)
2951
- if (this.dialogRef.componentInstance != null)
2952
- this.dialogRef.componentInstance.update_progess(progress);
2953
- });
2954
- this.uploader.onWhenAddingFileFailed = (/**
2955
- * @param {?} item
2956
- * @param {?} filter
2957
- * @param {?} options
2958
- * @return {?}
2959
- */
2960
- (item, filter, options) => {
2961
- switch (filter.name) {
2962
- case 'fileSize':
2963
- /** @type {?} */
2964
- let ar = Math.round(item.size / 1024 / 1024);
2965
- this.toastr.error(this.limit_string.split('<size>').join('' + ar));
2966
- break;
2967
- default:
2968
- this.toastr.error("Errore: " + filter.name);
2969
- }
2970
- });
2836
+ resetValue() {
2837
+ this.selval = '-1';
2838
+ this.valDef = '-1';
2839
+ this.update_dis();
2971
2840
  }
2972
2841
  /**
2973
2842
  * @return {?}
2974
2843
  */
2975
- download_all() {
2976
- window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + this.App + '/' + this.K + '/' + this.file_name);
2844
+ focus() {
2845
+ this.smtr.nativeElement.focus();
2977
2846
  }
2978
2847
  /**
2979
- * @param {?} fileItem
2980
2848
  * @return {?}
2981
2849
  */
2982
- ch(fileItem) {
2983
- if (this.descri_obb && this.descrizione == '') {
2984
- this.toastr.error(this.inserire_descrizione);
2850
+ reset() {
2851
+ console.log('reset');
2852
+ this.selval = '-1';
2853
+ this.valDef = '-1';
2854
+ this.myData = new Array();
2855
+ this.update_dis();
2856
+ }
2857
+ /**
2858
+ * @return {?}
2859
+ */
2860
+ fillCombo() {
2861
+ // console.log(this.init_fill);
2862
+ // if(!this.init_fill){this.init_fill=true;return;}
2863
+ console.log("fillcombo " + this.sql);
2864
+ if (this.sql.indexOf('|') != -1 && this.sql.indexOf('$') != -1) {
2865
+ this.set_options(this.sql);
2985
2866
  return;
2986
2867
  }
2987
- for (let i = 0; i < this.lista_allegati.length; i++) {
2988
- if (this.lista_allegati[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
2989
- this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
2990
- return;
2991
- }
2992
- }
2993
- this.uploader.onBuildItemForm = (/**
2994
- * @param {?} item
2995
- * @param {?} form
2996
- * @return {?}
2997
- */
2998
- (item, form) => {
2999
- form.append('App', this.App);
3000
- form.append('K', this.K);
3001
- form.append('descrizione', this.descrizione);
3002
- form.append('single', this.single);
3003
- form.append('username', this.username);
3004
- form.append('tipo', this.tipo);
3005
- form.append('local_path', this.app_s.LOCAL_PATH);
3006
- if (this.programma_da_eseguire != '')
3007
- form.append('p1', this.programma_da_eseguire);
3008
- });
3009
- if (this.dialogRef == null) {
3010
- this.dialogRef = this.dialog.open(WinWait, { 'disableClose': true });
3011
- this.dialogRef.componentInstance.label = this.label_attendere;
3012
- this.dialogRef.afterClosed().subscribe((/**
3013
- * @param {?} result
2868
+ /** @type {?} */
2869
+ let p = new QParam();
2870
+ p.sql = this.sql;
2871
+ p.types = this.types;
2872
+ p.values = this.values;
2873
+ // console.log(p);
2874
+ if (this.db_type == "1")
2875
+ this
2876
+ ._dataService
2877
+ .doQuery(p)
2878
+ .subscribe((/**
2879
+ * @param {?} data
3014
2880
  * @return {?}
3015
2881
  */
3016
- result => {
2882
+ data => {
2883
+ if (data != null)
2884
+ if (data.result_msg == "OK") {
2885
+ this.resetD(data.result_data);
2886
+ }
2887
+ }), (/**
2888
+ * @param {?} err
2889
+ * @return {?}
2890
+ */
2891
+ err => {
2892
+ this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + this.sql + "]";
2893
+ }));
2894
+ if (this.db_type == "2")
2895
+ this
2896
+ ._dataService_odbc
2897
+ .doQuery(p)
2898
+ .subscribe((/**
2899
+ * @param {?} data
2900
+ * @return {?}
2901
+ */
2902
+ data => {
2903
+ if (data != null)
2904
+ if (data.result_msg == "OK") {
2905
+ for (let i = 0; i < data.result_data.length; i++) {
2906
+ if (data.result_data[i].VALORE != null)
2907
+ data.result_data[i].valore = data.result_data[i].VALORE;
2908
+ if (data.result_data[i].DESCRIZIONE_VALORE != null)
2909
+ data.result_data[i].descrizione_valore = data.result_data[i].DESCRIZIONE_VALORE;
2910
+ }
2911
+ this.resetD(data.result_data);
2912
+ }
2913
+ }), (/**
2914
+ * @param {?} err
2915
+ * @return {?}
2916
+ */
2917
+ err => {
2918
+ this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + this.sql + "]";
3017
2919
  }));
3018
- }
3019
- this.uploader.uploadAll();
3020
2920
  }
3021
2921
  /**
3022
- * @param {?} p_app
3023
- * @param {?} p_k
3024
- * @param {?} p_label
3025
- * @param {?=} p_tipo
3026
- * @param {?=} programma_da_eseguire
3027
- * @param {?=} allow_delete
2922
+ * @param {?} o
3028
2923
  * @return {?}
3029
2924
  */
3030
- init(p_app, p_k, p_label, p_tipo = "", programma_da_eseguire = "", allow_delete = false) {
3031
- this.App = p_app;
3032
- this.K = p_k;
3033
- this.label = p_label;
3034
- this.tipo = p_tipo;
3035
- this.b_ini = true;
3036
- this.b_edit_loaded = false;
3037
- this.descrizione = "";
3038
- this.programma_da_eseguire = programma_da_eseguire;
3039
- this.allow_delete = allow_delete;
3040
- this.ref_allegato();
2925
+ add_option(o) {
2926
+ this.myData.push(o);
3041
2927
  }
3042
2928
  /**
2929
+ * @param {?} o
3043
2930
  * @return {?}
3044
2931
  */
3045
- ref_allegato() {
3046
- this.id = null;
3047
- this.descrizione = '';
3048
- this.file_name = '';
3049
- this.label_b = '';
3050
- if (!this.single)
3051
- return;
3052
- if (this.App == null)
3053
- return;
3054
- if (this.App == "")
3055
- return;
3056
- /** @type {?} */
3057
- let p = new QParam();
3058
- p.sql = "SELECT_ALLEGATO_INFO";
3059
- p.types = ['string', 'string'];
3060
- p.values = [this.App, this.K];
3061
- this._dataService.doQuery(p).subscribe((/**
3062
- * @param {?} data
3063
- * @return {?}
3064
- */
3065
- data => {
3066
- if (data != null)
3067
- if (data.result_msg == "OK") {
3068
- /** @type {?} */
3069
- let a = data.result_data;
3070
- if (a.length > 0) {
3071
- this.id = a[0].id;
3072
- this.descrizione = a[0].descrizione;
3073
- this.file_name = a[0].Filename;
3074
- this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
3075
- this.b_edit_loaded = true;
3076
- }
3077
- }
3078
- }));
2932
+ resetD(o) {
2933
+ this.myData = o;
2934
+ this.selval = '-1';
2935
+ // console.log(this.smtr); console.log(this.smtr.nativeElement);
2936
+ this.setByValue(this.valDef);
2937
+ if (this.getValue() == "-1" && this.valDef != "-1")
2938
+ this.setByDescri(this.valDef);
2939
+ this.fillend.emit();
3079
2940
  }
3080
- }
3081
- FHUploadComponent.decorators = [
3082
- { type: Component, args: [{
3083
- selector: 'FHUpload',
3084
- template: `
3085
-
3086
- <div *ngIf="loading" fxLayout="row">
3087
- WAIT
3088
- </div>
3089
- <div *ngIf="enabled && !loading" fxLayout="row" fxLayoutAlign="start center">
3090
- <mat-form-field [hidden]="!show_descri" class="field_style" appearance="outline" floatLabel="always"><mat-label>{{label}} {{fixed_label}}</mat-label>
3091
- <input matInput type="text" name="descrizione" [(ngModel)]="descrizione"
3092
- >
3093
- </mat-form-field>
3094
- &nbsp;&nbsp;&nbsp;&nbsp;
3095
- <div style="width:140px" fxLayout="row" fxLayoutAlign="start start">
3096
- <input type="file" multiple ng2FileSelect [uploader]="uploader" name="file-fh{{App}}" id="file-fh{{App}}" class="inputfile inputfile-fh" />
3097
- <label for="file-fh{{App}}" style="width:210px"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg><span style="font-size: 12px">&nbsp;&nbsp;&nbsp;Upload</span></label>
3098
- </div>
3099
- <div fxLayout="row" fxLayoutAlign="start start">
3100
- <button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px">{{label_b}}</button>&nbsp;&nbsp;&nbsp;
3101
- <button mat-flat-button *ngIf="id!=null && allow_delete" (click)="del_doc()" color="warn">
3102
- <mat-icon>delete</mat-icon>
3103
- </button>
3104
- </div>
3105
- </div>
3106
- <div *ngIf="!enabled" fxLayout="row">
3107
- <label>{{label}}:</label>{{descrizione}}
3108
- <button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px;background-color: #F5F5F5">{{label_b}}</button>
3109
-
3110
- </div>
3111
- <div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
3112
- `,
3113
- styles: [`
3114
-
3115
- `]
3116
- }] }
3117
- ];
3118
- /** @nocollapse */
3119
- FHUploadComponent.ctorParameters = () => [
3120
- { type: QueryService },
3121
- { type: ToastrService },
3122
- { type: MatDialog },
3123
- { type: AppService }
3124
- ];
3125
- FHUploadComponent.propDecorators = {
3126
- show_descri: [{ type: Input }],
3127
- enabled: [{ type: Input }],
3128
- single: [{ type: Input }],
3129
- descri_obb: [{ type: Input }],
3130
- programma_da_eseguire: [{ type: Input }],
3131
- label_attendere: [{ type: Input }],
3132
- fixed_label: [{ type: Input }],
3133
- limit_string: [{ type: Input }],
3134
- allegato_inserito: [{ type: Input }],
3135
- inserire_descrizione: [{ type: Input }],
3136
- lista_allegati: [{ type: Input }],
3137
- change: [{ type: Output }],
3138
- upload_ended: [{ type: Output }]
3139
- };
3140
-
3141
- /**
3142
- * @fileoverview added by tsickle
3143
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3144
- */
3145
- class AuthenticationService {
3146
2941
  /**
3147
- * @param {?} _dataService
3148
- * @param {?} toastr
3149
- * @param {?} http
3150
- * @param {?} router
3151
- * @param {?} route
3152
- * @param {?} _fileService
3153
- * @param {?} app_s
3154
- * @param {?} uti_s
2942
+ * @param {?} desc_val
2943
+ * @return {?}
3155
2944
  */
3156
- constructor(_dataService, toastr, http, router, route, _fileService, app_s, uti_s) {
3157
- this._dataService = _dataService;
3158
- this.toastr = toastr;
3159
- this.http = http;
3160
- this.router = router;
3161
- this.route = route;
3162
- this._fileService = _fileService;
3163
- this.app_s = app_s;
3164
- this.uti_s = uti_s;
3165
- this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3166
- this.goto_after = "";
3167
- this.username = '';
3168
- this.headers = new HttpHeaders({
3169
- 'Content-Type': 'application/json',
3170
- });
2945
+ setByDescri(desc_val) {
2946
+ // console.log("setByDescri "+desc_val);
2947
+ this.valDef = desc_val;
2948
+ this.selval = '-1';
2949
+ if (desc_val == "")
2950
+ return;
2951
+ if (this.myData == null)
2952
+ return;
2953
+ if (this.myData.length == 0 || this.myData[0] == null)
2954
+ return;
2955
+ for (let j = 0; j < this.myData.length; j++)
2956
+ if (this.myData[j].descrizione_valore == desc_val) {
2957
+ this.selval = "" + this.myData[j].valore;
2958
+ if (this.myData[j].descrizione_valore != null)
2959
+ this.descri_val = this.myData[j].descrizione_valore;
2960
+ this.update_dis();
2961
+ return;
2962
+ }
2963
+ this.update_dis();
3171
2964
  }
3172
2965
  /**
2966
+ * @param {?} ind
3173
2967
  * @return {?}
3174
2968
  */
3175
- logout() {
3176
- this.app_s.user = null;
3177
- this.app_s.user_name = null;
3178
- this.app_s.user_surname = null;
3179
- this.app_s.user_idp = null;
3180
- this.app_s.user_email = null;
3181
- this.app_s.user_roles = null;
3182
- this.app_s.user_lang = null;
3183
- this.app_s.user_isadmin = null;
3184
- this.app_s.token = null;
3185
- localStorage.removeItem(this.app_s.COMPANY_KEY + "token");
3186
- if (this.app_s.LOGIN_EXT != 1)
3187
- this.router.navigate(['login']);
3188
- else {
3189
- window.location.href = (this.app_s.LOGOUT_URL_EXT);
2969
+ setByIndex(ind) {
2970
+ this.valDef = "";
2971
+ this.selval = '-1';
2972
+ if (this.myData == null)
2973
+ return;
2974
+ if (this.myData.length == 0 || this.myData[0] == null)
2975
+ return;
2976
+ if (this.myData.length > ind) {
2977
+ this.setByDescri(this.myData[ind].descrizione_valore);
3190
2978
  }
3191
2979
  }
3192
2980
  /**
3193
- * @param {?} username
3194
- * @param {?} password
3195
- * @param {?=} displayError
3196
2981
  * @return {?}
3197
2982
  */
3198
- login(username, password, displayError = true) {
3199
- this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3200
- /** @type {?} */
3201
- let post_v = JSON.stringify({ username: username, password: password });
3202
- if (this.app_s.LDAP_AUTH == 1)
3203
- post_v = JSON.stringify({ username: username, password: password, ldap_auth: 1 });
3204
- return this.http.post(this.url, post_v, {
3205
- headers: this.headers
3206
- }).pipe(map((/**
3207
- * @param {?} res
3208
- * @return {?}
3209
- */
3210
- (res) => {
3211
- // Handle errors, display if enabled
3212
- /** @type {?} */
3213
- let err;
3214
- if (!res) {
3215
- err = new Error('Empty server response');
3216
- }
3217
- else if (res.result_msg === 'KO') {
3218
- err = new Error(res.msg);
3219
- }
3220
- else {
3221
- if (res.result_data.length > 0) {
3222
- localStorage.setItem(this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
3223
- }
3224
- }
3225
- if (err) {
3226
- console.error(err);
3227
- if (displayError) {
3228
- this.toastr.error(err.message);
2983
+ getObj() {
2984
+ if (this.selval == null)
2985
+ return null;
2986
+ if (this.selval == "-1")
2987
+ return null;
2988
+ else
2989
+ for (let j = 0; j < this.myData.length; j++)
2990
+ if (this.myData[j].valore == this.selval) {
2991
+ return this.myData[j];
3229
2992
  }
3230
- throw new Error(err);
3231
- }
3232
- return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3233
- })), catchError((/**
3234
- * @param {?} err
3235
- * @return {?}
3236
- */
3237
- (err) => {
3238
- // In a real world app, we might use a remote logging infrastructure
3239
- // We'd also dig deeper into the error to get a better message
3240
- /** @type {?} */
3241
- let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3242
- console.error(errMsg); // log to console instead
3243
- throw err;
3244
- })));
3245
2993
  }
3246
2994
  /**
3247
- * @param {?} username
3248
- * @param {?=} displayError
2995
+ * @param {?} desc_val
3249
2996
  * @return {?}
3250
2997
  */
3251
- get_user_info(username, displayError = true) {
3252
- this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3253
- /** @type {?} */
3254
- let post_v = JSON.stringify({ username_info: username });
3255
- return this.http.post(this.url, post_v, {
3256
- headers: this.headers
3257
- }).pipe(map((/**
3258
- * @param {?} res
3259
- * @return {?}
3260
- */
3261
- (res) => {
3262
- // Handle errors, display if enabled
3263
- /** @type {?} */
3264
- let err;
3265
- if (!res) {
3266
- err = new Error('Empty server response');
3267
- }
3268
- else if (res.result_msg === 'KO') {
3269
- err = new Error(res.msg);
3270
- }
3271
- if (err) {
3272
- console.error(err);
3273
- if (displayError) {
3274
- this.toastr.error(err.message);
3275
- }
3276
- throw new Error(err);
2998
+ setByValue(desc_val) {
2999
+ this.valDef = desc_val;
3000
+ this.selval = '-1';
3001
+ // console.log(this.myData);
3002
+ if ("" + desc_val == "") {
3003
+ // console.log('qqq1111');
3004
+ return;
3005
+ }
3006
+ // console.log("qui");
3007
+ if (this.myData == null)
3008
+ return;
3009
+ // console.log("qui1");
3010
+ if (this.myData.length == 0 || this.myData[0] == null)
3011
+ return;
3012
+ //console.log("qui2");
3013
+ for (let j = 0; j < this.myData.length; j++) {
3014
+ //console.log(this.myData[j].valore +' '+ desc_val);
3015
+ if (this.myData[j].valore == desc_val) {
3016
+ this.selval = "" + this.myData[j].valore;
3017
+ if (this.myData[j].descrizione_valore != null)
3018
+ this.descri_val = this.myData[j].descrizione_valore;
3019
+ this.update_dis();
3020
+ return;
3277
3021
  }
3278
- return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3279
- })), catchError((/**
3280
- * @param {?} err
3281
- * @return {?}
3282
- */
3283
- (err) => {
3284
- // In a real world app, we might use a remote logging infrastructure
3285
- // We'd also dig deeper into the error to get a better message
3286
- /** @type {?} */
3287
- let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3288
- console.error(errMsg); // log to console instead
3289
- throw err;
3290
- })));
3022
+ }
3023
+ this.update_dis();
3291
3024
  }
3292
3025
  /**
3293
- * @param {?} email
3294
- * @param {?=} displayError
3295
3026
  * @return {?}
3296
3027
  */
3297
- passrecovery(email, displayError = true) {
3298
- /** @type {?} */
3299
- let post_v = JSON.stringify({ email: email, websiteroot: this.app_s.COMPANY_SITE_ROOT, op: 'send_email' });
3300
- return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3301
- headers: this.headers
3302
- }).pipe(map((/**
3303
- * @param {?} res
3304
- * @return {?}
3305
- */
3306
- (res) => {
3307
- // Handle errors, display if enabled
3308
- /** @type {?} */
3309
- let err;
3310
- if (!res) {
3311
- err = new Error('Empty server response');
3312
- }
3313
- else if (res.result_msg === 'KO') {
3314
- err = new Error(res.msg);
3315
- }
3316
- if (err) {
3317
- console.error(err);
3318
- if (displayError) {
3319
- this.toastr.error(err.message);
3028
+ getDescri() {
3029
+ if (!this.enabled) {
3030
+ if (this.selval == null)
3031
+ return this.valDef;
3032
+ if (this.selval == "-1")
3033
+ return this.valDef;
3034
+ }
3035
+ if (this.selval == null)
3036
+ return "-1";
3037
+ if (this.selval == "-1")
3038
+ return "-1";
3039
+ else
3040
+ for (let j = 0; j < this.myData.length; j++)
3041
+ if (this.myData[j].valore == this.selval) {
3042
+ return this.myData[j].descrizione_valore;
3320
3043
  }
3321
- throw new Error(err);
3322
- }
3323
- return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3324
- })), catchError((/**
3325
- * @param {?} err
3326
- * @return {?}
3327
- */
3328
- (err) => {
3329
- // In a real world app, we might use a remote logging infrastructure
3330
- // We'd also dig deeper into the error to get a better message
3331
- /** @type {?} */
3332
- let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3333
- console.error(errMsg); // log to console instead
3334
- throw err;
3335
- })));
3336
3044
  }
3337
3045
  /**
3338
- * @param {?} res_rep
3339
- * @param {?=} displayError
3340
3046
  * @return {?}
3341
3047
  */
3342
- checktoken(res_rep, displayError = true) {
3343
- /** @type {?} */
3344
- let post_v = JSON.stringify({ res_rep: res_rep, op: 'check_token' });
3345
- return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3346
- headers: this.headers
3347
- }).pipe(map((/**
3348
- * @param {?} res
3349
- * @return {?}
3350
- */
3351
- (res) => {
3352
- // Handle errors, display if enabled
3353
- /** @type {?} */
3354
- let err;
3355
- if (!res) {
3356
- err = new Error('Empty server response');
3357
- }
3358
- else if (res.result_msg === 'KO') {
3359
- err = new Error(res.msg);
3048
+ getValue() {
3049
+ // console.log(this.selval);
3050
+ if (!this.enabled) {
3051
+ if (this.selval == null)
3052
+ return this.valDef;
3053
+ if (this.selval == "-1")
3054
+ return this.valDef;
3055
+ }
3056
+ if (this.selval == null)
3057
+ return "-1";
3058
+ if (this.selval == "")
3059
+ return "-1";
3060
+ else
3061
+ return this.selval;
3062
+ }
3063
+ /**
3064
+ * @param {?} campo
3065
+ * @return {?}
3066
+ */
3067
+ getData(campo) {
3068
+ for (var x in this.myData) {
3069
+ if (this.myData[x]['valore'] == this.selval) {
3070
+ return (this.myData[x][campo]);
3360
3071
  }
3361
- if (err) {
3362
- console.error(err);
3363
- if (displayError) {
3364
- this.toastr.error(err.message);
3365
- }
3366
- throw new Error(err);
3072
+ else {
3073
+ continue;
3367
3074
  }
3368
- return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3369
- })), catchError((/**
3370
- * @param {?} err
3371
- * @return {?}
3372
- */
3373
- (err) => {
3374
- // In a real world app, we might use a remote logging infrastructure
3375
- // We'd also dig deeper into the error to get a better message
3376
- /** @type {?} */
3377
- let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3378
- console.error(errMsg); // log to console instead
3379
- throw err;
3380
- })));
3075
+ }
3381
3076
  }
3382
3077
  /**
3383
- * @param {?} token
3384
- * @param {?} password
3385
- * @param {?=} displayError
3078
+ * @param {?} s
3386
3079
  * @return {?}
3387
3080
  */
3388
- change_password(token, password, displayError = true) {
3081
+ set_options(s) {
3082
+ this.myData = new Array();
3389
3083
  /** @type {?} */
3390
- let post_v = JSON.stringify({ token: token, password: password, op: 'change_password' });
3391
- return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3392
- headers: this.headers
3393
- }).pipe(map((/**
3394
- * @param {?} res
3395
- * @return {?}
3396
- */
3397
- (res) => {
3398
- // Handle errors, display if enabled
3084
+ let a = s.split('$');
3085
+ for (let i = 0; i < a.length; i++) {
3399
3086
  /** @type {?} */
3400
- let err;
3401
- if (!res) {
3402
- err = new Error('Empty server response');
3403
- }
3404
- else if (res.result_msg === 'KO') {
3405
- err = new Error(res.msg);
3406
- }
3407
- if (err) {
3408
- console.error(err);
3409
- if (displayError) {
3410
- this.toastr.error(err.message);
3411
- }
3412
- throw new Error(err);
3413
- }
3414
- return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3415
- })), catchError((/**
3416
- * @param {?} err
3417
- * @return {?}
3418
- */
3419
- (err) => {
3420
- // In a real world app, we might use a remote logging infrastructure
3421
- // We'd also dig deeper into the error to get a better message
3087
+ var o = new Object();
3422
3088
  /** @type {?} */
3423
- let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3424
- console.error(errMsg); // log to console instead
3425
- throw err;
3426
- })));
3427
- }
3428
- /**
3429
- * @return {?}
3430
- */
3431
- checkCredentials_toLogin() {
3432
- if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
3433
- this.goto_after = window.location.toString();
3434
- if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
3435
- if (this.router.url.indexOf('/rp/') == -1)
3436
- this.router.navigate(['login']);
3437
- return false;
3089
+ var av = a[i].split('|');
3090
+ o.valore = av[1];
3091
+ o.descrizione_valore = av[0];
3092
+ this
3093
+ .myData
3094
+ .push(o);
3438
3095
  }
3439
- return true;
3096
+ this.setByValue(this.valDef);
3097
+ if (this.getValue() == "-1")
3098
+ this.setByDescri(this.valDef);
3440
3099
  }
3441
3100
  /**
3442
3101
  * @return {?}
3443
3102
  */
3444
- checkCredentials() {
3445
- if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
3446
- this.goto_after = window.location.toString();
3447
- if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
3448
- return false;
3449
- }
3450
- return true;
3451
- }
3452
- }
3453
- AuthenticationService.decorators = [
3454
- { type: Injectable, args: [{
3455
- providedIn: 'root',
3456
- },] }
3457
- ];
3458
- /** @nocollapse */
3459
- AuthenticationService.ctorParameters = () => [
3460
- { type: QueryService },
3461
- { type: ToastrService },
3462
- { type: HttpClient },
3463
- { type: Router },
3464
- { type: ActivatedRoute },
3465
- { type: FileService },
3466
- { type: AppService },
3467
- { type: UtilityService }
3468
- ];
3469
- /** @nocollapse */ AuthenticationService.ngInjectableDef = defineInjectable({ factory: function AuthenticationService_Factory() { return new AuthenticationService(inject(QueryService), inject(ToastrService), inject(HttpClient), inject(Router), inject(ActivatedRoute), inject(FileService), inject(AppService), inject(UtilityService)); }, token: AuthenticationService, providedIn: "root" });
3470
-
3471
- /**
3472
- * @fileoverview added by tsickle
3473
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3474
- */
3475
- class WinAskTextBigComponent {
3476
- /**
3477
- * @param {?} dialogRef
3478
- * @param {?} toastr
3479
- */
3480
- constructor(dialogRef, toastr) {
3481
- this.dialogRef = dialogRef;
3482
- this.toastr = toastr;
3483
- this.title = "";
3484
- this.label = "";
3485
- this.valore = "";
3486
- this.readonly = false;
3487
- this.show_annulla = true;
3488
- this.show_ok = true;
3489
- this.min_chars = 3;
3103
+ ngAfterViewInit() {
3104
+ // console.log("ngAfterViewInit"); console.log(this.init_fill);
3490
3105
  }
3491
3106
  /**
3492
3107
  * @return {?}
3493
3108
  */
3494
3109
  ngOnInit() {
3495
- }
3496
- /**
3497
- * @return {?}
3498
- */
3499
- show() {
3500
- }
3501
- /**
3502
- * @return {?}
3503
- */
3504
- hide() {
3505
- this.dialogRef.close(null);
3506
- }
3507
- /**
3508
- * @return {?}
3509
- */
3510
- do_check() {
3511
- if (this.valore.length < this.min_chars) {
3512
- this.toastr.error('Il valore deve contenere almeno ' + this.min_chars + ' caratteri');
3513
- return;
3110
+ if (this.init_fill == true) {
3111
+ if (this.sql == '') {
3112
+ //this.errorMsg="QUERY NON CONFIGURATA";
3113
+ return;
3114
+ }
3115
+ this.fillCombo();
3514
3116
  }
3515
- this.dialogRef.close(this.valore);
3117
+ else {
3118
+ this.errorMsg = "";
3119
+ }
3120
+ this
3121
+ .initend
3122
+ .emit();
3516
3123
  }
3517
3124
  /**
3518
3125
  * @return {?}
3519
3126
  */
3520
- chiudi() {
3521
- this.dialogRef.close(null);
3127
+ sc() {
3128
+ this
3129
+ .selchange
3130
+ .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
3522
3131
  }
3523
3132
  }
3524
- WinAskTextBigComponent.decorators = [
3133
+ FHComboboxComponent.decorators = [
3525
3134
  { type: Component, args: [{
3526
- selector: 'app-win_ask_text',
3527
- template: `
3528
-
3529
- <h2 mat-dialog-title>{{title}}</h2>
3530
- <mat-dialog-content style="width:630px;font-size: 12px;">
3531
- <mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
3532
- <textarea matInput [readonly]="readonly" [(ngModel)]="valore" style="min-width:600px" rows="15"
3533
- required></textarea>
3534
- </mat-form-field>
3535
- </mat-dialog-content>
3536
- <div fxLayout="row" fxLayoutAlign="center center" style="width: 100%">
3537
-
3538
- <button *ngIf="show_ok" mat-flat-button color="primary" (click)="do_check()">OK</button>&nbsp;&nbsp;&nbsp;
3539
- <button *ngIf="show_annulla" mat-flat-button color="warn" (click)="chiudi()">ANNULLA</button>
3540
- </div>
3135
+ selector: 'FHComboBox', template: `
3136
+ <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
3137
+ <mat-select #cmb [(ngModel)]="selval" (selectionChange)="sc()" [required]="required">
3138
+ <mat-option value="-1">{{sel_label}}</mat-option>
3139
+ <mat-option value="{{app.valore}}" *ngFor="let app of myData">{{app.descrizione_valore}}</mat-option>
3140
+ </mat-select>
3141
+ </mat-form-field>
3541
3142
 
3143
+ <mat-form-field [hidden]="enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
3144
+ <input type="text" #el1 matInput [disabled]="true" [(ngModel)]="dis_value">
3145
+ </mat-form-field>
3146
+ `,
3147
+ styles: [`
3542
3148
 
3543
- `
3149
+ `]
3544
3150
  }] }
3545
3151
  ];
3546
3152
  /** @nocollapse */
3547
- WinAskTextBigComponent.ctorParameters = () => [
3548
- { type: MatDialogRef },
3549
- { type: ToastrService }
3153
+ FHComboboxComponent.ctorParameters = () => [
3154
+ { type: QueryService },
3155
+ { type: OdbcService }
3550
3156
  ];
3551
- WinAskTextBigComponent.propDecorators = {
3552
- title: [{ type: Input }],
3157
+ FHComboboxComponent.propDecorators = {
3158
+ init_fill: [{ type: Input }],
3159
+ sql: [{ type: Input }],
3160
+ types: [{ type: Input }],
3161
+ values: [{ type: Input }],
3162
+ hidden: [{ type: Input }],
3553
3163
  label: [{ type: Input }],
3554
- valore: [{ type: Input }],
3555
- readonly: [{ type: Input }],
3556
- show_annulla: [{ type: Input }],
3557
- show_ok: [{ type: Input }]
3164
+ enabled: [{ type: Input }],
3165
+ required: [{ type: Input }],
3166
+ sel_label: [{ type: Input }],
3167
+ smtr: [{ type: ViewChild, args: ['cmb',] }],
3168
+ fillend: [{ type: Output }],
3169
+ selchange: [{ type: Output }],
3170
+ initend: [{ type: Output }],
3171
+ valDef: [{ type: Input }],
3172
+ db_type: [{ type: Input }]
3558
3173
  };
3559
3174
 
3560
3175
  /**
3561
3176
  * @fileoverview added by tsickle
3562
3177
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3563
3178
  */
3564
- class FHUploadPanelComponent {
3179
+ class FHUploadComponent {
3565
3180
  /**
3566
- * @param {?} _appservice
3567
3181
  * @param {?} _dataService
3568
3182
  * @param {?} toastr
3569
3183
  * @param {?} dialog
3570
- * @param {?} auth_s
3571
- * @param {?} uti
3184
+ * @param {?} app_s
3572
3185
  */
3573
- constructor(_appservice, _dataService, toastr, dialog, auth_s, uti) {
3574
- this._appservice = _appservice;
3186
+ constructor(_dataService, toastr, dialog, app_s) {
3575
3187
  this._dataService = _dataService;
3576
3188
  this.toastr = toastr;
3577
3189
  this.dialog = dialog;
3578
- this.auth_s = auth_s;
3579
- this.uti = uti;
3190
+ this.app_s = app_s;
3191
+ this.show_descri = true;
3580
3192
  this.enabled = true;
3581
- this.label = '';
3582
- this.sovrascrivi_path = '';
3583
- this.ruolo_supervisore = '[ZZZ_DIS_CC]';
3584
- this.access_control = false;
3585
- this.show_images = true;
3193
+ this.single = true;
3194
+ this.descri_obb = false;
3195
+ this.programma_da_eseguire = '';
3196
+ this.label_attendere = 'ATTENDERE UPLOAD IN CORSO';
3197
+ this.fixed_label = ' (INSERISCI QUI LA DESCRIZIONE PRIMA DI CARICARE IL FILE)';
3198
+ this.limit_string = 'Il file di <size>MB supera il limite di 500MB';
3199
+ this.allegato_inserito = 'ALLEGATO INSERITO';
3200
+ this.inserire_descrizione = 'Descrizione Obbligatoria';
3201
+ this.lista_allegati = [];
3586
3202
  this.change = new EventEmitter();
3203
+ this.upload_ended = new EventEmitter();
3204
+ this.multi_list = false;
3205
+ this.allow_delete = false;
3206
+ this.loading = false;
3587
3207
  this.App = '';
3588
3208
  this.K = '';
3589
- this.image_type = false;
3209
+ this.label_b = "";
3210
+ this.descrizione = '';
3211
+ this.file_name = '';
3212
+ this.label = '';
3213
+ this.username = '';
3590
3214
  this.b_edit_loaded = false;
3591
- this.b_False = false;
3592
- this.b_mobile = false;
3215
+ this.tipo = '';
3593
3216
  this.b_ini = false;
3594
- this.m_p_tipo = "";
3595
- this.m_programma_da_eseguire = "";
3596
- }
3597
- /**
3598
- * @param {?} ax
3599
- * @return {?}
3600
- */
3601
- download_all(ax) {
3602
- if (ax.APP != null)
3603
- ax.App = ax.APP;
3604
- if (this.sovrascrivi_path == '') {
3605
- window.open(this._appservice.COMPANY_SITE_ROOT + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
3606
- }
3607
- else {
3608
- window.open(this.sovrascrivi_path + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
3609
- }
3610
- }
3611
- /**
3612
- * @param {?} ax
3613
- * @return {?}
3614
- */
3615
- edit_descri(ax) {
3616
- /** @type {?} */
3617
- let dialogRef = this
3618
- .dialog
3619
- .open(WinAskTextBigComponent);
3620
- dialogRef.componentInstance.label = "Descrizione Allegato";
3621
- dialogRef.componentInstance.valore = ax.descrizione;
3622
- dialogRef.componentInstance.min_chars = 0;
3623
- dialogRef
3624
- .afterClosed()
3625
- .subscribe((/**
3626
- * @param {?} result
3217
+ this.uploader = new FileUploader({
3218
+ url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
3219
+ 'maxFileSize': 500 * 1024 * 1024
3220
+ });
3221
+ this.id = null;
3222
+ this.username = this.app_s.user;
3223
+ this.uploader.onBeforeUploadItem = (/**
3224
+ * @param {?} item
3627
3225
  * @return {?}
3628
3226
  */
3629
- result => {
3630
- if (result != null) {
3631
- /** @type {?} */
3632
- let p = new QParam();
3633
- p.sql = "UPDATE_ALLEGATI_DESCRIZIONE";
3634
- p.types = ['int', 'string'];
3635
- p.values = [ax.id, result];
3636
- this
3637
- ._dataService
3638
- .doQuery(p)
3639
- .subscribe((/**
3640
- * @param {?} data
3641
- * @return {?}
3642
- */
3643
- data => {
3644
- if (data != null)
3645
- if (data.result_msg == "OK") {
3646
- this.ref_allegato();
3647
- }
3648
- }));
3227
+ (item) => {
3228
+ item.withCredentials = false;
3229
+ });
3230
+ this.uploader.onCompleteItem = (/**
3231
+ * @param {?} item
3232
+ * @param {?} response
3233
+ * @param {?} status
3234
+ * @param {?} header
3235
+ * @return {?}
3236
+ */
3237
+ (item, response, status, header) => {
3238
+ if (status === 200) {
3239
+ this.descrizione = '';
3240
+ this.toastr.info("INFO", this.allegato_inserito, {
3241
+ timeOut: 1000,
3242
+ progressBar: true
3243
+ });
3244
+ this.ref_allegato();
3245
+ this.change.emit({ item: item, response: response, status: status, header: header });
3649
3246
  }
3650
- }));
3247
+ });
3651
3248
  }
3652
3249
  /**
3653
- * @param {?} ax
3654
3250
  * @return {?}
3655
3251
  */
3656
- delete(ax) {
3657
- localStorage.setItem(this._appservice.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
3658
- localStorage.setItem(this._appservice.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
3252
+ del_doc() {
3253
+ localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
3254
+ localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
3659
3255
  /** @type {?} */
3660
3256
  let dialogRef = this
3661
3257
  .dialog
@@ -3672,7 +3268,7 @@ class FHUploadPanelComponent {
3672
3268
  let p = new QParam();
3673
3269
  p.sql = "DELETE_ALLEGATO";
3674
3270
  p.types = ['int', 'string'];
3675
- p.values = [ax.id, this.auth_s.username];
3271
+ p.values = [this.id, this.app_s.user];
3676
3272
  this
3677
3273
  ._dataService
3678
3274
  .doQuery(p)
@@ -3701,37 +3297,179 @@ class FHUploadPanelComponent {
3701
3297
  }
3702
3298
  }));
3703
3299
  }
3300
+ /**
3301
+ * @return {?}
3302
+ */
3303
+ load_types() {
3304
+ if (this.cmb_tipo == null) {
3305
+ setTimeout((/**
3306
+ * @return {?}
3307
+ */
3308
+ () => { this.load_types(); }), 200);
3309
+ return;
3310
+ }
3311
+ this.cmb_tipo.fillCombo();
3312
+ }
3704
3313
  /**
3705
3314
  * @return {?}
3706
3315
  */
3707
3316
  ngOnInit() {
3708
- this.upc.single = false;
3709
- this.b_mobile = this._appservice.getState().pageFullscreen;
3710
- this
3711
- .upc
3712
- .init(this.App, this.K, 'Descrizione Allegato', this.m_p_tipo, this.m_programma_da_eseguire);
3713
- this.ref_allegato();
3317
+ /** @type {?} */
3318
+ let uo = {};
3319
+ uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
3320
+ // console.log('ngOnInit!!');
3321
+ this.uploader.setOptions(uo);
3322
+ this.uploader.onCompleteAll = (/**
3323
+ * @return {?}
3324
+ */
3325
+ () => {
3326
+ this.loading = false;
3327
+ this.upload_ended.emit();
3328
+ if (this.dialogRef != null)
3329
+ if (this.dialogRef.componentInstance != null) {
3330
+ this.dialogRef.componentInstance.update_progess(100);
3331
+ this.dialogRef = null;
3332
+ }
3333
+ });
3334
+ this.uploader.onErrorItem = (/**
3335
+ * @param {?} a
3336
+ * @param {?} b
3337
+ * @param {?} c
3338
+ * @param {?} d
3339
+ * @return {?}
3340
+ */
3341
+ (a, b, c, d) => {
3342
+ this.toastr.error(b);
3343
+ });
3344
+ this.uploader.onAfterAddingFile = (/**
3345
+ * @param {?} fileItem
3346
+ * @return {?}
3347
+ */
3348
+ (fileItem) => {
3349
+ this.ch(fileItem);
3350
+ });
3351
+ this.uploader.onProgressItem = (/**
3352
+ * @param {?} fileItem
3353
+ * @param {?} progress
3354
+ * @return {?}
3355
+ */
3356
+ (fileItem, progress) => {
3357
+ // console.log(fileItem);
3358
+ // console.log(progress);
3359
+ this.loading = true;
3360
+ if (this.dialogRef != null)
3361
+ if (this.dialogRef.componentInstance != null)
3362
+ this.dialogRef.componentInstance.update_progess(progress);
3363
+ });
3364
+ this.uploader.onWhenAddingFileFailed = (/**
3365
+ * @param {?} item
3366
+ * @param {?} filter
3367
+ * @param {?} options
3368
+ * @return {?}
3369
+ */
3370
+ (item, filter, options) => {
3371
+ switch (filter.name) {
3372
+ case 'fileSize':
3373
+ /** @type {?} */
3374
+ let ar = Math.round(item.size / 1024 / 1024);
3375
+ this.toastr.error(this.limit_string.split('<size>').join('' + ar));
3376
+ break;
3377
+ default:
3378
+ this.toastr.error("Errore: " + filter.name);
3379
+ }
3380
+ });
3381
+ }
3382
+ /**
3383
+ * @return {?}
3384
+ */
3385
+ download_all() {
3386
+ window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + this.App + '/' + this.K + '/' + this.file_name);
3387
+ }
3388
+ /**
3389
+ * @param {?} fileItem
3390
+ * @return {?}
3391
+ */
3392
+ ch(fileItem) {
3393
+ if (this.descri_obb && this.descrizione == '') {
3394
+ this.toastr.error(this.inserire_descrizione);
3395
+ return;
3396
+ }
3397
+ for (let i = 0; i < this.lista_allegati.length; i++) {
3398
+ if (this.lista_allegati[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
3399
+ this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
3400
+ return;
3401
+ }
3402
+ }
3403
+ this.uploader.onBuildItemForm = (/**
3404
+ * @param {?} item
3405
+ * @param {?} form
3406
+ * @return {?}
3407
+ */
3408
+ (item, form) => {
3409
+ form.append('App', this.App);
3410
+ form.append('K', this.K);
3411
+ form.append('descrizione', this.descrizione);
3412
+ form.append('single', this.single);
3413
+ form.append('username', this.username);
3414
+ if (this.multi_list)
3415
+ form.append('tipo', this.cmb_tipo.getDescri().split('-1').join(''));
3416
+ else
3417
+ form.append('tipo', this.tipo);
3418
+ form.append('local_path', this.app_s.LOCAL_PATH);
3419
+ if (this.programma_da_eseguire != '')
3420
+ form.append('p1', this.programma_da_eseguire);
3421
+ });
3422
+ if (this.dialogRef == null) {
3423
+ this.dialogRef = this.dialog.open(WinWait, { 'disableClose': true });
3424
+ this.dialogRef.componentInstance.label = this.label_attendere;
3425
+ this.dialogRef.afterClosed().subscribe((/**
3426
+ * @param {?} result
3427
+ * @return {?}
3428
+ */
3429
+ result => {
3430
+ }));
3431
+ }
3432
+ this.uploader.uploadAll();
3714
3433
  }
3715
3434
  /**
3716
3435
  * @param {?} p_app
3717
3436
  * @param {?} p_k
3437
+ * @param {?} p_label
3718
3438
  * @param {?=} p_tipo
3719
3439
  * @param {?=} programma_da_eseguire
3440
+ * @param {?=} allow_delete
3720
3441
  * @return {?}
3721
3442
  */
3722
- init(p_app, p_k, p_tipo = "", programma_da_eseguire = "") {
3443
+ init(p_app, p_k, p_label, p_tipo = "", programma_da_eseguire = "", allow_delete = false) {
3723
3444
  this.App = p_app;
3724
3445
  this.K = p_k;
3446
+ this.label = p_label;
3447
+ this.tipo = p_tipo;
3725
3448
  this.b_ini = true;
3726
3449
  this.b_edit_loaded = false;
3727
- this.m_p_tipo = p_tipo;
3728
- this.m_programma_da_eseguire = programma_da_eseguire;
3729
- this.ngOnInit();
3450
+ this.descrizione = '';
3451
+ this.programma_da_eseguire = programma_da_eseguire;
3452
+ this.allow_delete = allow_delete;
3453
+ this.ref_allegato();
3454
+ // console.log('init! ',this.tipo)
3455
+ if (this.tipo.indexOf('SELECT_') > -1) {
3456
+ this.multi_list = true;
3457
+ this.load_types();
3458
+ //console.log('fillCombo');
3459
+ }
3730
3460
  }
3731
3461
  /**
3732
3462
  * @return {?}
3733
3463
  */
3734
3464
  ref_allegato() {
3465
+ // console.log(' ref_allegato')
3466
+ this.id = null;
3467
+ this.descrizione = '';
3468
+ this.file_name = '';
3469
+ this.label_b = '';
3470
+ this.cmb_tipo.resetValue();
3471
+ if (!this.single)
3472
+ return;
3735
3473
  if (this.App == null)
3736
3474
  return;
3737
3475
  if (this.App == "")
@@ -3741,287 +3479,156 @@ class FHUploadPanelComponent {
3741
3479
  p.sql = "SELECT_ALLEGATO_INFO";
3742
3480
  p.types = ['string', 'string'];
3743
3481
  p.values = [this.App, this.K];
3744
- this
3745
- ._dataService
3746
- .doQuery(p)
3747
- .subscribe((/**
3482
+ this._dataService.doQuery(p).subscribe((/**
3748
3483
  * @param {?} data
3749
3484
  * @return {?}
3750
3485
  */
3751
3486
  data => {
3752
3487
  if (data != null)
3753
3488
  if (data.result_msg == "OK") {
3754
- this.arr_g = data.result_data;
3755
3489
  /** @type {?} */
3756
- let iconf = "webinfo";
3757
- for (let i = 0; i < this.arr_g.length; i++) {
3758
- if (this.arr_g[i].APP != null)
3759
- this.arr_g[i].App = this.arr_g[i].APP;
3760
- if (this.arr_g[i].descrizione != null)
3761
- this.arr_g[i].descrizione_vis = this.arr_g[i].descrizione.split('\n').join('<br>');
3762
- else
3763
- this.arr_g[i].descrizione_vis = '';
3764
- /** @type {?} */
3765
- let arrf = this.arr_g[i].Filename.split('.');
3766
- if (this.sovrascrivi_path == '') {
3767
- this.arr_g[i].url = this._appservice.COMPANY_SITE_ROOT + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
3768
- this.arr_g[i].url_orig = this._appservice.COMPANY_SITE_ROOT + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
3769
- }
3770
- else {
3771
- this.arr_g[i].url = this.sovrascrivi_path + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
3772
- this.arr_g[i].url_orig = this.sovrascrivi_path + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
3773
- }
3774
- if ('3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH'.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
3775
- iconf = arrf[arrf.length - 1].toLocaleLowerCase();
3776
- this.arr_g[i].icon = iconf + '.svg';
3777
- this.arr_g[i].can_delete = !this.access_control || this.arr_g[i].idp == this._appservice.user || this.uti.hasRole(this.ruolo_supervisore);
3778
- if ((this.arr_g[i].Filename.indexOf(".jpg") != -1 || this.arr_g[i].Filename.indexOf(".gif") != -1 || this.arr_g[i].Filename.indexOf(".png") != -1) && this.show_images) {
3779
- this.arr_g[i].type = "IMG";
3780
- this.arr_g[i].image_original = [this.arr_g[i].url];
3781
- if (this.arr_g[i].preview != null)
3782
- if (this.arr_g[i].preview == 1) {
3783
- /** @type {?} */
3784
- let pcs = this.arr_g[i].url.split('.');
3785
- /** @type {?} */
3786
- let lastPc = pcs.pop();
3787
- this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
3788
- }
3789
- this.image_type = true;
3790
- this.arr_g[i].image_thumbnail = [this.arr_g[i].url];
3791
- }
3792
- else
3793
- this.arr_g[i].type = "O";
3490
+ let a = data.result_data;
3491
+ if (a.length > 0) {
3492
+ this.id = a[0].id;
3493
+ this.descrizione = a[0].descrizione;
3494
+ this.file_name = a[0].Filename;
3495
+ this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
3496
+ this.b_edit_loaded = true;
3794
3497
  }
3795
3498
  }
3796
3499
  }));
3797
3500
  }
3798
3501
  }
3799
- FHUploadPanelComponent.decorators = [
3502
+ FHUploadComponent.decorators = [
3800
3503
  { type: Component, args: [{
3801
- selector: 'FHUploadPanel', template: `
3802
- <div fxLayout="column">
3803
- <h3>{{label}}</h3>
3804
- <div fxLayout="column">
3805
- <div [hidden]="!enabled">
3806
- <FHUpload [single]="b_False" [lista_allegati]="arr_g" (change)="ref_allegato()" #upc></FHUpload>
3807
- </div>
3808
- <table width="98%" class="fh_table" *ngIf="!image_type && !b_mobile">
3809
- <thead>
3810
- <tr class="header">
3811
- <th style="width:40px"></th>
3812
- <th style="width:50%">Nome</th>
3813
- <th style="width:60px;text-align:center">Dim.</th>
3814
- <th style="width:50%">Descrizione</th>
3815
- <th style="width:40px" class="actions"></th>
3816
- <th style="width:30%" >Utente</th>
3817
- <th style="width:240px;text-align:center">Data</th>
3818
- <th style="width:40px" class="actions"></th>
3819
- <th *ngIf="enabled" style="width:40px" class="actions"></th>
3820
- </tr>
3821
- </thead>
3822
- <tbody>
3823
- <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
3824
- <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
3825
- <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
3826
- <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
3827
- <td>{{app.Filename}}</td>
3828
- <td style="text-align:center">{{app.Filesize}}</td>
3829
- <td>
3830
- <div fxLayout="row">
3831
- <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
3832
- <mat-icon>edit</mat-icon>
3833
- </a>
3834
-
3835
- <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
3836
- <mat-icon>edit</mat-icon>
3837
- </a>
3838
-
3839
- <div [innerHTML]="app.descrizione_vis" style="width:100%">
3840
- </div>
3841
- </div></td>
3842
-
3843
-
3844
- <td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
3845
- <fh-image-viewer [u]="app"></fh-image-viewer>
3846
-
3847
- </td>
3848
- <td *ngIf="app.type!='IMG'">
3849
-
3850
- </td>
3851
- <td>{{app.nc}}</td>
3852
- <td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
3853
- <td style="text-align:center">
3854
- <button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
3855
- <mat-icon>cloud_download</mat-icon>
3856
- </button>
3857
- </td>
3858
-
3859
- <td *ngIf="enabled" style="text-align:center">
3860
- <a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
3861
- <mat-icon>delete</mat-icon>
3862
- </a>
3863
-
3864
- <a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
3865
- <mat-icon>delete</mat-icon>
3866
- </a>
3867
-
3868
- </td>
3869
-
3870
- </tr>
3871
- </tbody>
3872
- </table>
3873
- <table width="98%" class="fh_table" *ngIf="image_type && !b_mobile">
3874
- <thead>
3875
- <tr class="header">
3876
- <th style="width:40px"></th>
3877
- <th style="width:50%">Nome</th>
3878
- <th style="width:60px;text-align:center">Dim.</th>
3879
-
3880
- <th style="width:20%">Descrizione</th>
3881
-
3882
- <th style="width:40%" ></th>
3883
-
3884
-
3885
- <th style="width:10%" >Utente</th>
3886
- <th style="width:240px;text-align:center">Data</th>
3887
- <th style="width:40px" class="actions"></th>
3888
- <th *ngIf="enabled" style="width:40px" class="actions"></th>
3889
- </tr>
3890
- </thead>
3891
- <tbody>
3892
-
3893
- <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
3894
- <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
3895
- <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
3896
- <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
3897
-
3898
- <td>{{app.Filename}}</td>
3899
- <td style="text-align:center">{{app.Filesize}}</td>
3900
- <td>
3901
- <div fxLayout="row">
3902
- <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
3903
- <mat-icon>edit</mat-icon>
3904
- </a>
3905
-
3906
- <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
3907
- <mat-icon>edit</mat-icon>
3908
- </a>
3909
-
3910
- <div [innerHTML]="app.descrizione_vis" style="width:100%">
3911
- </div>
3912
- </div></td>
3913
-
3914
-
3915
- <td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
3916
- <fh-image-viewer [u]="app"></fh-image-viewer>
3917
-
3918
- </td>
3919
- <td *ngIf="app.type!='IMG'">
3920
-
3921
- </td>
3922
- <td>{{app.nc}}</td>
3923
- <td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
3924
- <td style="text-align:center">
3925
- <button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
3926
- <mat-icon>cloud_download</mat-icon>
3927
- </button>
3928
- </td>
3929
-
3930
- <td *ngIf="enabled" style="text-align:center">
3931
- <a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
3932
- <mat-icon>delete</mat-icon>
3933
- </a>
3934
-
3935
- <a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
3936
- <mat-icon>delete</mat-icon>
3937
- </a>
3938
-
3939
- </td>
3940
-
3941
- </tr>
3942
- </tbody>
3943
- </table>
3944
- <table width="98%" class="fh_table" *ngIf="b_mobile">
3945
- <tbody>
3504
+ selector: 'FHUpload',
3505
+ template: `
3946
3506
 
3947
- <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
3948
- <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
3949
- <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
3950
- <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
3951
- <td *ngIf="b_mobile" style="text-align:center">{{app.Filename}}<br><br>
3952
- <button style="background-color: #F5F5F5" (click)="download_all(app)" mat-flat-button>DOWNLOAD</button>
3953
- </td>
3954
- </tr>
3955
- </tbody>
3956
- </table>
3507
+ <div *ngIf="loading" fxLayout="row">
3508
+ WAIT
3509
+ </div>
3510
+ <div [hidden]="!(enabled && !loading)" fxLayout="row" fxLayoutAlign="start center">
3511
+ <div [hidden]="!multi_list" style="width:380px" fxLayoutAlign="start center">
3512
+ <FHComboBox [sql]="tipo" #cmb_tipo [init_fill]="false" label="Tipologia"></FHComboBox>&nbsp;&nbsp;
3513
+ </div>
3514
+ <mat-form-field [hidden]="!show_descri" style="width: 100%" appearance="outline" floatLabel="always"><mat-label>{{label}} {{fixed_label}}</mat-label>
3515
+ <input matInput type="text" name="descrizione" [(ngModel)]="descrizione"
3516
+ >
3517
+ </mat-form-field>
3518
+ &nbsp;&nbsp;&nbsp;&nbsp;
3519
+ <div style="width:140px" fxLayout="row" fxLayoutAlign="start start">
3520
+ <input type="file" multiple ng2FileSelect [uploader]="uploader" name="file-fh{{App}}" id="file-fh{{App}}" class="inputfile inputfile-fh" />
3521
+ <label for="file-fh{{App}}" style="width:210px"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg><span style="font-size: 12px">&nbsp;&nbsp;&nbsp;Upload</span></label>
3522
+ </div>
3523
+ <div fxLayout="row" fxLayoutAlign="start start">
3524
+ <button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px">{{label_b}}</button>&nbsp;&nbsp;&nbsp;
3525
+ <button mat-flat-button *ngIf="id!=null && allow_delete" (click)="del_doc()" color="warn">
3526
+ <mat-icon>delete</mat-icon>
3527
+ </button>
3957
3528
  </div>
3958
3529
  </div>
3959
- <div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
3530
+ <div *ngIf="!enabled" fxLayout="row">
3531
+ <label>{{label}}:</label>{{descrizione}}
3532
+ <button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px;background-color: #F5F5F5">{{label_b}}</button>
3533
+
3534
+ </div>
3960
3535
 
3961
3536
  `,
3962
3537
  styles: [`
3963
3538
 
3964
-
3965
-
3966
3539
  `]
3967
3540
  }] }
3968
3541
  ];
3969
3542
  /** @nocollapse */
3970
- FHUploadPanelComponent.ctorParameters = () => [
3971
- { type: AppService },
3543
+ FHUploadComponent.ctorParameters = () => [
3972
3544
  { type: QueryService },
3973
3545
  { type: ToastrService },
3974
3546
  { type: MatDialog },
3975
- { type: AuthenticationService },
3976
- { type: UtilityService }
3547
+ { type: AppService }
3977
3548
  ];
3978
- FHUploadPanelComponent.propDecorators = {
3549
+ FHUploadComponent.propDecorators = {
3550
+ show_descri: [{ type: Input }],
3979
3551
  enabled: [{ type: Input }],
3980
- label: [{ type: Input }],
3981
- sovrascrivi_path: [{ type: Input }],
3982
- ruolo_supervisore: [{ type: Input }],
3983
- access_control: [{ type: Input }],
3984
- show_images: [{ type: Input }],
3552
+ single: [{ type: Input }],
3553
+ descri_obb: [{ type: Input }],
3554
+ programma_da_eseguire: [{ type: Input }],
3555
+ label_attendere: [{ type: Input }],
3556
+ fixed_label: [{ type: Input }],
3557
+ limit_string: [{ type: Input }],
3558
+ allegato_inserito: [{ type: Input }],
3559
+ inserire_descrizione: [{ type: Input }],
3560
+ lista_allegati: [{ type: Input }],
3985
3561
  change: [{ type: Output }],
3986
- upc: [{ type: ViewChild, args: ['upc',] }]
3562
+ upload_ended: [{ type: Output }],
3563
+ cmb_tipo: [{ type: ViewChild, args: ['cmb_tipo',] }]
3987
3564
  };
3988
3565
 
3989
3566
  /**
3990
3567
  * @fileoverview added by tsickle
3991
3568
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3992
3569
  */
3993
- class GridService {
3570
+ class AuthenticationService {
3994
3571
  /**
3572
+ * @param {?} _dataService
3573
+ * @param {?} toastr
3995
3574
  * @param {?} http
3575
+ * @param {?} router
3576
+ * @param {?} route
3577
+ * @param {?} _fileService
3996
3578
  * @param {?} app_s
3997
- * @param {?} toastr
3579
+ * @param {?} uti_s
3998
3580
  */
3999
- constructor(http, app_s, toastr) {
3581
+ constructor(_dataService, toastr, http, router, route, _fileService, app_s, uti_s) {
3582
+ this._dataService = _dataService;
3583
+ this.toastr = toastr;
4000
3584
  this.http = http;
3585
+ this.router = router;
3586
+ this.route = route;
3587
+ this._fileService = _fileService;
4001
3588
  this.app_s = app_s;
4002
- this.toastr = toastr;
4003
- this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT; // URL to web API
3589
+ this.uti_s = uti_s;
3590
+ this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3591
+ this.goto_after = "";
3592
+ this.username = '';
3593
+ this.headers = new HttpHeaders({
3594
+ 'Content-Type': 'application/json',
3595
+ });
4004
3596
  }
4005
- // URL to web API
4006
3597
  /**
4007
- * @param {?} queryp
4008
- * @param {?=} displayError
4009
- * @param {?=} url_sec
4010
3598
  * @return {?}
4011
3599
  */
4012
- doQuery(queryp, displayError = true, url_sec = null) {
4013
- this.headers = new HttpHeaders({
4014
- 'Content-Type': 'application/json',
4015
- 'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
4016
- });
4017
- if (url_sec == null)
4018
- this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT;
4019
- else
4020
- this.url = url_sec;
4021
- /** @type {?} */
4022
- let post_v = JSON.stringify(queryp);
4023
- return this.http.post(this.url, post_v, { headers: this.headers })
4024
- .pipe(map((/**
3600
+ logout() {
3601
+ this.app_s.user = null;
3602
+ this.app_s.user_name = null;
3603
+ this.app_s.user_surname = null;
3604
+ this.app_s.user_idp = null;
3605
+ this.app_s.user_email = null;
3606
+ this.app_s.user_roles = null;
3607
+ this.app_s.user_lang = null;
3608
+ this.app_s.user_isadmin = null;
3609
+ this.app_s.token = null;
3610
+ localStorage.removeItem(this.app_s.COMPANY_KEY + "token");
3611
+ if (this.app_s.LOGIN_EXT != 1)
3612
+ this.router.navigate(['login']);
3613
+ else {
3614
+ window.location.href = (this.app_s.LOGOUT_URL_EXT);
3615
+ }
3616
+ }
3617
+ /**
3618
+ * @param {?} username
3619
+ * @param {?} password
3620
+ * @param {?=} displayError
3621
+ * @return {?}
3622
+ */
3623
+ login(username, password, displayError = true) {
3624
+ this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3625
+ /** @type {?} */
3626
+ let post_v = JSON.stringify({ username: username, password: password });
3627
+ if (this.app_s.LDAP_AUTH == 1)
3628
+ post_v = JSON.stringify({ username: username, password: password, ldap_auth: 1 });
3629
+ return this.http.post(this.url, post_v, {
3630
+ headers: this.headers
3631
+ }).pipe(map((/**
4025
3632
  * @param {?} res
4026
3633
  * @return {?}
4027
3634
  */
@@ -4035,6 +3642,11 @@ class GridService {
4035
3642
  else if (res.result_msg === 'KO') {
4036
3643
  err = new Error(res.msg);
4037
3644
  }
3645
+ else {
3646
+ if (res.result_data.length > 0) {
3647
+ localStorage.setItem(this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
3648
+ }
3649
+ }
4038
3650
  if (err) {
4039
3651
  console.error(err);
4040
3652
  if (displayError) {
@@ -4056,477 +3668,1068 @@ class GridService {
4056
3668
  throw err;
4057
3669
  })));
4058
3670
  }
4059
- }
4060
- GridService.decorators = [
4061
- { type: Injectable, args: [{
4062
- providedIn: 'root',
4063
- },] }
4064
- ];
4065
- /** @nocollapse */
4066
- GridService.ctorParameters = () => [
4067
- { type: HttpClient },
4068
- { type: AppService },
4069
- { type: ToastrService }
4070
- ];
4071
- /** @nocollapse */ GridService.ngInjectableDef = defineInjectable({ factory: function GridService_Factory() { return new GridService(inject(HttpClient), inject(AppService), inject(ToastrService)); }, token: GridService, providedIn: "root" });
4072
-
4073
- /**
4074
- * @fileoverview added by tsickle
4075
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4076
- */
4077
- class win_grid_help {
4078
- /**
4079
- * @param {?} dialogRef
4080
- * @param {?} toastr
4081
- * @param {?} m_appService
4082
- */
4083
- constructor(dialogRef, toastr, m_appService) {
4084
- this.dialogRef = dialogRef;
4085
- this.toastr = toastr;
4086
- this.m_appService = m_appService;
4087
- this.title = "";
4088
- }
4089
- /**
4090
- * @return {?}
4091
- */
4092
- ngOnInit() {
4093
- }
4094
- }
4095
- win_grid_help.decorators = [
4096
- { type: Component, args: [{
4097
- template: `
4098
-
4099
-
4100
-
4101
- <mat-dialog-content style="min-width:800px;min-height:500px">
4102
- <mat-tab-group>
4103
- <mat-tab label="FILTRI">
4104
-
4105
-
4106
- <img src="assets/helps/fhgrid/filtri.png"/>
4107
- </mat-tab>
4108
- <mat-tab label="ORDINAMENTI">
4109
- <img src="assets/helps/fhgrid/ordinamenti.png"/>
4110
- </mat-tab>
4111
- <mat-tab label="LAYOUT COLONNE">
4112
- <img src="assets/helps/fhgrid/layout_colonne.png"/>
4113
- </mat-tab>
4114
- </mat-tab-group>
4115
- </mat-dialog-content>
4116
-
4117
-
4118
- <mat-dialog-actions>
4119
- <button mat-flat-button style="background-color: #F5F5F5" (click)="dialogRef.close('')">CHIUDI</button>
4120
- </mat-dialog-actions>
4121
- `,
4122
- styles: [`
4123
- agm-map {
4124
- height: 600px;
4125
- width: 100%;
4126
- }
4127
- `]
4128
- }] }
4129
- ];
4130
- /** @nocollapse */
4131
- win_grid_help.ctorParameters = () => [
4132
- { type: MatDialogRef },
4133
- { type: ToastrService },
4134
- { type: AppService }
4135
- ];
4136
-
4137
- /**
4138
- * @fileoverview added by tsickle
4139
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4140
- */
4141
- class FHComboboxComponent {
4142
- /**
4143
- * @param {?} _dataService
4144
- * @param {?} _dataService_odbc
4145
- */
4146
- constructor(_dataService, _dataService_odbc) {
4147
- this._dataService = _dataService;
4148
- this._dataService_odbc = _dataService_odbc;
4149
- this.init_fill = true;
4150
- this.sql = "";
4151
- this.types = [];
4152
- this.values = [];
4153
- this.hidden = false;
4154
- this.label = "";
4155
- this.enabled = true;
4156
- this.required = false;
4157
- this.sel_label = "";
4158
- this.fillend = new EventEmitter();
4159
- this.selchange = new EventEmitter();
4160
- this.initend = new EventEmitter();
4161
- this.myData = [];
4162
- this.valDef = "-1";
4163
- this.selval = "-1";
4164
- this.errorMsg = "";
4165
- this.db_type = "1";
4166
- this.dis_value = '';
4167
- this.descri_val = "";
4168
- }
4169
3671
  /**
4170
- * @private
3672
+ * @param {?} username
3673
+ * @param {?=} displayError
4171
3674
  * @return {?}
4172
3675
  */
4173
- update_dis() {
4174
- this.dis_value = '';
4175
- try {
4176
- if (this.descri_val != null)
4177
- if (this.descri_val != "") {
4178
- this.dis_value = this.descri_val;
4179
- return;
3676
+ get_user_info(username, displayError = true) {
3677
+ this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3678
+ /** @type {?} */
3679
+ let post_v = JSON.stringify({ username_info: username });
3680
+ return this.http.post(this.url, post_v, {
3681
+ headers: this.headers
3682
+ }).pipe(map((/**
3683
+ * @param {?} res
3684
+ * @return {?}
3685
+ */
3686
+ (res) => {
3687
+ // Handle errors, display if enabled
3688
+ /** @type {?} */
3689
+ let err;
3690
+ if (!res) {
3691
+ err = new Error('Empty server response');
3692
+ }
3693
+ else if (res.result_msg === 'KO') {
3694
+ err = new Error(res.msg);
3695
+ }
3696
+ if (err) {
3697
+ console.error(err);
3698
+ if (displayError) {
3699
+ this.toastr.error(err.message);
4180
3700
  }
4181
- if (this.valDef == null)
4182
- this.dis_value = '';
4183
- else
4184
- this.dis_value = this.valDef.split('-1').join('');
4185
- }
4186
- catch (e) {
4187
- console.log('errore split -> this.valDef ', this.valDef);
4188
- }
3701
+ throw new Error(err);
3702
+ }
3703
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3704
+ })), catchError((/**
3705
+ * @param {?} err
3706
+ * @return {?}
3707
+ */
3708
+ (err) => {
3709
+ // In a real world app, we might use a remote logging infrastructure
3710
+ // We'd also dig deeper into the error to get a better message
3711
+ /** @type {?} */
3712
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3713
+ console.error(errMsg); // log to console instead
3714
+ throw err;
3715
+ })));
4189
3716
  }
4190
3717
  /**
3718
+ * @param {?} email
3719
+ * @param {?=} displayError
4191
3720
  * @return {?}
4192
3721
  */
4193
- resetValue() {
4194
- this.selval = '-1';
4195
- this.valDef = '-1';
4196
- this.update_dis();
3722
+ passrecovery(email, displayError = true) {
3723
+ /** @type {?} */
3724
+ let post_v = JSON.stringify({ email: email, websiteroot: this.app_s.COMPANY_SITE_ROOT, op: 'send_email' });
3725
+ return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3726
+ headers: this.headers
3727
+ }).pipe(map((/**
3728
+ * @param {?} res
3729
+ * @return {?}
3730
+ */
3731
+ (res) => {
3732
+ // Handle errors, display if enabled
3733
+ /** @type {?} */
3734
+ let err;
3735
+ if (!res) {
3736
+ err = new Error('Empty server response');
3737
+ }
3738
+ else if (res.result_msg === 'KO') {
3739
+ err = new Error(res.msg);
3740
+ }
3741
+ if (err) {
3742
+ console.error(err);
3743
+ if (displayError) {
3744
+ this.toastr.error(err.message);
3745
+ }
3746
+ throw new Error(err);
3747
+ }
3748
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3749
+ })), catchError((/**
3750
+ * @param {?} err
3751
+ * @return {?}
3752
+ */
3753
+ (err) => {
3754
+ // In a real world app, we might use a remote logging infrastructure
3755
+ // We'd also dig deeper into the error to get a better message
3756
+ /** @type {?} */
3757
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3758
+ console.error(errMsg); // log to console instead
3759
+ throw err;
3760
+ })));
4197
3761
  }
4198
3762
  /**
3763
+ * @param {?} res_rep
3764
+ * @param {?=} displayError
4199
3765
  * @return {?}
4200
3766
  */
4201
- focus() {
4202
- this.smtr.nativeElement.focus();
3767
+ checktoken(res_rep, displayError = true) {
3768
+ /** @type {?} */
3769
+ let post_v = JSON.stringify({ res_rep: res_rep, op: 'check_token' });
3770
+ return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3771
+ headers: this.headers
3772
+ }).pipe(map((/**
3773
+ * @param {?} res
3774
+ * @return {?}
3775
+ */
3776
+ (res) => {
3777
+ // Handle errors, display if enabled
3778
+ /** @type {?} */
3779
+ let err;
3780
+ if (!res) {
3781
+ err = new Error('Empty server response');
3782
+ }
3783
+ else if (res.result_msg === 'KO') {
3784
+ err = new Error(res.msg);
3785
+ }
3786
+ if (err) {
3787
+ console.error(err);
3788
+ if (displayError) {
3789
+ this.toastr.error(err.message);
3790
+ }
3791
+ throw new Error(err);
3792
+ }
3793
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3794
+ })), catchError((/**
3795
+ * @param {?} err
3796
+ * @return {?}
3797
+ */
3798
+ (err) => {
3799
+ // In a real world app, we might use a remote logging infrastructure
3800
+ // We'd also dig deeper into the error to get a better message
3801
+ /** @type {?} */
3802
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3803
+ console.error(errMsg); // log to console instead
3804
+ throw err;
3805
+ })));
4203
3806
  }
4204
3807
  /**
3808
+ * @param {?} token
3809
+ * @param {?} password
3810
+ * @param {?=} displayError
4205
3811
  * @return {?}
4206
3812
  */
4207
- reset() {
4208
- this.selval = '-1';
4209
- this.valDef = '-1';
4210
- this.myData = new Array();
4211
- this.update_dis();
3813
+ change_password(token, password, displayError = true) {
3814
+ /** @type {?} */
3815
+ let post_v = JSON.stringify({ token: token, password: password, op: 'change_password' });
3816
+ return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3817
+ headers: this.headers
3818
+ }).pipe(map((/**
3819
+ * @param {?} res
3820
+ * @return {?}
3821
+ */
3822
+ (res) => {
3823
+ // Handle errors, display if enabled
3824
+ /** @type {?} */
3825
+ let err;
3826
+ if (!res) {
3827
+ err = new Error('Empty server response');
3828
+ }
3829
+ else if (res.result_msg === 'KO') {
3830
+ err = new Error(res.msg);
3831
+ }
3832
+ if (err) {
3833
+ console.error(err);
3834
+ if (displayError) {
3835
+ this.toastr.error(err.message);
3836
+ }
3837
+ throw new Error(err);
3838
+ }
3839
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3840
+ })), catchError((/**
3841
+ * @param {?} err
3842
+ * @return {?}
3843
+ */
3844
+ (err) => {
3845
+ // In a real world app, we might use a remote logging infrastructure
3846
+ // We'd also dig deeper into the error to get a better message
3847
+ /** @type {?} */
3848
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3849
+ console.error(errMsg); // log to console instead
3850
+ throw err;
3851
+ })));
4212
3852
  }
4213
3853
  /**
4214
3854
  * @return {?}
4215
3855
  */
4216
- fillCombo() {
4217
- // console.log(this.init_fill);
4218
- // if(!this.init_fill){this.init_fill=true;return;}
4219
- // console.log("fillcombo "+this.sql);
4220
- if (this.sql.indexOf('|') != -1 && this.sql.indexOf('$') != -1) {
4221
- this.set_options(this.sql);
4222
- return;
3856
+ checkCredentials_toLogin() {
3857
+ if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
3858
+ this.goto_after = window.location.toString();
3859
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
3860
+ if (this.router.url.indexOf('/rp/') == -1)
3861
+ this.router.navigate(['login']);
3862
+ return false;
4223
3863
  }
4224
- /** @type {?} */
4225
- let p = new QParam();
4226
- p.sql = this.sql;
4227
- p.types = this.types;
4228
- p.values = this.values;
4229
- // console.log(p);
4230
- if (this.db_type == "1")
4231
- this
4232
- ._dataService
4233
- .doQuery(p)
4234
- .subscribe((/**
4235
- * @param {?} data
4236
- * @return {?}
4237
- */
4238
- data => {
4239
- if (data != null)
4240
- if (data.result_msg == "OK") {
4241
- this.resetD(data.result_data);
4242
- }
4243
- }), (/**
4244
- * @param {?} err
4245
- * @return {?}
4246
- */
4247
- err => {
4248
- this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + this.sql + "]";
4249
- }));
4250
- if (this.db_type == "2")
4251
- this
4252
- ._dataService_odbc
4253
- .doQuery(p)
4254
- .subscribe((/**
4255
- * @param {?} data
4256
- * @return {?}
4257
- */
4258
- data => {
4259
- if (data != null)
4260
- if (data.result_msg == "OK") {
4261
- for (let i = 0; i < data.result_data.length; i++) {
4262
- if (data.result_data[i].VALORE != null)
4263
- data.result_data[i].valore = data.result_data[i].VALORE;
4264
- if (data.result_data[i].DESCRIZIONE_VALORE != null)
4265
- data.result_data[i].descrizione_valore = data.result_data[i].DESCRIZIONE_VALORE;
4266
- }
4267
- this.resetD(data.result_data);
4268
- }
4269
- }), (/**
4270
- * @param {?} err
4271
- * @return {?}
4272
- */
4273
- err => {
4274
- this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + this.sql + "]";
4275
- }));
3864
+ return true;
4276
3865
  }
4277
3866
  /**
4278
- * @param {?} o
4279
3867
  * @return {?}
4280
3868
  */
4281
- add_option(o) {
4282
- this.myData.push(o);
3869
+ checkCredentials() {
3870
+ if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
3871
+ this.goto_after = window.location.toString();
3872
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
3873
+ return false;
3874
+ }
3875
+ return true;
4283
3876
  }
3877
+ }
3878
+ AuthenticationService.decorators = [
3879
+ { type: Injectable, args: [{
3880
+ providedIn: 'root',
3881
+ },] }
3882
+ ];
3883
+ /** @nocollapse */
3884
+ AuthenticationService.ctorParameters = () => [
3885
+ { type: QueryService },
3886
+ { type: ToastrService },
3887
+ { type: HttpClient },
3888
+ { type: Router },
3889
+ { type: ActivatedRoute },
3890
+ { type: FileService },
3891
+ { type: AppService },
3892
+ { type: UtilityService }
3893
+ ];
3894
+ /** @nocollapse */ AuthenticationService.ngInjectableDef = defineInjectable({ factory: function AuthenticationService_Factory() { return new AuthenticationService(inject(QueryService), inject(ToastrService), inject(HttpClient), inject(Router), inject(ActivatedRoute), inject(FileService), inject(AppService), inject(UtilityService)); }, token: AuthenticationService, providedIn: "root" });
3895
+
3896
+ /**
3897
+ * @fileoverview added by tsickle
3898
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3899
+ */
3900
+ class WinAskTextBigComponent {
4284
3901
  /**
4285
- * @param {?} o
4286
- * @return {?}
3902
+ * @param {?} dialogRef
3903
+ * @param {?} toastr
4287
3904
  */
4288
- resetD(o) {
4289
- this.myData = o;
4290
- this.selval = '-1';
4291
- // console.log(this.smtr); console.log(this.smtr.nativeElement);
4292
- this.setByValue(this.valDef);
4293
- if (this.getValue() == "-1" && this.valDef != "-1")
4294
- this.setByDescri(this.valDef);
4295
- this.fillend.emit();
3905
+ constructor(dialogRef, toastr) {
3906
+ this.dialogRef = dialogRef;
3907
+ this.toastr = toastr;
3908
+ this.title = "";
3909
+ this.label = "";
3910
+ this.valore = "";
3911
+ this.readonly = false;
3912
+ this.show_annulla = true;
3913
+ this.show_ok = true;
3914
+ this.min_chars = 3;
4296
3915
  }
4297
3916
  /**
4298
- * @param {?} desc_val
4299
3917
  * @return {?}
4300
3918
  */
4301
- setByDescri(desc_val) {
4302
- // console.log("setByDescri "+desc_val);
4303
- this.valDef = desc_val;
4304
- this.selval = '-1';
4305
- if (desc_val == "")
4306
- return;
4307
- if (this.myData == null)
4308
- return;
4309
- if (this.myData.length == 0 || this.myData[0] == null)
4310
- return;
4311
- for (let j = 0; j < this.myData.length; j++)
4312
- if (this.myData[j].descrizione_valore == desc_val) {
4313
- this.selval = "" + this.myData[j].valore;
4314
- if (this.myData[j].descrizione_valore != null)
4315
- this.descri_val = this.myData[j].descrizione_valore;
4316
- this.update_dis();
4317
- return;
4318
- }
4319
- this.update_dis();
3919
+ ngOnInit() {
4320
3920
  }
4321
3921
  /**
4322
- * @param {?} ind
4323
3922
  * @return {?}
4324
3923
  */
4325
- setByIndex(ind) {
4326
- this.valDef = "";
4327
- this.selval = '-1';
4328
- if (this.myData == null)
4329
- return;
4330
- if (this.myData.length == 0 || this.myData[0] == null)
4331
- return;
4332
- if (this.myData.length > ind) {
4333
- this.setByDescri(this.myData[ind].descrizione_valore);
4334
- }
3924
+ show() {
4335
3925
  }
4336
3926
  /**
4337
3927
  * @return {?}
4338
3928
  */
4339
- getObj() {
4340
- if (this.selval == null)
4341
- return null;
4342
- if (this.selval == "-1")
4343
- return null;
4344
- else
4345
- for (let j = 0; j < this.myData.length; j++)
4346
- if (this.myData[j].valore == this.selval) {
4347
- return this.myData[j];
4348
- }
3929
+ hide() {
3930
+ this.dialogRef.close(null);
4349
3931
  }
4350
3932
  /**
4351
- * @param {?} desc_val
4352
3933
  * @return {?}
4353
3934
  */
4354
- setByValue(desc_val) {
4355
- this.valDef = desc_val;
4356
- this.selval = '-1';
4357
- // console.log(this.myData);
4358
- if ("" + desc_val == "") {
4359
- // console.log('qqq1111');
4360
- return;
4361
- }
4362
- // console.log("qui");
4363
- if (this.myData == null)
4364
- return;
4365
- // console.log("qui1");
4366
- if (this.myData.length == 0 || this.myData[0] == null)
3935
+ do_check() {
3936
+ if (this.valore.length < this.min_chars) {
3937
+ this.toastr.error('Il valore deve contenere almeno ' + this.min_chars + ' caratteri');
4367
3938
  return;
4368
- //console.log("qui2");
4369
- for (let j = 0; j < this.myData.length; j++) {
4370
- //console.log(this.myData[j].valore +' '+ desc_val);
4371
- if (this.myData[j].valore == desc_val) {
4372
- this.selval = "" + this.myData[j].valore;
4373
- if (this.myData[j].descrizione_valore != null)
4374
- this.descri_val = this.myData[j].descrizione_valore;
4375
- this.update_dis();
4376
- return;
4377
- }
4378
3939
  }
4379
- this.update_dis();
3940
+ this.dialogRef.close(this.valore);
4380
3941
  }
4381
3942
  /**
4382
3943
  * @return {?}
4383
3944
  */
4384
- getDescri() {
4385
- if (!this.enabled) {
4386
- if (this.selval == null)
4387
- return this.valDef;
4388
- if (this.selval == "-1")
4389
- return this.valDef;
4390
- }
4391
- if (this.selval == null)
4392
- return "-1";
4393
- if (this.selval == "-1")
4394
- return "-1";
4395
- else
4396
- for (let j = 0; j < this.myData.length; j++)
4397
- if (this.myData[j].valore == this.selval) {
4398
- return this.myData[j].descrizione_valore;
4399
- }
3945
+ chiudi() {
3946
+ this.dialogRef.close(null);
3947
+ }
3948
+ }
3949
+ WinAskTextBigComponent.decorators = [
3950
+ { type: Component, args: [{
3951
+ selector: 'app-win_ask_text',
3952
+ template: `
3953
+
3954
+ <h2 mat-dialog-title>{{title}}</h2>
3955
+ <mat-dialog-content style="width:630px;font-size: 12px;">
3956
+ <mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
3957
+ <textarea matInput [readonly]="readonly" [(ngModel)]="valore" style="min-width:600px" rows="15"
3958
+ required></textarea>
3959
+ </mat-form-field>
3960
+ </mat-dialog-content>
3961
+ <div fxLayout="row" fxLayoutAlign="center center" style="width: 100%">
3962
+
3963
+ <button *ngIf="show_ok" mat-flat-button color="primary" (click)="do_check()">OK</button>&nbsp;&nbsp;&nbsp;
3964
+ <button *ngIf="show_annulla" mat-flat-button color="warn" (click)="chiudi()">ANNULLA</button>
3965
+ </div>
3966
+
3967
+
3968
+ `
3969
+ }] }
3970
+ ];
3971
+ /** @nocollapse */
3972
+ WinAskTextBigComponent.ctorParameters = () => [
3973
+ { type: MatDialogRef },
3974
+ { type: ToastrService }
3975
+ ];
3976
+ WinAskTextBigComponent.propDecorators = {
3977
+ title: [{ type: Input }],
3978
+ label: [{ type: Input }],
3979
+ valore: [{ type: Input }],
3980
+ readonly: [{ type: Input }],
3981
+ show_annulla: [{ type: Input }],
3982
+ show_ok: [{ type: Input }]
3983
+ };
3984
+
3985
+ /**
3986
+ * @fileoverview added by tsickle
3987
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3988
+ */
3989
+ class FHWinComboSelect {
3990
+ /**
3991
+ * @param {?} dialogRef
3992
+ * @param {?} toastr
3993
+ */
3994
+ constructor(dialogRef, toastr) {
3995
+ this.dialogRef = dialogRef;
3996
+ this.toastr = toastr;
3997
+ this.label = "";
3998
+ this.width = "100%";
3999
+ this.nota = false;
4000
+ this.nota_val = "";
4400
4001
  }
4401
4002
  /**
4003
+ * @param {?} lab
4004
+ * @param {?} myD
4005
+ * @param {?=} nota
4402
4006
  * @return {?}
4403
4007
  */
4404
- getValue() {
4405
- // console.log(this.selval);
4406
- if (!this.enabled) {
4407
- if (this.selval == null)
4408
- return this.valDef;
4409
- if (this.selval == "-1")
4410
- return this.valDef;
4008
+ set_selection(lab, myD, nota = false) {
4009
+ this.nota = nota;
4010
+ this.label = lab;
4011
+ for (let i = 0; i < myD.length; i++)
4012
+ this.cmb_sel.add_option(myD[i]);
4013
+ }
4014
+ /**
4015
+ * @return {?}
4016
+ */
4017
+ ok() {
4018
+ if (this.cmb_sel.getValue() == "-1") {
4019
+ this.toastr.error('Selezionare un valore');
4020
+ return;
4411
4021
  }
4412
- if (this.selval == null)
4413
- return "-1";
4414
- if (this.selval == "")
4415
- return "-1";
4416
- else
4417
- return this.selval;
4022
+ this.cmb_sel.getObj().nota = this.nota_val;
4023
+ this.dialogRef.close(this.cmb_sel.getObj());
4418
4024
  }
4419
4025
  /**
4420
- * @param {?} campo
4421
4026
  * @return {?}
4422
4027
  */
4423
- getData(campo) {
4424
- for (var x in this.myData) {
4425
- if (this.myData[x]['valore'] == this.selval) {
4426
- return (this.myData[x][campo]);
4427
- }
4428
- else {
4429
- continue;
4430
- }
4028
+ ngOnInit() {
4029
+ }
4030
+ }
4031
+ FHWinComboSelect.decorators = [
4032
+ { type: Component, args: [{
4033
+ selector: 'fhwincomboselect',
4034
+ template: `
4035
+
4036
+ <div fxLayout="column">
4037
+ <mat-dialog-content style="font-size: 12px;" >
4038
+
4039
+ <div fxLayout="column">
4040
+ <h3>
4041
+ {{label | uppercase}}
4042
+ </h3>
4043
+ <FHComboBox #cmb_sel [init_fill]="false"></FHComboBox>
4044
+ <mat-form-field *ngIf="nota" appearance="outline" floatLabel="always"><mat-label>Nota</mat-label>
4045
+ <textarea matInput [(ngModel)]="nota_val" rows="12"></textarea>
4046
+ </mat-form-field>
4047
+ </div>
4048
+ </mat-dialog-content>
4049
+
4050
+
4051
+ <mat-dialog-actions fxFlex="100" fxLayout="row" fxLayoutAlign="center center">
4052
+ <button mat-flat-button color="primary" (click)="ok()">OK</button>&nbsp;&nbsp;&nbsp;&nbsp;
4053
+ <button mat-flat-button color="warn" (click)="dialogRef.close(null)">ANNULLA</button>
4054
+ </mat-dialog-actions>
4055
+ </div>
4056
+ `
4057
+ }] }
4058
+ ];
4059
+ /** @nocollapse */
4060
+ FHWinComboSelect.ctorParameters = () => [
4061
+ { type: MatDialogRef },
4062
+ { type: ToastrService }
4063
+ ];
4064
+ FHWinComboSelect.propDecorators = {
4065
+ cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
4066
+ };
4067
+
4068
+ /**
4069
+ * @fileoverview added by tsickle
4070
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4071
+ */
4072
+ class FHUploadPanelComponent {
4073
+ /**
4074
+ * @param {?} _appservice
4075
+ * @param {?} _dataService
4076
+ * @param {?} toastr
4077
+ * @param {?} dialog
4078
+ * @param {?} auth_s
4079
+ * @param {?} uti
4080
+ */
4081
+ constructor(_appservice, _dataService, toastr, dialog, auth_s, uti) {
4082
+ this._appservice = _appservice;
4083
+ this._dataService = _dataService;
4084
+ this.toastr = toastr;
4085
+ this.dialog = dialog;
4086
+ this.auth_s = auth_s;
4087
+ this.uti = uti;
4088
+ this.enabled = true;
4089
+ this.label = '';
4090
+ this.sovrascrivi_path = '';
4091
+ this.ruolo_supervisore = '[ZZZ_DIS_CC]';
4092
+ this.access_control = false;
4093
+ this.show_images = true;
4094
+ this.change = new EventEmitter();
4095
+ this.App = '';
4096
+ this.K = '';
4097
+ this.image_type = false;
4098
+ this.b_edit_loaded = false;
4099
+ this.b_False = false;
4100
+ this.b_mobile = false;
4101
+ this.b_ini = false;
4102
+ this.m_p_tipo = "";
4103
+ this.multi_list = false;
4104
+ this.m_programma_da_eseguire = "";
4105
+ }
4106
+ /**
4107
+ * @param {?} ax
4108
+ * @return {?}
4109
+ */
4110
+ download_all(ax) {
4111
+ if (ax.APP != null)
4112
+ ax.App = ax.APP;
4113
+ if (this.sovrascrivi_path == '') {
4114
+ window.open(this._appservice.COMPANY_SITE_ROOT + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
4115
+ }
4116
+ else {
4117
+ window.open(this.sovrascrivi_path + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
4431
4118
  }
4432
4119
  }
4433
4120
  /**
4434
- * @param {?} s
4121
+ * @param {?} ax
4435
4122
  * @return {?}
4436
4123
  */
4437
- set_options(s) {
4438
- this.myData = new Array();
4124
+ edit_tipo(ax) {
4439
4125
  /** @type {?} */
4440
- let a = s.split('$');
4441
- for (let i = 0; i < a.length; i++) {
4442
- /** @type {?} */
4443
- var o = new Object();
4444
- /** @type {?} */
4445
- var av = a[i].split('|');
4446
- o.valore = av[1];
4447
- o.descrizione_valore = av[0];
4448
- this
4449
- .myData
4450
- .push(o);
4451
- }
4452
- this.setByValue(this.valDef);
4453
- if (this.getValue() == "-1")
4454
- this.setByDescri(this.valDef);
4126
+ let p = new QParam();
4127
+ p.sql = this.m_p_tipo;
4128
+ p.types = [];
4129
+ p.values = [];
4130
+ this
4131
+ ._dataService
4132
+ .doQuery(p)
4133
+ .subscribe((/**
4134
+ * @param {?} data
4135
+ * @return {?}
4136
+ */
4137
+ data => {
4138
+ if (data != null)
4139
+ if (data.result_msg == "OK") {
4140
+ /** @type {?} */
4141
+ let dialogRef = this
4142
+ .dialog
4143
+ .open(FHWinComboSelect);
4144
+ dialogRef.componentInstance.set_selection("Tipologia Allegato", data.result_data);
4145
+ dialogRef
4146
+ .afterClosed()
4147
+ .subscribe((/**
4148
+ * @param {?} result
4149
+ * @return {?}
4150
+ */
4151
+ result => {
4152
+ if (result != null) {
4153
+ /** @type {?} */
4154
+ let p = new QParam();
4155
+ p.sql = "UPDATE_ALLEGATI_TIPO";
4156
+ p.types = ['int', 'string'];
4157
+ p.values = [ax.id, result.descrizione_valore];
4158
+ this
4159
+ ._dataService
4160
+ .doQuery(p)
4161
+ .subscribe((/**
4162
+ * @param {?} data
4163
+ * @return {?}
4164
+ */
4165
+ data => {
4166
+ if (data != null)
4167
+ if (data.result_msg == "OK") {
4168
+ this.ref_allegato();
4169
+ }
4170
+ }));
4171
+ }
4172
+ }));
4173
+ }
4174
+ }));
4175
+ }
4176
+ /**
4177
+ * @param {?} ax
4178
+ * @return {?}
4179
+ */
4180
+ edit_descri(ax) {
4181
+ /** @type {?} */
4182
+ let dialogRef = this
4183
+ .dialog
4184
+ .open(WinAskTextBigComponent);
4185
+ dialogRef.componentInstance.label = "Descrizione Allegato";
4186
+ dialogRef.componentInstance.valore = ax.descrizione;
4187
+ dialogRef.componentInstance.min_chars = 0;
4188
+ dialogRef
4189
+ .afterClosed()
4190
+ .subscribe((/**
4191
+ * @param {?} result
4192
+ * @return {?}
4193
+ */
4194
+ result => {
4195
+ if (result != null) {
4196
+ /** @type {?} */
4197
+ let p = new QParam();
4198
+ p.sql = "UPDATE_ALLEGATI_DESCRIZIONE";
4199
+ p.types = ['int', 'string'];
4200
+ p.values = [ax.id, result];
4201
+ this
4202
+ ._dataService
4203
+ .doQuery(p)
4204
+ .subscribe((/**
4205
+ * @param {?} data
4206
+ * @return {?}
4207
+ */
4208
+ data => {
4209
+ if (data != null)
4210
+ if (data.result_msg == "OK") {
4211
+ this.ref_allegato();
4212
+ }
4213
+ }));
4214
+ }
4215
+ }));
4216
+ }
4217
+ /**
4218
+ * @param {?} ax
4219
+ * @return {?}
4220
+ */
4221
+ delete(ax) {
4222
+ localStorage.setItem(this._appservice.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
4223
+ localStorage.setItem(this._appservice.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
4224
+ /** @type {?} */
4225
+ let dialogRef = this
4226
+ .dialog
4227
+ .open(FHConfirmComponent);
4228
+ dialogRef
4229
+ .afterClosed()
4230
+ .subscribe((/**
4231
+ * @param {?} result
4232
+ * @return {?}
4233
+ */
4234
+ result => {
4235
+ if (result) {
4236
+ /** @type {?} */
4237
+ let p = new QParam();
4238
+ p.sql = "DELETE_ALLEGATO";
4239
+ p.types = ['int', 'string'];
4240
+ p.values = [ax.id, this.auth_s.username];
4241
+ this
4242
+ ._dataService
4243
+ .doQuery(p)
4244
+ .subscribe((/**
4245
+ * @param {?} data
4246
+ * @return {?}
4247
+ */
4248
+ data => {
4249
+ if (data != null)
4250
+ if (data.result_msg == "OK") {
4251
+ // this.arr_g = data.result_data;
4252
+ this.ref_allegato();
4253
+ this
4254
+ .toastr
4255
+ .info("INFO", "ALLEGATO ELIMINATO", {
4256
+ timeOut: 1000,
4257
+ progressBar: true
4258
+ });
4259
+ }
4260
+ }), (/**
4261
+ * @param {?} err
4262
+ * @return {?}
4263
+ */
4264
+ err => {
4265
+ }));
4266
+ }
4267
+ }));
4268
+ }
4269
+ /**
4270
+ * @return {?}
4271
+ */
4272
+ ngOnInit() {
4273
+ this.upc.single = false;
4274
+ this.b_mobile = this._appservice.getState().pageFullscreen;
4275
+ console.log('this.m_p_tipo ', this.m_p_tipo);
4276
+ this
4277
+ .upc
4278
+ .init(this.App, this.K, 'Descrizione Allegato', this.m_p_tipo, this.m_programma_da_eseguire);
4279
+ if (this.m_p_tipo.indexOf('SELECT_') > -1) {
4280
+ this.multi_list = true;
4281
+ }
4282
+ this.ref_allegato();
4283
+ }
4284
+ /**
4285
+ * @param {?} p_app
4286
+ * @param {?} p_k
4287
+ * @param {?=} p_tipo
4288
+ * @param {?=} programma_da_eseguire
4289
+ * @return {?}
4290
+ */
4291
+ init(p_app, p_k, p_tipo = "", programma_da_eseguire = "") {
4292
+ this.App = p_app;
4293
+ this.K = p_k;
4294
+ this.b_ini = true;
4295
+ this.b_edit_loaded = false;
4296
+ this.m_p_tipo = p_tipo;
4297
+ this.m_programma_da_eseguire = programma_da_eseguire;
4298
+ this.ngOnInit();
4299
+ }
4300
+ /**
4301
+ * @return {?}
4302
+ */
4303
+ ref_allegato() {
4304
+ if (this.App == null)
4305
+ return;
4306
+ if (this.App == "")
4307
+ return;
4308
+ /** @type {?} */
4309
+ let p = new QParam();
4310
+ p.sql = "SELECT_ALLEGATO_INFO";
4311
+ p.types = ['string', 'string'];
4312
+ p.values = [this.App, this.K];
4313
+ this
4314
+ ._dataService
4315
+ .doQuery(p)
4316
+ .subscribe((/**
4317
+ * @param {?} data
4318
+ * @return {?}
4319
+ */
4320
+ data => {
4321
+ if (data != null)
4322
+ if (data.result_msg == "OK") {
4323
+ this.arr_g = data.result_data;
4324
+ /** @type {?} */
4325
+ let iconf = "webinfo";
4326
+ for (let i = 0; i < this.arr_g.length; i++) {
4327
+ if (this.arr_g[i].APP != null)
4328
+ this.arr_g[i].App = this.arr_g[i].APP;
4329
+ if (this.arr_g[i].descrizione != null)
4330
+ this.arr_g[i].descrizione_vis = this.arr_g[i].descrizione.split('\n').join('<br>');
4331
+ else
4332
+ this.arr_g[i].descrizione_vis = '';
4333
+ /** @type {?} */
4334
+ let arrf = this.arr_g[i].Filename.split('.');
4335
+ if (this.sovrascrivi_path == '') {
4336
+ this.arr_g[i].url = this._appservice.COMPANY_SITE_ROOT + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
4337
+ this.arr_g[i].url_orig = this._appservice.COMPANY_SITE_ROOT + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
4338
+ }
4339
+ else {
4340
+ this.arr_g[i].url = this.sovrascrivi_path + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
4341
+ this.arr_g[i].url_orig = this.sovrascrivi_path + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
4342
+ }
4343
+ if ('3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH'.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
4344
+ iconf = arrf[arrf.length - 1].toLocaleLowerCase();
4345
+ this.arr_g[i].icon = iconf + '.svg';
4346
+ this.arr_g[i].can_delete = !this.access_control || this.arr_g[i].idp == this._appservice.user || this.uti.hasRole(this.ruolo_supervisore);
4347
+ if ((this.arr_g[i].Filename.indexOf(".jpg") != -1 || this.arr_g[i].Filename.indexOf(".gif") != -1 || this.arr_g[i].Filename.indexOf(".png") != -1) && this.show_images) {
4348
+ this.arr_g[i].type = "IMG";
4349
+ this.arr_g[i].image_original = [this.arr_g[i].url];
4350
+ if (this.arr_g[i].preview != null)
4351
+ if (this.arr_g[i].preview == 1) {
4352
+ /** @type {?} */
4353
+ let pcs = this.arr_g[i].url.split('.');
4354
+ /** @type {?} */
4355
+ let lastPc = pcs.pop();
4356
+ this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
4357
+ }
4358
+ this.image_type = true;
4359
+ this.arr_g[i].image_thumbnail = [this.arr_g[i].url];
4360
+ }
4361
+ else
4362
+ this.arr_g[i].type = "O";
4363
+ }
4364
+ }
4365
+ }));
4366
+ }
4367
+ }
4368
+ FHUploadPanelComponent.decorators = [
4369
+ { type: Component, args: [{
4370
+ selector: 'FHUploadPanel', template: `
4371
+ <div fxLayout="column">
4372
+ <h3>{{label}}</h3>
4373
+ <div fxLayout="column">
4374
+ <div [hidden]="!enabled">
4375
+ <FHUpload [single]="b_False" [lista_allegati]="arr_g" (change)="ref_allegato()" #upc></FHUpload>
4376
+ </div>
4377
+ <table width="98%" class="fh_table" *ngIf="!image_type && !b_mobile">
4378
+ <thead>
4379
+ <tr class="header">
4380
+ <th style="width:40px"></th>
4381
+ <th style="width:50%">Nome</th>
4382
+ <th style="width:60px;text-align:center">Dim.</th>
4383
+ <th style="width:40%">Descrizione</th>
4384
+ <th *ngIf="multi_list" style="width:20%">Tipo</th>
4385
+
4386
+ <th style="width:40px" class="actions"></th>
4387
+ <th style="width:30%" >Utente</th>
4388
+ <th style="width:240px;text-align:center">Data</th>
4389
+ <th style="width:40px" class="actions"></th>
4390
+ <th *ngIf="enabled" style="width:40px" class="actions"></th>
4391
+ </tr>
4392
+ </thead>
4393
+ <tbody>
4394
+ <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
4395
+ <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
4396
+ <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
4397
+ <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
4398
+ <td>{{app.Filename}}</td>
4399
+ <td style="text-align:center">{{app.Filesize}}</td>
4400
+ <td>
4401
+ <div fxLayout="row">
4402
+ <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
4403
+ <mat-icon>edit</mat-icon>
4404
+ </a>
4405
+
4406
+ <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4407
+ <mat-icon>edit</mat-icon>
4408
+ </a>
4409
+
4410
+ <div [innerHTML]="app.descrizione_vis" style="width:100%">
4411
+ </div>
4412
+ </div></td>
4413
+
4414
+
4415
+ <td>
4416
+ <div fxLayout="row">
4417
+ <a mat-icon-button matTooltip="Modifica Tipo" *ngIf="app.can_delete" (click)="edit_tipo(app)">
4418
+ <mat-icon>edit</mat-icon>
4419
+ </a>
4420
+
4421
+ <a mat-icon-button [matTooltip]="'Modifica Tipologia consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4422
+ <mat-icon>edit</mat-icon>
4423
+ </a>
4424
+
4425
+ <div [innerHTML]="app.tipo" style="width:100%">
4426
+ </div>
4427
+ </div></td>
4428
+
4429
+ <td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
4430
+ <fh-image-viewer [u]="app"></fh-image-viewer>
4431
+
4432
+ </td>
4433
+ <td *ngIf="app.type!='IMG'">
4434
+
4435
+ </td>
4436
+ <td>{{app.nc}}</td>
4437
+ <td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
4438
+ <td style="text-align:center">
4439
+ <button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
4440
+ <mat-icon>cloud_download</mat-icon>
4441
+ </button>
4442
+ </td>
4443
+
4444
+ <td *ngIf="enabled" style="text-align:center">
4445
+ <a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
4446
+ <mat-icon>delete</mat-icon>
4447
+ </a>
4448
+
4449
+ <a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4450
+ <mat-icon>delete</mat-icon>
4451
+ </a>
4452
+
4453
+ </td>
4454
+
4455
+ </tr>
4456
+ </tbody>
4457
+ </table>
4458
+ <table width="98%" class="fh_table" *ngIf="image_type && !b_mobile">
4459
+ <thead>
4460
+ <tr class="header">
4461
+ <th style="width:40px"></th>
4462
+ <th style="width:50%">Nome</th>
4463
+ <th style="width:60px;text-align:center">Dim.</th>
4464
+
4465
+ <th style="width:20%">Descrizione</th>
4466
+ <th *ngIf="multi_list" style="width:10%">Tipo</th>
4467
+ <th style="width:40%" ></th>
4468
+
4469
+
4470
+ <th style="width:10%" >Utente</th>
4471
+ <th style="width:240px;text-align:center">Data</th>
4472
+ <th style="width:40px" class="actions"></th>
4473
+ <th *ngIf="enabled" style="width:40px" class="actions"></th>
4474
+ </tr>
4475
+ </thead>
4476
+ <tbody>
4477
+
4478
+ <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
4479
+ <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
4480
+ <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
4481
+ <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
4482
+
4483
+ <td>{{app.Filename}}</td>
4484
+ <td style="text-align:center">{{app.Filesize}}</td>
4485
+ <td>
4486
+ <div fxLayout="row">
4487
+ <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
4488
+ <mat-icon>edit</mat-icon>
4489
+ </a>
4490
+
4491
+ <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4492
+ <mat-icon>edit</mat-icon>
4493
+ </a>
4494
+
4495
+ <div [innerHTML]="app.descrizione_vis" style="width:100%">
4496
+ </div>
4497
+ </div></td>
4498
+ <td *ngIf="multi_list">
4499
+ <div fxLayout="row">
4500
+ <a mat-icon-button matTooltip="Modifica Tipo" *ngIf="app.can_delete" (click)="edit_tipo(app)">
4501
+ <mat-icon>edit</mat-icon>
4502
+ </a>
4503
+
4504
+ <a mat-icon-button [matTooltip]="'Modifica Tipologia consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4505
+ <mat-icon>edit</mat-icon>
4506
+ </a>
4507
+
4508
+ <div [innerHTML]="app.tipo" style="width:100%">
4509
+ </div>
4510
+ </div></td>
4511
+
4512
+ <td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
4513
+ <fh-image-viewer [u]="app"></fh-image-viewer>
4514
+
4515
+ </td>
4516
+ <td *ngIf="app.type!='IMG'">
4517
+
4518
+ </td>
4519
+ <td>{{app.nc}}</td>
4520
+ <td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
4521
+ <td style="text-align:center">
4522
+ <button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
4523
+ <mat-icon>cloud_download</mat-icon>
4524
+ </button>
4525
+ </td>
4526
+
4527
+ <td *ngIf="enabled" style="text-align:center">
4528
+ <a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
4529
+ <mat-icon>delete</mat-icon>
4530
+ </a>
4531
+
4532
+ <a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4533
+ <mat-icon>delete</mat-icon>
4534
+ </a>
4535
+
4536
+ </td>
4537
+
4538
+ </tr>
4539
+ </tbody>
4540
+ </table>
4541
+ <table width="98%" class="fh_table" *ngIf="b_mobile">
4542
+ <tbody>
4543
+
4544
+ <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
4545
+ <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
4546
+ <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
4547
+ <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
4548
+ <td *ngIf="b_mobile" style="text-align:center">{{app.Filename}}<br><br>
4549
+ <button style="background-color: #F5F5F5" (click)="download_all(app)" mat-flat-button>DOWNLOAD</button>
4550
+ </td>
4551
+ </tr>
4552
+ </tbody>
4553
+ </table>
4554
+ </div>
4555
+ </div>
4556
+ <div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
4557
+
4558
+ `,
4559
+ styles: [`
4560
+
4561
+
4562
+
4563
+ `]
4564
+ }] }
4565
+ ];
4566
+ /** @nocollapse */
4567
+ FHUploadPanelComponent.ctorParameters = () => [
4568
+ { type: AppService },
4569
+ { type: QueryService },
4570
+ { type: ToastrService },
4571
+ { type: MatDialog },
4572
+ { type: AuthenticationService },
4573
+ { type: UtilityService }
4574
+ ];
4575
+ FHUploadPanelComponent.propDecorators = {
4576
+ enabled: [{ type: Input }],
4577
+ label: [{ type: Input }],
4578
+ sovrascrivi_path: [{ type: Input }],
4579
+ ruolo_supervisore: [{ type: Input }],
4580
+ access_control: [{ type: Input }],
4581
+ show_images: [{ type: Input }],
4582
+ change: [{ type: Output }],
4583
+ upc: [{ type: ViewChild, args: ['upc',] }]
4584
+ };
4585
+
4586
+ /**
4587
+ * @fileoverview added by tsickle
4588
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4589
+ */
4590
+ class GridService {
4591
+ /**
4592
+ * @param {?} http
4593
+ * @param {?} app_s
4594
+ * @param {?} toastr
4595
+ */
4596
+ constructor(http, app_s, toastr) {
4597
+ this.http = http;
4598
+ this.app_s = app_s;
4599
+ this.toastr = toastr;
4600
+ this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT; // URL to web API
4455
4601
  }
4602
+ // URL to web API
4456
4603
  /**
4604
+ * @param {?} queryp
4605
+ * @param {?=} displayError
4606
+ * @param {?=} url_sec
4457
4607
  * @return {?}
4458
4608
  */
4459
- ngAfterViewInit() {
4460
- // console.log("ngAfterViewInit"); console.log(this.init_fill);
4609
+ doQuery(queryp, displayError = true, url_sec = null) {
4610
+ this.headers = new HttpHeaders({
4611
+ 'Content-Type': 'application/json',
4612
+ 'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
4613
+ });
4614
+ if (url_sec == null)
4615
+ this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT;
4616
+ else
4617
+ this.url = url_sec;
4618
+ /** @type {?} */
4619
+ let post_v = JSON.stringify(queryp);
4620
+ return this.http.post(this.url, post_v, { headers: this.headers })
4621
+ .pipe(map((/**
4622
+ * @param {?} res
4623
+ * @return {?}
4624
+ */
4625
+ (res) => {
4626
+ // Handle errors, display if enabled
4627
+ /** @type {?} */
4628
+ let err;
4629
+ if (!res) {
4630
+ err = new Error('Empty server response');
4631
+ }
4632
+ else if (res.result_msg === 'KO') {
4633
+ err = new Error(res.msg);
4634
+ }
4635
+ if (err) {
4636
+ console.error(err);
4637
+ if (displayError) {
4638
+ this.toastr.error(err.message);
4639
+ }
4640
+ throw new Error(err);
4641
+ }
4642
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
4643
+ })), catchError((/**
4644
+ * @param {?} err
4645
+ * @return {?}
4646
+ */
4647
+ (err) => {
4648
+ // In a real world app, we might use a remote logging infrastructure
4649
+ // We'd also dig deeper into the error to get a better message
4650
+ /** @type {?} */
4651
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
4652
+ console.error(errMsg); // log to console instead
4653
+ throw err;
4654
+ })));
4461
4655
  }
4656
+ }
4657
+ GridService.decorators = [
4658
+ { type: Injectable, args: [{
4659
+ providedIn: 'root',
4660
+ },] }
4661
+ ];
4662
+ /** @nocollapse */
4663
+ GridService.ctorParameters = () => [
4664
+ { type: HttpClient },
4665
+ { type: AppService },
4666
+ { type: ToastrService }
4667
+ ];
4668
+ /** @nocollapse */ GridService.ngInjectableDef = defineInjectable({ factory: function GridService_Factory() { return new GridService(inject(HttpClient), inject(AppService), inject(ToastrService)); }, token: GridService, providedIn: "root" });
4669
+
4670
+ /**
4671
+ * @fileoverview added by tsickle
4672
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4673
+ */
4674
+ class win_grid_help {
4462
4675
  /**
4463
- * @return {?}
4676
+ * @param {?} dialogRef
4677
+ * @param {?} toastr
4678
+ * @param {?} m_appService
4464
4679
  */
4465
- ngOnInit() {
4466
- if (this.init_fill == true) {
4467
- if (this.sql == '') {
4468
- //this.errorMsg="QUERY NON CONFIGURATA";
4469
- return;
4470
- }
4471
- this.fillCombo();
4472
- }
4473
- else {
4474
- this.errorMsg = "";
4475
- }
4476
- this
4477
- .initend
4478
- .emit();
4680
+ constructor(dialogRef, toastr, m_appService) {
4681
+ this.dialogRef = dialogRef;
4682
+ this.toastr = toastr;
4683
+ this.m_appService = m_appService;
4684
+ this.title = "";
4479
4685
  }
4480
4686
  /**
4481
4687
  * @return {?}
4482
4688
  */
4483
- sc() {
4484
- this
4485
- .selchange
4486
- .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
4689
+ ngOnInit() {
4487
4690
  }
4488
4691
  }
4489
- FHComboboxComponent.decorators = [
4692
+ win_grid_help.decorators = [
4490
4693
  { type: Component, args: [{
4491
- selector: 'FHComboBox', template: `
4492
- <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
4493
- <mat-select #cmb [(ngModel)]="selval" (selectionChange)="sc()" [required]="required">
4494
- <mat-option value="-1">{{sel_label}}</mat-option>
4495
- <mat-option value="{{app.valore}}" *ngFor="let app of myData">{{app.descrizione_valore}}</mat-option>
4496
- </mat-select>
4497
- </mat-form-field>
4694
+ template: `
4498
4695
 
4499
- <mat-form-field [hidden]="enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
4500
- <input type="text" #el1 matInput [disabled]="true" [(ngModel)]="dis_value">
4501
- </mat-form-field>
4696
+
4697
+
4698
+ <mat-dialog-content style="min-width:800px;min-height:500px">
4699
+ <mat-tab-group>
4700
+ <mat-tab label="FILTRI">
4701
+
4702
+
4703
+ <img src="assets/helps/fhgrid/filtri.png"/>
4704
+ </mat-tab>
4705
+ <mat-tab label="ORDINAMENTI">
4706
+ <img src="assets/helps/fhgrid/ordinamenti.png"/>
4707
+ </mat-tab>
4708
+ <mat-tab label="LAYOUT COLONNE">
4709
+ <img src="assets/helps/fhgrid/layout_colonne.png"/>
4710
+ </mat-tab>
4711
+ </mat-tab-group>
4712
+ </mat-dialog-content>
4713
+
4714
+
4715
+ <mat-dialog-actions>
4716
+ <button mat-flat-button style="background-color: #F5F5F5" (click)="dialogRef.close('')">CHIUDI</button>
4717
+ </mat-dialog-actions>
4502
4718
  `,
4503
4719
  styles: [`
4504
-
4720
+ agm-map {
4721
+ height: 600px;
4722
+ width: 100%;
4723
+ }
4505
4724
  `]
4506
4725
  }] }
4507
4726
  ];
4508
4727
  /** @nocollapse */
4509
- FHComboboxComponent.ctorParameters = () => [
4510
- { type: QueryService },
4511
- { type: OdbcService }
4512
- ];
4513
- FHComboboxComponent.propDecorators = {
4514
- init_fill: [{ type: Input }],
4515
- sql: [{ type: Input }],
4516
- types: [{ type: Input }],
4517
- values: [{ type: Input }],
4518
- hidden: [{ type: Input }],
4519
- label: [{ type: Input }],
4520
- enabled: [{ type: Input }],
4521
- required: [{ type: Input }],
4522
- sel_label: [{ type: Input }],
4523
- smtr: [{ type: ViewChild, args: ['cmb',] }],
4524
- fillend: [{ type: Output }],
4525
- selchange: [{ type: Output }],
4526
- initend: [{ type: Output }],
4527
- valDef: [{ type: Input }],
4528
- db_type: [{ type: Input }]
4529
- };
4728
+ win_grid_help.ctorParameters = () => [
4729
+ { type: MatDialogRef },
4730
+ { type: ToastrService },
4731
+ { type: AppService }
4732
+ ];
4530
4733
 
4531
4734
  /**
4532
4735
  * @fileoverview added by tsickle
@@ -9772,89 +9975,6 @@ ComboBoxEditor.propDecorators = {
9772
9975
  appdt: [{ type: ViewChild, args: ['appdt',] }]
9773
9976
  };
9774
9977
 
9775
- /**
9776
- * @fileoverview added by tsickle
9777
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
9778
- */
9779
- class FHWinComboSelect {
9780
- /**
9781
- * @param {?} dialogRef
9782
- * @param {?} toastr
9783
- */
9784
- constructor(dialogRef, toastr) {
9785
- this.dialogRef = dialogRef;
9786
- this.toastr = toastr;
9787
- this.label = "";
9788
- this.width = "100%";
9789
- this.nota = false;
9790
- this.nota_val = "";
9791
- }
9792
- /**
9793
- * @param {?} lab
9794
- * @param {?} myD
9795
- * @param {?=} nota
9796
- * @return {?}
9797
- */
9798
- set_selection(lab, myD, nota = false) {
9799
- this.nota = nota;
9800
- this.label = lab;
9801
- for (let i = 0; i < myD.length; i++)
9802
- this.cmb_sel.add_option(myD[i]);
9803
- }
9804
- /**
9805
- * @return {?}
9806
- */
9807
- ok() {
9808
- if (this.cmb_sel.getValue() == "-1") {
9809
- this.toastr.error('Selezionare un valore');
9810
- return;
9811
- }
9812
- this.cmb_sel.getObj().nota = this.nota_val;
9813
- this.dialogRef.close(this.cmb_sel.getObj());
9814
- }
9815
- /**
9816
- * @return {?}
9817
- */
9818
- ngOnInit() {
9819
- }
9820
- }
9821
- FHWinComboSelect.decorators = [
9822
- { type: Component, args: [{
9823
- selector: 'fhwincomboselect',
9824
- template: `
9825
-
9826
- <div fxLayout="column">
9827
- <mat-dialog-content style="font-size: 12px;" >
9828
-
9829
- <div fxLayout="column">
9830
- <h3>
9831
- {{label | uppercase}}
9832
- </h3>
9833
- <FHComboBox #cmb_sel [init_fill]="false"></FHComboBox>
9834
- <mat-form-field *ngIf="nota" appearance="outline" floatLabel="always"><mat-label>Nota</mat-label>
9835
- <textarea matInput [(ngModel)]="nota_val" rows="12"></textarea>
9836
- </mat-form-field>
9837
- </div>
9838
- </mat-dialog-content>
9839
-
9840
-
9841
- <mat-dialog-actions fxFlex="100" fxLayout="row" fxLayoutAlign="center center">
9842
- <button mat-flat-button color="primary" (click)="ok()">OK</button>&nbsp;&nbsp;&nbsp;&nbsp;
9843
- <button mat-flat-button color="warn" (click)="dialogRef.close(null)">ANNULLA</button>
9844
- </mat-dialog-actions>
9845
- </div>
9846
- `
9847
- }] }
9848
- ];
9849
- /** @nocollapse */
9850
- FHWinComboSelect.ctorParameters = () => [
9851
- { type: MatDialogRef },
9852
- { type: ToastrService }
9853
- ];
9854
- FHWinComboSelect.propDecorators = {
9855
- cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
9856
- };
9857
-
9858
9978
  /**
9859
9979
  * @fileoverview added by tsickle
9860
9980
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc