taxtank-core 0.29.21 → 0.29.23
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/taxtank-core.umd.js +9 -4
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/subscription/service-subscription.collection.js +10 -5
- package/esm2015/lib/forms/bank/bank-account/bank-account-allocation.form.js +2 -2
- package/fesm2015/taxtank-core.js +9 -4
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/subscription/service-subscription.collection.d.ts +4 -3
- package/package.json +1 -1
|
@@ -5524,17 +5524,22 @@
|
|
|
5524
5524
|
};
|
|
5525
5525
|
ServiceSubscriptionCollection.prototype.groupByProduct = function (products) {
|
|
5526
5526
|
var _this = this;
|
|
5527
|
-
var
|
|
5527
|
+
var collectionDictionary = new CollectionDictionary(new ServiceSubscriptionCollection([]));
|
|
5528
5528
|
products.toArray().forEach(function (product) {
|
|
5529
|
-
|
|
5529
|
+
collectionDictionary.add(product.id, _this.filterByProduct(product));
|
|
5530
5530
|
});
|
|
5531
|
-
return
|
|
5531
|
+
return collectionDictionary;
|
|
5532
5532
|
};
|
|
5533
5533
|
ServiceSubscriptionCollection.prototype.findByProduct = function (product) {
|
|
5534
5534
|
return this.find(function (subscription) {
|
|
5535
5535
|
return !!subscription.items.find(function (item) { return item.price.product.id === product.id; });
|
|
5536
5536
|
});
|
|
5537
5537
|
};
|
|
5538
|
+
ServiceSubscriptionCollection.prototype.filterByProduct = function (product) {
|
|
5539
|
+
return this.filter(function (subscription) {
|
|
5540
|
+
return !!subscription.items.find(function (item) { return item.price.product.id === product.id; });
|
|
5541
|
+
});
|
|
5542
|
+
};
|
|
5538
5543
|
ServiceSubscriptionCollection.prototype.hasPropertyTank = function () {
|
|
5539
5544
|
return !!this.getItems().propertiesItem;
|
|
5540
5545
|
};
|
|
@@ -19776,7 +19781,7 @@
|
|
|
19776
19781
|
if (data === void 0) { data = {}; }
|
|
19777
19782
|
if (includeDisabledFields === void 0) { includeDisabledFields = false; }
|
|
19778
19783
|
// remove property/business allocations if empty
|
|
19779
|
-
return _super.prototype.submit.call(this, Object.assign({ bankAccountProperties: [], businessAllocations: [] }, this.value));
|
|
19784
|
+
return _super.prototype.submit.call(this, Object.assign(data, { bankAccountProperties: [], businessAllocations: [] }, this.value));
|
|
19780
19785
|
};
|
|
19781
19786
|
return BankAccountAllocationForm;
|
|
19782
19787
|
}(AbstractForm));
|