taxtank-core 0.23.8 → 0.24.0
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 +57 -13
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/index.js +2 -3
- package/esm2015/lib/forms/user/index.js +4 -0
- package/esm2015/lib/forms/user/user-invite.form.js +16 -0
- package/esm2015/lib/models/service-subscription/service-subscription.js +11 -4
- package/esm2015/lib/services/http/user/users-invite/users-invite.service.js +23 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/taxtank-core.js +51 -14
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/forms/index.d.ts +1 -2
- package/lib/forms/user/index.d.ts +3 -0
- package/lib/forms/user/user-invite.form.d.ts +8 -0
- package/lib/models/service-subscription/service-subscription.d.ts +5 -2
- package/lib/services/http/user/users-invite/users-invite.service.d.ts +13 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -2062,6 +2062,16 @@
|
|
|
2062
2062
|
_a$2[exports.SubscriptionTypeEnum.INVESTOR_PLUS] = 'Add your whole portfolio, including investment properties, home and properties in trusts. For 3+ properties an extra $6 will be charged per property.',
|
|
2063
2063
|
_a$2);
|
|
2064
2064
|
|
|
2065
|
+
exports.ServiceSubscriptionStatusEnum = void 0;
|
|
2066
|
+
(function (ServiceSubscriptionStatusEnum) {
|
|
2067
|
+
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["ACTIVE"] = 1] = "ACTIVE";
|
|
2068
|
+
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["INCOMPLETE"] = 2] = "INCOMPLETE";
|
|
2069
|
+
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["INCOMPLETE_EXPIRED"] = 3] = "INCOMPLETE_EXPIRED";
|
|
2070
|
+
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["PAST_DUE"] = 4] = "PAST_DUE";
|
|
2071
|
+
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["CANCELED"] = 5] = "CANCELED";
|
|
2072
|
+
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["UNPAID"] = 6] = "UNPAID";
|
|
2073
|
+
})(exports.ServiceSubscriptionStatusEnum || (exports.ServiceSubscriptionStatusEnum = {}));
|
|
2074
|
+
|
|
2065
2075
|
var PROPERTY_INVESTOR_MAX_PROPERTIES = 2;
|
|
2066
2076
|
var ServiceSubscription = /** @class */ (function (_super) {
|
|
2067
2077
|
__extends(ServiceSubscription, _super);
|
|
@@ -2139,11 +2149,11 @@
|
|
|
2139
2149
|
});
|
|
2140
2150
|
Object.defineProperty(ServiceSubscription.prototype, "isActive", {
|
|
2141
2151
|
/**
|
|
2142
|
-
*
|
|
2143
|
-
* and for user we add check for endDate
|
|
2152
|
+
* A subscription is considered active if the end date has not yet arrived and its status is "Active" or "Past due"
|
|
2144
2153
|
*/
|
|
2145
2154
|
get: function () {
|
|
2146
|
-
|
|
2155
|
+
var isExpired = new Date(this.endDate).getTime() < new Date().getTime();
|
|
2156
|
+
return !isExpired && ([exports.ServiceSubscriptionStatusEnum.ACTIVE, exports.ServiceSubscriptionStatusEnum.PAST_DUE].includes(this.status));
|
|
2147
2157
|
},
|
|
2148
2158
|
enumerable: false,
|
|
2149
2159
|
configurable: true
|
|
@@ -2234,6 +2244,12 @@
|
|
|
2234
2244
|
// subscription with at least one archived product considered as archived
|
|
2235
2245
|
return !!this.items.filter(function (item) { return item.price.product.isArchived(); }).length;
|
|
2236
2246
|
};
|
|
2247
|
+
/**
|
|
2248
|
+
* Case when payment was failed, but user has a time to update payment method
|
|
2249
|
+
*/
|
|
2250
|
+
ServiceSubscription.prototype.isPastDue = function () {
|
|
2251
|
+
return this.status === exports.ServiceSubscriptionStatusEnum.PAST_DUE;
|
|
2252
|
+
};
|
|
2237
2253
|
return ServiceSubscription;
|
|
2238
2254
|
}(ServiceSubscription$1));
|
|
2239
2255
|
__decorate([
|
|
@@ -7826,16 +7842,6 @@
|
|
|
7826
7842
|
ServicePriceTypeEnum[ServicePriceTypeEnum["RECURRING"] = 2] = "RECURRING";
|
|
7827
7843
|
})(exports.ServicePriceTypeEnum || (exports.ServicePriceTypeEnum = {}));
|
|
7828
7844
|
|
|
7829
|
-
exports.ServiceSubscriptionStatusEnum = void 0;
|
|
7830
|
-
(function (ServiceSubscriptionStatusEnum) {
|
|
7831
|
-
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["ACTIVE"] = 1] = "ACTIVE";
|
|
7832
|
-
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["INCOMPLETE"] = 2] = "INCOMPLETE";
|
|
7833
|
-
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["INCOMPLETE_EXPIRED"] = 3] = "INCOMPLETE_EXPIRED";
|
|
7834
|
-
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["PAST_DUE"] = 4] = "PAST_DUE";
|
|
7835
|
-
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["CANCELED"] = 5] = "CANCELED";
|
|
7836
|
-
ServiceSubscriptionStatusEnum[ServiceSubscriptionStatusEnum["UNPAID"] = 6] = "UNPAID";
|
|
7837
|
-
})(exports.ServiceSubscriptionStatusEnum || (exports.ServiceSubscriptionStatusEnum = {}));
|
|
7838
|
-
|
|
7839
7845
|
exports.SpareDocumentSpareTypeEnum = void 0;
|
|
7840
7846
|
(function (SpareDocumentSpareTypeEnum) {
|
|
7841
7847
|
SpareDocumentSpareTypeEnum[SpareDocumentSpareTypeEnum["DOCUMENT"] = 1] = "DOCUMENT";
|
|
@@ -15256,6 +15262,28 @@
|
|
|
15256
15262
|
}]
|
|
15257
15263
|
}] });
|
|
15258
15264
|
|
|
15265
|
+
/**
|
|
15266
|
+
* Service to work with invitations for unregistered users
|
|
15267
|
+
*/
|
|
15268
|
+
var UsersInviteService = /** @class */ (function (_super) {
|
|
15269
|
+
__extends(UsersInviteService, _super);
|
|
15270
|
+
function UsersInviteService() {
|
|
15271
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
15272
|
+
_this.modelClass = RegistrationInvite;
|
|
15273
|
+
_this.url = 'users/invite';
|
|
15274
|
+
return _this;
|
|
15275
|
+
}
|
|
15276
|
+
return UsersInviteService;
|
|
15277
|
+
}(RestService));
|
|
15278
|
+
UsersInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UsersInviteService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15279
|
+
UsersInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UsersInviteService, providedIn: 'root' });
|
|
15280
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UsersInviteService, decorators: [{
|
|
15281
|
+
type: i0.Injectable,
|
|
15282
|
+
args: [{
|
|
15283
|
+
providedIn: 'root'
|
|
15284
|
+
}]
|
|
15285
|
+
}] });
|
|
15286
|
+
|
|
15259
15287
|
/**
|
|
15260
15288
|
* Service that allows to work with WorkTank operations
|
|
15261
15289
|
* @TODO separate vehicles and logbooks to different api
|
|
@@ -16175,6 +16203,20 @@
|
|
|
16175
16203
|
return ResetPasswordForm;
|
|
16176
16204
|
}(AbstractForm));
|
|
16177
16205
|
|
|
16206
|
+
/**
|
|
16207
|
+
* Form for inviting an unregistered user
|
|
16208
|
+
*/
|
|
16209
|
+
var UserInviteForm = /** @class */ (function (_super) {
|
|
16210
|
+
__extends(UserInviteForm, _super);
|
|
16211
|
+
function UserInviteForm() {
|
|
16212
|
+
return _super.call(this, {
|
|
16213
|
+
firstName: new forms.FormControl(null, forms.Validators.required),
|
|
16214
|
+
email: new forms.FormControl(null, [forms.Validators.required, forms.Validators.email]),
|
|
16215
|
+
}, classTransformer.plainToClass(RegistrationInvite, {})) || this;
|
|
16216
|
+
}
|
|
16217
|
+
return UserInviteForm;
|
|
16218
|
+
}(AbstractForm));
|
|
16219
|
+
|
|
16178
16220
|
var VehicleForm = /** @class */ (function (_super) {
|
|
16179
16221
|
__extends(VehicleForm, _super);
|
|
16180
16222
|
function VehicleForm(vehicle) {
|
|
@@ -17050,9 +17092,11 @@
|
|
|
17050
17092
|
exports.UserEventType = UserEventType;
|
|
17051
17093
|
exports.UserEventTypeCategory = UserEventTypeCategory;
|
|
17052
17094
|
exports.UserEventTypeService = UserEventTypeService;
|
|
17095
|
+
exports.UserInviteForm = UserInviteForm;
|
|
17053
17096
|
exports.UserService = UserService;
|
|
17054
17097
|
exports.UserSwitcherService = UserSwitcherService;
|
|
17055
17098
|
exports.UserToRegister = UserToRegister;
|
|
17099
|
+
exports.UsersInviteService = UsersInviteService;
|
|
17056
17100
|
exports.Vehicle = Vehicle;
|
|
17057
17101
|
exports.VehicleClaim = VehicleClaim;
|
|
17058
17102
|
exports.VehicleClaimForm = VehicleClaimForm;
|