@fluxhub/fluxhub-lib 10.0.511 → 10.0.512

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.
@@ -6268,79 +6268,160 @@ class FHGridComponent {
6268
6268
  if (p.sort_field != "")
6269
6269
  this.str_curr_q_p = this.str_curr_q_p + " order by " + p.sort_field;
6270
6270
  this.curr_filter = p.filter;
6271
- this._gridservice.doQuery(p, true, this.end_point).subscribe((data) => {
6272
- let ok_op = false;
6273
- if (data != null)
6274
- if (data.result_msg == "OK") {
6275
- ok_op = true;
6276
- // console.log(data.result_data);
6277
- params.successCallback(data.result_data, data.count);
6278
- this.b_init = true;
6279
- this.myData = data.result_data.slice();
6280
- this.num_r = data.count;
6281
- this.slimLoadingBarService.complete();
6282
- this.fill_end.emit();
6283
- // console.log("end");
6284
- // console.log(localStorage.getItem(this.grid_key+'_POS'));
6285
- localStorage.setItem(this.grid_key + "_POS1", JSON.stringify(p));
6286
- if (localStorage.getItem(this.grid_key + "_POS2") != null)
6287
- if (this.gridOptions != null)
6288
- if (this.gridOptions.api != null)
6289
- this.gridOptions.api.forEachNode((node) => {
6290
- // console.log(node)
6291
- if (this.getRowNodeId(node) ===
6292
- localStorage.getItem(this.grid_key + "_POS2")) {
6293
- node.setSelected(true);
6294
- localStorage.removeItem(this.grid_key + "_POS2");
6295
- if (localStorage.getItem(this.grid_key + "_LAST_ROW") != null)
6296
- this.sRow = JSON.parse(localStorage.getItem(this.grid_key + "_LAST_ROW"));
6297
- localStorage.removeItem(this.grid_key + "_LAST_ROW");
6298
- }
6299
- });
6300
- let b_mantieni_ck = false;
6301
- if (this.toggle_mantieni != null)
6302
- b_mantieni_ck = this.toggle_mantieni.checked;
6303
- if (this.no_pref && !this.b_init1) {
6304
- this.autoSizeAll();
6271
+ if (this.ric_libera == '' || !this.over_fulltext) {
6272
+ this._gridservice.doQuery(p, true, this.end_point).subscribe((data) => {
6273
+ let ok_op = false;
6274
+ if (data != null)
6275
+ if (data.result_msg == "OK") {
6276
+ ok_op = true;
6277
+ // console.log(data.result_data);
6278
+ params.successCallback(data.result_data, data.count);
6279
+ this.b_init = true;
6280
+ this.myData = data.result_data.slice();
6281
+ this.num_r = data.count;
6282
+ this.slimLoadingBarService.complete();
6283
+ this.fill_end.emit();
6284
+ // console.log("end");
6285
+ // console.log(localStorage.getItem(this.grid_key+'_POS'));
6286
+ localStorage.setItem(this.grid_key + "_POS1", JSON.stringify(p));
6287
+ if (localStorage.getItem(this.grid_key + "_POS2") != null)
6288
+ if (this.gridOptions != null)
6289
+ if (this.gridOptions.api != null)
6290
+ this.gridOptions.api.forEachNode((node) => {
6291
+ // console.log(node)
6292
+ if (this.getRowNodeId(node) ===
6293
+ localStorage.getItem(this.grid_key + "_POS2")) {
6294
+ node.setSelected(true);
6295
+ localStorage.removeItem(this.grid_key + "_POS2");
6296
+ if (localStorage.getItem(this.grid_key + "_LAST_ROW") != null)
6297
+ this.sRow = JSON.parse(localStorage.getItem(this.grid_key + "_LAST_ROW"));
6298
+ localStorage.removeItem(this.grid_key + "_LAST_ROW");
6299
+ }
6300
+ });
6301
+ let b_mantieni_ck = false;
6302
+ if (this.toggle_mantieni != null)
6303
+ b_mantieni_ck = this.toggle_mantieni.checked;
6304
+ if (this.no_pref && !this.b_init1) {
6305
+ this.autoSizeAll();
6306
+ }
6307
+ this.b_init1 = true;
6308
+ this.ensure_visible();
6309
+ /*if (localStorage.getItem(this.grid_key + '_COLS')==null && this.first_ref) {
6310
+ setTimeout(() => {
6311
+ this.autoSizeAll();
6312
+ }, 300);
6313
+ this.first_ref = false;
6314
+
6315
+
6316
+ } else*/ if (localStorage.getItem(this.grid_key + "_COLS") == null &&
6317
+ this.autosize_at_ini)
6318
+ setTimeout(() => {
6319
+ this.autoSizeAll();
6320
+ }, 300);
6321
+ //console.log('xxxxxxxxxxxxxxxxxxx');
6322
+ // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6323
+ //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6324
+ /*
6325
+
6326
+ this.gridOptions.api.forEachNode( (node) =>{
6327
+ // select the node
6328
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6329
+ if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
6330
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6331
+ node.setSelected(true);
6332
+
6333
+ }}*/
6334
+ // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6335
+ //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
6336
+ // console.log(this.myData);
6305
6337
  }
6306
- this.b_init1 = true;
6307
- this.ensure_visible();
6308
- /*if (localStorage.getItem(this.grid_key + '_COLS')==null && this.first_ref) {
6309
- setTimeout(() => {
6310
- this.autoSizeAll();
6311
- }, 300);
6312
- this.first_ref = false;
6313
-
6314
-
6315
- } else*/ if (localStorage.getItem(this.grid_key + "_COLS") == null &&
6316
- this.autosize_at_ini)
6317
- setTimeout(() => {
6338
+ if (!ok_op) {
6339
+ this.errorMsg = data.msg + " [" + data.result_msg + "]";
6340
+ }
6341
+ }, (err) => {
6342
+ this.errorMsg =
6343
+ "ERRORE DI CONNESSIONE CON IL SERVER. RITENTARE PIU' TARDI";
6344
+ });
6345
+ }
6346
+ else {
6347
+ var px = new QParam();
6348
+ px.sql = "SELECT_FC_FOGLI_FT";
6349
+ px.types = ['string', 'string', 'string',];
6350
+ px.values = [this.ric_libera, 'PACKAGING', 'PROCESSING'];
6351
+ this._dataService.doQuery(px).subscribe((data) => {
6352
+ let ok_op = false;
6353
+ if (data != null)
6354
+ if (data.result_msg == "OK") {
6355
+ ok_op = true;
6356
+ // console.log(data.result_data);
6357
+ params.successCallback(data.result_data, data.result_data.length);
6358
+ this.b_init = true;
6359
+ this.myData = data.result_data.slice();
6360
+ this.num_r = data.result_data.length;
6361
+ this.slimLoadingBarService.complete();
6362
+ this.fill_end.emit();
6363
+ // console.log("end");
6364
+ // console.log(localStorage.getItem(this.grid_key+'_POS'));
6365
+ localStorage.setItem(this.grid_key + "_POS1", JSON.stringify(p));
6366
+ if (localStorage.getItem(this.grid_key + "_POS2") != null)
6367
+ if (this.gridOptions != null)
6368
+ if (this.gridOptions.api != null)
6369
+ this.gridOptions.api.forEachNode((node) => {
6370
+ // console.log(node)
6371
+ if (this.getRowNodeId(node) ===
6372
+ localStorage.getItem(this.grid_key + "_POS2")) {
6373
+ node.setSelected(true);
6374
+ localStorage.removeItem(this.grid_key + "_POS2");
6375
+ if (localStorage.getItem(this.grid_key + "_LAST_ROW") != null)
6376
+ this.sRow = JSON.parse(localStorage.getItem(this.grid_key + "_LAST_ROW"));
6377
+ localStorage.removeItem(this.grid_key + "_LAST_ROW");
6378
+ }
6379
+ });
6380
+ let b_mantieni_ck = false;
6381
+ if (this.toggle_mantieni != null)
6382
+ b_mantieni_ck = this.toggle_mantieni.checked;
6383
+ if (this.no_pref && !this.b_init1) {
6318
6384
  this.autoSizeAll();
6319
- }, 300);
6320
- //console.log('xxxxxxxxxxxxxxxxxxx');
6321
- // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6322
- //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6323
- /*
6324
-
6325
- this.gridOptions.api.forEachNode( (node) =>{
6326
- // select the node
6327
- // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6328
- if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
6329
- // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6330
- node.setSelected(true);
6331
-
6332
- }}*/
6333
- // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6334
- //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
6335
- // console.log(this.myData);
6385
+ }
6386
+ this.b_init1 = true;
6387
+ this.ensure_visible();
6388
+ /*if (localStorage.getItem(this.grid_key + '_COLS')==null && this.first_ref) {
6389
+ setTimeout(() => {
6390
+ this.autoSizeAll();
6391
+ }, 300);
6392
+ this.first_ref = false;
6393
+
6394
+
6395
+ } else*/ if (localStorage.getItem(this.grid_key + "_COLS") == null &&
6396
+ this.autosize_at_ini)
6397
+ setTimeout(() => {
6398
+ this.autoSizeAll();
6399
+ }, 300);
6400
+ //console.log('xxxxxxxxxxxxxxxxxxx');
6401
+ // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6402
+ //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6403
+ /*
6404
+
6405
+ this.gridOptions.api.forEachNode( (node) =>{
6406
+ // select the node
6407
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6408
+ if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
6409
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6410
+ node.setSelected(true);
6411
+
6412
+ }}*/
6413
+ // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6414
+ //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
6415
+ // console.log(this.myData);
6416
+ }
6417
+ if (!ok_op) {
6418
+ this.errorMsg = data.msg + " [" + data.result_msg + "]";
6336
6419
  }
6337
- if (!ok_op) {
6338
- this.errorMsg = data.msg + " [" + data.result_msg + "]";
6339
- }
6340
- }, (err) => {
6341
- this.errorMsg =
6342
- "ERRORE DI CONNESSIONE CON IL SERVER. RITENTARE PIU' TARDI";
6343
- });
6420
+ }, (err) => {
6421
+ this.errorMsg =
6422
+ "ERRORE DI CONNESSIONE CON IL SERVER. RITENTARE PIU' TARDI";
6423
+ });
6424
+ }
6344
6425
  // this.gridOptions.api.setDatasource(this.dataSource);
6345
6426
  },
6346
6427
  };