taxtank-core 0.30.122 → 0.30.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/forms/abstract.form.mjs +11 -1
- package/esm2020/lib/forms/transaction/transaction-base.form.mjs +2 -2
- package/esm2020/lib/interceptors/jwt-interceptor.mjs +1 -1
- package/esm2020/lib/models/firm/firm.mjs +3 -3
- package/fesm2015/taxtank-core.mjs +61 -51
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +61 -51
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/forms/abstract.form.d.ts +4 -0
- package/lib/models/firm/firm.d.ts +3 -3
- package/package.json +1 -1
|
@@ -2116,6 +2116,56 @@ __decorate([
|
|
|
2116
2116
|
Type(() => Country)
|
|
2117
2117
|
], Phone.prototype, "country", void 0);
|
|
2118
2118
|
|
|
2119
|
+
var MyAccountHistoryInitiatedByEnum;
|
|
2120
|
+
(function (MyAccountHistoryInitiatedByEnum) {
|
|
2121
|
+
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["OWNER"] = 0] = "OWNER";
|
|
2122
|
+
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
2123
|
+
})(MyAccountHistoryInitiatedByEnum || (MyAccountHistoryInitiatedByEnum = {}));
|
|
2124
|
+
|
|
2125
|
+
var MyAccountHistoryStatusEnum;
|
|
2126
|
+
(function (MyAccountHistoryStatusEnum) {
|
|
2127
|
+
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["SUCCESS"] = 0] = "SUCCESS";
|
|
2128
|
+
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["ERROR"] = 1] = "ERROR";
|
|
2129
|
+
})(MyAccountHistoryStatusEnum || (MyAccountHistoryStatusEnum = {}));
|
|
2130
|
+
|
|
2131
|
+
var MyAccountHistoryTypeEnum;
|
|
2132
|
+
(function (MyAccountHistoryTypeEnum) {
|
|
2133
|
+
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["REVIEW"] = 0] = "REVIEW";
|
|
2134
|
+
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPGRADE_PLAN"] = 1] = "UPGRADE_PLAN";
|
|
2135
|
+
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPLOAD_DOCUMENT"] = 2] = "UPLOAD_DOCUMENT";
|
|
2136
|
+
})(MyAccountHistoryTypeEnum || (MyAccountHistoryTypeEnum = {}));
|
|
2137
|
+
|
|
2138
|
+
class MyAccountHistory {
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
class Occupation extends Occupation$1 {
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* role hierarchy
|
|
2146
|
+
*/
|
|
2147
|
+
const USER_ROLES = {
|
|
2148
|
+
ROLE_FIRM_OWNER: [UserRolesEnum.FIRM_OWNER, UserRolesEnum.FIRM_MANAGER, UserRolesEnum.ACCOUNTANT, UserRolesEnum.ADVISOR],
|
|
2149
|
+
ROLE_FIRM_MANAGER: [UserRolesEnum.FIRM_MANAGER, UserRolesEnum.ACCOUNTANT, UserRolesEnum.ADVISOR],
|
|
2150
|
+
ROLE_EMPLOYEE: [UserRolesEnum.ACCOUNTANT, UserRolesEnum.ADVISOR],
|
|
2151
|
+
ROLE_ACCOUNTANT: [UserRolesEnum.ACCOUNTANT],
|
|
2152
|
+
ROLE_ADVISOR: [UserRolesEnum.ADVISOR],
|
|
2153
|
+
// @TODO makes no sense, these roles can't be hierarchical
|
|
2154
|
+
ROLE_CLIENT: [UserRolesEnum.CLIENT],
|
|
2155
|
+
ROLE_USER_SUBSCRIPTION: [UserRolesEnum.SUBSCRIPTION],
|
|
2156
|
+
ROLE_USER_WORK: [UserRolesEnum.WORK_TANK],
|
|
2157
|
+
ROLE_USER_PROPERTY: [UserRolesEnum.PROPERTY_TANK],
|
|
2158
|
+
ROLE_USER_SOLE: [UserRolesEnum.SOLE_TANK],
|
|
2159
|
+
ROLE_USER_HOLDING: [UserRolesEnum.HOLDING_TANK],
|
|
2160
|
+
ROLE_PREVIOUS_ADMIN: [UserRolesEnum.SWITCH_USER],
|
|
2161
|
+
};
|
|
2162
|
+
|
|
2163
|
+
/**
|
|
2164
|
+
* Class with basic information about registering user
|
|
2165
|
+
*/
|
|
2166
|
+
class UserToRegister {
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2119
2169
|
class Firm extends Firm$1 {
|
|
2120
2170
|
/**
|
|
2121
2171
|
* get firm photo link
|
|
@@ -4300,56 +4350,6 @@ class DepreciationReceipt extends DepreciationReceipt$1 {
|
|
|
4300
4350
|
}
|
|
4301
4351
|
}
|
|
4302
4352
|
|
|
4303
|
-
var MyAccountHistoryInitiatedByEnum;
|
|
4304
|
-
(function (MyAccountHistoryInitiatedByEnum) {
|
|
4305
|
-
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["OWNER"] = 0] = "OWNER";
|
|
4306
|
-
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
4307
|
-
})(MyAccountHistoryInitiatedByEnum || (MyAccountHistoryInitiatedByEnum = {}));
|
|
4308
|
-
|
|
4309
|
-
var MyAccountHistoryStatusEnum;
|
|
4310
|
-
(function (MyAccountHistoryStatusEnum) {
|
|
4311
|
-
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["SUCCESS"] = 0] = "SUCCESS";
|
|
4312
|
-
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["ERROR"] = 1] = "ERROR";
|
|
4313
|
-
})(MyAccountHistoryStatusEnum || (MyAccountHistoryStatusEnum = {}));
|
|
4314
|
-
|
|
4315
|
-
var MyAccountHistoryTypeEnum;
|
|
4316
|
-
(function (MyAccountHistoryTypeEnum) {
|
|
4317
|
-
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["REVIEW"] = 0] = "REVIEW";
|
|
4318
|
-
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPGRADE_PLAN"] = 1] = "UPGRADE_PLAN";
|
|
4319
|
-
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPLOAD_DOCUMENT"] = 2] = "UPLOAD_DOCUMENT";
|
|
4320
|
-
})(MyAccountHistoryTypeEnum || (MyAccountHistoryTypeEnum = {}));
|
|
4321
|
-
|
|
4322
|
-
class MyAccountHistory {
|
|
4323
|
-
}
|
|
4324
|
-
|
|
4325
|
-
class Occupation extends Occupation$1 {
|
|
4326
|
-
}
|
|
4327
|
-
|
|
4328
|
-
/**
|
|
4329
|
-
* role hierarchy
|
|
4330
|
-
*/
|
|
4331
|
-
const USER_ROLES = {
|
|
4332
|
-
ROLE_FIRM_OWNER: [UserRolesEnum.FIRM_OWNER, UserRolesEnum.FIRM_MANAGER, UserRolesEnum.ACCOUNTANT, UserRolesEnum.ADVISOR],
|
|
4333
|
-
ROLE_FIRM_MANAGER: [UserRolesEnum.FIRM_MANAGER, UserRolesEnum.ACCOUNTANT, UserRolesEnum.ADVISOR],
|
|
4334
|
-
ROLE_EMPLOYEE: [UserRolesEnum.ACCOUNTANT, UserRolesEnum.ADVISOR],
|
|
4335
|
-
ROLE_ACCOUNTANT: [UserRolesEnum.ACCOUNTANT],
|
|
4336
|
-
ROLE_ADVISOR: [UserRolesEnum.ADVISOR],
|
|
4337
|
-
// @TODO makes no sense, these roles can't be hierarchical
|
|
4338
|
-
ROLE_CLIENT: [UserRolesEnum.CLIENT],
|
|
4339
|
-
ROLE_USER_SUBSCRIPTION: [UserRolesEnum.SUBSCRIPTION],
|
|
4340
|
-
ROLE_USER_WORK: [UserRolesEnum.WORK_TANK],
|
|
4341
|
-
ROLE_USER_PROPERTY: [UserRolesEnum.PROPERTY_TANK],
|
|
4342
|
-
ROLE_USER_SOLE: [UserRolesEnum.SOLE_TANK],
|
|
4343
|
-
ROLE_USER_HOLDING: [UserRolesEnum.HOLDING_TANK],
|
|
4344
|
-
ROLE_PREVIOUS_ADMIN: [UserRolesEnum.SWITCH_USER],
|
|
4345
|
-
};
|
|
4346
|
-
|
|
4347
|
-
/**
|
|
4348
|
-
* Class with basic information about registering user
|
|
4349
|
-
*/
|
|
4350
|
-
class UserToRegister {
|
|
4351
|
-
}
|
|
4352
|
-
|
|
4353
4353
|
class SoleBusinessAllocation extends SoleBusinessAllocation$1 {
|
|
4354
4354
|
}
|
|
4355
4355
|
__decorate([
|
|
@@ -20139,6 +20139,16 @@ class AbstractForm extends UntypedFormGroup {
|
|
|
20139
20139
|
!!this.model && !!this.model['id'] && isEqual(this.value, this.initialValue) ? this.markAsSaved() : this.markAsUnsaved();
|
|
20140
20140
|
});
|
|
20141
20141
|
}
|
|
20142
|
+
/**
|
|
20143
|
+
* upgraded version of patchValue to skip duplicated changes
|
|
20144
|
+
*/
|
|
20145
|
+
patchField(name, value, distinctUntilChanged = true) {
|
|
20146
|
+
const control = this.get(name);
|
|
20147
|
+
if (distinctUntilChanged && control.value === value) {
|
|
20148
|
+
return;
|
|
20149
|
+
}
|
|
20150
|
+
control.patchValue(value);
|
|
20151
|
+
}
|
|
20142
20152
|
}
|
|
20143
20153
|
|
|
20144
20154
|
/**
|
|
@@ -22674,7 +22684,7 @@ class TransactionBaseForm extends AbstractForm {
|
|
|
22674
22684
|
this.get('gstAmount').patchValue(this.amountWithGST - this.amount);
|
|
22675
22685
|
}
|
|
22676
22686
|
updateAmount() {
|
|
22677
|
-
this.
|
|
22687
|
+
this.patchField('amount', this.isGST ? this.amountWithGST / ChartAccounts.GSTCoefficient : this.amountWithGST);
|
|
22678
22688
|
}
|
|
22679
22689
|
isGstApplicable() {
|
|
22680
22690
|
return !!this.registeredForGst && !!this.model.business;
|