ngx-techlify-core 11.3.8 → 11.3.9

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.
@@ -5625,14 +5625,12 @@
5625
5625
  AuditLogViewModelComponent.prototype.getTransformedChanges = function () {
5626
5626
  var _this = this;
5627
5627
  var _a, _b, _c, _d;
5628
- if ((_b = (_a = this.logInfo) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.changes) {
5629
- var changes = Object.keys((_d = (_c = this.logInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.changes) || [];
5630
- changes.forEach(function (key) {
5631
- var _a, _b, _c, _d;
5632
- var displayAttribute = key.split('_').map(function (x) { return x.charAt(0).toUpperCase() + x.slice(1); }).join(' ');
5633
- _this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (_b = (_a = _this.logInfo) === null || _a === void 0 ? void 0 : _a.object[key]) !== null && _b !== void 0 ? _b : '', oldValue: (_d = (_c = _this.logInfo) === null || _c === void 0 ? void 0 : _c.pre_object[key]) !== null && _d !== void 0 ? _d : '' });
5634
- });
5635
- }
5628
+ var changes = ((((_a = this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? Object.keys((_b = this.logInfo) === null || _b === void 0 ? void 0 : _b.object) : Object.keys((_d = (_c = this.logInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.changes)) || [];
5629
+ changes.forEach(function (key) {
5630
+ var _a, _b, _c, _d, _e;
5631
+ var displayAttribute = key.split('_').map(function (x) { return x.charAt(0).toUpperCase() + x.slice(1); }).join(' ');
5632
+ _this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (((_a = _this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? '' : ((_c = (_b = _this.logInfo) === null || _b === void 0 ? void 0 : _b.object[key]) !== null && _c !== void 0 ? _c : ''), oldValue: (_e = (_d = _this.logInfo) === null || _d === void 0 ? void 0 : _d.pre_object[key]) !== null && _e !== void 0 ? _e : '' });
5633
+ });
5636
5634
  };
5637
5635
  AuditLogViewModelComponent.prototype.close = function () {
5638
5636
  this.dialogRef.close();
@@ -6130,23 +6128,21 @@
6130
6128
  AuditLogViewComponent.prototype.getTransformedChanges = function () {
6131
6129
  var _this = this;
6132
6130
  var _a, _b, _c, _d;
6133
- if ((_b = (_a = this.logInfo) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.changes) {
6134
- var changes = Object.keys((_d = (_c = this.logInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.changes) || [];
6135
- changes.forEach(function (key) {
6136
- var _a, _b, _c, _d;
6137
- var displayAttribute = key.split('_').map(function (x) { return x.charAt(0).toUpperCase() + x.slice(1); }).join(' ');
6138
- _this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (_b = (_a = _this.logInfo) === null || _a === void 0 ? void 0 : _a.object[key]) !== null && _b !== void 0 ? _b : '', oldValue: (_d = (_c = _this.logInfo) === null || _c === void 0 ? void 0 : _c.pre_object[key]) !== null && _d !== void 0 ? _d : '' });
6139
- });
6140
- }
6131
+ var changes = ((((_a = this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? Object.keys((_b = this.logInfo) === null || _b === void 0 ? void 0 : _b.object) : Object.keys((_d = (_c = this.logInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.changes)) || [];
6132
+ changes.forEach(function (key) {
6133
+ var _a, _b, _c, _d, _e;
6134
+ var displayAttribute = key.split('_').map(function (x) { return x.charAt(0).toUpperCase() + x.slice(1); }).join(' ');
6135
+ _this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (((_a = _this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? '' : ((_c = (_b = _this.logInfo) === null || _b === void 0 ? void 0 : _b.object[key]) !== null && _c !== void 0 ? _c : ''), oldValue: (_e = (_d = _this.logInfo) === null || _d === void 0 ? void 0 : _d.pre_object[key]) !== null && _e !== void 0 ? _e : '' });
6136
+ });
6141
6137
  };
6142
6138
  AuditLogViewComponent.prototype.fetchLogDetail = function (logId) {
6143
6139
  return __awaiter(this, void 0, void 0, function () {
6144
6140
  var result;
6145
- return __generator(this, function (_e) {
6146
- switch (_e.label) {
6141
+ return __generator(this, function (_f) {
6142
+ switch (_f.label) {
6147
6143
  case 0: return [4 /*yield*/, this.dataManager.GET("api/audit-logs/" + logId)];
6148
6144
  case 1:
6149
- result = _e.sent();
6145
+ result = _f.sent();
6150
6146
  this.logInfo = result.item;
6151
6147
  this.getTransformedChanges();
6152
6148
  this.patchDelta();