@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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +1417 -1332
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhcombobox.js +3 -2
- package/esm2015/lib/controls/fhupload.js +37 -13
- package/esm2015/lib/controls/fhuploadpanel.js +95 -3
- package/esm5/lib/controls/fhcombobox.js +3 -2
- package/esm5/lib/controls/fhupload.js +30 -9
- package/esm5/lib/controls/fhuploadpanel.js +71 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +1581 -1470
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +1417 -1332
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhupload.d.ts +3 -0
- package/lib/controls/fhuploadpanel.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3130,918 +3130,523 @@ var WinWait = /** @class */ (function () {
|
|
|
3130
3130
|
* @fileoverview added by tsickle
|
|
3131
3131
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3132
3132
|
*/
|
|
3133
|
-
var
|
|
3134
|
-
function
|
|
3135
|
-
var _this = this;
|
|
3133
|
+
var FHComboboxComponent = /** @class */ (function () {
|
|
3134
|
+
function FHComboboxComponent(_dataService, _dataService_odbc) {
|
|
3136
3135
|
this._dataService = _dataService;
|
|
3137
|
-
this.
|
|
3138
|
-
this.
|
|
3139
|
-
this.
|
|
3140
|
-
this.
|
|
3136
|
+
this._dataService_odbc = _dataService_odbc;
|
|
3137
|
+
this.init_fill = true;
|
|
3138
|
+
this.sql = "";
|
|
3139
|
+
this.types = [];
|
|
3140
|
+
this.values = [];
|
|
3141
|
+
this.hidden = false;
|
|
3142
|
+
this.label = "";
|
|
3141
3143
|
this.enabled = true;
|
|
3142
|
-
this.
|
|
3143
|
-
this.
|
|
3144
|
-
this.
|
|
3145
|
-
this.
|
|
3146
|
-
this.
|
|
3147
|
-
this.
|
|
3148
|
-
this.
|
|
3149
|
-
this.
|
|
3150
|
-
this.
|
|
3151
|
-
this.
|
|
3152
|
-
this.
|
|
3153
|
-
this.
|
|
3154
|
-
this.loading = false;
|
|
3155
|
-
this.App = '';
|
|
3156
|
-
this.K = '';
|
|
3157
|
-
this.label_b = "";
|
|
3158
|
-
this.descrizione = '';
|
|
3159
|
-
this.file_name = '';
|
|
3160
|
-
this.label = '';
|
|
3161
|
-
this.username = '';
|
|
3162
|
-
this.b_edit_loaded = false;
|
|
3163
|
-
this.tipo = '';
|
|
3164
|
-
this.b_ini = false;
|
|
3165
|
-
this.uploader = new FileUploader({
|
|
3166
|
-
url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
|
|
3167
|
-
'maxFileSize': 500 * 1024 * 1024
|
|
3168
|
-
});
|
|
3169
|
-
this.id = null;
|
|
3170
|
-
this.username = this.app_s.user;
|
|
3171
|
-
this.uploader.onBeforeUploadItem = (/**
|
|
3172
|
-
* @param {?} item
|
|
3173
|
-
* @return {?}
|
|
3174
|
-
*/
|
|
3175
|
-
function (item) {
|
|
3176
|
-
item.withCredentials = false;
|
|
3177
|
-
});
|
|
3178
|
-
this.uploader.onCompleteItem = (/**
|
|
3179
|
-
* @param {?} item
|
|
3180
|
-
* @param {?} response
|
|
3181
|
-
* @param {?} status
|
|
3182
|
-
* @param {?} header
|
|
3183
|
-
* @return {?}
|
|
3184
|
-
*/
|
|
3185
|
-
function (item, response, status, header) {
|
|
3186
|
-
if (status === 200) {
|
|
3187
|
-
_this.descrizione = "";
|
|
3188
|
-
_this.toastr.info("INFO", _this.allegato_inserito, {
|
|
3189
|
-
timeOut: 1000,
|
|
3190
|
-
progressBar: true
|
|
3191
|
-
});
|
|
3192
|
-
_this.ref_allegato();
|
|
3193
|
-
_this.change.emit({ item: item, response: response, status: status, header: header });
|
|
3194
|
-
}
|
|
3195
|
-
});
|
|
3144
|
+
this.required = false;
|
|
3145
|
+
this.sel_label = "";
|
|
3146
|
+
this.fillend = new EventEmitter();
|
|
3147
|
+
this.selchange = new EventEmitter();
|
|
3148
|
+
this.initend = new EventEmitter();
|
|
3149
|
+
this.myData = [];
|
|
3150
|
+
this.valDef = "-1";
|
|
3151
|
+
this.selval = "-1";
|
|
3152
|
+
this.errorMsg = "";
|
|
3153
|
+
this.db_type = "1";
|
|
3154
|
+
this.dis_value = '';
|
|
3155
|
+
this.descri_val = "";
|
|
3196
3156
|
}
|
|
3197
3157
|
/**
|
|
3158
|
+
* @private
|
|
3198
3159
|
* @return {?}
|
|
3199
3160
|
*/
|
|
3200
|
-
|
|
3161
|
+
FHComboboxComponent.prototype.update_dis = /**
|
|
3162
|
+
* @private
|
|
3201
3163
|
* @return {?}
|
|
3202
3164
|
*/
|
|
3203
3165
|
function () {
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
/** @type {?} */
|
|
3220
|
-
var p = new QParam();
|
|
3221
|
-
p.sql = "DELETE_ALLEGATO";
|
|
3222
|
-
p.types = ['int', 'string'];
|
|
3223
|
-
p.values = [_this.id, _this.app_s.user];
|
|
3224
|
-
_this
|
|
3225
|
-
._dataService
|
|
3226
|
-
.doQuery(p)
|
|
3227
|
-
.subscribe((/**
|
|
3228
|
-
* @param {?} data
|
|
3229
|
-
* @return {?}
|
|
3230
|
-
*/
|
|
3231
|
-
function (data) {
|
|
3232
|
-
if (data != null)
|
|
3233
|
-
if (data.result_msg == "OK") {
|
|
3234
|
-
// this.arr_g = data.result_data;
|
|
3235
|
-
_this.ref_allegato();
|
|
3236
|
-
_this
|
|
3237
|
-
.toastr
|
|
3238
|
-
.info("INFO", "ALLEGATO ELIMINATO", {
|
|
3239
|
-
timeOut: 1000,
|
|
3240
|
-
progressBar: true
|
|
3241
|
-
});
|
|
3242
|
-
}
|
|
3243
|
-
}), (/**
|
|
3244
|
-
* @param {?} err
|
|
3245
|
-
* @return {?}
|
|
3246
|
-
*/
|
|
3247
|
-
function (err) {
|
|
3248
|
-
}));
|
|
3249
|
-
}
|
|
3250
|
-
}));
|
|
3166
|
+
this.dis_value = '';
|
|
3167
|
+
try {
|
|
3168
|
+
if (this.descri_val != null)
|
|
3169
|
+
if (this.descri_val != "") {
|
|
3170
|
+
this.dis_value = this.descri_val;
|
|
3171
|
+
return;
|
|
3172
|
+
}
|
|
3173
|
+
if (this.valDef == null)
|
|
3174
|
+
this.dis_value = '';
|
|
3175
|
+
else
|
|
3176
|
+
this.dis_value = this.valDef.split('-1').join('');
|
|
3177
|
+
}
|
|
3178
|
+
catch (e) {
|
|
3179
|
+
console.log('errore split -> this.valDef ', this.valDef);
|
|
3180
|
+
}
|
|
3251
3181
|
};
|
|
3252
3182
|
/**
|
|
3253
3183
|
* @return {?}
|
|
3254
3184
|
*/
|
|
3255
|
-
|
|
3185
|
+
FHComboboxComponent.prototype.resetValue = /**
|
|
3256
3186
|
* @return {?}
|
|
3257
3187
|
*/
|
|
3258
3188
|
function () {
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
|
|
3263
|
-
this.uploader.setOptions(uo);
|
|
3264
|
-
this.uploader.onCompleteAll = (/**
|
|
3265
|
-
* @return {?}
|
|
3266
|
-
*/
|
|
3267
|
-
function () {
|
|
3268
|
-
_this.loading = false;
|
|
3269
|
-
_this.upload_ended.emit();
|
|
3270
|
-
if (_this.dialogRef != null)
|
|
3271
|
-
if (_this.dialogRef.componentInstance != null) {
|
|
3272
|
-
_this.dialogRef.componentInstance.update_progess(100);
|
|
3273
|
-
_this.dialogRef = null;
|
|
3274
|
-
}
|
|
3275
|
-
});
|
|
3276
|
-
this.uploader.onErrorItem = (/**
|
|
3277
|
-
* @param {?} a
|
|
3278
|
-
* @param {?} b
|
|
3279
|
-
* @param {?} c
|
|
3280
|
-
* @param {?} d
|
|
3281
|
-
* @return {?}
|
|
3282
|
-
*/
|
|
3283
|
-
function (a, b, c, d) {
|
|
3284
|
-
_this.toastr.error(b);
|
|
3285
|
-
});
|
|
3286
|
-
this.uploader.onAfterAddingFile = (/**
|
|
3287
|
-
* @param {?} fileItem
|
|
3288
|
-
* @return {?}
|
|
3289
|
-
*/
|
|
3290
|
-
function (fileItem) {
|
|
3291
|
-
_this.ch(fileItem);
|
|
3292
|
-
});
|
|
3293
|
-
this.uploader.onProgressItem = (/**
|
|
3294
|
-
* @param {?} fileItem
|
|
3295
|
-
* @param {?} progress
|
|
3296
|
-
* @return {?}
|
|
3297
|
-
*/
|
|
3298
|
-
function (fileItem, progress) {
|
|
3299
|
-
// console.log(fileItem);
|
|
3300
|
-
// console.log(progress);
|
|
3301
|
-
_this.loading = true;
|
|
3302
|
-
if (_this.dialogRef != null)
|
|
3303
|
-
if (_this.dialogRef.componentInstance != null)
|
|
3304
|
-
_this.dialogRef.componentInstance.update_progess(progress);
|
|
3305
|
-
});
|
|
3306
|
-
this.uploader.onWhenAddingFileFailed = (/**
|
|
3307
|
-
* @param {?} item
|
|
3308
|
-
* @param {?} filter
|
|
3309
|
-
* @param {?} options
|
|
3310
|
-
* @return {?}
|
|
3311
|
-
*/
|
|
3312
|
-
function (item, filter, options) {
|
|
3313
|
-
switch (filter.name) {
|
|
3314
|
-
case 'fileSize':
|
|
3315
|
-
/** @type {?} */
|
|
3316
|
-
var ar = Math.round(item.size / 1024 / 1024);
|
|
3317
|
-
_this.toastr.error(_this.limit_string.split('<size>').join('' + ar));
|
|
3318
|
-
break;
|
|
3319
|
-
default:
|
|
3320
|
-
_this.toastr.error("Errore: " + filter.name);
|
|
3321
|
-
}
|
|
3322
|
-
});
|
|
3189
|
+
this.selval = '-1';
|
|
3190
|
+
this.valDef = '-1';
|
|
3191
|
+
this.update_dis();
|
|
3323
3192
|
};
|
|
3324
3193
|
/**
|
|
3325
3194
|
* @return {?}
|
|
3326
3195
|
*/
|
|
3327
|
-
|
|
3196
|
+
FHComboboxComponent.prototype.focus = /**
|
|
3328
3197
|
* @return {?}
|
|
3329
3198
|
*/
|
|
3330
3199
|
function () {
|
|
3331
|
-
|
|
3200
|
+
this.smtr.nativeElement.focus();
|
|
3332
3201
|
};
|
|
3333
3202
|
/**
|
|
3334
|
-
* @param {?} fileItem
|
|
3335
3203
|
* @return {?}
|
|
3336
3204
|
*/
|
|
3337
|
-
|
|
3338
|
-
* @param {?} fileItem
|
|
3205
|
+
FHComboboxComponent.prototype.reset = /**
|
|
3339
3206
|
* @return {?}
|
|
3340
3207
|
*/
|
|
3341
|
-
function (
|
|
3208
|
+
function () {
|
|
3209
|
+
console.log('reset');
|
|
3210
|
+
this.selval = '-1';
|
|
3211
|
+
this.valDef = '-1';
|
|
3212
|
+
this.myData = new Array();
|
|
3213
|
+
this.update_dis();
|
|
3214
|
+
};
|
|
3215
|
+
/**
|
|
3216
|
+
* @return {?}
|
|
3217
|
+
*/
|
|
3218
|
+
FHComboboxComponent.prototype.fillCombo = /**
|
|
3219
|
+
* @return {?}
|
|
3220
|
+
*/
|
|
3221
|
+
function () {
|
|
3342
3222
|
var _this = this;
|
|
3343
|
-
|
|
3344
|
-
|
|
3223
|
+
// console.log(this.init_fill);
|
|
3224
|
+
// if(!this.init_fill){this.init_fill=true;return;}
|
|
3225
|
+
console.log("fillcombo " + this.sql);
|
|
3226
|
+
if (this.sql.indexOf('|') != -1 && this.sql.indexOf('$') != -1) {
|
|
3227
|
+
this.set_options(this.sql);
|
|
3345
3228
|
return;
|
|
3346
3229
|
}
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
this.
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
form.append('App', _this.App);
|
|
3360
|
-
form.append('K', _this.K);
|
|
3361
|
-
form.append('descrizione', _this.descrizione);
|
|
3362
|
-
form.append('single', _this.single);
|
|
3363
|
-
form.append('username', _this.username);
|
|
3364
|
-
form.append('tipo', _this.tipo);
|
|
3365
|
-
form.append('local_path', _this.app_s.LOCAL_PATH);
|
|
3366
|
-
if (_this.programma_da_eseguire != '')
|
|
3367
|
-
form.append('p1', _this.programma_da_eseguire);
|
|
3368
|
-
});
|
|
3369
|
-
if (this.dialogRef == null) {
|
|
3370
|
-
this.dialogRef = this.dialog.open(WinWait, { 'disableClose': true });
|
|
3371
|
-
this.dialogRef.componentInstance.label = this.label_attendere;
|
|
3372
|
-
this.dialogRef.afterClosed().subscribe((/**
|
|
3373
|
-
* @param {?} result
|
|
3230
|
+
/** @type {?} */
|
|
3231
|
+
var p = new QParam();
|
|
3232
|
+
p.sql = this.sql;
|
|
3233
|
+
p.types = this.types;
|
|
3234
|
+
p.values = this.values;
|
|
3235
|
+
// console.log(p);
|
|
3236
|
+
if (this.db_type == "1")
|
|
3237
|
+
this
|
|
3238
|
+
._dataService
|
|
3239
|
+
.doQuery(p)
|
|
3240
|
+
.subscribe((/**
|
|
3241
|
+
* @param {?} data
|
|
3374
3242
|
* @return {?}
|
|
3375
3243
|
*/
|
|
3376
|
-
function (
|
|
3244
|
+
function (data) {
|
|
3245
|
+
if (data != null)
|
|
3246
|
+
if (data.result_msg == "OK") {
|
|
3247
|
+
_this.resetD(data.result_data);
|
|
3248
|
+
}
|
|
3249
|
+
}), (/**
|
|
3250
|
+
* @param {?} err
|
|
3251
|
+
* @return {?}
|
|
3252
|
+
*/
|
|
3253
|
+
function (err) {
|
|
3254
|
+
_this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + _this.sql + "]";
|
|
3255
|
+
}));
|
|
3256
|
+
if (this.db_type == "2")
|
|
3257
|
+
this
|
|
3258
|
+
._dataService_odbc
|
|
3259
|
+
.doQuery(p)
|
|
3260
|
+
.subscribe((/**
|
|
3261
|
+
* @param {?} data
|
|
3262
|
+
* @return {?}
|
|
3263
|
+
*/
|
|
3264
|
+
function (data) {
|
|
3265
|
+
if (data != null)
|
|
3266
|
+
if (data.result_msg == "OK") {
|
|
3267
|
+
for (var i = 0; i < data.result_data.length; i++) {
|
|
3268
|
+
if (data.result_data[i].VALORE != null)
|
|
3269
|
+
data.result_data[i].valore = data.result_data[i].VALORE;
|
|
3270
|
+
if (data.result_data[i].DESCRIZIONE_VALORE != null)
|
|
3271
|
+
data.result_data[i].descrizione_valore = data.result_data[i].DESCRIZIONE_VALORE;
|
|
3272
|
+
}
|
|
3273
|
+
_this.resetD(data.result_data);
|
|
3274
|
+
}
|
|
3275
|
+
}), (/**
|
|
3276
|
+
* @param {?} err
|
|
3277
|
+
* @return {?}
|
|
3278
|
+
*/
|
|
3279
|
+
function (err) {
|
|
3280
|
+
_this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + _this.sql + "]";
|
|
3377
3281
|
}));
|
|
3378
|
-
}
|
|
3379
|
-
this.uploader.uploadAll();
|
|
3380
3282
|
};
|
|
3381
3283
|
/**
|
|
3382
|
-
* @param {?}
|
|
3383
|
-
* @param {?} p_k
|
|
3384
|
-
* @param {?} p_label
|
|
3385
|
-
* @param {?=} p_tipo
|
|
3386
|
-
* @param {?=} programma_da_eseguire
|
|
3387
|
-
* @param {?=} allow_delete
|
|
3284
|
+
* @param {?} o
|
|
3388
3285
|
* @return {?}
|
|
3389
3286
|
*/
|
|
3390
|
-
|
|
3391
|
-
* @param {?}
|
|
3392
|
-
* @param {?} p_k
|
|
3393
|
-
* @param {?} p_label
|
|
3394
|
-
* @param {?=} p_tipo
|
|
3395
|
-
* @param {?=} programma_da_eseguire
|
|
3396
|
-
* @param {?=} allow_delete
|
|
3287
|
+
FHComboboxComponent.prototype.add_option = /**
|
|
3288
|
+
* @param {?} o
|
|
3397
3289
|
* @return {?}
|
|
3398
3290
|
*/
|
|
3399
|
-
function (
|
|
3400
|
-
|
|
3401
|
-
if (programma_da_eseguire === void 0) { programma_da_eseguire = ""; }
|
|
3402
|
-
if (allow_delete === void 0) { allow_delete = false; }
|
|
3403
|
-
this.App = p_app;
|
|
3404
|
-
this.K = p_k;
|
|
3405
|
-
this.label = p_label;
|
|
3406
|
-
this.tipo = p_tipo;
|
|
3407
|
-
this.b_ini = true;
|
|
3408
|
-
this.b_edit_loaded = false;
|
|
3409
|
-
this.descrizione = "";
|
|
3410
|
-
this.programma_da_eseguire = programma_da_eseguire;
|
|
3411
|
-
this.allow_delete = allow_delete;
|
|
3412
|
-
this.ref_allegato();
|
|
3291
|
+
function (o) {
|
|
3292
|
+
this.myData.push(o);
|
|
3413
3293
|
};
|
|
3414
3294
|
/**
|
|
3295
|
+
* @param {?} o
|
|
3415
3296
|
* @return {?}
|
|
3416
3297
|
*/
|
|
3417
|
-
|
|
3298
|
+
FHComboboxComponent.prototype.resetD = /**
|
|
3299
|
+
* @param {?} o
|
|
3418
3300
|
* @return {?}
|
|
3419
3301
|
*/
|
|
3420
|
-
function () {
|
|
3421
|
-
|
|
3422
|
-
this.
|
|
3423
|
-
this.
|
|
3424
|
-
this.
|
|
3425
|
-
this.
|
|
3426
|
-
|
|
3302
|
+
function (o) {
|
|
3303
|
+
this.myData = o;
|
|
3304
|
+
this.selval = '-1';
|
|
3305
|
+
// console.log(this.smtr); console.log(this.smtr.nativeElement);
|
|
3306
|
+
this.setByValue(this.valDef);
|
|
3307
|
+
if (this.getValue() == "-1" && this.valDef != "-1")
|
|
3308
|
+
this.setByDescri(this.valDef);
|
|
3309
|
+
this.fillend.emit();
|
|
3310
|
+
};
|
|
3311
|
+
/**
|
|
3312
|
+
* @param {?} desc_val
|
|
3313
|
+
* @return {?}
|
|
3314
|
+
*/
|
|
3315
|
+
FHComboboxComponent.prototype.setByDescri = /**
|
|
3316
|
+
* @param {?} desc_val
|
|
3317
|
+
* @return {?}
|
|
3318
|
+
*/
|
|
3319
|
+
function (desc_val) {
|
|
3320
|
+
// console.log("setByDescri "+desc_val);
|
|
3321
|
+
this.valDef = desc_val;
|
|
3322
|
+
this.selval = '-1';
|
|
3323
|
+
if (desc_val == "")
|
|
3427
3324
|
return;
|
|
3428
|
-
if (this.
|
|
3325
|
+
if (this.myData == null)
|
|
3429
3326
|
return;
|
|
3430
|
-
if (this.
|
|
3327
|
+
if (this.myData.length == 0 || this.myData[0] == null)
|
|
3431
3328
|
return;
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
function (data) {
|
|
3442
|
-
if (data != null)
|
|
3443
|
-
if (data.result_msg == "OK") {
|
|
3444
|
-
/** @type {?} */
|
|
3445
|
-
var a = data.result_data;
|
|
3446
|
-
if (a.length > 0) {
|
|
3447
|
-
_this.id = a[0].id;
|
|
3448
|
-
_this.descrizione = a[0].descrizione;
|
|
3449
|
-
_this.file_name = a[0].Filename;
|
|
3450
|
-
_this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
|
|
3451
|
-
_this.b_edit_loaded = true;
|
|
3452
|
-
}
|
|
3453
|
-
}
|
|
3454
|
-
}));
|
|
3455
|
-
};
|
|
3456
|
-
FHUploadComponent.decorators = [
|
|
3457
|
-
{ type: Component, args: [{
|
|
3458
|
-
selector: 'FHUpload',
|
|
3459
|
-
template: "\n \n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled && !loading\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-form-field [hidden]=\"!show_descri\" class=\"field_style\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}} {{fixed_label}}</mat-label>\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n >\n </mat-form-field>\n \n <div style=\"width:140px\" fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <input type=\"file\" multiple ng2FileSelect [uploader]=\"uploader\" name=\"file-fh{{App}}\" id=\"file-fh{{App}}\" class=\"inputfile inputfile-fh\" />\n <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\"> Upload</span></label>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\"> \n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button> \n <button mat-flat-button *ngIf=\"id!=null && allow_delete\" (click)=\"del_doc()\" color=\"warn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\">\n <label>{{label}}:</label>{{descrizione}}\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px;background-color: #F5F5F5\">{{label_b}}</button>\n\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n ",
|
|
3460
|
-
styles: ["\n\n "]
|
|
3461
|
-
}] }
|
|
3462
|
-
];
|
|
3463
|
-
/** @nocollapse */
|
|
3464
|
-
FHUploadComponent.ctorParameters = function () { return [
|
|
3465
|
-
{ type: QueryService },
|
|
3466
|
-
{ type: ToastrService },
|
|
3467
|
-
{ type: MatDialog },
|
|
3468
|
-
{ type: AppService }
|
|
3469
|
-
]; };
|
|
3470
|
-
FHUploadComponent.propDecorators = {
|
|
3471
|
-
show_descri: [{ type: Input }],
|
|
3472
|
-
enabled: [{ type: Input }],
|
|
3473
|
-
single: [{ type: Input }],
|
|
3474
|
-
descri_obb: [{ type: Input }],
|
|
3475
|
-
programma_da_eseguire: [{ type: Input }],
|
|
3476
|
-
label_attendere: [{ type: Input }],
|
|
3477
|
-
fixed_label: [{ type: Input }],
|
|
3478
|
-
limit_string: [{ type: Input }],
|
|
3479
|
-
allegato_inserito: [{ type: Input }],
|
|
3480
|
-
inserire_descrizione: [{ type: Input }],
|
|
3481
|
-
lista_allegati: [{ type: Input }],
|
|
3482
|
-
change: [{ type: Output }],
|
|
3483
|
-
upload_ended: [{ type: Output }]
|
|
3329
|
+
for (var j = 0; j < this.myData.length; j++)
|
|
3330
|
+
if (this.myData[j].descrizione_valore == desc_val) {
|
|
3331
|
+
this.selval = "" + this.myData[j].valore;
|
|
3332
|
+
if (this.myData[j].descrizione_valore != null)
|
|
3333
|
+
this.descri_val = this.myData[j].descrizione_valore;
|
|
3334
|
+
this.update_dis();
|
|
3335
|
+
return;
|
|
3336
|
+
}
|
|
3337
|
+
this.update_dis();
|
|
3484
3338
|
};
|
|
3485
|
-
return FHUploadComponent;
|
|
3486
|
-
}());
|
|
3487
|
-
|
|
3488
|
-
/**
|
|
3489
|
-
* @fileoverview added by tsickle
|
|
3490
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3491
|
-
*/
|
|
3492
|
-
var AuthenticationService = /** @class */ (function () {
|
|
3493
|
-
function AuthenticationService(_dataService, toastr, http, router, route, _fileService, app_s, uti_s) {
|
|
3494
|
-
this._dataService = _dataService;
|
|
3495
|
-
this.toastr = toastr;
|
|
3496
|
-
this.http = http;
|
|
3497
|
-
this.router = router;
|
|
3498
|
-
this.route = route;
|
|
3499
|
-
this._fileService = _fileService;
|
|
3500
|
-
this.app_s = app_s;
|
|
3501
|
-
this.uti_s = uti_s;
|
|
3502
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
|
|
3503
|
-
this.goto_after = "";
|
|
3504
|
-
this.username = '';
|
|
3505
|
-
this.headers = new HttpHeaders({
|
|
3506
|
-
'Content-Type': 'application/json',
|
|
3507
|
-
});
|
|
3508
|
-
}
|
|
3509
3339
|
/**
|
|
3340
|
+
* @param {?} ind
|
|
3510
3341
|
* @return {?}
|
|
3511
3342
|
*/
|
|
3512
|
-
|
|
3343
|
+
FHComboboxComponent.prototype.setByIndex = /**
|
|
3344
|
+
* @param {?} ind
|
|
3513
3345
|
* @return {?}
|
|
3514
3346
|
*/
|
|
3515
|
-
function () {
|
|
3516
|
-
this.
|
|
3517
|
-
this.
|
|
3518
|
-
this.
|
|
3519
|
-
|
|
3520
|
-
this.
|
|
3521
|
-
|
|
3522
|
-
this.
|
|
3523
|
-
|
|
3524
|
-
this.app_s.token = null;
|
|
3525
|
-
localStorage.removeItem(this.app_s.COMPANY_KEY + "token");
|
|
3526
|
-
if (this.app_s.LOGIN_EXT != 1)
|
|
3527
|
-
this.router.navigate(['login']);
|
|
3528
|
-
else {
|
|
3529
|
-
window.location.href = (this.app_s.LOGOUT_URL_EXT);
|
|
3347
|
+
function (ind) {
|
|
3348
|
+
this.valDef = "";
|
|
3349
|
+
this.selval = '-1';
|
|
3350
|
+
if (this.myData == null)
|
|
3351
|
+
return;
|
|
3352
|
+
if (this.myData.length == 0 || this.myData[0] == null)
|
|
3353
|
+
return;
|
|
3354
|
+
if (this.myData.length > ind) {
|
|
3355
|
+
this.setByDescri(this.myData[ind].descrizione_valore);
|
|
3530
3356
|
}
|
|
3531
3357
|
};
|
|
3532
3358
|
/**
|
|
3533
|
-
* @param {?} username
|
|
3534
|
-
* @param {?} password
|
|
3535
|
-
* @param {?=} displayError
|
|
3536
3359
|
* @return {?}
|
|
3537
3360
|
*/
|
|
3538
|
-
|
|
3539
|
-
* @param {?} username
|
|
3540
|
-
* @param {?} password
|
|
3541
|
-
* @param {?=} displayError
|
|
3361
|
+
FHComboboxComponent.prototype.getObj = /**
|
|
3542
3362
|
* @return {?}
|
|
3543
3363
|
*/
|
|
3544
|
-
function (
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
headers: this.headers
|
|
3554
|
-
}).pipe(map((/**
|
|
3555
|
-
* @param {?} res
|
|
3556
|
-
* @return {?}
|
|
3557
|
-
*/
|
|
3558
|
-
function (res) {
|
|
3559
|
-
// Handle errors, display if enabled
|
|
3560
|
-
/** @type {?} */
|
|
3561
|
-
var err;
|
|
3562
|
-
if (!res) {
|
|
3563
|
-
err = new Error('Empty server response');
|
|
3564
|
-
}
|
|
3565
|
-
else if (res.result_msg === 'KO') {
|
|
3566
|
-
err = new Error(res.msg);
|
|
3567
|
-
}
|
|
3568
|
-
else {
|
|
3569
|
-
if (res.result_data.length > 0) {
|
|
3570
|
-
localStorage.setItem(_this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
|
|
3364
|
+
function () {
|
|
3365
|
+
if (this.selval == null)
|
|
3366
|
+
return null;
|
|
3367
|
+
if (this.selval == "-1")
|
|
3368
|
+
return null;
|
|
3369
|
+
else
|
|
3370
|
+
for (var j = 0; j < this.myData.length; j++)
|
|
3371
|
+
if (this.myData[j].valore == this.selval) {
|
|
3372
|
+
return this.myData[j];
|
|
3571
3373
|
}
|
|
3374
|
+
};
|
|
3375
|
+
/**
|
|
3376
|
+
* @param {?} desc_val
|
|
3377
|
+
* @return {?}
|
|
3378
|
+
*/
|
|
3379
|
+
FHComboboxComponent.prototype.setByValue = /**
|
|
3380
|
+
* @param {?} desc_val
|
|
3381
|
+
* @return {?}
|
|
3382
|
+
*/
|
|
3383
|
+
function (desc_val) {
|
|
3384
|
+
this.valDef = desc_val;
|
|
3385
|
+
this.selval = '-1';
|
|
3386
|
+
// console.log(this.myData);
|
|
3387
|
+
if ("" + desc_val == "") {
|
|
3388
|
+
// console.log('qqq1111');
|
|
3389
|
+
return;
|
|
3390
|
+
}
|
|
3391
|
+
// console.log("qui");
|
|
3392
|
+
if (this.myData == null)
|
|
3393
|
+
return;
|
|
3394
|
+
// console.log("qui1");
|
|
3395
|
+
if (this.myData.length == 0 || this.myData[0] == null)
|
|
3396
|
+
return;
|
|
3397
|
+
//console.log("qui2");
|
|
3398
|
+
for (var j = 0; j < this.myData.length; j++) {
|
|
3399
|
+
//console.log(this.myData[j].valore +' '+ desc_val);
|
|
3400
|
+
if (this.myData[j].valore == desc_val) {
|
|
3401
|
+
this.selval = "" + this.myData[j].valore;
|
|
3402
|
+
if (this.myData[j].descrizione_valore != null)
|
|
3403
|
+
this.descri_val = this.myData[j].descrizione_valore;
|
|
3404
|
+
this.update_dis();
|
|
3405
|
+
return;
|
|
3572
3406
|
}
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3407
|
+
}
|
|
3408
|
+
this.update_dis();
|
|
3409
|
+
};
|
|
3410
|
+
/**
|
|
3411
|
+
* @return {?}
|
|
3412
|
+
*/
|
|
3413
|
+
FHComboboxComponent.prototype.getDescri = /**
|
|
3414
|
+
* @return {?}
|
|
3415
|
+
*/
|
|
3416
|
+
function () {
|
|
3417
|
+
if (!this.enabled) {
|
|
3418
|
+
if (this.selval == null)
|
|
3419
|
+
return this.valDef;
|
|
3420
|
+
if (this.selval == "-1")
|
|
3421
|
+
return this.valDef;
|
|
3422
|
+
}
|
|
3423
|
+
if (this.selval == null)
|
|
3424
|
+
return "-1";
|
|
3425
|
+
if (this.selval == "-1")
|
|
3426
|
+
return "-1";
|
|
3427
|
+
else
|
|
3428
|
+
for (var j = 0; j < this.myData.length; j++)
|
|
3429
|
+
if (this.myData[j].valore == this.selval) {
|
|
3430
|
+
return this.myData[j].descrizione_valore;
|
|
3577
3431
|
}
|
|
3578
|
-
throw new Error(err);
|
|
3579
|
-
}
|
|
3580
|
-
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
3581
|
-
})), catchError((/**
|
|
3582
|
-
* @param {?} err
|
|
3583
|
-
* @return {?}
|
|
3584
|
-
*/
|
|
3585
|
-
function (err) {
|
|
3586
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
3587
|
-
// We'd also dig deeper into the error to get a better message
|
|
3588
|
-
/** @type {?} */
|
|
3589
|
-
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
3590
|
-
console.error(errMsg); // log to console instead
|
|
3591
|
-
throw err;
|
|
3592
|
-
})));
|
|
3593
3432
|
};
|
|
3594
3433
|
/**
|
|
3595
|
-
* @param {?} username
|
|
3596
|
-
* @param {?=} displayError
|
|
3597
3434
|
* @return {?}
|
|
3598
3435
|
*/
|
|
3599
|
-
|
|
3600
|
-
* @param {?} username
|
|
3601
|
-
* @param {?=} displayError
|
|
3436
|
+
FHComboboxComponent.prototype.getValue = /**
|
|
3602
3437
|
* @return {?}
|
|
3603
3438
|
*/
|
|
3604
|
-
function (
|
|
3605
|
-
|
|
3606
|
-
if (
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3439
|
+
function () {
|
|
3440
|
+
// console.log(this.selval);
|
|
3441
|
+
if (!this.enabled) {
|
|
3442
|
+
if (this.selval == null)
|
|
3443
|
+
return this.valDef;
|
|
3444
|
+
if (this.selval == "-1")
|
|
3445
|
+
return this.valDef;
|
|
3446
|
+
}
|
|
3447
|
+
if (this.selval == null)
|
|
3448
|
+
return "-1";
|
|
3449
|
+
if (this.selval == "")
|
|
3450
|
+
return "-1";
|
|
3451
|
+
else
|
|
3452
|
+
return this.selval;
|
|
3453
|
+
};
|
|
3454
|
+
/**
|
|
3455
|
+
* @param {?} campo
|
|
3456
|
+
* @return {?}
|
|
3457
|
+
*/
|
|
3458
|
+
FHComboboxComponent.prototype.getData = /**
|
|
3459
|
+
* @param {?} campo
|
|
3460
|
+
* @return {?}
|
|
3461
|
+
*/
|
|
3462
|
+
function (campo) {
|
|
3463
|
+
for (var x in this.myData) {
|
|
3464
|
+
if (this.myData[x]['valore'] == this.selval) {
|
|
3465
|
+
return (this.myData[x][campo]);
|
|
3625
3466
|
}
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
if (displayError) {
|
|
3629
|
-
_this.toastr.error(err.message);
|
|
3630
|
-
}
|
|
3631
|
-
throw new Error(err);
|
|
3467
|
+
else {
|
|
3468
|
+
continue;
|
|
3632
3469
|
}
|
|
3633
|
-
|
|
3634
|
-
})), catchError((/**
|
|
3635
|
-
* @param {?} err
|
|
3636
|
-
* @return {?}
|
|
3637
|
-
*/
|
|
3638
|
-
function (err) {
|
|
3639
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
3640
|
-
// We'd also dig deeper into the error to get a better message
|
|
3641
|
-
/** @type {?} */
|
|
3642
|
-
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
3643
|
-
console.error(errMsg); // log to console instead
|
|
3644
|
-
throw err;
|
|
3645
|
-
})));
|
|
3470
|
+
}
|
|
3646
3471
|
};
|
|
3647
3472
|
/**
|
|
3648
|
-
* @param {?}
|
|
3649
|
-
* @param {?=} displayError
|
|
3473
|
+
* @param {?} s
|
|
3650
3474
|
* @return {?}
|
|
3651
3475
|
*/
|
|
3652
|
-
|
|
3653
|
-
* @param {?}
|
|
3654
|
-
* @param {?=} displayError
|
|
3476
|
+
FHComboboxComponent.prototype.set_options = /**
|
|
3477
|
+
* @param {?} s
|
|
3655
3478
|
* @return {?}
|
|
3656
3479
|
*/
|
|
3657
|
-
function (
|
|
3658
|
-
|
|
3659
|
-
if (displayError === void 0) { displayError = true; }
|
|
3480
|
+
function (s) {
|
|
3481
|
+
this.myData = new Array();
|
|
3660
3482
|
/** @type {?} */
|
|
3661
|
-
var
|
|
3662
|
-
|
|
3663
|
-
headers: this.headers
|
|
3664
|
-
}).pipe(map((/**
|
|
3665
|
-
* @param {?} res
|
|
3666
|
-
* @return {?}
|
|
3667
|
-
*/
|
|
3668
|
-
function (res) {
|
|
3669
|
-
// Handle errors, display if enabled
|
|
3483
|
+
var a = s.split('$');
|
|
3484
|
+
for (var i = 0; i < a.length; i++) {
|
|
3670
3485
|
/** @type {?} */
|
|
3671
|
-
var
|
|
3672
|
-
if (!res) {
|
|
3673
|
-
err = new Error('Empty server response');
|
|
3674
|
-
}
|
|
3675
|
-
else if (res.result_msg === 'KO') {
|
|
3676
|
-
err = new Error(res.msg);
|
|
3677
|
-
}
|
|
3678
|
-
if (err) {
|
|
3679
|
-
console.error(err);
|
|
3680
|
-
if (displayError) {
|
|
3681
|
-
_this.toastr.error(err.message);
|
|
3682
|
-
}
|
|
3683
|
-
throw new Error(err);
|
|
3684
|
-
}
|
|
3685
|
-
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
3686
|
-
})), catchError((/**
|
|
3687
|
-
* @param {?} err
|
|
3688
|
-
* @return {?}
|
|
3689
|
-
*/
|
|
3690
|
-
function (err) {
|
|
3691
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
3692
|
-
// We'd also dig deeper into the error to get a better message
|
|
3486
|
+
var o = new Object();
|
|
3693
3487
|
/** @type {?} */
|
|
3694
|
-
var
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3488
|
+
var av = a[i].split('|');
|
|
3489
|
+
o.valore = av[1];
|
|
3490
|
+
o.descrizione_valore = av[0];
|
|
3491
|
+
this
|
|
3492
|
+
.myData
|
|
3493
|
+
.push(o);
|
|
3494
|
+
}
|
|
3495
|
+
this.setByValue(this.valDef);
|
|
3496
|
+
if (this.getValue() == "-1")
|
|
3497
|
+
this.setByDescri(this.valDef);
|
|
3698
3498
|
};
|
|
3699
3499
|
/**
|
|
3700
|
-
* @param {?} res_rep
|
|
3701
|
-
* @param {?=} displayError
|
|
3702
3500
|
* @return {?}
|
|
3703
3501
|
*/
|
|
3704
|
-
|
|
3705
|
-
* @param {?} res_rep
|
|
3706
|
-
* @param {?=} displayError
|
|
3707
|
-
* @return {?}
|
|
3708
|
-
*/
|
|
3709
|
-
function (res_rep, displayError) {
|
|
3710
|
-
var _this = this;
|
|
3711
|
-
if (displayError === void 0) { displayError = true; }
|
|
3712
|
-
/** @type {?} */
|
|
3713
|
-
var post_v = JSON.stringify({ res_rep: res_rep, op: 'check_token' });
|
|
3714
|
-
return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
|
|
3715
|
-
headers: this.headers
|
|
3716
|
-
}).pipe(map((/**
|
|
3717
|
-
* @param {?} res
|
|
3718
|
-
* @return {?}
|
|
3719
|
-
*/
|
|
3720
|
-
function (res) {
|
|
3721
|
-
// Handle errors, display if enabled
|
|
3722
|
-
/** @type {?} */
|
|
3723
|
-
var err;
|
|
3724
|
-
if (!res) {
|
|
3725
|
-
err = new Error('Empty server response');
|
|
3726
|
-
}
|
|
3727
|
-
else if (res.result_msg === 'KO') {
|
|
3728
|
-
err = new Error(res.msg);
|
|
3729
|
-
}
|
|
3730
|
-
if (err) {
|
|
3731
|
-
console.error(err);
|
|
3732
|
-
if (displayError) {
|
|
3733
|
-
_this.toastr.error(err.message);
|
|
3734
|
-
}
|
|
3735
|
-
throw new Error(err);
|
|
3736
|
-
}
|
|
3737
|
-
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
3738
|
-
})), catchError((/**
|
|
3739
|
-
* @param {?} err
|
|
3740
|
-
* @return {?}
|
|
3741
|
-
*/
|
|
3742
|
-
function (err) {
|
|
3743
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
3744
|
-
// We'd also dig deeper into the error to get a better message
|
|
3745
|
-
/** @type {?} */
|
|
3746
|
-
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
3747
|
-
console.error(errMsg); // log to console instead
|
|
3748
|
-
throw err;
|
|
3749
|
-
})));
|
|
3750
|
-
};
|
|
3751
|
-
/**
|
|
3752
|
-
* @param {?} token
|
|
3753
|
-
* @param {?} password
|
|
3754
|
-
* @param {?=} displayError
|
|
3755
|
-
* @return {?}
|
|
3756
|
-
*/
|
|
3757
|
-
AuthenticationService.prototype.change_password = /**
|
|
3758
|
-
* @param {?} token
|
|
3759
|
-
* @param {?} password
|
|
3760
|
-
* @param {?=} displayError
|
|
3761
|
-
* @return {?}
|
|
3762
|
-
*/
|
|
3763
|
-
function (token, password, displayError) {
|
|
3764
|
-
var _this = this;
|
|
3765
|
-
if (displayError === void 0) { displayError = true; }
|
|
3766
|
-
/** @type {?} */
|
|
3767
|
-
var post_v = JSON.stringify({ token: token, password: password, op: 'change_password' });
|
|
3768
|
-
return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
|
|
3769
|
-
headers: this.headers
|
|
3770
|
-
}).pipe(map((/**
|
|
3771
|
-
* @param {?} res
|
|
3772
|
-
* @return {?}
|
|
3773
|
-
*/
|
|
3774
|
-
function (res) {
|
|
3775
|
-
// Handle errors, display if enabled
|
|
3776
|
-
/** @type {?} */
|
|
3777
|
-
var err;
|
|
3778
|
-
if (!res) {
|
|
3779
|
-
err = new Error('Empty server response');
|
|
3780
|
-
}
|
|
3781
|
-
else if (res.result_msg === 'KO') {
|
|
3782
|
-
err = new Error(res.msg);
|
|
3783
|
-
}
|
|
3784
|
-
if (err) {
|
|
3785
|
-
console.error(err);
|
|
3786
|
-
if (displayError) {
|
|
3787
|
-
_this.toastr.error(err.message);
|
|
3788
|
-
}
|
|
3789
|
-
throw new Error(err);
|
|
3790
|
-
}
|
|
3791
|
-
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
3792
|
-
})), catchError((/**
|
|
3793
|
-
* @param {?} err
|
|
3794
|
-
* @return {?}
|
|
3795
|
-
*/
|
|
3796
|
-
function (err) {
|
|
3797
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
3798
|
-
// We'd also dig deeper into the error to get a better message
|
|
3799
|
-
/** @type {?} */
|
|
3800
|
-
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
3801
|
-
console.error(errMsg); // log to console instead
|
|
3802
|
-
throw err;
|
|
3803
|
-
})));
|
|
3804
|
-
};
|
|
3805
|
-
/**
|
|
3806
|
-
* @return {?}
|
|
3807
|
-
*/
|
|
3808
|
-
AuthenticationService.prototype.checkCredentials_toLogin = /**
|
|
3502
|
+
FHComboboxComponent.prototype.ngAfterViewInit = /**
|
|
3809
3503
|
* @return {?}
|
|
3810
3504
|
*/
|
|
3811
3505
|
function () {
|
|
3812
|
-
|
|
3813
|
-
this.goto_after = window.location.toString();
|
|
3814
|
-
if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
|
|
3815
|
-
if (this.router.url.indexOf('/rp/') == -1)
|
|
3816
|
-
this.router.navigate(['login']);
|
|
3817
|
-
return false;
|
|
3818
|
-
}
|
|
3819
|
-
return true;
|
|
3506
|
+
// console.log("ngAfterViewInit"); console.log(this.init_fill);
|
|
3820
3507
|
};
|
|
3821
3508
|
/**
|
|
3822
3509
|
* @return {?}
|
|
3823
3510
|
*/
|
|
3824
|
-
|
|
3511
|
+
FHComboboxComponent.prototype.ngOnInit = /**
|
|
3825
3512
|
* @return {?}
|
|
3826
3513
|
*/
|
|
3827
3514
|
function () {
|
|
3828
|
-
if (
|
|
3829
|
-
this.
|
|
3830
|
-
|
|
3831
|
-
|
|
3515
|
+
if (this.init_fill == true) {
|
|
3516
|
+
if (this.sql == '') {
|
|
3517
|
+
//this.errorMsg="QUERY NON CONFIGURATA";
|
|
3518
|
+
return;
|
|
3519
|
+
}
|
|
3520
|
+
this.fillCombo();
|
|
3832
3521
|
}
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
AuthenticationService.decorators = [
|
|
3836
|
-
{ type: Injectable, args: [{
|
|
3837
|
-
providedIn: 'root',
|
|
3838
|
-
},] }
|
|
3839
|
-
];
|
|
3840
|
-
/** @nocollapse */
|
|
3841
|
-
AuthenticationService.ctorParameters = function () { return [
|
|
3842
|
-
{ type: QueryService },
|
|
3843
|
-
{ type: ToastrService },
|
|
3844
|
-
{ type: HttpClient },
|
|
3845
|
-
{ type: Router },
|
|
3846
|
-
{ type: ActivatedRoute },
|
|
3847
|
-
{ type: FileService },
|
|
3848
|
-
{ type: AppService },
|
|
3849
|
-
{ type: UtilityService }
|
|
3850
|
-
]; };
|
|
3851
|
-
/** @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" });
|
|
3852
|
-
return AuthenticationService;
|
|
3853
|
-
}());
|
|
3854
|
-
|
|
3855
|
-
/**
|
|
3856
|
-
* @fileoverview added by tsickle
|
|
3857
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3858
|
-
*/
|
|
3859
|
-
var WinAskTextBigComponent = /** @class */ (function () {
|
|
3860
|
-
function WinAskTextBigComponent(dialogRef, toastr) {
|
|
3861
|
-
this.dialogRef = dialogRef;
|
|
3862
|
-
this.toastr = toastr;
|
|
3863
|
-
this.title = "";
|
|
3864
|
-
this.label = "";
|
|
3865
|
-
this.valore = "";
|
|
3866
|
-
this.readonly = false;
|
|
3867
|
-
this.show_annulla = true;
|
|
3868
|
-
this.show_ok = true;
|
|
3869
|
-
this.min_chars = 3;
|
|
3870
|
-
}
|
|
3871
|
-
/**
|
|
3872
|
-
* @return {?}
|
|
3873
|
-
*/
|
|
3874
|
-
WinAskTextBigComponent.prototype.ngOnInit = /**
|
|
3875
|
-
* @return {?}
|
|
3876
|
-
*/
|
|
3877
|
-
function () {
|
|
3878
|
-
};
|
|
3879
|
-
/**
|
|
3880
|
-
* @return {?}
|
|
3881
|
-
*/
|
|
3882
|
-
WinAskTextBigComponent.prototype.show = /**
|
|
3883
|
-
* @return {?}
|
|
3884
|
-
*/
|
|
3885
|
-
function () {
|
|
3886
|
-
};
|
|
3887
|
-
/**
|
|
3888
|
-
* @return {?}
|
|
3889
|
-
*/
|
|
3890
|
-
WinAskTextBigComponent.prototype.hide = /**
|
|
3891
|
-
* @return {?}
|
|
3892
|
-
*/
|
|
3893
|
-
function () {
|
|
3894
|
-
this.dialogRef.close(null);
|
|
3895
|
-
};
|
|
3896
|
-
/**
|
|
3897
|
-
* @return {?}
|
|
3898
|
-
*/
|
|
3899
|
-
WinAskTextBigComponent.prototype.do_check = /**
|
|
3900
|
-
* @return {?}
|
|
3901
|
-
*/
|
|
3902
|
-
function () {
|
|
3903
|
-
if (this.valore.length < this.min_chars) {
|
|
3904
|
-
this.toastr.error('Il valore deve contenere almeno ' + this.min_chars + ' caratteri');
|
|
3905
|
-
return;
|
|
3522
|
+
else {
|
|
3523
|
+
this.errorMsg = "";
|
|
3906
3524
|
}
|
|
3907
|
-
this
|
|
3525
|
+
this
|
|
3526
|
+
.initend
|
|
3527
|
+
.emit();
|
|
3908
3528
|
};
|
|
3909
3529
|
/**
|
|
3910
3530
|
* @return {?}
|
|
3911
3531
|
*/
|
|
3912
|
-
|
|
3532
|
+
FHComboboxComponent.prototype.sc = /**
|
|
3913
3533
|
* @return {?}
|
|
3914
3534
|
*/
|
|
3915
3535
|
function () {
|
|
3916
|
-
this
|
|
3536
|
+
this
|
|
3537
|
+
.selchange
|
|
3538
|
+
.emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
|
|
3917
3539
|
};
|
|
3918
|
-
|
|
3540
|
+
FHComboboxComponent.decorators = [
|
|
3919
3541
|
{ type: Component, args: [{
|
|
3920
|
-
selector: 'app-
|
|
3921
|
-
|
|
3542
|
+
selector: 'FHComboBox', template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <mat-select #cmb [(ngModel)]=\"selval\" (selectionChange)=\"sc()\" [required]=\"required\">\n <mat-option value=\"-1\">{{sel_label}}</mat-option>\n <mat-option value=\"{{app.valore}}\" *ngFor=\"let app of myData\">{{app.descrizione_valore}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"dis_value\">\n </mat-form-field>\n ",
|
|
3543
|
+
styles: ["\n\n "]
|
|
3922
3544
|
}] }
|
|
3923
3545
|
];
|
|
3924
3546
|
/** @nocollapse */
|
|
3925
|
-
|
|
3926
|
-
{ type:
|
|
3927
|
-
{ type:
|
|
3547
|
+
FHComboboxComponent.ctorParameters = function () { return [
|
|
3548
|
+
{ type: QueryService },
|
|
3549
|
+
{ type: OdbcService }
|
|
3928
3550
|
]; };
|
|
3929
|
-
|
|
3930
|
-
|
|
3551
|
+
FHComboboxComponent.propDecorators = {
|
|
3552
|
+
init_fill: [{ type: Input }],
|
|
3553
|
+
sql: [{ type: Input }],
|
|
3554
|
+
types: [{ type: Input }],
|
|
3555
|
+
values: [{ type: Input }],
|
|
3556
|
+
hidden: [{ type: Input }],
|
|
3931
3557
|
label: [{ type: Input }],
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3558
|
+
enabled: [{ type: Input }],
|
|
3559
|
+
required: [{ type: Input }],
|
|
3560
|
+
sel_label: [{ type: Input }],
|
|
3561
|
+
smtr: [{ type: ViewChild, args: ['cmb',] }],
|
|
3562
|
+
fillend: [{ type: Output }],
|
|
3563
|
+
selchange: [{ type: Output }],
|
|
3564
|
+
initend: [{ type: Output }],
|
|
3565
|
+
valDef: [{ type: Input }],
|
|
3566
|
+
db_type: [{ type: Input }]
|
|
3936
3567
|
};
|
|
3937
|
-
return
|
|
3568
|
+
return FHComboboxComponent;
|
|
3938
3569
|
}());
|
|
3939
3570
|
|
|
3940
3571
|
/**
|
|
3941
3572
|
* @fileoverview added by tsickle
|
|
3942
3573
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3943
3574
|
*/
|
|
3944
|
-
var
|
|
3945
|
-
function
|
|
3946
|
-
|
|
3575
|
+
var FHUploadComponent = /** @class */ (function () {
|
|
3576
|
+
function FHUploadComponent(_dataService, toastr, dialog, app_s) {
|
|
3577
|
+
var _this = this;
|
|
3947
3578
|
this._dataService = _dataService;
|
|
3948
3579
|
this.toastr = toastr;
|
|
3949
3580
|
this.dialog = dialog;
|
|
3950
|
-
this.
|
|
3951
|
-
this.
|
|
3581
|
+
this.app_s = app_s;
|
|
3582
|
+
this.show_descri = true;
|
|
3952
3583
|
this.enabled = true;
|
|
3953
|
-
this.
|
|
3954
|
-
this.
|
|
3955
|
-
this.
|
|
3956
|
-
this.
|
|
3957
|
-
this.
|
|
3958
|
-
this.
|
|
3959
|
-
this.
|
|
3960
|
-
this.
|
|
3961
|
-
this.
|
|
3584
|
+
this.single = true;
|
|
3585
|
+
this.descri_obb = false;
|
|
3586
|
+
this.programma_da_eseguire = '';
|
|
3587
|
+
this.label_attendere = 'ATTENDERE UPLOAD IN CORSO';
|
|
3588
|
+
this.fixed_label = ' (INSERISCI QUI LA DESCRIZIONE PRIMA DI CARICARE IL FILE)';
|
|
3589
|
+
this.limit_string = 'Il file di <size>MB supera il limite di 500MB';
|
|
3590
|
+
this.allegato_inserito = 'ALLEGATO INSERITO';
|
|
3591
|
+
this.inserire_descrizione = 'Descrizione Obbligatoria';
|
|
3592
|
+
this.lista_allegati = [];
|
|
3593
|
+
this.change = new EventEmitter();
|
|
3594
|
+
this.upload_ended = new EventEmitter();
|
|
3595
|
+
this.multi_list = false;
|
|
3596
|
+
this.allow_delete = false;
|
|
3597
|
+
this.loading = false;
|
|
3598
|
+
this.App = '';
|
|
3599
|
+
this.K = '';
|
|
3600
|
+
this.label_b = "";
|
|
3601
|
+
this.descrizione = '';
|
|
3602
|
+
this.file_name = '';
|
|
3603
|
+
this.label = '';
|
|
3604
|
+
this.username = '';
|
|
3962
3605
|
this.b_edit_loaded = false;
|
|
3963
|
-
this.
|
|
3964
|
-
this.b_mobile = false;
|
|
3606
|
+
this.tipo = '';
|
|
3965
3607
|
this.b_ini = false;
|
|
3966
|
-
this.
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
* @param {?} ax
|
|
3975
|
-
* @return {?}
|
|
3976
|
-
*/
|
|
3977
|
-
function (ax) {
|
|
3978
|
-
if (ax.APP != null)
|
|
3979
|
-
ax.App = ax.APP;
|
|
3980
|
-
if (this.sovrascrivi_path == '') {
|
|
3981
|
-
window.open(this._appservice.COMPANY_SITE_ROOT + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
|
|
3982
|
-
}
|
|
3983
|
-
else {
|
|
3984
|
-
window.open(this.sovrascrivi_path + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
|
|
3985
|
-
}
|
|
3986
|
-
};
|
|
3987
|
-
/**
|
|
3988
|
-
* @param {?} ax
|
|
3989
|
-
* @return {?}
|
|
3990
|
-
*/
|
|
3991
|
-
FHUploadPanelComponent.prototype.edit_descri = /**
|
|
3992
|
-
* @param {?} ax
|
|
3993
|
-
* @return {?}
|
|
3994
|
-
*/
|
|
3995
|
-
function (ax) {
|
|
3996
|
-
var _this = this;
|
|
3997
|
-
/** @type {?} */
|
|
3998
|
-
var dialogRef = this
|
|
3999
|
-
.dialog
|
|
4000
|
-
.open(WinAskTextBigComponent);
|
|
4001
|
-
dialogRef.componentInstance.label = "Descrizione Allegato";
|
|
4002
|
-
dialogRef.componentInstance.valore = ax.descrizione;
|
|
4003
|
-
dialogRef.componentInstance.min_chars = 0;
|
|
4004
|
-
dialogRef
|
|
4005
|
-
.afterClosed()
|
|
4006
|
-
.subscribe((/**
|
|
4007
|
-
* @param {?} result
|
|
3608
|
+
this.uploader = new FileUploader({
|
|
3609
|
+
url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
|
|
3610
|
+
'maxFileSize': 500 * 1024 * 1024
|
|
3611
|
+
});
|
|
3612
|
+
this.id = null;
|
|
3613
|
+
this.username = this.app_s.user;
|
|
3614
|
+
this.uploader.onBeforeUploadItem = (/**
|
|
3615
|
+
* @param {?} item
|
|
4008
3616
|
* @return {?}
|
|
4009
3617
|
*/
|
|
4010
|
-
function (
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
}));
|
|
3618
|
+
function (item) {
|
|
3619
|
+
item.withCredentials = false;
|
|
3620
|
+
});
|
|
3621
|
+
this.uploader.onCompleteItem = (/**
|
|
3622
|
+
* @param {?} item
|
|
3623
|
+
* @param {?} response
|
|
3624
|
+
* @param {?} status
|
|
3625
|
+
* @param {?} header
|
|
3626
|
+
* @return {?}
|
|
3627
|
+
*/
|
|
3628
|
+
function (item, response, status, header) {
|
|
3629
|
+
if (status === 200) {
|
|
3630
|
+
_this.descrizione = '';
|
|
3631
|
+
_this.toastr.info("INFO", _this.allegato_inserito, {
|
|
3632
|
+
timeOut: 1000,
|
|
3633
|
+
progressBar: true
|
|
3634
|
+
});
|
|
3635
|
+
_this.ref_allegato();
|
|
3636
|
+
_this.change.emit({ item: item, response: response, status: status, header: header });
|
|
4030
3637
|
}
|
|
4031
|
-
})
|
|
4032
|
-
}
|
|
3638
|
+
});
|
|
3639
|
+
}
|
|
4033
3640
|
/**
|
|
4034
|
-
* @param {?} ax
|
|
4035
3641
|
* @return {?}
|
|
4036
3642
|
*/
|
|
4037
|
-
|
|
4038
|
-
* @param {?} ax
|
|
3643
|
+
FHUploadComponent.prototype.del_doc = /**
|
|
4039
3644
|
* @return {?}
|
|
4040
3645
|
*/
|
|
4041
|
-
function (
|
|
3646
|
+
function () {
|
|
4042
3647
|
var _this = this;
|
|
4043
|
-
localStorage.setItem(this.
|
|
4044
|
-
localStorage.setItem(this.
|
|
3648
|
+
localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
|
|
3649
|
+
localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
|
|
4045
3650
|
/** @type {?} */
|
|
4046
3651
|
var dialogRef = this
|
|
4047
3652
|
.dialog
|
|
@@ -4058,7 +3663,7 @@ var FHUploadPanelComponent = /** @class */ (function () {
|
|
|
4058
3663
|
var p = new QParam();
|
|
4059
3664
|
p.sql = "DELETE_ALLEGATO";
|
|
4060
3665
|
p.types = ['int', 'string'];
|
|
4061
|
-
p.values = [
|
|
3666
|
+
p.values = [_this.id, _this.app_s.user];
|
|
4062
3667
|
_this
|
|
4063
3668
|
._dataService
|
|
4064
3669
|
.doQuery(p)
|
|
@@ -4090,183 +3695,539 @@ var FHUploadPanelComponent = /** @class */ (function () {
|
|
|
4090
3695
|
/**
|
|
4091
3696
|
* @return {?}
|
|
4092
3697
|
*/
|
|
4093
|
-
|
|
3698
|
+
FHUploadComponent.prototype.ngOnInit = /**
|
|
4094
3699
|
* @return {?}
|
|
4095
3700
|
*/
|
|
4096
3701
|
function () {
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
this.
|
|
3702
|
+
var _this = this;
|
|
3703
|
+
/** @type {?} */
|
|
3704
|
+
var uo = {};
|
|
3705
|
+
uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
|
|
3706
|
+
// console.log('ngOnInit!!');
|
|
3707
|
+
if (this.multi_list)
|
|
3708
|
+
setTimeout((/**
|
|
3709
|
+
* @return {?}
|
|
3710
|
+
*/
|
|
3711
|
+
function () { _this.cmb_tipo.fillCombo(); }), 100);
|
|
3712
|
+
this.uploader.setOptions(uo);
|
|
3713
|
+
this.uploader.onCompleteAll = (/**
|
|
3714
|
+
* @return {?}
|
|
3715
|
+
*/
|
|
3716
|
+
function () {
|
|
3717
|
+
_this.loading = false;
|
|
3718
|
+
_this.upload_ended.emit();
|
|
3719
|
+
if (_this.dialogRef != null)
|
|
3720
|
+
if (_this.dialogRef.componentInstance != null) {
|
|
3721
|
+
_this.dialogRef.componentInstance.update_progess(100);
|
|
3722
|
+
_this.dialogRef = null;
|
|
3723
|
+
}
|
|
3724
|
+
});
|
|
3725
|
+
this.uploader.onErrorItem = (/**
|
|
3726
|
+
* @param {?} a
|
|
3727
|
+
* @param {?} b
|
|
3728
|
+
* @param {?} c
|
|
3729
|
+
* @param {?} d
|
|
3730
|
+
* @return {?}
|
|
3731
|
+
*/
|
|
3732
|
+
function (a, b, c, d) {
|
|
3733
|
+
_this.toastr.error(b);
|
|
3734
|
+
});
|
|
3735
|
+
this.uploader.onAfterAddingFile = (/**
|
|
3736
|
+
* @param {?} fileItem
|
|
3737
|
+
* @return {?}
|
|
3738
|
+
*/
|
|
3739
|
+
function (fileItem) {
|
|
3740
|
+
_this.ch(fileItem);
|
|
3741
|
+
});
|
|
3742
|
+
this.uploader.onProgressItem = (/**
|
|
3743
|
+
* @param {?} fileItem
|
|
3744
|
+
* @param {?} progress
|
|
3745
|
+
* @return {?}
|
|
3746
|
+
*/
|
|
3747
|
+
function (fileItem, progress) {
|
|
3748
|
+
// console.log(fileItem);
|
|
3749
|
+
// console.log(progress);
|
|
3750
|
+
_this.loading = true;
|
|
3751
|
+
if (_this.dialogRef != null)
|
|
3752
|
+
if (_this.dialogRef.componentInstance != null)
|
|
3753
|
+
_this.dialogRef.componentInstance.update_progess(progress);
|
|
3754
|
+
});
|
|
3755
|
+
this.uploader.onWhenAddingFileFailed = (/**
|
|
3756
|
+
* @param {?} item
|
|
3757
|
+
* @param {?} filter
|
|
3758
|
+
* @param {?} options
|
|
3759
|
+
* @return {?}
|
|
3760
|
+
*/
|
|
3761
|
+
function (item, filter, options) {
|
|
3762
|
+
switch (filter.name) {
|
|
3763
|
+
case 'fileSize':
|
|
3764
|
+
/** @type {?} */
|
|
3765
|
+
var ar = Math.round(item.size / 1024 / 1024);
|
|
3766
|
+
_this.toastr.error(_this.limit_string.split('<size>').join('' + ar));
|
|
3767
|
+
break;
|
|
3768
|
+
default:
|
|
3769
|
+
_this.toastr.error("Errore: " + filter.name);
|
|
3770
|
+
}
|
|
3771
|
+
});
|
|
4103
3772
|
};
|
|
4104
3773
|
/**
|
|
4105
|
-
* @param {?} p_app
|
|
4106
|
-
* @param {?} p_k
|
|
4107
|
-
* @param {?=} p_tipo
|
|
4108
|
-
* @param {?=} programma_da_eseguire
|
|
4109
3774
|
* @return {?}
|
|
4110
3775
|
*/
|
|
4111
|
-
|
|
4112
|
-
* @param {?} p_app
|
|
4113
|
-
* @param {?} p_k
|
|
4114
|
-
* @param {?=} p_tipo
|
|
4115
|
-
* @param {?=} programma_da_eseguire
|
|
3776
|
+
FHUploadComponent.prototype.download_all = /**
|
|
4116
3777
|
* @return {?}
|
|
4117
3778
|
*/
|
|
4118
|
-
function (
|
|
4119
|
-
|
|
4120
|
-
if (programma_da_eseguire === void 0) { programma_da_eseguire = ""; }
|
|
4121
|
-
this.App = p_app;
|
|
4122
|
-
this.K = p_k;
|
|
4123
|
-
this.b_ini = true;
|
|
4124
|
-
this.b_edit_loaded = false;
|
|
4125
|
-
this.m_p_tipo = p_tipo;
|
|
4126
|
-
this.m_programma_da_eseguire = programma_da_eseguire;
|
|
4127
|
-
this.ngOnInit();
|
|
3779
|
+
function () {
|
|
3780
|
+
window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + this.App + '/' + this.K + '/' + this.file_name);
|
|
4128
3781
|
};
|
|
4129
3782
|
/**
|
|
3783
|
+
* @param {?} fileItem
|
|
4130
3784
|
* @return {?}
|
|
4131
3785
|
*/
|
|
4132
|
-
|
|
3786
|
+
FHUploadComponent.prototype.ch = /**
|
|
3787
|
+
* @param {?} fileItem
|
|
4133
3788
|
* @return {?}
|
|
4134
3789
|
*/
|
|
4135
|
-
function () {
|
|
3790
|
+
function (fileItem) {
|
|
4136
3791
|
var _this = this;
|
|
4137
|
-
if (this.
|
|
4138
|
-
|
|
4139
|
-
if (this.App == "")
|
|
3792
|
+
if (this.descri_obb && this.descrizione == '') {
|
|
3793
|
+
this.toastr.error(this.inserire_descrizione);
|
|
4140
3794
|
return;
|
|
4141
|
-
|
|
4142
|
-
var
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
* @param {?}
|
|
3795
|
+
}
|
|
3796
|
+
for (var i = 0; i < this.lista_allegati.length; i++) {
|
|
3797
|
+
if (this.lista_allegati[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
|
|
3798
|
+
this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
|
|
3799
|
+
return;
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
this.uploader.onBuildItemForm = (/**
|
|
3803
|
+
* @param {?} item
|
|
3804
|
+
* @param {?} form
|
|
3805
|
+
* @return {?}
|
|
3806
|
+
*/
|
|
3807
|
+
function (item, form) {
|
|
3808
|
+
form.append('App', _this.App);
|
|
3809
|
+
form.append('K', _this.K);
|
|
3810
|
+
form.append('descrizione', _this.descrizione);
|
|
3811
|
+
form.append('single', _this.single);
|
|
3812
|
+
form.append('username', _this.username);
|
|
3813
|
+
if (_this.multi_list)
|
|
3814
|
+
form.append('tipo', _this.cmb_tipo.getDescri().split('-1').join(''));
|
|
3815
|
+
else
|
|
3816
|
+
form.append('tipo', _this.tipo);
|
|
3817
|
+
form.append('local_path', _this.app_s.LOCAL_PATH);
|
|
3818
|
+
if (_this.programma_da_eseguire != '')
|
|
3819
|
+
form.append('p1', _this.programma_da_eseguire);
|
|
3820
|
+
});
|
|
3821
|
+
if (this.dialogRef == null) {
|
|
3822
|
+
this.dialogRef = this.dialog.open(WinWait, { 'disableClose': true });
|
|
3823
|
+
this.dialogRef.componentInstance.label = this.label_attendere;
|
|
3824
|
+
this.dialogRef.afterClosed().subscribe((/**
|
|
3825
|
+
* @param {?} result
|
|
3826
|
+
* @return {?}
|
|
3827
|
+
*/
|
|
3828
|
+
function (result) {
|
|
3829
|
+
}));
|
|
3830
|
+
}
|
|
3831
|
+
this.uploader.uploadAll();
|
|
3832
|
+
};
|
|
3833
|
+
/**
|
|
3834
|
+
* @param {?} p_app
|
|
3835
|
+
* @param {?} p_k
|
|
3836
|
+
* @param {?} p_label
|
|
3837
|
+
* @param {?=} p_tipo
|
|
3838
|
+
* @param {?=} programma_da_eseguire
|
|
3839
|
+
* @param {?=} allow_delete
|
|
3840
|
+
* @return {?}
|
|
3841
|
+
*/
|
|
3842
|
+
FHUploadComponent.prototype.init = /**
|
|
3843
|
+
* @param {?} p_app
|
|
3844
|
+
* @param {?} p_k
|
|
3845
|
+
* @param {?} p_label
|
|
3846
|
+
* @param {?=} p_tipo
|
|
3847
|
+
* @param {?=} programma_da_eseguire
|
|
3848
|
+
* @param {?=} allow_delete
|
|
3849
|
+
* @return {?}
|
|
3850
|
+
*/
|
|
3851
|
+
function (p_app, p_k, p_label, p_tipo, programma_da_eseguire, allow_delete) {
|
|
3852
|
+
if (p_tipo === void 0) { p_tipo = ""; }
|
|
3853
|
+
if (programma_da_eseguire === void 0) { programma_da_eseguire = ""; }
|
|
3854
|
+
if (allow_delete === void 0) { allow_delete = false; }
|
|
3855
|
+
this.App = p_app;
|
|
3856
|
+
this.K = p_k;
|
|
3857
|
+
this.label = p_label;
|
|
3858
|
+
this.tipo = p_tipo;
|
|
3859
|
+
this.b_ini = true;
|
|
3860
|
+
this.b_edit_loaded = false;
|
|
3861
|
+
this.descrizione = '';
|
|
3862
|
+
this.programma_da_eseguire = programma_da_eseguire;
|
|
3863
|
+
this.allow_delete = allow_delete;
|
|
3864
|
+
this.ref_allegato();
|
|
3865
|
+
// console.log('init! ',this.tipo)
|
|
3866
|
+
if (this.tipo.indexOf('SELECT_') > -1) {
|
|
3867
|
+
this.multi_list = true;
|
|
3868
|
+
//console.log('fillCombo');
|
|
3869
|
+
}
|
|
3870
|
+
};
|
|
3871
|
+
/**
|
|
3872
|
+
* @return {?}
|
|
3873
|
+
*/
|
|
3874
|
+
FHUploadComponent.prototype.ref_allegato = /**
|
|
3875
|
+
* @return {?}
|
|
3876
|
+
*/
|
|
3877
|
+
function () {
|
|
3878
|
+
var _this = this;
|
|
3879
|
+
// console.log(' ref_allegato')
|
|
3880
|
+
this.id = null;
|
|
3881
|
+
this.descrizione = '';
|
|
3882
|
+
this.file_name = '';
|
|
3883
|
+
this.label_b = '';
|
|
3884
|
+
this.cmb_tipo.resetValue();
|
|
3885
|
+
if (!this.single)
|
|
3886
|
+
return;
|
|
3887
|
+
if (this.App == null)
|
|
3888
|
+
return;
|
|
3889
|
+
if (this.App == "")
|
|
3890
|
+
return;
|
|
3891
|
+
/** @type {?} */
|
|
3892
|
+
var p = new QParam();
|
|
3893
|
+
p.sql = "SELECT_ALLEGATO_INFO";
|
|
3894
|
+
p.types = ['string', 'string'];
|
|
3895
|
+
p.values = [this.App, this.K];
|
|
3896
|
+
this._dataService.doQuery(p).subscribe((/**
|
|
3897
|
+
* @param {?} data
|
|
4151
3898
|
* @return {?}
|
|
4152
3899
|
*/
|
|
4153
3900
|
function (data) {
|
|
4154
3901
|
if (data != null)
|
|
4155
3902
|
if (data.result_msg == "OK") {
|
|
4156
|
-
_this.arr_g = data.result_data;
|
|
4157
3903
|
/** @type {?} */
|
|
4158
|
-
var
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
_this.arr_g[i].descrizione_vis = '';
|
|
4166
|
-
/** @type {?} */
|
|
4167
|
-
var arrf = _this.arr_g[i].Filename.split('.');
|
|
4168
|
-
if (_this.sovrascrivi_path == '') {
|
|
4169
|
-
_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;
|
|
4170
|
-
_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;
|
|
4171
|
-
}
|
|
4172
|
-
else {
|
|
4173
|
-
_this.arr_g[i].url = _this.sovrascrivi_path + "/uploads/" + _this.arr_g[i].App + "/" + _this.arr_g[i].K + "/" + _this.arr_g[i].Filename;
|
|
4174
|
-
_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;
|
|
4175
|
-
}
|
|
4176
|
-
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)
|
|
4177
|
-
iconf = arrf[arrf.length - 1].toLocaleLowerCase();
|
|
4178
|
-
_this.arr_g[i].icon = iconf + '.svg';
|
|
4179
|
-
_this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this._appservice.user || _this.uti.hasRole(_this.ruolo_supervisore);
|
|
4180
|
-
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) {
|
|
4181
|
-
_this.arr_g[i].type = "IMG";
|
|
4182
|
-
_this.arr_g[i].image_original = [_this.arr_g[i].url];
|
|
4183
|
-
if (_this.arr_g[i].preview != null)
|
|
4184
|
-
if (_this.arr_g[i].preview == 1) {
|
|
4185
|
-
/** @type {?} */
|
|
4186
|
-
var pcs = _this.arr_g[i].url.split('.');
|
|
4187
|
-
/** @type {?} */
|
|
4188
|
-
var lastPc = pcs.pop();
|
|
4189
|
-
_this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
|
|
4190
|
-
}
|
|
4191
|
-
_this.image_type = true;
|
|
4192
|
-
_this.arr_g[i].image_thumbnail = [_this.arr_g[i].url];
|
|
4193
|
-
}
|
|
4194
|
-
else
|
|
4195
|
-
_this.arr_g[i].type = "O";
|
|
3904
|
+
var a = data.result_data;
|
|
3905
|
+
if (a.length > 0) {
|
|
3906
|
+
_this.id = a[0].id;
|
|
3907
|
+
_this.descrizione = a[0].descrizione;
|
|
3908
|
+
_this.file_name = a[0].Filename;
|
|
3909
|
+
_this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
|
|
3910
|
+
_this.b_edit_loaded = true;
|
|
4196
3911
|
}
|
|
4197
3912
|
}
|
|
4198
3913
|
}));
|
|
4199
3914
|
};
|
|
4200
|
-
|
|
3915
|
+
FHUploadComponent.decorators = [
|
|
4201
3916
|
{ type: Component, args: [{
|
|
4202
|
-
selector: '
|
|
4203
|
-
|
|
3917
|
+
selector: 'FHUpload',
|
|
3918
|
+
template: "\n\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div [hidden]=\"!(enabled && !loading)\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div [hidden]=\"!multi_list\" style=\"width:380px\" fxLayoutAlign=\"start center\">\n <FHComboBox [sql]=\"tipo\" #cmb_tipo [init_fill]=\"false\" label=\"Tipologia\"></FHComboBox> \n </div>\n <mat-form-field [hidden]=\"!show_descri\" style=\"width: 100%\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}} {{fixed_label}}</mat-label>\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n >\n </mat-form-field>\n \n <div style=\"width:140px\" fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <input type=\"file\" multiple ng2FileSelect [uploader]=\"uploader\" name=\"file-fh{{App}}\" id=\"file-fh{{App}}\" class=\"inputfile inputfile-fh\" />\n <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\"> Upload</span></label>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button> \n <button mat-flat-button *ngIf=\"id!=null && allow_delete\" (click)=\"del_doc()\" color=\"warn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\">\n <label>{{label}}:</label>{{descrizione}}\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px;background-color: #F5F5F5\">{{label_b}}</button>\n\n </div>\n\n ",
|
|
3919
|
+
styles: ["\n\n "]
|
|
4204
3920
|
}] }
|
|
4205
3921
|
];
|
|
4206
3922
|
/** @nocollapse */
|
|
4207
|
-
|
|
4208
|
-
{ type: AppService },
|
|
3923
|
+
FHUploadComponent.ctorParameters = function () { return [
|
|
4209
3924
|
{ type: QueryService },
|
|
4210
3925
|
{ type: ToastrService },
|
|
4211
3926
|
{ type: MatDialog },
|
|
4212
|
-
{ type:
|
|
4213
|
-
{ type: UtilityService }
|
|
3927
|
+
{ type: AppService }
|
|
4214
3928
|
]; };
|
|
4215
|
-
|
|
3929
|
+
FHUploadComponent.propDecorators = {
|
|
3930
|
+
show_descri: [{ type: Input }],
|
|
4216
3931
|
enabled: [{ type: Input }],
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
3932
|
+
single: [{ type: Input }],
|
|
3933
|
+
descri_obb: [{ type: Input }],
|
|
3934
|
+
programma_da_eseguire: [{ type: Input }],
|
|
3935
|
+
label_attendere: [{ type: Input }],
|
|
3936
|
+
fixed_label: [{ type: Input }],
|
|
3937
|
+
limit_string: [{ type: Input }],
|
|
3938
|
+
allegato_inserito: [{ type: Input }],
|
|
3939
|
+
inserire_descrizione: [{ type: Input }],
|
|
3940
|
+
lista_allegati: [{ type: Input }],
|
|
4222
3941
|
change: [{ type: Output }],
|
|
4223
|
-
|
|
3942
|
+
upload_ended: [{ type: Output }],
|
|
3943
|
+
cmb_tipo: [{ type: ViewChild, args: ['cmb_tipo',] }]
|
|
3944
|
+
};
|
|
3945
|
+
return FHUploadComponent;
|
|
3946
|
+
}());
|
|
3947
|
+
|
|
3948
|
+
/**
|
|
3949
|
+
* @fileoverview added by tsickle
|
|
3950
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3951
|
+
*/
|
|
3952
|
+
var AuthenticationService = /** @class */ (function () {
|
|
3953
|
+
function AuthenticationService(_dataService, toastr, http, router, route, _fileService, app_s, uti_s) {
|
|
3954
|
+
this._dataService = _dataService;
|
|
3955
|
+
this.toastr = toastr;
|
|
3956
|
+
this.http = http;
|
|
3957
|
+
this.router = router;
|
|
3958
|
+
this.route = route;
|
|
3959
|
+
this._fileService = _fileService;
|
|
3960
|
+
this.app_s = app_s;
|
|
3961
|
+
this.uti_s = uti_s;
|
|
3962
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
|
|
3963
|
+
this.goto_after = "";
|
|
3964
|
+
this.username = '';
|
|
3965
|
+
this.headers = new HttpHeaders({
|
|
3966
|
+
'Content-Type': 'application/json',
|
|
3967
|
+
});
|
|
3968
|
+
}
|
|
3969
|
+
/**
|
|
3970
|
+
* @return {?}
|
|
3971
|
+
*/
|
|
3972
|
+
AuthenticationService.prototype.logout = /**
|
|
3973
|
+
* @return {?}
|
|
3974
|
+
*/
|
|
3975
|
+
function () {
|
|
3976
|
+
this.app_s.user = null;
|
|
3977
|
+
this.app_s.user_name = null;
|
|
3978
|
+
this.app_s.user_surname = null;
|
|
3979
|
+
this.app_s.user_idp = null;
|
|
3980
|
+
this.app_s.user_email = null;
|
|
3981
|
+
this.app_s.user_roles = null;
|
|
3982
|
+
this.app_s.user_lang = null;
|
|
3983
|
+
this.app_s.user_isadmin = null;
|
|
3984
|
+
this.app_s.token = null;
|
|
3985
|
+
localStorage.removeItem(this.app_s.COMPANY_KEY + "token");
|
|
3986
|
+
if (this.app_s.LOGIN_EXT != 1)
|
|
3987
|
+
this.router.navigate(['login']);
|
|
3988
|
+
else {
|
|
3989
|
+
window.location.href = (this.app_s.LOGOUT_URL_EXT);
|
|
3990
|
+
}
|
|
3991
|
+
};
|
|
3992
|
+
/**
|
|
3993
|
+
* @param {?} username
|
|
3994
|
+
* @param {?} password
|
|
3995
|
+
* @param {?=} displayError
|
|
3996
|
+
* @return {?}
|
|
3997
|
+
*/
|
|
3998
|
+
AuthenticationService.prototype.login = /**
|
|
3999
|
+
* @param {?} username
|
|
4000
|
+
* @param {?} password
|
|
4001
|
+
* @param {?=} displayError
|
|
4002
|
+
* @return {?}
|
|
4003
|
+
*/
|
|
4004
|
+
function (username, password, displayError) {
|
|
4005
|
+
var _this = this;
|
|
4006
|
+
if (displayError === void 0) { displayError = true; }
|
|
4007
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
|
|
4008
|
+
/** @type {?} */
|
|
4009
|
+
var post_v = JSON.stringify({ username: username, password: password });
|
|
4010
|
+
if (this.app_s.LDAP_AUTH == 1)
|
|
4011
|
+
post_v = JSON.stringify({ username: username, password: password, ldap_auth: 1 });
|
|
4012
|
+
return this.http.post(this.url, post_v, {
|
|
4013
|
+
headers: this.headers
|
|
4014
|
+
}).pipe(map((/**
|
|
4015
|
+
* @param {?} res
|
|
4016
|
+
* @return {?}
|
|
4017
|
+
*/
|
|
4018
|
+
function (res) {
|
|
4019
|
+
// Handle errors, display if enabled
|
|
4020
|
+
/** @type {?} */
|
|
4021
|
+
var err;
|
|
4022
|
+
if (!res) {
|
|
4023
|
+
err = new Error('Empty server response');
|
|
4024
|
+
}
|
|
4025
|
+
else if (res.result_msg === 'KO') {
|
|
4026
|
+
err = new Error(res.msg);
|
|
4027
|
+
}
|
|
4028
|
+
else {
|
|
4029
|
+
if (res.result_data.length > 0) {
|
|
4030
|
+
localStorage.setItem(_this.app_s.COMPANY_KEY + "token", res.result_data[0].token);
|
|
4031
|
+
}
|
|
4032
|
+
}
|
|
4033
|
+
if (err) {
|
|
4034
|
+
console.error(err);
|
|
4035
|
+
if (displayError) {
|
|
4036
|
+
_this.toastr.error(err.message);
|
|
4037
|
+
}
|
|
4038
|
+
throw new Error(err);
|
|
4039
|
+
}
|
|
4040
|
+
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
4041
|
+
})), catchError((/**
|
|
4042
|
+
* @param {?} err
|
|
4043
|
+
* @return {?}
|
|
4044
|
+
*/
|
|
4045
|
+
function (err) {
|
|
4046
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
4047
|
+
// We'd also dig deeper into the error to get a better message
|
|
4048
|
+
/** @type {?} */
|
|
4049
|
+
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
4050
|
+
console.error(errMsg); // log to console instead
|
|
4051
|
+
throw err;
|
|
4052
|
+
})));
|
|
4053
|
+
};
|
|
4054
|
+
/**
|
|
4055
|
+
* @param {?} username
|
|
4056
|
+
* @param {?=} displayError
|
|
4057
|
+
* @return {?}
|
|
4058
|
+
*/
|
|
4059
|
+
AuthenticationService.prototype.get_user_info = /**
|
|
4060
|
+
* @param {?} username
|
|
4061
|
+
* @param {?=} displayError
|
|
4062
|
+
* @return {?}
|
|
4063
|
+
*/
|
|
4064
|
+
function (username, displayError) {
|
|
4065
|
+
var _this = this;
|
|
4066
|
+
if (displayError === void 0) { displayError = true; }
|
|
4067
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.LOGIN_ENDPOINT;
|
|
4068
|
+
/** @type {?} */
|
|
4069
|
+
var post_v = JSON.stringify({ username_info: username });
|
|
4070
|
+
return this.http.post(this.url, post_v, {
|
|
4071
|
+
headers: this.headers
|
|
4072
|
+
}).pipe(map((/**
|
|
4073
|
+
* @param {?} res
|
|
4074
|
+
* @return {?}
|
|
4075
|
+
*/
|
|
4076
|
+
function (res) {
|
|
4077
|
+
// Handle errors, display if enabled
|
|
4078
|
+
/** @type {?} */
|
|
4079
|
+
var err;
|
|
4080
|
+
if (!res) {
|
|
4081
|
+
err = new Error('Empty server response');
|
|
4082
|
+
}
|
|
4083
|
+
else if (res.result_msg === 'KO') {
|
|
4084
|
+
err = new Error(res.msg);
|
|
4085
|
+
}
|
|
4086
|
+
if (err) {
|
|
4087
|
+
console.error(err);
|
|
4088
|
+
if (displayError) {
|
|
4089
|
+
_this.toastr.error(err.message);
|
|
4090
|
+
}
|
|
4091
|
+
throw new Error(err);
|
|
4092
|
+
}
|
|
4093
|
+
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
4094
|
+
})), catchError((/**
|
|
4095
|
+
* @param {?} err
|
|
4096
|
+
* @return {?}
|
|
4097
|
+
*/
|
|
4098
|
+
function (err) {
|
|
4099
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
4100
|
+
// We'd also dig deeper into the error to get a better message
|
|
4101
|
+
/** @type {?} */
|
|
4102
|
+
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
4103
|
+
console.error(errMsg); // log to console instead
|
|
4104
|
+
throw err;
|
|
4105
|
+
})));
|
|
4106
|
+
};
|
|
4107
|
+
/**
|
|
4108
|
+
* @param {?} email
|
|
4109
|
+
* @param {?=} displayError
|
|
4110
|
+
* @return {?}
|
|
4111
|
+
*/
|
|
4112
|
+
AuthenticationService.prototype.passrecovery = /**
|
|
4113
|
+
* @param {?} email
|
|
4114
|
+
* @param {?=} displayError
|
|
4115
|
+
* @return {?}
|
|
4116
|
+
*/
|
|
4117
|
+
function (email, displayError) {
|
|
4118
|
+
var _this = this;
|
|
4119
|
+
if (displayError === void 0) { displayError = true; }
|
|
4120
|
+
/** @type {?} */
|
|
4121
|
+
var post_v = JSON.stringify({ email: email, websiteroot: this.app_s.COMPANY_SITE_ROOT, op: 'send_email' });
|
|
4122
|
+
return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
|
|
4123
|
+
headers: this.headers
|
|
4124
|
+
}).pipe(map((/**
|
|
4125
|
+
* @param {?} res
|
|
4126
|
+
* @return {?}
|
|
4127
|
+
*/
|
|
4128
|
+
function (res) {
|
|
4129
|
+
// Handle errors, display if enabled
|
|
4130
|
+
/** @type {?} */
|
|
4131
|
+
var err;
|
|
4132
|
+
if (!res) {
|
|
4133
|
+
err = new Error('Empty server response');
|
|
4134
|
+
}
|
|
4135
|
+
else if (res.result_msg === 'KO') {
|
|
4136
|
+
err = new Error(res.msg);
|
|
4137
|
+
}
|
|
4138
|
+
if (err) {
|
|
4139
|
+
console.error(err);
|
|
4140
|
+
if (displayError) {
|
|
4141
|
+
_this.toastr.error(err.message);
|
|
4142
|
+
}
|
|
4143
|
+
throw new Error(err);
|
|
4144
|
+
}
|
|
4145
|
+
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
4146
|
+
})), catchError((/**
|
|
4147
|
+
* @param {?} err
|
|
4148
|
+
* @return {?}
|
|
4149
|
+
*/
|
|
4150
|
+
function (err) {
|
|
4151
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
4152
|
+
// We'd also dig deeper into the error to get a better message
|
|
4153
|
+
/** @type {?} */
|
|
4154
|
+
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
4155
|
+
console.error(errMsg); // log to console instead
|
|
4156
|
+
throw err;
|
|
4157
|
+
})));
|
|
4158
|
+
};
|
|
4159
|
+
/**
|
|
4160
|
+
* @param {?} res_rep
|
|
4161
|
+
* @param {?=} displayError
|
|
4162
|
+
* @return {?}
|
|
4163
|
+
*/
|
|
4164
|
+
AuthenticationService.prototype.checktoken = /**
|
|
4165
|
+
* @param {?} res_rep
|
|
4166
|
+
* @param {?=} displayError
|
|
4167
|
+
* @return {?}
|
|
4168
|
+
*/
|
|
4169
|
+
function (res_rep, displayError) {
|
|
4170
|
+
var _this = this;
|
|
4171
|
+
if (displayError === void 0) { displayError = true; }
|
|
4172
|
+
/** @type {?} */
|
|
4173
|
+
var post_v = JSON.stringify({ res_rep: res_rep, op: 'check_token' });
|
|
4174
|
+
return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
|
|
4175
|
+
headers: this.headers
|
|
4176
|
+
}).pipe(map((/**
|
|
4177
|
+
* @param {?} res
|
|
4178
|
+
* @return {?}
|
|
4179
|
+
*/
|
|
4180
|
+
function (res) {
|
|
4181
|
+
// Handle errors, display if enabled
|
|
4182
|
+
/** @type {?} */
|
|
4183
|
+
var err;
|
|
4184
|
+
if (!res) {
|
|
4185
|
+
err = new Error('Empty server response');
|
|
4186
|
+
}
|
|
4187
|
+
else if (res.result_msg === 'KO') {
|
|
4188
|
+
err = new Error(res.msg);
|
|
4189
|
+
}
|
|
4190
|
+
if (err) {
|
|
4191
|
+
console.error(err);
|
|
4192
|
+
if (displayError) {
|
|
4193
|
+
_this.toastr.error(err.message);
|
|
4194
|
+
}
|
|
4195
|
+
throw new Error(err);
|
|
4196
|
+
}
|
|
4197
|
+
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
4198
|
+
})), catchError((/**
|
|
4199
|
+
* @param {?} err
|
|
4200
|
+
* @return {?}
|
|
4201
|
+
*/
|
|
4202
|
+
function (err) {
|
|
4203
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
4204
|
+
// We'd also dig deeper into the error to get a better message
|
|
4205
|
+
/** @type {?} */
|
|
4206
|
+
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
4207
|
+
console.error(errMsg); // log to console instead
|
|
4208
|
+
throw err;
|
|
4209
|
+
})));
|
|
4224
4210
|
};
|
|
4225
|
-
return FHUploadPanelComponent;
|
|
4226
|
-
}());
|
|
4227
|
-
|
|
4228
|
-
/**
|
|
4229
|
-
* @fileoverview added by tsickle
|
|
4230
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4231
|
-
*/
|
|
4232
|
-
var GridService = /** @class */ (function () {
|
|
4233
|
-
function GridService(http, app_s, toastr) {
|
|
4234
|
-
this.http = http;
|
|
4235
|
-
this.app_s = app_s;
|
|
4236
|
-
this.toastr = toastr;
|
|
4237
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT; // URL to web API
|
|
4238
|
-
}
|
|
4239
|
-
// URL to web API
|
|
4240
4211
|
/**
|
|
4241
|
-
* @param {?}
|
|
4212
|
+
* @param {?} token
|
|
4213
|
+
* @param {?} password
|
|
4242
4214
|
* @param {?=} displayError
|
|
4243
|
-
* @param {?=} url_sec
|
|
4244
4215
|
* @return {?}
|
|
4245
4216
|
*/
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
* @param {?} queryp
|
|
4217
|
+
AuthenticationService.prototype.change_password = /**
|
|
4218
|
+
* @param {?} token
|
|
4219
|
+
* @param {?} password
|
|
4250
4220
|
* @param {?=} displayError
|
|
4251
|
-
* @param {?=} url_sec
|
|
4252
4221
|
* @return {?}
|
|
4253
4222
|
*/
|
|
4254
|
-
function (
|
|
4223
|
+
function (token, password, displayError) {
|
|
4255
4224
|
var _this = this;
|
|
4256
4225
|
if (displayError === void 0) { displayError = true; }
|
|
4257
|
-
if (url_sec === void 0) { url_sec = null; }
|
|
4258
|
-
this.headers = new HttpHeaders({
|
|
4259
|
-
'Content-Type': 'application/json',
|
|
4260
|
-
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
4261
|
-
});
|
|
4262
|
-
if (url_sec == null)
|
|
4263
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT;
|
|
4264
|
-
else
|
|
4265
|
-
this.url = url_sec;
|
|
4266
4226
|
/** @type {?} */
|
|
4267
|
-
var post_v = JSON.stringify(
|
|
4268
|
-
return this.http.post(this.
|
|
4269
|
-
.
|
|
4227
|
+
var post_v = JSON.stringify({ token: token, password: password, op: 'change_password' });
|
|
4228
|
+
return this.http.post(this.app_s.API_ENDPOINT + this.app_s.PASSRECOVERY_ENDPOINT, post_v, {
|
|
4229
|
+
headers: this.headers
|
|
4230
|
+
}).pipe(map((/**
|
|
4270
4231
|
* @param {?} res
|
|
4271
4232
|
* @return {?}
|
|
4272
4233
|
*/
|
|
@@ -4301,494 +4262,689 @@ var GridService = /** @class */ (function () {
|
|
|
4301
4262
|
throw err;
|
|
4302
4263
|
})));
|
|
4303
4264
|
};
|
|
4304
|
-
|
|
4265
|
+
/**
|
|
4266
|
+
* @return {?}
|
|
4267
|
+
*/
|
|
4268
|
+
AuthenticationService.prototype.checkCredentials_toLogin = /**
|
|
4269
|
+
* @return {?}
|
|
4270
|
+
*/
|
|
4271
|
+
function () {
|
|
4272
|
+
if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
|
|
4273
|
+
this.goto_after = window.location.toString();
|
|
4274
|
+
if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
|
|
4275
|
+
if (this.router.url.indexOf('/rp/') == -1)
|
|
4276
|
+
this.router.navigate(['login']);
|
|
4277
|
+
return false;
|
|
4278
|
+
}
|
|
4279
|
+
return true;
|
|
4280
|
+
};
|
|
4281
|
+
/**
|
|
4282
|
+
* @return {?}
|
|
4283
|
+
*/
|
|
4284
|
+
AuthenticationService.prototype.checkCredentials = /**
|
|
4285
|
+
* @return {?}
|
|
4286
|
+
*/
|
|
4287
|
+
function () {
|
|
4288
|
+
if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
|
|
4289
|
+
this.goto_after = window.location.toString();
|
|
4290
|
+
if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
|
|
4291
|
+
return false;
|
|
4292
|
+
}
|
|
4293
|
+
return true;
|
|
4294
|
+
};
|
|
4295
|
+
AuthenticationService.decorators = [
|
|
4305
4296
|
{ type: Injectable, args: [{
|
|
4306
4297
|
providedIn: 'root',
|
|
4307
4298
|
},] }
|
|
4308
4299
|
];
|
|
4309
4300
|
/** @nocollapse */
|
|
4310
|
-
|
|
4301
|
+
AuthenticationService.ctorParameters = function () { return [
|
|
4302
|
+
{ type: QueryService },
|
|
4303
|
+
{ type: ToastrService },
|
|
4311
4304
|
{ type: HttpClient },
|
|
4305
|
+
{ type: Router },
|
|
4306
|
+
{ type: ActivatedRoute },
|
|
4307
|
+
{ type: FileService },
|
|
4312
4308
|
{ type: AppService },
|
|
4313
|
-
{ type:
|
|
4309
|
+
{ type: UtilityService }
|
|
4314
4310
|
]; };
|
|
4315
|
-
/** @nocollapse */
|
|
4316
|
-
return
|
|
4311
|
+
/** @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" });
|
|
4312
|
+
return AuthenticationService;
|
|
4317
4313
|
}());
|
|
4318
4314
|
|
|
4319
4315
|
/**
|
|
4320
4316
|
* @fileoverview added by tsickle
|
|
4321
4317
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4322
4318
|
*/
|
|
4323
|
-
var
|
|
4324
|
-
function
|
|
4319
|
+
var WinAskTextBigComponent = /** @class */ (function () {
|
|
4320
|
+
function WinAskTextBigComponent(dialogRef, toastr) {
|
|
4325
4321
|
this.dialogRef = dialogRef;
|
|
4326
4322
|
this.toastr = toastr;
|
|
4327
|
-
this.m_appService = m_appService;
|
|
4328
4323
|
this.title = "";
|
|
4324
|
+
this.label = "";
|
|
4325
|
+
this.valore = "";
|
|
4326
|
+
this.readonly = false;
|
|
4327
|
+
this.show_annulla = true;
|
|
4328
|
+
this.show_ok = true;
|
|
4329
|
+
this.min_chars = 3;
|
|
4329
4330
|
}
|
|
4330
4331
|
/**
|
|
4331
4332
|
* @return {?}
|
|
4332
4333
|
*/
|
|
4333
|
-
|
|
4334
|
+
WinAskTextBigComponent.prototype.ngOnInit = /**
|
|
4334
4335
|
* @return {?}
|
|
4335
4336
|
*/
|
|
4336
4337
|
function () {
|
|
4337
4338
|
};
|
|
4338
|
-
win_grid_help.decorators = [
|
|
4339
|
-
{ type: Component, args: [{
|
|
4340
|
-
template: "\n\n\n\n <mat-dialog-content style=\"min-width:800px;min-height:500px\">\n <mat-tab-group>\n <mat-tab label=\"FILTRI\">\n\n\n <img src=\"assets/helps/fhgrid/filtri.png\"/>\n </mat-tab>\n <mat-tab label=\"ORDINAMENTI\">\n <img src=\"assets/helps/fhgrid/ordinamenti.png\"/>\n </mat-tab>\n <mat-tab label=\"LAYOUT COLONNE\">\n <img src=\"assets/helps/fhgrid/layout_colonne.png\"/>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n\n\n <mat-dialog-actions>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"dialogRef.close('')\">CHIUDI</button>\n </mat-dialog-actions>\n ",
|
|
4341
|
-
styles: ["\n agm-map {\n height: 600px;\n width: 100%;\n }\n "]
|
|
4342
|
-
}] }
|
|
4343
|
-
];
|
|
4344
|
-
/** @nocollapse */
|
|
4345
|
-
win_grid_help.ctorParameters = function () { return [
|
|
4346
|
-
{ type: MatDialogRef },
|
|
4347
|
-
{ type: ToastrService },
|
|
4348
|
-
{ type: AppService }
|
|
4349
|
-
]; };
|
|
4350
|
-
return win_grid_help;
|
|
4351
|
-
}());
|
|
4352
|
-
|
|
4353
|
-
/**
|
|
4354
|
-
* @fileoverview added by tsickle
|
|
4355
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4356
|
-
*/
|
|
4357
|
-
var FHComboboxComponent = /** @class */ (function () {
|
|
4358
|
-
function FHComboboxComponent(_dataService, _dataService_odbc) {
|
|
4359
|
-
this._dataService = _dataService;
|
|
4360
|
-
this._dataService_odbc = _dataService_odbc;
|
|
4361
|
-
this.init_fill = true;
|
|
4362
|
-
this.sql = "";
|
|
4363
|
-
this.types = [];
|
|
4364
|
-
this.values = [];
|
|
4365
|
-
this.hidden = false;
|
|
4366
|
-
this.label = "";
|
|
4367
|
-
this.enabled = true;
|
|
4368
|
-
this.required = false;
|
|
4369
|
-
this.sel_label = "";
|
|
4370
|
-
this.fillend = new EventEmitter();
|
|
4371
|
-
this.selchange = new EventEmitter();
|
|
4372
|
-
this.initend = new EventEmitter();
|
|
4373
|
-
this.myData = [];
|
|
4374
|
-
this.valDef = "-1";
|
|
4375
|
-
this.selval = "-1";
|
|
4376
|
-
this.errorMsg = "";
|
|
4377
|
-
this.db_type = "1";
|
|
4378
|
-
this.dis_value = '';
|
|
4379
|
-
this.descri_val = "";
|
|
4380
|
-
}
|
|
4381
4339
|
/**
|
|
4382
|
-
* @private
|
|
4383
4340
|
* @return {?}
|
|
4384
4341
|
*/
|
|
4385
|
-
|
|
4386
|
-
* @private
|
|
4342
|
+
WinAskTextBigComponent.prototype.show = /**
|
|
4387
4343
|
* @return {?}
|
|
4388
4344
|
*/
|
|
4389
4345
|
function () {
|
|
4390
|
-
this.dis_value = '';
|
|
4391
|
-
try {
|
|
4392
|
-
if (this.descri_val != null)
|
|
4393
|
-
if (this.descri_val != "") {
|
|
4394
|
-
this.dis_value = this.descri_val;
|
|
4395
|
-
return;
|
|
4396
|
-
}
|
|
4397
|
-
if (this.valDef == null)
|
|
4398
|
-
this.dis_value = '';
|
|
4399
|
-
else
|
|
4400
|
-
this.dis_value = this.valDef.split('-1').join('');
|
|
4401
|
-
}
|
|
4402
|
-
catch (e) {
|
|
4403
|
-
console.log('errore split -> this.valDef ', this.valDef);
|
|
4404
|
-
}
|
|
4405
4346
|
};
|
|
4406
4347
|
/**
|
|
4407
4348
|
* @return {?}
|
|
4408
4349
|
*/
|
|
4409
|
-
|
|
4350
|
+
WinAskTextBigComponent.prototype.hide = /**
|
|
4410
4351
|
* @return {?}
|
|
4411
4352
|
*/
|
|
4412
4353
|
function () {
|
|
4413
|
-
this.
|
|
4414
|
-
this.valDef = '-1';
|
|
4415
|
-
this.update_dis();
|
|
4354
|
+
this.dialogRef.close(null);
|
|
4416
4355
|
};
|
|
4417
4356
|
/**
|
|
4418
4357
|
* @return {?}
|
|
4419
4358
|
*/
|
|
4420
|
-
|
|
4359
|
+
WinAskTextBigComponent.prototype.do_check = /**
|
|
4421
4360
|
* @return {?}
|
|
4422
4361
|
*/
|
|
4423
4362
|
function () {
|
|
4424
|
-
this.
|
|
4363
|
+
if (this.valore.length < this.min_chars) {
|
|
4364
|
+
this.toastr.error('Il valore deve contenere almeno ' + this.min_chars + ' caratteri');
|
|
4365
|
+
return;
|
|
4366
|
+
}
|
|
4367
|
+
this.dialogRef.close(this.valore);
|
|
4368
|
+
};
|
|
4369
|
+
/**
|
|
4370
|
+
* @return {?}
|
|
4371
|
+
*/
|
|
4372
|
+
WinAskTextBigComponent.prototype.chiudi = /**
|
|
4373
|
+
* @return {?}
|
|
4374
|
+
*/
|
|
4375
|
+
function () {
|
|
4376
|
+
this.dialogRef.close(null);
|
|
4377
|
+
};
|
|
4378
|
+
WinAskTextBigComponent.decorators = [
|
|
4379
|
+
{ type: Component, args: [{
|
|
4380
|
+
selector: 'app-win_ask_text',
|
|
4381
|
+
template: "\n\n <h2 mat-dialog-title>{{title}}</h2>\n <mat-dialog-content style=\"width:630px;font-size: 12px;\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <textarea matInput [readonly]=\"readonly\" [(ngModel)]=\"valore\" style=\"min-width:600px\" rows=\"15\"\n required></textarea>\n </mat-form-field>\n </mat-dialog-content>\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100%\">\n\n <button *ngIf=\"show_ok\" mat-flat-button color=\"primary\" (click)=\"do_check()\">OK</button> \n <button *ngIf=\"show_annulla\" mat-flat-button color=\"warn\" (click)=\"chiudi()\">ANNULLA</button>\n </div>\n\n\n "
|
|
4382
|
+
}] }
|
|
4383
|
+
];
|
|
4384
|
+
/** @nocollapse */
|
|
4385
|
+
WinAskTextBigComponent.ctorParameters = function () { return [
|
|
4386
|
+
{ type: MatDialogRef },
|
|
4387
|
+
{ type: ToastrService }
|
|
4388
|
+
]; };
|
|
4389
|
+
WinAskTextBigComponent.propDecorators = {
|
|
4390
|
+
title: [{ type: Input }],
|
|
4391
|
+
label: [{ type: Input }],
|
|
4392
|
+
valore: [{ type: Input }],
|
|
4393
|
+
readonly: [{ type: Input }],
|
|
4394
|
+
show_annulla: [{ type: Input }],
|
|
4395
|
+
show_ok: [{ type: Input }]
|
|
4425
4396
|
};
|
|
4397
|
+
return WinAskTextBigComponent;
|
|
4398
|
+
}());
|
|
4399
|
+
|
|
4400
|
+
/**
|
|
4401
|
+
* @fileoverview added by tsickle
|
|
4402
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4403
|
+
*/
|
|
4404
|
+
var FHWinComboSelect = /** @class */ (function () {
|
|
4405
|
+
function FHWinComboSelect(dialogRef, toastr) {
|
|
4406
|
+
this.dialogRef = dialogRef;
|
|
4407
|
+
this.toastr = toastr;
|
|
4408
|
+
this.label = "";
|
|
4409
|
+
this.width = "100%";
|
|
4410
|
+
this.nota = false;
|
|
4411
|
+
this.nota_val = "";
|
|
4412
|
+
}
|
|
4426
4413
|
/**
|
|
4414
|
+
* @param {?} lab
|
|
4415
|
+
* @param {?} myD
|
|
4416
|
+
* @param {?=} nota
|
|
4427
4417
|
* @return {?}
|
|
4428
4418
|
*/
|
|
4429
|
-
|
|
4419
|
+
FHWinComboSelect.prototype.set_selection = /**
|
|
4420
|
+
* @param {?} lab
|
|
4421
|
+
* @param {?} myD
|
|
4422
|
+
* @param {?=} nota
|
|
4430
4423
|
* @return {?}
|
|
4431
4424
|
*/
|
|
4432
|
-
function () {
|
|
4433
|
-
|
|
4434
|
-
this.
|
|
4435
|
-
this.
|
|
4436
|
-
|
|
4425
|
+
function (lab, myD, nota) {
|
|
4426
|
+
if (nota === void 0) { nota = false; }
|
|
4427
|
+
this.nota = nota;
|
|
4428
|
+
this.label = lab;
|
|
4429
|
+
for (var i = 0; i < myD.length; i++)
|
|
4430
|
+
this.cmb_sel.add_option(myD[i]);
|
|
4437
4431
|
};
|
|
4438
4432
|
/**
|
|
4439
4433
|
* @return {?}
|
|
4440
4434
|
*/
|
|
4441
|
-
|
|
4435
|
+
FHWinComboSelect.prototype.ok = /**
|
|
4442
4436
|
* @return {?}
|
|
4443
4437
|
*/
|
|
4444
4438
|
function () {
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
// if(!this.init_fill){this.init_fill=true;return;}
|
|
4448
|
-
// console.log("fillcombo "+this.sql);
|
|
4449
|
-
if (this.sql.indexOf('|') != -1 && this.sql.indexOf('$') != -1) {
|
|
4450
|
-
this.set_options(this.sql);
|
|
4439
|
+
if (this.cmb_sel.getValue() == "-1") {
|
|
4440
|
+
this.toastr.error('Selezionare un valore');
|
|
4451
4441
|
return;
|
|
4452
4442
|
}
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
p.sql = this.sql;
|
|
4456
|
-
p.types = this.types;
|
|
4457
|
-
p.values = this.values;
|
|
4458
|
-
// console.log(p);
|
|
4459
|
-
if (this.db_type == "1")
|
|
4460
|
-
this
|
|
4461
|
-
._dataService
|
|
4462
|
-
.doQuery(p)
|
|
4463
|
-
.subscribe((/**
|
|
4464
|
-
* @param {?} data
|
|
4465
|
-
* @return {?}
|
|
4466
|
-
*/
|
|
4467
|
-
function (data) {
|
|
4468
|
-
if (data != null)
|
|
4469
|
-
if (data.result_msg == "OK") {
|
|
4470
|
-
_this.resetD(data.result_data);
|
|
4471
|
-
}
|
|
4472
|
-
}), (/**
|
|
4473
|
-
* @param {?} err
|
|
4474
|
-
* @return {?}
|
|
4475
|
-
*/
|
|
4476
|
-
function (err) {
|
|
4477
|
-
_this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + _this.sql + "]";
|
|
4478
|
-
}));
|
|
4479
|
-
if (this.db_type == "2")
|
|
4480
|
-
this
|
|
4481
|
-
._dataService_odbc
|
|
4482
|
-
.doQuery(p)
|
|
4483
|
-
.subscribe((/**
|
|
4484
|
-
* @param {?} data
|
|
4485
|
-
* @return {?}
|
|
4486
|
-
*/
|
|
4487
|
-
function (data) {
|
|
4488
|
-
if (data != null)
|
|
4489
|
-
if (data.result_msg == "OK") {
|
|
4490
|
-
for (var i = 0; i < data.result_data.length; i++) {
|
|
4491
|
-
if (data.result_data[i].VALORE != null)
|
|
4492
|
-
data.result_data[i].valore = data.result_data[i].VALORE;
|
|
4493
|
-
if (data.result_data[i].DESCRIZIONE_VALORE != null)
|
|
4494
|
-
data.result_data[i].descrizione_valore = data.result_data[i].DESCRIZIONE_VALORE;
|
|
4495
|
-
}
|
|
4496
|
-
_this.resetD(data.result_data);
|
|
4497
|
-
}
|
|
4498
|
-
}), (/**
|
|
4499
|
-
* @param {?} err
|
|
4500
|
-
* @return {?}
|
|
4501
|
-
*/
|
|
4502
|
-
function (err) {
|
|
4503
|
-
_this.errorMsg = "ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI [" + _this.sql + "]";
|
|
4504
|
-
}));
|
|
4443
|
+
this.cmb_sel.getObj().nota = this.nota_val;
|
|
4444
|
+
this.dialogRef.close(this.cmb_sel.getObj());
|
|
4505
4445
|
};
|
|
4506
4446
|
/**
|
|
4507
|
-
* @param {?} o
|
|
4508
4447
|
* @return {?}
|
|
4509
4448
|
*/
|
|
4510
|
-
|
|
4511
|
-
* @param {?} o
|
|
4449
|
+
FHWinComboSelect.prototype.ngOnInit = /**
|
|
4512
4450
|
* @return {?}
|
|
4513
4451
|
*/
|
|
4514
|
-
function (
|
|
4515
|
-
this.myData.push(o);
|
|
4452
|
+
function () {
|
|
4516
4453
|
};
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
if (this.getValue() == "-1" && this.valDef != "-1")
|
|
4531
|
-
this.setByDescri(this.valDef);
|
|
4532
|
-
this.fillend.emit();
|
|
4454
|
+
FHWinComboSelect.decorators = [
|
|
4455
|
+
{ type: Component, args: [{
|
|
4456
|
+
selector: 'fhwincomboselect',
|
|
4457
|
+
template: " \n\n <div fxLayout=\"column\">\n <mat-dialog-content style=\"font-size: 12px;\" >\n \n <div fxLayout=\"column\">\n <h3>\n {{label | uppercase}}\n </h3>\n <FHComboBox #cmb_sel [init_fill]=\"false\"></FHComboBox>\n <mat-form-field *ngIf=\"nota\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Nota</mat-label>\n <textarea matInput [(ngModel)]=\"nota_val\" rows=\"12\"></textarea>\n </mat-form-field> \n </div>\n </mat-dialog-content>\n\n\n <mat-dialog-actions fxFlex=\"100\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <button mat-flat-button color=\"primary\" (click)=\"ok()\">OK</button> \n <button mat-flat-button color=\"warn\" (click)=\"dialogRef.close(null)\">ANNULLA</button>\n </mat-dialog-actions>\n </div>\n "
|
|
4458
|
+
}] }
|
|
4459
|
+
];
|
|
4460
|
+
/** @nocollapse */
|
|
4461
|
+
FHWinComboSelect.ctorParameters = function () { return [
|
|
4462
|
+
{ type: MatDialogRef },
|
|
4463
|
+
{ type: ToastrService }
|
|
4464
|
+
]; };
|
|
4465
|
+
FHWinComboSelect.propDecorators = {
|
|
4466
|
+
cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
|
|
4533
4467
|
};
|
|
4468
|
+
return FHWinComboSelect;
|
|
4469
|
+
}());
|
|
4470
|
+
|
|
4471
|
+
/**
|
|
4472
|
+
* @fileoverview added by tsickle
|
|
4473
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4474
|
+
*/
|
|
4475
|
+
var FHUploadPanelComponent = /** @class */ (function () {
|
|
4476
|
+
function FHUploadPanelComponent(_appservice, _dataService, toastr, dialog, auth_s, uti) {
|
|
4477
|
+
this._appservice = _appservice;
|
|
4478
|
+
this._dataService = _dataService;
|
|
4479
|
+
this.toastr = toastr;
|
|
4480
|
+
this.dialog = dialog;
|
|
4481
|
+
this.auth_s = auth_s;
|
|
4482
|
+
this.uti = uti;
|
|
4483
|
+
this.enabled = true;
|
|
4484
|
+
this.label = '';
|
|
4485
|
+
this.sovrascrivi_path = '';
|
|
4486
|
+
this.ruolo_supervisore = '[ZZZ_DIS_CC]';
|
|
4487
|
+
this.access_control = false;
|
|
4488
|
+
this.show_images = true;
|
|
4489
|
+
this.change = new EventEmitter();
|
|
4490
|
+
this.App = '';
|
|
4491
|
+
this.K = '';
|
|
4492
|
+
this.image_type = false;
|
|
4493
|
+
this.b_edit_loaded = false;
|
|
4494
|
+
this.b_False = false;
|
|
4495
|
+
this.b_mobile = false;
|
|
4496
|
+
this.b_ini = false;
|
|
4497
|
+
this.m_p_tipo = "";
|
|
4498
|
+
this.multi_list = false;
|
|
4499
|
+
this.m_programma_da_eseguire = "";
|
|
4500
|
+
}
|
|
4534
4501
|
/**
|
|
4535
|
-
* @param {?}
|
|
4502
|
+
* @param {?} ax
|
|
4536
4503
|
* @return {?}
|
|
4537
4504
|
*/
|
|
4538
|
-
|
|
4539
|
-
* @param {?}
|
|
4505
|
+
FHUploadPanelComponent.prototype.download_all = /**
|
|
4506
|
+
* @param {?} ax
|
|
4540
4507
|
* @return {?}
|
|
4541
4508
|
*/
|
|
4542
|
-
function (
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
this.
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
return;
|
|
4552
|
-
for (var j = 0; j < this.myData.length; j++)
|
|
4553
|
-
if (this.myData[j].descrizione_valore == desc_val) {
|
|
4554
|
-
this.selval = "" + this.myData[j].valore;
|
|
4555
|
-
if (this.myData[j].descrizione_valore != null)
|
|
4556
|
-
this.descri_val = this.myData[j].descrizione_valore;
|
|
4557
|
-
this.update_dis();
|
|
4558
|
-
return;
|
|
4559
|
-
}
|
|
4560
|
-
this.update_dis();
|
|
4509
|
+
function (ax) {
|
|
4510
|
+
if (ax.APP != null)
|
|
4511
|
+
ax.App = ax.APP;
|
|
4512
|
+
if (this.sovrascrivi_path == '') {
|
|
4513
|
+
window.open(this._appservice.COMPANY_SITE_ROOT + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
|
|
4514
|
+
}
|
|
4515
|
+
else {
|
|
4516
|
+
window.open(this.sovrascrivi_path + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
|
|
4517
|
+
}
|
|
4561
4518
|
};
|
|
4562
4519
|
/**
|
|
4563
|
-
* @param {?}
|
|
4520
|
+
* @param {?} ax
|
|
4564
4521
|
* @return {?}
|
|
4565
4522
|
*/
|
|
4566
|
-
|
|
4567
|
-
* @param {?}
|
|
4523
|
+
FHUploadPanelComponent.prototype.edit_tipo = /**
|
|
4524
|
+
* @param {?} ax
|
|
4568
4525
|
* @return {?}
|
|
4569
4526
|
*/
|
|
4570
|
-
function (
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4527
|
+
function (ax) {
|
|
4528
|
+
var _this = this;
|
|
4529
|
+
/** @type {?} */
|
|
4530
|
+
var p = new QParam();
|
|
4531
|
+
p.sql = this.m_p_tipo;
|
|
4532
|
+
p.types = [];
|
|
4533
|
+
p.values = [];
|
|
4534
|
+
this
|
|
4535
|
+
._dataService
|
|
4536
|
+
.doQuery(p)
|
|
4537
|
+
.subscribe((/**
|
|
4538
|
+
* @param {?} data
|
|
4539
|
+
* @return {?}
|
|
4540
|
+
*/
|
|
4541
|
+
function (data) {
|
|
4542
|
+
if (data != null)
|
|
4543
|
+
if (data.result_msg == "OK") {
|
|
4544
|
+
/** @type {?} */
|
|
4545
|
+
var dialogRef = _this
|
|
4546
|
+
.dialog
|
|
4547
|
+
.open(FHWinComboSelect);
|
|
4548
|
+
dialogRef.componentInstance.set_selection("Tipologia Allegato", data.result_data);
|
|
4549
|
+
dialogRef
|
|
4550
|
+
.afterClosed()
|
|
4551
|
+
.subscribe((/**
|
|
4552
|
+
* @param {?} result
|
|
4553
|
+
* @return {?}
|
|
4554
|
+
*/
|
|
4555
|
+
function (result) {
|
|
4556
|
+
if (result != null) {
|
|
4557
|
+
/** @type {?} */
|
|
4558
|
+
var p_1 = new QParam();
|
|
4559
|
+
p_1.sql = "UPDATE_ALLEGATI_TIPO";
|
|
4560
|
+
p_1.types = ['int', 'string'];
|
|
4561
|
+
p_1.values = [ax.id, result.descrizione_valore];
|
|
4562
|
+
_this
|
|
4563
|
+
._dataService
|
|
4564
|
+
.doQuery(p_1)
|
|
4565
|
+
.subscribe((/**
|
|
4566
|
+
* @param {?} data
|
|
4567
|
+
* @return {?}
|
|
4568
|
+
*/
|
|
4569
|
+
function (data) {
|
|
4570
|
+
if (data != null)
|
|
4571
|
+
if (data.result_msg == "OK") {
|
|
4572
|
+
_this.ref_allegato();
|
|
4573
|
+
}
|
|
4574
|
+
}));
|
|
4575
|
+
}
|
|
4576
|
+
}));
|
|
4577
|
+
}
|
|
4578
|
+
}));
|
|
4580
4579
|
};
|
|
4581
4580
|
/**
|
|
4581
|
+
* @param {?} ax
|
|
4582
4582
|
* @return {?}
|
|
4583
4583
|
*/
|
|
4584
|
-
|
|
4584
|
+
FHUploadPanelComponent.prototype.edit_descri = /**
|
|
4585
|
+
* @param {?} ax
|
|
4585
4586
|
* @return {?}
|
|
4586
4587
|
*/
|
|
4587
|
-
function () {
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4588
|
+
function (ax) {
|
|
4589
|
+
var _this = this;
|
|
4590
|
+
/** @type {?} */
|
|
4591
|
+
var dialogRef = this
|
|
4592
|
+
.dialog
|
|
4593
|
+
.open(WinAskTextBigComponent);
|
|
4594
|
+
dialogRef.componentInstance.label = "Descrizione Allegato";
|
|
4595
|
+
dialogRef.componentInstance.valore = ax.descrizione;
|
|
4596
|
+
dialogRef.componentInstance.min_chars = 0;
|
|
4597
|
+
dialogRef
|
|
4598
|
+
.afterClosed()
|
|
4599
|
+
.subscribe((/**
|
|
4600
|
+
* @param {?} result
|
|
4601
|
+
* @return {?}
|
|
4602
|
+
*/
|
|
4603
|
+
function (result) {
|
|
4604
|
+
if (result != null) {
|
|
4605
|
+
/** @type {?} */
|
|
4606
|
+
var p = new QParam();
|
|
4607
|
+
p.sql = "UPDATE_ALLEGATI_DESCRIZIONE";
|
|
4608
|
+
p.types = ['int', 'string'];
|
|
4609
|
+
p.values = [ax.id, result];
|
|
4610
|
+
_this
|
|
4611
|
+
._dataService
|
|
4612
|
+
.doQuery(p)
|
|
4613
|
+
.subscribe((/**
|
|
4614
|
+
* @param {?} data
|
|
4615
|
+
* @return {?}
|
|
4616
|
+
*/
|
|
4617
|
+
function (data) {
|
|
4618
|
+
if (data != null)
|
|
4619
|
+
if (data.result_msg == "OK") {
|
|
4620
|
+
_this.ref_allegato();
|
|
4621
|
+
}
|
|
4622
|
+
}));
|
|
4623
|
+
}
|
|
4624
|
+
}));
|
|
4597
4625
|
};
|
|
4598
4626
|
/**
|
|
4599
|
-
* @param {?}
|
|
4627
|
+
* @param {?} ax
|
|
4600
4628
|
* @return {?}
|
|
4601
4629
|
*/
|
|
4602
|
-
|
|
4603
|
-
* @param {?}
|
|
4630
|
+
FHUploadPanelComponent.prototype.delete = /**
|
|
4631
|
+
* @param {?} ax
|
|
4604
4632
|
* @return {?}
|
|
4605
4633
|
*/
|
|
4606
|
-
function (
|
|
4607
|
-
|
|
4608
|
-
this.
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4634
|
+
function (ax) {
|
|
4635
|
+
var _this = this;
|
|
4636
|
+
localStorage.setItem(this._appservice.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
|
|
4637
|
+
localStorage.setItem(this._appservice.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
|
|
4638
|
+
/** @type {?} */
|
|
4639
|
+
var dialogRef = this
|
|
4640
|
+
.dialog
|
|
4641
|
+
.open(FHConfirmComponent);
|
|
4642
|
+
dialogRef
|
|
4643
|
+
.afterClosed()
|
|
4644
|
+
.subscribe((/**
|
|
4645
|
+
* @param {?} result
|
|
4646
|
+
* @return {?}
|
|
4647
|
+
*/
|
|
4648
|
+
function (result) {
|
|
4649
|
+
if (result) {
|
|
4650
|
+
/** @type {?} */
|
|
4651
|
+
var p = new QParam();
|
|
4652
|
+
p.sql = "DELETE_ALLEGATO";
|
|
4653
|
+
p.types = ['int', 'string'];
|
|
4654
|
+
p.values = [ax.id, _this.auth_s.username];
|
|
4655
|
+
_this
|
|
4656
|
+
._dataService
|
|
4657
|
+
.doQuery(p)
|
|
4658
|
+
.subscribe((/**
|
|
4659
|
+
* @param {?} data
|
|
4660
|
+
* @return {?}
|
|
4661
|
+
*/
|
|
4662
|
+
function (data) {
|
|
4663
|
+
if (data != null)
|
|
4664
|
+
if (data.result_msg == "OK") {
|
|
4665
|
+
// this.arr_g = data.result_data;
|
|
4666
|
+
_this.ref_allegato();
|
|
4667
|
+
_this
|
|
4668
|
+
.toastr
|
|
4669
|
+
.info("INFO", "ALLEGATO ELIMINATO", {
|
|
4670
|
+
timeOut: 1000,
|
|
4671
|
+
progressBar: true
|
|
4672
|
+
});
|
|
4673
|
+
}
|
|
4674
|
+
}), (/**
|
|
4675
|
+
* @param {?} err
|
|
4676
|
+
* @return {?}
|
|
4677
|
+
*/
|
|
4678
|
+
function (err) {
|
|
4679
|
+
}));
|
|
4629
4680
|
}
|
|
4630
|
-
}
|
|
4631
|
-
this.update_dis();
|
|
4681
|
+
}));
|
|
4632
4682
|
};
|
|
4633
4683
|
/**
|
|
4634
4684
|
* @return {?}
|
|
4635
4685
|
*/
|
|
4636
|
-
|
|
4686
|
+
FHUploadPanelComponent.prototype.ngOnInit = /**
|
|
4637
4687
|
* @return {?}
|
|
4638
4688
|
*/
|
|
4639
4689
|
function () {
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4690
|
+
this.upc.single = false;
|
|
4691
|
+
this.b_mobile = this._appservice.getState().pageFullscreen;
|
|
4692
|
+
console.log('this.m_p_tipo ', this.m_p_tipo);
|
|
4693
|
+
this
|
|
4694
|
+
.upc
|
|
4695
|
+
.init(this.App, this.K, 'Descrizione Allegato', this.m_p_tipo, this.m_programma_da_eseguire);
|
|
4696
|
+
if (this.m_p_tipo.indexOf('SELECT_') > -1) {
|
|
4697
|
+
this.multi_list = true;
|
|
4645
4698
|
}
|
|
4646
|
-
|
|
4647
|
-
return "-1";
|
|
4648
|
-
if (this.selval == "-1")
|
|
4649
|
-
return "-1";
|
|
4650
|
-
else
|
|
4651
|
-
for (var j = 0; j < this.myData.length; j++)
|
|
4652
|
-
if (this.myData[j].valore == this.selval) {
|
|
4653
|
-
return this.myData[j].descrizione_valore;
|
|
4654
|
-
}
|
|
4699
|
+
this.ref_allegato();
|
|
4655
4700
|
};
|
|
4656
4701
|
/**
|
|
4702
|
+
* @param {?} p_app
|
|
4703
|
+
* @param {?} p_k
|
|
4704
|
+
* @param {?=} p_tipo
|
|
4705
|
+
* @param {?=} programma_da_eseguire
|
|
4657
4706
|
* @return {?}
|
|
4658
4707
|
*/
|
|
4659
|
-
|
|
4708
|
+
FHUploadPanelComponent.prototype.init = /**
|
|
4709
|
+
* @param {?} p_app
|
|
4710
|
+
* @param {?} p_k
|
|
4711
|
+
* @param {?=} p_tipo
|
|
4712
|
+
* @param {?=} programma_da_eseguire
|
|
4660
4713
|
* @return {?}
|
|
4661
4714
|
*/
|
|
4662
|
-
function () {
|
|
4663
|
-
|
|
4664
|
-
if (
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
if (this.selval == "")
|
|
4673
|
-
return "-1";
|
|
4674
|
-
else
|
|
4675
|
-
return this.selval;
|
|
4715
|
+
function (p_app, p_k, p_tipo, programma_da_eseguire) {
|
|
4716
|
+
if (p_tipo === void 0) { p_tipo = ""; }
|
|
4717
|
+
if (programma_da_eseguire === void 0) { programma_da_eseguire = ""; }
|
|
4718
|
+
this.App = p_app;
|
|
4719
|
+
this.K = p_k;
|
|
4720
|
+
this.b_ini = true;
|
|
4721
|
+
this.b_edit_loaded = false;
|
|
4722
|
+
this.m_p_tipo = p_tipo;
|
|
4723
|
+
this.m_programma_da_eseguire = programma_da_eseguire;
|
|
4724
|
+
this.ngOnInit();
|
|
4676
4725
|
};
|
|
4677
4726
|
/**
|
|
4678
|
-
* @param {?} campo
|
|
4679
4727
|
* @return {?}
|
|
4680
4728
|
*/
|
|
4681
|
-
|
|
4682
|
-
* @param {?} campo
|
|
4729
|
+
FHUploadPanelComponent.prototype.ref_allegato = /**
|
|
4683
4730
|
* @return {?}
|
|
4684
4731
|
*/
|
|
4685
|
-
function (
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4732
|
+
function () {
|
|
4733
|
+
var _this = this;
|
|
4734
|
+
if (this.App == null)
|
|
4735
|
+
return;
|
|
4736
|
+
if (this.App == "")
|
|
4737
|
+
return;
|
|
4738
|
+
/** @type {?} */
|
|
4739
|
+
var p = new QParam();
|
|
4740
|
+
p.sql = "SELECT_ALLEGATO_INFO";
|
|
4741
|
+
p.types = ['string', 'string'];
|
|
4742
|
+
p.values = [this.App, this.K];
|
|
4743
|
+
this
|
|
4744
|
+
._dataService
|
|
4745
|
+
.doQuery(p)
|
|
4746
|
+
.subscribe((/**
|
|
4747
|
+
* @param {?} data
|
|
4748
|
+
* @return {?}
|
|
4749
|
+
*/
|
|
4750
|
+
function (data) {
|
|
4751
|
+
if (data != null)
|
|
4752
|
+
if (data.result_msg == "OK") {
|
|
4753
|
+
_this.arr_g = data.result_data;
|
|
4754
|
+
/** @type {?} */
|
|
4755
|
+
var iconf = "webinfo";
|
|
4756
|
+
for (var i = 0; i < _this.arr_g.length; i++) {
|
|
4757
|
+
if (_this.arr_g[i].APP != null)
|
|
4758
|
+
_this.arr_g[i].App = _this.arr_g[i].APP;
|
|
4759
|
+
if (_this.arr_g[i].descrizione != null)
|
|
4760
|
+
_this.arr_g[i].descrizione_vis = _this.arr_g[i].descrizione.split('\n').join('<br>');
|
|
4761
|
+
else
|
|
4762
|
+
_this.arr_g[i].descrizione_vis = '';
|
|
4763
|
+
/** @type {?} */
|
|
4764
|
+
var arrf = _this.arr_g[i].Filename.split('.');
|
|
4765
|
+
if (_this.sovrascrivi_path == '') {
|
|
4766
|
+
_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;
|
|
4767
|
+
_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;
|
|
4768
|
+
}
|
|
4769
|
+
else {
|
|
4770
|
+
_this.arr_g[i].url = _this.sovrascrivi_path + "/uploads/" + _this.arr_g[i].App + "/" + _this.arr_g[i].K + "/" + _this.arr_g[i].Filename;
|
|
4771
|
+
_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;
|
|
4772
|
+
}
|
|
4773
|
+
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)
|
|
4774
|
+
iconf = arrf[arrf.length - 1].toLocaleLowerCase();
|
|
4775
|
+
_this.arr_g[i].icon = iconf + '.svg';
|
|
4776
|
+
_this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this._appservice.user || _this.uti.hasRole(_this.ruolo_supervisore);
|
|
4777
|
+
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) {
|
|
4778
|
+
_this.arr_g[i].type = "IMG";
|
|
4779
|
+
_this.arr_g[i].image_original = [_this.arr_g[i].url];
|
|
4780
|
+
if (_this.arr_g[i].preview != null)
|
|
4781
|
+
if (_this.arr_g[i].preview == 1) {
|
|
4782
|
+
/** @type {?} */
|
|
4783
|
+
var pcs = _this.arr_g[i].url.split('.');
|
|
4784
|
+
/** @type {?} */
|
|
4785
|
+
var lastPc = pcs.pop();
|
|
4786
|
+
_this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
|
|
4787
|
+
}
|
|
4788
|
+
_this.image_type = true;
|
|
4789
|
+
_this.arr_g[i].image_thumbnail = [_this.arr_g[i].url];
|
|
4790
|
+
}
|
|
4791
|
+
else
|
|
4792
|
+
_this.arr_g[i].type = "O";
|
|
4793
|
+
}
|
|
4794
|
+
}
|
|
4795
|
+
}));
|
|
4796
|
+
};
|
|
4797
|
+
FHUploadPanelComponent.decorators = [
|
|
4798
|
+
{ type: Component, args: [{
|
|
4799
|
+
selector: 'FHUploadPanel', template: "\n <div fxLayout=\"column\">\n <h3>{{label}}</h3>\n <div fxLayout=\"column\">\n <div [hidden]=\"!enabled\">\n <FHUpload [single]=\"b_False\" [lista_allegati]=\"arr_g\" (change)=\"ref_allegato()\" #upc></FHUpload>\n </div>\n <table width=\"98%\" class=\"fh_table\" *ngIf=\"!image_type && !b_mobile\">\n <thead>\n <tr class=\"header\">\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:40%\">Descrizione</th>\n <th *ngIf=\"multi_list\" style=\"width:20%\">Tipo</th>\n\n <th style=\"width:40px\" class=\"actions\"></th>\n <th style=\"width:30%\" >Utente</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let app of arr_g;let odd=odd; let even=even;\" style=\"font-size: 12px;\" [ngClass]=\"{ odd: odd, even: even }\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td>{{app.Filename}}</td>\n <td style=\"text-align:center\">{{app.Filesize}}</td>\n <td>\n <div fxLayout=\"row\">\n <a mat-icon-button matTooltip=\"Modifica Descrizione\" *ngIf=\"app.can_delete\" (click)=\"edit_descri(app)\">\n <mat-icon>edit</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Modifica Descrizione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>edit</mat-icon>\n </a>\n\n <div [innerHTML]=\"app.descrizione_vis\" style=\"width:100%\">\n </div>\n </div></td>\n\n\n <td>\n <div fxLayout=\"row\">\n <a mat-icon-button matTooltip=\"Modifica Tipo\" *ngIf=\"app.can_delete\" (click)=\"edit_tipo(app)\">\n <mat-icon>edit</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Modifica Tipologia consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>edit</mat-icon>\n </a>\n\n <div [innerHTML]=\"app.tipo\" style=\"width:100%\">\n </div>\n </div></td>\n\n <td style=\"min-width:400px;min-height: 400px\" *ngIf=\"app.type=='IMG'\">\n <fh-image-viewer [u]=\"app\"></fh-image-viewer>\n\n </td>\n <td *ngIf=\"app.type!='IMG'\">\n\n </td>\n <td>{{app.nc}}</td>\n <td style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>cloud_download</mat-icon>\n </button>\n </td>\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"app.can_delete\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Cancellazione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>delete</mat-icon>\n </a>\n\n </td>\n\n </tr>\n </tbody>\n </table>\n <table width=\"98%\" class=\"fh_table\" *ngIf=\"image_type && !b_mobile\">\n <thead>\n <tr class=\"header\">\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n\n <th style=\"width:20%\">Descrizione</th>\n <th *ngIf=\"multi_list\" style=\"width:10%\">Tipo</th>\n <th style=\"width:40%\" ></th>\n\n\n <th style=\"width:10%\" >Utente</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g;let odd=odd; let even=even;\" style=\"font-size: 12px;\" [ngClass]=\"{ odd: odd, even: even }\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n\n <td>{{app.Filename}}</td>\n <td style=\"text-align:center\">{{app.Filesize}}</td>\n <td>\n <div fxLayout=\"row\">\n <a mat-icon-button matTooltip=\"Modifica Descrizione\" *ngIf=\"app.can_delete\" (click)=\"edit_descri(app)\">\n <mat-icon>edit</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Modifica Descrizione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>edit</mat-icon>\n </a>\n\n <div [innerHTML]=\"app.descrizione_vis\" style=\"width:100%\">\n </div>\n </div></td>\n <td *ngIf=\"multi_list\">\n <div fxLayout=\"row\">\n <a mat-icon-button matTooltip=\"Modifica Tipo\" *ngIf=\"app.can_delete\" (click)=\"edit_tipo(app)\">\n <mat-icon>edit</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Modifica Tipologia consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>edit</mat-icon>\n </a>\n\n <div [innerHTML]=\"app.tipo\" style=\"width:100%\">\n </div>\n </div></td>\n\n <td style=\"min-width:400px;min-height: 400px\" *ngIf=\"app.type=='IMG'\">\n <fh-image-viewer [u]=\"app\"></fh-image-viewer>\n\n </td>\n <td *ngIf=\"app.type!='IMG'\">\n\n </td>\n <td>{{app.nc}}</td>\n <td style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>cloud_download</mat-icon>\n </button>\n </td>\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"app.can_delete\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Cancellazione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>delete</mat-icon>\n </a>\n\n </td>\n\n </tr>\n </tbody>\n </table>\n <table width=\"98%\" class=\"fh_table\" *ngIf=\"b_mobile\">\n <tbody>\n\n <tr *ngFor=\"let app of arr_g;let odd=odd; let even=even;\" style=\"font-size: 12px;\" [ngClass]=\"{ odd: odd, even: even }\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td *ngIf=\"b_mobile\" style=\"text-align:center\">{{app.Filename}}<br><br>\n <button style=\"background-color: #F5F5F5\" (click)=\"download_all(app)\" mat-flat-button>DOWNLOAD</button>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
|
|
4800
|
+
styles: ["\n\n\n\n "]
|
|
4801
|
+
}] }
|
|
4802
|
+
];
|
|
4803
|
+
/** @nocollapse */
|
|
4804
|
+
FHUploadPanelComponent.ctorParameters = function () { return [
|
|
4805
|
+
{ type: AppService },
|
|
4806
|
+
{ type: QueryService },
|
|
4807
|
+
{ type: ToastrService },
|
|
4808
|
+
{ type: MatDialog },
|
|
4809
|
+
{ type: AuthenticationService },
|
|
4810
|
+
{ type: UtilityService }
|
|
4811
|
+
]; };
|
|
4812
|
+
FHUploadPanelComponent.propDecorators = {
|
|
4813
|
+
enabled: [{ type: Input }],
|
|
4814
|
+
label: [{ type: Input }],
|
|
4815
|
+
sovrascrivi_path: [{ type: Input }],
|
|
4816
|
+
ruolo_supervisore: [{ type: Input }],
|
|
4817
|
+
access_control: [{ type: Input }],
|
|
4818
|
+
show_images: [{ type: Input }],
|
|
4819
|
+
change: [{ type: Output }],
|
|
4820
|
+
upc: [{ type: ViewChild, args: ['upc',] }]
|
|
4694
4821
|
};
|
|
4822
|
+
return FHUploadPanelComponent;
|
|
4823
|
+
}());
|
|
4824
|
+
|
|
4825
|
+
/**
|
|
4826
|
+
* @fileoverview added by tsickle
|
|
4827
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4828
|
+
*/
|
|
4829
|
+
var GridService = /** @class */ (function () {
|
|
4830
|
+
function GridService(http, app_s, toastr) {
|
|
4831
|
+
this.http = http;
|
|
4832
|
+
this.app_s = app_s;
|
|
4833
|
+
this.toastr = toastr;
|
|
4834
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT; // URL to web API
|
|
4835
|
+
}
|
|
4836
|
+
// URL to web API
|
|
4695
4837
|
/**
|
|
4696
|
-
* @param {?}
|
|
4838
|
+
* @param {?} queryp
|
|
4839
|
+
* @param {?=} displayError
|
|
4840
|
+
* @param {?=} url_sec
|
|
4697
4841
|
* @return {?}
|
|
4698
4842
|
*/
|
|
4699
|
-
|
|
4700
|
-
|
|
4843
|
+
GridService.prototype.doQuery =
|
|
4844
|
+
// URL to web API
|
|
4845
|
+
/**
|
|
4846
|
+
* @param {?} queryp
|
|
4847
|
+
* @param {?=} displayError
|
|
4848
|
+
* @param {?=} url_sec
|
|
4701
4849
|
* @return {?}
|
|
4702
4850
|
*/
|
|
4703
|
-
function (
|
|
4704
|
-
|
|
4851
|
+
function (queryp, displayError, url_sec) {
|
|
4852
|
+
var _this = this;
|
|
4853
|
+
if (displayError === void 0) { displayError = true; }
|
|
4854
|
+
if (url_sec === void 0) { url_sec = null; }
|
|
4855
|
+
this.headers = new HttpHeaders({
|
|
4856
|
+
'Content-Type': 'application/json',
|
|
4857
|
+
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
4858
|
+
});
|
|
4859
|
+
if (url_sec == null)
|
|
4860
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.GRID_ENDPOINT;
|
|
4861
|
+
else
|
|
4862
|
+
this.url = url_sec;
|
|
4705
4863
|
/** @type {?} */
|
|
4706
|
-
var
|
|
4707
|
-
|
|
4708
|
-
/**
|
|
4709
|
-
|
|
4864
|
+
var post_v = JSON.stringify(queryp);
|
|
4865
|
+
return this.http.post(this.url, post_v, { headers: this.headers })
|
|
4866
|
+
.pipe(map((/**
|
|
4867
|
+
* @param {?} res
|
|
4868
|
+
* @return {?}
|
|
4869
|
+
*/
|
|
4870
|
+
function (res) {
|
|
4871
|
+
// Handle errors, display if enabled
|
|
4710
4872
|
/** @type {?} */
|
|
4711
|
-
var
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
this
|
|
4715
|
-
.myData
|
|
4716
|
-
.push(o);
|
|
4717
|
-
}
|
|
4718
|
-
this.setByValue(this.valDef);
|
|
4719
|
-
if (this.getValue() == "-1")
|
|
4720
|
-
this.setByDescri(this.valDef);
|
|
4721
|
-
};
|
|
4722
|
-
/**
|
|
4723
|
-
* @return {?}
|
|
4724
|
-
*/
|
|
4725
|
-
FHComboboxComponent.prototype.ngAfterViewInit = /**
|
|
4726
|
-
* @return {?}
|
|
4727
|
-
*/
|
|
4728
|
-
function () {
|
|
4729
|
-
// console.log("ngAfterViewInit"); console.log(this.init_fill);
|
|
4730
|
-
};
|
|
4731
|
-
/**
|
|
4732
|
-
* @return {?}
|
|
4733
|
-
*/
|
|
4734
|
-
FHComboboxComponent.prototype.ngOnInit = /**
|
|
4735
|
-
* @return {?}
|
|
4736
|
-
*/
|
|
4737
|
-
function () {
|
|
4738
|
-
if (this.init_fill == true) {
|
|
4739
|
-
if (this.sql == '') {
|
|
4740
|
-
//this.errorMsg="QUERY NON CONFIGURATA";
|
|
4741
|
-
return;
|
|
4873
|
+
var err;
|
|
4874
|
+
if (!res) {
|
|
4875
|
+
err = new Error('Empty server response');
|
|
4742
4876
|
}
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4877
|
+
else if (res.result_msg === 'KO') {
|
|
4878
|
+
err = new Error(res.msg);
|
|
4879
|
+
}
|
|
4880
|
+
if (err) {
|
|
4881
|
+
console.error(err);
|
|
4882
|
+
if (displayError) {
|
|
4883
|
+
_this.toastr.error(err.message);
|
|
4884
|
+
}
|
|
4885
|
+
throw new Error(err);
|
|
4886
|
+
}
|
|
4887
|
+
return ((/** @type {?} */ ((/** @type {?} */ (res))))) || new QGResult();
|
|
4888
|
+
})), catchError((/**
|
|
4889
|
+
* @param {?} err
|
|
4890
|
+
* @return {?}
|
|
4891
|
+
*/
|
|
4892
|
+
function (err) {
|
|
4893
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
4894
|
+
// We'd also dig deeper into the error to get a better message
|
|
4895
|
+
/** @type {?} */
|
|
4896
|
+
var errMsg = (err.message) ? err.message : err.status ? err.status + " - " + err.statusText : 'Server error';
|
|
4897
|
+
console.error(errMsg); // log to console instead
|
|
4898
|
+
throw err;
|
|
4899
|
+
})));
|
|
4751
4900
|
};
|
|
4901
|
+
GridService.decorators = [
|
|
4902
|
+
{ type: Injectable, args: [{
|
|
4903
|
+
providedIn: 'root',
|
|
4904
|
+
},] }
|
|
4905
|
+
];
|
|
4906
|
+
/** @nocollapse */
|
|
4907
|
+
GridService.ctorParameters = function () { return [
|
|
4908
|
+
{ type: HttpClient },
|
|
4909
|
+
{ type: AppService },
|
|
4910
|
+
{ type: ToastrService }
|
|
4911
|
+
]; };
|
|
4912
|
+
/** @nocollapse */ GridService.ngInjectableDef = defineInjectable({ factory: function GridService_Factory() { return new GridService(inject(HttpClient), inject(AppService), inject(ToastrService)); }, token: GridService, providedIn: "root" });
|
|
4913
|
+
return GridService;
|
|
4914
|
+
}());
|
|
4915
|
+
|
|
4916
|
+
/**
|
|
4917
|
+
* @fileoverview added by tsickle
|
|
4918
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4919
|
+
*/
|
|
4920
|
+
var win_grid_help = /** @class */ (function () {
|
|
4921
|
+
function win_grid_help(dialogRef, toastr, m_appService) {
|
|
4922
|
+
this.dialogRef = dialogRef;
|
|
4923
|
+
this.toastr = toastr;
|
|
4924
|
+
this.m_appService = m_appService;
|
|
4925
|
+
this.title = "";
|
|
4926
|
+
}
|
|
4752
4927
|
/**
|
|
4753
4928
|
* @return {?}
|
|
4754
4929
|
*/
|
|
4755
|
-
|
|
4930
|
+
win_grid_help.prototype.ngOnInit = /**
|
|
4756
4931
|
* @return {?}
|
|
4757
4932
|
*/
|
|
4758
4933
|
function () {
|
|
4759
|
-
this
|
|
4760
|
-
.selchange
|
|
4761
|
-
.emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
|
|
4762
4934
|
};
|
|
4763
|
-
|
|
4935
|
+
win_grid_help.decorators = [
|
|
4764
4936
|
{ type: Component, args: [{
|
|
4765
|
-
|
|
4766
|
-
styles: ["\n\n "]
|
|
4937
|
+
template: "\n\n\n\n <mat-dialog-content style=\"min-width:800px;min-height:500px\">\n <mat-tab-group>\n <mat-tab label=\"FILTRI\">\n\n\n <img src=\"assets/helps/fhgrid/filtri.png\"/>\n </mat-tab>\n <mat-tab label=\"ORDINAMENTI\">\n <img src=\"assets/helps/fhgrid/ordinamenti.png\"/>\n </mat-tab>\n <mat-tab label=\"LAYOUT COLONNE\">\n <img src=\"assets/helps/fhgrid/layout_colonne.png\"/>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n\n\n <mat-dialog-actions>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"dialogRef.close('')\">CHIUDI</button>\n </mat-dialog-actions>\n ",
|
|
4938
|
+
styles: ["\n agm-map {\n height: 600px;\n width: 100%;\n }\n "]
|
|
4767
4939
|
}] }
|
|
4768
4940
|
];
|
|
4769
4941
|
/** @nocollapse */
|
|
4770
|
-
|
|
4771
|
-
{ type:
|
|
4772
|
-
{ type:
|
|
4942
|
+
win_grid_help.ctorParameters = function () { return [
|
|
4943
|
+
{ type: MatDialogRef },
|
|
4944
|
+
{ type: ToastrService },
|
|
4945
|
+
{ type: AppService }
|
|
4773
4946
|
]; };
|
|
4774
|
-
|
|
4775
|
-
init_fill: [{ type: Input }],
|
|
4776
|
-
sql: [{ type: Input }],
|
|
4777
|
-
types: [{ type: Input }],
|
|
4778
|
-
values: [{ type: Input }],
|
|
4779
|
-
hidden: [{ type: Input }],
|
|
4780
|
-
label: [{ type: Input }],
|
|
4781
|
-
enabled: [{ type: Input }],
|
|
4782
|
-
required: [{ type: Input }],
|
|
4783
|
-
sel_label: [{ type: Input }],
|
|
4784
|
-
smtr: [{ type: ViewChild, args: ['cmb',] }],
|
|
4785
|
-
fillend: [{ type: Output }],
|
|
4786
|
-
selchange: [{ type: Output }],
|
|
4787
|
-
initend: [{ type: Output }],
|
|
4788
|
-
valDef: [{ type: Input }],
|
|
4789
|
-
db_type: [{ type: Input }]
|
|
4790
|
-
};
|
|
4791
|
-
return FHComboboxComponent;
|
|
4947
|
+
return win_grid_help;
|
|
4792
4948
|
}());
|
|
4793
4949
|
|
|
4794
4950
|
/**
|
|
@@ -10459,77 +10615,6 @@ var ComboBoxEditor = /** @class */ (function () {
|
|
|
10459
10615
|
return ComboBoxEditor;
|
|
10460
10616
|
}());
|
|
10461
10617
|
|
|
10462
|
-
/**
|
|
10463
|
-
* @fileoverview added by tsickle
|
|
10464
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10465
|
-
*/
|
|
10466
|
-
var FHWinComboSelect = /** @class */ (function () {
|
|
10467
|
-
function FHWinComboSelect(dialogRef, toastr) {
|
|
10468
|
-
this.dialogRef = dialogRef;
|
|
10469
|
-
this.toastr = toastr;
|
|
10470
|
-
this.label = "";
|
|
10471
|
-
this.width = "100%";
|
|
10472
|
-
this.nota = false;
|
|
10473
|
-
this.nota_val = "";
|
|
10474
|
-
}
|
|
10475
|
-
/**
|
|
10476
|
-
* @param {?} lab
|
|
10477
|
-
* @param {?} myD
|
|
10478
|
-
* @param {?=} nota
|
|
10479
|
-
* @return {?}
|
|
10480
|
-
*/
|
|
10481
|
-
FHWinComboSelect.prototype.set_selection = /**
|
|
10482
|
-
* @param {?} lab
|
|
10483
|
-
* @param {?} myD
|
|
10484
|
-
* @param {?=} nota
|
|
10485
|
-
* @return {?}
|
|
10486
|
-
*/
|
|
10487
|
-
function (lab, myD, nota) {
|
|
10488
|
-
if (nota === void 0) { nota = false; }
|
|
10489
|
-
this.nota = nota;
|
|
10490
|
-
this.label = lab;
|
|
10491
|
-
for (var i = 0; i < myD.length; i++)
|
|
10492
|
-
this.cmb_sel.add_option(myD[i]);
|
|
10493
|
-
};
|
|
10494
|
-
/**
|
|
10495
|
-
* @return {?}
|
|
10496
|
-
*/
|
|
10497
|
-
FHWinComboSelect.prototype.ok = /**
|
|
10498
|
-
* @return {?}
|
|
10499
|
-
*/
|
|
10500
|
-
function () {
|
|
10501
|
-
if (this.cmb_sel.getValue() == "-1") {
|
|
10502
|
-
this.toastr.error('Selezionare un valore');
|
|
10503
|
-
return;
|
|
10504
|
-
}
|
|
10505
|
-
this.cmb_sel.getObj().nota = this.nota_val;
|
|
10506
|
-
this.dialogRef.close(this.cmb_sel.getObj());
|
|
10507
|
-
};
|
|
10508
|
-
/**
|
|
10509
|
-
* @return {?}
|
|
10510
|
-
*/
|
|
10511
|
-
FHWinComboSelect.prototype.ngOnInit = /**
|
|
10512
|
-
* @return {?}
|
|
10513
|
-
*/
|
|
10514
|
-
function () {
|
|
10515
|
-
};
|
|
10516
|
-
FHWinComboSelect.decorators = [
|
|
10517
|
-
{ type: Component, args: [{
|
|
10518
|
-
selector: 'fhwincomboselect',
|
|
10519
|
-
template: " \n\n <div fxLayout=\"column\">\n <mat-dialog-content style=\"font-size: 12px;\" >\n \n <div fxLayout=\"column\">\n <h3>\n {{label | uppercase}}\n </h3>\n <FHComboBox #cmb_sel [init_fill]=\"false\"></FHComboBox>\n <mat-form-field *ngIf=\"nota\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Nota</mat-label>\n <textarea matInput [(ngModel)]=\"nota_val\" rows=\"12\"></textarea>\n </mat-form-field> \n </div>\n </mat-dialog-content>\n\n\n <mat-dialog-actions fxFlex=\"100\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <button mat-flat-button color=\"primary\" (click)=\"ok()\">OK</button> \n <button mat-flat-button color=\"warn\" (click)=\"dialogRef.close(null)\">ANNULLA</button>\n </mat-dialog-actions>\n </div>\n "
|
|
10520
|
-
}] }
|
|
10521
|
-
];
|
|
10522
|
-
/** @nocollapse */
|
|
10523
|
-
FHWinComboSelect.ctorParameters = function () { return [
|
|
10524
|
-
{ type: MatDialogRef },
|
|
10525
|
-
{ type: ToastrService }
|
|
10526
|
-
]; };
|
|
10527
|
-
FHWinComboSelect.propDecorators = {
|
|
10528
|
-
cmb_sel: [{ type: ViewChild, args: ['cmb_sel',] }]
|
|
10529
|
-
};
|
|
10530
|
-
return FHWinComboSelect;
|
|
10531
|
-
}());
|
|
10532
|
-
|
|
10533
10618
|
/**
|
|
10534
10619
|
* @fileoverview added by tsickle
|
|
10535
10620
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|