taxtank-core 0.33.48 → 0.33.50

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,9 +20,10 @@ export class BestVehicleLogbookCollection extends VehicleLogbookCollection {
20
20
  }
21
21
  /**
22
22
  * Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
23
+ * and has at least one work/business trip
23
24
  */
24
25
  static isBestPeriodExist(logbooks) {
25
- if (logbooks.length < 2) {
26
+ if (logbooks.length < 2 || !logbooks.getClaimable().length) {
26
27
  return false;
27
28
  }
28
29
  if (!(logbooks instanceof VehicleLogbookCollection)) {
@@ -33,6 +34,9 @@ export class BestVehicleLogbookCollection extends VehicleLogbookCollection {
33
34
  // get list of date ranges for each of passed logbook
34
35
  static getPeriods(logbooks) {
35
36
  const claimable = logbooks.getClaimable();
37
+ if (!claimable.length) {
38
+ return [];
39
+ }
36
40
  // get a list of date ranges that could potentially be the best
37
41
  const periods = claimable
38
42
  // skip logbooks whose range ends after the last logbook
@@ -87,4 +91,4 @@ export class BestVehicleLogbookCollection extends VehicleLogbookCollection {
87
91
  return collection;
88
92
  }
89
93
  }
90
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVzdC12ZWhpY2xlLWxvZ2Jvb2suY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9jb2xsZWN0aW9ucy92ZWhpY2xlL2Jlc3QtdmVoaWNsZS1sb2dib29rLmNvbGxlY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGFBQWEsRUFBa0IsTUFBTSxjQUFjLENBQUM7QUFDN0QsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDeEUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0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PiB7XG4gICAgICBjb25zdCBsb2dib29rc0luUGVyaW9kOiBWZWhpY2xlTG9nYm9va0NvbGxlY3Rpb24gPSBsb2dib29rcy5maWx0ZXJCeVJhbmdlKCdkYXRlJywgcGVyaW9kLnN0YXJ0LnRvRGF0ZSgpLCBwZXJpb2QuZW5kLnRvRGF0ZSgpKTtcblxuICAgICAgaWYgKCF0aGlzLnBlcmlvZCB8fCAodGhpcy5nZXRXb3JrVXNhZ2UoKSA8IGxvZ2Jvb2tzSW5QZXJpb2QuZ2V0V29ya1VzYWdlKCkpKSB7XG4gICAgICAgIHRoaXMucGVyaW9kID0gcGVyaW9kO1xuICAgICAgICB0aGlzLml0ZW1zID0gbG9nYm9va3NJblBlcmlvZC50b0FycmF5KCk7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICBzdGF0aWMgZnJvbUxvZ2Jvb2tzKGxvZ2Jvb2tzOiBWZWhpY2xlTG9nYm9va0NvbGxlY3Rpb24pOiBCZXN0VmVoaWNsZUxvZ2Jvb2tDb2xsZWN0aW9uIHwgbnVsbCB7XG4gICAgaWYgKCF0aGlzLmlzQmVzdFBlcmlvZEV4aXN0KGxvZ2Jvb2tzKSkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgY29uc3QgY29sbGVjdGlvbiA9IG5ldyBCZXN0VmVoaWNsZUxvZ2Jvb2tDb2xsZWN0aW9uKGxvZ2Jvb2tzLnRvQXJyYXkoKSk7XG4gICAgY29sbGVjdGlvbi5jYWxjdWxhdGVCZXN0UGVyaW9kKGxvZ2Jvb2tzKTtcblxuICAgIHJldHVybiBjb2xsZWN0aW9uO1xuICB9XG59XG4iXX0=
@@ -7,19 +7,23 @@ export class HomeOfficeCalculatorForm extends AbstractForm {
7
7
  constructor(claim = plainToClass(HomeOfficeClaim, {})) {
8
8
  super({
9
9
  homeArea: new FormControl(claim.homeArea, [Validators.required]),
10
- officeArea: new FormControl({ value: claim.officeArea, disabled: !!claim.dedicatedOffice }, [Validators.required]),
10
+ officeArea: new FormControl(claim.officeArea, [Validators.required]),
11
11
  dedicatedOffice: new FormControl(claim.dedicatedOffice, [Validators.required]),
12
+ workUsage: new FormControl({ value: claim.workUsage, disabled: true }, [Validators.required])
12
13
  }, claim);
13
14
  this.listenEvents();
14
15
  }
15
16
  listenEvents() {
16
17
  this.get('dedicatedOffice').valueChanges.subscribe(() => {
17
- this.toggleEnabledState(this.get('officeArea'));
18
+ this.toggleEnabledState(this.get('workUsage'));
18
19
  });
19
20
  }
20
21
  submit() {
21
- const officePercent = this.value.dedicatedOffice ? 100 : round(this.value.officeArea * 100 / this.value.homeArea, 2);
22
- return super.submit({ officePercent });
22
+ let occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
23
+ if (!this.value.dedicatedOffice) {
24
+ occupancyPercent *= this.value.workUsage / 100;
25
+ }
26
+ return super.submit({ occupancyPercent: round(occupancyPercent, 2) });
23
27
  }
24
28
  }
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtY2FsY3VsYXRvci5mb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Zvcm1zL2hvbWUtb2ZmaWNlL2hvbWUtb2ZmaWNlLWNhbGN1bGF0b3IuZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUMvQyxPQUFPLEt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AgLyB0aGlzLnZhbHVlLmhvbWVBcmVhO1xuICAgIGlmICghdGhpcy52YWx1ZS5kZWRpY2F0ZWRPZmZpY2UpIHtcbiAgICAgIG9jY3VwYW5jeVBlcmNlbnQgKj0gdGhpcy52YWx1ZS53b3JrVXNhZ2UgLyAxMDA7XG4gICAgfVxuXG4gICAgcmV0dXJuIHN1cGVyLnN1Ym1pdCh7IG9jY3VwYW5jeVBlcmNlbnQ6IHJvdW5kKG9jY3VwYW5jeVBlcmNlbnQsIDIpIH0pO1xuICB9XG59XG4iXX0=
@@ -7,13 +7,12 @@ export class HomeOfficeClaimForm extends AbstractForm {
7
7
  constructor(claim = plainToClass(HomeOfficeClaim, {})) {
8
8
  super({
9
9
  method: new FormControl(claim.method, Validators.required),
10
- hours: new FormControl(claim.hours, [Validators.required, Validators.min(0), Validators.max(5000)]),
11
10
  electricityAndGas: new FormControl(claim.electricityAndGas, [Validators.required, Validators.min(0), Validators.max(100)]),
12
11
  cleaning: new FormControl(claim.cleaning, [Validators.required, Validators.min(0), Validators.max(100)]),
13
12
  internet: new FormControl(claim.internet, [Validators.required, Validators.min(0), Validators.max(100)]),
14
13
  telephone: new FormControl(claim.telephone, [Validators.required, Validators.min(0), Validators.max(100)]),
15
14
  mobile: new FormControl(claim.mobile, [Validators.required, Validators.min(0), Validators.max(100)]),
16
- officePercent: new FormControl(claim.officePercent, [Validators.required, Validators.min(0), Validators.max(100)]),
15
+ occupancyPercent: new FormControl(claim.occupancyPercent, [Validators.required, Validators.min(0), Validators.max(100)]),
17
16
  }, claim);
18
17
  this.listenEvents();
19
18
  this.switchMethod(claim.method);
@@ -24,11 +23,8 @@ export class HomeOfficeClaimForm extends AbstractForm {
24
23
  });
25
24
  }
26
25
  switchMethod(method) {
27
- this.disable({}, [...this.occupancyControls, this.controls.hours]);
26
+ this.disable({}, this.occupancyControls);
28
27
  switch (method) {
29
- case HomeOfficeClaimMethodEnum.FIXED:
30
- this.controls.hours.enable();
31
- break;
32
28
  case HomeOfficeClaimMethodEnum.ACTUAL:
33
29
  this.enable({}, this.actualControls);
34
30
  break;
@@ -41,7 +37,7 @@ export class HomeOfficeClaimForm extends AbstractForm {
41
37
  return [this.controls.electricityAndGas, this.controls.cleaning, this.controls.internet, this.controls.telephone, this.controls.mobile];
42
38
  }
43
39
  get occupancyControls() {
44
- return [...this.actualControls, this.controls.officePercent];
40
+ return [...this.actualControls, this.controls.occupancyPercent];
45
41
  }
46
42
  }
47
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtY2xhaW0uZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9mb3Jtcy9ob21lLW9mZmljZS9ob21lLW9mZmljZS1jbGFpbS5mb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBbUIsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUUvQyxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUUzRCxNQUFNLE9BQU8sbUJBQW9CLFNBQVEsWUFBNkI7SUFDcEUsWUFBWSxLQUFLLEdBQUcsWUFBWSxDQUFDLGVBQWUsRUFBRSxFQUFFLENBQUM7UUFDbkQsS0FBSyxDQUFDO1lBQ0osTUFBTSxFQUFFLElBQUksV0FBVyxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ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UFMOlxuICAgICAgICB0aGlzLmVuYWJsZSh7fSwgdGhpcy5hY3R1YWxDb250cm9scyk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSBIb21lT2ZmaWNlQ2xhaW1NZXRob2RFbnVtLk9DQ1VQQU5DWTpcbiAgICAgICAgdGhpcy5lbmFibGUoe30sIHRoaXMub2NjdXBhbmN5Q29udHJvbHMpO1xuICAgICAgICBicmVhaztcbiAgICB9XG4gIH1cblxuICBnZXQgYWN0dWFsQ29udHJvbHMoKTogQWJzdHJhY3RDb250cm9sW10ge1xuICAgIHJldHVybiBbdGhpcy5jb250cm9scy5lbGVjdHJpY2l0eUFuZEdhcywgdGhpcy5jb250cm9scy5jbGVhbmluZywgdGhpcy5jb250cm9scy5pbnRlcm5ldCwgdGhpcy5jb250cm9scy50ZWxlcGhvbmUsIHRoaXMuY29udHJvbHMubW9iaWxlXTtcbiAgfVxuXG4gIGdldCBvY2N1cGFuY3lDb250cm9scygpOiBBYnN0cmFjdENvbnRyb2xbXSB7XG4gICAgcmV0dXJuIFsuLi50aGlzLmFjdHVhbENvbnRyb2xzLCB0aGlzLmNvbnRyb2xzLm9jY3VwYW5jeVBlcmNlbnRdO1xuICB9XG59XG4iXX0=
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtY2xhaW0uaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL21vZGVscy9ob21lLW9mZmljZS9ob21lLW9mZmljZS1jbGFpbS5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEhvbWVPZmZpY2VDbGFpbU1ldGhvZEVudW0gfSBmcm9tICcuLi8uLi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nQgeyBVc2VyIH0gZnJvbSAnLi4vdXNlcic7XG5pbXBvcnQgeyBTb2xlQnVzaW5lc3MgfSBmcm9tICcuLi9zb2xlJztcblxuZXhwb3J0IGludGVyZmFjZSBIb21lT2ZmaWNlQ2xhaW1JbnRlcmZhY2Uge1xuICBpZDogbnVtYmVyO1xuICB1c2VyOiBVc2VyO1xuICBtZXRob2Q6IEhvbWVPZmZpY2VDbGFpbU1ldGhvZEVudW07XG4gIGZpbmFuY2lhbFllYXI6IG51bWJlcjtcbiAgZWxlY3RyaWNpdHlBbmRHYXM/OiBudW1iZXI7XG4gIGNsZWFuaW5nPzogbnVtYmVyO1xuICBpbnRlcm5ldD86IG51bWJlcjtcbiAgdGVsZXBob25lPzogbnVtYmVyO1xuICBtb2JpbGU/OiBudW1iZXI7XG4gIG9jY3VwYW5jeVBlcmNlbnQ/OiBudW1iZXI7XG4gIHdvcmtQZXJjZW50PzogbnVtYmVyO1xuICBob21lQXJlYT86IG51bWJlcjtcbiAgb2ZmaWNlQXJlYT86IG51bWJlcjtcbiAgZGVkaWNhdGVkT2ZmaWNlPzogYm9vbGVhbjtcbiAgd29ya1VzYWdlPzogbnVtYmVyO1xuICBidXNpbmVzcz86IFNvbGVCdXNpbmVzcztcbn1cbiJdfQ==
@@ -8,13 +8,13 @@ import { Dictionary } from '../dictionary';
8
8
  export class HomeOfficeClaim extends ObservableModel {
9
9
  constructor() {
10
10
  super(...arguments);
11
- this.hours = 0;
12
11
  this.electricityAndGas = 0;
13
12
  this.cleaning = 0;
14
13
  this.internet = 0;
15
14
  this.telephone = 0;
16
15
  this.mobile = 0;
17
- this.officePercent = 0;
16
+ this.occupancyPercent = 0;
17
+ this.dedicatedOffice = true;
18
18
  }
19
19
  static { this.className = 'HomeOfficeClaim'; }
20
20
  getChartAccountsList() {
@@ -29,10 +29,10 @@ export class HomeOfficeClaim extends ObservableModel {
29
29
  .add(list.TELEPHONE, this.telephone)
30
30
  .add(list.MOBILE_PHONE, this.mobile);
31
31
  if (this.method === HomeOfficeClaimMethodEnum.OCCUPANCY) {
32
- claims.add(BusinessChartAccountsEnum.HOME_OFFICE_RENT, this.officePercent);
33
- claims.add(BusinessChartAccountsEnum.HOME_OFFICE_LOAN, this.officePercent);
34
- claims.add(BusinessChartAccountsEnum.HOME_OFFICE_RATES, this.officePercent);
35
- claims.add(BusinessChartAccountsEnum.HOME_OFFICE_OTHER, this.officePercent);
32
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_RENT, this.occupancyPercent);
33
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_LOAN, this.occupancyPercent);
34
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_RATES, this.occupancyPercent);
35
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_OTHER, this.occupancyPercent);
36
36
  }
37
37
  return claims;
38
38
  }
@@ -43,4 +43,4 @@ __decorate([
43
43
  __decorate([
44
44
  Type(() => SoleBusiness)
45
45
  ], HomeOfficeClaim.prototype, "business", void 0);
46
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtY2xhaW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvbW9kZWxzL2hvbWUtb2ZmaWNlL2hvbWUtb2ZmaWNlLWNsYWltLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUseUJBQXlCLEVBQUUscUJBQXFCLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM3RyxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQy9CLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFDdkMsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGlCQUFpQixDQU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J5KFtdKTtcbiAgICBjb25zdCBsaXN0ID0gdGhpcy5nZXRDaGFydEFjY291bnRzTGlzdCgpO1xuICAgIGNsYWltcy5hZGQobGlzdC5FTEVDVFJJQ0lUWV9BTkRfR0FTLCB0aGlzLmVsZWN0cmljaXR5QW5kR2FzKVxuICAgICAgLmFkZChsaXN0LkhPTUVfT0ZGSUNFX0NMRUFOSU5HLCB0aGlzLmNsZWFuaW5nKVxuICAgICAgLmFkZChsaXN0LklOVEVSTkVULCB0aGlzLmludGVybmV0KVxuICAgICAgLmFkZChsaXN0LlRFTEVQSE9ORSwgdGhpcy50ZWxlcGhvbmUpXG4gICAgICAuYWRkKGxpc3QuTU9CSUxFX1BIT05FLCB0aGlzLm1vYmlsZSk7XG5cbiAgICBpZiAodGhpcy5tZXRob2QgPT09IEhvbWVPZmZpY2VDbGFpbU1ldGhvZEVudW0uT0NDVVBBTkNZKSB7XG4gICAgICBjbGFpbXMuYWRkKEJ1c2luZXNzQ2hhcnRBY2NvdW50c0VudW0uSE9NRV9PRkZJQ0VfUkVOVCwgdGhpcy5vY2N1cGFuY3lQZXJjZW50KTtcbiAgICAgIGNsYWltcy5hZGQoQnVzaW5lc3NDaGFydEFjY291bnRzRW51bS5IT01FX09GRklDRV9MT0FOLCB0aGlzLm9jY3VwYW5jeVBlcmNlbnQpO1xuICAgICAgY2xhaW1zLmFkZChCdXNpbmVzc0NoYXJ0QWNjb3VudHNFbnVtLkhPTUVfT0ZGSUNFX1JBVEVTLCB0aGlzLm9jY3VwYW5jeVBlcmNlbnQpO1xuICAgICAgY2xhaW1zLmFkZChCdXNpbmVzc0NoYXJ0QWNjb3VudHNFbnVtLkhPTUVfT0ZGSUNFX09USEVSLCB0aGlzLm9jY3VwYW5jeVBlcmNlbnQpO1xuICAgIH1cblxuICAgIHJldHVybiBjbGFpbXM7XG4gIH1cbn1cbiJdfQ==
@@ -1,9 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { HomeOfficeClaim } from './home-office-claim';
3
3
  import { SoleBusiness } from '../sole';
4
- import { AbstractModel } from '../../db/Models';
4
+ import { ObservableModel } from '../../db/Models';
5
5
  import { Type } from 'class-transformer';
6
- export class HomeOfficeLog extends AbstractModel {
6
+ export class HomeOfficeLog extends ObservableModel {
7
+ static { this.className = 'HomeOfficeLog'; }
7
8
  }
8
9
  __decorate([
9
10
  Type(() => HomeOfficeClaim)
@@ -11,4 +12,4 @@ __decorate([
11
12
  __decorate([
12
13
  Type(() => SoleBusiness)
13
14
  ], HomeOfficeLog.prototype, "business", void 0);
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtbG9nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL21vZGVscy9ob21lLW9mZmljZS9ob21lLW9mZmljZS1sb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUN0RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ3ZDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUVoRCxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFekMsTUFBTSxPQUFPLGFBQWMsU0FBUSxhQUFhO0NBUS9DO0FBTkM7SUFEQyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMsZUFBZSxDQUFDOzRDQUNMO0FBS3ZCO0lBREMsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDLFlBQVksQ0FBQzsrQ0FDRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEhvbWVPZmZpY2VDbGFpbSB9IGZyb20gJy4vaG9tZS1vZmZpY2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PzogU29sZUJ1c2luZXNzO1xufVxuIl19
@@ -1,13 +1,13 @@
1
1
  import { Injectable } from '@angular/core';
2
2
  import { RestService } from '../rest';
3
3
  import { Collection } from '../../../collections';
4
- import { HomeOfficeClaim } from '../../../models';
4
+ import { HomeOfficeLog } from '../../../models';
5
5
  import * as i0 from "@angular/core";
6
6
  export class HomeOfficeLogService extends RestService {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.endpointUri = 'home-office-logs';
10
- this.modelClass = HomeOfficeClaim;
10
+ this.modelClass = HomeOfficeLog;
11
11
  this.collectionClass = (Collection);
12
12
  this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
13
13
  }
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
20
20
  providedIn: 'root'
21
21
  }]
22
22
  }] });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaHR0cC9ob21lLW9mZmljZS9ob21lLW9mZmljZS1sb2cuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxXQUFXLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFDbEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sRUFDTCxlQUFlLEVBR2hCLE1BQU0saUJBQWlCLENBQUM7O0FBS3pCLE1BQU0sT0FBTyxvQkFBcUIsU0FBUSxXQUE2RTtJQUh2SDs7UUFJWSxnQkFBVyxHQUFHLG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VQLG9CQUFvQjtrQkFIaEMsVUFBVTttQkFBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBSZXN0TWV0aG9kLCBSZXN0U2VydmljZSB9IGZyb20gJy4uL3Jlc3QnO1xuaW1wb3J0IHsgQ29sbGVjdGlvbiB9IGZyb20gJy4uLy4uLy4uL2NvbGxlY3Rpb25zJztcbmltcG9ydCB7XG4gIEhvbWVPZmZpY2VMb2csXG4gIEhvbWVPZmZpY2VMb2dJbnRlcmZhY2Vcbn0gZnJvbSAnLi4vLi4vLi4vbW9kZWxzJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgSG9tZU9mZmljZUxvZ1NlcnZpY2UgZXh0ZW5kcyBSZXN0U2VydmljZTxIb21lT2ZmaWNlTG9nSW50ZXJmYWNlLCBIb21lT2ZmaWNlTG9nLCBDb2xsZWN0aW9uPEhvbWVPZmZpY2VMb2c+PiB7XG4gIHByb3RlY3RlZCBlbmRwb2ludFVyaSA9ICdob21lLW9mZmljZS1sb2dzJztcbiAgbW9kZWxDbGFzczogdHlwZW9mIEhvbWVPZmZpY2VMb2cgPSBIb21lT2ZmaWNlTG9nO1xuICBjb2xsZWN0aW9uQ2xhc3M6IHR5cGVvZiBDb2xsZWN0aW9uPEhvbWVPZmZpY2VMb2c+ID0gQ29sbGVjdGlvbjxIb21lT2ZmaWNlTG9nPjtcbiAgZGlzYWJsZWRNZXRob2RzOiBSZXN0TWV0aG9kW10gPSBbJ3Bvc3RCYXRjaCcsICdwdXRCYXRjaCcsICdkZWxldGVCYXRjaCddO1xufVxuIl19
@@ -3,7 +3,7 @@ import { map } from 'rxjs/operators';
3
3
  import { replace } from '../../../functions/array';
4
4
  import { TransactionOperationEnum } from '../../../db/Enums/transaction-operation.enum';
5
5
  import { RestService } from '../rest/rest-old.service';
6
- import { AppEvent, AppEventTypeEnum, Depreciation, HomeOfficeClaim, PropertyShare, Transaction, VehicleClaim } from '../../../models';
6
+ import { AppEvent, AppEventTypeEnum, Depreciation, HomeOfficeClaim, HomeOfficeLog, PropertyShare, Transaction, VehicleClaim } from '../../../models';
7
7
  import _ from 'lodash';
8
8
  import { classToPlain } from 'class-transformer';
9
9
  import { UserEventTypeTypeEnum } from '../../../db/Enums/user-event-type-type.enum';
@@ -34,6 +34,7 @@ export class TransactionService extends RestService {
34
34
  this.listenDepreciationChange();
35
35
  this.listenVehicleClaimChanges();
36
36
  this.listenHomeOfficeClaim();
37
+ this.listenHomeOfficeLog();
37
38
  this.listenPropertyForecastUpdate();
38
39
  this.listenNotifications();
39
40
  }
@@ -223,6 +224,11 @@ export class TransactionService extends RestService {
223
224
  this.refreshCache();
224
225
  });
225
226
  }
227
+ listenHomeOfficeLog() {
228
+ this.eventDispatcherService.on2(...HomeOfficeLog.getEventNames('post', 'put', 'delete')).subscribe(() => {
229
+ this.refreshCache();
230
+ });
231
+ }
226
232
  /**
227
233
  * property forecast includes claimPercent which affects property related expenses
228
234
  * @TODO Alex move to forecast api instead of property
@@ -263,4 +269,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
263
269
  type: Inject,
264
270
  args: ['environment']
265
271
  }] }] });
266
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3RyYW5zYWN0aW9uL3RyYW5zYWN0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0F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