taxtank-core 0.33.55 → 0.33.57

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,11 +7,11 @@ export class AbstractModel {
7
7
  hasValue(value, path = 'id') {
8
8
  return get(path) === value;
9
9
  }
10
- formatDate(date, format = 'MMM d, y') {
10
+ formatDate(date, format = 'dd/MM/YYYY') {
11
11
  return formatDate(date, format, 'en-AU');
12
12
  }
13
13
  get(path) {
14
14
  return get(path);
15
15
  }
16
16
  }
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QtbW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvTW9kZWxzL2Fic3RyYWN0LW1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sR0FBRyxNQUFNLFlBQVksQ0FBQztBQUM3QixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFN0M7O0dBRUc7QUFDSCxNQUFNLE9BQWdCLGFBQWE7SUFHakMsUUFBUSxDQUFDLEtBQVUsRUFBRSxJQUFJLEdBQUcsSUFBSTtRQUM5QixPQUFPLEdBQUcsQ0FBQyxJQUFJLENBQUMsS0FBSyxLQUFLLENBQUM7SUFDN0IsQ0FBQztJQUVELFVBQVUsQ0FBQyxJQUFVLEVBQUUsTUFBTSxHQUFHLFVBQVU7UUFDeEMsT0FBTyxVQUFVLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxPQUFPLENBQUMsQ0FBQztJQUMzQyxDQUFDO0lBRUQsR0FBRyxDQUFDLElBQVk7UUFDZCxPQUFPLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNuQixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgZ2V0IGZyb20gJ2xvZGFzaC9n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MsS0FBSyxLQUFLLENBQUM7SUFDN0IsQ0FBQztJQUVELFVBQVUsQ0FBQyxJQUFVLEVBQUUsTUFBTSxHQUFHLFlBQVk7UUFDMUMsT0FBTyxVQUFVLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxPQUFPLENBQUMsQ0FBQztJQUMzQyxDQUFDO0lBRUQsR0FBRyxDQUFDLElBQVk7UUFDZCxPQUFPLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNuQixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgZ2V0IGZyb20gJ2xvZGFzaC9nZXQnO1xuaW1wb3J0IHsgZm9ybWF0RGF0ZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5cbi8qKlxuICogQFRPRE8gbW92ZSBmcm9tIGRiIGZvbGRlciB3aGVuIHJlZmFjdG9yZWQgYmFzZSBtb2RlbHNcbiAqL1xuZXhwb3J0IGFic3RyYWN0IGNsYXNzIEFic3RyYWN0TW9kZWwge1xuICBpZD86IGFueTtcblxuICBoYXNWYWx1ZSh2YWx1ZTogYW55LCBwYXRoID0gJ2lkJyk6IGJvb2xlYW4ge1xuICAgIHJldHVybiBnZXQocGF0aCkgPT09IHZhbHVlO1xuICB9XG5cbiAgZm9ybWF0RGF0ZShkYXRlOiBEYXRlLCBmb3JtYXQgPSAnZGQvTU0vWVlZWScpOiBzdHJpbmcge1xuICAgIHJldHVybiBmb3JtYXREYXRlKGRhdGUsIGZvcm1hdCwgJ2VuLUFVJyk7XG4gIH1cblxuICBnZXQocGF0aDogc3RyaW5nKTogYW55IHtcbiAgICByZXR1cm4gZ2V0KHBhdGgpO1xuICB9XG59XG4iXX0=
@@ -19,11 +19,14 @@ export class HomeOfficeCalculatorForm extends AbstractForm {
19
19
  });
20
20
  }
21
21
  submit() {
22
- let occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
23
- if (!this.value.dedicatedOffice) {
24
- occupancyPercent *= this.value.workUsage / 100;
22
+ let occupancyPercent = 0;
23
+ if (this.value.officeArea && this.value.homeArea) {
24
+ occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
25
+ if (!this.value.dedicatedOffice) {
26
+ occupancyPercent *= this.value.workUsage / 100;
27
+ }
25
28
  }
26
29
  return super.submit({ occupancyPercent: round(occupancyPercent, 2) });
27
30
  }
28
31
  }
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtY2FsY3VsYXRvci5mb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Zvcm1zL2hvbWUtb2ZmaWNlL2hvbWUtb2ZmaWNlLWNhbGN1bGF0b3IuZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUMvQyxPQUFPLEtBQUssTUFBTSxjQUFjLENBQUM7QUFHakMsTUFBTSxPQUFPLHdCQUF5QixTQUFRLFlBQTZCO0lBQ3pFLFlBQVksS0FBSyxHQUFHLFlBQVksQ0FBQyxlQUFlLEVBQUUsRUFBRSxDQUFDO1FBQ25ELEtBQUssQ0FBQztZQUNKLFFBQVEsRUFBRSxJQUFJLFdBQVcsQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFLENBQUMsVUFBVSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQ2hFLFVBQVUsRUFBRSxJQU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dWVDaGFuZ2VzLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICB0aGlzLnRvZ2dsZUVuYWJsZWRTdGF0ZSh0aGlzLmdldCgnd29ya1VzYWdlJykpO1xuICAgIH0pO1xuICB9XG5cbiAgc3VibWl0KCk6IEhvbWVPZmZpY2VDbGFpbSB7XG4gICAgbGV0IG9jY3VwYW5jeVBlcmNlbnQgPSAwXG4gICAgaWYgKHRoaXMudmFsdWUub2ZmaWNlQXJlYSAmJiB0aGlzLnZhbHVlLmhvbWVBcmVhKSB7XG4gICAgICBvY2N1cGFuY3lQZXJjZW50ID0gdGhpcy52YWx1ZS5vZmZpY2VBcmVhICogMTAwIC8gdGhpcy52YWx1ZS5ob21lQXJlYTtcbiAgICAgIGlmICghdGhpcy52YWx1ZS5kZWRpY2F0ZWRPZmZpY2UpIHtcbiAgICAgICAgb2NjdXBhbmN5UGVyY2VudCAqPSB0aGlzLnZhbHVlLndvcmtVc2FnZSAvIDEwMDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gc3VwZXIuc3VibWl0KHsgb2NjdXBhbmN5UGVyY2VudDogcm91bmQob2NjdXBhbmN5UGVyY2VudCwgMikgfSk7XG4gIH1cbn1cbiJdfQ==
@@ -5,6 +5,9 @@ import { ObservableModel } from '../../db/Models';
5
5
  import { Type } from 'class-transformer';
6
6
  export class HomeOfficeLog extends ObservableModel {
7
7
  static { this.className = 'HomeOfficeLog'; }
8
+ get formattedDate() {
9
+ return this.formatDate(this.date);
10
+ }
8
11
  }
9
12
  __decorate([
10
13
  Type(() => HomeOfficeClaim)
@@ -12,4 +15,4 @@ __decorate([
12
15
  __decorate([
13
16
  Type(() => SoleBusiness)
14
17
  ], HomeOfficeLog.prototype, "business", void 0);
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtbG9nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4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TDtBQUt2QjtJQURDLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQyxZQUFZLENBQUM7K0NBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIb21lT2ZmaWNlQ2xhaW0gfSBmcm9tICcuL2hvbWUtb2ZmaWNlLWNsYWltJztcbmltcG9ydCB7IFNvbGVCdXNpbmVzcyB9IGZyb20gJy4uL3NvbGUnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZU1vZGVsIH0gZnJvbSAnLi4vLi4vZGIvTW9kZWxzJztcbmltcG9ydCB7IEhvbWVPZmZpY2VMb2dJbnRlcmZhY2UgfSBmcm9tICcuL2hvbWUtb2ZmaWNlLWxvZy5pbnRlcmZhY2UnO1xuaW1wb3J0IHsgVHlwZSB9IGZyb20gJ2NsYXNzLXRyYW5zZm9ybWVyJztcblxuZXhwb3J0IGNsYXNzIEhvbWVPZmZpY2VMb2cgZXh0ZW5kcyBPYnNlcnZhYmxlTW9kZWwgaW1wbGVtZW50cyBIb21lT2ZmaWNlTG9nSW50ZXJmYWNlIHtcbiAgc3RhdGljIGNsYXNzTmFtZSA9ICdIb21lT2ZmaWNlTG9nJztcbiAgQFR5cGUoKCkgPT4gSG9tZU9mZmljZUNsYWltKVxuICBjbGFpbTogSG9tZU9mZmljZUNsYWltO1xuICBkYXRlOiBEYXRlO1xuICBob3VyczogbnVtYmVyO1xuICBkZXNjcmlwdGlvbjogc3RyaW5nO1xuICBAVHlwZSgoKSA9PiBTb2xlQnVzaW5lc3MpXG4gIGJ1c2luZXNzPzogU29sZUJ1c2luZXNzO1xuXG4gIGdldCBmb3JtYXR0ZWREYXRlKCk6IHN0cmluZyB7XG4gICAgcmV0dXJuIHRoaXMuZm9ybWF0RGF0ZSh0aGlzLmRhdGUpO1xuICB9XG59XG4iXX0=
@@ -48,7 +48,7 @@ class AbstractModel {
48
48
  hasValue(value, path = 'id') {
49
49
  return get(path) === value;
50
50
  }
51
- formatDate(date, format = 'MMM d, y') {
51
+ formatDate(date, format = 'dd/MM/YYYY') {
52
52
  return formatDate(date, format, 'en-AU');
53
53
  }
54
54
  get(path) {
@@ -10763,6 +10763,9 @@ __decorate([
10763
10763
 
10764
10764
  class HomeOfficeLog extends ObservableModel {
10765
10765
  static { this.className = 'HomeOfficeLog'; }
10766
+ get formattedDate() {
10767
+ return this.formatDate(this.date);
10768
+ }
10766
10769
  }
10767
10770
  __decorate([
10768
10771
  Type(() => HomeOfficeClaim)
@@ -24665,9 +24668,12 @@ class HomeOfficeCalculatorForm extends AbstractForm {
24665
24668
  });
24666
24669
  }
24667
24670
  submit() {
24668
- let occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
24669
- if (!this.value.dedicatedOffice) {
24670
- occupancyPercent *= this.value.workUsage / 100;
24671
+ let occupancyPercent = 0;
24672
+ if (this.value.officeArea && this.value.homeArea) {
24673
+ occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
24674
+ if (!this.value.dedicatedOffice) {
24675
+ occupancyPercent *= this.value.workUsage / 100;
24676
+ }
24671
24677
  }
24672
24678
  return super.submit({ occupancyPercent: round(occupancyPercent, 2) });
24673
24679
  }