taxtank-core 0.31.59 → 0.31.61
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.
- package/esm2020/lib/collections/vehicle/best-vehicle-logbook.collection.mjs +92 -0
- package/esm2020/lib/collections/vehicle/index.mjs +2 -1
- package/esm2020/lib/collections/vehicle/vehicle-logbook.collection.mjs +15 -58
- package/esm2020/lib/models/vehicle/index.mjs +1 -2
- package/esm2020/lib/models/vehicle/vehicle-logbook.mjs +1 -28
- package/esm2020/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.mjs +4 -9
- package/esm2020/lib/services/http/transaction/transaction.service.mjs +1 -1
- package/esm2020/lib/services/http/vehicle/vehicle-claim-details.service.mjs +1 -18
- package/esm2020/lib/services/http/vehicle/vehicle-claim.service.mjs +3 -19
- package/esm2020/lib/services/index.mjs +1 -2
- package/esm2020/lib/validators/current-fin-year.validator.mjs +2 -2
- package/fesm2015/taxtank-core.mjs +131 -219
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +131 -219
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/vehicle/best-vehicle-logbook.collection.d.ts +49 -0
- package/lib/collections/vehicle/index.d.ts +1 -0
- package/lib/collections/vehicle/vehicle-logbook.collection.d.ts +7 -13
- package/lib/models/vehicle/index.d.ts +0 -1
- package/lib/models/vehicle/vehicle-logbook.d.ts +0 -17
- package/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.d.ts +3 -5
- package/lib/services/http/vehicle/vehicle-claim-details.service.d.ts +1 -8
- package/lib/services/http/vehicle/vehicle-claim.service.d.ts +0 -5
- package/lib/services/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2020/lib/models/vehicle/logbook-period.mjs +0 -25
- package/esm2020/lib/services/vehicle/index.mjs +0 -2
- package/esm2020/lib/services/vehicle/logbook-best-period.service.mjs +0 -71
- package/lib/models/vehicle/logbook-period.d.ts +0 -16
- package/lib/services/vehicle/index.d.ts +0 -1
- package/lib/services/vehicle/logbook-best-period.service.d.ts +0 -28
|
@@ -4,7 +4,7 @@ import * as i1$1 from '@angular/common';
|
|
|
4
4
|
import { formatDate, CommonModule, CurrencyPipe, DatePipe } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpParams, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
7
|
-
import { map, mergeMap, filter, first as first$1, catchError,
|
|
7
|
+
import { map, mergeMap, filter, first as first$1, catchError, take, switchMap, finalize, debounceTime, distinctUntilChanged, delay } from 'rxjs/operators';
|
|
8
8
|
import { ReplaySubject, Subject, Observable, throwError, combineLatest, BehaviorSubject, forkJoin, of, from, merge as merge$1 } from 'rxjs';
|
|
9
9
|
import { plainToClass, Type, Transform, Exclude, Expose, classToPlain } from 'class-transformer';
|
|
10
10
|
import get from 'lodash/get';
|
|
@@ -37,9 +37,9 @@ import _ from 'lodash';
|
|
|
37
37
|
import { jsPDF } from 'jspdf';
|
|
38
38
|
import { applyPlugin } from 'jspdf-autotable';
|
|
39
39
|
import html2pdf from 'html2pdf.js';
|
|
40
|
-
import isEqual from 'lodash/isEqual';
|
|
41
40
|
import * as xlsx from 'xlsx';
|
|
42
41
|
import * as FileSaver from 'file-saver';
|
|
42
|
+
import isEqual from 'lodash/isEqual';
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* https://api-uat.corelogic.asia/property/au/v2/suggest.json
|
|
@@ -4925,27 +4925,6 @@ __decorate([
|
|
|
4925
4925
|
Type(() => BankAccount)
|
|
4926
4926
|
], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
|
|
4927
4927
|
|
|
4928
|
-
/**
|
|
4929
|
-
* Class contains traveled kilometers and work usage percent in 12 weeks date range
|
|
4930
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
4931
|
-
* @TODO Alex: check if we need this class when calculation refactored with backend
|
|
4932
|
-
*/
|
|
4933
|
-
class LogbookPeriod {
|
|
4934
|
-
isEndOfYear() {
|
|
4935
|
-
return this.to === new FinancialYear().endDate;
|
|
4936
|
-
}
|
|
4937
|
-
getWorkUsageByClaim(claim) {
|
|
4938
|
-
const claimKilometers = this.logbooks.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
|
|
4939
|
-
return round(this.workUsage * (claimKilometers / this.kilometers), 2);
|
|
4940
|
-
}
|
|
4941
|
-
}
|
|
4942
|
-
__decorate([
|
|
4943
|
-
Type(() => Date)
|
|
4944
|
-
], LogbookPeriod.prototype, "from", void 0);
|
|
4945
|
-
__decorate([
|
|
4946
|
-
Type(() => Date)
|
|
4947
|
-
], LogbookPeriod.prototype, "to", void 0);
|
|
4948
|
-
|
|
4949
4928
|
class VehicleLogbook extends VehicleLogbook$1 {
|
|
4950
4929
|
get kilometers() {
|
|
4951
4930
|
return this.odometerEnd - this.odometerStart;
|
|
@@ -4959,23 +4938,7 @@ class VehicleLogbook extends VehicleLogbook$1 {
|
|
|
4959
4938
|
isSoleTank() {
|
|
4960
4939
|
return !!this.business;
|
|
4961
4940
|
}
|
|
4962
|
-
/**
|
|
4963
|
-
* Get logbook period date range from logbook date and weeksInPeriod duration
|
|
4964
|
-
*/
|
|
4965
|
-
getPeriod() {
|
|
4966
|
-
/**
|
|
4967
|
-
* Hack: The library is using not by documentation, but works
|
|
4968
|
-
* moment-range is broken since we updated Typescript to v4 (https://github.com/rotaready/moment-range/issues/238)
|
|
4969
|
-
* extendMoment(Moment) cause error and broke the app
|
|
4970
|
-
*/
|
|
4971
|
-
return new DateRange([this.date, new Date(this.date.getTime() + VehicleLogbook.bestPeriodDuration)]);
|
|
4972
|
-
}
|
|
4973
4941
|
}
|
|
4974
|
-
/**
|
|
4975
|
-
* Logbook period duration in milliseconds.
|
|
4976
|
-
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
4977
|
-
*/
|
|
4978
|
-
VehicleLogbook.bestPeriodDuration = 12 * 7 * 24 * 3600 * 1000;
|
|
4979
4942
|
__decorate([
|
|
4980
4943
|
Type(() => Date)
|
|
4981
4944
|
], VehicleLogbook.prototype, "date", void 0);
|
|
@@ -8528,40 +8491,7 @@ class ReportItemCollection extends Collection {
|
|
|
8528
8491
|
}
|
|
8529
8492
|
}
|
|
8530
8493
|
|
|
8531
|
-
class VehicleClaimCollection extends Collection {
|
|
8532
|
-
/**
|
|
8533
|
-
* Get remaining kilometers limit. Total limit ({@link VehicleClaim.totalKmsLimit}) - claimed kilometers from other vehicle claims
|
|
8534
|
-
*/
|
|
8535
|
-
getKmsLimitForClaim(claim) {
|
|
8536
|
-
let collection = this;
|
|
8537
|
-
if (claim) {
|
|
8538
|
-
collection = collection.removeBy('id', claim.id);
|
|
8539
|
-
}
|
|
8540
|
-
return VehicleClaim.totalKmsLimit - collection.sumBy('kilometers');
|
|
8541
|
-
}
|
|
8542
|
-
/**
|
|
8543
|
-
* Get remaining work usage limit. Total limit ({@link VehicleClaim.totalWorkUsagePercent}) - claimed percent from other vehicle claims
|
|
8544
|
-
*/
|
|
8545
|
-
getWorkUsageLimitForClaim(claim) {
|
|
8546
|
-
let collection = this;
|
|
8547
|
-
if (claim) {
|
|
8548
|
-
collection = collection.removeBy('id', claim.id);
|
|
8549
|
-
}
|
|
8550
|
-
return VehicleClaim.totalWorkUsagePercent - collection.sumBy('workUsage');
|
|
8551
|
-
}
|
|
8552
|
-
}
|
|
8553
|
-
|
|
8554
8494
|
class VehicleLogbookCollection extends Collection {
|
|
8555
|
-
/**
|
|
8556
|
-
* Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
|
|
8557
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
8558
|
-
*/
|
|
8559
|
-
isBestPeriodExist() {
|
|
8560
|
-
if (this.items.length < 2) {
|
|
8561
|
-
return false;
|
|
8562
|
-
}
|
|
8563
|
-
return VehicleLogbook.bestPeriodDuration < (this.last.date.getTime() - this.first.date.getTime());
|
|
8564
|
-
}
|
|
8565
8495
|
/**
|
|
8566
8496
|
* Get collection of non-personal logbooks (work-related, sole-related).
|
|
8567
8497
|
* @TODO Vik: Best period: move this and related logic to backend
|
|
@@ -8569,49 +8499,6 @@ class VehicleLogbookCollection extends Collection {
|
|
|
8569
8499
|
getClaimableLogbooks() {
|
|
8570
8500
|
return this.filterBy('isPersonal', false);
|
|
8571
8501
|
}
|
|
8572
|
-
/**
|
|
8573
|
-
* Get Logbook Period with the biggest work usage percent
|
|
8574
|
-
* Best period duration is defined as VehicleLogbook.bestPeriodWeeks by the ATO
|
|
8575
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
8576
|
-
*/
|
|
8577
|
-
getBestPeriod() {
|
|
8578
|
-
if (!this.isBestPeriodExist()) {
|
|
8579
|
-
return null;
|
|
8580
|
-
}
|
|
8581
|
-
let bestPeriod;
|
|
8582
|
-
// get list of all logbooks available for best period calculation
|
|
8583
|
-
const claimableLogbooks = this.getClaimableLogbooks().toArray();
|
|
8584
|
-
for (let i = 0; i < claimableLogbooks.length; i++) {
|
|
8585
|
-
// no sense to check next logbooks because we already get the end of the year
|
|
8586
|
-
if (bestPeriod && bestPeriod.isEndOfYear()) {
|
|
8587
|
-
break;
|
|
8588
|
-
}
|
|
8589
|
-
// get date range started from current handling logbook date
|
|
8590
|
-
const dateRange = claimableLogbooks[i].getPeriod();
|
|
8591
|
-
// get all logbooks included in current logbook period
|
|
8592
|
-
const logbooksInRange = this.filterByRange('date', dateRange.start, dateRange.end);
|
|
8593
|
-
const currentPeriod = plainToClass(LogbookPeriod, {
|
|
8594
|
-
from: dateRange.start,
|
|
8595
|
-
to: dateRange.end,
|
|
8596
|
-
kilometers: logbooksInRange.getClaimableLogbooks().kilometers,
|
|
8597
|
-
workUsage: logbooksInRange.getWorkUsage(),
|
|
8598
|
-
logbooks: logbooksInRange
|
|
8599
|
-
});
|
|
8600
|
-
// compare with previous best period and overwrite if needs
|
|
8601
|
-
if (!bestPeriod || currentPeriod.workUsage > bestPeriod.workUsage) {
|
|
8602
|
-
bestPeriod = currentPeriod;
|
|
8603
|
-
}
|
|
8604
|
-
else if (currentPeriod.workUsage === bestPeriod.workUsage) {
|
|
8605
|
-
// if work usage is the same then get period with the biggest work usage for work tank
|
|
8606
|
-
const oldWorkUsage = bestPeriod.logbooks.filterBy('tankType', TankTypeEnum.WORK).getWorkUsage();
|
|
8607
|
-
const currentWorkUsage = currentPeriod.logbooks.filterBy('tankType', TankTypeEnum.WORK).getWorkUsage();
|
|
8608
|
-
if (oldWorkUsage < currentWorkUsage) {
|
|
8609
|
-
bestPeriod = currentPeriod;
|
|
8610
|
-
}
|
|
8611
|
-
}
|
|
8612
|
-
}
|
|
8613
|
-
return bestPeriod;
|
|
8614
|
-
}
|
|
8615
8502
|
/**
|
|
8616
8503
|
* Calculate total kilometers traveled
|
|
8617
8504
|
*/
|
|
@@ -8622,8 +8509,13 @@ class VehicleLogbookCollection extends Collection {
|
|
|
8622
8509
|
* Calculate work usage (percent of business-related kilometers from total kilometers)
|
|
8623
8510
|
* @TODO Alex: TT-2089 replace with getter
|
|
8624
8511
|
*/
|
|
8625
|
-
|
|
8626
|
-
|
|
8512
|
+
get workUsage() {
|
|
8513
|
+
if (!this.length) {
|
|
8514
|
+
return 0;
|
|
8515
|
+
}
|
|
8516
|
+
const workKilometers = this.items
|
|
8517
|
+
.filter((logbook) => !logbook.isPersonal)
|
|
8518
|
+
.reduce((sum, logbook) => sum + logbook.kilometers, 0);
|
|
8627
8519
|
return round(workKilometers / this.kilometers * 100, 2);
|
|
8628
8520
|
}
|
|
8629
8521
|
/**
|
|
@@ -8636,6 +8528,123 @@ class VehicleLogbookCollection extends Collection {
|
|
|
8636
8528
|
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
8637
8529
|
: this.filterBy('tankType', TankTypeEnum.WORK);
|
|
8638
8530
|
}
|
|
8531
|
+
/**
|
|
8532
|
+
* get collection of logbooks with the biggest work usage for {@link BestVehicleLogbookCollection.periodDuration}
|
|
8533
|
+
*/
|
|
8534
|
+
getBest() {
|
|
8535
|
+
return BestVehicleLogbookCollection.fromLogbooks(this);
|
|
8536
|
+
}
|
|
8537
|
+
}
|
|
8538
|
+
|
|
8539
|
+
/**
|
|
8540
|
+
* Special logbook collection that contains logbooks from date period with the highest work usage percent
|
|
8541
|
+
* Docs: https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
8542
|
+
*/
|
|
8543
|
+
class BestVehicleLogbookCollection extends VehicleLogbookCollection {
|
|
8544
|
+
/**
|
|
8545
|
+
* constructor is private because we want to prevent collection initialization via 'new' operator.
|
|
8546
|
+
* We should create instances only with fromLogbooks method
|
|
8547
|
+
*/
|
|
8548
|
+
constructor(logbooks) {
|
|
8549
|
+
super([]);
|
|
8550
|
+
if (!this.isBestPeriodExist(logbooks)) {
|
|
8551
|
+
return;
|
|
8552
|
+
}
|
|
8553
|
+
this.calculateBestPeriod(logbooks);
|
|
8554
|
+
}
|
|
8555
|
+
/**
|
|
8556
|
+
* Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
|
|
8557
|
+
*/
|
|
8558
|
+
isBestPeriodExist(logbooks = this) {
|
|
8559
|
+
if (logbooks.length < 2) {
|
|
8560
|
+
return false;
|
|
8561
|
+
}
|
|
8562
|
+
return BestVehicleLogbookCollection.periodDuration < (logbooks.last.date.getTime() - logbooks.first.date.getTime());
|
|
8563
|
+
}
|
|
8564
|
+
getWorkUsageByClaim(claim) {
|
|
8565
|
+
const claimKilometers = this.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
|
|
8566
|
+
return round(this.workUsage * (claimKilometers / this.kilometers), 2);
|
|
8567
|
+
}
|
|
8568
|
+
/**
|
|
8569
|
+
* Set Date Range with the biggest work usage percent
|
|
8570
|
+
* Range duration is defined as BestVehicleLogbookCollection.periodDuration by the ATO
|
|
8571
|
+
*
|
|
8572
|
+
* Algorithm:
|
|
8573
|
+
* Claimable logbooks or claimable trips - work/business logbook items.
|
|
8574
|
+
* We should work with dates from the first to the last trip (include personal trips).
|
|
8575
|
+
* Get date ranges starts on each claimable trip, all other ranges are definetily worst.
|
|
8576
|
+
* Also get extra date range which ends with the last claimable trip.
|
|
8577
|
+
* Get all trips included to each date range.
|
|
8578
|
+
* Find and return range with the biggest workUsage percent.
|
|
8579
|
+
*/
|
|
8580
|
+
calculateBestPeriod(logbooks) {
|
|
8581
|
+
// get a list of date ranges that could potentially be the best
|
|
8582
|
+
const periods = this.getPeriods(logbooks.getClaimableLogbooks());
|
|
8583
|
+
periods.forEach((period) => {
|
|
8584
|
+
const logbooksInPeriod = logbooks.filterByRange('date', period.start.toDate(), period.end.toDate());
|
|
8585
|
+
if (!this.period || (this.workUsage < logbooksInPeriod.workUsage)) {
|
|
8586
|
+
this.period = period;
|
|
8587
|
+
this.items = logbooksInPeriod.toArray();
|
|
8588
|
+
}
|
|
8589
|
+
});
|
|
8590
|
+
}
|
|
8591
|
+
// get list of date ranges for each of passed logbook
|
|
8592
|
+
getPeriods(logbooks) {
|
|
8593
|
+
// get a list of date ranges that could potentially be the best
|
|
8594
|
+
const periods = logbooks
|
|
8595
|
+
// skip logbooks whose range ends after the last logbook
|
|
8596
|
+
.filter((logbook) => this.getPeriodByLogbook(logbook).end.toDate() < logbooks.last.date)
|
|
8597
|
+
.map((logbook) => this.getPeriodByLogbook(logbook));
|
|
8598
|
+
// skip if the last logbook already included to the last existing date range
|
|
8599
|
+
if (last(periods).end.toDate() < logbooks.last.date) {
|
|
8600
|
+
// add extra date range for the last claimable logbook
|
|
8601
|
+
periods.push(this.getPeriodByLogbook(logbooks.last, true));
|
|
8602
|
+
}
|
|
8603
|
+
return periods;
|
|
8604
|
+
}
|
|
8605
|
+
/**
|
|
8606
|
+
* Get claimable date range for passed logbook
|
|
8607
|
+
* @param logbook logbook instance for range calculation
|
|
8608
|
+
* @param isBackward Flag false - range for logbook + duration; flag true - range for logbook - duration. Used for extra case, when we should add an extra date range for the last logbook
|
|
8609
|
+
*/
|
|
8610
|
+
getPeriodByLogbook(logbook, isBackward = false) {
|
|
8611
|
+
if (isBackward) {
|
|
8612
|
+
return new DateRange([new Date(logbook.date.getTime() - BestVehicleLogbookCollection.periodDuration), logbook.date]);
|
|
8613
|
+
}
|
|
8614
|
+
return new DateRange([logbook.date, new Date(logbook.date.getTime() + BestVehicleLogbookCollection.periodDuration)]);
|
|
8615
|
+
}
|
|
8616
|
+
static fromLogbooks(logbooks) {
|
|
8617
|
+
const collection = new BestVehicleLogbookCollection(logbooks);
|
|
8618
|
+
return collection.isBestPeriodExist(logbooks) ? collection : null;
|
|
8619
|
+
}
|
|
8620
|
+
}
|
|
8621
|
+
/**
|
|
8622
|
+
* Logbook claimable period duration in milliseconds.
|
|
8623
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
8624
|
+
*/
|
|
8625
|
+
BestVehicleLogbookCollection.periodDuration = 12 * 7 * 24 * 3600 * 1000;
|
|
8626
|
+
|
|
8627
|
+
class VehicleClaimCollection extends Collection {
|
|
8628
|
+
/**
|
|
8629
|
+
* Get remaining kilometers limit. Total limit ({@link VehicleClaim.totalKmsLimit}) - claimed kilometers from other vehicle claims
|
|
8630
|
+
*/
|
|
8631
|
+
getKmsLimitForClaim(claim) {
|
|
8632
|
+
let collection = this;
|
|
8633
|
+
if (claim) {
|
|
8634
|
+
collection = collection.removeBy('id', claim.id);
|
|
8635
|
+
}
|
|
8636
|
+
return VehicleClaim.totalKmsLimit - collection.sumBy('kilometers');
|
|
8637
|
+
}
|
|
8638
|
+
/**
|
|
8639
|
+
* Get remaining work usage limit. Total limit ({@link VehicleClaim.totalWorkUsagePercent}) - claimed percent from other vehicle claims
|
|
8640
|
+
*/
|
|
8641
|
+
getWorkUsageLimitForClaim(claim) {
|
|
8642
|
+
let collection = this;
|
|
8643
|
+
if (claim) {
|
|
8644
|
+
collection = collection.removeBy('id', claim.id);
|
|
8645
|
+
}
|
|
8646
|
+
return VehicleClaim.totalWorkUsagePercent - collection.sumBy('workUsage');
|
|
8647
|
+
}
|
|
8639
8648
|
}
|
|
8640
8649
|
|
|
8641
8650
|
class AllocationGroupCollection extends Collection {
|
|
@@ -14810,16 +14819,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
14810
14819
|
}]
|
|
14811
14820
|
}] });
|
|
14812
14821
|
|
|
14813
|
-
// @TODO Don't look at the commented code. Will be refactored/removed during TT-1503
|
|
14814
14822
|
/**
|
|
14815
|
-
*
|
|
14816
|
-
* @TODO alex refactor
|
|
14823
|
+
* @TODO move to new rest
|
|
14817
14824
|
*/
|
|
14818
14825
|
class TransactionAllocationService extends RestService {
|
|
14819
14826
|
constructor() {
|
|
14820
14827
|
super(...arguments);
|
|
14821
14828
|
// API URL param for transaction allocations
|
|
14822
|
-
this.url = '
|
|
14829
|
+
this.url = 'transaction-allocations';
|
|
14823
14830
|
this.modelClass = TransactionAllocation;
|
|
14824
14831
|
}
|
|
14825
14832
|
/**
|
|
@@ -15228,7 +15235,6 @@ class VehicleClaimService extends RestService {
|
|
|
15228
15235
|
}
|
|
15229
15236
|
listenEvents() {
|
|
15230
15237
|
this.listenVehicleClaimDetailsChanges();
|
|
15231
|
-
this.listenBestPeriodChanges();
|
|
15232
15238
|
}
|
|
15233
15239
|
add(model) {
|
|
15234
15240
|
return super.add(model).pipe(map((vehicleClaim) => {
|
|
@@ -15252,26 +15258,11 @@ class VehicleClaimService extends RestService {
|
|
|
15252
15258
|
this.refreshCache();
|
|
15253
15259
|
});
|
|
15254
15260
|
}
|
|
15255
|
-
/**
|
|
15256
|
-
* Best period changes affect to claims workUsage
|
|
15257
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
15258
|
-
*/
|
|
15259
|
-
listenBestPeriodChanges() {
|
|
15260
|
-
this.eventDispatcherService.on(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED)
|
|
15261
|
-
.subscribe((bestPeriod) => {
|
|
15262
|
-
// no need to update claims when best period become null
|
|
15263
|
-
// (case when logbook removed and user don't have enough logbooks for claim period)
|
|
15264
|
-
if (!bestPeriod) {
|
|
15265
|
-
return;
|
|
15266
|
-
}
|
|
15267
|
-
this.updateWorkUsage(bestPeriod);
|
|
15268
|
-
});
|
|
15269
|
-
}
|
|
15270
15261
|
/**
|
|
15271
15262
|
* Update workUsage for all vehicle claims if logbook best period changed
|
|
15272
15263
|
* @TODO Vik: Best period move this and related logic to backend
|
|
15273
15264
|
*/
|
|
15274
|
-
updateWorkUsage(
|
|
15265
|
+
updateWorkUsage(bestLogbooks) {
|
|
15275
15266
|
// no need to update if cache not exist
|
|
15276
15267
|
if (!this.cache) {
|
|
15277
15268
|
return;
|
|
@@ -15279,7 +15270,7 @@ class VehicleClaimService extends RestService {
|
|
|
15279
15270
|
// @TODO Vik (TT-2210): need batch endpoint for this update
|
|
15280
15271
|
// @TODO Alex (TT-2210): fix frontend when endpoint ready
|
|
15281
15272
|
const batch$ = this.cache.map((claim) => {
|
|
15282
|
-
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage:
|
|
15273
|
+
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage: bestLogbooks.getWorkUsageByClaim(claim) }));
|
|
15283
15274
|
return this.update(claimToUpdate);
|
|
15284
15275
|
});
|
|
15285
15276
|
combineLatest(batch$).subscribe();
|
|
@@ -15304,10 +15295,6 @@ class VehicleClaimDetailsService {
|
|
|
15304
15295
|
this.eventDispatcherService = eventDispatcherService;
|
|
15305
15296
|
this.cacheSubject = new ReplaySubject(1);
|
|
15306
15297
|
this.url = 'vehicle-claim-details';
|
|
15307
|
-
this.listenEvents();
|
|
15308
|
-
}
|
|
15309
|
-
listenEvents() {
|
|
15310
|
-
this.listenBestPeriodChanges();
|
|
15311
15298
|
}
|
|
15312
15299
|
get() {
|
|
15313
15300
|
if (!this.cache) {
|
|
@@ -15338,19 +15325,6 @@ class VehicleClaimDetailsService {
|
|
|
15338
15325
|
return details;
|
|
15339
15326
|
}));
|
|
15340
15327
|
}
|
|
15341
|
-
/**
|
|
15342
|
-
* Listen logbook best period updates
|
|
15343
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
15344
|
-
*/
|
|
15345
|
-
listenBestPeriodChanges() {
|
|
15346
|
-
this.eventDispatcherService.on(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED)
|
|
15347
|
-
.subscribe((bestPeriod) => {
|
|
15348
|
-
// Set details as manual if best period stop exist (removed logbook case)
|
|
15349
|
-
if (!bestPeriod) {
|
|
15350
|
-
this.updateToManual();
|
|
15351
|
-
}
|
|
15352
|
-
});
|
|
15353
|
-
}
|
|
15354
15328
|
/**
|
|
15355
15329
|
* Set vehicle claim details as manual
|
|
15356
15330
|
* @TODO Vik: Best period move this and related logic to backend
|
|
@@ -19179,68 +19153,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
19179
19153
|
}]
|
|
19180
19154
|
}] });
|
|
19181
19155
|
|
|
19182
|
-
/**
|
|
19183
|
-
* Service for logbook best period calculation
|
|
19184
|
-
* @TODO Vik: improve structure for such cases (TT-2043)
|
|
19185
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
19186
|
-
*/
|
|
19187
|
-
class LogbookBestPeriodService {
|
|
19188
|
-
constructor(vehicleClaimDetailsService, vehicleClaimService, vehicleLogbookService, eventDispatcherService) {
|
|
19189
|
-
this.vehicleClaimDetailsService = vehicleClaimDetailsService;
|
|
19190
|
-
this.vehicleClaimService = vehicleClaimService;
|
|
19191
|
-
this.vehicleLogbookService = vehicleLogbookService;
|
|
19192
|
-
this.eventDispatcherService = eventDispatcherService;
|
|
19193
|
-
this.cacheSubject = new ReplaySubject();
|
|
19194
|
-
this.listenEvents();
|
|
19195
|
-
}
|
|
19196
|
-
listenEvents() {
|
|
19197
|
-
this.listenCacheUpdates();
|
|
19198
|
-
}
|
|
19199
|
-
get() {
|
|
19200
|
-
if (!this.cache) {
|
|
19201
|
-
combineLatest([
|
|
19202
|
-
this.vehicleClaimDetailsService.get(),
|
|
19203
|
-
this.vehicleLogbookService.get()
|
|
19204
|
-
])
|
|
19205
|
-
.subscribe(([details, logbooks]) => {
|
|
19206
|
-
let period;
|
|
19207
|
-
// calculate current initial best period
|
|
19208
|
-
if (details?.isManual || !details?.isLogbookMethod() || !logbooks.isBestPeriodExist()) {
|
|
19209
|
-
period = null;
|
|
19210
|
-
}
|
|
19211
|
-
else {
|
|
19212
|
-
period = logbooks.getBestPeriod();
|
|
19213
|
-
}
|
|
19214
|
-
// update cache only when best period changed
|
|
19215
|
-
if (!isEqual(this.cache, period)) {
|
|
19216
|
-
this.cache = period;
|
|
19217
|
-
this.cacheSubject.next(this.cache);
|
|
19218
|
-
}
|
|
19219
|
-
});
|
|
19220
|
-
}
|
|
19221
|
-
return this.cacheSubject.asObservable();
|
|
19222
|
-
}
|
|
19223
|
-
/**
|
|
19224
|
-
* Dispatch event when logbook best period changed
|
|
19225
|
-
*/
|
|
19226
|
-
listenCacheUpdates() {
|
|
19227
|
-
// Skip initial calculation and fire event only when subject changed
|
|
19228
|
-
this.cacheSubject
|
|
19229
|
-
.pipe(skip(1))
|
|
19230
|
-
.subscribe((period) => {
|
|
19231
|
-
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED, period));
|
|
19232
|
-
});
|
|
19233
|
-
}
|
|
19234
|
-
}
|
|
19235
|
-
LogbookBestPeriodService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: LogbookBestPeriodService, deps: [{ token: VehicleClaimDetailsService }, { token: VehicleClaimService }, { token: VehicleLogbookService }, { token: EventDispatcherService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19236
|
-
LogbookBestPeriodService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: LogbookBestPeriodService, providedIn: 'root' });
|
|
19237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: LogbookBestPeriodService, decorators: [{
|
|
19238
|
-
type: Injectable,
|
|
19239
|
-
args: [{
|
|
19240
|
-
providedIn: 'root'
|
|
19241
|
-
}]
|
|
19242
|
-
}], ctorParameters: function () { return [{ type: VehicleClaimDetailsService }, { type: VehicleClaimService }, { type: VehicleLogbookService }, { type: EventDispatcherService }]; } });
|
|
19243
|
-
|
|
19244
19156
|
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
19245
19157
|
/**
|
|
19246
19158
|
* Service to work with XLSX (generate, download, e.t.c.)
|
|
@@ -23725,5 +23637,5 @@ var MessagesEnum;
|
|
|
23725
23637
|
* Generated bundle index. Do not edit.
|
|
23726
23638
|
*/
|
|
23727
23639
|
|
|
23728
|
-
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressForm, AddressService, AddressTypeEnum, AllocationGroup, AllocationGroupCollection, AllocationRule, AllocationRuleCollection, AllocationRuleConditionComparisonOperatorEnum, AllocationRuleConditionFieldEnum, AllocationRuleConditionOperatorEnum, AllocationRuleForm, AllocationRuleService, AllocationRuleTransaction, AllocationRuleTransactionMetaField, AllocationRuleTypeEnum, AlphabetColorsEnum, AnnualClientDetails, AnnualClientDetailsForm, AnnualClientDetailsService, AnnualFrequencyEnum, AppCurrencyPipe, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetSale, AssetSaleCollection, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionMessagesEnum, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankPopularEnum, BankProviderEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsInvoiceExpenseEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsSalaryIncludedListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteMessages, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationForm, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpRateEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderForm, DocumentFolderMessagesEnum, DocumentFolderService, DocumentForm, DocumentMessagesEnum, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, JsPdf, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, MixpanelService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessDetails, MyTaxBusinessDetailsForm, MyTaxBusinessIncome, MyTaxBusinessIncomeForm, MyTaxBusinessIncomeOrLossesForm, MyTaxBusinessLosses, MyTaxBusinessLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfFromTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestService$1 as RestService, RewardfulService, SERVICE_PRODUCT_ROLES, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessLossesCollection, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseForm, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookMessages, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleMessagesEnum, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, taxReviewFilterPredicate, toArray };
|
|
23640
|
+
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressForm, AddressService, AddressTypeEnum, AllocationGroup, AllocationGroupCollection, AllocationRule, AllocationRuleCollection, AllocationRuleConditionComparisonOperatorEnum, AllocationRuleConditionFieldEnum, AllocationRuleConditionOperatorEnum, AllocationRuleForm, AllocationRuleService, AllocationRuleTransaction, AllocationRuleTransactionMetaField, AllocationRuleTypeEnum, AlphabetColorsEnum, AnnualClientDetails, AnnualClientDetailsForm, AnnualClientDetailsService, AnnualFrequencyEnum, AppCurrencyPipe, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetSale, AssetSaleCollection, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionMessagesEnum, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankPopularEnum, BankProviderEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BestVehicleLogbookCollection, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsInvoiceExpenseEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsSalaryIncludedListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteMessages, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationForm, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpRateEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderForm, DocumentFolderMessagesEnum, DocumentFolderService, DocumentForm, DocumentMessagesEnum, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, JsPdf, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, MixpanelService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessDetails, MyTaxBusinessDetailsForm, MyTaxBusinessIncome, MyTaxBusinessIncomeForm, MyTaxBusinessIncomeOrLossesForm, MyTaxBusinessLosses, MyTaxBusinessLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfFromTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestService$1 as RestService, RewardfulService, SERVICE_PRODUCT_ROLES, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessLossesCollection, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseForm, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookMessages, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleMessagesEnum, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, taxReviewFilterPredicate, toArray };
|
|
23729
23641
|
//# sourceMappingURL=taxtank-core.mjs.map
|