@fluxhub/fluxhub-lib 1.0.596 → 1.0.598

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)
@@ -3705,33 +3301,166 @@ class FHUploadPanelComponent {
3705
3301
  * @return {?}
3706
3302
  */
3707
3303
  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();
3304
+ /** @type {?} */
3305
+ let uo = {};
3306
+ uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
3307
+ // console.log('ngOnInit!!');
3308
+ if (this.multi_list)
3309
+ setTimeout((/**
3310
+ * @return {?}
3311
+ */
3312
+ () => { this.cmb_tipo.fillCombo(); }), 100);
3313
+ this.uploader.setOptions(uo);
3314
+ this.uploader.onCompleteAll = (/**
3315
+ * @return {?}
3316
+ */
3317
+ () => {
3318
+ this.loading = false;
3319
+ this.upload_ended.emit();
3320
+ if (this.dialogRef != null)
3321
+ if (this.dialogRef.componentInstance != null) {
3322
+ this.dialogRef.componentInstance.update_progess(100);
3323
+ this.dialogRef = null;
3324
+ }
3325
+ });
3326
+ this.uploader.onErrorItem = (/**
3327
+ * @param {?} a
3328
+ * @param {?} b
3329
+ * @param {?} c
3330
+ * @param {?} d
3331
+ * @return {?}
3332
+ */
3333
+ (a, b, c, d) => {
3334
+ this.toastr.error(b);
3335
+ });
3336
+ this.uploader.onAfterAddingFile = (/**
3337
+ * @param {?} fileItem
3338
+ * @return {?}
3339
+ */
3340
+ (fileItem) => {
3341
+ this.ch(fileItem);
3342
+ });
3343
+ this.uploader.onProgressItem = (/**
3344
+ * @param {?} fileItem
3345
+ * @param {?} progress
3346
+ * @return {?}
3347
+ */
3348
+ (fileItem, progress) => {
3349
+ // console.log(fileItem);
3350
+ // console.log(progress);
3351
+ this.loading = true;
3352
+ if (this.dialogRef != null)
3353
+ if (this.dialogRef.componentInstance != null)
3354
+ this.dialogRef.componentInstance.update_progess(progress);
3355
+ });
3356
+ this.uploader.onWhenAddingFileFailed = (/**
3357
+ * @param {?} item
3358
+ * @param {?} filter
3359
+ * @param {?} options
3360
+ * @return {?}
3361
+ */
3362
+ (item, filter, options) => {
3363
+ switch (filter.name) {
3364
+ case 'fileSize':
3365
+ /** @type {?} */
3366
+ let ar = Math.round(item.size / 1024 / 1024);
3367
+ this.toastr.error(this.limit_string.split('<size>').join('' + ar));
3368
+ break;
3369
+ default:
3370
+ this.toastr.error("Errore: " + filter.name);
3371
+ }
3372
+ });
3373
+ }
3374
+ /**
3375
+ * @return {?}
3376
+ */
3377
+ download_all() {
3378
+ window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + this.App + '/' + this.K + '/' + this.file_name);
3379
+ }
3380
+ /**
3381
+ * @param {?} fileItem
3382
+ * @return {?}
3383
+ */
3384
+ ch(fileItem) {
3385
+ if (this.descri_obb && this.descrizione == '') {
3386
+ this.toastr.error(this.inserire_descrizione);
3387
+ return;
3388
+ }
3389
+ for (let i = 0; i < this.lista_allegati.length; i++) {
3390
+ if (this.lista_allegati[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
3391
+ this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
3392
+ return;
3393
+ }
3394
+ }
3395
+ this.uploader.onBuildItemForm = (/**
3396
+ * @param {?} item
3397
+ * @param {?} form
3398
+ * @return {?}
3399
+ */
3400
+ (item, form) => {
3401
+ form.append('App', this.App);
3402
+ form.append('K', this.K);
3403
+ form.append('descrizione', this.descrizione);
3404
+ form.append('single', this.single);
3405
+ form.append('username', this.username);
3406
+ if (this.multi_list)
3407
+ form.append('tipo', this.cmb_tipo.getDescri().split('-1').join(''));
3408
+ else
3409
+ form.append('tipo', this.tipo);
3410
+ form.append('local_path', this.app_s.LOCAL_PATH);
3411
+ if (this.programma_da_eseguire != '')
3412
+ form.append('p1', this.programma_da_eseguire);
3413
+ });
3414
+ if (this.dialogRef == null) {
3415
+ this.dialogRef = this.dialog.open(WinWait, { 'disableClose': true });
3416
+ this.dialogRef.componentInstance.label = this.label_attendere;
3417
+ this.dialogRef.afterClosed().subscribe((/**
3418
+ * @param {?} result
3419
+ * @return {?}
3420
+ */
3421
+ result => {
3422
+ }));
3423
+ }
3424
+ this.uploader.uploadAll();
3714
3425
  }
3715
3426
  /**
3716
3427
  * @param {?} p_app
3717
3428
  * @param {?} p_k
3429
+ * @param {?} p_label
3718
3430
  * @param {?=} p_tipo
3719
3431
  * @param {?=} programma_da_eseguire
3432
+ * @param {?=} allow_delete
3720
3433
  * @return {?}
3721
3434
  */
3722
- init(p_app, p_k, p_tipo = "", programma_da_eseguire = "") {
3435
+ init(p_app, p_k, p_label, p_tipo = "", programma_da_eseguire = "", allow_delete = false) {
3723
3436
  this.App = p_app;
3724
3437
  this.K = p_k;
3438
+ this.label = p_label;
3439
+ this.tipo = p_tipo;
3725
3440
  this.b_ini = true;
3726
3441
  this.b_edit_loaded = false;
3727
- this.m_p_tipo = p_tipo;
3728
- this.m_programma_da_eseguire = programma_da_eseguire;
3729
- this.ngOnInit();
3442
+ this.descrizione = '';
3443
+ this.programma_da_eseguire = programma_da_eseguire;
3444
+ this.allow_delete = allow_delete;
3445
+ this.ref_allegato();
3446
+ // console.log('init! ',this.tipo)
3447
+ if (this.tipo.indexOf('SELECT_') > -1) {
3448
+ this.multi_list = true;
3449
+ //console.log('fillCombo');
3450
+ }
3730
3451
  }
3731
3452
  /**
3732
3453
  * @return {?}
3733
3454
  */
3734
3455
  ref_allegato() {
3456
+ // console.log(' ref_allegato')
3457
+ this.id = null;
3458
+ this.descrizione = '';
3459
+ this.file_name = '';
3460
+ this.label_b = '';
3461
+ this.cmb_tipo.resetValue();
3462
+ if (!this.single)
3463
+ return;
3735
3464
  if (this.App == null)
3736
3465
  return;
3737
3466
  if (this.App == "")
@@ -3741,287 +3470,156 @@ class FHUploadPanelComponent {
3741
3470
  p.sql = "SELECT_ALLEGATO_INFO";
3742
3471
  p.types = ['string', 'string'];
3743
3472
  p.values = [this.App, this.K];
3744
- this
3745
- ._dataService
3746
- .doQuery(p)
3747
- .subscribe((/**
3473
+ this._dataService.doQuery(p).subscribe((/**
3748
3474
  * @param {?} data
3749
3475
  * @return {?}
3750
3476
  */
3751
3477
  data => {
3752
3478
  if (data != null)
3753
3479
  if (data.result_msg == "OK") {
3754
- this.arr_g = data.result_data;
3755
3480
  /** @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";
3794
- }
3795
- }
3481
+ let a = data.result_data;
3482
+ if (a.length > 0) {
3483
+ this.id = a[0].id;
3484
+ this.descrizione = a[0].descrizione;
3485
+ this.file_name = a[0].Filename;
3486
+ this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
3487
+ this.b_edit_loaded = true;
3488
+ }
3489
+ }
3796
3490
  }));
3797
3491
  }
3798
3492
  }
3799
- FHUploadPanelComponent.decorators = [
3493
+ FHUploadComponent.decorators = [
3800
3494
  { 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>
3495
+ selector: 'FHUpload',
3496
+ template: `
3946
3497
 
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>
3498
+ <div *ngIf="loading" fxLayout="row">
3499
+ WAIT
3500
+ </div>
3501
+ <div [hidden]="!(enabled && !loading)" fxLayout="row" fxLayoutAlign="start center">
3502
+ <div [hidden]="!multi_list" style="width:380px" fxLayoutAlign="start center">
3503
+ <FHComboBox [sql]="tipo" #cmb_tipo [init_fill]="false" label="Tipologia"></FHComboBox>&nbsp;&nbsp;
3504
+ </div>
3505
+ <mat-form-field [hidden]="!show_descri" style="width: 100%" appearance="outline" floatLabel="always"><mat-label>{{label}} {{fixed_label}}</mat-label>
3506
+ <input matInput type="text" name="descrizione" [(ngModel)]="descrizione"
3507
+ >
3508
+ </mat-form-field>
3509
+ &nbsp;&nbsp;&nbsp;&nbsp;
3510
+ <div style="width:140px" fxLayout="row" fxLayoutAlign="start start">
3511
+ <input type="file" multiple ng2FileSelect [uploader]="uploader" name="file-fh{{App}}" id="file-fh{{App}}" class="inputfile inputfile-fh" />
3512
+ <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>
3513
+ </div>
3514
+ <div fxLayout="row" fxLayoutAlign="start start">
3515
+ <button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px">{{label_b}}</button>&nbsp;&nbsp;&nbsp;
3516
+ <button mat-flat-button *ngIf="id!=null && allow_delete" (click)="del_doc()" color="warn">
3517
+ <mat-icon>delete</mat-icon>
3518
+ </button>
3957
3519
  </div>
3958
3520
  </div>
3959
- <div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
3521
+ <div *ngIf="!enabled" fxLayout="row">
3522
+ <label>{{label}}:</label>{{descrizione}}
3523
+ <button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px;background-color: #F5F5F5">{{label_b}}</button>
3524
+
3525
+ </div>
3960
3526
 
3961
3527
  `,
3962
3528
  styles: [`
3963
3529
 
3964
-
3965
-
3966
3530
  `]
3967
3531
  }] }
3968
3532
  ];
3969
3533
  /** @nocollapse */
3970
- FHUploadPanelComponent.ctorParameters = () => [
3971
- { type: AppService },
3534
+ FHUploadComponent.ctorParameters = () => [
3972
3535
  { type: QueryService },
3973
3536
  { type: ToastrService },
3974
3537
  { type: MatDialog },
3975
- { type: AuthenticationService },
3976
- { type: UtilityService }
3538
+ { type: AppService }
3977
3539
  ];
3978
- FHUploadPanelComponent.propDecorators = {
3540
+ FHUploadComponent.propDecorators = {
3541
+ show_descri: [{ type: Input }],
3979
3542
  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 }],
3543
+ single: [{ type: Input }],
3544
+ descri_obb: [{ type: Input }],
3545
+ programma_da_eseguire: [{ type: Input }],
3546
+ label_attendere: [{ type: Input }],
3547
+ fixed_label: [{ type: Input }],
3548
+ limit_string: [{ type: Input }],
3549
+ allegato_inserito: [{ type: Input }],
3550
+ inserire_descrizione: [{ type: Input }],
3551
+ lista_allegati: [{ type: Input }],
3985
3552
  change: [{ type: Output }],
3986
- upc: [{ type: ViewChild, args: ['upc',] }]
3553
+ upload_ended: [{ type: Output }],
3554
+ cmb_tipo: [{ type: ViewChild, args: ['cmb_tipo',] }]
3987
3555
  };
3988
3556
 
3989
3557
  /**
3990
3558
  * @fileoverview added by tsickle
3991
3559
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3992
3560
  */
3993
- class GridService {
3561
+ class AuthenticationService {
3994
3562
  /**
3563
+ * @param {?} _dataService
3564
+ * @param {?} toastr
3995
3565
  * @param {?} http
3566
+ * @param {?} router
3567
+ * @param {?} route
3568
+ * @param {?} _fileService
3996
3569
  * @param {?} app_s
3997
- * @param {?} toastr
3570
+ * @param {?} uti_s
3998
3571
  */
3999
- constructor(http, app_s, toastr) {
3572
+ constructor(_dataService, toastr, http, router, route, _fileService, app_s, uti_s) {
3573
+ this._dataService = _dataService;
3574
+ this.toastr = toastr;
4000
3575
  this.http = http;
3576
+ this.router = router;
3577
+ this.route = route;
3578
+ this._fileService = _fileService;
4001
3579
  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
3580
+ this.uti_s = uti_s;
3581
+ this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3582
+ this.goto_after = "";
3583
+ this.username = '';
3584
+ this.headers = new HttpHeaders({
3585
+ 'Content-Type': 'application/json',
3586
+ });
4004
3587
  }
4005
- // URL to web API
4006
3588
  /**
4007
- * @param {?} queryp
4008
- * @param {?=} displayError
4009
- * @param {?=} url_sec
4010
3589
  * @return {?}
4011
3590
  */
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((/**
3591
+ logout() {
3592
+ this.app_s.user = null;
3593
+ this.app_s.user_name = null;
3594
+ this.app_s.user_surname = null;
3595
+ this.app_s.user_idp = null;
3596
+ this.app_s.user_email = null;
3597
+ this.app_s.user_roles = null;
3598
+ this.app_s.user_lang = null;
3599
+ this.app_s.user_isadmin = null;
3600
+ this.app_s.token = null;
3601
+ localStorage.removeItem(this.app_s.COMPANY_KEY + "token");
3602
+ if (this.app_s.LOGIN_EXT != 1)
3603
+ this.router.navigate(['login']);
3604
+ else {
3605
+ window.location.href = (this.app_s.LOGOUT_URL_EXT);
3606
+ }
3607
+ }
3608
+ /**
3609
+ * @param {?} username
3610
+ * @param {?} password
3611
+ * @param {?=} displayError
3612
+ * @return {?}
3613
+ */
3614
+ login(username, password, displayError = true) {
3615
+ this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3616
+ /** @type {?} */
3617
+ let post_v = JSON.stringify({ username: username, password: password });
3618
+ if (this.app_s.LDAP_AUTH == 1)
3619
+ post_v = JSON.stringify({ username: username, password: password, ldap_auth: 1 });
3620
+ return this.http.post(this.url, post_v, {
3621
+ headers: this.headers
3622
+ }).pipe(map((/**
4025
3623
  * @param {?} res
4026
3624
  * @return {?}
4027
3625
  */
@@ -4035,6 +3633,11 @@ class GridService {
4035
3633
  else if (res.result_msg === 'KO') {
4036
3634
  err = new Error(res.msg);
4037
3635
  }
3636
+ else {
3637
+ if (res.result_data.length > 0) {
3638
+ localStorage.setItem(this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
3639
+ }
3640
+ }
4038
3641
  if (err) {
4039
3642
  console.error(err);
4040
3643
  if (displayError) {
@@ -4056,477 +3659,1068 @@ class GridService {
4056
3659
  throw err;
4057
3660
  })));
4058
3661
  }
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
3662
  /**
4170
- * @private
3663
+ * @param {?} username
3664
+ * @param {?=} displayError
4171
3665
  * @return {?}
4172
3666
  */
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;
3667
+ get_user_info(username, displayError = true) {
3668
+ this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
3669
+ /** @type {?} */
3670
+ let post_v = JSON.stringify({ username_info: username });
3671
+ return this.http.post(this.url, post_v, {
3672
+ headers: this.headers
3673
+ }).pipe(map((/**
3674
+ * @param {?} res
3675
+ * @return {?}
3676
+ */
3677
+ (res) => {
3678
+ // Handle errors, display if enabled
3679
+ /** @type {?} */
3680
+ let err;
3681
+ if (!res) {
3682
+ err = new Error('Empty server response');
3683
+ }
3684
+ else if (res.result_msg === 'KO') {
3685
+ err = new Error(res.msg);
3686
+ }
3687
+ if (err) {
3688
+ console.error(err);
3689
+ if (displayError) {
3690
+ this.toastr.error(err.message);
4180
3691
  }
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
- }
3692
+ throw new Error(err);
3693
+ }
3694
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3695
+ })), catchError((/**
3696
+ * @param {?} err
3697
+ * @return {?}
3698
+ */
3699
+ (err) => {
3700
+ // In a real world app, we might use a remote logging infrastructure
3701
+ // We'd also dig deeper into the error to get a better message
3702
+ /** @type {?} */
3703
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3704
+ console.error(errMsg); // log to console instead
3705
+ throw err;
3706
+ })));
4189
3707
  }
4190
3708
  /**
3709
+ * @param {?} email
3710
+ * @param {?=} displayError
4191
3711
  * @return {?}
4192
3712
  */
4193
- resetValue() {
4194
- this.selval = '-1';
4195
- this.valDef = '-1';
4196
- this.update_dis();
3713
+ passrecovery(email, displayError = true) {
3714
+ /** @type {?} */
3715
+ let post_v = JSON.stringify({ email: email, websiteroot: this.app_s.COMPANY_SITE_ROOT, op: 'send_email' });
3716
+ return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3717
+ headers: this.headers
3718
+ }).pipe(map((/**
3719
+ * @param {?} res
3720
+ * @return {?}
3721
+ */
3722
+ (res) => {
3723
+ // Handle errors, display if enabled
3724
+ /** @type {?} */
3725
+ let err;
3726
+ if (!res) {
3727
+ err = new Error('Empty server response');
3728
+ }
3729
+ else if (res.result_msg === 'KO') {
3730
+ err = new Error(res.msg);
3731
+ }
3732
+ if (err) {
3733
+ console.error(err);
3734
+ if (displayError) {
3735
+ this.toastr.error(err.message);
3736
+ }
3737
+ throw new Error(err);
3738
+ }
3739
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3740
+ })), catchError((/**
3741
+ * @param {?} err
3742
+ * @return {?}
3743
+ */
3744
+ (err) => {
3745
+ // In a real world app, we might use a remote logging infrastructure
3746
+ // We'd also dig deeper into the error to get a better message
3747
+ /** @type {?} */
3748
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3749
+ console.error(errMsg); // log to console instead
3750
+ throw err;
3751
+ })));
4197
3752
  }
4198
3753
  /**
3754
+ * @param {?} res_rep
3755
+ * @param {?=} displayError
4199
3756
  * @return {?}
4200
3757
  */
4201
- focus() {
4202
- this.smtr.nativeElement.focus();
4203
- }
4204
- /**
3758
+ checktoken(res_rep, displayError = true) {
3759
+ /** @type {?} */
3760
+ let post_v = JSON.stringify({ res_rep: res_rep, op: 'check_token' });
3761
+ return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3762
+ headers: this.headers
3763
+ }).pipe(map((/**
3764
+ * @param {?} res
3765
+ * @return {?}
3766
+ */
3767
+ (res) => {
3768
+ // Handle errors, display if enabled
3769
+ /** @type {?} */
3770
+ let err;
3771
+ if (!res) {
3772
+ err = new Error('Empty server response');
3773
+ }
3774
+ else if (res.result_msg === 'KO') {
3775
+ err = new Error(res.msg);
3776
+ }
3777
+ if (err) {
3778
+ console.error(err);
3779
+ if (displayError) {
3780
+ this.toastr.error(err.message);
3781
+ }
3782
+ throw new Error(err);
3783
+ }
3784
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3785
+ })), catchError((/**
3786
+ * @param {?} err
3787
+ * @return {?}
3788
+ */
3789
+ (err) => {
3790
+ // In a real world app, we might use a remote logging infrastructure
3791
+ // We'd also dig deeper into the error to get a better message
3792
+ /** @type {?} */
3793
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3794
+ console.error(errMsg); // log to console instead
3795
+ throw err;
3796
+ })));
3797
+ }
3798
+ /**
3799
+ * @param {?} token
3800
+ * @param {?} password
3801
+ * @param {?=} displayError
4205
3802
  * @return {?}
4206
3803
  */
4207
- reset() {
4208
- this.selval = '-1';
4209
- this.valDef = '-1';
4210
- this.myData = new Array();
4211
- this.update_dis();
3804
+ change_password(token, password, displayError = true) {
3805
+ /** @type {?} */
3806
+ let post_v = JSON.stringify({ token: token, password: password, op: 'change_password' });
3807
+ return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
3808
+ headers: this.headers
3809
+ }).pipe(map((/**
3810
+ * @param {?} res
3811
+ * @return {?}
3812
+ */
3813
+ (res) => {
3814
+ // Handle errors, display if enabled
3815
+ /** @type {?} */
3816
+ let err;
3817
+ if (!res) {
3818
+ err = new Error('Empty server response');
3819
+ }
3820
+ else if (res.result_msg === 'KO') {
3821
+ err = new Error(res.msg);
3822
+ }
3823
+ if (err) {
3824
+ console.error(err);
3825
+ if (displayError) {
3826
+ this.toastr.error(err.message);
3827
+ }
3828
+ throw new Error(err);
3829
+ }
3830
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
3831
+ })), catchError((/**
3832
+ * @param {?} err
3833
+ * @return {?}
3834
+ */
3835
+ (err) => {
3836
+ // In a real world app, we might use a remote logging infrastructure
3837
+ // We'd also dig deeper into the error to get a better message
3838
+ /** @type {?} */
3839
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
3840
+ console.error(errMsg); // log to console instead
3841
+ throw err;
3842
+ })));
4212
3843
  }
4213
3844
  /**
4214
3845
  * @return {?}
4215
3846
  */
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;
3847
+ checkCredentials_toLogin() {
3848
+ if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
3849
+ this.goto_after = window.location.toString();
3850
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
3851
+ if (this.router.url.indexOf('/rp/') == -1)
3852
+ this.router.navigate(['login']);
3853
+ return false;
4223
3854
  }
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
- }));
3855
+ return true;
4276
3856
  }
4277
3857
  /**
4278
- * @param {?} o
4279
3858
  * @return {?}
4280
3859
  */
4281
- add_option(o) {
4282
- this.myData.push(o);
3860
+ checkCredentials() {
3861
+ if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
3862
+ this.goto_after = window.location.toString();
3863
+ if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
3864
+ return false;
3865
+ }
3866
+ return true;
3867
+ }
3868
+ }
3869
+ AuthenticationService.decorators = [
3870
+ { type: Injectable, args: [{
3871
+ providedIn: 'root',
3872
+ },] }
3873
+ ];
3874
+ /** @nocollapse */
3875
+ AuthenticationService.ctorParameters = () => [
3876
+ { type: QueryService },
3877
+ { type: ToastrService },
3878
+ { type: HttpClient },
3879
+ { type: Router },
3880
+ { type: ActivatedRoute },
3881
+ { type: FileService },
3882
+ { type: AppService },
3883
+ { type: UtilityService }
3884
+ ];
3885
+ /** @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" });
3886
+
3887
+ /**
3888
+ * @fileoverview added by tsickle
3889
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3890
+ */
3891
+ class WinAskTextBigComponent {
3892
+ /**
3893
+ * @param {?} dialogRef
3894
+ * @param {?} toastr
3895
+ */
3896
+ constructor(dialogRef, toastr) {
3897
+ this.dialogRef = dialogRef;
3898
+ this.toastr = toastr;
3899
+ this.title = "";
3900
+ this.label = "";
3901
+ this.valore = "";
3902
+ this.readonly = false;
3903
+ this.show_annulla = true;
3904
+ this.show_ok = true;
3905
+ this.min_chars = 3;
4283
3906
  }
4284
3907
  /**
4285
- * @param {?} o
4286
3908
  * @return {?}
4287
3909
  */
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();
3910
+ ngOnInit() {
4296
3911
  }
4297
3912
  /**
4298
- * @param {?} desc_val
4299
3913
  * @return {?}
4300
3914
  */
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();
3915
+ show() {
4320
3916
  }
4321
3917
  /**
4322
- * @param {?} ind
4323
3918
  * @return {?}
4324
3919
  */
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)
3920
+ hide() {
3921
+ this.dialogRef.close(null);
3922
+ }
3923
+ /**
3924
+ * @return {?}
3925
+ */
3926
+ do_check() {
3927
+ if (this.valore.length < this.min_chars) {
3928
+ this.toastr.error('Il valore deve contenere almeno ' + this.min_chars + ' caratteri');
4331
3929
  return;
4332
- if (this.myData.length > ind) {
4333
- this.setByDescri(this.myData[ind].descrizione_valore);
4334
3930
  }
3931
+ this.dialogRef.close(this.valore);
4335
3932
  }
4336
3933
  /**
4337
3934
  * @return {?}
4338
3935
  */
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
- }
3936
+ chiudi() {
3937
+ this.dialogRef.close(null);
4349
3938
  }
3939
+ }
3940
+ WinAskTextBigComponent.decorators = [
3941
+ { type: Component, args: [{
3942
+ selector: 'app-win_ask_text',
3943
+ template: `
3944
+
3945
+ <h2 mat-dialog-title>{{title}}</h2>
3946
+ <mat-dialog-content style="width:630px;font-size: 12px;">
3947
+ <mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
3948
+ <textarea matInput [readonly]="readonly" [(ngModel)]="valore" style="min-width:600px" rows="15"
3949
+ required></textarea>
3950
+ </mat-form-field>
3951
+ </mat-dialog-content>
3952
+ <div fxLayout="row" fxLayoutAlign="center center" style="width: 100%">
3953
+
3954
+ <button *ngIf="show_ok" mat-flat-button color="primary" (click)="do_check()">OK</button>&nbsp;&nbsp;&nbsp;
3955
+ <button *ngIf="show_annulla" mat-flat-button color="warn" (click)="chiudi()">ANNULLA</button>
3956
+ </div>
3957
+
3958
+
3959
+ `
3960
+ }] }
3961
+ ];
3962
+ /** @nocollapse */
3963
+ WinAskTextBigComponent.ctorParameters = () => [
3964
+ { type: MatDialogRef },
3965
+ { type: ToastrService }
3966
+ ];
3967
+ WinAskTextBigComponent.propDecorators = {
3968
+ title: [{ type: Input }],
3969
+ label: [{ type: Input }],
3970
+ valore: [{ type: Input }],
3971
+ readonly: [{ type: Input }],
3972
+ show_annulla: [{ type: Input }],
3973
+ show_ok: [{ type: Input }]
3974
+ };
3975
+
3976
+ /**
3977
+ * @fileoverview added by tsickle
3978
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3979
+ */
3980
+ class FHWinComboSelect {
4350
3981
  /**
4351
- * @param {?} desc_val
3982
+ * @param {?} dialogRef
3983
+ * @param {?} toastr
3984
+ */
3985
+ constructor(dialogRef, toastr) {
3986
+ this.dialogRef = dialogRef;
3987
+ this.toastr = toastr;
3988
+ this.label = "";
3989
+ this.width = "100%";
3990
+ this.nota = false;
3991
+ this.nota_val = "";
3992
+ }
3993
+ /**
3994
+ * @param {?} lab
3995
+ * @param {?} myD
3996
+ * @param {?=} nota
4352
3997
  * @return {?}
4353
3998
  */
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)
4367
- 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
- }
4379
- this.update_dis();
3999
+ set_selection(lab, myD, nota = false) {
4000
+ this.nota = nota;
4001
+ this.label = lab;
4002
+ for (let i = 0; i < myD.length; i++)
4003
+ this.cmb_sel.add_option(myD[i]);
4380
4004
  }
4381
4005
  /**
4382
4006
  * @return {?}
4383
4007
  */
4384
- getDescri() {
4385
- if (!this.enabled) {
4386
- if (this.selval == null)
4387
- return this.valDef;
4388
- if (this.selval == "-1")
4389
- return this.valDef;
4008
+ ok() {
4009
+ if (this.cmb_sel.getValue() == "-1") {
4010
+ this.toastr.error('Selezionare un valore');
4011
+ return;
4390
4012
  }
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
- }
4013
+ this.cmb_sel.getObj().nota = this.nota_val;
4014
+ this.dialogRef.close(this.cmb_sel.getObj());
4400
4015
  }
4401
4016
  /**
4402
4017
  * @return {?}
4403
4018
  */
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;
4411
- }
4412
- if (this.selval == null)
4413
- return "-1";
4414
- if (this.selval == "")
4415
- return "-1";
4416
- else
4417
- return this.selval;
4019
+ ngOnInit() {
4418
4020
  }
4021
+ }
4022
+ FHWinComboSelect.decorators = [
4023
+ { type: Component, args: [{
4024
+ selector: 'fhwincomboselect',
4025
+ template: `
4026
+
4027
+ <div fxLayout="column">
4028
+ <mat-dialog-content style="font-size: 12px;" >
4029
+
4030
+ <div fxLayout="column">
4031
+ <h3>
4032
+ {{label | uppercase}}
4033
+ </h3>
4034
+ <FHComboBox #cmb_sel [init_fill]="false"></FHComboBox>
4035
+ <mat-form-field *ngIf="nota" appearance="outline" floatLabel="always"><mat-label>Nota</mat-label>
4036
+ <textarea matInput [(ngModel)]="nota_val" rows="12"></textarea>
4037
+ </mat-form-field>
4038
+ </div>
4039
+ </mat-dialog-content>
4040
+
4041
+
4042
+ <mat-dialog-actions fxFlex="100" fxLayout="row" fxLayoutAlign="center center">
4043
+ <button mat-flat-button color="primary" (click)="ok()">OK</button>&nbsp;&nbsp;&nbsp;&nbsp;
4044
+ <button mat-flat-button color="warn" (click)="dialogRef.close(null)">ANNULLA</button>
4045
+ </mat-dialog-actions>
4046
+ </div>
4047
+ `
4048
+ }] }
4049
+ ];
4050
+ /** @nocollapse */
4051
+ FHWinComboSelect.ctorParameters = () => [
4052
+ { type: MatDialogRef },
4053
+ { type: ToastrService }
4054
+ ];
4055
+ FHWinComboSelect.propDecorators = {
4056
+ cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
4057
+ };
4058
+
4059
+ /**
4060
+ * @fileoverview added by tsickle
4061
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4062
+ */
4063
+ class FHUploadPanelComponent {
4419
4064
  /**
4420
- * @param {?} campo
4065
+ * @param {?} _appservice
4066
+ * @param {?} _dataService
4067
+ * @param {?} toastr
4068
+ * @param {?} dialog
4069
+ * @param {?} auth_s
4070
+ * @param {?} uti
4071
+ */
4072
+ constructor(_appservice, _dataService, toastr, dialog, auth_s, uti) {
4073
+ this._appservice = _appservice;
4074
+ this._dataService = _dataService;
4075
+ this.toastr = toastr;
4076
+ this.dialog = dialog;
4077
+ this.auth_s = auth_s;
4078
+ this.uti = uti;
4079
+ this.enabled = true;
4080
+ this.label = '';
4081
+ this.sovrascrivi_path = '';
4082
+ this.ruolo_supervisore = '[ZZZ_DIS_CC]';
4083
+ this.access_control = false;
4084
+ this.show_images = true;
4085
+ this.change = new EventEmitter();
4086
+ this.App = '';
4087
+ this.K = '';
4088
+ this.image_type = false;
4089
+ this.b_edit_loaded = false;
4090
+ this.b_False = false;
4091
+ this.b_mobile = false;
4092
+ this.b_ini = false;
4093
+ this.m_p_tipo = "";
4094
+ this.multi_list = false;
4095
+ this.m_programma_da_eseguire = "";
4096
+ }
4097
+ /**
4098
+ * @param {?} ax
4421
4099
  * @return {?}
4422
4100
  */
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
- }
4101
+ download_all(ax) {
4102
+ if (ax.APP != null)
4103
+ ax.App = ax.APP;
4104
+ if (this.sovrascrivi_path == '') {
4105
+ window.open(this._appservice.COMPANY_SITE_ROOT + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
4106
+ }
4107
+ else {
4108
+ window.open(this.sovrascrivi_path + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
4431
4109
  }
4432
4110
  }
4433
4111
  /**
4434
- * @param {?} s
4112
+ * @param {?} ax
4435
4113
  * @return {?}
4436
4114
  */
4437
- set_options(s) {
4438
- this.myData = new Array();
4115
+ edit_tipo(ax) {
4439
4116
  /** @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);
4117
+ let p = new QParam();
4118
+ p.sql = this.m_p_tipo;
4119
+ p.types = [];
4120
+ p.values = [];
4121
+ this
4122
+ ._dataService
4123
+ .doQuery(p)
4124
+ .subscribe((/**
4125
+ * @param {?} data
4126
+ * @return {?}
4127
+ */
4128
+ data => {
4129
+ if (data != null)
4130
+ if (data.result_msg == "OK") {
4131
+ /** @type {?} */
4132
+ let dialogRef = this
4133
+ .dialog
4134
+ .open(FHWinComboSelect);
4135
+ dialogRef.componentInstance.set_selection("Tipologia Allegato", data.result_data);
4136
+ dialogRef
4137
+ .afterClosed()
4138
+ .subscribe((/**
4139
+ * @param {?} result
4140
+ * @return {?}
4141
+ */
4142
+ result => {
4143
+ if (result != null) {
4144
+ /** @type {?} */
4145
+ let p = new QParam();
4146
+ p.sql = "UPDATE_ALLEGATI_TIPO";
4147
+ p.types = ['int', 'string'];
4148
+ p.values = [ax.id, result.descrizione_valore];
4149
+ this
4150
+ ._dataService
4151
+ .doQuery(p)
4152
+ .subscribe((/**
4153
+ * @param {?} data
4154
+ * @return {?}
4155
+ */
4156
+ data => {
4157
+ if (data != null)
4158
+ if (data.result_msg == "OK") {
4159
+ this.ref_allegato();
4160
+ }
4161
+ }));
4162
+ }
4163
+ }));
4164
+ }
4165
+ }));
4166
+ }
4167
+ /**
4168
+ * @param {?} ax
4169
+ * @return {?}
4170
+ */
4171
+ edit_descri(ax) {
4172
+ /** @type {?} */
4173
+ let dialogRef = this
4174
+ .dialog
4175
+ .open(WinAskTextBigComponent);
4176
+ dialogRef.componentInstance.label = "Descrizione Allegato";
4177
+ dialogRef.componentInstance.valore = ax.descrizione;
4178
+ dialogRef.componentInstance.min_chars = 0;
4179
+ dialogRef
4180
+ .afterClosed()
4181
+ .subscribe((/**
4182
+ * @param {?} result
4183
+ * @return {?}
4184
+ */
4185
+ result => {
4186
+ if (result != null) {
4187
+ /** @type {?} */
4188
+ let p = new QParam();
4189
+ p.sql = "UPDATE_ALLEGATI_DESCRIZIONE";
4190
+ p.types = ['int', 'string'];
4191
+ p.values = [ax.id, result];
4192
+ this
4193
+ ._dataService
4194
+ .doQuery(p)
4195
+ .subscribe((/**
4196
+ * @param {?} data
4197
+ * @return {?}
4198
+ */
4199
+ data => {
4200
+ if (data != null)
4201
+ if (data.result_msg == "OK") {
4202
+ this.ref_allegato();
4203
+ }
4204
+ }));
4205
+ }
4206
+ }));
4207
+ }
4208
+ /**
4209
+ * @param {?} ax
4210
+ * @return {?}
4211
+ */
4212
+ delete(ax) {
4213
+ localStorage.setItem(this._appservice.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
4214
+ localStorage.setItem(this._appservice.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
4215
+ /** @type {?} */
4216
+ let dialogRef = this
4217
+ .dialog
4218
+ .open(FHConfirmComponent);
4219
+ dialogRef
4220
+ .afterClosed()
4221
+ .subscribe((/**
4222
+ * @param {?} result
4223
+ * @return {?}
4224
+ */
4225
+ result => {
4226
+ if (result) {
4227
+ /** @type {?} */
4228
+ let p = new QParam();
4229
+ p.sql = "DELETE_ALLEGATO";
4230
+ p.types = ['int', 'string'];
4231
+ p.values = [ax.id, this.auth_s.username];
4232
+ this
4233
+ ._dataService
4234
+ .doQuery(p)
4235
+ .subscribe((/**
4236
+ * @param {?} data
4237
+ * @return {?}
4238
+ */
4239
+ data => {
4240
+ if (data != null)
4241
+ if (data.result_msg == "OK") {
4242
+ // this.arr_g = data.result_data;
4243
+ this.ref_allegato();
4244
+ this
4245
+ .toastr
4246
+ .info("INFO", "ALLEGATO ELIMINATO", {
4247
+ timeOut: 1000,
4248
+ progressBar: true
4249
+ });
4250
+ }
4251
+ }), (/**
4252
+ * @param {?} err
4253
+ * @return {?}
4254
+ */
4255
+ err => {
4256
+ }));
4257
+ }
4258
+ }));
4259
+ }
4260
+ /**
4261
+ * @return {?}
4262
+ */
4263
+ ngOnInit() {
4264
+ this.upc.single = false;
4265
+ this.b_mobile = this._appservice.getState().pageFullscreen;
4266
+ console.log('this.m_p_tipo ', this.m_p_tipo);
4267
+ this
4268
+ .upc
4269
+ .init(this.App, this.K, 'Descrizione Allegato', this.m_p_tipo, this.m_programma_da_eseguire);
4270
+ if (this.m_p_tipo.indexOf('SELECT_') > -1) {
4271
+ this.multi_list = true;
4272
+ }
4273
+ this.ref_allegato();
4274
+ }
4275
+ /**
4276
+ * @param {?} p_app
4277
+ * @param {?} p_k
4278
+ * @param {?=} p_tipo
4279
+ * @param {?=} programma_da_eseguire
4280
+ * @return {?}
4281
+ */
4282
+ init(p_app, p_k, p_tipo = "", programma_da_eseguire = "") {
4283
+ this.App = p_app;
4284
+ this.K = p_k;
4285
+ this.b_ini = true;
4286
+ this.b_edit_loaded = false;
4287
+ this.m_p_tipo = p_tipo;
4288
+ this.m_programma_da_eseguire = programma_da_eseguire;
4289
+ this.ngOnInit();
4290
+ }
4291
+ /**
4292
+ * @return {?}
4293
+ */
4294
+ ref_allegato() {
4295
+ if (this.App == null)
4296
+ return;
4297
+ if (this.App == "")
4298
+ return;
4299
+ /** @type {?} */
4300
+ let p = new QParam();
4301
+ p.sql = "SELECT_ALLEGATO_INFO";
4302
+ p.types = ['string', 'string'];
4303
+ p.values = [this.App, this.K];
4304
+ this
4305
+ ._dataService
4306
+ .doQuery(p)
4307
+ .subscribe((/**
4308
+ * @param {?} data
4309
+ * @return {?}
4310
+ */
4311
+ data => {
4312
+ if (data != null)
4313
+ if (data.result_msg == "OK") {
4314
+ this.arr_g = data.result_data;
4315
+ /** @type {?} */
4316
+ let iconf = "webinfo";
4317
+ for (let i = 0; i < this.arr_g.length; i++) {
4318
+ if (this.arr_g[i].APP != null)
4319
+ this.arr_g[i].App = this.arr_g[i].APP;
4320
+ if (this.arr_g[i].descrizione != null)
4321
+ this.arr_g[i].descrizione_vis = this.arr_g[i].descrizione.split('\n').join('<br>');
4322
+ else
4323
+ this.arr_g[i].descrizione_vis = '';
4324
+ /** @type {?} */
4325
+ let arrf = this.arr_g[i].Filename.split('.');
4326
+ if (this.sovrascrivi_path == '') {
4327
+ 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;
4328
+ 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;
4329
+ }
4330
+ else {
4331
+ this.arr_g[i].url = this.sovrascrivi_path + "/uploads/" + this.arr_g[i].App + "/" + this.arr_g[i].K + "/" + this.arr_g[i].Filename;
4332
+ 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;
4333
+ }
4334
+ 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)
4335
+ iconf = arrf[arrf.length - 1].toLocaleLowerCase();
4336
+ this.arr_g[i].icon = iconf + '.svg';
4337
+ this.arr_g[i].can_delete = !this.access_control || this.arr_g[i].idp == this._appservice.user || this.uti.hasRole(this.ruolo_supervisore);
4338
+ 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) {
4339
+ this.arr_g[i].type = "IMG";
4340
+ this.arr_g[i].image_original = [this.arr_g[i].url];
4341
+ if (this.arr_g[i].preview != null)
4342
+ if (this.arr_g[i].preview == 1) {
4343
+ /** @type {?} */
4344
+ let pcs = this.arr_g[i].url.split('.');
4345
+ /** @type {?} */
4346
+ let lastPc = pcs.pop();
4347
+ this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
4348
+ }
4349
+ this.image_type = true;
4350
+ this.arr_g[i].image_thumbnail = [this.arr_g[i].url];
4351
+ }
4352
+ else
4353
+ this.arr_g[i].type = "O";
4354
+ }
4355
+ }
4356
+ }));
4357
+ }
4358
+ }
4359
+ FHUploadPanelComponent.decorators = [
4360
+ { type: Component, args: [{
4361
+ selector: 'FHUploadPanel', template: `
4362
+ <div fxLayout="column">
4363
+ <h3>{{label}}</h3>
4364
+ <div fxLayout="column">
4365
+ <div [hidden]="!enabled">
4366
+ <FHUpload [single]="b_False" [lista_allegati]="arr_g" (change)="ref_allegato()" #upc></FHUpload>
4367
+ </div>
4368
+ <table width="98%" class="fh_table" *ngIf="!image_type && !b_mobile">
4369
+ <thead>
4370
+ <tr class="header">
4371
+ <th style="width:40px"></th>
4372
+ <th style="width:50%">Nome</th>
4373
+ <th style="width:60px;text-align:center">Dim.</th>
4374
+ <th style="width:40%">Descrizione</th>
4375
+ <th *ngIf="multi_list" style="width:20%">Tipo</th>
4376
+
4377
+ <th style="width:40px" class="actions"></th>
4378
+ <th style="width:30%" >Utente</th>
4379
+ <th style="width:240px;text-align:center">Data</th>
4380
+ <th style="width:40px" class="actions"></th>
4381
+ <th *ngIf="enabled" style="width:40px" class="actions"></th>
4382
+ </tr>
4383
+ </thead>
4384
+ <tbody>
4385
+ <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
4386
+ <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
4387
+ <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
4388
+ <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
4389
+ <td>{{app.Filename}}</td>
4390
+ <td style="text-align:center">{{app.Filesize}}</td>
4391
+ <td>
4392
+ <div fxLayout="row">
4393
+ <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
4394
+ <mat-icon>edit</mat-icon>
4395
+ </a>
4396
+
4397
+ <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4398
+ <mat-icon>edit</mat-icon>
4399
+ </a>
4400
+
4401
+ <div [innerHTML]="app.descrizione_vis" style="width:100%">
4402
+ </div>
4403
+ </div></td>
4404
+
4405
+
4406
+ <td>
4407
+ <div fxLayout="row">
4408
+ <a mat-icon-button matTooltip="Modifica Tipo" *ngIf="app.can_delete" (click)="edit_tipo(app)">
4409
+ <mat-icon>edit</mat-icon>
4410
+ </a>
4411
+
4412
+ <a mat-icon-button [matTooltip]="'Modifica Tipologia consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4413
+ <mat-icon>edit</mat-icon>
4414
+ </a>
4415
+
4416
+ <div [innerHTML]="app.tipo" style="width:100%">
4417
+ </div>
4418
+ </div></td>
4419
+
4420
+ <td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
4421
+ <fh-image-viewer [u]="app"></fh-image-viewer>
4422
+
4423
+ </td>
4424
+ <td *ngIf="app.type!='IMG'">
4425
+
4426
+ </td>
4427
+ <td>{{app.nc}}</td>
4428
+ <td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
4429
+ <td style="text-align:center">
4430
+ <button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
4431
+ <mat-icon>cloud_download</mat-icon>
4432
+ </button>
4433
+ </td>
4434
+
4435
+ <td *ngIf="enabled" style="text-align:center">
4436
+ <a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
4437
+ <mat-icon>delete</mat-icon>
4438
+ </a>
4439
+
4440
+ <a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4441
+ <mat-icon>delete</mat-icon>
4442
+ </a>
4443
+
4444
+ </td>
4445
+
4446
+ </tr>
4447
+ </tbody>
4448
+ </table>
4449
+ <table width="98%" class="fh_table" *ngIf="image_type && !b_mobile">
4450
+ <thead>
4451
+ <tr class="header">
4452
+ <th style="width:40px"></th>
4453
+ <th style="width:50%">Nome</th>
4454
+ <th style="width:60px;text-align:center">Dim.</th>
4455
+
4456
+ <th style="width:20%">Descrizione</th>
4457
+ <th *ngIf="multi_list" style="width:10%">Tipo</th>
4458
+ <th style="width:40%" ></th>
4459
+
4460
+
4461
+ <th style="width:10%" >Utente</th>
4462
+ <th style="width:240px;text-align:center">Data</th>
4463
+ <th style="width:40px" class="actions"></th>
4464
+ <th *ngIf="enabled" style="width:40px" class="actions"></th>
4465
+ </tr>
4466
+ </thead>
4467
+ <tbody>
4468
+
4469
+ <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
4470
+ <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
4471
+ <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
4472
+ <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
4473
+
4474
+ <td>{{app.Filename}}</td>
4475
+ <td style="text-align:center">{{app.Filesize}}</td>
4476
+ <td>
4477
+ <div fxLayout="row">
4478
+ <a mat-icon-button matTooltip="Modifica Descrizione" *ngIf="app.can_delete" (click)="edit_descri(app)">
4479
+ <mat-icon>edit</mat-icon>
4480
+ </a>
4481
+
4482
+ <a mat-icon-button [matTooltip]="'Modifica Descrizione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4483
+ <mat-icon>edit</mat-icon>
4484
+ </a>
4485
+
4486
+ <div [innerHTML]="app.descrizione_vis" style="width:100%">
4487
+ </div>
4488
+ </div></td>
4489
+ <td *ngIf="multi_list">
4490
+ <div fxLayout="row">
4491
+ <a mat-icon-button matTooltip="Modifica Tipo" *ngIf="app.can_delete" (click)="edit_tipo(app)">
4492
+ <mat-icon>edit</mat-icon>
4493
+ </a>
4494
+
4495
+ <a mat-icon-button [matTooltip]="'Modifica Tipologia consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4496
+ <mat-icon>edit</mat-icon>
4497
+ </a>
4498
+
4499
+ <div [innerHTML]="app.tipo" style="width:100%">
4500
+ </div>
4501
+ </div></td>
4502
+
4503
+ <td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
4504
+ <fh-image-viewer [u]="app"></fh-image-viewer>
4505
+
4506
+ </td>
4507
+ <td *ngIf="app.type!='IMG'">
4508
+
4509
+ </td>
4510
+ <td>{{app.nc}}</td>
4511
+ <td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
4512
+ <td style="text-align:center">
4513
+ <button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
4514
+ <mat-icon>cloud_download</mat-icon>
4515
+ </button>
4516
+ </td>
4517
+
4518
+ <td *ngIf="enabled" style="text-align:center">
4519
+ <a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
4520
+ <mat-icon>delete</mat-icon>
4521
+ </a>
4522
+
4523
+ <a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
4524
+ <mat-icon>delete</mat-icon>
4525
+ </a>
4526
+
4527
+ </td>
4528
+
4529
+ </tr>
4530
+ </tbody>
4531
+ </table>
4532
+ <table width="98%" class="fh_table" *ngIf="b_mobile">
4533
+ <tbody>
4534
+
4535
+ <tr *ngFor="let app of arr_g;let odd=odd; let even=even;" style="font-size: 12px;" [ngClass]="{ odd: odd, even: even }">
4536
+ <td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
4537
+ <div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
4538
+ <img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
4539
+ <td *ngIf="b_mobile" style="text-align:center">{{app.Filename}}<br><br>
4540
+ <button style="background-color: #F5F5F5" (click)="download_all(app)" mat-flat-button>DOWNLOAD</button>
4541
+ </td>
4542
+ </tr>
4543
+ </tbody>
4544
+ </table>
4545
+ </div>
4546
+ </div>
4547
+ <div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
4548
+
4549
+ `,
4550
+ styles: [`
4551
+
4552
+
4553
+
4554
+ `]
4555
+ }] }
4556
+ ];
4557
+ /** @nocollapse */
4558
+ FHUploadPanelComponent.ctorParameters = () => [
4559
+ { type: AppService },
4560
+ { type: QueryService },
4561
+ { type: ToastrService },
4562
+ { type: MatDialog },
4563
+ { type: AuthenticationService },
4564
+ { type: UtilityService }
4565
+ ];
4566
+ FHUploadPanelComponent.propDecorators = {
4567
+ enabled: [{ type: Input }],
4568
+ label: [{ type: Input }],
4569
+ sovrascrivi_path: [{ type: Input }],
4570
+ ruolo_supervisore: [{ type: Input }],
4571
+ access_control: [{ type: Input }],
4572
+ show_images: [{ type: Input }],
4573
+ change: [{ type: Output }],
4574
+ upc: [{ type: ViewChild, args: ['upc',] }]
4575
+ };
4576
+
4577
+ /**
4578
+ * @fileoverview added by tsickle
4579
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4580
+ */
4581
+ class GridService {
4582
+ /**
4583
+ * @param {?} http
4584
+ * @param {?} app_s
4585
+ * @param {?} toastr
4586
+ */
4587
+ constructor(http, app_s, toastr) {
4588
+ this.http = http;
4589
+ this.app_s = app_s;
4590
+ this.toastr = toastr;
4591
+ this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT; // URL to web API
4455
4592
  }
4593
+ // URL to web API
4456
4594
  /**
4595
+ * @param {?} queryp
4596
+ * @param {?=} displayError
4597
+ * @param {?=} url_sec
4457
4598
  * @return {?}
4458
4599
  */
4459
- ngAfterViewInit() {
4460
- // console.log("ngAfterViewInit"); console.log(this.init_fill);
4600
+ doQuery(queryp, displayError = true, url_sec = null) {
4601
+ this.headers = new HttpHeaders({
4602
+ 'Content-Type': 'application/json',
4603
+ 'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
4604
+ });
4605
+ if (url_sec == null)
4606
+ this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT;
4607
+ else
4608
+ this.url = url_sec;
4609
+ /** @type {?} */
4610
+ let post_v = JSON.stringify(queryp);
4611
+ return this.http.post(this.url, post_v, { headers: this.headers })
4612
+ .pipe(map((/**
4613
+ * @param {?} res
4614
+ * @return {?}
4615
+ */
4616
+ (res) => {
4617
+ // Handle errors, display if enabled
4618
+ /** @type {?} */
4619
+ let err;
4620
+ if (!res) {
4621
+ err = new Error('Empty server response');
4622
+ }
4623
+ else if (res.result_msg === 'KO') {
4624
+ err = new Error(res.msg);
4625
+ }
4626
+ if (err) {
4627
+ console.error(err);
4628
+ if (displayError) {
4629
+ this.toastr.error(err.message);
4630
+ }
4631
+ throw new Error(err);
4632
+ }
4633
+ return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
4634
+ })), catchError((/**
4635
+ * @param {?} err
4636
+ * @return {?}
4637
+ */
4638
+ (err) => {
4639
+ // In a real world app, we might use a remote logging infrastructure
4640
+ // We'd also dig deeper into the error to get a better message
4641
+ /** @type {?} */
4642
+ let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
4643
+ console.error(errMsg); // log to console instead
4644
+ throw err;
4645
+ })));
4461
4646
  }
4647
+ }
4648
+ GridService.decorators = [
4649
+ { type: Injectable, args: [{
4650
+ providedIn: 'root',
4651
+ },] }
4652
+ ];
4653
+ /** @nocollapse */
4654
+ GridService.ctorParameters = () => [
4655
+ { type: HttpClient },
4656
+ { type: AppService },
4657
+ { type: ToastrService }
4658
+ ];
4659
+ /** @nocollapse */ GridService.ngInjectableDef = defineInjectable({ factory: function GridService_Factory() { return new GridService(inject(HttpClient), inject(AppService), inject(ToastrService)); }, token: GridService, providedIn: "root" });
4660
+
4661
+ /**
4662
+ * @fileoverview added by tsickle
4663
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4664
+ */
4665
+ class win_grid_help {
4462
4666
  /**
4463
- * @return {?}
4667
+ * @param {?} dialogRef
4668
+ * @param {?} toastr
4669
+ * @param {?} m_appService
4464
4670
  */
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();
4671
+ constructor(dialogRef, toastr, m_appService) {
4672
+ this.dialogRef = dialogRef;
4673
+ this.toastr = toastr;
4674
+ this.m_appService = m_appService;
4675
+ this.title = "";
4479
4676
  }
4480
4677
  /**
4481
4678
  * @return {?}
4482
4679
  */
4483
- sc() {
4484
- this
4485
- .selchange
4486
- .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
4680
+ ngOnInit() {
4487
4681
  }
4488
4682
  }
4489
- FHComboboxComponent.decorators = [
4683
+ win_grid_help.decorators = [
4490
4684
  { 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>
4685
+ template: `
4498
4686
 
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>
4687
+
4688
+
4689
+ <mat-dialog-content style="min-width:800px;min-height:500px">
4690
+ <mat-tab-group>
4691
+ <mat-tab label="FILTRI">
4692
+
4693
+
4694
+ <img src="assets/helps/fhgrid/filtri.png"/>
4695
+ </mat-tab>
4696
+ <mat-tab label="ORDINAMENTI">
4697
+ <img src="assets/helps/fhgrid/ordinamenti.png"/>
4698
+ </mat-tab>
4699
+ <mat-tab label="LAYOUT COLONNE">
4700
+ <img src="assets/helps/fhgrid/layout_colonne.png"/>
4701
+ </mat-tab>
4702
+ </mat-tab-group>
4703
+ </mat-dialog-content>
4704
+
4705
+
4706
+ <mat-dialog-actions>
4707
+ <button mat-flat-button style="background-color: #F5F5F5" (click)="dialogRef.close('')">CHIUDI</button>
4708
+ </mat-dialog-actions>
4502
4709
  `,
4503
4710
  styles: [`
4504
-
4711
+ agm-map {
4712
+ height: 600px;
4713
+ width: 100%;
4714
+ }
4505
4715
  `]
4506
4716
  }] }
4507
4717
  ];
4508
4718
  /** @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
- };
4719
+ win_grid_help.ctorParameters = () => [
4720
+ { type: MatDialogRef },
4721
+ { type: ToastrService },
4722
+ { type: AppService }
4723
+ ];
4530
4724
 
4531
4725
  /**
4532
4726
  * @fileoverview added by tsickle
@@ -9772,89 +9966,6 @@ ComboBoxEditor.propDecorators = {
9772
9966
  appdt: [{ type: ViewChild, args: ['appdt',] }]
9773
9967
  };
9774
9968
 
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
9969
  /**
9859
9970
  * @fileoverview added by tsickle
9860
9971
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc