taxtank-core 0.28.28 → 0.28.30

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.
Files changed (39) hide show
  1. package/bundles/taxtank-core.umd.js +587 -456
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/collection.js +23 -1
  4. package/esm2015/lib/collections/index.js +2 -1
  5. package/esm2015/lib/collections/tax-summary/tax-return-categories.const.js +6 -2
  6. package/esm2015/lib/collections/transaction/index.js +4 -0
  7. package/esm2015/lib/collections/transaction/transaction-base.collection.js +8 -0
  8. package/esm2015/lib/db/Models/sole/sole-business-loss-offset-rule.js +4 -0
  9. package/esm2015/lib/db/Models/sole/sole-business-loss.js +1 -1
  10. package/esm2015/lib/forms/sole/index.js +2 -1
  11. package/esm2015/lib/forms/sole/sole-business-loss.form.js +25 -0
  12. package/esm2015/lib/models/endpoint/endpoints.const.js +6 -2
  13. package/esm2015/lib/models/service-subscription/service-subscription.js +7 -1
  14. package/esm2015/lib/models/sole/index.js +2 -1
  15. package/esm2015/lib/models/sole/sole-business-loss-offset-rule.js +9 -0
  16. package/esm2015/lib/models/sole/sole-business-loss.js +12 -1
  17. package/esm2015/lib/models/tax-summary/tax-summary.js +1 -3
  18. package/esm2015/lib/services/http/sole/index.js +2 -1
  19. package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.js +24 -0
  20. package/esm2015/public-api.js +1 -3
  21. package/fesm2015/taxtank-core.js +444 -341
  22. package/fesm2015/taxtank-core.js.map +1 -1
  23. package/lib/collections/collection.d.ts +7 -0
  24. package/lib/collections/index.d.ts +1 -0
  25. package/lib/collections/transaction/index.d.ts +3 -0
  26. package/lib/collections/transaction/transaction-base.collection.d.ts +6 -0
  27. package/lib/db/Models/sole/sole-business-loss-offset-rule.d.ts +7 -0
  28. package/lib/db/Models/sole/sole-business-loss.d.ts +2 -0
  29. package/lib/forms/sole/index.d.ts +1 -0
  30. package/lib/forms/sole/sole-business-loss.form.d.ts +11 -0
  31. package/lib/models/service-subscription/service-subscription.d.ts +4 -0
  32. package/lib/models/sole/index.d.ts +1 -0
  33. package/lib/models/sole/sole-business-loss-offset-rule.d.ts +4 -0
  34. package/lib/models/sole/sole-business-loss.d.ts +4 -0
  35. package/lib/models/tax-summary/tax-summary.d.ts +0 -2
  36. package/lib/services/http/sole/index.d.ts +1 -0
  37. package/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.d.ts +13 -0
  38. package/package.json +1 -1
  39. package/public-api.d.ts +0 -2
@@ -5,6 +5,10 @@ import { AbstractModel } from '../db/Models/abstract-model';
5
5
  */
6
6
  export declare class Collection<Model extends AbstractModel> implements Iterable<Model> {
7
7
  items: Model[];
8
+ /**
9
+ * index of current item, used to iterate over the collection
10
+ */
11
+ index: number;
8
12
  constructor(items?: Model[]);
9
13
  /**
10
14
  * Iterator that allow to iterate collection items
@@ -15,6 +19,9 @@ export declare class Collection<Model extends AbstractModel> implements Iterable
15
19
  toArray(): Model[];
16
20
  get first(): Model;
17
21
  get last(): Model;
22
+ reset(): Model;
23
+ next(): Model;
24
+ back(): Model;
18
25
  getIds(): number[];
19
26
  mapBy(path: string): any[];
20
27
  sortBy(field?: string, isDesc?: boolean): this;
@@ -1,3 +1,4 @@
1
1
  export * from './vehicle';
2
2
  export * from './sole';
3
3
  export * from './property';
4
+ export * from './transaction';
@@ -0,0 +1,3 @@
1
+ export * from './transaction.collection';
2
+ export * from './transaction-allocation.collection';
3
+ export * from './transaction-base.collection';
@@ -0,0 +1,6 @@
1
+ import { TransactionBase } from '../../db/Models/transaction/transaction-base';
2
+ import { Collection } from '../collection';
3
+ import { SoleBusiness } from '../../models';
4
+ export declare class TransactionBaseCollection extends Collection<TransactionBase> {
5
+ getClaimAmountByBusiness(business: SoleBusiness): number;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { AbstractModel } from '../abstract-model';
2
+ export declare class SoleBusinessLossOffsetRule extends AbstractModel {
3
+ name?: string;
4
+ description?: string;
5
+ id?: number;
6
+ parent?: SoleBusinessLossOffsetRule;
7
+ }
@@ -1,8 +1,10 @@
1
1
  import { SoleBusiness } from './sole-business';
2
+ import { SoleBusinessLossOffsetRule } from './sole-business-loss-offset-rule';
2
3
  import { AbstractModel } from '../abstract-model';
3
4
  export declare class SoleBusinessLoss extends AbstractModel {
4
5
  openBalance?: number;
5
6
  id?: number;
6
7
  financialYear?: number;
7
8
  business?: SoleBusiness;
9
+ offsetRule?: SoleBusinessLossOffsetRule;
8
10
  }
@@ -1,5 +1,6 @@
1
1
  export * from './sole-business.form';
2
2
  export * from './sole-business-allocations.form';
3
+ export * from './sole-business-loss.form';
3
4
  export * from './sole-contact.form';
4
5
  export * from './sole-depreciation-method.form';
5
6
  export * from './sole-details.form';
@@ -0,0 +1,11 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { SoleBusinessLoss } from '../../models';
3
+ export declare class SoleBusinessLossForm extends AbstractForm<SoleBusinessLoss> {
4
+ private loss;
5
+ constructor(loss: SoleBusinessLoss, balance: number);
6
+ /**
7
+ * radio buttons can't work with object
8
+ * https://github.com/angular/components/issues/10495
9
+ */
10
+ submit(): SoleBusinessLoss;
11
+ }
@@ -65,4 +65,8 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
65
65
  * Case when payment was failed, but user has a time to update payment method
66
66
  */
67
67
  isPastDue(): boolean;
68
+ /**
69
+ * Check if current subscription has provided subscription item
70
+ */
71
+ hasItem(itemToCheck: ServiceSubscriptionItem): boolean;
68
72
  }
@@ -2,6 +2,7 @@ export * from './sole-business';
2
2
  export * from './sole-business-activity';
3
3
  export * from './sole-business-allocation';
4
4
  export * from './sole-business-loss';
5
+ export * from './sole-business-loss-offset-rule';
5
6
  export * from './sole-contact';
6
7
  export * from './sole-depreciation-method';
7
8
  export * from './sole-details';
@@ -0,0 +1,4 @@
1
+ import { SoleBusinessLossOffsetRule as SoleBusinessLossOffsetRuleBase } from '../../db/Models/sole/sole-business-loss-offset-rule';
2
+ export declare class SoleBusinessLossOffsetRule extends SoleBusinessLossOffsetRuleBase {
3
+ parent: SoleBusinessLossOffsetRule;
4
+ }
@@ -1,5 +1,9 @@
1
1
  import { SoleBusinessLoss as SoleBusinessLossBase } from '../../db/Models/sole/sole-business-loss';
2
2
  import { SoleBusiness } from './sole-business';
3
+ import { SoleBusinessLossOffsetRule } from './sole-business-loss-offset-rule';
3
4
  export declare class SoleBusinessLoss extends SoleBusinessLossBase {
4
5
  business: SoleBusiness;
6
+ offsetRule: SoleBusinessLossOffsetRule;
7
+ openBalance: number;
8
+ get hasOffset(): boolean;
5
9
  }
@@ -43,13 +43,11 @@ export declare class TaxSummary {
43
43
  */
44
44
  get otherNetTotal(): number;
45
45
  /**
46
- * @TODO Nicole update documentation + check calculations
47
46
  * Sole Net Cash = gross income – expenses
48
47
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
49
48
  */
50
49
  get soleNetCash(): number;
51
50
  /**
52
- * @TODO Nicole update documentation + check calculations
53
51
  * Sole Net Total = Gross income - expenses
54
52
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
55
53
  */
@@ -1,6 +1,7 @@
1
1
  export * from './sole-business/sole-business.service';
2
2
  export * from './sole-business-activity/sole-business-activity.service';
3
3
  export * from './sole-business-loss/sole-business-loss.service';
4
+ export * from './sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service';
4
5
  export * from './sole-contact/sole-contact.service';
5
6
  export * from './sole-depreciation-method/sole-depreciation-method.service';
6
7
  export * from './sole-details/sole-details.service';
@@ -0,0 +1,13 @@
1
+ import { RestService } from '../../../rest/rest.service';
2
+ import { SoleBusinessLossOffsetRule } from '../../../../../models';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * @TODO vik replace with json when the final list is confirmed
6
+ */
7
+ export declare class SoleBusinessLossOffsetRuleService extends RestService<SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRule> {
8
+ modelClass: typeof SoleBusinessLossOffsetRule;
9
+ url: string;
10
+ isHydra: boolean;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessLossOffsetRuleService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessLossOffsetRuleService>;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.28",
3
+ "version": "0.28.30",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -34,8 +34,6 @@ export * from './lib/collections/subscription/service-subscription.collection';
34
34
  export * from './lib/collections/tax-summary/report-item.collection';
35
35
  export * from './lib/collections/tax-summary/tax-return-categories.const';
36
36
  export * from './lib/collections/tax-review.collection';
37
- export * from './lib/collections/transaction/transaction-allocation.collection';
38
- export * from './lib/collections/transaction/transaction.collection';
39
37
  export * from './lib/collections/user-event-setting.collection';
40
38
  export * from './lib/collections/exportable.collection';
41
39
  export * from './lib/collections/client-invite.collection';