taxtank-core 0.33.36 → 0.33.37

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ import { RestService } from '../rest';
3
3
  import { UserRolesEnum } from 'taxtank-core/common';
4
4
  import { FinancialYear, Transaction } from '../../../models';
5
5
  import { TransactionCollection } from '../../../collections';
6
+ import { map } from 'rxjs/operators';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
8
9
  * Service that handling user's bank accounts logic
@@ -17,7 +18,8 @@ export class PriorTransactionService extends RestService {
17
18
  this.roles = [UserRolesEnum.WORK_TANK, UserRolesEnum.PROPERTY_TANK, UserRolesEnum.SOLE_TANK];
18
19
  }
19
20
  get() {
20
- return super.get(this.apiUrl + `?financialYear=${new FinancialYear().year - 1}`);
21
+ const financialYear = new FinancialYear(new FinancialYear().year - 1);
22
+ return super.get(this.apiUrl + `?financialYear=${financialYear.year}`).pipe(map(transactions => transactions.filterByFinancialYear('date', null, financialYear)));
21
23
  }
22
24
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PriorTransactionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
23
25
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PriorTransactionService, providedIn: 'root' }); }
@@ -28,4 +30,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
28
30
  providedIn: 'root'
29
31
  }]
30
32
  }] });
31
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpb3ItdHJhbnNhY3Rpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3RyYW5zYWN0aW9uL3ByaW9yLXRyYW5zYWN0aW9uLnNl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sZXNFbnVtLldPUktfVEFOSywgVXNlclJvbGVzRW51bS5QUk9QRVJUWV9UQU5LLCBVc2VyUm9sZXNFbnVtLlNPTEVfVEFOS107XG5cbiAgZ2V0KCk6IE9ic2VydmFibGU8VHJhbnNhY3Rpb25Db2xsZWN0aW9uPiB7XG4gICAgY29uc3QgZmluYW5jaWFsWWVhciA9IG5ldyBGaW5hbmNpYWxZZWFyKG5ldyBGaW5hbmNpYWxZZWFyKCkueWVhciAtIDEpO1xuXG4gICAgcmV0dXJuIHN1cGVyLmdldCh0aGlzLmFwaVVybCArIGA/ZmluYW5jaWFsWWVhcj0ke2ZpbmFuY2lhbFllYXIueWVhcn1gKS5waXBlKFxuICAgICAgbWFwKHRyYW5zYWN0aW9ucyA9PiB0cmFuc2FjdGlvbnMuZmlsdGVyQnlGaW5hbmNpYWxZZWFyKCdkYXRlJywgbnVsbCwgZmluYW5jaWFsWWVhcikpXG4gICAgKTtcbiAgfVxufVxuIl19
@@ -15488,7 +15488,8 @@ class PriorTransactionService extends RestService$1 {
15488
15488
  this.roles = [UserRolesEnum.WORK_TANK, UserRolesEnum.PROPERTY_TANK, UserRolesEnum.SOLE_TANK];
15489
15489
  }
15490
15490
  get() {
15491
- return super.get(this.apiUrl + `?financialYear=${new FinancialYear().year - 1}`);
15491
+ const financialYear = new FinancialYear(new FinancialYear().year - 1);
15492
+ return super.get(this.apiUrl + `?financialYear=${financialYear.year}`).pipe(map(transactions => transactions.filterByFinancialYear('date', null, financialYear)));
15492
15493
  }
15493
15494
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PriorTransactionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
15494
15495
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PriorTransactionService, providedIn: 'root' }); }