@fluxhub/fluxhub-lib 9.0.103 → 9.0.105

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.
@@ -4,6 +4,7 @@ import { HttpHeaders, HttpClient } from '@angular/common/http';
4
4
  import { ToastrService } from 'ngx-toastr';
5
5
  import { SimpleCrypt } from 'ngx-simple-crypt';
6
6
  import { AES, enc } from 'crypto-js';
7
+ import { getDiff } from 'recursive-diff';
7
8
  import { map, catchError, flatMap } from 'rxjs/operators';
8
9
  import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogModule } from '@angular/material/dialog';
9
10
  import { FileUploader, FileUploadModule } from 'ng2-file-upload';
@@ -544,11 +545,23 @@ var UtilityService = /** @class */ (function () {
544
545
  console.log(p.types[i] + " " + String(p.values[i]));
545
546
  }
546
547
  };
547
- UtilityService.prototype.insert_log = function (dt, app, k, descri, operazione) {
548
+ UtilityService.prototype.insert_log = function (dt, app, k, descri, operazione, link, old_doc, new_doc) {
549
+ if (link === void 0) { link = null; }
550
+ if (old_doc === void 0) { old_doc = null; }
551
+ var diff = null;
552
+ if (old_doc != null && new_doc != null)
553
+ diff = getDiff(old_doc, new_doc, true);
548
554
  var p = new QParam();
549
- p.sql = "INSERT_LOG_N";
550
- p.types = ['string', 'string', 'string', 'string'];
551
- p.values = [app, k, descri, operazione];
555
+ if (diff != null || link != null) {
556
+ p.sql = "INSERT_LOG_N2";
557
+ p.types = ['string', 'string', 'string', 'string', 'string', 'string'];
558
+ p.values = [app, k, descri, operazione, link, diff];
559
+ }
560
+ else {
561
+ p.sql = "INSERT_LOG_N";
562
+ p.types = ['string', 'string', 'string', 'string'];
563
+ p.values = [app, k, descri, operazione];
564
+ }
552
565
  dt.doQuery(p).subscribe();
553
566
  };
554
567
  UtilityService.prototype.sql_date_time = function (dt) {