@fluxhub/fluxhub-lib 1.0.329 → 1.0.330

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.
@@ -6082,12 +6082,231 @@ wkfapp = /** @class */ (function () {
6082
6082
  return wkfapp;
6083
6083
  }());
6084
6084
 
6085
+ /**
6086
+ * @fileoverview added by tsickle
6087
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6088
+ */
6089
+ var OfficeOperation = /** @class */ (function () {
6090
+ function OfficeOperation() {
6091
+ }
6092
+ return OfficeOperation;
6093
+ }());
6094
+ var OfficeAutomatorService = /** @class */ (function () {
6095
+ function OfficeAutomatorService(dataService, fileService, toastr) {
6096
+ this.dataService = dataService;
6097
+ this.fileService = fileService;
6098
+ this.toastr = toastr;
6099
+ /**
6100
+ * @param commands
6101
+ * @param options
6102
+ * @export
6103
+ */
6104
+ this.eprog = 0;
6105
+ }
6106
+ /**
6107
+ * @param {?} operazione
6108
+ * @param {?} v1
6109
+ * @param {?} v2
6110
+ * @param {?} ordine
6111
+ * @return {?}
6112
+ */
6113
+ OfficeAutomatorService.prototype.operation = /**
6114
+ * @param {?} operazione
6115
+ * @param {?} v1
6116
+ * @param {?} v2
6117
+ * @param {?} ordine
6118
+ * @return {?}
6119
+ */
6120
+ function (operazione, v1, v2, ordine) {
6121
+ /** @type {?} */
6122
+ var op = new OfficeOperation();
6123
+ op.op = operazione;
6124
+ op.v1 = v1;
6125
+ op.v2 = v2;
6126
+ op.ord = ordine;
6127
+ return op;
6128
+ };
6129
+ /**
6130
+ * @private
6131
+ * @param {?=} dialogRef_W
6132
+ * @return {?}
6133
+ */
6134
+ OfficeAutomatorService.prototype.progress_update = /**
6135
+ * @private
6136
+ * @param {?=} dialogRef_W
6137
+ * @return {?}
6138
+ */
6139
+ function (dialogRef_W) {
6140
+ var _this = this;
6141
+ if (dialogRef_W === void 0) { dialogRef_W = null; }
6142
+ if (dialogRef_W == null)
6143
+ return;
6144
+ if (dialogRef_W.componentInstance == null)
6145
+ return;
6146
+ this.eprog += 10;
6147
+ if (this.eprog >= 100)
6148
+ this.eprog = 95;
6149
+ dialogRef_W.componentInstance.update_progess(this.eprog);
6150
+ setTimeout((/**
6151
+ * @return {?}
6152
+ */
6153
+ function () {
6154
+ _this.progress_update(dialogRef_W);
6155
+ }), 2000);
6156
+ };
6157
+ /**
6158
+ * @param {?} uiid
6159
+ * @param {?} commands
6160
+ * @param {?} dialogRef_W
6161
+ * @return {?}
6162
+ */
6163
+ OfficeAutomatorService.prototype.runCommands = /**
6164
+ * @param {?} uiid
6165
+ * @param {?} commands
6166
+ * @param {?} dialogRef_W
6167
+ * @return {?}
6168
+ */
6169
+ function (uiid, commands, dialogRef_W) {
6170
+ var _this = this;
6171
+ this.eprog = 0;
6172
+ /** @type {?} */
6173
+ var p = new QParam();
6174
+ p.sql = "INSERT_OFFICE_OPERATION";
6175
+ p.types = ['string', 'string'];
6176
+ commands.sort((/**
6177
+ * @param {?} left
6178
+ * @param {?} right
6179
+ * @return {?}
6180
+ */
6181
+ function (left, right) {
6182
+ if (left.ord < right.ord)
6183
+ return -1;
6184
+ if (left.ord > right.ord)
6185
+ return 1;
6186
+ }));
6187
+ console.log('commands ', commands);
6188
+ p.values = [uiid, JSON.stringify(commands)];
6189
+ return this.dataService.doQuery(p).pipe(flatMap((/**
6190
+ * @param {?} data
6191
+ * @return {?}
6192
+ */
6193
+ function (data) {
6194
+ if (data != null) {
6195
+ if (data.result_msg == "OK") {
6196
+ /** @type {?} */
6197
+ var p_1 = new FSInput();
6198
+ p_1.command = "exec_app";
6199
+ p_1.p1 = "print_manager";
6200
+ p_1.p2 = uiid;
6201
+ setTimeout((/**
6202
+ * @return {?}
6203
+ */
6204
+ function () {
6205
+ _this.progress_update(dialogRef_W);
6206
+ }), 2000);
6207
+ return _this.fileService.doQuery(p_1).pipe(flatMap((/**
6208
+ * @param {?} data
6209
+ * @return {?}
6210
+ */
6211
+ function (data) {
6212
+ if (data != null && data.result_msg == "OK") {
6213
+ // check the job is done
6214
+ return new Observable((/**
6215
+ * @param {?} subscriber
6216
+ * @return {?}
6217
+ */
6218
+ function (subscriber) {
6219
+ /** @type {?} */
6220
+ var self = _this;
6221
+ /** @type {?} */
6222
+ var isTimeout = false;
6223
+ /** @type {?} */
6224
+ var timeoutTimer = setTimeout((/**
6225
+ * @return {?}
6226
+ */
6227
+ function () {
6228
+ isTimeout = true;
6229
+ }), 3 * 60 * 1000);
6230
+ ck_files(uiid);
6231
+ /**
6232
+ * @param {?} uiid
6233
+ * @return {?}
6234
+ */
6235
+ function ck_files(uiid) {
6236
+ /** @type {?} */
6237
+ var p = new QParam();
6238
+ p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
6239
+ p.types = ['string'];
6240
+ p.values = [uiid];
6241
+ self.dataService.doQuery(p).subscribe((/**
6242
+ * @param {?} data
6243
+ * @return {?}
6244
+ */
6245
+ function (data) {
6246
+ if (data != null && data.result_msg == 'OK') {
6247
+ /** @type {?} */
6248
+ var chunkInfo = data.result_data;
6249
+ if (chunkInfo.length == 1) {
6250
+ console.log('COMPLETE!');
6251
+ subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
6252
+ subscriber.complete();
6253
+ }
6254
+ else {
6255
+ if (!isTimeout) {
6256
+ setTimeout((/**
6257
+ * @return {?}
6258
+ */
6259
+ function () {
6260
+ ck_files(uiid);
6261
+ }), 3000); // 3 sec default check interval
6262
+ }
6263
+ else {
6264
+ console.log('Timeout');
6265
+ subscriber.error('Timeout');
6266
+ self.toastr.error('Timeout');
6267
+ }
6268
+ }
6269
+ }
6270
+ else {
6271
+ if (!isTimeout) {
6272
+ setTimeout((/**
6273
+ * @return {?}
6274
+ */
6275
+ function () {
6276
+ ck_files(uiid);
6277
+ }), 3000); // 3 sec default check interval
6278
+ }
6279
+ }
6280
+ }));
6281
+ }
6282
+ })); // Observable
6283
+ }
6284
+ })));
6285
+ }
6286
+ }
6287
+ })));
6288
+ };
6289
+ OfficeAutomatorService.decorators = [
6290
+ { type: Injectable, args: [{
6291
+ providedIn: 'root',
6292
+ },] }
6293
+ ];
6294
+ /** @nocollapse */
6295
+ OfficeAutomatorService.ctorParameters = function () { return [
6296
+ { type: QueryService },
6297
+ { type: FileService },
6298
+ { type: ToastrService }
6299
+ ]; };
6300
+ /** @nocollapse */ OfficeAutomatorService.ngInjectableDef = defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(inject(QueryService), inject(FileService), inject(ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
6301
+ return OfficeAutomatorService;
6302
+ }());
6303
+
6085
6304
  /**
6086
6305
  * @fileoverview added by tsickle
6087
6306
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6088
6307
  */
6089
6308
  var FHGridComponent = /** @class */ (function () {
6090
- function FHGridComponent(_gridservice, _toast, _dataService, m_appService, slimLoadingBarService, m_dialog, uti_s) {
6309
+ function FHGridComponent(_gridservice, _toast, _dataService, m_appService, slimLoadingBarService, m_dialog, uti_s, officeService, _fileService) {
6091
6310
  var _this = this;
6092
6311
  this._gridservice = _gridservice;
6093
6312
  this._toast = _toast;
@@ -6096,6 +6315,8 @@ var FHGridComponent = /** @class */ (function () {
6096
6315
  this.slimLoadingBarService = slimLoadingBarService;
6097
6316
  this.m_dialog = m_dialog;
6098
6317
  this.uti_s = uti_s;
6318
+ this.officeService = officeService;
6319
+ this._fileService = _fileService;
6099
6320
  this.end_point = null;
6100
6321
  this.tbl_name = '';
6101
6322
  this.count_tbl_name = '';
@@ -6508,6 +6729,8 @@ var FHGridComponent = /** @class */ (function () {
6508
6729
  this.errorMsg = "";
6509
6730
  this.innerWidth = 750;
6510
6731
  this.show_pulisci_filtri = false;
6732
+ this.uiid_stampa = '';
6733
+ this.xxopx = 0;
6511
6734
  this.num_r = 0;
6512
6735
  this.ready = false;
6513
6736
  this.ckk_ed = false;
@@ -6518,10 +6741,6 @@ var FHGridComponent = /** @class */ (function () {
6518
6741
  this.fix_flt_temp = "";
6519
6742
  if (this.m_appService.getState().grid_obj == null)
6520
6743
  this.m_appService.getState().grid_obj = new Object();
6521
- // this.gridOptions = <GridOptions>{};
6522
- // console.log( this.gridOptions);
6523
- //console.log("INIZIALIZZO SERVIZIO");
6524
- //console.log(this);
6525
6744
  }
6526
6745
  /**
6527
6746
  * @param {?} o
@@ -7068,6 +7287,64 @@ var FHGridComponent = /** @class */ (function () {
7068
7287
  this.gridOptions.api.setFilterModel(null);
7069
7288
  this.show_pulisci_filtri = false;
7070
7289
  };
7290
+ /**
7291
+ * @return {?}
7292
+ */
7293
+ FHGridComponent.prototype.export_excel = /**
7294
+ * @return {?}
7295
+ */
7296
+ function () {
7297
+ var _this = this;
7298
+ this.uiid_stampa = this.uti_s.newGuid();
7299
+ this.xxopx = 0;
7300
+ this.dialogRef_W = this.m_dialog.open(WinWait, {
7301
+ disableClose: true
7302
+ });
7303
+ this.dialogRef_W.componentInstance.label = "EXPORT IN CORSO";
7304
+ /** @type {?} */
7305
+ var cmds = [];
7306
+ if (this.curr_filter == '') {
7307
+ this._toast.error('Selezionare almeno un filtro');
7308
+ return;
7309
+ }
7310
+ /** @type {?} */
7311
+ var str_fields = "";
7312
+ for (var i = 0; i < this.columnDefs.length; i++) {
7313
+ if (str_fields != '')
7314
+ str_fields += ',';
7315
+ str_fields += '[' + this.columnDefs[i].field + '] [' + this.columnDefs[i].headerName + ']';
7316
+ }
7317
+ cmds.push(this.officeService.operation("EXCEL_APRI_EXP_GRID", "tpl_report.xlsx", "" + this.uiid_stampa + ".xlsx", this.xxopx++));
7318
+ 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++));
7319
+ cmds.push(this.officeService.operation("EXCEL_SALVA_EXP_GRID", "" + this.uiid_stampa + "_" + this.m_appService.user + ".xlsx", "", this.xxopx++));
7320
+ this.officeService.runCommands(this.uiid_stampa, cmds, this.dialogRef_W).subscribe((/**
7321
+ * @param {?} data
7322
+ * @return {?}
7323
+ */
7324
+ function (data) {
7325
+ _this.dialogRef_W.componentInstance.update_progess(100);
7326
+ /** @type {?} */
7327
+ var p = new FSInput();
7328
+ p.p1 =
7329
+ _this.m_appService.LOCAL_PATH + "grid_reports\\" + _this.uiid_stampa + "_" + _this.m_appService.user +
7330
+ ".xlsx";
7331
+ p.command = "check_file";
7332
+ _this._fileService.doQuery(p).subscribe((/**
7333
+ * @param {?} data
7334
+ * @return {?}
7335
+ */
7336
+ function (data) {
7337
+ if (data != null)
7338
+ if (data.msg == "N")
7339
+ _this._toast.error(data.result_msg);
7340
+ else {
7341
+ window.open(_this.m_appService.COMPANY_SITE_ROOT + "/exp_grid/" +
7342
+ _this.uiid_stampa + "_" + _this.m_appService.user +
7343
+ ".xlsx");
7344
+ }
7345
+ }));
7346
+ }));
7347
+ };
7071
7348
  /**
7072
7349
  * @private
7073
7350
  * @return {?}
@@ -7787,7 +8064,7 @@ var FHGridComponent = /** @class */ (function () {
7787
8064
  FHGridComponent.decorators = [
7788
8065
  { type: Component, args: [{
7789
8066
  selector: 'FHGrid',
7790
- 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",
8067
+ 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 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",
7791
8068
  styles: ["\n\n "]
7792
8069
  }] }
7793
8070
  ];
@@ -7799,7 +8076,9 @@ var FHGridComponent = /** @class */ (function () {
7799
8076
  { type: AppService },
7800
8077
  { type: SlimLoadingBarService },
7801
8078
  { type: MatDialog },
7802
- { type: UtilityService }
8079
+ { type: UtilityService },
8080
+ { type: OfficeAutomatorService },
8081
+ { type: FileService }
7803
8082
  ]; };
7804
8083
  FHGridComponent.propDecorators = {
7805
8084
  end_point: [{ type: Input }],
@@ -13337,225 +13616,6 @@ var win_log = /** @class */ (function () {
13337
13616
  return win_log;
13338
13617
  }());
13339
13618
 
13340
- /**
13341
- * @fileoverview added by tsickle
13342
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13343
- */
13344
- var OfficeOperation = /** @class */ (function () {
13345
- function OfficeOperation() {
13346
- }
13347
- return OfficeOperation;
13348
- }());
13349
- var OfficeAutomatorService = /** @class */ (function () {
13350
- function OfficeAutomatorService(dataService, fileService, toastr) {
13351
- this.dataService = dataService;
13352
- this.fileService = fileService;
13353
- this.toastr = toastr;
13354
- /**
13355
- * @param commands
13356
- * @param options
13357
- * @export
13358
- */
13359
- this.eprog = 0;
13360
- }
13361
- /**
13362
- * @param {?} operazione
13363
- * @param {?} v1
13364
- * @param {?} v2
13365
- * @param {?} ordine
13366
- * @return {?}
13367
- */
13368
- OfficeAutomatorService.prototype.operation = /**
13369
- * @param {?} operazione
13370
- * @param {?} v1
13371
- * @param {?} v2
13372
- * @param {?} ordine
13373
- * @return {?}
13374
- */
13375
- function (operazione, v1, v2, ordine) {
13376
- /** @type {?} */
13377
- var op = new OfficeOperation();
13378
- op.op = operazione;
13379
- op.v1 = v1;
13380
- op.v2 = v2;
13381
- op.ord = ordine;
13382
- return op;
13383
- };
13384
- /**
13385
- * @private
13386
- * @param {?=} dialogRef_W
13387
- * @return {?}
13388
- */
13389
- OfficeAutomatorService.prototype.progress_update = /**
13390
- * @private
13391
- * @param {?=} dialogRef_W
13392
- * @return {?}
13393
- */
13394
- function (dialogRef_W) {
13395
- var _this = this;
13396
- if (dialogRef_W === void 0) { dialogRef_W = null; }
13397
- if (dialogRef_W == null)
13398
- return;
13399
- if (dialogRef_W.componentInstance == null)
13400
- return;
13401
- this.eprog += 10;
13402
- if (this.eprog >= 100)
13403
- this.eprog = 95;
13404
- dialogRef_W.componentInstance.update_progess(this.eprog);
13405
- setTimeout((/**
13406
- * @return {?}
13407
- */
13408
- function () {
13409
- _this.progress_update(dialogRef_W);
13410
- }), 2000);
13411
- };
13412
- /**
13413
- * @param {?} uiid
13414
- * @param {?} commands
13415
- * @param {?} dialogRef_W
13416
- * @return {?}
13417
- */
13418
- OfficeAutomatorService.prototype.runCommands = /**
13419
- * @param {?} uiid
13420
- * @param {?} commands
13421
- * @param {?} dialogRef_W
13422
- * @return {?}
13423
- */
13424
- function (uiid, commands, dialogRef_W) {
13425
- var _this = this;
13426
- this.eprog = 0;
13427
- /** @type {?} */
13428
- var p = new QParam();
13429
- p.sql = "INSERT_OFFICE_OPERATION";
13430
- p.types = ['string', 'string'];
13431
- commands.sort((/**
13432
- * @param {?} left
13433
- * @param {?} right
13434
- * @return {?}
13435
- */
13436
- function (left, right) {
13437
- if (left.ord < right.ord)
13438
- return -1;
13439
- if (left.ord > right.ord)
13440
- return 1;
13441
- }));
13442
- console.log('commands ', commands);
13443
- p.values = [uiid, JSON.stringify(commands)];
13444
- return this.dataService.doQuery(p).pipe(flatMap((/**
13445
- * @param {?} data
13446
- * @return {?}
13447
- */
13448
- function (data) {
13449
- if (data != null) {
13450
- if (data.result_msg == "OK") {
13451
- /** @type {?} */
13452
- var p_1 = new FSInput();
13453
- p_1.command = "exec_app";
13454
- p_1.p1 = "print_manager";
13455
- p_1.p2 = uiid;
13456
- setTimeout((/**
13457
- * @return {?}
13458
- */
13459
- function () {
13460
- _this.progress_update(dialogRef_W);
13461
- }), 2000);
13462
- return _this.fileService.doQuery(p_1).pipe(flatMap((/**
13463
- * @param {?} data
13464
- * @return {?}
13465
- */
13466
- function (data) {
13467
- if (data != null && data.result_msg == "OK") {
13468
- // check the job is done
13469
- return new Observable((/**
13470
- * @param {?} subscriber
13471
- * @return {?}
13472
- */
13473
- function (subscriber) {
13474
- /** @type {?} */
13475
- var self = _this;
13476
- /** @type {?} */
13477
- var isTimeout = false;
13478
- /** @type {?} */
13479
- var timeoutTimer = setTimeout((/**
13480
- * @return {?}
13481
- */
13482
- function () {
13483
- isTimeout = true;
13484
- }), 3 * 60 * 1000);
13485
- ck_files(uiid);
13486
- /**
13487
- * @param {?} uiid
13488
- * @return {?}
13489
- */
13490
- function ck_files(uiid) {
13491
- /** @type {?} */
13492
- var p = new QParam();
13493
- p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
13494
- p.types = ['string'];
13495
- p.values = [uiid];
13496
- self.dataService.doQuery(p).subscribe((/**
13497
- * @param {?} data
13498
- * @return {?}
13499
- */
13500
- function (data) {
13501
- if (data != null && data.result_msg == 'OK') {
13502
- /** @type {?} */
13503
- var chunkInfo = data.result_data;
13504
- if (chunkInfo.length == 1) {
13505
- console.log('COMPLETE!');
13506
- subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
13507
- subscriber.complete();
13508
- }
13509
- else {
13510
- if (!isTimeout) {
13511
- setTimeout((/**
13512
- * @return {?}
13513
- */
13514
- function () {
13515
- ck_files(uiid);
13516
- }), 3000); // 3 sec default check interval
13517
- }
13518
- else {
13519
- console.log('Timeout');
13520
- subscriber.error('Timeout');
13521
- self.toastr.error('Timeout');
13522
- }
13523
- }
13524
- }
13525
- else {
13526
- if (!isTimeout) {
13527
- setTimeout((/**
13528
- * @return {?}
13529
- */
13530
- function () {
13531
- ck_files(uiid);
13532
- }), 3000); // 3 sec default check interval
13533
- }
13534
- }
13535
- }));
13536
- }
13537
- })); // Observable
13538
- }
13539
- })));
13540
- }
13541
- }
13542
- })));
13543
- };
13544
- OfficeAutomatorService.decorators = [
13545
- { type: Injectable, args: [{
13546
- providedIn: 'root',
13547
- },] }
13548
- ];
13549
- /** @nocollapse */
13550
- OfficeAutomatorService.ctorParameters = function () { return [
13551
- { type: QueryService },
13552
- { type: FileService },
13553
- { type: ToastrService }
13554
- ]; };
13555
- /** @nocollapse */ OfficeAutomatorService.ngInjectableDef = defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(inject(QueryService), inject(FileService), inject(ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
13556
- return OfficeAutomatorService;
13557
- }());
13558
-
13559
13619
  /**
13560
13620
  * @fileoverview added by tsickle
13561
13621
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc