taxtank-core 0.29.10 → 0.29.13
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 +151 -164
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Models/sole/sole-invoice-template.js +1 -1
- package/esm2015/lib/forms/phone/phone.form.js +9 -7
- package/esm2015/lib/forms/sole/sole-contact.form.js +2 -4
- package/esm2015/lib/forms/sole/sole-invoice-template.form.js +1 -2
- package/esm2015/lib/models/property/property-document.js +2 -2
- package/esm2015/lib/models/sole/sole-invoice-template.js +2 -13
- package/esm2015/lib/models/sole/sole-invoice.js +5 -10
- package/fesm2015/taxtank-core.js +117 -129
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Models/sole/sole-invoice-template.d.ts +0 -2
- package/lib/models/sole/sole-invoice-template.d.ts +2 -7
- package/lib/models/sole/sole-invoice.d.ts +3 -5
- package/package.json +1 -1
|
@@ -3646,6 +3646,64 @@
|
|
|
3646
3646
|
classTransformer.Type(function () { return SoleBusinessLossOffsetRule; })
|
|
3647
3647
|
], SoleBusinessLoss.prototype, "offsetRule", void 0);
|
|
3648
3648
|
|
|
3649
|
+
exports.MyAccountHistoryInitiatedByEnum = void 0;
|
|
3650
|
+
(function (MyAccountHistoryInitiatedByEnum) {
|
|
3651
|
+
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["OWNER"] = 0] = "OWNER";
|
|
3652
|
+
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
3653
|
+
})(exports.MyAccountHistoryInitiatedByEnum || (exports.MyAccountHistoryInitiatedByEnum = {}));
|
|
3654
|
+
|
|
3655
|
+
exports.MyAccountHistoryStatusEnum = void 0;
|
|
3656
|
+
(function (MyAccountHistoryStatusEnum) {
|
|
3657
|
+
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["SUCCESS"] = 0] = "SUCCESS";
|
|
3658
|
+
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["ERROR"] = 1] = "ERROR";
|
|
3659
|
+
})(exports.MyAccountHistoryStatusEnum || (exports.MyAccountHistoryStatusEnum = {}));
|
|
3660
|
+
|
|
3661
|
+
exports.MyAccountHistoryTypeEnum = void 0;
|
|
3662
|
+
(function (MyAccountHistoryTypeEnum) {
|
|
3663
|
+
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["REVIEW"] = 0] = "REVIEW";
|
|
3664
|
+
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPGRADE_PLAN"] = 1] = "UPGRADE_PLAN";
|
|
3665
|
+
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPLOAD_DOCUMENT"] = 2] = "UPLOAD_DOCUMENT";
|
|
3666
|
+
})(exports.MyAccountHistoryTypeEnum || (exports.MyAccountHistoryTypeEnum = {}));
|
|
3667
|
+
|
|
3668
|
+
var MyAccountHistory = /** @class */ (function () {
|
|
3669
|
+
function MyAccountHistory() {
|
|
3670
|
+
}
|
|
3671
|
+
return MyAccountHistory;
|
|
3672
|
+
}());
|
|
3673
|
+
|
|
3674
|
+
var Occupation = /** @class */ (function (_super) {
|
|
3675
|
+
__extends(Occupation, _super);
|
|
3676
|
+
function Occupation() {
|
|
3677
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3678
|
+
}
|
|
3679
|
+
return Occupation;
|
|
3680
|
+
}(Occupation$1));
|
|
3681
|
+
|
|
3682
|
+
/**
|
|
3683
|
+
* role hierarchy
|
|
3684
|
+
*/
|
|
3685
|
+
var USER_ROLES = {
|
|
3686
|
+
ROLE_FIRM_OWNER: [exports.UserRolesEnum.FIRM_OWNER, exports.UserRolesEnum.FIRM_MANAGER, exports.UserRolesEnum.ACCOUNTANT, exports.UserRolesEnum.ADVISOR],
|
|
3687
|
+
ROLE_FIRM_MANAGER: [exports.UserRolesEnum.FIRM_MANAGER, exports.UserRolesEnum.ACCOUNTANT, exports.UserRolesEnum.ADVISOR],
|
|
3688
|
+
ROLE_EMPLOYEE: [exports.UserRolesEnum.ACCOUNTANT, exports.UserRolesEnum.ADVISOR],
|
|
3689
|
+
ROLE_ACCOUNTANT: [exports.UserRolesEnum.ACCOUNTANT],
|
|
3690
|
+
ROLE_ADVISOR: [exports.UserRolesEnum.ADVISOR],
|
|
3691
|
+
ROLE_CLIENT: [exports.UserRolesEnum.CLIENT],
|
|
3692
|
+
ROLE_USER_SUBSCRIPTION: [exports.UserRolesEnum.SUBSCRIPTION],
|
|
3693
|
+
ROLE_USER_WORK: [exports.UserRolesEnum.WORK_TANK],
|
|
3694
|
+
ROLE_USER_PROPERTY: [exports.UserRolesEnum.PROPERTY_TANK],
|
|
3695
|
+
ROLE_USER_SOLE: [exports.UserRolesEnum.SOLE_TANK],
|
|
3696
|
+
};
|
|
3697
|
+
|
|
3698
|
+
/**
|
|
3699
|
+
* Class with basic information about registering user
|
|
3700
|
+
*/
|
|
3701
|
+
var UserToRegister = /** @class */ (function () {
|
|
3702
|
+
function UserToRegister() {
|
|
3703
|
+
}
|
|
3704
|
+
return UserToRegister;
|
|
3705
|
+
}());
|
|
3706
|
+
|
|
3649
3707
|
var ChartAccountsHeading = /** @class */ (function (_super) {
|
|
3650
3708
|
__extends(ChartAccountsHeading, _super);
|
|
3651
3709
|
function ChartAccountsHeading() {
|
|
@@ -5380,67 +5438,6 @@
|
|
|
5380
5438
|
classTransformer.Type(function () { return SoleInvoice; })
|
|
5381
5439
|
], SoleContact.prototype, "invoices", void 0);
|
|
5382
5440
|
|
|
5383
|
-
exports.SoleInvoiceTemplateTaxTypeEnum = void 0;
|
|
5384
|
-
(function (SoleInvoiceTemplateTaxTypeEnum) {
|
|
5385
|
-
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["TAX_EXCLUSIVE"] = 0] = "TAX_EXCLUSIVE";
|
|
5386
|
-
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["TAX_INCLUSIVE"] = 1] = "TAX_INCLUSIVE";
|
|
5387
|
-
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["NO_TAX"] = 2] = "NO_TAX";
|
|
5388
|
-
})(exports.SoleInvoiceTemplateTaxTypeEnum || (exports.SoleInvoiceTemplateTaxTypeEnum = {}));
|
|
5389
|
-
|
|
5390
|
-
/**
|
|
5391
|
-
* The model renamed for more comfortable work because File already exist in JS
|
|
5392
|
-
* @TODO Alex: consider a better name like document
|
|
5393
|
-
*/
|
|
5394
|
-
var AppFile = /** @class */ (function (_super) {
|
|
5395
|
-
__extends(AppFile, _super);
|
|
5396
|
-
function AppFile() {
|
|
5397
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5398
|
-
}
|
|
5399
|
-
return AppFile;
|
|
5400
|
-
}(File$1));
|
|
5401
|
-
|
|
5402
|
-
var SoleInvoiceTemplate = /** @class */ (function (_super) {
|
|
5403
|
-
__extends(SoleInvoiceTemplate, _super);
|
|
5404
|
-
function SoleInvoiceTemplate() {
|
|
5405
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
5406
|
-
/**
|
|
5407
|
-
* Affects to SoleInvoiceItem.isGST flag availability.
|
|
5408
|
-
* When NONE: isGST is unavailable
|
|
5409
|
-
* When EXCLUSIVE: GST amount added additionaly to invoice total price
|
|
5410
|
-
* When INCLUSIVE: GST amount is already included to invoice total price
|
|
5411
|
-
*/
|
|
5412
|
-
_this.taxType = exports.SoleInvoiceTemplateTaxTypeEnum.NO_TAX;
|
|
5413
|
-
return _this;
|
|
5414
|
-
}
|
|
5415
|
-
Object.defineProperty(SoleInvoiceTemplate.prototype, "termTime", {
|
|
5416
|
-
/**
|
|
5417
|
-
* Get term duration in milliseconds
|
|
5418
|
-
*/
|
|
5419
|
-
get: function () {
|
|
5420
|
-
return this.term * 24 * 3600 * 1000;
|
|
5421
|
-
},
|
|
5422
|
-
enumerable: false,
|
|
5423
|
-
configurable: true
|
|
5424
|
-
});
|
|
5425
|
-
SoleInvoiceTemplate.prototype.getPhoto = function () {
|
|
5426
|
-
var _a;
|
|
5427
|
-
return ((_a = this.file) === null || _a === void 0 ? void 0 : _a.publicUrl) || null;
|
|
5428
|
-
};
|
|
5429
|
-
SoleInvoiceTemplate.prototype.getPhotoPlaceholder = function () {
|
|
5430
|
-
return "" + this.name[0].toUpperCase() + this.name[1].toUpperCase();
|
|
5431
|
-
};
|
|
5432
|
-
return SoleInvoiceTemplate;
|
|
5433
|
-
}(SoleInvoiceTemplate$1));
|
|
5434
|
-
__decorate([
|
|
5435
|
-
classTransformer.Type(function () { return SoleBusiness; })
|
|
5436
|
-
], SoleInvoiceTemplate.prototype, "business", void 0);
|
|
5437
|
-
__decorate([
|
|
5438
|
-
classTransformer.Type(function () { return BankAccount; })
|
|
5439
|
-
], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
|
|
5440
|
-
__decorate([
|
|
5441
|
-
classTransformer.Type(function () { return AppFile; })
|
|
5442
|
-
], SoleInvoiceTemplate.prototype, "file", void 0);
|
|
5443
|
-
|
|
5444
5441
|
exports.SoleInvoiceStatusesEnum = void 0;
|
|
5445
5442
|
(function (SoleInvoiceStatusesEnum) {
|
|
5446
5443
|
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["CANCELED"] = 0] = "CANCELED";
|
|
@@ -5456,21 +5453,6 @@
|
|
|
5456
5453
|
SoleInvoiceTaxTypeEnum[SoleInvoiceTaxTypeEnum["NO_TAX"] = 2] = "NO_TAX";
|
|
5457
5454
|
})(exports.SoleInvoiceTaxTypeEnum || (exports.SoleInvoiceTaxTypeEnum = {}));
|
|
5458
5455
|
|
|
5459
|
-
var SoleInvoiceItemCollection = /** @class */ (function (_super) {
|
|
5460
|
-
__extends(SoleInvoiceItemCollection, _super);
|
|
5461
|
-
function SoleInvoiceItemCollection() {
|
|
5462
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5463
|
-
}
|
|
5464
|
-
Object.defineProperty(SoleInvoiceItemCollection.prototype, "gstPrice", {
|
|
5465
|
-
get: function () {
|
|
5466
|
-
return this.filterBy('isGST', true).sumBy('totalPrice');
|
|
5467
|
-
},
|
|
5468
|
-
enumerable: false,
|
|
5469
|
-
configurable: true
|
|
5470
|
-
});
|
|
5471
|
-
return SoleInvoiceItemCollection;
|
|
5472
|
-
}(Collection));
|
|
5473
|
-
|
|
5474
5456
|
var SoleInvoice = /** @class */ (function (_super) {
|
|
5475
5457
|
__extends(SoleInvoice, _super);
|
|
5476
5458
|
function SoleInvoice() {
|
|
@@ -5635,13 +5617,49 @@
|
|
|
5635
5617
|
__decorate([
|
|
5636
5618
|
classTransformer.Type(function () { return SoleContact; })
|
|
5637
5619
|
], SoleInvoice.prototype, "payer", void 0);
|
|
5638
|
-
__decorate([
|
|
5639
|
-
classTransformer.Type(function () { return SoleInvoiceTemplate; })
|
|
5640
|
-
], SoleInvoice.prototype, "template", void 0);
|
|
5641
5620
|
__decorate([
|
|
5642
5621
|
classTransformer.Type(function () { return BankAccount; })
|
|
5643
5622
|
], SoleInvoice.prototype, "bankAccount", void 0);
|
|
5644
5623
|
|
|
5624
|
+
exports.SoleInvoiceTemplateTaxTypeEnum = void 0;
|
|
5625
|
+
(function (SoleInvoiceTemplateTaxTypeEnum) {
|
|
5626
|
+
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["TAX_EXCLUSIVE"] = 0] = "TAX_EXCLUSIVE";
|
|
5627
|
+
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["TAX_INCLUSIVE"] = 1] = "TAX_INCLUSIVE";
|
|
5628
|
+
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["NO_TAX"] = 2] = "NO_TAX";
|
|
5629
|
+
})(exports.SoleInvoiceTemplateTaxTypeEnum || (exports.SoleInvoiceTemplateTaxTypeEnum = {}));
|
|
5630
|
+
|
|
5631
|
+
var SoleInvoiceTemplate = /** @class */ (function (_super) {
|
|
5632
|
+
__extends(SoleInvoiceTemplate, _super);
|
|
5633
|
+
function SoleInvoiceTemplate() {
|
|
5634
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
5635
|
+
/**
|
|
5636
|
+
* Affects to SoleInvoiceItem.isGST flag availability.
|
|
5637
|
+
* When NONE: isGST is unavailable
|
|
5638
|
+
* When EXCLUSIVE: GST amount added additionaly to invoice total price
|
|
5639
|
+
* When INCLUSIVE: GST amount is already included to invoice total price
|
|
5640
|
+
*/
|
|
5641
|
+
_this.taxType = exports.SoleInvoiceTemplateTaxTypeEnum.NO_TAX;
|
|
5642
|
+
return _this;
|
|
5643
|
+
}
|
|
5644
|
+
Object.defineProperty(SoleInvoiceTemplate.prototype, "termTime", {
|
|
5645
|
+
/**
|
|
5646
|
+
* Get term duration in milliseconds
|
|
5647
|
+
*/
|
|
5648
|
+
get: function () {
|
|
5649
|
+
return this.term * 24 * 3600 * 1000;
|
|
5650
|
+
},
|
|
5651
|
+
enumerable: false,
|
|
5652
|
+
configurable: true
|
|
5653
|
+
});
|
|
5654
|
+
return SoleInvoiceTemplate;
|
|
5655
|
+
}(SoleInvoiceTemplate$1));
|
|
5656
|
+
__decorate([
|
|
5657
|
+
classTransformer.Type(function () { return SoleBusiness; })
|
|
5658
|
+
], SoleInvoiceTemplate.prototype, "business", void 0);
|
|
5659
|
+
__decorate([
|
|
5660
|
+
classTransformer.Type(function () { return BankAccount; })
|
|
5661
|
+
], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
|
|
5662
|
+
|
|
5645
5663
|
/**
|
|
5646
5664
|
* Class contains traveled kilometers and work usage percent in 12 weeks date range
|
|
5647
5665
|
* @TODO Vik: Best period: move this and related logic to backend
|
|
@@ -5975,22 +5993,6 @@
|
|
|
5975
5993
|
classTransformer.Type(function () { return Date; })
|
|
5976
5994
|
], BasReport.prototype, "dateTo", void 0);
|
|
5977
5995
|
|
|
5978
|
-
/**
|
|
5979
|
-
* role hierarchy
|
|
5980
|
-
*/
|
|
5981
|
-
var USER_ROLES = {
|
|
5982
|
-
ROLE_FIRM_OWNER: [exports.UserRolesEnum.FIRM_OWNER, exports.UserRolesEnum.FIRM_MANAGER, exports.UserRolesEnum.ACCOUNTANT, exports.UserRolesEnum.ADVISOR],
|
|
5983
|
-
ROLE_FIRM_MANAGER: [exports.UserRolesEnum.FIRM_MANAGER, exports.UserRolesEnum.ACCOUNTANT, exports.UserRolesEnum.ADVISOR],
|
|
5984
|
-
ROLE_EMPLOYEE: [exports.UserRolesEnum.ACCOUNTANT, exports.UserRolesEnum.ADVISOR],
|
|
5985
|
-
ROLE_ACCOUNTANT: [exports.UserRolesEnum.ACCOUNTANT],
|
|
5986
|
-
ROLE_ADVISOR: [exports.UserRolesEnum.ADVISOR],
|
|
5987
|
-
ROLE_CLIENT: [exports.UserRolesEnum.CLIENT],
|
|
5988
|
-
ROLE_USER_SUBSCRIPTION: [exports.UserRolesEnum.SUBSCRIPTION],
|
|
5989
|
-
ROLE_USER_WORK: [exports.UserRolesEnum.WORK_TANK],
|
|
5990
|
-
ROLE_USER_PROPERTY: [exports.UserRolesEnum.PROPERTY_TANK],
|
|
5991
|
-
ROLE_USER_SOLE: [exports.UserRolesEnum.SOLE_TANK],
|
|
5992
|
-
};
|
|
5993
|
-
|
|
5994
5996
|
var User = /** @class */ (function (_super) {
|
|
5995
5997
|
__extends(User, _super);
|
|
5996
5998
|
function User() {
|
|
@@ -6193,7 +6195,7 @@
|
|
|
6193
6195
|
__extends(PropertyDocument, _super);
|
|
6194
6196
|
function PropertyDocument() {
|
|
6195
6197
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
6196
|
-
_this.type = exports.AssetTypeEnum.
|
|
6198
|
+
_this.type = exports.AssetTypeEnum.PROPERTY;
|
|
6197
6199
|
_this.entityType = exports.AssetEntityTypeEnum.PROPERTIES;
|
|
6198
6200
|
return _this;
|
|
6199
6201
|
}
|
|
@@ -7423,6 +7425,18 @@
|
|
|
7423
7425
|
return Dictionary;
|
|
7424
7426
|
}());
|
|
7425
7427
|
|
|
7428
|
+
/**
|
|
7429
|
+
* The model renamed for more comfortable work because File already exist in JS
|
|
7430
|
+
* @TODO Alex: consider a better name like document
|
|
7431
|
+
*/
|
|
7432
|
+
var AppFile = /** @class */ (function (_super) {
|
|
7433
|
+
__extends(AppFile, _super);
|
|
7434
|
+
function AppFile() {
|
|
7435
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
7436
|
+
}
|
|
7437
|
+
return AppFile;
|
|
7438
|
+
}(File$1));
|
|
7439
|
+
|
|
7426
7440
|
var MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan'];
|
|
7427
7441
|
|
|
7428
7442
|
/**
|
|
@@ -8016,48 +8030,6 @@
|
|
|
8016
8030
|
ShareFilterOptionsEnum[ShareFilterOptionsEnum["SHARED"] = 3] = "SHARED";
|
|
8017
8031
|
})(exports.ShareFilterOptionsEnum || (exports.ShareFilterOptionsEnum = {}));
|
|
8018
8032
|
|
|
8019
|
-
exports.MyAccountHistoryInitiatedByEnum = void 0;
|
|
8020
|
-
(function (MyAccountHistoryInitiatedByEnum) {
|
|
8021
|
-
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["OWNER"] = 0] = "OWNER";
|
|
8022
|
-
MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
8023
|
-
})(exports.MyAccountHistoryInitiatedByEnum || (exports.MyAccountHistoryInitiatedByEnum = {}));
|
|
8024
|
-
|
|
8025
|
-
exports.MyAccountHistoryStatusEnum = void 0;
|
|
8026
|
-
(function (MyAccountHistoryStatusEnum) {
|
|
8027
|
-
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["SUCCESS"] = 0] = "SUCCESS";
|
|
8028
|
-
MyAccountHistoryStatusEnum[MyAccountHistoryStatusEnum["ERROR"] = 1] = "ERROR";
|
|
8029
|
-
})(exports.MyAccountHistoryStatusEnum || (exports.MyAccountHistoryStatusEnum = {}));
|
|
8030
|
-
|
|
8031
|
-
exports.MyAccountHistoryTypeEnum = void 0;
|
|
8032
|
-
(function (MyAccountHistoryTypeEnum) {
|
|
8033
|
-
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["REVIEW"] = 0] = "REVIEW";
|
|
8034
|
-
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPGRADE_PLAN"] = 1] = "UPGRADE_PLAN";
|
|
8035
|
-
MyAccountHistoryTypeEnum[MyAccountHistoryTypeEnum["UPLOAD_DOCUMENT"] = 2] = "UPLOAD_DOCUMENT";
|
|
8036
|
-
})(exports.MyAccountHistoryTypeEnum || (exports.MyAccountHistoryTypeEnum = {}));
|
|
8037
|
-
|
|
8038
|
-
var MyAccountHistory = /** @class */ (function () {
|
|
8039
|
-
function MyAccountHistory() {
|
|
8040
|
-
}
|
|
8041
|
-
return MyAccountHistory;
|
|
8042
|
-
}());
|
|
8043
|
-
|
|
8044
|
-
var Occupation = /** @class */ (function (_super) {
|
|
8045
|
-
__extends(Occupation, _super);
|
|
8046
|
-
function Occupation() {
|
|
8047
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
8048
|
-
}
|
|
8049
|
-
return Occupation;
|
|
8050
|
-
}(Occupation$1));
|
|
8051
|
-
|
|
8052
|
-
/**
|
|
8053
|
-
* Class with basic information about registering user
|
|
8054
|
-
*/
|
|
8055
|
-
var UserToRegister = /** @class */ (function () {
|
|
8056
|
-
function UserToRegister() {
|
|
8057
|
-
}
|
|
8058
|
-
return UserToRegister;
|
|
8059
|
-
}());
|
|
8060
|
-
|
|
8061
8033
|
var MessageCollection = /** @class */ (function (_super) {
|
|
8062
8034
|
__extends(MessageCollection, _super);
|
|
8063
8035
|
function MessageCollection() {
|
|
@@ -9185,6 +9157,21 @@
|
|
|
9185
9157
|
return SoleBusinessLossesCollection;
|
|
9186
9158
|
}(Collection));
|
|
9187
9159
|
|
|
9160
|
+
var SoleInvoiceItemCollection = /** @class */ (function (_super) {
|
|
9161
|
+
__extends(SoleInvoiceItemCollection, _super);
|
|
9162
|
+
function SoleInvoiceItemCollection() {
|
|
9163
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
9164
|
+
}
|
|
9165
|
+
Object.defineProperty(SoleInvoiceItemCollection.prototype, "gstPrice", {
|
|
9166
|
+
get: function () {
|
|
9167
|
+
return this.filterBy('isGST', true).sumBy('totalPrice');
|
|
9168
|
+
},
|
|
9169
|
+
enumerable: false,
|
|
9170
|
+
configurable: true
|
|
9171
|
+
});
|
|
9172
|
+
return SoleInvoiceItemCollection;
|
|
9173
|
+
}(Collection));
|
|
9174
|
+
|
|
9188
9175
|
var SoleInvoiceCollection = /** @class */ (function (_super) {
|
|
9189
9176
|
__extends(SoleInvoiceCollection, _super);
|
|
9190
9177
|
function SoleInvoiceCollection() {
|
|
@@ -19215,30 +19202,6 @@
|
|
|
19215
19202
|
return SoleBusinessLossForm;
|
|
19216
19203
|
}(AbstractForm));
|
|
19217
19204
|
|
|
19218
|
-
var phonePattern = /^(((\s*)?([- ()]?\d[- ()]?){0,30}(\s*)?)|)$/;
|
|
19219
|
-
/**
|
|
19220
|
-
* Validator for phone number
|
|
19221
|
-
* Allowed special symbols"-", "(", ")"
|
|
19222
|
-
*/
|
|
19223
|
-
function phoneNumberValidator() {
|
|
19224
|
-
return function (control) {
|
|
19225
|
-
return phonePattern.test(control.value) ? null : { phoneInvalid: true };
|
|
19226
|
-
};
|
|
19227
|
-
}
|
|
19228
|
-
|
|
19229
|
-
var PhoneForm = /** @class */ (function (_super) {
|
|
19230
|
-
__extends(PhoneForm, _super);
|
|
19231
|
-
function PhoneForm(phone) {
|
|
19232
|
-
if (phone === void 0) { phone = classTransformer.plainToClass(Phone, {}); }
|
|
19233
|
-
return _super.call(this, {
|
|
19234
|
-
type: new forms.FormControl(phone.type, forms.Validators.required),
|
|
19235
|
-
country: new forms.FormControl(phone.country, forms.Validators.required),
|
|
19236
|
-
number: new forms.FormControl(phone.number, [forms.Validators.required, phoneNumberValidator()])
|
|
19237
|
-
}, phone) || this;
|
|
19238
|
-
}
|
|
19239
|
-
return PhoneForm;
|
|
19240
|
-
}(AbstractForm));
|
|
19241
|
-
|
|
19242
19205
|
var SoleContactForm = /** @class */ (function (_super) {
|
|
19243
19206
|
__extends(SoleContactForm, _super);
|
|
19244
19207
|
function SoleContactForm(contact) {
|
|
@@ -19249,7 +19212,7 @@
|
|
|
19249
19212
|
firstName: new forms.FormControl(contact.firstName, forms.Validators.required),
|
|
19250
19213
|
lastName: new forms.FormControl(contact.lastName, forms.Validators.required),
|
|
19251
19214
|
email: new forms.FormControl(contact.email, [forms.Validators.required, forms.Validators.email]),
|
|
19252
|
-
phone: new
|
|
19215
|
+
phone: new forms.FormControl(contact.phone),
|
|
19253
19216
|
address: new AddressForm(contact.address || classTransformer.plainToClass(Address, {}))
|
|
19254
19217
|
}, contact) || this;
|
|
19255
19218
|
}
|
|
@@ -19489,7 +19452,6 @@
|
|
|
19489
19452
|
// 32767 - max value because we have small int data type in database for this field, but we don't have actual max validation for term
|
|
19490
19453
|
term: new forms.FormControl(invoiceTemplate.term, [forms.Validators.required, forms.Validators.min(0), forms.Validators.max(32767)]),
|
|
19491
19454
|
bankAccount: new forms.FormControl(invoiceTemplate.bankAccount, [forms.Validators.required]),
|
|
19492
|
-
file: new forms.FormControl(invoiceTemplate.file)
|
|
19493
19455
|
}, invoiceTemplate) || this;
|
|
19494
19456
|
}
|
|
19495
19457
|
return SoleInvoiceTemplateForm;
|
|
@@ -19803,6 +19765,31 @@
|
|
|
19803
19765
|
return LoginForm;
|
|
19804
19766
|
}(AbstractForm));
|
|
19805
19767
|
|
|
19768
|
+
var phonePattern = /^(((\s*)?([- ()]?\d[- ()]?){0,30}(\s*)?)|)$/;
|
|
19769
|
+
/**
|
|
19770
|
+
* Validator for phone number
|
|
19771
|
+
* Allowed special symbols"-", "(", ")"
|
|
19772
|
+
*/
|
|
19773
|
+
function phoneNumberValidator() {
|
|
19774
|
+
return function (control) {
|
|
19775
|
+
return phonePattern.test(control.value) ? null : { phoneInvalid: true };
|
|
19776
|
+
};
|
|
19777
|
+
}
|
|
19778
|
+
|
|
19779
|
+
var PhoneForm = /** @class */ (function (_super) {
|
|
19780
|
+
__extends(PhoneForm, _super);
|
|
19781
|
+
function PhoneForm(
|
|
19782
|
+
// no default value because this form is always built-in, so phone passed from parent form
|
|
19783
|
+
phone) {
|
|
19784
|
+
return _super.call(this, {
|
|
19785
|
+
type: new forms.FormControl((phone === null || phone === void 0 ? void 0 : phone.type) || exports.PhoneTypeEnum.MOBILE, forms.Validators.required),
|
|
19786
|
+
country: new forms.FormControl((phone === null || phone === void 0 ? void 0 : phone.country) || Country.australia, forms.Validators.required),
|
|
19787
|
+
number: new forms.FormControl((phone === null || phone === void 0 ? void 0 : phone.number) || null, [forms.Validators.required, phoneNumberValidator()])
|
|
19788
|
+
}, phone) || this;
|
|
19789
|
+
}
|
|
19790
|
+
return PhoneForm;
|
|
19791
|
+
}(AbstractForm));
|
|
19792
|
+
|
|
19806
19793
|
// @TODO Alex: Create a model and handle request fields via class-transformer
|
|
19807
19794
|
var PasswordForm = /** @class */ (function (_super) {
|
|
19808
19795
|
__extends(PasswordForm, _super);
|