taxtank-core 0.30.91 → 0.30.93
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/esm2020/lib/models/report/sole/sole-business/sole-business-loss-report.mjs +2 -2
- package/esm2020/lib/models/toast/toast.mjs +1 -1
- package/esm2020/lib/services/http/property/property-sale/property-sale.service.mjs +1 -1
- package/esm2020/lib/services/http/service-notification/service-notification.service.mjs +13 -1
- package/esm2020/lib/services/toast/toast.service.mjs +4 -2
- package/fesm2015/taxtank-core.mjs +14 -2
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +14 -2
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/models/toast/toast.d.ts +3 -0
- package/package.json +1 -1
|
@@ -9978,7 +9978,9 @@ class ToastService {
|
|
|
9978
9978
|
return this.toast$.asObservable();
|
|
9979
9979
|
}
|
|
9980
9980
|
add(toast) {
|
|
9981
|
-
|
|
9981
|
+
// set date to prevent closing of equal toasts (extra case)
|
|
9982
|
+
toast.date = new Date(),
|
|
9983
|
+
this.toast$.next(toast);
|
|
9982
9984
|
}
|
|
9983
9985
|
success(message) {
|
|
9984
9986
|
this.add(plainToClass(Toast, {
|
|
@@ -11834,7 +11836,7 @@ class SoleBusinessLossReport extends AbstractModel {
|
|
|
11834
11836
|
const claimAmount = new TransactionCollection(transactions.toArray(), depreciations.toArray())
|
|
11835
11837
|
.getBusinessClaimAmount(new TransactionAllocationCollection(allocations), loss.business.id);
|
|
11836
11838
|
this.netIncome = claimAmount;
|
|
11837
|
-
this.closeBalance = loss.offsetRule ? 0 : claimAmount - this.openBalance;
|
|
11839
|
+
this.closeBalance = loss.offsetRule ? 0 : Math.min(0, claimAmount - this.openBalance);
|
|
11838
11840
|
}
|
|
11839
11841
|
}
|
|
11840
11842
|
|
|
@@ -14557,6 +14559,16 @@ class ServiceNotificationService extends RestService {
|
|
|
14557
14559
|
}
|
|
14558
14560
|
else {
|
|
14559
14561
|
cache.unshift(notification);
|
|
14562
|
+
this.toastService.add(plainToClass(Toast, {
|
|
14563
|
+
type: ToastTypeEnum.INFO,
|
|
14564
|
+
title: 'Information',
|
|
14565
|
+
message: notification.message,
|
|
14566
|
+
// read notification when user manually closed toast
|
|
14567
|
+
onCloseClick: () => {
|
|
14568
|
+
notification.isRead = true;
|
|
14569
|
+
this.update(notification).subscribe();
|
|
14570
|
+
}
|
|
14571
|
+
}));
|
|
14560
14572
|
}
|
|
14561
14573
|
this.cache = cache;
|
|
14562
14574
|
this.cacheSubject.next(this.cache);
|