@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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +286 -226
- 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/docs/components/FHGridComponent.html +141 -2
- package/docs/coverage.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/controls/fhgrid.js +88 -8
- package/esm5/lib/controls/fhgrid.js +90 -8
- package/fesm2015/fluxhub-fluxhub-lib.js +264 -206
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +286 -226
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhgrid.d.ts +9 -1
- package/package.json +1 -1
|
@@ -5773,6 +5773,205 @@ class wkfapp {
|
|
|
5773
5773
|
}
|
|
5774
5774
|
}
|
|
5775
5775
|
|
|
5776
|
+
/**
|
|
5777
|
+
* @fileoverview added by tsickle
|
|
5778
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5779
|
+
*/
|
|
5780
|
+
class OfficeOperation {
|
|
5781
|
+
}
|
|
5782
|
+
class OfficeAutomatorService {
|
|
5783
|
+
/**
|
|
5784
|
+
* @param {?} dataService
|
|
5785
|
+
* @param {?} fileService
|
|
5786
|
+
* @param {?} toastr
|
|
5787
|
+
*/
|
|
5788
|
+
constructor(dataService, fileService, toastr) {
|
|
5789
|
+
this.dataService = dataService;
|
|
5790
|
+
this.fileService = fileService;
|
|
5791
|
+
this.toastr = toastr;
|
|
5792
|
+
/**
|
|
5793
|
+
* @param commands
|
|
5794
|
+
* @param options
|
|
5795
|
+
* @export
|
|
5796
|
+
*/
|
|
5797
|
+
this.eprog = 0;
|
|
5798
|
+
}
|
|
5799
|
+
/**
|
|
5800
|
+
* @param {?} operazione
|
|
5801
|
+
* @param {?} v1
|
|
5802
|
+
* @param {?} v2
|
|
5803
|
+
* @param {?} ordine
|
|
5804
|
+
* @return {?}
|
|
5805
|
+
*/
|
|
5806
|
+
operation(operazione, v1, v2, ordine) {
|
|
5807
|
+
/** @type {?} */
|
|
5808
|
+
let op = new OfficeOperation();
|
|
5809
|
+
op.op = operazione;
|
|
5810
|
+
op.v1 = v1;
|
|
5811
|
+
op.v2 = v2;
|
|
5812
|
+
op.ord = ordine;
|
|
5813
|
+
return op;
|
|
5814
|
+
}
|
|
5815
|
+
/**
|
|
5816
|
+
* @private
|
|
5817
|
+
* @param {?=} dialogRef_W
|
|
5818
|
+
* @return {?}
|
|
5819
|
+
*/
|
|
5820
|
+
progress_update(dialogRef_W = null) {
|
|
5821
|
+
if (dialogRef_W == null)
|
|
5822
|
+
return;
|
|
5823
|
+
if (dialogRef_W.componentInstance == null)
|
|
5824
|
+
return;
|
|
5825
|
+
this.eprog += 10;
|
|
5826
|
+
if (this.eprog >= 100)
|
|
5827
|
+
this.eprog = 95;
|
|
5828
|
+
dialogRef_W.componentInstance.update_progess(this.eprog);
|
|
5829
|
+
setTimeout((/**
|
|
5830
|
+
* @return {?}
|
|
5831
|
+
*/
|
|
5832
|
+
() => {
|
|
5833
|
+
this.progress_update(dialogRef_W);
|
|
5834
|
+
}), 2000);
|
|
5835
|
+
}
|
|
5836
|
+
/**
|
|
5837
|
+
* @param {?} uiid
|
|
5838
|
+
* @param {?} commands
|
|
5839
|
+
* @param {?} dialogRef_W
|
|
5840
|
+
* @return {?}
|
|
5841
|
+
*/
|
|
5842
|
+
runCommands(uiid, commands, dialogRef_W) {
|
|
5843
|
+
this.eprog = 0;
|
|
5844
|
+
/** @type {?} */
|
|
5845
|
+
const p = new QParam();
|
|
5846
|
+
p.sql = "INSERT_OFFICE_OPERATION";
|
|
5847
|
+
p.types = ['string', 'string'];
|
|
5848
|
+
commands.sort((/**
|
|
5849
|
+
* @param {?} left
|
|
5850
|
+
* @param {?} right
|
|
5851
|
+
* @return {?}
|
|
5852
|
+
*/
|
|
5853
|
+
(left, right) => {
|
|
5854
|
+
if (left.ord < right.ord)
|
|
5855
|
+
return -1;
|
|
5856
|
+
if (left.ord > right.ord)
|
|
5857
|
+
return 1;
|
|
5858
|
+
}));
|
|
5859
|
+
console.log('commands ', commands);
|
|
5860
|
+
p.values = [uiid, JSON.stringify(commands)];
|
|
5861
|
+
return this.dataService.doQuery(p).pipe(flatMap((/**
|
|
5862
|
+
* @param {?} data
|
|
5863
|
+
* @return {?}
|
|
5864
|
+
*/
|
|
5865
|
+
data => {
|
|
5866
|
+
if (data != null) {
|
|
5867
|
+
if (data.result_msg == "OK") {
|
|
5868
|
+
/** @type {?} */
|
|
5869
|
+
const p = new FSInput();
|
|
5870
|
+
p.command = "exec_app";
|
|
5871
|
+
p.p1 = "print_manager";
|
|
5872
|
+
p.p2 = uiid;
|
|
5873
|
+
setTimeout((/**
|
|
5874
|
+
* @return {?}
|
|
5875
|
+
*/
|
|
5876
|
+
() => {
|
|
5877
|
+
this.progress_update(dialogRef_W);
|
|
5878
|
+
}), 2000);
|
|
5879
|
+
return this.fileService.doQuery(p).pipe(flatMap((/**
|
|
5880
|
+
* @param {?} data
|
|
5881
|
+
* @return {?}
|
|
5882
|
+
*/
|
|
5883
|
+
data => {
|
|
5884
|
+
if (data != null && data.result_msg == "OK") {
|
|
5885
|
+
// check the job is done
|
|
5886
|
+
return new Observable((/**
|
|
5887
|
+
* @param {?} subscriber
|
|
5888
|
+
* @return {?}
|
|
5889
|
+
*/
|
|
5890
|
+
subscriber => {
|
|
5891
|
+
/** @type {?} */
|
|
5892
|
+
const self = this;
|
|
5893
|
+
/** @type {?} */
|
|
5894
|
+
let isTimeout = false;
|
|
5895
|
+
/** @type {?} */
|
|
5896
|
+
const timeoutTimer = setTimeout((/**
|
|
5897
|
+
* @return {?}
|
|
5898
|
+
*/
|
|
5899
|
+
() => {
|
|
5900
|
+
isTimeout = true;
|
|
5901
|
+
}), 3 * 60 * 1000);
|
|
5902
|
+
ck_files(uiid);
|
|
5903
|
+
/**
|
|
5904
|
+
* @param {?} uiid
|
|
5905
|
+
* @return {?}
|
|
5906
|
+
*/
|
|
5907
|
+
function ck_files(uiid) {
|
|
5908
|
+
/** @type {?} */
|
|
5909
|
+
const p = new QParam();
|
|
5910
|
+
p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
|
|
5911
|
+
p.types = ['string'];
|
|
5912
|
+
p.values = [uiid];
|
|
5913
|
+
self.dataService.doQuery(p).subscribe((/**
|
|
5914
|
+
* @param {?} data
|
|
5915
|
+
* @return {?}
|
|
5916
|
+
*/
|
|
5917
|
+
data => {
|
|
5918
|
+
if (data != null && data.result_msg == 'OK') {
|
|
5919
|
+
/** @type {?} */
|
|
5920
|
+
const chunkInfo = data.result_data;
|
|
5921
|
+
if (chunkInfo.length == 1) {
|
|
5922
|
+
console.log('COMPLETE!');
|
|
5923
|
+
subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
|
|
5924
|
+
subscriber.complete();
|
|
5925
|
+
}
|
|
5926
|
+
else {
|
|
5927
|
+
if (!isTimeout) {
|
|
5928
|
+
setTimeout((/**
|
|
5929
|
+
* @return {?}
|
|
5930
|
+
*/
|
|
5931
|
+
() => {
|
|
5932
|
+
ck_files(uiid);
|
|
5933
|
+
}), 3000); // 3 sec default check interval
|
|
5934
|
+
}
|
|
5935
|
+
else {
|
|
5936
|
+
console.log('Timeout');
|
|
5937
|
+
subscriber.error('Timeout');
|
|
5938
|
+
self.toastr.error('Timeout');
|
|
5939
|
+
}
|
|
5940
|
+
}
|
|
5941
|
+
}
|
|
5942
|
+
else {
|
|
5943
|
+
if (!isTimeout) {
|
|
5944
|
+
setTimeout((/**
|
|
5945
|
+
* @return {?}
|
|
5946
|
+
*/
|
|
5947
|
+
() => {
|
|
5948
|
+
ck_files(uiid);
|
|
5949
|
+
}), 3000); // 3 sec default check interval
|
|
5950
|
+
}
|
|
5951
|
+
}
|
|
5952
|
+
}));
|
|
5953
|
+
}
|
|
5954
|
+
})); // Observable
|
|
5955
|
+
}
|
|
5956
|
+
})));
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5959
|
+
})));
|
|
5960
|
+
}
|
|
5961
|
+
}
|
|
5962
|
+
OfficeAutomatorService.decorators = [
|
|
5963
|
+
{ type: Injectable, args: [{
|
|
5964
|
+
providedIn: 'root',
|
|
5965
|
+
},] }
|
|
5966
|
+
];
|
|
5967
|
+
/** @nocollapse */
|
|
5968
|
+
OfficeAutomatorService.ctorParameters = () => [
|
|
5969
|
+
{ type: QueryService },
|
|
5970
|
+
{ type: FileService },
|
|
5971
|
+
{ type: ToastrService }
|
|
5972
|
+
];
|
|
5973
|
+
/** @nocollapse */ OfficeAutomatorService.ngInjectableDef = defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(inject(QueryService), inject(FileService), inject(ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
|
|
5974
|
+
|
|
5776
5975
|
/**
|
|
5777
5976
|
* @fileoverview added by tsickle
|
|
5778
5977
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -5786,8 +5985,10 @@ class FHGridComponent {
|
|
|
5786
5985
|
* @param {?} slimLoadingBarService
|
|
5787
5986
|
* @param {?} m_dialog
|
|
5788
5987
|
* @param {?} uti_s
|
|
5988
|
+
* @param {?} officeService
|
|
5989
|
+
* @param {?} _fileService
|
|
5789
5990
|
*/
|
|
5790
|
-
constructor(_gridservice, _toast, _dataService, m_appService, slimLoadingBarService, m_dialog, uti_s) {
|
|
5991
|
+
constructor(_gridservice, _toast, _dataService, m_appService, slimLoadingBarService, m_dialog, uti_s, officeService, _fileService) {
|
|
5791
5992
|
this._gridservice = _gridservice;
|
|
5792
5993
|
this._toast = _toast;
|
|
5793
5994
|
this._dataService = _dataService;
|
|
@@ -5795,6 +5996,8 @@ class FHGridComponent {
|
|
|
5795
5996
|
this.slimLoadingBarService = slimLoadingBarService;
|
|
5796
5997
|
this.m_dialog = m_dialog;
|
|
5797
5998
|
this.uti_s = uti_s;
|
|
5999
|
+
this.officeService = officeService;
|
|
6000
|
+
this._fileService = _fileService;
|
|
5798
6001
|
this.end_point = null;
|
|
5799
6002
|
this.tbl_name = '';
|
|
5800
6003
|
this.count_tbl_name = '';
|
|
@@ -6207,6 +6410,8 @@ class FHGridComponent {
|
|
|
6207
6410
|
this.errorMsg = "";
|
|
6208
6411
|
this.innerWidth = 750;
|
|
6209
6412
|
this.show_pulisci_filtri = false;
|
|
6413
|
+
this.uiid_stampa = '';
|
|
6414
|
+
this.xxopx = 0;
|
|
6210
6415
|
this.num_r = 0;
|
|
6211
6416
|
this.ready = false;
|
|
6212
6417
|
this.ckk_ed = false;
|
|
@@ -6217,10 +6422,6 @@ class FHGridComponent {
|
|
|
6217
6422
|
this.fix_flt_temp = "";
|
|
6218
6423
|
if (this.m_appService.getState().grid_obj == null)
|
|
6219
6424
|
this.m_appService.getState().grid_obj = new Object();
|
|
6220
|
-
// this.gridOptions = <GridOptions>{};
|
|
6221
|
-
// console.log( this.gridOptions);
|
|
6222
|
-
//console.log("INIZIALIZZO SERVIZIO");
|
|
6223
|
-
//console.log(this);
|
|
6224
6425
|
}
|
|
6225
6426
|
/**
|
|
6226
6427
|
* @param {?} o
|
|
@@ -6680,6 +6881,60 @@ class FHGridComponent {
|
|
|
6680
6881
|
this.gridOptions.api.setFilterModel(null);
|
|
6681
6882
|
this.show_pulisci_filtri = false;
|
|
6682
6883
|
}
|
|
6884
|
+
/**
|
|
6885
|
+
* @return {?}
|
|
6886
|
+
*/
|
|
6887
|
+
export_excel() {
|
|
6888
|
+
this.uiid_stampa = this.uti_s.newGuid();
|
|
6889
|
+
this.xxopx = 0;
|
|
6890
|
+
this.dialogRef_W = this.m_dialog.open(WinWait, {
|
|
6891
|
+
disableClose: true
|
|
6892
|
+
});
|
|
6893
|
+
this.dialogRef_W.componentInstance.label = "EXPORT IN CORSO";
|
|
6894
|
+
/** @type {?} */
|
|
6895
|
+
let cmds = [];
|
|
6896
|
+
if (this.curr_filter == '') {
|
|
6897
|
+
this._toast.error('Selezionare almeno un filtro');
|
|
6898
|
+
return;
|
|
6899
|
+
}
|
|
6900
|
+
/** @type {?} */
|
|
6901
|
+
let str_fields = "";
|
|
6902
|
+
for (let i = 0; i < this.columnDefs.length; i++) {
|
|
6903
|
+
if (str_fields != '')
|
|
6904
|
+
str_fields += ',';
|
|
6905
|
+
str_fields += '[' + this.columnDefs[i].field + '] [' + this.columnDefs[i].headerName + ']';
|
|
6906
|
+
}
|
|
6907
|
+
cmds.push(this.officeService.operation("EXCEL_APRI_EXP_GRID", "tpl_report.xlsx", "" + this.uiid_stampa + ".xlsx", this.xxopx++));
|
|
6908
|
+
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++));
|
|
6909
|
+
cmds.push(this.officeService.operation("EXCEL_SALVA_EXP_GRID", "" + this.uiid_stampa + "_" + this.m_appService.user + ".xlsx", "", this.xxopx++));
|
|
6910
|
+
this.officeService.runCommands(this.uiid_stampa, cmds, this.dialogRef_W).subscribe((/**
|
|
6911
|
+
* @param {?} data
|
|
6912
|
+
* @return {?}
|
|
6913
|
+
*/
|
|
6914
|
+
(data) => {
|
|
6915
|
+
this.dialogRef_W.componentInstance.update_progess(100);
|
|
6916
|
+
/** @type {?} */
|
|
6917
|
+
let p = new FSInput();
|
|
6918
|
+
p.p1 =
|
|
6919
|
+
this.m_appService.LOCAL_PATH + "grid_reports\\" + this.uiid_stampa + "_" + this.m_appService.user +
|
|
6920
|
+
".xlsx";
|
|
6921
|
+
p.command = "check_file";
|
|
6922
|
+
this._fileService.doQuery(p).subscribe((/**
|
|
6923
|
+
* @param {?} data
|
|
6924
|
+
* @return {?}
|
|
6925
|
+
*/
|
|
6926
|
+
data => {
|
|
6927
|
+
if (data != null)
|
|
6928
|
+
if (data.msg == "N")
|
|
6929
|
+
this._toast.error(data.result_msg);
|
|
6930
|
+
else {
|
|
6931
|
+
window.open(this.m_appService.COMPANY_SITE_ROOT + "/exp_grid/" +
|
|
6932
|
+
this.uiid_stampa + "_" + this.m_appService.user +
|
|
6933
|
+
".xlsx");
|
|
6934
|
+
}
|
|
6935
|
+
}));
|
|
6936
|
+
}));
|
|
6937
|
+
}
|
|
6683
6938
|
/**
|
|
6684
6939
|
* @private
|
|
6685
6940
|
* @return {?}
|
|
@@ -7237,7 +7492,7 @@ class FHGridComponent {
|
|
|
7237
7492
|
FHGridComponent.decorators = [
|
|
7238
7493
|
{ type: Component, args: [{
|
|
7239
7494
|
selector: 'FHGrid',
|
|
7240
|
-
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 \r\n <div>\r\n\t\t \t\t<h5>{{num_r}} {{label_elementi}}</h5>\r\n </div>\r\n \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> \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 \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
|
|
7495
|
+
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 \r\n <div>\r\n\t\t \t\t<h5>{{num_r}} {{label_elementi}}</h5>\r\n </div>\r\n \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> \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 \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 <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",
|
|
7241
7496
|
styles: [`
|
|
7242
7497
|
|
|
7243
7498
|
`]
|
|
@@ -7251,7 +7506,9 @@ FHGridComponent.ctorParameters = () => [
|
|
|
7251
7506
|
{ type: AppService },
|
|
7252
7507
|
{ type: SlimLoadingBarService },
|
|
7253
7508
|
{ type: MatDialog },
|
|
7254
|
-
{ type: UtilityService }
|
|
7509
|
+
{ type: UtilityService },
|
|
7510
|
+
{ type: OfficeAutomatorService },
|
|
7511
|
+
{ type: FileService }
|
|
7255
7512
|
];
|
|
7256
7513
|
FHGridComponent.propDecorators = {
|
|
7257
7514
|
end_point: [{ type: Input }],
|
|
@@ -12850,205 +13107,6 @@ win_log.propDecorators = {
|
|
|
12850
13107
|
zz: [{ type: ViewChild, args: ['zz',] }]
|
|
12851
13108
|
};
|
|
12852
13109
|
|
|
12853
|
-
/**
|
|
12854
|
-
* @fileoverview added by tsickle
|
|
12855
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
12856
|
-
*/
|
|
12857
|
-
class OfficeOperation {
|
|
12858
|
-
}
|
|
12859
|
-
class OfficeAutomatorService {
|
|
12860
|
-
/**
|
|
12861
|
-
* @param {?} dataService
|
|
12862
|
-
* @param {?} fileService
|
|
12863
|
-
* @param {?} toastr
|
|
12864
|
-
*/
|
|
12865
|
-
constructor(dataService, fileService, toastr) {
|
|
12866
|
-
this.dataService = dataService;
|
|
12867
|
-
this.fileService = fileService;
|
|
12868
|
-
this.toastr = toastr;
|
|
12869
|
-
/**
|
|
12870
|
-
* @param commands
|
|
12871
|
-
* @param options
|
|
12872
|
-
* @export
|
|
12873
|
-
*/
|
|
12874
|
-
this.eprog = 0;
|
|
12875
|
-
}
|
|
12876
|
-
/**
|
|
12877
|
-
* @param {?} operazione
|
|
12878
|
-
* @param {?} v1
|
|
12879
|
-
* @param {?} v2
|
|
12880
|
-
* @param {?} ordine
|
|
12881
|
-
* @return {?}
|
|
12882
|
-
*/
|
|
12883
|
-
operation(operazione, v1, v2, ordine) {
|
|
12884
|
-
/** @type {?} */
|
|
12885
|
-
let op = new OfficeOperation();
|
|
12886
|
-
op.op = operazione;
|
|
12887
|
-
op.v1 = v1;
|
|
12888
|
-
op.v2 = v2;
|
|
12889
|
-
op.ord = ordine;
|
|
12890
|
-
return op;
|
|
12891
|
-
}
|
|
12892
|
-
/**
|
|
12893
|
-
* @private
|
|
12894
|
-
* @param {?=} dialogRef_W
|
|
12895
|
-
* @return {?}
|
|
12896
|
-
*/
|
|
12897
|
-
progress_update(dialogRef_W = null) {
|
|
12898
|
-
if (dialogRef_W == null)
|
|
12899
|
-
return;
|
|
12900
|
-
if (dialogRef_W.componentInstance == null)
|
|
12901
|
-
return;
|
|
12902
|
-
this.eprog += 10;
|
|
12903
|
-
if (this.eprog >= 100)
|
|
12904
|
-
this.eprog = 95;
|
|
12905
|
-
dialogRef_W.componentInstance.update_progess(this.eprog);
|
|
12906
|
-
setTimeout((/**
|
|
12907
|
-
* @return {?}
|
|
12908
|
-
*/
|
|
12909
|
-
() => {
|
|
12910
|
-
this.progress_update(dialogRef_W);
|
|
12911
|
-
}), 2000);
|
|
12912
|
-
}
|
|
12913
|
-
/**
|
|
12914
|
-
* @param {?} uiid
|
|
12915
|
-
* @param {?} commands
|
|
12916
|
-
* @param {?} dialogRef_W
|
|
12917
|
-
* @return {?}
|
|
12918
|
-
*/
|
|
12919
|
-
runCommands(uiid, commands, dialogRef_W) {
|
|
12920
|
-
this.eprog = 0;
|
|
12921
|
-
/** @type {?} */
|
|
12922
|
-
const p = new QParam();
|
|
12923
|
-
p.sql = "INSERT_OFFICE_OPERATION";
|
|
12924
|
-
p.types = ['string', 'string'];
|
|
12925
|
-
commands.sort((/**
|
|
12926
|
-
* @param {?} left
|
|
12927
|
-
* @param {?} right
|
|
12928
|
-
* @return {?}
|
|
12929
|
-
*/
|
|
12930
|
-
(left, right) => {
|
|
12931
|
-
if (left.ord < right.ord)
|
|
12932
|
-
return -1;
|
|
12933
|
-
if (left.ord > right.ord)
|
|
12934
|
-
return 1;
|
|
12935
|
-
}));
|
|
12936
|
-
console.log('commands ', commands);
|
|
12937
|
-
p.values = [uiid, JSON.stringify(commands)];
|
|
12938
|
-
return this.dataService.doQuery(p).pipe(flatMap((/**
|
|
12939
|
-
* @param {?} data
|
|
12940
|
-
* @return {?}
|
|
12941
|
-
*/
|
|
12942
|
-
data => {
|
|
12943
|
-
if (data != null) {
|
|
12944
|
-
if (data.result_msg == "OK") {
|
|
12945
|
-
/** @type {?} */
|
|
12946
|
-
const p = new FSInput();
|
|
12947
|
-
p.command = "exec_app";
|
|
12948
|
-
p.p1 = "print_manager";
|
|
12949
|
-
p.p2 = uiid;
|
|
12950
|
-
setTimeout((/**
|
|
12951
|
-
* @return {?}
|
|
12952
|
-
*/
|
|
12953
|
-
() => {
|
|
12954
|
-
this.progress_update(dialogRef_W);
|
|
12955
|
-
}), 2000);
|
|
12956
|
-
return this.fileService.doQuery(p).pipe(flatMap((/**
|
|
12957
|
-
* @param {?} data
|
|
12958
|
-
* @return {?}
|
|
12959
|
-
*/
|
|
12960
|
-
data => {
|
|
12961
|
-
if (data != null && data.result_msg == "OK") {
|
|
12962
|
-
// check the job is done
|
|
12963
|
-
return new Observable((/**
|
|
12964
|
-
* @param {?} subscriber
|
|
12965
|
-
* @return {?}
|
|
12966
|
-
*/
|
|
12967
|
-
subscriber => {
|
|
12968
|
-
/** @type {?} */
|
|
12969
|
-
const self = this;
|
|
12970
|
-
/** @type {?} */
|
|
12971
|
-
let isTimeout = false;
|
|
12972
|
-
/** @type {?} */
|
|
12973
|
-
const timeoutTimer = setTimeout((/**
|
|
12974
|
-
* @return {?}
|
|
12975
|
-
*/
|
|
12976
|
-
() => {
|
|
12977
|
-
isTimeout = true;
|
|
12978
|
-
}), 3 * 60 * 1000);
|
|
12979
|
-
ck_files(uiid);
|
|
12980
|
-
/**
|
|
12981
|
-
* @param {?} uiid
|
|
12982
|
-
* @return {?}
|
|
12983
|
-
*/
|
|
12984
|
-
function ck_files(uiid) {
|
|
12985
|
-
/** @type {?} */
|
|
12986
|
-
const p = new QParam();
|
|
12987
|
-
p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
|
|
12988
|
-
p.types = ['string'];
|
|
12989
|
-
p.values = [uiid];
|
|
12990
|
-
self.dataService.doQuery(p).subscribe((/**
|
|
12991
|
-
* @param {?} data
|
|
12992
|
-
* @return {?}
|
|
12993
|
-
*/
|
|
12994
|
-
data => {
|
|
12995
|
-
if (data != null && data.result_msg == 'OK') {
|
|
12996
|
-
/** @type {?} */
|
|
12997
|
-
const chunkInfo = data.result_data;
|
|
12998
|
-
if (chunkInfo.length == 1) {
|
|
12999
|
-
console.log('COMPLETE!');
|
|
13000
|
-
subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
|
|
13001
|
-
subscriber.complete();
|
|
13002
|
-
}
|
|
13003
|
-
else {
|
|
13004
|
-
if (!isTimeout) {
|
|
13005
|
-
setTimeout((/**
|
|
13006
|
-
* @return {?}
|
|
13007
|
-
*/
|
|
13008
|
-
() => {
|
|
13009
|
-
ck_files(uiid);
|
|
13010
|
-
}), 3000); // 3 sec default check interval
|
|
13011
|
-
}
|
|
13012
|
-
else {
|
|
13013
|
-
console.log('Timeout');
|
|
13014
|
-
subscriber.error('Timeout');
|
|
13015
|
-
self.toastr.error('Timeout');
|
|
13016
|
-
}
|
|
13017
|
-
}
|
|
13018
|
-
}
|
|
13019
|
-
else {
|
|
13020
|
-
if (!isTimeout) {
|
|
13021
|
-
setTimeout((/**
|
|
13022
|
-
* @return {?}
|
|
13023
|
-
*/
|
|
13024
|
-
() => {
|
|
13025
|
-
ck_files(uiid);
|
|
13026
|
-
}), 3000); // 3 sec default check interval
|
|
13027
|
-
}
|
|
13028
|
-
}
|
|
13029
|
-
}));
|
|
13030
|
-
}
|
|
13031
|
-
})); // Observable
|
|
13032
|
-
}
|
|
13033
|
-
})));
|
|
13034
|
-
}
|
|
13035
|
-
}
|
|
13036
|
-
})));
|
|
13037
|
-
}
|
|
13038
|
-
}
|
|
13039
|
-
OfficeAutomatorService.decorators = [
|
|
13040
|
-
{ type: Injectable, args: [{
|
|
13041
|
-
providedIn: 'root',
|
|
13042
|
-
},] }
|
|
13043
|
-
];
|
|
13044
|
-
/** @nocollapse */
|
|
13045
|
-
OfficeAutomatorService.ctorParameters = () => [
|
|
13046
|
-
{ type: QueryService },
|
|
13047
|
-
{ type: FileService },
|
|
13048
|
-
{ type: ToastrService }
|
|
13049
|
-
];
|
|
13050
|
-
/** @nocollapse */ OfficeAutomatorService.ngInjectableDef = defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(inject(QueryService), inject(FileService), inject(ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
|
|
13051
|
-
|
|
13052
13110
|
/**
|
|
13053
13111
|
* @fileoverview added by tsickle
|
|
13054
13112
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|