taxtank-core 0.26.0 → 0.27.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 +132 -109
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/services/http/index.js +2 -1
- package/esm2015/lib/services/http/user/index.js +5 -0
- package/esm2015/lib/services/http/user/users-invite/users-invite.service.js +23 -0
- package/fesm2015/taxtank-core.js +119 -100
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/services/http/index.d.ts +1 -0
- package/lib/services/http/user/index.d.ts +4 -0
- package/lib/services/http/user/users-invite/users-invite.service.d.ts +13 -0
- package/package.json +1 -1
|
@@ -11258,6 +11258,137 @@
|
|
|
11258
11258
|
}]
|
|
11259
11259
|
}] });
|
|
11260
11260
|
|
|
11261
|
+
/**
|
|
11262
|
+
* Service that works with Occupations
|
|
11263
|
+
*/
|
|
11264
|
+
var OccupationService = /** @class */ (function () {
|
|
11265
|
+
function OccupationService(http, environment) {
|
|
11266
|
+
this.http = http;
|
|
11267
|
+
this.environment = environment;
|
|
11268
|
+
this.occupationsSubject = new rxjs.ReplaySubject(1);
|
|
11269
|
+
}
|
|
11270
|
+
/**
|
|
11271
|
+
* Get list of occupations
|
|
11272
|
+
*/
|
|
11273
|
+
OccupationService.prototype.getOccupations = function () {
|
|
11274
|
+
var _this = this;
|
|
11275
|
+
if (!this._occupations) {
|
|
11276
|
+
this.http.get(this.environment.apiV2 + "/occupations")
|
|
11277
|
+
.pipe(operators.map(function (response) {
|
|
11278
|
+
return response.map(function (item) { return classTransformer.plainToClass(Occupation, item); });
|
|
11279
|
+
}))
|
|
11280
|
+
.subscribe(function (occupations) {
|
|
11281
|
+
_this._occupations = occupations;
|
|
11282
|
+
_this.occupationsSubject.next(occupations);
|
|
11283
|
+
});
|
|
11284
|
+
}
|
|
11285
|
+
return this.occupationsSubject.asObservable();
|
|
11286
|
+
};
|
|
11287
|
+
return OccupationService;
|
|
11288
|
+
}());
|
|
11289
|
+
OccupationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: OccupationService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11290
|
+
OccupationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: OccupationService, providedIn: 'root' });
|
|
11291
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: OccupationService, decorators: [{
|
|
11292
|
+
type: i0.Injectable,
|
|
11293
|
+
args: [{
|
|
11294
|
+
providedIn: 'root'
|
|
11295
|
+
}]
|
|
11296
|
+
}], ctorParameters: function () {
|
|
11297
|
+
return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
|
|
11298
|
+
type: i0.Inject,
|
|
11299
|
+
args: ['environment']
|
|
11300
|
+
}] }];
|
|
11301
|
+
} });
|
|
11302
|
+
|
|
11303
|
+
var UserEventSettingService = /** @class */ (function (_super) {
|
|
11304
|
+
__extends(UserEventSettingService, _super);
|
|
11305
|
+
function UserEventSettingService() {
|
|
11306
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
11307
|
+
_this.modelClass = UserEventSetting;
|
|
11308
|
+
_this.url = 'user-event-settings';
|
|
11309
|
+
_this.isHydra = true;
|
|
11310
|
+
return _this;
|
|
11311
|
+
}
|
|
11312
|
+
/**
|
|
11313
|
+
* Send batch to add/updated settings
|
|
11314
|
+
*/
|
|
11315
|
+
UserEventSettingService.prototype.saveBatch = function (settings) {
|
|
11316
|
+
var _this = this;
|
|
11317
|
+
// batch with post/put requests based on setting id
|
|
11318
|
+
var batch = settings.map(function (setting) {
|
|
11319
|
+
setting.isUpdating = true;
|
|
11320
|
+
if (setting.id) {
|
|
11321
|
+
return _this.http.put(_this.environment.apiV2 + "/" + _this.url + "/" + setting.id, classTransformer.classToPlain(setting));
|
|
11322
|
+
}
|
|
11323
|
+
return _this.http.post(_this.environment.apiV2 + "/" + _this.url, classTransformer.classToPlain(setting));
|
|
11324
|
+
});
|
|
11325
|
+
return rxjs.forkJoin(batch).pipe(operators.map(function (eventSettings) {
|
|
11326
|
+
eventSettings.forEach(function (eventSetting) {
|
|
11327
|
+
// get setting from cache by saved setting id
|
|
11328
|
+
var cachedSetting = _this.cache.find(function (setting) { return setting.id === eventSetting.id; });
|
|
11329
|
+
if (cachedSetting) {
|
|
11330
|
+
replace(_this.cache, eventSetting);
|
|
11331
|
+
}
|
|
11332
|
+
else {
|
|
11333
|
+
_this.cache.push(classTransformer.plainToClass(UserEventSetting, eventSetting));
|
|
11334
|
+
}
|
|
11335
|
+
});
|
|
11336
|
+
_this.updateCache();
|
|
11337
|
+
}));
|
|
11338
|
+
};
|
|
11339
|
+
return UserEventSettingService;
|
|
11340
|
+
}(RestService));
|
|
11341
|
+
UserEventSettingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventSettingService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11342
|
+
UserEventSettingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventSettingService, providedIn: 'root' });
|
|
11343
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventSettingService, decorators: [{
|
|
11344
|
+
type: i0.Injectable,
|
|
11345
|
+
args: [{
|
|
11346
|
+
providedIn: 'root'
|
|
11347
|
+
}]
|
|
11348
|
+
}] });
|
|
11349
|
+
|
|
11350
|
+
var UserEventTypeService = /** @class */ (function (_super) {
|
|
11351
|
+
__extends(UserEventTypeService, _super);
|
|
11352
|
+
function UserEventTypeService() {
|
|
11353
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
11354
|
+
_this.modelClass = UserEventType;
|
|
11355
|
+
_this.url = 'user-event-types';
|
|
11356
|
+
_this.isHydra = true;
|
|
11357
|
+
return _this;
|
|
11358
|
+
}
|
|
11359
|
+
return UserEventTypeService;
|
|
11360
|
+
}(RestService));
|
|
11361
|
+
UserEventTypeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventTypeService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11362
|
+
UserEventTypeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventTypeService, providedIn: 'root' });
|
|
11363
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventTypeService, decorators: [{
|
|
11364
|
+
type: i0.Injectable,
|
|
11365
|
+
args: [{
|
|
11366
|
+
providedIn: 'root'
|
|
11367
|
+
}]
|
|
11368
|
+
}] });
|
|
11369
|
+
|
|
11370
|
+
/**
|
|
11371
|
+
* Service to work with invitations for unregistered users
|
|
11372
|
+
*/
|
|
11373
|
+
var UsersInviteService = /** @class */ (function (_super) {
|
|
11374
|
+
__extends(UsersInviteService, _super);
|
|
11375
|
+
function UsersInviteService() {
|
|
11376
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
11377
|
+
_this.modelClass = RegistrationInvite;
|
|
11378
|
+
_this.url = 'users/invite';
|
|
11379
|
+
return _this;
|
|
11380
|
+
}
|
|
11381
|
+
return UsersInviteService;
|
|
11382
|
+
}(RestService));
|
|
11383
|
+
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 });
|
|
11384
|
+
UsersInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UsersInviteService, providedIn: 'root' });
|
|
11385
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UsersInviteService, decorators: [{
|
|
11386
|
+
type: i0.Injectable,
|
|
11387
|
+
args: [{
|
|
11388
|
+
providedIn: 'root'
|
|
11389
|
+
}]
|
|
11390
|
+
}] });
|
|
11391
|
+
|
|
11261
11392
|
/**
|
|
11262
11393
|
* Service for logbook best period calculation
|
|
11263
11394
|
* @TODO Vik: improve structure for such cases (TT-2043)
|
|
@@ -15573,48 +15704,6 @@
|
|
|
15573
15704
|
}]
|
|
15574
15705
|
}] });
|
|
15575
15706
|
|
|
15576
|
-
/**
|
|
15577
|
-
* Service that works with Occupations
|
|
15578
|
-
*/
|
|
15579
|
-
var OccupationService = /** @class */ (function () {
|
|
15580
|
-
function OccupationService(http, environment) {
|
|
15581
|
-
this.http = http;
|
|
15582
|
-
this.environment = environment;
|
|
15583
|
-
this.occupationsSubject = new rxjs.ReplaySubject(1);
|
|
15584
|
-
}
|
|
15585
|
-
/**
|
|
15586
|
-
* Get list of occupations
|
|
15587
|
-
*/
|
|
15588
|
-
OccupationService.prototype.getOccupations = function () {
|
|
15589
|
-
var _this = this;
|
|
15590
|
-
if (!this._occupations) {
|
|
15591
|
-
this.http.get(this.environment.apiV2 + "/occupations")
|
|
15592
|
-
.pipe(operators.map(function (response) {
|
|
15593
|
-
return response.map(function (item) { return classTransformer.plainToClass(Occupation, item); });
|
|
15594
|
-
}))
|
|
15595
|
-
.subscribe(function (occupations) {
|
|
15596
|
-
_this._occupations = occupations;
|
|
15597
|
-
_this.occupationsSubject.next(occupations);
|
|
15598
|
-
});
|
|
15599
|
-
}
|
|
15600
|
-
return this.occupationsSubject.asObservable();
|
|
15601
|
-
};
|
|
15602
|
-
return OccupationService;
|
|
15603
|
-
}());
|
|
15604
|
-
OccupationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: OccupationService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15605
|
-
OccupationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: OccupationService, providedIn: 'root' });
|
|
15606
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: OccupationService, decorators: [{
|
|
15607
|
-
type: i0.Injectable,
|
|
15608
|
-
args: [{
|
|
15609
|
-
providedIn: 'root'
|
|
15610
|
-
}]
|
|
15611
|
-
}], ctorParameters: function () {
|
|
15612
|
-
return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
|
|
15613
|
-
type: i0.Inject,
|
|
15614
|
-
args: ['environment']
|
|
15615
|
-
}] }];
|
|
15616
|
-
} });
|
|
15617
|
-
|
|
15618
15707
|
/**
|
|
15619
15708
|
* Service to work with user
|
|
15620
15709
|
*/
|
|
@@ -15770,73 +15859,6 @@
|
|
|
15770
15859
|
}] }];
|
|
15771
15860
|
} });
|
|
15772
15861
|
|
|
15773
|
-
var UserEventSettingService = /** @class */ (function (_super) {
|
|
15774
|
-
__extends(UserEventSettingService, _super);
|
|
15775
|
-
function UserEventSettingService() {
|
|
15776
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
15777
|
-
_this.modelClass = UserEventSetting;
|
|
15778
|
-
_this.url = 'user-event-settings';
|
|
15779
|
-
_this.isHydra = true;
|
|
15780
|
-
return _this;
|
|
15781
|
-
}
|
|
15782
|
-
/**
|
|
15783
|
-
* Send batch to add/updated settings
|
|
15784
|
-
*/
|
|
15785
|
-
UserEventSettingService.prototype.saveBatch = function (settings) {
|
|
15786
|
-
var _this = this;
|
|
15787
|
-
// batch with post/put requests based on setting id
|
|
15788
|
-
var batch = settings.map(function (setting) {
|
|
15789
|
-
setting.isUpdating = true;
|
|
15790
|
-
if (setting.id) {
|
|
15791
|
-
return _this.http.put(_this.environment.apiV2 + "/" + _this.url + "/" + setting.id, classTransformer.classToPlain(setting));
|
|
15792
|
-
}
|
|
15793
|
-
return _this.http.post(_this.environment.apiV2 + "/" + _this.url, classTransformer.classToPlain(setting));
|
|
15794
|
-
});
|
|
15795
|
-
return rxjs.forkJoin(batch).pipe(operators.map(function (eventSettings) {
|
|
15796
|
-
eventSettings.forEach(function (eventSetting) {
|
|
15797
|
-
// get setting from cache by saved setting id
|
|
15798
|
-
var cachedSetting = _this.cache.find(function (setting) { return setting.id === eventSetting.id; });
|
|
15799
|
-
if (cachedSetting) {
|
|
15800
|
-
replace(_this.cache, eventSetting);
|
|
15801
|
-
}
|
|
15802
|
-
else {
|
|
15803
|
-
_this.cache.push(classTransformer.plainToClass(UserEventSetting, eventSetting));
|
|
15804
|
-
}
|
|
15805
|
-
});
|
|
15806
|
-
_this.updateCache();
|
|
15807
|
-
}));
|
|
15808
|
-
};
|
|
15809
|
-
return UserEventSettingService;
|
|
15810
|
-
}(RestService));
|
|
15811
|
-
UserEventSettingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventSettingService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15812
|
-
UserEventSettingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventSettingService, providedIn: 'root' });
|
|
15813
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventSettingService, decorators: [{
|
|
15814
|
-
type: i0.Injectable,
|
|
15815
|
-
args: [{
|
|
15816
|
-
providedIn: 'root'
|
|
15817
|
-
}]
|
|
15818
|
-
}] });
|
|
15819
|
-
|
|
15820
|
-
var UserEventTypeService = /** @class */ (function (_super) {
|
|
15821
|
-
__extends(UserEventTypeService, _super);
|
|
15822
|
-
function UserEventTypeService() {
|
|
15823
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
15824
|
-
_this.modelClass = UserEventType;
|
|
15825
|
-
_this.url = 'user-event-types';
|
|
15826
|
-
_this.isHydra = true;
|
|
15827
|
-
return _this;
|
|
15828
|
-
}
|
|
15829
|
-
return UserEventTypeService;
|
|
15830
|
-
}(RestService));
|
|
15831
|
-
UserEventTypeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventTypeService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15832
|
-
UserEventTypeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventTypeService, providedIn: 'root' });
|
|
15833
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: UserEventTypeService, decorators: [{
|
|
15834
|
-
type: i0.Injectable,
|
|
15835
|
-
args: [{
|
|
15836
|
-
providedIn: 'root'
|
|
15837
|
-
}]
|
|
15838
|
-
}] });
|
|
15839
|
-
|
|
15840
15862
|
/**
|
|
15841
15863
|
* Service to work with XLSX (generate, download, e.t.c.)
|
|
15842
15864
|
*/
|
|
@@ -17705,6 +17727,7 @@
|
|
|
17705
17727
|
exports.UserService = UserService;
|
|
17706
17728
|
exports.UserSwitcherService = UserSwitcherService;
|
|
17707
17729
|
exports.UserToRegister = UserToRegister;
|
|
17730
|
+
exports.UsersInviteService = UsersInviteService;
|
|
17708
17731
|
exports.Vehicle = Vehicle;
|
|
17709
17732
|
exports.VehicleClaim = VehicleClaim;
|
|
17710
17733
|
exports.VehicleClaimCollection = VehicleClaimCollection;
|