taxtank-core 0.28.34 → 0.28.36
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/bundles/taxtank-core.umd.js +1337 -1235
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Models/bank/bank.js +1 -1
- package/esm2015/lib/interceptors/basiq-token.interceptor.js +1 -1
- package/esm2015/lib/models/bank/bank-connection.js +2 -2
- package/esm2015/lib/models/bank/bank-external-stats.js +7 -0
- package/esm2015/lib/models/bank/bank.js +6 -2
- package/esm2015/lib/models/bank/basiq/basiq-config.js +12 -0
- package/esm2015/lib/models/bank/basiq/basiq-connections-response.interface.js +2 -0
- package/esm2015/lib/models/bank/basiq/basiq-job-response.js +12 -0
- package/esm2015/lib/models/bank/basiq/basiq-job-step.js +12 -0
- package/esm2015/lib/models/bank/basiq/basiq-job.js +4 -0
- package/esm2015/lib/models/bank/basiq/basiq-token-response.interface.js +2 -0
- package/esm2015/lib/models/bank/basiq/basiq-token.js +13 -0
- package/esm2015/lib/models/bank/basiq/index.js +8 -0
- package/esm2015/lib/models/bank/index.js +14 -0
- package/esm2015/lib/models/event/app-event-type.enum.js +58 -57
- package/esm2015/lib/models/index.js +2 -1
- package/esm2015/lib/models/sole/sole-business-loss.js +7 -1
- package/esm2015/lib/services/http/bank/basiq/basiq-token.service.js +2 -2
- package/esm2015/lib/services/http/bank/basiq/basiq.service.js +51 -5
- package/esm2015/lib/services/http/user/user.service.js +8 -2
- package/esm2015/public-api.js +2 -15
- package/fesm2015/taxtank-core.js +855 -766
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Models/bank/bank.d.ts +4 -5
- package/lib/models/bank/bank-connection.d.ts +1 -1
- package/lib/models/bank/bank-external-stats.d.ts +11 -0
- package/lib/models/bank/bank.d.ts +2 -0
- package/lib/models/bank/{basiq-config.d.ts → basiq/basiq-config.d.ts} +0 -0
- package/lib/{services/http → models}/bank/basiq/basiq-connections-response.interface.d.ts +0 -0
- package/lib/models/bank/basiq/basiq-job-response.d.ts +5 -0
- package/lib/models/bank/basiq/basiq-job-step.d.ts +7 -0
- package/lib/models/bank/basiq/basiq-job.d.ts +3 -0
- package/lib/{services/http → models}/bank/basiq/basiq-token-response.interface.d.ts +0 -0
- package/lib/models/bank/{basiq-token.d.ts → basiq/basiq-token.d.ts} +0 -0
- package/lib/models/bank/basiq/index.d.ts +7 -0
- package/lib/models/bank/index.d.ts +13 -0
- package/lib/models/event/app-event-type.enum.d.ts +57 -56
- package/lib/models/index.d.ts +1 -0
- package/lib/models/sole/sole-business-loss.d.ts +2 -0
- package/lib/services/http/bank/basiq/basiq-token.service.d.ts +1 -1
- package/lib/services/http/bank/basiq/basiq.service.d.ts +17 -3
- package/package.json +1 -1
- package/public-api.d.ts +1 -14
- package/esm2015/lib/models/bank/basiq-config.js +0 -12
- package/esm2015/lib/models/bank/basiq-job.js +0 -4
- package/esm2015/lib/models/bank/basiq-token.js +0 -13
- package/esm2015/lib/services/http/bank/basiq/basiq-connections-response.interface.js +0 -2
- package/esm2015/lib/services/http/bank/basiq/basiq-token-response.interface.js +0 -2
- package/lib/models/bank/basiq-job.d.ts +0 -3
package/fesm2015/taxtank-core.js
CHANGED
|
@@ -4,21 +4,21 @@ import * as i1$1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule, 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 { ReplaySubject, Subject, BehaviorSubject, throwError, Observable, combineLatest, forkJoin,
|
|
7
|
+
import { ReplaySubject, Subject, BehaviorSubject, throwError, Observable, of, combineLatest, forkJoin, from } from 'rxjs';
|
|
8
8
|
import { map, filter, catchError, take, switchMap, finalize, mergeMap, skip, distinctUntilChanged } from 'rxjs/operators';
|
|
9
|
-
import { plainToClass, classToPlain, Type,
|
|
9
|
+
import { plainToClass, classToPlain, Type, Transform, Expose, Exclude } from 'class-transformer';
|
|
10
10
|
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
11
|
-
import { __decorate, __awaiter } from 'tslib';
|
|
12
11
|
import get from 'lodash/get';
|
|
13
|
-
import last from 'lodash/last';
|
|
14
12
|
import flatten from 'lodash/flatten';
|
|
15
13
|
import hasIn from 'lodash/hasIn';
|
|
16
14
|
import first from 'lodash/first';
|
|
17
|
-
import
|
|
18
|
-
import { DateRange, extendMoment } from 'moment-range';
|
|
15
|
+
import last from 'lodash/last';
|
|
19
16
|
import uniqBy from 'lodash/uniqBy';
|
|
20
17
|
import concat from 'lodash/concat';
|
|
21
18
|
import { throwError as throwError$1 } from 'rxjs/internal/observable/throwError';
|
|
19
|
+
import { __decorate, __awaiter } from 'tslib';
|
|
20
|
+
import * as moment$1 from 'moment';
|
|
21
|
+
import { DateRange, extendMoment } from 'moment-range';
|
|
22
22
|
import cloneDeep$1 from 'lodash/cloneDeep';
|
|
23
23
|
import { EventSourcePolyfill } from 'event-source-polyfill/src/eventsource.min.js';
|
|
24
24
|
import compact from 'lodash/compact';
|
|
@@ -207,62 +207,63 @@ var AppEventTypeEnum;
|
|
|
207
207
|
AppEventTypeEnum[AppEventTypeEnum["BASIQ_CONSENT_UPDATED"] = 5] = "BASIQ_CONSENT_UPDATED";
|
|
208
208
|
AppEventTypeEnum[AppEventTypeEnum["BASIQ_CONNECTION_UPDATED"] = 6] = "BASIQ_CONNECTION_UPDATED";
|
|
209
209
|
AppEventTypeEnum[AppEventTypeEnum["BASIQ_JOB_CREATED"] = 7] = "BASIQ_JOB_CREATED";
|
|
210
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
211
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
212
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
213
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
214
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
215
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
216
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
217
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
218
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
219
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
220
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
221
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
222
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
223
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
224
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
225
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
226
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
227
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
228
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
229
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
230
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
231
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
232
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
233
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
234
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
235
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
236
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
237
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
238
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
239
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
240
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
241
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
242
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
243
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
244
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
245
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
246
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
247
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
248
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
249
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
250
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
251
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
252
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
253
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
254
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
255
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
256
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
257
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
258
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
259
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
260
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
261
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
262
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
263
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
264
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
265
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
210
|
+
AppEventTypeEnum[AppEventTypeEnum["BASIQ_LOGIN_FINISHED"] = 8] = "BASIQ_LOGIN_FINISHED";
|
|
211
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_INVITE_ACCEPTED"] = 9] = "CLIENT_INVITE_ACCEPTED";
|
|
212
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_OPEN_CHAT"] = 10] = "CLIENT_OPEN_CHAT";
|
|
213
|
+
AppEventTypeEnum[AppEventTypeEnum["CLIENT_TRANSFER_TO_OTHER_EMPLOYEE"] = 11] = "CLIENT_TRANSFER_TO_OTHER_EMPLOYEE";
|
|
214
|
+
AppEventTypeEnum[AppEventTypeEnum["CURRENT_USER_GET_FAILED"] = 12] = "CURRENT_USER_GET_FAILED";
|
|
215
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_DELETED"] = 13] = "DEPRECIATION_DELETED";
|
|
216
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATIONS_CREATED"] = 14] = "DEPRECIATIONS_CREATED";
|
|
217
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_RECEIPT"] = 15] = "DEPRECIATION_UPDATED_WITH_RECEIPT";
|
|
218
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT"] = 16] = "DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT";
|
|
219
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_CREATED"] = 17] = "DEPRECIATION_RECEIPT_CREATED";
|
|
220
|
+
AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_DELETED"] = 18] = "DEPRECIATION_RECEIPT_DELETED";
|
|
221
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 19] = "INCOME_SOURCES_CREATED";
|
|
222
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 20] = "INCOME_SOURCES_UPDATED";
|
|
223
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 21] = "INCOME_SOURCES_FORECASTS_CREATED";
|
|
224
|
+
AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 22] = "INCOME_SOURCES_FORECASTS_UPDATED";
|
|
225
|
+
AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 23] = "LOAN_UPDATED";
|
|
226
|
+
AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 24] = "LOAN_PAYOUT_UPDATED";
|
|
227
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 25] = "MESSAGE_CREATED";
|
|
228
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 26] = "MESSAGE_FILE_CREATED";
|
|
229
|
+
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 27] = "MESSAGE_FILE_DELETED";
|
|
230
|
+
AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 28] = "NOTIFICATION_ADDED";
|
|
231
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DEPRECIATION_CALCULATION_UPDATED"] = 29] = "PROPERTY_DEPRECIATION_CALCULATION_UPDATED";
|
|
232
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED"] = 30] = "PROPERTY_UPDATED";
|
|
233
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 31] = "PROPERTY_UPDATED_WITH_DOCUMENT";
|
|
234
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 32] = "PROPERTY_DOCUMENT_ADDED";
|
|
235
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 33] = "PROPERTY_MOVEMENT_CREATED";
|
|
236
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 34] = "PROPERTY_MOVEMENT_UPDATED";
|
|
237
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 35] = "PROPERTY_MOVEMENT_DELETED";
|
|
238
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 36] = "PROPERTY_SHARE_UPDATED";
|
|
239
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 37] = "PROPERTY_SALE_ADDED";
|
|
240
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 38] = "PROPERTY_SALE_DELETED";
|
|
241
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 39] = "PROPERTY_SUBSCRIPTION_ADDED";
|
|
242
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 40] = "PROPERTY_SUBSCRIPTION_DELETED";
|
|
243
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 41] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
|
|
244
|
+
AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 42] = "SERVICE_SUBSCRIPTION_UPDATED";
|
|
245
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_BUSINESS_CREATED"] = 43] = "SOLE_BUSINESS_CREATED";
|
|
246
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DEPRECIATION_METHOD_UPDATED"] = 44] = "SOLE_DEPRECIATION_METHOD_UPDATED";
|
|
247
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DETAILS_CREATED"] = 45] = "SOLE_DETAILS_CREATED";
|
|
248
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DETAILS_UPDATED"] = 46] = "SOLE_DETAILS_UPDATED";
|
|
249
|
+
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 47] = "TAX_REVIEW_UPDATED";
|
|
250
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 48] = "TRANSACTION_CREATED";
|
|
251
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 49] = "TRANSACTION_DELETED";
|
|
252
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 50] = "TRANSACTION_UPDATED";
|
|
253
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_RECEIPT"] = 51] = "TRANSACTION_UPDATED_WITH_RECEIPT";
|
|
254
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 52] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
|
|
255
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 53] = "TRANSACTION_RECEIPT_CREATED";
|
|
256
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 54] = "TRANSACTION_RECEIPT_DELETED";
|
|
257
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 55] = "TRANSACTIONS_CREATED";
|
|
258
|
+
AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 56] = "USER_UPDATED";
|
|
259
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 57] = "VEHICLE_CLAIM_UPDATED";
|
|
260
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 58] = "VEHICLE_CLAIM_CREATED";
|
|
261
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 59] = "VEHICLE_CLAIM_DETAILS_UPDATED";
|
|
262
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 60] = "VEHICLE_CLAIM_DETAILS_CREATED";
|
|
263
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 61] = "VEHICLE_LOGBOOK_CREATED";
|
|
264
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 62] = "VEHICLE_LOGBOOK_UPDATED";
|
|
265
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 63] = "VEHICLE_LOGBOOK_DELETED";
|
|
266
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 64] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
|
266
267
|
})(AppEventTypeEnum || (AppEventTypeEnum = {}));
|
|
267
268
|
|
|
268
269
|
class EventDispatcherService {
|
|
@@ -1145,122 +1146,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
1145
1146
|
args: ['environment']
|
|
1146
1147
|
}] }, { type: ToastService }]; } });
|
|
1147
1148
|
|
|
1148
|
-
class AbstractModel {
|
|
1149
|
-
hasValue(value, path = 'id') {
|
|
1150
|
-
return get(path) === value;
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
class BankAccount$1 extends AbstractModel {
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
var BankAccountTypeEnum;
|
|
1158
|
-
(function (BankAccountTypeEnum) {
|
|
1159
|
-
BankAccountTypeEnum[BankAccountTypeEnum["TRANSACTION"] = 1] = "TRANSACTION";
|
|
1160
|
-
BankAccountTypeEnum[BankAccountTypeEnum["SAVINGS"] = 2] = "SAVINGS";
|
|
1161
|
-
BankAccountTypeEnum[BankAccountTypeEnum["CREDIT_CARD"] = 3] = "CREDIT_CARD";
|
|
1162
|
-
// @TODO Alex: should be removed by backend (TT-2107)
|
|
1163
|
-
// MORTGAGE = 4,
|
|
1164
|
-
BankAccountTypeEnum[BankAccountTypeEnum["LOAN"] = 5] = "LOAN";
|
|
1165
|
-
BankAccountTypeEnum[BankAccountTypeEnum["INVESTMENT"] = 6] = "INVESTMENT";
|
|
1166
|
-
BankAccountTypeEnum[BankAccountTypeEnum["TERM_DEPOSIT"] = 7] = "TERM_DEPOSIT";
|
|
1167
|
-
BankAccountTypeEnum[BankAccountTypeEnum["OFFSET"] = 10] = "OFFSET";
|
|
1168
|
-
})(BankAccountTypeEnum || (BankAccountTypeEnum = {}));
|
|
1169
|
-
|
|
1170
|
-
var BankAccountStatusEnum;
|
|
1171
|
-
(function (BankAccountStatusEnum) {
|
|
1172
|
-
BankAccountStatusEnum[BankAccountStatusEnum["INACTIVE"] = 0] = "INACTIVE";
|
|
1173
|
-
BankAccountStatusEnum[BankAccountStatusEnum["ACTIVE"] = 1] = "ACTIVE";
|
|
1174
|
-
})(BankAccountStatusEnum || (BankAccountStatusEnum = {}));
|
|
1175
|
-
|
|
1176
|
-
class Loan$1 extends AbstractModel {
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
var LoanVehicleTypeEnum;
|
|
1180
|
-
(function (LoanVehicleTypeEnum) {
|
|
1181
|
-
LoanVehicleTypeEnum[LoanVehicleTypeEnum["AUTO_LOAN"] = 6] = "AUTO_LOAN";
|
|
1182
|
-
LoanVehicleTypeEnum[LoanVehicleTypeEnum["CHATTEL_MORTGAGE"] = 9] = "CHATTEL_MORTGAGE";
|
|
1183
|
-
LoanVehicleTypeEnum[LoanVehicleTypeEnum["COMMERCIAL_HIRE_PURCHASE"] = 10] = "COMMERCIAL_HIRE_PURCHASE";
|
|
1184
|
-
})(LoanVehicleTypeEnum || (LoanVehicleTypeEnum = {}));
|
|
1185
|
-
|
|
1186
|
-
// @Todo no base model from backend list
|
|
1187
|
-
/**
|
|
1188
|
-
* Loan payment class
|
|
1189
|
-
*/
|
|
1190
|
-
class LoanPayment extends AbstractModel {
|
|
1191
|
-
}
|
|
1192
|
-
__decorate([
|
|
1193
|
-
Type(() => Date)
|
|
1194
|
-
], LoanPayment.prototype, "date", void 0);
|
|
1195
|
-
|
|
1196
|
-
class LoanPayout$1 extends AbstractModel {
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
var LoanPayoutTypeEnum;
|
|
1200
|
-
(function (LoanPayoutTypeEnum) {
|
|
1201
|
-
LoanPayoutTypeEnum[LoanPayoutTypeEnum["REFINANCE"] = 1] = "REFINANCE";
|
|
1202
|
-
LoanPayoutTypeEnum[LoanPayoutTypeEnum["PAYOUT"] = 2] = "PAYOUT";
|
|
1203
|
-
})(LoanPayoutTypeEnum || (LoanPayoutTypeEnum = {}));
|
|
1204
|
-
|
|
1205
|
-
class LoanPayout extends LoanPayout$1 {
|
|
1206
|
-
/**
|
|
1207
|
-
* Check if payout type is refinance
|
|
1208
|
-
*/
|
|
1209
|
-
isRefinance() {
|
|
1210
|
-
return this.type === LoanPayoutTypeEnum.REFINANCE;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
class FinancialYear {
|
|
1215
|
-
constructor(date) {
|
|
1216
|
-
this.yearStartDate = '-07-01';
|
|
1217
|
-
this.yearEndDate = '-06-30';
|
|
1218
|
-
if (date) {
|
|
1219
|
-
this.year = date instanceof Date ? FinancialYear.toFinYear(date) : date;
|
|
1220
|
-
}
|
|
1221
|
-
else {
|
|
1222
|
-
this.year = +localStorage.getItem('financialYear') || FinancialYear.toFinYear(new Date());
|
|
1223
|
-
}
|
|
1224
|
-
this.setStartDate(this.year);
|
|
1225
|
-
this.setEndDate(this.year);
|
|
1226
|
-
}
|
|
1227
|
-
includes(date) {
|
|
1228
|
-
return this.year === new FinancialYear(date).year;
|
|
1229
|
-
}
|
|
1230
|
-
static toFinYear(date) {
|
|
1231
|
-
return date.getFullYear() + (date.getMonth() >= this.startMonthIndex ? 1 : 0);
|
|
1232
|
-
}
|
|
1233
|
-
get prevFinYear() {
|
|
1234
|
-
return new FinancialYear(new Date(`${new Date().getFullYear() - 1}${this.yearStartDate}`));
|
|
1235
|
-
}
|
|
1236
|
-
/**
|
|
1237
|
-
* Get date by desired month
|
|
1238
|
-
*/
|
|
1239
|
-
getMonthDate(monthIndex) {
|
|
1240
|
-
if (monthIndex >= FinancialYear.startMonthIndex) {
|
|
1241
|
-
return new Date(`${this.year - 1}-${monthIndex + 1}-01`);
|
|
1242
|
-
}
|
|
1243
|
-
return new Date(`${this.year}-${monthIndex + 1}-01`);
|
|
1244
|
-
}
|
|
1245
|
-
setStartDate(year) {
|
|
1246
|
-
this.startDate = new Date(`${year - 1}${this.yearStartDate}`);
|
|
1247
|
-
}
|
|
1248
|
-
setEndDate(year) {
|
|
1249
|
-
this.endDate = new Date(`${year}${this.yearEndDate}`);
|
|
1250
|
-
}
|
|
1251
|
-
getPastMonths() {
|
|
1252
|
-
const months = [];
|
|
1253
|
-
const now = new Date();
|
|
1254
|
-
const endDate = this.endDate < now ? this.endDate : now;
|
|
1255
|
-
for (const d = this.startDate; d <= endDate; d.setMonth(d.getMonth() + 1)) {
|
|
1256
|
-
months.push(d.getMonth());
|
|
1257
|
-
}
|
|
1258
|
-
return months;
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
FinancialYear.weeksInYear = 52;
|
|
1262
|
-
FinancialYear.startMonthIndex = 6;
|
|
1263
|
-
|
|
1264
1149
|
/**
|
|
1265
1150
|
* List of collections grouped by passed property
|
|
1266
1151
|
*/
|
|
@@ -1484,105 +1369,512 @@ class Collection {
|
|
|
1484
1369
|
}
|
|
1485
1370
|
}
|
|
1486
1371
|
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
;
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
footer: [this.getExportFooter(type)]
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1372
|
+
var BankAccountTypeEnum;
|
|
1373
|
+
(function (BankAccountTypeEnum) {
|
|
1374
|
+
BankAccountTypeEnum[BankAccountTypeEnum["TRANSACTION"] = 1] = "TRANSACTION";
|
|
1375
|
+
BankAccountTypeEnum[BankAccountTypeEnum["SAVINGS"] = 2] = "SAVINGS";
|
|
1376
|
+
BankAccountTypeEnum[BankAccountTypeEnum["CREDIT_CARD"] = 3] = "CREDIT_CARD";
|
|
1377
|
+
// @TODO Alex: should be removed by backend (TT-2107)
|
|
1378
|
+
// MORTGAGE = 4,
|
|
1379
|
+
BankAccountTypeEnum[BankAccountTypeEnum["LOAN"] = 5] = "LOAN";
|
|
1380
|
+
BankAccountTypeEnum[BankAccountTypeEnum["INVESTMENT"] = 6] = "INVESTMENT";
|
|
1381
|
+
BankAccountTypeEnum[BankAccountTypeEnum["TERM_DEPOSIT"] = 7] = "TERM_DEPOSIT";
|
|
1382
|
+
BankAccountTypeEnum[BankAccountTypeEnum["OFFSET"] = 10] = "OFFSET";
|
|
1383
|
+
})(BankAccountTypeEnum || (BankAccountTypeEnum = {}));
|
|
1503
1384
|
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
}
|
|
1385
|
+
const TYPE_LOAN = [
|
|
1386
|
+
BankAccountTypeEnum.CREDIT_CARD,
|
|
1387
|
+
BankAccountTypeEnum.LOAN
|
|
1388
|
+
];
|
|
1509
1389
|
|
|
1510
1390
|
/**
|
|
1511
|
-
*
|
|
1391
|
+
* Collection of bank accounts.
|
|
1512
1392
|
*/
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
'Payment Due',
|
|
1526
|
-
'Interest Accrued',
|
|
1527
|
-
'Principal Paid',
|
|
1528
|
-
'Principal Balance',
|
|
1529
|
-
'Payout'
|
|
1530
|
-
];
|
|
1531
|
-
}
|
|
1532
|
-
getExportBody() {
|
|
1533
|
-
return this.items.map((payment) => {
|
|
1534
|
-
return [
|
|
1535
|
-
plainToClass(ExportCell, { value: payment.number, type: ExportCellTypeEnum.STRING }),
|
|
1536
|
-
plainToClass(ExportCell, { value: payment.date, type: ExportCellTypeEnum.DATE }),
|
|
1537
|
-
plainToClass(ExportCell, { value: payment.paymentDue, type: ExportCellTypeEnum.CURRENCY }),
|
|
1538
|
-
plainToClass(ExportCell, { value: payment.interestAccrued, type: ExportCellTypeEnum.CURRENCY }),
|
|
1539
|
-
plainToClass(ExportCell, { value: payment.principalPaid, type: ExportCellTypeEnum.CURRENCY }),
|
|
1540
|
-
plainToClass(ExportCell, { value: payment.principalBalance, type: ExportCellTypeEnum.CURRENCY }),
|
|
1541
|
-
plainToClass(ExportCell, { value: payment.payout, type: ExportCellTypeEnum.CURRENCY }),
|
|
1542
|
-
];
|
|
1543
|
-
});
|
|
1544
|
-
}
|
|
1545
|
-
get paymentDue() {
|
|
1546
|
-
return this.sumBy('paymentDue');
|
|
1547
|
-
}
|
|
1548
|
-
getByFinYear(finYear = new FinancialYear()) {
|
|
1549
|
-
return this.filter((payment) => {
|
|
1550
|
-
return new Date(payment.date) >= finYear.startDate &&
|
|
1551
|
-
new Date(payment.date) <= finYear.endDate;
|
|
1393
|
+
class BankAccountCollection extends Collection {
|
|
1394
|
+
/**
|
|
1395
|
+
* get list of bank accounts with passed types
|
|
1396
|
+
*/
|
|
1397
|
+
getByType(types, isExclude = false) {
|
|
1398
|
+
// get types always as array (if only one passed)
|
|
1399
|
+
const typesArray = concat(types);
|
|
1400
|
+
return this.items.filter((bankAccount) => {
|
|
1401
|
+
if (isExclude) {
|
|
1402
|
+
return !typesArray.includes(bankAccount.type);
|
|
1403
|
+
}
|
|
1404
|
+
return typesArray.includes(bankAccount.type);
|
|
1552
1405
|
});
|
|
1553
1406
|
}
|
|
1554
|
-
getForCurrentYear() {
|
|
1555
|
-
return this.getByFinYear(new FinancialYear());
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
class Loan extends Loan$1 {
|
|
1560
1407
|
/**
|
|
1561
|
-
*
|
|
1408
|
+
* get amount of initial loans
|
|
1562
1409
|
*/
|
|
1563
|
-
|
|
1564
|
-
return
|
|
1410
|
+
getInitialLoanAmount() {
|
|
1411
|
+
return this.getByType(TYPE_LOAN)
|
|
1412
|
+
.reduce((sum, bankAccount) => {
|
|
1413
|
+
return sum += bankAccount.balances.length ? bankAccount.getOpeningBalance() : 0;
|
|
1414
|
+
}, 0);
|
|
1565
1415
|
}
|
|
1566
1416
|
/**
|
|
1567
|
-
*
|
|
1568
|
-
* @param year financial year for filter
|
|
1417
|
+
* get amount of current loans
|
|
1569
1418
|
*/
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1419
|
+
getCurrentLoanAmount() {
|
|
1420
|
+
return this.getByType(TYPE_LOAN)
|
|
1421
|
+
.reduce((sum, bankAccount) => {
|
|
1422
|
+
return sum += bankAccount.currentBalance;
|
|
1423
|
+
}, 0);
|
|
1573
1424
|
}
|
|
1574
1425
|
/**
|
|
1575
|
-
*
|
|
1576
|
-
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/212369955/Loans+vehicle+loans
|
|
1577
|
-
* @TODO Vik/Nicole: need to update documentation. Derek gave the right formulas to Mikhail
|
|
1426
|
+
* get collection filtered by property id
|
|
1578
1427
|
*/
|
|
1579
|
-
|
|
1580
|
-
return new
|
|
1428
|
+
getByPropertyId(id) {
|
|
1429
|
+
return new BankAccountCollection(this.items.filter((bankAccount) => {
|
|
1430
|
+
return bankAccount.bankAccountProperties.find((bankAccountProperty) => {
|
|
1431
|
+
return bankAccountProperty.property.id === id;
|
|
1432
|
+
});
|
|
1433
|
+
}));
|
|
1581
1434
|
}
|
|
1582
1435
|
/**
|
|
1583
|
-
*
|
|
1584
|
-
|
|
1585
|
-
|
|
1436
|
+
* get collection filtered by properties ids
|
|
1437
|
+
*/
|
|
1438
|
+
getByPropertiesIds(ids) {
|
|
1439
|
+
return new BankAccountCollection(this.items.filter((bankAccount) => {
|
|
1440
|
+
return bankAccount.bankAccountProperties.find((bankAccountProperty) => {
|
|
1441
|
+
return ids.includes(bankAccountProperty.property.id);
|
|
1442
|
+
});
|
|
1443
|
+
}));
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* get collection of active bank accounts
|
|
1447
|
+
*/
|
|
1448
|
+
getActiveBankAccounts() {
|
|
1449
|
+
return new BankAccountCollection(this.items.filter((bankAccount) => {
|
|
1450
|
+
return bankAccount.isActive();
|
|
1451
|
+
}));
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* get reduction of loan (reduction of principle) percentage
|
|
1455
|
+
*/
|
|
1456
|
+
getPrincipleReductionPercent() {
|
|
1457
|
+
const initialLoans = this.getInitialLoanAmount();
|
|
1458
|
+
const currentLoans = this.getCurrentLoanAmount();
|
|
1459
|
+
if (!initialLoans) {
|
|
1460
|
+
return 0;
|
|
1461
|
+
}
|
|
1462
|
+
return (initialLoans - currentLoans) / initialLoans * 100;
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* Get collection of loan bank accounts
|
|
1466
|
+
*/
|
|
1467
|
+
getLoanAccounts() {
|
|
1468
|
+
return new BankAccountCollection(this.getByType(TYPE_LOAN));
|
|
1469
|
+
}
|
|
1470
|
+
getSavingsAccounts() {
|
|
1471
|
+
return new BankAccountCollection(this.getByType(TYPE_LOAN, true));
|
|
1472
|
+
}
|
|
1473
|
+
getOpeningBalance() {
|
|
1474
|
+
return this.items.reduce((sum, bankAccount) => sum + bankAccount.getOpeningBalance(), 0);
|
|
1475
|
+
}
|
|
1476
|
+
get currentBalance() {
|
|
1477
|
+
return this.sumBy('currentBalance');
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* Get Collection of bank accounts with property tank type
|
|
1481
|
+
*/
|
|
1482
|
+
getPropertyBankAccounts() {
|
|
1483
|
+
return new BankAccountCollection(this.items.filter((bankAccount) => bankAccount.isPropertyTank()));
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* Get Collection of bank accounts with work tank type
|
|
1487
|
+
*/
|
|
1488
|
+
getWorkBankAccounts() {
|
|
1489
|
+
return new BankAccountCollection(this.items.filter((bankAccount) => bankAccount.isWorkTank()));
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Get Collection of bank accounts by tank type
|
|
1493
|
+
*/
|
|
1494
|
+
getByTankType(tankType) {
|
|
1495
|
+
return new BankAccountCollection(this.items.filter((bankAccount) => bankAccount.tankType === tankType));
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* Get list of all bank account properties
|
|
1499
|
+
*/
|
|
1500
|
+
getBankAccountPropertiesList() {
|
|
1501
|
+
return flatten(this.items.map((bankAccount) => {
|
|
1502
|
+
return bankAccount.bankAccountProperties;
|
|
1503
|
+
}));
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Get lis of unique properties from all bank accounts properties
|
|
1507
|
+
*/
|
|
1508
|
+
getProperties() {
|
|
1509
|
+
return uniqBy(this.getBankAccountPropertiesList().map((bankAccountProperty) => {
|
|
1510
|
+
return bankAccountProperty.property;
|
|
1511
|
+
}), 'id');
|
|
1512
|
+
}
|
|
1513
|
+
getPropertyBalanceAmount(propertyId) {
|
|
1514
|
+
return this.items.reduce((sum, bankAccount) => {
|
|
1515
|
+
return sum + bankAccount.getPropertyBalanceAmount(propertyId);
|
|
1516
|
+
}, 0);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
var UserEventTypeTypeEnum;
|
|
1521
|
+
(function (UserEventTypeTypeEnum) {
|
|
1522
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["REGISTERED"] = 1000] = "REGISTERED";
|
|
1523
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PASSWORD_RESET_REQUEST"] = 1001] = "PASSWORD_RESET_REQUEST";
|
|
1524
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["APP_FEATURES"] = 1010] = "APP_FEATURES";
|
|
1525
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIBED"] = 2000] = "SUBSCRIBED";
|
|
1526
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["UNSUBSCRIBED"] = 2001] = "UNSUBSCRIBED";
|
|
1527
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIPTION_UPDATE"] = 2004] = "SUBSCRIPTION_UPDATE";
|
|
1528
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIPTION_TRIAL_UPDATE"] = 2005] = "SUBSCRIPTION_TRIAL_UPDATE";
|
|
1529
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIPTION_PAYMENT_FAILED"] = 2006] = "SUBSCRIPTION_PAYMENT_FAILED";
|
|
1530
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE"] = 2010] = "CLIENT_INVITE";
|
|
1531
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_TO_REGISTER"] = 2011] = "CLIENT_INVITE_TO_REGISTER";
|
|
1532
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_ACCEPTED"] = 2012] = "FIRM_INVITE_ACCEPTED";
|
|
1533
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_REJECTED"] = 2013] = "FIRM_INVITE_REJECTED";
|
|
1534
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_REGISTERED"] = 2014] = "FIRM_INVITE_REGISTERED";
|
|
1535
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE"] = 2020] = "PROPERTY_SHARE_INVITE";
|
|
1536
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_TO_REGISTER"] = 2021] = "PROPERTY_SHARE_INVITE_TO_REGISTER";
|
|
1537
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_ACCEPTED"] = 2022] = "PROPERTY_SHARE_INVITE_ACCEPTED";
|
|
1538
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_REJECTED"] = 2023] = "PROPERTY_SHARE_INVITE_REJECTED";
|
|
1539
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_REGISTERED"] = 2024] = "PROPERTY_SHARE_INVITE_REGISTERED";
|
|
1540
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_CHANGE_REQUESTED"] = 2025] = "PROPERTY_SHARE_CHANGE_REQUESTED";
|
|
1541
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_CHANGE_ACCEPTED"] = 2026] = "PROPERTY_SHARE_CHANGE_ACCEPTED";
|
|
1542
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_CHANGE_REJECTED"] = 2027] = "PROPERTY_SHARE_CHANGE_REJECTED";
|
|
1543
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["OWNER_SUBSCRIBED"] = 2028] = "OWNER_SUBSCRIBED";
|
|
1544
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["OWNER_UNSUBSCRIBED"] = 2029] = "OWNER_UNSUBSCRIBED";
|
|
1545
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["BASIQ_NEW_ACCOUNTS"] = 2030] = "BASIQ_NEW_ACCOUNTS";
|
|
1546
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["BASIQ_FIRST_IMPORT_COMPLETE"] = 2031] = "BASIQ_FIRST_IMPORT_COMPLETE";
|
|
1547
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["BASIQ_AUTHORIZATION_FAIL"] = 2032] = "BASIQ_AUTHORIZATION_FAIL";
|
|
1548
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["TRANSACTION_ALLOCATE_REMINDER"] = 2033] = "TRANSACTION_ALLOCATE_REMINDER";
|
|
1549
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["REGISTRATION_INVITE"] = 2040] = "REGISTRATION_INVITE";
|
|
1550
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["REGISTRATION_INVITE_ACCEPTED"] = 2041] = "REGISTRATION_INVITE_ACCEPTED";
|
|
1551
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_EMAIL_CONFIRMED"] = 2050] = "CLIENT_EMAIL_CONFIRMED";
|
|
1552
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["TAX_REVIEW_REQUESTED"] = 2060] = "TAX_REVIEW_REQUESTED";
|
|
1553
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_TO_REGISTER"] = 3000] = "FIRM_INVITE_TO_REGISTER";
|
|
1554
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE"] = 3001] = "FIRM_INVITE";
|
|
1555
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_ACCEPTED"] = 3002] = "CLIENT_INVITE_ACCEPTED";
|
|
1556
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_REJECTED"] = 3003] = "CLIENT_INVITE_REJECTED";
|
|
1557
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_REGISTERED"] = 3004] = "CLIENT_INVITE_REGISTERED";
|
|
1558
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_NEW_CLIENT"] = 3005] = "FIRM_NEW_CLIENT";
|
|
1559
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_LOST_CLIENT"] = 3006] = "FIRM_LOST_CLIENT";
|
|
1560
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_INVITE"] = 3010] = "EMPLOYEE_INVITE";
|
|
1561
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_LOST_CLIENT"] = 3011] = "EMPLOYEE_LOST_CLIENT";
|
|
1562
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_NEW_CLIENT"] = 3012] = "EMPLOYEE_NEW_CLIENT";
|
|
1563
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_INVITE_ACCEPTED"] = 3013] = "EMPLOYEE_INVITE_ACCEPTED";
|
|
1564
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_EMAIL_CONFIRMED"] = 3020] = "EMPLOYEE_EMAIL_CONFIRMED";
|
|
1565
|
+
UserEventTypeTypeEnum[UserEventTypeTypeEnum["TAX_REVIEW_RECEIVED"] = 3030] = "TAX_REVIEW_RECEIVED";
|
|
1566
|
+
})(UserEventTypeTypeEnum || (UserEventTypeTypeEnum = {}));
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
|
|
1570
|
+
*/
|
|
1571
|
+
class AppEvent {
|
|
1572
|
+
constructor(type, payload) {
|
|
1573
|
+
this.type = type;
|
|
1574
|
+
this.payload = payload;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
/**
|
|
1579
|
+
* Class describe configuration options for basiq connect control
|
|
1580
|
+
* https://www.npmjs.com/package/@basiq/basiq-connect-control
|
|
1581
|
+
*/
|
|
1582
|
+
class BasiqConfig {
|
|
1583
|
+
constructor(options) {
|
|
1584
|
+
// ID of the DOM element to which Basiq Connect Control will be rendered;
|
|
1585
|
+
this.containerId = 'basiq-control';
|
|
1586
|
+
Object.assign(this, options);
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
class AbstractModel {
|
|
1591
|
+
hasValue(value, path = 'id') {
|
|
1592
|
+
return get(path) === value;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
class BasiqJob$1 extends AbstractModel {
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
class BasiqJob extends BasiqJob$1 {
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
class BasiqJobStep {
|
|
1603
|
+
isVerifyCredentials() {
|
|
1604
|
+
return this.title === 'verify-credentials';
|
|
1605
|
+
}
|
|
1606
|
+
isInProgress() {
|
|
1607
|
+
return this.status === 'in-progress';
|
|
1608
|
+
}
|
|
1609
|
+
isSuccess() {
|
|
1610
|
+
return this.status === 'success';
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
class BasiqJobResponse {
|
|
1615
|
+
getVerifyCredentialsStep() {
|
|
1616
|
+
return this.steps.find((step) => step.isVerifyCredentials());
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
__decorate([
|
|
1620
|
+
Type(() => BasiqJobStep)
|
|
1621
|
+
], BasiqJobResponse.prototype, "steps", void 0);
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* access token, needed to access basiq connect ui (https://github.com/basiqio/basiq-connect-ui)
|
|
1625
|
+
*/
|
|
1626
|
+
class BasiqToken {
|
|
1627
|
+
constructor(value, expiresAt) {
|
|
1628
|
+
this.value = value;
|
|
1629
|
+
this.expiresAt = expiresAt;
|
|
1630
|
+
}
|
|
1631
|
+
isExpired() {
|
|
1632
|
+
return this.expiresAt < new Date();
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
class Bank$1 extends AbstractModel {
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
var BankPopularEnum;
|
|
1640
|
+
(function (BankPopularEnum) {
|
|
1641
|
+
BankPopularEnum["BANKWEST"] = "Bank of Western Australia trading as BankWest";
|
|
1642
|
+
BankPopularEnum["ANZ"] = "Australia and New Zealand Banking Group Limited";
|
|
1643
|
+
BankPopularEnum["CBA"] = "Commonwealth Bank Australia";
|
|
1644
|
+
BankPopularEnum["WESTPAC"] = "Westpac Banking Corporation";
|
|
1645
|
+
BankPopularEnum["BENDIGO"] = "Bendigo and Adelaide Bank Limited";
|
|
1646
|
+
BankPopularEnum["ING_DIRECT"] = "ING Bank (Australia) Limited (trading as ING Direct)";
|
|
1647
|
+
BankPopularEnum["ST_GEORGE"] = "St. George Bank (a subsidiary of Westpac)";
|
|
1648
|
+
BankPopularEnum["SUNCORP"] = "Suncorp-Metway Limited";
|
|
1649
|
+
BankPopularEnum["CITIBANK"] = "Citibank";
|
|
1650
|
+
BankPopularEnum["BOQ"] = "Bank of Queensland Limited";
|
|
1651
|
+
})(BankPopularEnum || (BankPopularEnum = {}));
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* Bank subclass, average bank response time for some operations in milliseconds
|
|
1655
|
+
* Used for basiq banks functionality to improve bank login UI/UX (loading progress)
|
|
1656
|
+
*/
|
|
1657
|
+
class BankExternalStats {
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
class Bank extends Bank$1 {
|
|
1661
|
+
getPhotoPlaceholder() {
|
|
1662
|
+
return this.name[0] + this.name[1];
|
|
1663
|
+
}
|
|
1664
|
+
getPhoto() {
|
|
1665
|
+
if (!this.logo) {
|
|
1666
|
+
return null;
|
|
1667
|
+
}
|
|
1668
|
+
return this.logo.includes('http') ? `${this.logo}` : `${localStorage.getItem('api_uri')}/${this.logo}`;
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
__decorate([
|
|
1672
|
+
Transform(({ value }) => value ? value.replace(' ', '%20') : null)
|
|
1673
|
+
], Bank.prototype, "logo", void 0);
|
|
1674
|
+
__decorate([
|
|
1675
|
+
Transform(({ obj }) => Object.values(BankPopularEnum).includes(obj.name)),
|
|
1676
|
+
Expose()
|
|
1677
|
+
], Bank.prototype, "isPopular", void 0);
|
|
1678
|
+
__decorate([
|
|
1679
|
+
Type(() => BankExternalStats)
|
|
1680
|
+
], Bank.prototype, "externalStats", void 0);
|
|
1681
|
+
|
|
1682
|
+
class BankAccount$1 extends AbstractModel {
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
var BankAccountStatusEnum;
|
|
1686
|
+
(function (BankAccountStatusEnum) {
|
|
1687
|
+
BankAccountStatusEnum[BankAccountStatusEnum["INACTIVE"] = 0] = "INACTIVE";
|
|
1688
|
+
BankAccountStatusEnum[BankAccountStatusEnum["ACTIVE"] = 1] = "ACTIVE";
|
|
1689
|
+
})(BankAccountStatusEnum || (BankAccountStatusEnum = {}));
|
|
1690
|
+
|
|
1691
|
+
class Loan$1 extends AbstractModel {
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
var LoanVehicleTypeEnum;
|
|
1695
|
+
(function (LoanVehicleTypeEnum) {
|
|
1696
|
+
LoanVehicleTypeEnum[LoanVehicleTypeEnum["AUTO_LOAN"] = 6] = "AUTO_LOAN";
|
|
1697
|
+
LoanVehicleTypeEnum[LoanVehicleTypeEnum["CHATTEL_MORTGAGE"] = 9] = "CHATTEL_MORTGAGE";
|
|
1698
|
+
LoanVehicleTypeEnum[LoanVehicleTypeEnum["COMMERCIAL_HIRE_PURCHASE"] = 10] = "COMMERCIAL_HIRE_PURCHASE";
|
|
1699
|
+
})(LoanVehicleTypeEnum || (LoanVehicleTypeEnum = {}));
|
|
1700
|
+
|
|
1701
|
+
// @Todo no base model from backend list
|
|
1702
|
+
/**
|
|
1703
|
+
* Loan payment class
|
|
1704
|
+
*/
|
|
1705
|
+
class LoanPayment extends AbstractModel {
|
|
1706
|
+
}
|
|
1707
|
+
__decorate([
|
|
1708
|
+
Type(() => Date)
|
|
1709
|
+
], LoanPayment.prototype, "date", void 0);
|
|
1710
|
+
|
|
1711
|
+
class LoanPayout$1 extends AbstractModel {
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
var LoanPayoutTypeEnum;
|
|
1715
|
+
(function (LoanPayoutTypeEnum) {
|
|
1716
|
+
LoanPayoutTypeEnum[LoanPayoutTypeEnum["REFINANCE"] = 1] = "REFINANCE";
|
|
1717
|
+
LoanPayoutTypeEnum[LoanPayoutTypeEnum["PAYOUT"] = 2] = "PAYOUT";
|
|
1718
|
+
})(LoanPayoutTypeEnum || (LoanPayoutTypeEnum = {}));
|
|
1719
|
+
|
|
1720
|
+
class LoanPayout extends LoanPayout$1 {
|
|
1721
|
+
/**
|
|
1722
|
+
* Check if payout type is refinance
|
|
1723
|
+
*/
|
|
1724
|
+
isRefinance() {
|
|
1725
|
+
return this.type === LoanPayoutTypeEnum.REFINANCE;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
class FinancialYear {
|
|
1730
|
+
constructor(date) {
|
|
1731
|
+
this.yearStartDate = '-07-01';
|
|
1732
|
+
this.yearEndDate = '-06-30';
|
|
1733
|
+
if (date) {
|
|
1734
|
+
this.year = date instanceof Date ? FinancialYear.toFinYear(date) : date;
|
|
1735
|
+
}
|
|
1736
|
+
else {
|
|
1737
|
+
this.year = +localStorage.getItem('financialYear') || FinancialYear.toFinYear(new Date());
|
|
1738
|
+
}
|
|
1739
|
+
this.setStartDate(this.year);
|
|
1740
|
+
this.setEndDate(this.year);
|
|
1741
|
+
}
|
|
1742
|
+
includes(date) {
|
|
1743
|
+
return this.year === new FinancialYear(date).year;
|
|
1744
|
+
}
|
|
1745
|
+
static toFinYear(date) {
|
|
1746
|
+
return date.getFullYear() + (date.getMonth() >= this.startMonthIndex ? 1 : 0);
|
|
1747
|
+
}
|
|
1748
|
+
get prevFinYear() {
|
|
1749
|
+
return new FinancialYear(new Date(`${new Date().getFullYear() - 1}${this.yearStartDate}`));
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* Get date by desired month
|
|
1753
|
+
*/
|
|
1754
|
+
getMonthDate(monthIndex) {
|
|
1755
|
+
if (monthIndex >= FinancialYear.startMonthIndex) {
|
|
1756
|
+
return new Date(`${this.year - 1}-${monthIndex + 1}-01`);
|
|
1757
|
+
}
|
|
1758
|
+
return new Date(`${this.year}-${monthIndex + 1}-01`);
|
|
1759
|
+
}
|
|
1760
|
+
setStartDate(year) {
|
|
1761
|
+
this.startDate = new Date(`${year - 1}${this.yearStartDate}`);
|
|
1762
|
+
}
|
|
1763
|
+
setEndDate(year) {
|
|
1764
|
+
this.endDate = new Date(`${year}${this.yearEndDate}`);
|
|
1765
|
+
}
|
|
1766
|
+
getPastMonths() {
|
|
1767
|
+
const months = [];
|
|
1768
|
+
const now = new Date();
|
|
1769
|
+
const endDate = this.endDate < now ? this.endDate : now;
|
|
1770
|
+
for (const d = this.startDate; d <= endDate; d.setMonth(d.getMonth() + 1)) {
|
|
1771
|
+
months.push(d.getMonth());
|
|
1772
|
+
}
|
|
1773
|
+
return months;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
FinancialYear.weeksInYear = 52;
|
|
1777
|
+
FinancialYear.startMonthIndex = 6;
|
|
1778
|
+
|
|
1779
|
+
class ExportDataTable {
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
class ExportableCollection extends Collection {
|
|
1783
|
+
getExportFooter(type) {
|
|
1784
|
+
return [];
|
|
1785
|
+
}
|
|
1786
|
+
;
|
|
1787
|
+
export(type) {
|
|
1788
|
+
return plainToClass(ExportDataTable, {
|
|
1789
|
+
header: this.getExportHeader(type),
|
|
1790
|
+
body: this.getExportBody(type),
|
|
1791
|
+
footer: [this.getExportFooter(type)]
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* export table column
|
|
1798
|
+
*/
|
|
1799
|
+
class ExportCell {
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* type of export table column value
|
|
1804
|
+
*/
|
|
1805
|
+
var ExportCellTypeEnum;
|
|
1806
|
+
(function (ExportCellTypeEnum) {
|
|
1807
|
+
ExportCellTypeEnum[ExportCellTypeEnum["STRING"] = 0] = "STRING";
|
|
1808
|
+
ExportCellTypeEnum[ExportCellTypeEnum["CURRENCY"] = 1] = "CURRENCY";
|
|
1809
|
+
ExportCellTypeEnum[ExportCellTypeEnum["DATE"] = 2] = "DATE";
|
|
1810
|
+
})(ExportCellTypeEnum || (ExportCellTypeEnum = {}));
|
|
1811
|
+
|
|
1812
|
+
class LoanPaymentCollection extends ExportableCollection {
|
|
1813
|
+
getExportHeader() {
|
|
1814
|
+
return [
|
|
1815
|
+
'Pmt No.',
|
|
1816
|
+
'Date',
|
|
1817
|
+
'Payment Due',
|
|
1818
|
+
'Interest Accrued',
|
|
1819
|
+
'Principal Paid',
|
|
1820
|
+
'Principal Balance',
|
|
1821
|
+
'Payout'
|
|
1822
|
+
];
|
|
1823
|
+
}
|
|
1824
|
+
getExportBody() {
|
|
1825
|
+
return this.items.map((payment) => {
|
|
1826
|
+
return [
|
|
1827
|
+
plainToClass(ExportCell, { value: payment.number, type: ExportCellTypeEnum.STRING }),
|
|
1828
|
+
plainToClass(ExportCell, { value: payment.date, type: ExportCellTypeEnum.DATE }),
|
|
1829
|
+
plainToClass(ExportCell, { value: payment.paymentDue, type: ExportCellTypeEnum.CURRENCY }),
|
|
1830
|
+
plainToClass(ExportCell, { value: payment.interestAccrued, type: ExportCellTypeEnum.CURRENCY }),
|
|
1831
|
+
plainToClass(ExportCell, { value: payment.principalPaid, type: ExportCellTypeEnum.CURRENCY }),
|
|
1832
|
+
plainToClass(ExportCell, { value: payment.principalBalance, type: ExportCellTypeEnum.CURRENCY }),
|
|
1833
|
+
plainToClass(ExportCell, { value: payment.payout, type: ExportCellTypeEnum.CURRENCY }),
|
|
1834
|
+
];
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
get paymentDue() {
|
|
1838
|
+
return this.sumBy('paymentDue');
|
|
1839
|
+
}
|
|
1840
|
+
getByFinYear(finYear = new FinancialYear()) {
|
|
1841
|
+
return this.filter((payment) => {
|
|
1842
|
+
return new Date(payment.date) >= finYear.startDate &&
|
|
1843
|
+
new Date(payment.date) <= finYear.endDate;
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
getForCurrentYear() {
|
|
1847
|
+
return this.getByFinYear(new FinancialYear());
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
class Loan extends Loan$1 {
|
|
1852
|
+
/**
|
|
1853
|
+
* Check if loan type is related to LoanVehicleTypeEnum
|
|
1854
|
+
*/
|
|
1855
|
+
isVehicle() {
|
|
1856
|
+
return !this.bankAccount && this.type in LoanVehicleTypeEnum;
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Get the last payment for passed financial year
|
|
1860
|
+
* @param year financial year for filter
|
|
1861
|
+
*/
|
|
1862
|
+
getLastPaymentByYear(year) {
|
|
1863
|
+
const finYear = new FinancialYear(new Date(year.toString()));
|
|
1864
|
+
return last(this.payments.filter((payment) => payment.date > finYear.startDate && payment.date < finYear.endDate));
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* The size of loan interest
|
|
1868
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/212369955/Loans+vehicle+loans
|
|
1869
|
+
* @TODO Vik/Nicole: need to update documentation. Derek gave the right formulas to Mikhail
|
|
1870
|
+
*/
|
|
1871
|
+
getInterest() {
|
|
1872
|
+
return new LoanPaymentCollection(this.payments).paymentDue - this.amount;
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* The last payment size
|
|
1876
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/212369955/Loans+vehicle+loans
|
|
1877
|
+
* @TODO Vik/Nicole: need to update documentation. Derek gave the right formulas to Mikhail
|
|
1586
1878
|
*/
|
|
1587
1879
|
getBalloonPayment() {
|
|
1588
1880
|
const lastPaymentDueAmount = new LoanPaymentCollection(this.payments).last.paymentDue;
|
|
@@ -2065,6 +2357,11 @@ __decorate([
|
|
|
2065
2357
|
], SoleBusinessLossOffsetRule.prototype, "parent", void 0);
|
|
2066
2358
|
|
|
2067
2359
|
class SoleBusinessLoss extends SoleBusinessLoss$1 {
|
|
2360
|
+
constructor() {
|
|
2361
|
+
super(...arguments);
|
|
2362
|
+
this.openBalance = 0;
|
|
2363
|
+
this.financialYear = new FinancialYear().year;
|
|
2364
|
+
}
|
|
2068
2365
|
get hasOffset() {
|
|
2069
2366
|
return !!this.offsetRule;
|
|
2070
2367
|
}
|
|
@@ -4323,48 +4620,6 @@ __decorate([
|
|
|
4323
4620
|
class BankConnection$1 extends AbstractModel {
|
|
4324
4621
|
}
|
|
4325
4622
|
|
|
4326
|
-
class BasiqJob$1 extends AbstractModel {
|
|
4327
|
-
}
|
|
4328
|
-
|
|
4329
|
-
class BasiqJob extends BasiqJob$1 {
|
|
4330
|
-
}
|
|
4331
|
-
|
|
4332
|
-
class Bank$1 extends AbstractModel {
|
|
4333
|
-
}
|
|
4334
|
-
|
|
4335
|
-
var BankPopularEnum;
|
|
4336
|
-
(function (BankPopularEnum) {
|
|
4337
|
-
BankPopularEnum["BANKWEST"] = "Bank of Western Australia trading as BankWest";
|
|
4338
|
-
BankPopularEnum["ANZ"] = "Australia and New Zealand Banking Group Limited";
|
|
4339
|
-
BankPopularEnum["CBA"] = "Commonwealth Bank Australia";
|
|
4340
|
-
BankPopularEnum["WESTPAC"] = "Westpac Banking Corporation";
|
|
4341
|
-
BankPopularEnum["BENDIGO"] = "Bendigo and Adelaide Bank Limited";
|
|
4342
|
-
BankPopularEnum["ING_DIRECT"] = "ING Bank (Australia) Limited (trading as ING Direct)";
|
|
4343
|
-
BankPopularEnum["ST_GEORGE"] = "St. George Bank (a subsidiary of Westpac)";
|
|
4344
|
-
BankPopularEnum["SUNCORP"] = "Suncorp-Metway Limited";
|
|
4345
|
-
BankPopularEnum["CITIBANK"] = "Citibank";
|
|
4346
|
-
BankPopularEnum["BOQ"] = "Bank of Queensland Limited";
|
|
4347
|
-
})(BankPopularEnum || (BankPopularEnum = {}));
|
|
4348
|
-
|
|
4349
|
-
class Bank extends Bank$1 {
|
|
4350
|
-
getPhotoPlaceholder() {
|
|
4351
|
-
return this.name[0] + this.name[1];
|
|
4352
|
-
}
|
|
4353
|
-
getPhoto() {
|
|
4354
|
-
if (!this.logo) {
|
|
4355
|
-
return null;
|
|
4356
|
-
}
|
|
4357
|
-
return this.logo.includes('http') ? `${this.logo}` : `${localStorage.getItem('api_uri')}/${this.logo}`;
|
|
4358
|
-
}
|
|
4359
|
-
}
|
|
4360
|
-
__decorate([
|
|
4361
|
-
Transform(({ value }) => value ? value.replace(' ', '%20') : null)
|
|
4362
|
-
], Bank.prototype, "logo", void 0);
|
|
4363
|
-
__decorate([
|
|
4364
|
-
Transform(({ obj }) => Object.values(BankPopularEnum).includes(obj.name)),
|
|
4365
|
-
Expose()
|
|
4366
|
-
], Bank.prototype, "isPopular", void 0);
|
|
4367
|
-
|
|
4368
4623
|
var BankConnectionStatusEnum;
|
|
4369
4624
|
(function (BankConnectionStatusEnum) {
|
|
4370
4625
|
BankConnectionStatusEnum[BankConnectionStatusEnum["PENDING"] = 1] = "PENDING";
|
|
@@ -4549,198 +4804,250 @@ __decorate([
|
|
|
4549
4804
|
Transform(({ value }) => value === 4 ? BankAccountTypeEnum.LOAN : value)
|
|
4550
4805
|
], BankAccount.prototype, "type", void 0);
|
|
4551
4806
|
|
|
4552
|
-
const TYPE_LOAN = [
|
|
4553
|
-
BankAccountTypeEnum.CREDIT_CARD,
|
|
4554
|
-
BankAccountTypeEnum.LOAN
|
|
4555
|
-
];
|
|
4556
|
-
|
|
4557
4807
|
/**
|
|
4558
|
-
*
|
|
4808
|
+
* bank account collection UI class with frontend specific data
|
|
4559
4809
|
*/
|
|
4560
|
-
class
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
*/
|
|
4564
|
-
getByType(types, isExclude = false) {
|
|
4565
|
-
// get types always as array (if only one passed)
|
|
4566
|
-
const typesArray = concat(types);
|
|
4567
|
-
return this.items.filter((bankAccount) => {
|
|
4568
|
-
if (isExclude) {
|
|
4569
|
-
return !typesArray.includes(bankAccount.type);
|
|
4570
|
-
}
|
|
4571
|
-
return typesArray.includes(bankAccount.type);
|
|
4572
|
-
});
|
|
4573
|
-
}
|
|
4574
|
-
/**
|
|
4575
|
-
* get amount of initial loans
|
|
4576
|
-
*/
|
|
4577
|
-
getInitialLoanAmount() {
|
|
4578
|
-
return this.getByType(TYPE_LOAN)
|
|
4579
|
-
.reduce((sum, bankAccount) => {
|
|
4580
|
-
return sum += bankAccount.balances.length ? bankAccount.getOpeningBalance() : 0;
|
|
4581
|
-
}, 0);
|
|
4810
|
+
class BankAccountChartData {
|
|
4811
|
+
constructor(bankAccounts) {
|
|
4812
|
+
this.bankAccounts = bankAccounts;
|
|
4582
4813
|
}
|
|
4583
4814
|
/**
|
|
4584
|
-
*
|
|
4815
|
+
* set value of pie chart data
|
|
4585
4816
|
*/
|
|
4586
|
-
|
|
4587
|
-
return this.
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4817
|
+
getBalancePieChartData() {
|
|
4818
|
+
return this.bankAccounts.map((bankAccount) => {
|
|
4819
|
+
return {
|
|
4820
|
+
name: bankAccount.accountName,
|
|
4821
|
+
data: Math.abs(bankAccount.currentBalance)
|
|
4822
|
+
};
|
|
4823
|
+
});
|
|
4591
4824
|
}
|
|
4592
4825
|
/**
|
|
4593
|
-
*
|
|
4826
|
+
* set value of bar chart data
|
|
4594
4827
|
*/
|
|
4595
|
-
|
|
4596
|
-
return
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4828
|
+
getBalanceBarChartData() {
|
|
4829
|
+
return [{
|
|
4830
|
+
name: 'Balance',
|
|
4831
|
+
data: this.bankAccounts.map((bankAccount) => {
|
|
4832
|
+
return {
|
|
4833
|
+
label: bankAccount.accountName,
|
|
4834
|
+
value: bankAccount.currentBalance
|
|
4835
|
+
};
|
|
4836
|
+
})
|
|
4837
|
+
}];
|
|
4601
4838
|
}
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
/**
|
|
4842
|
+
* Const which contains array of bank account types
|
|
4843
|
+
*/
|
|
4844
|
+
const BANK_ACCOUNT_TYPES = [
|
|
4845
|
+
{ key: BankAccountTypeEnum.CREDIT_CARD, value: 'Credit Card Accounts' },
|
|
4846
|
+
{ key: BankAccountTypeEnum.TERM_DEPOSIT, value: 'Deposit Accounts' },
|
|
4847
|
+
{ key: BankAccountTypeEnum.INVESTMENT, value: 'Investment Accounts' },
|
|
4848
|
+
{ key: BankAccountTypeEnum.LOAN, value: 'Loan Accounts' },
|
|
4849
|
+
{ key: BankAccountTypeEnum.OFFSET, value: 'Offset' },
|
|
4850
|
+
{ key: BankAccountTypeEnum.SAVINGS, value: 'Savings Accounts' },
|
|
4851
|
+
{ key: BankAccountTypeEnum.TRANSACTION, value: 'Transaction Accounts' },
|
|
4852
|
+
];
|
|
4853
|
+
|
|
4854
|
+
/**
|
|
4855
|
+
* Login data object for basiq banks
|
|
4856
|
+
*/
|
|
4857
|
+
class BankLoginData {
|
|
4858
|
+
}
|
|
4859
|
+
|
|
4860
|
+
/**
|
|
4861
|
+
* enum with months indexes.
|
|
4862
|
+
* item value match with js Date month index from 0 to 11
|
|
4863
|
+
* Order of items match with financial year months order
|
|
4864
|
+
*/
|
|
4865
|
+
var MonthNumberEnum;
|
|
4866
|
+
(function (MonthNumberEnum) {
|
|
4867
|
+
MonthNumberEnum[MonthNumberEnum["JULY"] = 6] = "JULY";
|
|
4868
|
+
MonthNumberEnum[MonthNumberEnum["AUGUST"] = 7] = "AUGUST";
|
|
4869
|
+
MonthNumberEnum[MonthNumberEnum["SEPTEMBER"] = 8] = "SEPTEMBER";
|
|
4870
|
+
MonthNumberEnum[MonthNumberEnum["OCTOBER"] = 9] = "OCTOBER";
|
|
4871
|
+
MonthNumberEnum[MonthNumberEnum["NOVEMBER"] = 10] = "NOVEMBER";
|
|
4872
|
+
MonthNumberEnum[MonthNumberEnum["DECEMBER"] = 11] = "DECEMBER";
|
|
4873
|
+
MonthNumberEnum[MonthNumberEnum["JANUARY"] = 0] = "JANUARY";
|
|
4874
|
+
MonthNumberEnum[MonthNumberEnum["FEBRUARY"] = 1] = "FEBRUARY";
|
|
4875
|
+
MonthNumberEnum[MonthNumberEnum["MARCH"] = 2] = "MARCH";
|
|
4876
|
+
MonthNumberEnum[MonthNumberEnum["APRIL"] = 3] = "APRIL";
|
|
4877
|
+
MonthNumberEnum[MonthNumberEnum["MAY"] = 4] = "MAY";
|
|
4878
|
+
MonthNumberEnum[MonthNumberEnum["JUNE"] = 5] = "JUNE";
|
|
4879
|
+
})(MonthNumberEnum || (MonthNumberEnum = {}));
|
|
4880
|
+
|
|
4881
|
+
/**
|
|
4882
|
+
* @TODO move to pipe/translation
|
|
4883
|
+
* enum with months short names.
|
|
4884
|
+
* Order of items match with financial year months order
|
|
4885
|
+
*/
|
|
4886
|
+
var MonthNameShortEnum;
|
|
4887
|
+
(function (MonthNameShortEnum) {
|
|
4888
|
+
MonthNameShortEnum["JULY"] = "Jul";
|
|
4889
|
+
MonthNameShortEnum["AUGUST"] = "Aug";
|
|
4890
|
+
MonthNameShortEnum["SEPTEMBER"] = "Sep";
|
|
4891
|
+
MonthNameShortEnum["OCTOBER"] = "Oct";
|
|
4892
|
+
MonthNameShortEnum["NOVEMBER"] = "Nov";
|
|
4893
|
+
MonthNameShortEnum["DECEMBER"] = "Dec";
|
|
4894
|
+
MonthNameShortEnum["JANUARY"] = "Jan";
|
|
4895
|
+
MonthNameShortEnum["FEBRUARY"] = "Feb";
|
|
4896
|
+
MonthNameShortEnum["MARCH"] = "Mar";
|
|
4897
|
+
MonthNameShortEnum["APRIL"] = "Apr";
|
|
4898
|
+
MonthNameShortEnum["MAY"] = "May";
|
|
4899
|
+
MonthNameShortEnum["JUNE"] = "Jun";
|
|
4900
|
+
})(MonthNameShortEnum || (MonthNameShortEnum = {}));
|
|
4901
|
+
|
|
4902
|
+
/**
|
|
4903
|
+
* bank transactions collection UI class with frontend specific data
|
|
4904
|
+
*/
|
|
4905
|
+
class BankTransactionChartData {
|
|
4906
|
+
constructor(bankTransactions) {
|
|
4907
|
+
this.bankTransactions = bankTransactions;
|
|
4611
4908
|
}
|
|
4612
4909
|
/**
|
|
4613
|
-
* get
|
|
4910
|
+
* get value of bar chart data
|
|
4614
4911
|
*/
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4912
|
+
getCashInOutBarChartData(months) {
|
|
4913
|
+
const chartData = this.calculateCashInOutBarChartData();
|
|
4914
|
+
if (!months) {
|
|
4915
|
+
return chartData;
|
|
4916
|
+
}
|
|
4917
|
+
return this.filterChartDataByMonths(months, chartData);
|
|
4619
4918
|
}
|
|
4620
4919
|
/**
|
|
4621
|
-
* get
|
|
4920
|
+
* get value of line chart data
|
|
4622
4921
|
*/
|
|
4623
|
-
|
|
4624
|
-
const
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
return 0;
|
|
4922
|
+
getBalanceLineChartData(months) {
|
|
4923
|
+
const chartData = this.calculateBalanceLineChartData();
|
|
4924
|
+
if (!months) {
|
|
4925
|
+
return chartData;
|
|
4628
4926
|
}
|
|
4629
|
-
return (
|
|
4927
|
+
return this.filterChartDataByMonths(months, chartData);
|
|
4630
4928
|
}
|
|
4631
4929
|
/**
|
|
4632
|
-
*
|
|
4930
|
+
* set bar chart data
|
|
4633
4931
|
*/
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4932
|
+
calculateCashInOutBarChartData() {
|
|
4933
|
+
const chartData = [{
|
|
4934
|
+
name: 'Cash In',
|
|
4935
|
+
data: []
|
|
4936
|
+
}, {
|
|
4937
|
+
name: 'Cash Out',
|
|
4938
|
+
data: []
|
|
4939
|
+
}];
|
|
4940
|
+
for (const key in MonthNameShortEnum) {
|
|
4941
|
+
if (MonthNameShortEnum.hasOwnProperty(key)) {
|
|
4942
|
+
const bankTransactionsForMonth = this.bankTransactions.filter((bankTransaction) => {
|
|
4943
|
+
return +bankTransaction.date.getMonth() === +MonthNumberEnum[key];
|
|
4944
|
+
});
|
|
4945
|
+
const cashInForMonth = bankTransactionsForMonth
|
|
4946
|
+
.filter((bankTransaction) => bankTransaction.isCredit())
|
|
4947
|
+
.reduce((sum, bankTransaction) => sum += bankTransaction.allocatedAmount, 0);
|
|
4948
|
+
const cashOutForMonth = bankTransactionsForMonth
|
|
4949
|
+
.filter((bankTransaction) => bankTransaction.isDebit())
|
|
4950
|
+
.reduce((sum, bankTransaction) => sum += bankTransaction.allocatedAmount, 0);
|
|
4951
|
+
chartData[0].data.push({
|
|
4952
|
+
label: MonthNameShortEnum[key],
|
|
4953
|
+
value: cashInForMonth
|
|
4954
|
+
});
|
|
4955
|
+
chartData[1].data.push({
|
|
4956
|
+
label: MonthNameShortEnum[key],
|
|
4957
|
+
value: cashOutForMonth
|
|
4958
|
+
});
|
|
4959
|
+
}
|
|
4960
|
+
}
|
|
4961
|
+
return chartData;
|
|
4645
4962
|
}
|
|
4646
4963
|
/**
|
|
4647
|
-
*
|
|
4964
|
+
* set line chart data
|
|
4648
4965
|
*/
|
|
4649
|
-
|
|
4650
|
-
|
|
4966
|
+
calculateBalanceLineChartData() {
|
|
4967
|
+
const chartData = [{
|
|
4968
|
+
name: 'Balance',
|
|
4969
|
+
data: []
|
|
4970
|
+
}];
|
|
4971
|
+
for (const key in MonthNameShortEnum) {
|
|
4972
|
+
if (MonthNameShortEnum.hasOwnProperty(key)) {
|
|
4973
|
+
const bankTransactionsForMonth = this.bankTransactions.filter((bankTransaction) => {
|
|
4974
|
+
return +bankTransaction.date.getMonth() === +MonthNumberEnum[key];
|
|
4975
|
+
});
|
|
4976
|
+
const balanceForMonth = bankTransactionsForMonth.reduce((sum, bankTransaction) => {
|
|
4977
|
+
if (bankTransaction.isCredit()) {
|
|
4978
|
+
return sum += bankTransaction.allocatedAmount;
|
|
4979
|
+
}
|
|
4980
|
+
else {
|
|
4981
|
+
return sum -= bankTransaction.allocatedAmount;
|
|
4982
|
+
}
|
|
4983
|
+
}, 0);
|
|
4984
|
+
chartData[0].data.push({
|
|
4985
|
+
label: MonthNameShortEnum[key],
|
|
4986
|
+
value: balanceForMonth
|
|
4987
|
+
});
|
|
4988
|
+
}
|
|
4989
|
+
}
|
|
4990
|
+
return chartData;
|
|
4651
4991
|
}
|
|
4652
4992
|
/**
|
|
4653
|
-
*
|
|
4993
|
+
* filter chart data for passed months
|
|
4654
4994
|
*/
|
|
4655
|
-
|
|
4656
|
-
|
|
4995
|
+
filterChartDataByMonths(months, chartData) {
|
|
4996
|
+
const monthsNames = months.map((month) => MonthNumberEnum[month]).map((key) => MonthNameShortEnum[key]);
|
|
4997
|
+
const filteredChartData = cloneDeep$1(chartData);
|
|
4998
|
+
filteredChartData.forEach((chartDataItem) => {
|
|
4999
|
+
chartDataItem.data = chartDataItem.data.filter((serie) => monthsNames.includes(serie.label));
|
|
5000
|
+
});
|
|
5001
|
+
return filteredChartData;
|
|
4657
5002
|
}
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
5003
|
+
}
|
|
5004
|
+
|
|
5005
|
+
var BankTransactionSummaryFieldsEnum;
|
|
5006
|
+
(function (BankTransactionSummaryFieldsEnum) {
|
|
5007
|
+
BankTransactionSummaryFieldsEnum["AMOUNT"] = "amount";
|
|
5008
|
+
BankTransactionSummaryFieldsEnum["ALLOCATED_AMOUNT"] = "allocatedAmount";
|
|
5009
|
+
})(BankTransactionSummaryFieldsEnum || (BankTransactionSummaryFieldsEnum = {}));
|
|
5010
|
+
|
|
5011
|
+
class Document$1 extends AbstractModel {
|
|
5012
|
+
}
|
|
5013
|
+
|
|
5014
|
+
/**
|
|
5015
|
+
* Enum with document types which used to API url prefix
|
|
5016
|
+
*/
|
|
5017
|
+
var DocumentApiUrlPrefixEnum;
|
|
5018
|
+
(function (DocumentApiUrlPrefixEnum) {
|
|
5019
|
+
DocumentApiUrlPrefixEnum["FOLDERS"] = "folders";
|
|
5020
|
+
DocumentApiUrlPrefixEnum["PROPERTIES"] = "properties";
|
|
5021
|
+
})(DocumentApiUrlPrefixEnum || (DocumentApiUrlPrefixEnum = {}));
|
|
5022
|
+
|
|
5023
|
+
class Document extends Document$1 {
|
|
5024
|
+
constructor() {
|
|
5025
|
+
super(...arguments);
|
|
5026
|
+
this.type = AssetTypeEnum.DOCUMENTS;
|
|
5027
|
+
this.entityType = AssetEntityTypeEnum.FOLDERS;
|
|
4663
5028
|
}
|
|
4664
5029
|
/**
|
|
4665
|
-
* Get
|
|
5030
|
+
* Get folder as document parent entity
|
|
4666
5031
|
*/
|
|
4667
|
-
|
|
4668
|
-
return
|
|
4669
|
-
return bankAccount.bankAccountProperties;
|
|
4670
|
-
}));
|
|
5032
|
+
getEntity() {
|
|
5033
|
+
return this.folder;
|
|
4671
5034
|
}
|
|
4672
5035
|
/**
|
|
4673
|
-
* Get
|
|
5036
|
+
* Get API url prefix
|
|
4674
5037
|
*/
|
|
4675
|
-
|
|
4676
|
-
return
|
|
4677
|
-
return bankAccountProperty.property;
|
|
4678
|
-
}), 'id');
|
|
4679
|
-
}
|
|
4680
|
-
getPropertyBalanceAmount(propertyId) {
|
|
4681
|
-
return this.items.reduce((sum, bankAccount) => {
|
|
4682
|
-
return sum + bankAccount.getPropertyBalanceAmount(propertyId);
|
|
4683
|
-
}, 0);
|
|
5038
|
+
getApiUrlPrefix() {
|
|
5039
|
+
return DocumentApiUrlPrefixEnum.FOLDERS;
|
|
4684
5040
|
}
|
|
4685
5041
|
}
|
|
4686
5042
|
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["REGISTERED"] = 1000] = "REGISTERED";
|
|
4690
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PASSWORD_RESET_REQUEST"] = 1001] = "PASSWORD_RESET_REQUEST";
|
|
4691
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["APP_FEATURES"] = 1010] = "APP_FEATURES";
|
|
4692
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIBED"] = 2000] = "SUBSCRIBED";
|
|
4693
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["UNSUBSCRIBED"] = 2001] = "UNSUBSCRIBED";
|
|
4694
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIPTION_UPDATE"] = 2004] = "SUBSCRIPTION_UPDATE";
|
|
4695
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIPTION_TRIAL_UPDATE"] = 2005] = "SUBSCRIPTION_TRIAL_UPDATE";
|
|
4696
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["SUBSCRIPTION_PAYMENT_FAILED"] = 2006] = "SUBSCRIPTION_PAYMENT_FAILED";
|
|
4697
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE"] = 2010] = "CLIENT_INVITE";
|
|
4698
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_TO_REGISTER"] = 2011] = "CLIENT_INVITE_TO_REGISTER";
|
|
4699
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_ACCEPTED"] = 2012] = "FIRM_INVITE_ACCEPTED";
|
|
4700
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_REJECTED"] = 2013] = "FIRM_INVITE_REJECTED";
|
|
4701
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_REGISTERED"] = 2014] = "FIRM_INVITE_REGISTERED";
|
|
4702
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE"] = 2020] = "PROPERTY_SHARE_INVITE";
|
|
4703
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_TO_REGISTER"] = 2021] = "PROPERTY_SHARE_INVITE_TO_REGISTER";
|
|
4704
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_ACCEPTED"] = 2022] = "PROPERTY_SHARE_INVITE_ACCEPTED";
|
|
4705
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_REJECTED"] = 2023] = "PROPERTY_SHARE_INVITE_REJECTED";
|
|
4706
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_INVITE_REGISTERED"] = 2024] = "PROPERTY_SHARE_INVITE_REGISTERED";
|
|
4707
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_CHANGE_REQUESTED"] = 2025] = "PROPERTY_SHARE_CHANGE_REQUESTED";
|
|
4708
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_CHANGE_ACCEPTED"] = 2026] = "PROPERTY_SHARE_CHANGE_ACCEPTED";
|
|
4709
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["PROPERTY_SHARE_CHANGE_REJECTED"] = 2027] = "PROPERTY_SHARE_CHANGE_REJECTED";
|
|
4710
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["OWNER_SUBSCRIBED"] = 2028] = "OWNER_SUBSCRIBED";
|
|
4711
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["OWNER_UNSUBSCRIBED"] = 2029] = "OWNER_UNSUBSCRIBED";
|
|
4712
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["BASIQ_NEW_ACCOUNTS"] = 2030] = "BASIQ_NEW_ACCOUNTS";
|
|
4713
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["BASIQ_FIRST_IMPORT_COMPLETE"] = 2031] = "BASIQ_FIRST_IMPORT_COMPLETE";
|
|
4714
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["BASIQ_AUTHORIZATION_FAIL"] = 2032] = "BASIQ_AUTHORIZATION_FAIL";
|
|
4715
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["TRANSACTION_ALLOCATE_REMINDER"] = 2033] = "TRANSACTION_ALLOCATE_REMINDER";
|
|
4716
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["REGISTRATION_INVITE"] = 2040] = "REGISTRATION_INVITE";
|
|
4717
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["REGISTRATION_INVITE_ACCEPTED"] = 2041] = "REGISTRATION_INVITE_ACCEPTED";
|
|
4718
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_EMAIL_CONFIRMED"] = 2050] = "CLIENT_EMAIL_CONFIRMED";
|
|
4719
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["TAX_REVIEW_REQUESTED"] = 2060] = "TAX_REVIEW_REQUESTED";
|
|
4720
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE_TO_REGISTER"] = 3000] = "FIRM_INVITE_TO_REGISTER";
|
|
4721
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_INVITE"] = 3001] = "FIRM_INVITE";
|
|
4722
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_ACCEPTED"] = 3002] = "CLIENT_INVITE_ACCEPTED";
|
|
4723
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_REJECTED"] = 3003] = "CLIENT_INVITE_REJECTED";
|
|
4724
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["CLIENT_INVITE_REGISTERED"] = 3004] = "CLIENT_INVITE_REGISTERED";
|
|
4725
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_NEW_CLIENT"] = 3005] = "FIRM_NEW_CLIENT";
|
|
4726
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["FIRM_LOST_CLIENT"] = 3006] = "FIRM_LOST_CLIENT";
|
|
4727
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_INVITE"] = 3010] = "EMPLOYEE_INVITE";
|
|
4728
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_LOST_CLIENT"] = 3011] = "EMPLOYEE_LOST_CLIENT";
|
|
4729
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_NEW_CLIENT"] = 3012] = "EMPLOYEE_NEW_CLIENT";
|
|
4730
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_INVITE_ACCEPTED"] = 3013] = "EMPLOYEE_INVITE_ACCEPTED";
|
|
4731
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["EMPLOYEE_EMAIL_CONFIRMED"] = 3020] = "EMPLOYEE_EMAIL_CONFIRMED";
|
|
4732
|
-
UserEventTypeTypeEnum[UserEventTypeTypeEnum["TAX_REVIEW_RECEIVED"] = 3030] = "TAX_REVIEW_RECEIVED";
|
|
4733
|
-
})(UserEventTypeTypeEnum || (UserEventTypeTypeEnum = {}));
|
|
5043
|
+
class DocumentFolder$1 extends AbstractModel {
|
|
5044
|
+
}
|
|
4734
5045
|
|
|
4735
|
-
|
|
4736
|
-
* any event happened in the app, which needs to be handled somehow (distributed to other part of the app)
|
|
4737
|
-
*/
|
|
4738
|
-
class AppEvent {
|
|
4739
|
-
constructor(type, payload) {
|
|
4740
|
-
this.type = type;
|
|
4741
|
-
this.payload = payload;
|
|
4742
|
-
}
|
|
5046
|
+
class DocumentFolder extends DocumentFolder$1 {
|
|
4743
5047
|
}
|
|
5048
|
+
__decorate([
|
|
5049
|
+
Type(() => Document)
|
|
5050
|
+
], DocumentFolder.prototype, "documents", void 0);
|
|
4744
5051
|
|
|
4745
5052
|
/**
|
|
4746
5053
|
* BankConnection means user account at specific bank (usually each user has only one at the same bank)
|
|
@@ -4832,6 +5139,7 @@ class BasiqService extends RestService {
|
|
|
4832
5139
|
*/
|
|
4833
5140
|
listenEvents() {
|
|
4834
5141
|
this.listenNotifications();
|
|
5142
|
+
this.listenJobs();
|
|
4835
5143
|
}
|
|
4836
5144
|
/**
|
|
4837
5145
|
* Create a new Bank connection based on Basiq job.
|
|
@@ -4843,6 +5151,7 @@ class BasiqService extends RestService {
|
|
|
4843
5151
|
// Send login data to basiq API to create a basiq job
|
|
4844
5152
|
return this.http.post(`${BasiqService.basiqApiUrl}/users/${userId}/connections`, loginData)
|
|
4845
5153
|
.pipe(mergeMap((response) => {
|
|
5154
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.BASIQ_JOB_CREATED, response.id));
|
|
4846
5155
|
// Create bank connection based on basiq job
|
|
4847
5156
|
return this.bankConnectionService.add(plainToClass(BankConnection, { basiqJob: { externalId: response.id } }));
|
|
4848
5157
|
}), catchError((error) => {
|
|
@@ -4863,8 +5172,12 @@ class BasiqService extends RestService {
|
|
|
4863
5172
|
// Send login data and connection id to basiq API to create a basiq job
|
|
4864
5173
|
return this.http.post(`${BasiqService.basiqApiUrl}/users/${userId}/connections`, Object.assign(data, { id: connection.externalId }))
|
|
4865
5174
|
.pipe(mergeMap((response) => {
|
|
5175
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.BASIQ_JOB_CREATED, response.id));
|
|
4866
5176
|
// Create bank connection based on basiq job
|
|
4867
|
-
return this.bankConnectionService.add(plainToClass(BankConnection, {
|
|
5177
|
+
return this.bankConnectionService.add(plainToClass(BankConnection, {
|
|
5178
|
+
id: connection.id,
|
|
5179
|
+
basiqJob: { externalId: response.id }
|
|
5180
|
+
}));
|
|
4868
5181
|
}), catchError((error) => {
|
|
4869
5182
|
// Show error when user provided wrong login data
|
|
4870
5183
|
if (error.status === 401) {
|
|
@@ -4887,6 +5200,34 @@ class BasiqService extends RestService {
|
|
|
4887
5200
|
return bankAccounts.removeBy('accountId', savedAccounts.mapBy('accountId'));
|
|
4888
5201
|
}));
|
|
4889
5202
|
}
|
|
5203
|
+
/**
|
|
5204
|
+
* Get status of credentials verifying. Expected statuses: 'in-progress', 'failed' or 'success'
|
|
5205
|
+
* We send this request by interval until basiq return success or failed
|
|
5206
|
+
* @TODO Alex (TT-2431): check logic and try to remove subscribe, use pipes instead
|
|
5207
|
+
* @TODO Alex (TT-2431): implement some limit and handle (message or something) if basiq stuck
|
|
5208
|
+
* @TODO Alex (TT-2431): check logic and handle case when user cancelled loading
|
|
5209
|
+
*/
|
|
5210
|
+
checkBankCredentials(jobId) {
|
|
5211
|
+
this.http.get(`${BasiqService.basiqApiUrl}/jobs/${jobId}`)
|
|
5212
|
+
.pipe(
|
|
5213
|
+
// unsubscribe after each request to avoid wrong requests (example: user cancelled too long login and login to another bank, then we will send 2 different requests)
|
|
5214
|
+
take(1),
|
|
5215
|
+
// get verify-credentials step from basiq job
|
|
5216
|
+
map((response) => plainToClass(BasiqJobResponse, response).getVerifyCredentialsStep()),
|
|
5217
|
+
// check credentials status again if not finished
|
|
5218
|
+
filter((step) => {
|
|
5219
|
+
if (!step.isInProgress()) {
|
|
5220
|
+
return true;
|
|
5221
|
+
}
|
|
5222
|
+
setTimeout(() => {
|
|
5223
|
+
this.checkBankCredentials(jobId);
|
|
5224
|
+
}, BasiqService.bankCredintialsCheckInterval);
|
|
5225
|
+
return false;
|
|
5226
|
+
}))
|
|
5227
|
+
.subscribe((step) => {
|
|
5228
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.BASIQ_LOGIN_FINISHED, step.isSuccess()));
|
|
5229
|
+
});
|
|
5230
|
+
}
|
|
4890
5231
|
/**
|
|
4891
5232
|
* listen to notifications to update basiq accounts list
|
|
4892
5233
|
*/
|
|
@@ -4897,8 +5238,20 @@ class BasiqService extends RestService {
|
|
|
4897
5238
|
}
|
|
4898
5239
|
});
|
|
4899
5240
|
}
|
|
5241
|
+
/**
|
|
5242
|
+
* Listen Basiq job created to check its verify credentials status
|
|
5243
|
+
*/
|
|
5244
|
+
listenJobs() {
|
|
5245
|
+
this.eventDispatcherService.on(AppEventTypeEnum.BASIQ_JOB_CREATED).subscribe((jobId) => {
|
|
5246
|
+
this.checkBankCredentials(jobId);
|
|
5247
|
+
});
|
|
5248
|
+
}
|
|
4900
5249
|
}
|
|
4901
5250
|
BasiqService.basiqApiUrl = 'https://au-api.basiq.io';
|
|
5251
|
+
/**
|
|
5252
|
+
* Basiq does not provide a hook, so we have to check job status manually every x seconds
|
|
5253
|
+
*/
|
|
5254
|
+
BasiqService.bankCredintialsCheckInterval = 3000;
|
|
4902
5255
|
BasiqService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BasiqService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: BankConnectionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4903
5256
|
BasiqService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BasiqService, providedIn: 'root' });
|
|
4904
5257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BasiqService, decorators: [{
|
|
@@ -4911,19 +5264,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
4911
5264
|
args: ['environment']
|
|
4912
5265
|
}] }, { type: ToastService }, { type: BankConnectionService }]; } });
|
|
4913
5266
|
|
|
4914
|
-
/**
|
|
4915
|
-
* access token, needed to access basiq connect ui (https://github.com/basiqio/basiq-connect-ui)
|
|
4916
|
-
*/
|
|
4917
|
-
class BasiqToken {
|
|
4918
|
-
constructor(value, expiresAt) {
|
|
4919
|
-
this.value = value;
|
|
4920
|
-
this.expiresAt = expiresAt;
|
|
4921
|
-
}
|
|
4922
|
-
isExpired() {
|
|
4923
|
-
return this.expiresAt < new Date();
|
|
4924
|
-
}
|
|
4925
|
-
}
|
|
4926
|
-
|
|
4927
5267
|
class BasiqTokenService {
|
|
4928
5268
|
constructor(http, environment) {
|
|
4929
5269
|
this.http = http;
|
|
@@ -5165,6 +5505,12 @@ class UserService {
|
|
|
5165
5505
|
* Create basiq (if not exist yet) to provide access to basiq api
|
|
5166
5506
|
*/
|
|
5167
5507
|
createBasiq() {
|
|
5508
|
+
var _a;
|
|
5509
|
+
// no need to create basiqId if already exist
|
|
5510
|
+
// @TODO Alex (TT-2431): move this check to component or separated method
|
|
5511
|
+
if ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.basiqId) {
|
|
5512
|
+
return of(this.cache.basiqId);
|
|
5513
|
+
}
|
|
5168
5514
|
return this.http.post(`${this.environment.apiV2}/basiq/user`, {})
|
|
5169
5515
|
.pipe(map((basiqId) => {
|
|
5170
5516
|
this.cache = plainToClass(User, Object.assign(this.cache, { basiqId }));
|
|
@@ -5296,85 +5642,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
5296
5642
|
},
|
|
5297
5643
|
{
|
|
5298
5644
|
provide: HTTP_INTERCEPTORS,
|
|
5299
|
-
useClass: BasiqClientIdInterceptor,
|
|
5300
|
-
multi: true
|
|
5301
|
-
}
|
|
5302
|
-
]
|
|
5303
|
-
}]
|
|
5304
|
-
}] });
|
|
5305
|
-
|
|
5306
|
-
class TtCoreModule {
|
|
5307
|
-
static forRoot(environment) {
|
|
5308
|
-
localStorage.setItem('api_uri', environment['api_uri']);
|
|
5309
|
-
return {
|
|
5310
|
-
ngModule: TtCoreModule,
|
|
5311
|
-
providers: [
|
|
5312
|
-
{
|
|
5313
|
-
provide: 'environment',
|
|
5314
|
-
useValue: environment
|
|
5315
|
-
}
|
|
5316
|
-
]
|
|
5317
|
-
};
|
|
5318
|
-
}
|
|
5319
|
-
}
|
|
5320
|
-
TtCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5321
|
-
TtCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [CommonModule,
|
|
5322
|
-
InterceptorsModule] });
|
|
5323
|
-
TtCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [[
|
|
5324
|
-
CommonModule,
|
|
5325
|
-
InterceptorsModule
|
|
5326
|
-
]] });
|
|
5327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, decorators: [{
|
|
5328
|
-
type: NgModule,
|
|
5329
|
-
args: [{
|
|
5330
|
-
declarations: [],
|
|
5331
|
-
imports: [
|
|
5332
|
-
CommonModule,
|
|
5333
|
-
InterceptorsModule
|
|
5334
|
-
]
|
|
5335
|
-
}]
|
|
5336
|
-
}] });
|
|
5337
|
-
|
|
5338
|
-
class Document$1 extends AbstractModel {
|
|
5339
|
-
}
|
|
5340
|
-
|
|
5341
|
-
/**
|
|
5342
|
-
* Enum with document types which used to API url prefix
|
|
5343
|
-
*/
|
|
5344
|
-
var DocumentApiUrlPrefixEnum;
|
|
5345
|
-
(function (DocumentApiUrlPrefixEnum) {
|
|
5346
|
-
DocumentApiUrlPrefixEnum["FOLDERS"] = "folders";
|
|
5347
|
-
DocumentApiUrlPrefixEnum["PROPERTIES"] = "properties";
|
|
5348
|
-
})(DocumentApiUrlPrefixEnum || (DocumentApiUrlPrefixEnum = {}));
|
|
5349
|
-
|
|
5350
|
-
class Document extends Document$1 {
|
|
5351
|
-
constructor() {
|
|
5352
|
-
super(...arguments);
|
|
5353
|
-
this.type = AssetTypeEnum.DOCUMENTS;
|
|
5354
|
-
this.entityType = AssetEntityTypeEnum.FOLDERS;
|
|
5355
|
-
}
|
|
5356
|
-
/**
|
|
5357
|
-
* Get folder as document parent entity
|
|
5358
|
-
*/
|
|
5359
|
-
getEntity() {
|
|
5360
|
-
return this.folder;
|
|
5361
|
-
}
|
|
5362
|
-
/**
|
|
5363
|
-
* Get API url prefix
|
|
5364
|
-
*/
|
|
5365
|
-
getApiUrlPrefix() {
|
|
5366
|
-
return DocumentApiUrlPrefixEnum.FOLDERS;
|
|
5367
|
-
}
|
|
5368
|
-
}
|
|
5369
|
-
|
|
5370
|
-
class DocumentFolder$1 extends AbstractModel {
|
|
5371
|
-
}
|
|
5645
|
+
useClass: BasiqClientIdInterceptor,
|
|
5646
|
+
multi: true
|
|
5647
|
+
}
|
|
5648
|
+
]
|
|
5649
|
+
}]
|
|
5650
|
+
}] });
|
|
5372
5651
|
|
|
5373
|
-
class
|
|
5652
|
+
class TtCoreModule {
|
|
5653
|
+
static forRoot(environment) {
|
|
5654
|
+
localStorage.setItem('api_uri', environment['api_uri']);
|
|
5655
|
+
return {
|
|
5656
|
+
ngModule: TtCoreModule,
|
|
5657
|
+
providers: [
|
|
5658
|
+
{
|
|
5659
|
+
provide: 'environment',
|
|
5660
|
+
useValue: environment
|
|
5661
|
+
}
|
|
5662
|
+
]
|
|
5663
|
+
};
|
|
5664
|
+
}
|
|
5374
5665
|
}
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
]
|
|
5666
|
+
TtCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5667
|
+
TtCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [CommonModule,
|
|
5668
|
+
InterceptorsModule] });
|
|
5669
|
+
TtCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, imports: [[
|
|
5670
|
+
CommonModule,
|
|
5671
|
+
InterceptorsModule
|
|
5672
|
+
]] });
|
|
5673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TtCoreModule, decorators: [{
|
|
5674
|
+
type: NgModule,
|
|
5675
|
+
args: [{
|
|
5676
|
+
declarations: [],
|
|
5677
|
+
imports: [
|
|
5678
|
+
CommonModule,
|
|
5679
|
+
InterceptorsModule
|
|
5680
|
+
]
|
|
5681
|
+
}]
|
|
5682
|
+
}] });
|
|
5378
5683
|
|
|
5379
5684
|
class VehicleClaimCollection extends Collection {
|
|
5380
5685
|
/**
|
|
@@ -7490,222 +7795,6 @@ class Badge extends AbstractModel {
|
|
|
7490
7795
|
}
|
|
7491
7796
|
}
|
|
7492
7797
|
|
|
7493
|
-
/**
|
|
7494
|
-
* bank account collection UI class with frontend specific data
|
|
7495
|
-
*/
|
|
7496
|
-
class BankAccountChartData {
|
|
7497
|
-
constructor(bankAccounts) {
|
|
7498
|
-
this.bankAccounts = bankAccounts;
|
|
7499
|
-
}
|
|
7500
|
-
/**
|
|
7501
|
-
* set value of pie chart data
|
|
7502
|
-
*/
|
|
7503
|
-
getBalancePieChartData() {
|
|
7504
|
-
return this.bankAccounts.map((bankAccount) => {
|
|
7505
|
-
return {
|
|
7506
|
-
name: bankAccount.accountName,
|
|
7507
|
-
data: Math.abs(bankAccount.currentBalance)
|
|
7508
|
-
};
|
|
7509
|
-
});
|
|
7510
|
-
}
|
|
7511
|
-
/**
|
|
7512
|
-
* set value of bar chart data
|
|
7513
|
-
*/
|
|
7514
|
-
getBalanceBarChartData() {
|
|
7515
|
-
return [{
|
|
7516
|
-
name: 'Balance',
|
|
7517
|
-
data: this.bankAccounts.map((bankAccount) => {
|
|
7518
|
-
return {
|
|
7519
|
-
label: bankAccount.accountName,
|
|
7520
|
-
value: bankAccount.currentBalance
|
|
7521
|
-
};
|
|
7522
|
-
})
|
|
7523
|
-
}];
|
|
7524
|
-
}
|
|
7525
|
-
}
|
|
7526
|
-
|
|
7527
|
-
/**
|
|
7528
|
-
* Const which contains array of bank account types
|
|
7529
|
-
*/
|
|
7530
|
-
const BANK_ACCOUNT_TYPES = [
|
|
7531
|
-
{ key: BankAccountTypeEnum.CREDIT_CARD, value: 'Credit Card Accounts' },
|
|
7532
|
-
{ key: BankAccountTypeEnum.TERM_DEPOSIT, value: 'Deposit Accounts' },
|
|
7533
|
-
{ key: BankAccountTypeEnum.INVESTMENT, value: 'Investment Accounts' },
|
|
7534
|
-
{ key: BankAccountTypeEnum.LOAN, value: 'Loan Accounts' },
|
|
7535
|
-
{ key: BankAccountTypeEnum.OFFSET, value: 'Offset' },
|
|
7536
|
-
{ key: BankAccountTypeEnum.SAVINGS, value: 'Savings Accounts' },
|
|
7537
|
-
{ key: BankAccountTypeEnum.TRANSACTION, value: 'Transaction Accounts' },
|
|
7538
|
-
];
|
|
7539
|
-
|
|
7540
|
-
/**
|
|
7541
|
-
* Login data object for basiq banks
|
|
7542
|
-
*/
|
|
7543
|
-
class BankLoginData {
|
|
7544
|
-
}
|
|
7545
|
-
|
|
7546
|
-
/**
|
|
7547
|
-
* enum with months indexes.
|
|
7548
|
-
* item value match with js Date month index from 0 to 11
|
|
7549
|
-
* Order of items match with financial year months order
|
|
7550
|
-
*/
|
|
7551
|
-
var MonthNumberEnum;
|
|
7552
|
-
(function (MonthNumberEnum) {
|
|
7553
|
-
MonthNumberEnum[MonthNumberEnum["JULY"] = 6] = "JULY";
|
|
7554
|
-
MonthNumberEnum[MonthNumberEnum["AUGUST"] = 7] = "AUGUST";
|
|
7555
|
-
MonthNumberEnum[MonthNumberEnum["SEPTEMBER"] = 8] = "SEPTEMBER";
|
|
7556
|
-
MonthNumberEnum[MonthNumberEnum["OCTOBER"] = 9] = "OCTOBER";
|
|
7557
|
-
MonthNumberEnum[MonthNumberEnum["NOVEMBER"] = 10] = "NOVEMBER";
|
|
7558
|
-
MonthNumberEnum[MonthNumberEnum["DECEMBER"] = 11] = "DECEMBER";
|
|
7559
|
-
MonthNumberEnum[MonthNumberEnum["JANUARY"] = 0] = "JANUARY";
|
|
7560
|
-
MonthNumberEnum[MonthNumberEnum["FEBRUARY"] = 1] = "FEBRUARY";
|
|
7561
|
-
MonthNumberEnum[MonthNumberEnum["MARCH"] = 2] = "MARCH";
|
|
7562
|
-
MonthNumberEnum[MonthNumberEnum["APRIL"] = 3] = "APRIL";
|
|
7563
|
-
MonthNumberEnum[MonthNumberEnum["MAY"] = 4] = "MAY";
|
|
7564
|
-
MonthNumberEnum[MonthNumberEnum["JUNE"] = 5] = "JUNE";
|
|
7565
|
-
})(MonthNumberEnum || (MonthNumberEnum = {}));
|
|
7566
|
-
|
|
7567
|
-
/**
|
|
7568
|
-
* @TODO move to pipe/translation
|
|
7569
|
-
* enum with months short names.
|
|
7570
|
-
* Order of items match with financial year months order
|
|
7571
|
-
*/
|
|
7572
|
-
var MonthNameShortEnum;
|
|
7573
|
-
(function (MonthNameShortEnum) {
|
|
7574
|
-
MonthNameShortEnum["JULY"] = "Jul";
|
|
7575
|
-
MonthNameShortEnum["AUGUST"] = "Aug";
|
|
7576
|
-
MonthNameShortEnum["SEPTEMBER"] = "Sep";
|
|
7577
|
-
MonthNameShortEnum["OCTOBER"] = "Oct";
|
|
7578
|
-
MonthNameShortEnum["NOVEMBER"] = "Nov";
|
|
7579
|
-
MonthNameShortEnum["DECEMBER"] = "Dec";
|
|
7580
|
-
MonthNameShortEnum["JANUARY"] = "Jan";
|
|
7581
|
-
MonthNameShortEnum["FEBRUARY"] = "Feb";
|
|
7582
|
-
MonthNameShortEnum["MARCH"] = "Mar";
|
|
7583
|
-
MonthNameShortEnum["APRIL"] = "Apr";
|
|
7584
|
-
MonthNameShortEnum["MAY"] = "May";
|
|
7585
|
-
MonthNameShortEnum["JUNE"] = "Jun";
|
|
7586
|
-
})(MonthNameShortEnum || (MonthNameShortEnum = {}));
|
|
7587
|
-
|
|
7588
|
-
/**
|
|
7589
|
-
* bank transactions collection UI class with frontend specific data
|
|
7590
|
-
*/
|
|
7591
|
-
class BankTransactionChartData {
|
|
7592
|
-
constructor(bankTransactions) {
|
|
7593
|
-
this.bankTransactions = bankTransactions;
|
|
7594
|
-
}
|
|
7595
|
-
/**
|
|
7596
|
-
* get value of bar chart data
|
|
7597
|
-
*/
|
|
7598
|
-
getCashInOutBarChartData(months) {
|
|
7599
|
-
const chartData = this.calculateCashInOutBarChartData();
|
|
7600
|
-
if (!months) {
|
|
7601
|
-
return chartData;
|
|
7602
|
-
}
|
|
7603
|
-
return this.filterChartDataByMonths(months, chartData);
|
|
7604
|
-
}
|
|
7605
|
-
/**
|
|
7606
|
-
* get value of line chart data
|
|
7607
|
-
*/
|
|
7608
|
-
getBalanceLineChartData(months) {
|
|
7609
|
-
const chartData = this.calculateBalanceLineChartData();
|
|
7610
|
-
if (!months) {
|
|
7611
|
-
return chartData;
|
|
7612
|
-
}
|
|
7613
|
-
return this.filterChartDataByMonths(months, chartData);
|
|
7614
|
-
}
|
|
7615
|
-
/**
|
|
7616
|
-
* set bar chart data
|
|
7617
|
-
*/
|
|
7618
|
-
calculateCashInOutBarChartData() {
|
|
7619
|
-
const chartData = [{
|
|
7620
|
-
name: 'Cash In',
|
|
7621
|
-
data: []
|
|
7622
|
-
}, {
|
|
7623
|
-
name: 'Cash Out',
|
|
7624
|
-
data: []
|
|
7625
|
-
}];
|
|
7626
|
-
for (const key in MonthNameShortEnum) {
|
|
7627
|
-
if (MonthNameShortEnum.hasOwnProperty(key)) {
|
|
7628
|
-
const bankTransactionsForMonth = this.bankTransactions.filter((bankTransaction) => {
|
|
7629
|
-
return +bankTransaction.date.getMonth() === +MonthNumberEnum[key];
|
|
7630
|
-
});
|
|
7631
|
-
const cashInForMonth = bankTransactionsForMonth
|
|
7632
|
-
.filter((bankTransaction) => bankTransaction.isCredit())
|
|
7633
|
-
.reduce((sum, bankTransaction) => sum += bankTransaction.allocatedAmount, 0);
|
|
7634
|
-
const cashOutForMonth = bankTransactionsForMonth
|
|
7635
|
-
.filter((bankTransaction) => bankTransaction.isDebit())
|
|
7636
|
-
.reduce((sum, bankTransaction) => sum += bankTransaction.allocatedAmount, 0);
|
|
7637
|
-
chartData[0].data.push({
|
|
7638
|
-
label: MonthNameShortEnum[key],
|
|
7639
|
-
value: cashInForMonth
|
|
7640
|
-
});
|
|
7641
|
-
chartData[1].data.push({
|
|
7642
|
-
label: MonthNameShortEnum[key],
|
|
7643
|
-
value: cashOutForMonth
|
|
7644
|
-
});
|
|
7645
|
-
}
|
|
7646
|
-
}
|
|
7647
|
-
return chartData;
|
|
7648
|
-
}
|
|
7649
|
-
/**
|
|
7650
|
-
* set line chart data
|
|
7651
|
-
*/
|
|
7652
|
-
calculateBalanceLineChartData() {
|
|
7653
|
-
const chartData = [{
|
|
7654
|
-
name: 'Balance',
|
|
7655
|
-
data: []
|
|
7656
|
-
}];
|
|
7657
|
-
for (const key in MonthNameShortEnum) {
|
|
7658
|
-
if (MonthNameShortEnum.hasOwnProperty(key)) {
|
|
7659
|
-
const bankTransactionsForMonth = this.bankTransactions.filter((bankTransaction) => {
|
|
7660
|
-
return +bankTransaction.date.getMonth() === +MonthNumberEnum[key];
|
|
7661
|
-
});
|
|
7662
|
-
const balanceForMonth = bankTransactionsForMonth.reduce((sum, bankTransaction) => {
|
|
7663
|
-
if (bankTransaction.isCredit()) {
|
|
7664
|
-
return sum += bankTransaction.allocatedAmount;
|
|
7665
|
-
}
|
|
7666
|
-
else {
|
|
7667
|
-
return sum -= bankTransaction.allocatedAmount;
|
|
7668
|
-
}
|
|
7669
|
-
}, 0);
|
|
7670
|
-
chartData[0].data.push({
|
|
7671
|
-
label: MonthNameShortEnum[key],
|
|
7672
|
-
value: balanceForMonth
|
|
7673
|
-
});
|
|
7674
|
-
}
|
|
7675
|
-
}
|
|
7676
|
-
return chartData;
|
|
7677
|
-
}
|
|
7678
|
-
/**
|
|
7679
|
-
* filter chart data for passed months
|
|
7680
|
-
*/
|
|
7681
|
-
filterChartDataByMonths(months, chartData) {
|
|
7682
|
-
const monthsNames = months.map((month) => MonthNumberEnum[month]).map((key) => MonthNameShortEnum[key]);
|
|
7683
|
-
const filteredChartData = cloneDeep$1(chartData);
|
|
7684
|
-
filteredChartData.forEach((chartDataItem) => {
|
|
7685
|
-
chartDataItem.data = chartDataItem.data.filter((serie) => monthsNames.includes(serie.label));
|
|
7686
|
-
});
|
|
7687
|
-
return filteredChartData;
|
|
7688
|
-
}
|
|
7689
|
-
}
|
|
7690
|
-
|
|
7691
|
-
var BankTransactionSummaryFieldsEnum;
|
|
7692
|
-
(function (BankTransactionSummaryFieldsEnum) {
|
|
7693
|
-
BankTransactionSummaryFieldsEnum["AMOUNT"] = "amount";
|
|
7694
|
-
BankTransactionSummaryFieldsEnum["ALLOCATED_AMOUNT"] = "allocatedAmount";
|
|
7695
|
-
})(BankTransactionSummaryFieldsEnum || (BankTransactionSummaryFieldsEnum = {}));
|
|
7696
|
-
|
|
7697
|
-
/**
|
|
7698
|
-
* Class describe configuration options for basiq connect control
|
|
7699
|
-
* https://www.npmjs.com/package/@basiq/basiq-connect-control
|
|
7700
|
-
*/
|
|
7701
|
-
class BasiqConfig {
|
|
7702
|
-
constructor(options) {
|
|
7703
|
-
// ID of the DOM element to which Basiq Connect Control will be rendered;
|
|
7704
|
-
this.containerId = 'basiq-control';
|
|
7705
|
-
Object.assign(this, options);
|
|
7706
|
-
}
|
|
7707
|
-
}
|
|
7708
|
-
|
|
7709
7798
|
class BorrowingExpense$1 extends AbstractModel {
|
|
7710
7799
|
}
|
|
7711
7800
|
|
|
@@ -16214,5 +16303,5 @@ VehicleLogbookForm.maxDescriptionLength = 60;
|
|
|
16214
16303
|
* Generated bundle index. Do not edit.
|
|
16215
16304
|
*/
|
|
16216
16305
|
|
|
16217
|
-
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, 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, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, 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, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertySaleTaxExemptionMetadataCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RewardfulService, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
|
|
16306
|
+
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqService, BasiqToken, BasiqTokenService, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, 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, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, 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, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertySaleTaxExemptionMetadataCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RewardfulService, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
|
|
16218
16307
|
//# sourceMappingURL=taxtank-core.js.map
|