@churchillliving/se-ui-toolkit 6.53.437 → 6.53.438
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/churchillliving-se-ui-toolkit.umd.js +15 -20
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/form/form.component.js +6 -11
- package/esm2015/lib/services/card.service.js +10 -11
- package/fesm2015/churchillliving-se-ui-toolkit.js +14 -20
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/form/form.component.d.ts +1 -1
- package/lib/services/card.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7191,31 +7191,27 @@
|
|
|
7191
7191
|
onDynamicCardStateChange().subscribe(function (res) {
|
|
7192
7192
|
var _a, _b;
|
|
7193
7193
|
if ((_a = res.data) === null || _a === void 0 ? void 0 : _a.isSave) {
|
|
7194
|
-
console.log('res.data: ', res.data);
|
|
7195
7194
|
_this.setCardIds(res.data);
|
|
7196
7195
|
}
|
|
7197
7196
|
else {
|
|
7198
7197
|
console.log('else: ');
|
|
7199
|
-
_this.setDeleteCardId((_b = res.data) === null || _b === void 0 ? void 0 : _b.
|
|
7198
|
+
_this.setDeleteCardId((_b = res.data) === null || _b === void 0 ? void 0 : _b.cardData);
|
|
7200
7199
|
}
|
|
7201
7200
|
});
|
|
7202
7201
|
};
|
|
7203
|
-
FormComponent.prototype.setDeleteCardId = function (
|
|
7202
|
+
FormComponent.prototype.setDeleteCardId = function (updatedCardData) {
|
|
7203
|
+
var _this = this;
|
|
7204
7204
|
var _a, _b;
|
|
7205
|
-
console.log('
|
|
7205
|
+
console.log('updatedCardData: ', updatedCardData);
|
|
7206
7206
|
(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.formSections) === null || _b === void 0 ? void 0 : _b.forEach(function (section) {
|
|
7207
7207
|
var cardControl = section.fields.find(function (field) { return field.control === exports.EFormControl.CARD; });
|
|
7208
7208
|
console.log('cardControl: ', cardControl);
|
|
7209
7209
|
if (cardControl) {
|
|
7210
|
-
|
|
7211
|
-
console.log('index: ', index);
|
|
7212
|
-
if (index > -1) {
|
|
7213
|
-
cardControl.card.data.splice(index, 1);
|
|
7214
|
-
}
|
|
7210
|
+
cardControl.card.data = updatedCardData;
|
|
7215
7211
|
}
|
|
7216
7212
|
;
|
|
7213
|
+
console.log('this.form: 00', _this.form);
|
|
7217
7214
|
});
|
|
7218
|
-
console.log('this.form: 00', this.form);
|
|
7219
7215
|
};
|
|
7220
7216
|
FormComponent.prototype.setCardIds = function (res) {
|
|
7221
7217
|
var _a, _b, _c, _d;
|
|
@@ -10466,7 +10462,7 @@
|
|
|
10466
10462
|
this.requestService.get('/Upload/Delete', imageToDelete).subscribe(function (response) {
|
|
10467
10463
|
_this.deleteFile(imageInfo, dynamicForm, cardId);
|
|
10468
10464
|
if (imageInfo.tables) {
|
|
10469
|
-
_this.deleteImageFromTables(imageInfo.tables, uniqueKey
|
|
10465
|
+
_this.deleteImageFromTables(imageInfo.tables, uniqueKey);
|
|
10470
10466
|
}
|
|
10471
10467
|
else {
|
|
10472
10468
|
changeDynamicCardState({ imageInfo: imageInfo });
|
|
@@ -10477,7 +10473,7 @@
|
|
|
10477
10473
|
_this.alertService.apiError(error);
|
|
10478
10474
|
});
|
|
10479
10475
|
};
|
|
10480
|
-
CardService.prototype.deleteImageFromTables = function (tables, uniqueKey
|
|
10476
|
+
CardService.prototype.deleteImageFromTables = function (tables, uniqueKey) {
|
|
10481
10477
|
var _this = this;
|
|
10482
10478
|
this.requestService
|
|
10483
10479
|
.get('/Data/BulkDelete', {
|
|
@@ -10485,7 +10481,6 @@
|
|
|
10485
10481
|
tables: tables,
|
|
10486
10482
|
})
|
|
10487
10483
|
.subscribe(function (response) {
|
|
10488
|
-
changeDynamicCardState({ imageInfo: imageInfo });
|
|
10489
10484
|
_this.alertService.success('Image deleted successfully.');
|
|
10490
10485
|
}, function (_c) {
|
|
10491
10486
|
var error = _c.error;
|
|
@@ -10519,16 +10514,16 @@
|
|
|
10519
10514
|
}
|
|
10520
10515
|
};
|
|
10521
10516
|
CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id) {
|
|
10522
|
-
var _a;
|
|
10523
10517
|
var fieldInfo = this.getCardData(dynamicForm.formSections, id);
|
|
10524
10518
|
var cardData = fieldInfo.data;
|
|
10525
10519
|
cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.url)));
|
|
10526
|
-
(
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
}
|
|
10520
|
+
changeDynamicCardState({ cardData: cardData });
|
|
10521
|
+
// dynamicForm.formSections?.forEach((section) => {
|
|
10522
|
+
// let card = section.fields.find((x) => x.control === EFormControl.CARD && x.id === id);
|
|
10523
|
+
// if (card && card.card) {
|
|
10524
|
+
// card.card.data = cardData;
|
|
10525
|
+
// }
|
|
10526
|
+
// });
|
|
10532
10527
|
};
|
|
10533
10528
|
CardService.prototype.deleteFromArray = function (arr, cardInfo, deleteMatchKey) {
|
|
10534
10529
|
if (arr === void 0) { arr = []; }
|