@fluxhub/fluxhub-lib 1.0.329 → 1.0.331

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.
@@ -6103,12 +6103,231 @@
6103
6103
  return wkfapp;
6104
6104
  }());
6105
6105
 
6106
+ /**
6107
+ * @fileoverview added by tsickle
6108
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6109
+ */
6110
+ var OfficeOperation = /** @class */ (function () {
6111
+ function OfficeOperation() {
6112
+ }
6113
+ return OfficeOperation;
6114
+ }());
6115
+ var OfficeAutomatorService = /** @class */ (function () {
6116
+ function OfficeAutomatorService(dataService, fileService, toastr) {
6117
+ this.dataService = dataService;
6118
+ this.fileService = fileService;
6119
+ this.toastr = toastr;
6120
+ /**
6121
+ * @param commands
6122
+ * @param options
6123
+ * @export
6124
+ */
6125
+ this.eprog = 0;
6126
+ }
6127
+ /**
6128
+ * @param {?} operazione
6129
+ * @param {?} v1
6130
+ * @param {?} v2
6131
+ * @param {?} ordine
6132
+ * @return {?}
6133
+ */
6134
+ OfficeAutomatorService.prototype.operation = /**
6135
+ * @param {?} operazione
6136
+ * @param {?} v1
6137
+ * @param {?} v2
6138
+ * @param {?} ordine
6139
+ * @return {?}
6140
+ */
6141
+ function (operazione, v1, v2, ordine) {
6142
+ /** @type {?} */
6143
+ var op = new OfficeOperation();
6144
+ op.op = operazione;
6145
+ op.v1 = v1;
6146
+ op.v2 = v2;
6147
+ op.ord = ordine;
6148
+ return op;
6149
+ };
6150
+ /**
6151
+ * @private
6152
+ * @param {?=} dialogRef_W
6153
+ * @return {?}
6154
+ */
6155
+ OfficeAutomatorService.prototype.progress_update = /**
6156
+ * @private
6157
+ * @param {?=} dialogRef_W
6158
+ * @return {?}
6159
+ */
6160
+ function (dialogRef_W) {
6161
+ var _this = this;
6162
+ if (dialogRef_W === void 0) { dialogRef_W = null; }
6163
+ if (dialogRef_W == null)
6164
+ return;
6165
+ if (dialogRef_W.componentInstance == null)
6166
+ return;
6167
+ this.eprog += 10;
6168
+ if (this.eprog >= 100)
6169
+ this.eprog = 95;
6170
+ dialogRef_W.componentInstance.update_progess(this.eprog);
6171
+ setTimeout((/**
6172
+ * @return {?}
6173
+ */
6174
+ function () {
6175
+ _this.progress_update(dialogRef_W);
6176
+ }), 2000);
6177
+ };
6178
+ /**
6179
+ * @param {?} uiid
6180
+ * @param {?} commands
6181
+ * @param {?} dialogRef_W
6182
+ * @return {?}
6183
+ */
6184
+ OfficeAutomatorService.prototype.runCommands = /**
6185
+ * @param {?} uiid
6186
+ * @param {?} commands
6187
+ * @param {?} dialogRef_W
6188
+ * @return {?}
6189
+ */
6190
+ function (uiid, commands, dialogRef_W) {
6191
+ var _this = this;
6192
+ this.eprog = 0;
6193
+ /** @type {?} */
6194
+ var p = new QParam();
6195
+ p.sql = "INSERT_OFFICE_OPERATION";
6196
+ p.types = ['string', 'string'];
6197
+ commands.sort((/**
6198
+ * @param {?} left
6199
+ * @param {?} right
6200
+ * @return {?}
6201
+ */
6202
+ function (left, right) {
6203
+ if (left.ord < right.ord)
6204
+ return -1;
6205
+ if (left.ord > right.ord)
6206
+ return 1;
6207
+ }));
6208
+ console.log('commands ', commands);
6209
+ p.values = [uiid, JSON.stringify(commands)];
6210
+ return this.dataService.doQuery(p).pipe(operators.flatMap((/**
6211
+ * @param {?} data
6212
+ * @return {?}
6213
+ */
6214
+ function (data) {
6215
+ if (data != null) {
6216
+ if (data.result_msg == "OK") {
6217
+ /** @type {?} */
6218
+ var p_1 = new FSInput();
6219
+ p_1.command = "exec_app";
6220
+ p_1.p1 = "print_manager";
6221
+ p_1.p2 = uiid;
6222
+ setTimeout((/**
6223
+ * @return {?}
6224
+ */
6225
+ function () {
6226
+ _this.progress_update(dialogRef_W);
6227
+ }), 2000);
6228
+ return _this.fileService.doQuery(p_1).pipe(operators.flatMap((/**
6229
+ * @param {?} data
6230
+ * @return {?}
6231
+ */
6232
+ function (data) {
6233
+ if (data != null && data.result_msg == "OK") {
6234
+ // check the job is done
6235
+ return new rxjs.Observable((/**
6236
+ * @param {?} subscriber
6237
+ * @return {?}
6238
+ */
6239
+ function (subscriber) {
6240
+ /** @type {?} */
6241
+ var self = _this;
6242
+ /** @type {?} */
6243
+ var isTimeout = false;
6244
+ /** @type {?} */
6245
+ var timeoutTimer = setTimeout((/**
6246
+ * @return {?}
6247
+ */
6248
+ function () {
6249
+ isTimeout = true;
6250
+ }), 3 * 60 * 1000);
6251
+ ck_files(uiid);
6252
+ /**
6253
+ * @param {?} uiid
6254
+ * @return {?}
6255
+ */
6256
+ function ck_files(uiid) {
6257
+ /** @type {?} */
6258
+ var p = new QParam();
6259
+ p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
6260
+ p.types = ['string'];
6261
+ p.values = [uiid];
6262
+ self.dataService.doQuery(p).subscribe((/**
6263
+ * @param {?} data
6264
+ * @return {?}
6265
+ */
6266
+ function (data) {
6267
+ if (data != null && data.result_msg == 'OK') {
6268
+ /** @type {?} */
6269
+ var chunkInfo = data.result_data;
6270
+ if (chunkInfo.length == 1) {
6271
+ console.log('COMPLETE!');
6272
+ subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
6273
+ subscriber.complete();
6274
+ }
6275
+ else {
6276
+ if (!isTimeout) {
6277
+ setTimeout((/**
6278
+ * @return {?}
6279
+ */
6280
+ function () {
6281
+ ck_files(uiid);
6282
+ }), 3000); // 3 sec default check interval
6283
+ }
6284
+ else {
6285
+ console.log('Timeout');
6286
+ subscriber.error('Timeout');
6287
+ self.toastr.error('Timeout');
6288
+ }
6289
+ }
6290
+ }
6291
+ else {
6292
+ if (!isTimeout) {
6293
+ setTimeout((/**
6294
+ * @return {?}
6295
+ */
6296
+ function () {
6297
+ ck_files(uiid);
6298
+ }), 3000); // 3 sec default check interval
6299
+ }
6300
+ }
6301
+ }));
6302
+ }
6303
+ })); // Observable
6304
+ }
6305
+ })));
6306
+ }
6307
+ }
6308
+ })));
6309
+ };
6310
+ OfficeAutomatorService.decorators = [
6311
+ { type: core.Injectable, args: [{
6312
+ providedIn: 'root',
6313
+ },] }
6314
+ ];
6315
+ /** @nocollapse */
6316
+ OfficeAutomatorService.ctorParameters = function () { return [
6317
+ { type: QueryService },
6318
+ { type: FileService },
6319
+ { type: ngxToastr.ToastrService }
6320
+ ]; };
6321
+ /** @nocollapse */ OfficeAutomatorService.ngInjectableDef = core.defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(core.inject(QueryService), core.inject(FileService), core.inject(ngxToastr.ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
6322
+ return OfficeAutomatorService;
6323
+ }());
6324
+
6106
6325
  /**
6107
6326
  * @fileoverview added by tsickle
6108
6327
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6109
6328
  */
6110
6329
  var FHGridComponent = /** @class */ (function () {
6111
- function FHGridComponent(_gridservice, _toast, _dataService, m_appService, slimLoadingBarService, m_dialog, uti_s) {
6330
+ function FHGridComponent(_gridservice, _toast, _dataService, m_appService, slimLoadingBarService, m_dialog, uti_s, officeService, _fileService) {
6112
6331
  var _this = this;
6113
6332
  this._gridservice = _gridservice;
6114
6333
  this._toast = _toast;
@@ -6117,6 +6336,8 @@
6117
6336
  this.slimLoadingBarService = slimLoadingBarService;
6118
6337
  this.m_dialog = m_dialog;
6119
6338
  this.uti_s = uti_s;
6339
+ this.officeService = officeService;
6340
+ this._fileService = _fileService;
6120
6341
  this.end_point = null;
6121
6342
  this.tbl_name = '';
6122
6343
  this.count_tbl_name = '';
@@ -6529,6 +6750,8 @@
6529
6750
  this.errorMsg = "";
6530
6751
  this.innerWidth = 750;
6531
6752
  this.show_pulisci_filtri = false;
6753
+ this.uiid_stampa = '';
6754
+ this.xxopx = 0;
6532
6755
  this.num_r = 0;
6533
6756
  this.ready = false;
6534
6757
  this.ckk_ed = false;
@@ -6539,10 +6762,6 @@
6539
6762
  this.fix_flt_temp = "";
6540
6763
  if (this.m_appService.getState().grid_obj == null)
6541
6764
  this.m_appService.getState().grid_obj = new Object();
6542
- // this.gridOptions = <GridOptions>{};
6543
- // console.log( this.gridOptions);
6544
- //console.log("INIZIALIZZO SERVIZIO");
6545
- //console.log(this);
6546
6765
  }
6547
6766
  /**
6548
6767
  * @param {?} o
@@ -7089,6 +7308,64 @@
7089
7308
  this.gridOptions.api.setFilterModel(null);
7090
7309
  this.show_pulisci_filtri = false;
7091
7310
  };
7311
+ /**
7312
+ * @return {?}
7313
+ */
7314
+ FHGridComponent.prototype.export_excel = /**
7315
+ * @return {?}
7316
+ */
7317
+ function () {
7318
+ var _this = this;
7319
+ this.uiid_stampa = this.uti_s.newGuid();
7320
+ this.xxopx = 0;
7321
+ this.dialogRef_W = this.m_dialog.open(WinWait, {
7322
+ disableClose: true
7323
+ });
7324
+ this.dialogRef_W.componentInstance.label = "EXPORT IN CORSO";
7325
+ /** @type {?} */
7326
+ var cmds = [];
7327
+ if (this.curr_filter == '') {
7328
+ this._toast.error('Selezionare almeno un filtro');
7329
+ return;
7330
+ }
7331
+ /** @type {?} */
7332
+ var str_fields = "";
7333
+ for (var i = 0; i < this.columnDefs.length; i++) {
7334
+ if (str_fields != '')
7335
+ str_fields += ',';
7336
+ str_fields += '[' + this.columnDefs[i].field + '] [' + this.columnDefs[i].headerName + ']';
7337
+ }
7338
+ cmds.push(this.officeService.operation("EXCEL_APRI_EXP_GRID", "tpl_report.xlsx", "" + this.uiid_stampa + ".xlsx", this.xxopx++));
7339
+ cmds.push(this.officeService.operation("EXCEL_CREA_TABELLA_FROM_DB_EXP_GRID", "select " + str_fields + " from " + this.tbl_name + " " + this.str_curr_q_p, "", this.xxopx++));
7340
+ cmds.push(this.officeService.operation("EXCEL_SALVA_EXP_GRID", "" + this.uiid_stampa + "_" + this.m_appService.user + ".xlsx", "", this.xxopx++));
7341
+ this.officeService.runCommands(this.uiid_stampa, cmds, this.dialogRef_W).subscribe((/**
7342
+ * @param {?} data
7343
+ * @return {?}
7344
+ */
7345
+ function (data) {
7346
+ _this.dialogRef_W.componentInstance.update_progess(100);
7347
+ /** @type {?} */
7348
+ var p = new FSInput();
7349
+ p.p1 =
7350
+ _this.m_appService.LOCAL_PATH + "grid_reports\\" + _this.uiid_stampa + "_" + _this.m_appService.user +
7351
+ ".xlsx";
7352
+ p.command = "check_file";
7353
+ _this._fileService.doQuery(p).subscribe((/**
7354
+ * @param {?} data
7355
+ * @return {?}
7356
+ */
7357
+ function (data) {
7358
+ if (data != null)
7359
+ if (data.msg == "N")
7360
+ _this._toast.error(data.result_msg);
7361
+ else {
7362
+ window.open(_this.m_appService.COMPANY_SITE_ROOT + "/exp_grid/" +
7363
+ _this.uiid_stampa + "_" + _this.m_appService.user +
7364
+ ".xlsx");
7365
+ }
7366
+ }));
7367
+ }));
7368
+ };
7092
7369
  /**
7093
7370
  * @private
7094
7371
  * @return {?}
@@ -7808,7 +8085,7 @@
7808
8085
  FHGridComponent.decorators = [
7809
8086
  { type: core.Component, args: [{
7810
8087
  selector: 'FHGrid',
7811
- template: "\r\n<div fxLayout=\"column\" fxFlexFill>\r\n\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"3px\" style=\"min-height: 55px\" [hidden]=\"!show_buttons\">\r\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n <div>\r\n\t\t \t\t<h5>{{num_r}}&nbsp;{{label_elementi}}</h5>\r\n </div>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n\t\t\t<div>\t<input matInput [placeholder]=\"trova_label\" (keydown)=\"keyDownFunctioncl($event)\" [(ngModel)]=\"ric_libera\"\r\n\t\t\t\t\t\t\t style=\"min-width:100px;max-width:180px;border:1px solid;min-height:30px\"></div>\r\n <div matTooltip=\"REMOVE FILTER\" matTooltipPosition=\"above\" *ngIf=\"show_pulisci_filtri\" >\r\n \t\t\t<button mat-raised-button (click)=\"pulisci_filtri()\" color=\"warn\">\r\n\t\t\t\t<mat-icon>filter_none</mat-icon>&nbsp;\r\n\t\t\t</button>\r\n </div>\r\n <div fxHide fxShow.gt-sm matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\r\n \t\t\t<button mat-raised-button (click)=\"autoSizeAll()\" color=\"primary\"\r\n *ngIf=\"show_buttons\">\r\n\t\t\t\t<mat-icon>compare_arrows</mat-icon>\r\n\t\t\t</button>\r\n </div>\r\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\r\n\t \t\t<button mat-raised-button (click)=\"fitSizeAll()\" color=\"primary\"\r\n *ngIf=\"show_buttons\">\r\n\t\t\t\t<mat-icon>keyboard_tab</mat-icon>\r\n\t\t\t</button>\r\n </div>\r\n\r\n <FHComboBox fxHide fxShow.gt-sm [hidden]='!show_buttons' (selchange)=\"ch_config()\" (fillend)=\"fe_cfg()\" #gf init_fill=\"false\"></FHComboBox>\r\n\t\t\t\t<div matTooltip=\"Modifica Preferenza\" matTooltipPosition=\"above\" *ngIf=\"curr_config!='-1'\">\r\n\t\t\t\t\t<button mat-icon-button *ngIf=\"show_buttons\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"color:rgb(248, 105, 10)\">\r\n\t\t\t\t\t\t<mat-icon (click)=\"edit_config()\">save</mat-icon>\r\n </button>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div fxHide fxShow.gt-sm matTooltip=\"Crea Nuova Preferenza\" matTooltipPosition=\"above\">\r\n\t\t\t\t\t<button mat-icon-button style=\"color:rgb(16, 98, 16)\" *ngIf=\"show_buttons\">\r\n\t\t\t\t\t\t<mat-icon (click)=\"insert_config()\">library_add</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\r\n <mat-slide-toggle fxHide fxShow.gt-sm [hidden]='!show_buttons' (click)=\"ck_flag()\" #toggle_mantieni>\r\n\t\t\t\t\t{{mantieni_impostazioni}}\r\n\t\t\t\t</mat-slide-toggle>\r\n\r\n\r\n \t&nbsp;\t<div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\r\n <button mat-raised-button (click)=\"help_window()\" color=\"primary\" *ngIf=\"show_buttons && show_help\" >\r\n\t\t\t<mat-icon>help</mat-icon>\r\n </button></div>\r\n\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxFlex>\r\n <FHGridToolBar (command)=\"docmd($event)\" [type]=\"toolbar_type\"\r\n\r\n [custom_commands]=\"toolbar_custom_commands\"\r\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\r\n\r\n ></FHGridToolBar>\r\n\t\t</div>\r\n\r\n\r\n</div>\r\n\r\n <div fxLayout=\"row\" style=\"width:100%\" fxFlex=\"95\">\r\n<ag-grid-angular\r\n ref-agGrid\r\n style=\"width: 100%; height: 100%;\"\r\n id=\"myGrid\"\r\n\t\t\t\t\t\t\t\t (cellDoubleClicked)=\"onColumnEvent($event)\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n\t\t\t\t\t\t\t\t [headerHeight]=\"header_h\"\r\n [groupHeaderHeight]=\"header_h\"\r\n\r\n\t\t\t\t\t\t\t\t class=\"ag-theme-balham\"\r\n [singleClickEdit]=\"true\"\r\n [gridOptions]=\"gridOptions\"\r\n [columnDefs]=\"columnDefs\"\r\n\t\t\t\t\t\t\t\t [rowData]=\"rowData\"\r\n\r\n\t\t\t\t\t\t\t\t (afterFilterChanged)=\"onAfterFilterChanged()\"\r\n (filterModified)=\"onFilterModified()\"\r\n\t\t\t\t\t\t\t\t (rowDoubleClicked)=\"onRowDClicked($event)\"\r\n\t\t\t\t\t\t\t\t (rowClicked)=\"onRowClicked($event)\"\r\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\r\n\t\t\t\t\t\t\t\t (columnResized)=\"oncolumnEverythingChanged($event)\"\r\n\t\t\t\t\t\t\t\t (columnMoved)=\"oncolumnEverythingChanged($event)\"\r\n (cellValueChanged)=\"okr($event)\"\r\n\t\t\t\t\t\t\t\t (sortChanged)=\"onAfterSortChanged()\"\r\n [paginationPageSize]=\"num_per_pag\"\r\n (gridReady)=\"onReady($event)\">\r\n</ag-grid-angular>\r\n</div>\r\n</div>\r\n",
8088
+ template: "\r\n<div fxLayout=\"column\" fxFlexFill>\r\n\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"3px\" style=\"min-height: 55px\" [hidden]=\"!show_buttons\">\r\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n <div>\r\n\t\t \t\t<h5>{{num_r}}&nbsp;{{label_elementi}}</h5>\r\n </div>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n\t\t\t<div>\t<input matInput [placeholder]=\"trova_label\" (keydown)=\"keyDownFunctioncl($event)\" [(ngModel)]=\"ric_libera\"\r\n\t\t\t\t\t\t\t style=\"min-width:100px;max-width:180px;border:1px solid;min-height:30px\"></div>\r\n <div matTooltip=\"REMOVE FILTER\" matTooltipPosition=\"above\" *ngIf=\"show_pulisci_filtri\" >\r\n \t\t\t<button mat-raised-button (click)=\"pulisci_filtri()\" color=\"warn\">\r\n\t\t\t\t<mat-icon>filter_none</mat-icon>&nbsp;\r\n\t\t\t</button>\r\n </div>\r\n <div fxHide fxShow.gt-sm matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\r\n \t\t\t<button mat-raised-button (click)=\"autoSizeAll()\" color=\"primary\"\r\n *ngIf=\"show_buttons\">\r\n\t\t\t\t<mat-icon>compare_arrows</mat-icon>\r\n\t\t\t</button>\r\n </div>\r\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\r\n\t \t\t<button mat-raised-button (click)=\"fitSizeAll()\" color=\"primary\"\r\n *ngIf=\"show_buttons\">\r\n\t\t\t\t<mat-icon>keyboard_tab</mat-icon>\r\n\t\t\t</button>\r\n </div>\r\n\r\n <FHComboBox fxHide fxShow.gt-sm [hidden]='!show_buttons' (selchange)=\"ch_config()\" (fillend)=\"fe_cfg()\" #gf init_fill=\"false\"></FHComboBox>\r\n\t\t\t\t<div matTooltip=\"Modifica Preferenza\" matTooltipPosition=\"above\" *ngIf=\"curr_config!='-1'\">\r\n\t\t\t\t\t<button mat-icon-button *ngIf=\"show_buttons\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"color:rgb(248, 105, 10)\">\r\n\t\t\t\t\t\t<mat-icon (click)=\"edit_config()\">save</mat-icon>\r\n </button>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div fxHide fxShow.gt-sm matTooltip=\"Crea Nuova Preferenza\" matTooltipPosition=\"above\">\r\n\t\t\t\t\t<button mat-icon-button style=\"color:rgb(16, 98, 16)\" *ngIf=\"show_buttons\">\r\n\t\t\t\t\t\t<mat-icon (click)=\"insert_config()\">library_add</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\r\n <mat-slide-toggle fxHide fxShow.gt-sm [hidden]='!show_buttons' (click)=\"ck_flag()\" #toggle_mantieni>\r\n\t\t\t\t\t{{mantieni_impostazioni}}\r\n\t\t\t\t</mat-slide-toggle>\r\n\r\n\r\n \t&nbsp;\t<div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\r\n <button mat-raised-button (click)=\"help_window()\" color=\"primary\" *ngIf=\"show_buttons && show_help\" >\r\n\t\t\t<mat-icon>help</mat-icon>\r\n </button></div>\r\n\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxFlex>\r\n <FHGridToolBar (command)=\"docmd($event)\" [type]=\"toolbar_type\"\r\n\r\n [custom_commands]=\"toolbar_custom_commands\"\r\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\r\n\r\n ></FHGridToolBar>\r\n\t\t</div>\r\n &nbsp;&nbsp;&nbsp;\r\n <img *ngIf=\"abilita_export\" src=\"assets/icons/square-o/xlsx.svg\" style=\"width:24px;height: 24px;cursor: hand\" (click)=\"export_excel()\" alt=\"Export Excel\">\r\n</div>\r\n\r\n <div fxLayout=\"row\" style=\"width:100%\" fxFlex=\"95\">\r\n<ag-grid-angular\r\n ref-agGrid\r\n style=\"width: 100%; height: 100%;\"\r\n id=\"myGrid\"\r\n\t\t\t\t\t\t\t\t (cellDoubleClicked)=\"onColumnEvent($event)\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n\t\t\t\t\t\t\t\t [headerHeight]=\"header_h\"\r\n [groupHeaderHeight]=\"header_h\"\r\n\r\n\t\t\t\t\t\t\t\t class=\"ag-theme-balham\"\r\n [singleClickEdit]=\"true\"\r\n [gridOptions]=\"gridOptions\"\r\n [columnDefs]=\"columnDefs\"\r\n\t\t\t\t\t\t\t\t [rowData]=\"rowData\"\r\n\r\n\t\t\t\t\t\t\t\t (afterFilterChanged)=\"onAfterFilterChanged()\"\r\n (filterModified)=\"onFilterModified()\"\r\n\t\t\t\t\t\t\t\t (rowDoubleClicked)=\"onRowDClicked($event)\"\r\n\t\t\t\t\t\t\t\t (rowClicked)=\"onRowClicked($event)\"\r\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\r\n\t\t\t\t\t\t\t\t (columnResized)=\"oncolumnEverythingChanged($event)\"\r\n\t\t\t\t\t\t\t\t (columnMoved)=\"oncolumnEverythingChanged($event)\"\r\n (cellValueChanged)=\"okr($event)\"\r\n\t\t\t\t\t\t\t\t (sortChanged)=\"onAfterSortChanged()\"\r\n [paginationPageSize]=\"num_per_pag\"\r\n (gridReady)=\"onReady($event)\">\r\n</ag-grid-angular>\r\n</div>\r\n</div>\r\n",
7812
8089
  styles: ["\n\n "]
7813
8090
  }] }
7814
8091
  ];
@@ -7820,7 +8097,9 @@
7820
8097
  { type: AppService },
7821
8098
  { type: ng2SlimLoadingBar.SlimLoadingBarService },
7822
8099
  { type: material.MatDialog },
7823
- { type: UtilityService }
8100
+ { type: UtilityService },
8101
+ { type: OfficeAutomatorService },
8102
+ { type: FileService }
7824
8103
  ]; };
7825
8104
  FHGridComponent.propDecorators = {
7826
8105
  end_point: [{ type: core.Input }],
@@ -13358,225 +13637,6 @@
13358
13637
  return win_log;
13359
13638
  }());
13360
13639
 
13361
- /**
13362
- * @fileoverview added by tsickle
13363
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13364
- */
13365
- var OfficeOperation = /** @class */ (function () {
13366
- function OfficeOperation() {
13367
- }
13368
- return OfficeOperation;
13369
- }());
13370
- var OfficeAutomatorService = /** @class */ (function () {
13371
- function OfficeAutomatorService(dataService, fileService, toastr) {
13372
- this.dataService = dataService;
13373
- this.fileService = fileService;
13374
- this.toastr = toastr;
13375
- /**
13376
- * @param commands
13377
- * @param options
13378
- * @export
13379
- */
13380
- this.eprog = 0;
13381
- }
13382
- /**
13383
- * @param {?} operazione
13384
- * @param {?} v1
13385
- * @param {?} v2
13386
- * @param {?} ordine
13387
- * @return {?}
13388
- */
13389
- OfficeAutomatorService.prototype.operation = /**
13390
- * @param {?} operazione
13391
- * @param {?} v1
13392
- * @param {?} v2
13393
- * @param {?} ordine
13394
- * @return {?}
13395
- */
13396
- function (operazione, v1, v2, ordine) {
13397
- /** @type {?} */
13398
- var op = new OfficeOperation();
13399
- op.op = operazione;
13400
- op.v1 = v1;
13401
- op.v2 = v2;
13402
- op.ord = ordine;
13403
- return op;
13404
- };
13405
- /**
13406
- * @private
13407
- * @param {?=} dialogRef_W
13408
- * @return {?}
13409
- */
13410
- OfficeAutomatorService.prototype.progress_update = /**
13411
- * @private
13412
- * @param {?=} dialogRef_W
13413
- * @return {?}
13414
- */
13415
- function (dialogRef_W) {
13416
- var _this = this;
13417
- if (dialogRef_W === void 0) { dialogRef_W = null; }
13418
- if (dialogRef_W == null)
13419
- return;
13420
- if (dialogRef_W.componentInstance == null)
13421
- return;
13422
- this.eprog += 10;
13423
- if (this.eprog >= 100)
13424
- this.eprog = 95;
13425
- dialogRef_W.componentInstance.update_progess(this.eprog);
13426
- setTimeout((/**
13427
- * @return {?}
13428
- */
13429
- function () {
13430
- _this.progress_update(dialogRef_W);
13431
- }), 2000);
13432
- };
13433
- /**
13434
- * @param {?} uiid
13435
- * @param {?} commands
13436
- * @param {?} dialogRef_W
13437
- * @return {?}
13438
- */
13439
- OfficeAutomatorService.prototype.runCommands = /**
13440
- * @param {?} uiid
13441
- * @param {?} commands
13442
- * @param {?} dialogRef_W
13443
- * @return {?}
13444
- */
13445
- function (uiid, commands, dialogRef_W) {
13446
- var _this = this;
13447
- this.eprog = 0;
13448
- /** @type {?} */
13449
- var p = new QParam();
13450
- p.sql = "INSERT_OFFICE_OPERATION";
13451
- p.types = ['string', 'string'];
13452
- commands.sort((/**
13453
- * @param {?} left
13454
- * @param {?} right
13455
- * @return {?}
13456
- */
13457
- function (left, right) {
13458
- if (left.ord < right.ord)
13459
- return -1;
13460
- if (left.ord > right.ord)
13461
- return 1;
13462
- }));
13463
- console.log('commands ', commands);
13464
- p.values = [uiid, JSON.stringify(commands)];
13465
- return this.dataService.doQuery(p).pipe(operators.flatMap((/**
13466
- * @param {?} data
13467
- * @return {?}
13468
- */
13469
- function (data) {
13470
- if (data != null) {
13471
- if (data.result_msg == "OK") {
13472
- /** @type {?} */
13473
- var p_1 = new FSInput();
13474
- p_1.command = "exec_app";
13475
- p_1.p1 = "print_manager";
13476
- p_1.p2 = uiid;
13477
- setTimeout((/**
13478
- * @return {?}
13479
- */
13480
- function () {
13481
- _this.progress_update(dialogRef_W);
13482
- }), 2000);
13483
- return _this.fileService.doQuery(p_1).pipe(operators.flatMap((/**
13484
- * @param {?} data
13485
- * @return {?}
13486
- */
13487
- function (data) {
13488
- if (data != null && data.result_msg == "OK") {
13489
- // check the job is done
13490
- return new rxjs.Observable((/**
13491
- * @param {?} subscriber
13492
- * @return {?}
13493
- */
13494
- function (subscriber) {
13495
- /** @type {?} */
13496
- var self = _this;
13497
- /** @type {?} */
13498
- var isTimeout = false;
13499
- /** @type {?} */
13500
- var timeoutTimer = setTimeout((/**
13501
- * @return {?}
13502
- */
13503
- function () {
13504
- isTimeout = true;
13505
- }), 3 * 60 * 1000);
13506
- ck_files(uiid);
13507
- /**
13508
- * @param {?} uiid
13509
- * @return {?}
13510
- */
13511
- function ck_files(uiid) {
13512
- /** @type {?} */
13513
- var p = new QParam();
13514
- p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
13515
- p.types = ['string'];
13516
- p.values = [uiid];
13517
- self.dataService.doQuery(p).subscribe((/**
13518
- * @param {?} data
13519
- * @return {?}
13520
- */
13521
- function (data) {
13522
- if (data != null && data.result_msg == 'OK') {
13523
- /** @type {?} */
13524
- var chunkInfo = data.result_data;
13525
- if (chunkInfo.length == 1) {
13526
- console.log('COMPLETE!');
13527
- subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
13528
- subscriber.complete();
13529
- }
13530
- else {
13531
- if (!isTimeout) {
13532
- setTimeout((/**
13533
- * @return {?}
13534
- */
13535
- function () {
13536
- ck_files(uiid);
13537
- }), 3000); // 3 sec default check interval
13538
- }
13539
- else {
13540
- console.log('Timeout');
13541
- subscriber.error('Timeout');
13542
- self.toastr.error('Timeout');
13543
- }
13544
- }
13545
- }
13546
- else {
13547
- if (!isTimeout) {
13548
- setTimeout((/**
13549
- * @return {?}
13550
- */
13551
- function () {
13552
- ck_files(uiid);
13553
- }), 3000); // 3 sec default check interval
13554
- }
13555
- }
13556
- }));
13557
- }
13558
- })); // Observable
13559
- }
13560
- })));
13561
- }
13562
- }
13563
- })));
13564
- };
13565
- OfficeAutomatorService.decorators = [
13566
- { type: core.Injectable, args: [{
13567
- providedIn: 'root',
13568
- },] }
13569
- ];
13570
- /** @nocollapse */
13571
- OfficeAutomatorService.ctorParameters = function () { return [
13572
- { type: QueryService },
13573
- { type: FileService },
13574
- { type: ngxToastr.ToastrService }
13575
- ]; };
13576
- /** @nocollapse */ OfficeAutomatorService.ngInjectableDef = core.defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(core.inject(QueryService), core.inject(FileService), core.inject(ngxToastr.ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
13577
- return OfficeAutomatorService;
13578
- }());
13579
-
13580
13640
  /**
13581
13641
  * @fileoverview added by tsickle
13582
13642
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc