taxtank-core 0.33.55 → 0.33.56
Sign up to get free protection for your applications and to get access to all the features.
@@ -19,11 +19,14 @@ export class HomeOfficeCalculatorForm extends AbstractForm {
|
|
19
19
|
});
|
20
20
|
}
|
21
21
|
submit() {
|
22
|
-
let occupancyPercent =
|
23
|
-
if (
|
24
|
-
occupancyPercent
|
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,
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtY2FsY3VsYXRvci5mb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Zvcm1zL2hvbWUtb2ZmaWNlL2hvbWUtb2ZmaWNlLWNhbGN1bGF0b3IuZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUMvQyxPQUFPLEtBQUssTUFBTSxjQUFjLENBQUM7QUFHakMsTUFBTSxPQUFPLHdCQUF5QixTQUFRLFlBQ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AgICAgIGlmICghdGhpcy52YWx1ZS5kZWRpY2F0ZWRPZmZpY2UpIHtcbiAgICAgICAgb2NjdXBhbmN5UGVyY2VudCAqPSB0aGlzLnZhbHVlLndvcmtVc2FnZSAvIDEwMDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gc3VwZXIuc3VibWl0KHsgb2NjdXBhbmN5UGVyY2VudDogcm91bmQob2NjdXBhbmN5UGVyY2VudCwgMikgfSk7XG4gIH1cbn1cbiJdfQ==
|
@@ -24665,9 +24665,12 @@ class HomeOfficeCalculatorForm extends AbstractForm {
|
|
24665
24665
|
});
|
24666
24666
|
}
|
24667
24667
|
submit() {
|
24668
|
-
let occupancyPercent =
|
24669
|
-
if (
|
24670
|
-
occupancyPercent
|
24668
|
+
let occupancyPercent = 0;
|
24669
|
+
if (this.value.officeArea && this.value.homeArea) {
|
24670
|
+
occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
|
24671
|
+
if (!this.value.dedicatedOffice) {
|
24672
|
+
occupancyPercent *= this.value.workUsage / 100;
|
24673
|
+
}
|
24671
24674
|
}
|
24672
24675
|
return super.submit({ occupancyPercent: round(occupancyPercent, 2) });
|
24673
24676
|
}
|