bx-rest 0.1.17 → 0.1.19
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/consts/part-name-metods.d.ts +2 -0
- package/esm2022/consts/part-name-metods.mjs +3 -1
- package/esm2022/map/user.mjs +8 -2
- package/esm2022/request/server.mjs +24 -0
- package/esm2022/request/task/elapseditem.mjs +1 -1
- package/esm2022/request/user.mjs +2 -31
- package/esm2022/request-navvy/server.mjs +22 -0
- package/esm2022/request-navvy/task/elapseditem.mjs +30 -60
- package/esm2022/request-navvy/task/operation/elapseditem.mjs +33 -0
- package/esm2022/request-navvy/user.mjs +100 -2
- package/esm2022/rest.mjs +23 -19
- package/esm2022/services/Navvy/NavvyAlternativePaginationNavigation.mjs +1 -1
- package/esm2022/services/Navvy/NavvySimple.mjs +1 -4
- package/esm2022/services/navvy.mjs +1 -1
- package/esm2022/typification/rest/task/elapseditem/item.mjs +1 -1
- package/esm2022/typification/rest/user/search.mjs +2 -0
- package/fesm2022/bx-rest.mjs +212 -101
- package/fesm2022/bx-rest.mjs.map +1 -1
- package/map/user.d.ts +3 -1
- package/package.json +1 -1
- package/request/server.d.ts +12 -0
- package/request/task/elapseditem.d.ts +2 -2
- package/request/user.d.ts +2 -9
- package/request-navvy/server.d.ts +11 -0
- package/request-navvy/task/elapseditem.d.ts +3 -1
- package/request-navvy/task/operation/elapseditem.d.ts +12 -0
- package/request-navvy/user.d.ts +12 -2
- package/rest.d.ts +6 -2
- package/services/Navvy/NavvyAlternativePaginationNavigation.d.ts +3 -3
- package/services/Navvy/NavvySimple.d.ts +0 -1
- package/services/navvy.d.ts +2 -2
- package/typification/rest/task/elapseditem/item.d.ts +3 -3
- package/typification/rest/user/{UserFilterSearch.d.ts → search.d.ts} +2 -1
- package/esm2022/typification/rest/user/UserFilterSearch.mjs +0 -2
package/fesm2022/bx-rest.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgModule, inject, Component, ViewEncapsulation, Inject, Injectable } from '@angular/core';
|
|
3
3
|
import { Subscription, of, mergeMap, throwError, forkJoin, share, from, concatMap, last, concat, tap, shareReplay } from 'rxjs';
|
|
4
|
-
import clone from 'just-clone';
|
|
5
4
|
import { map, catchError, mergeMap as mergeMap$1 } from 'rxjs/operators';
|
|
5
|
+
import clone from 'just-clone';
|
|
6
6
|
import * as i1$1 from '@angular/material/snack-bar';
|
|
7
7
|
import { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';
|
|
8
8
|
import * as i2 from '@angular/material/icon';
|
|
@@ -114,7 +114,9 @@ const $activity = 'activity';
|
|
|
114
114
|
const $robot = 'robot';
|
|
115
115
|
const $send = 'send';
|
|
116
116
|
const $share = 'share';
|
|
117
|
-
const $blogcomment = 'blogcomment';
|
|
117
|
+
const $blogcomment = 'blogcomment';
|
|
118
|
+
const $server = 'server';
|
|
119
|
+
const $time = 'time';
|
|
118
120
|
|
|
119
121
|
class BxRestModule {
|
|
120
122
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BxRestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1234,7 +1236,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
1234
1236
|
}] });
|
|
1235
1237
|
|
|
1236
1238
|
class BXRestUserMap extends BaseMapServices {
|
|
1237
|
-
|
|
1239
|
+
get(v) {
|
|
1240
|
+
return (v) ? v.map(i => this.userHttpToTrace(i)) : undefined;
|
|
1241
|
+
}
|
|
1242
|
+
current(v) {
|
|
1243
|
+
return this.userHttpToTrace(v);
|
|
1244
|
+
}
|
|
1245
|
+
userHttpToTrace(user) {
|
|
1238
1246
|
let res = Object.assign(clone(user), {
|
|
1239
1247
|
ID: this.toNum(user.ID),
|
|
1240
1248
|
IS_ONLINE: this.toBool(user.IS_ONLINE),
|
|
@@ -1337,17 +1345,12 @@ class BXRestUser {
|
|
|
1337
1345
|
list: [$user, 'userfield', $list]
|
|
1338
1346
|
}
|
|
1339
1347
|
};
|
|
1340
|
-
this.def = {
|
|
1341
|
-
params: { ACTIVE: 1, start: 0 }
|
|
1342
|
-
};
|
|
1343
1348
|
}
|
|
1344
1349
|
admin() {
|
|
1345
1350
|
return this.http.get(this.url.admin);
|
|
1346
1351
|
}
|
|
1347
1352
|
get(params = {}) {
|
|
1348
|
-
|
|
1349
|
-
this.setDefParam(copyParams);
|
|
1350
|
-
return this.http.post(this.url.get, copyParams);
|
|
1353
|
+
return this.http.post(this.url.get, params);
|
|
1351
1354
|
}
|
|
1352
1355
|
current(update = false) {
|
|
1353
1356
|
let request = this.http.get(this.url.current, {});
|
|
@@ -1379,12 +1382,6 @@ class BXRestUser {
|
|
|
1379
1382
|
}
|
|
1380
1383
|
}
|
|
1381
1384
|
search(params) {
|
|
1382
|
-
if (typeof params === 'string') {
|
|
1383
|
-
params = { FIND: params };
|
|
1384
|
-
}
|
|
1385
|
-
if (typeof params.ACTIVE !== 'boolean') {
|
|
1386
|
-
params.ACTIVE = true;
|
|
1387
|
-
}
|
|
1388
1385
|
return this.http.get(this.url.search, params);
|
|
1389
1386
|
}
|
|
1390
1387
|
access(access) {
|
|
@@ -1393,23 +1390,6 @@ class BXRestUser {
|
|
|
1393
1390
|
fields() {
|
|
1394
1391
|
return this.http.get(this.url.fields);
|
|
1395
1392
|
}
|
|
1396
|
-
setDefParam(params) {
|
|
1397
|
-
if (!params.FILTER) {
|
|
1398
|
-
params.FILTER = {};
|
|
1399
|
-
}
|
|
1400
|
-
if (!params.hasOwnProperty('ACTIVE')) {
|
|
1401
|
-
params.FILTER.ACTIVE = this.def.params.ACTIVE;
|
|
1402
|
-
}
|
|
1403
|
-
if (params.FILTER.ACTIVE && params.FILTER.ACTIVE === 2) {
|
|
1404
|
-
delete params.FILTER.ACTIVE;
|
|
1405
|
-
}
|
|
1406
|
-
if (!params.hasOwnProperty('start')) {
|
|
1407
|
-
params.start = this.def.params.start;
|
|
1408
|
-
}
|
|
1409
|
-
if (params.FILTER.UF_DEPARTMENT && !params.FILTER.UF_DEPARTMENT.length) {
|
|
1410
|
-
delete params.FILTER.UF_DEPARTMENT;
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
1393
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestUser, deps: [{ token: HttpBXServices }, { token: BXRestUserMap }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1414
1394
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestUser, providedIn: 'root' }); }
|
|
1415
1395
|
}
|
|
@@ -2251,6 +2231,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
2251
2231
|
}]
|
|
2252
2232
|
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2253
2233
|
|
|
2234
|
+
class BXRestServer {
|
|
2235
|
+
constructor(http) {
|
|
2236
|
+
this.http = http;
|
|
2237
|
+
this.url = {
|
|
2238
|
+
time: [$server, $time]
|
|
2239
|
+
};
|
|
2240
|
+
}
|
|
2241
|
+
time() {
|
|
2242
|
+
return this.http.post(this.url.time);
|
|
2243
|
+
}
|
|
2244
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestServer, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2245
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestServer, providedIn: 'root' }); }
|
|
2246
|
+
}
|
|
2247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestServer, decorators: [{
|
|
2248
|
+
type: Injectable,
|
|
2249
|
+
args: [{
|
|
2250
|
+
providedIn: 'root'
|
|
2251
|
+
}]
|
|
2252
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2253
|
+
|
|
2254
2254
|
class NavvySupport {
|
|
2255
2255
|
constructor(requestClass, mapClass) {
|
|
2256
2256
|
this.requestClass = requestClass;
|
|
@@ -2288,9 +2288,6 @@ class NavvySimple extends NavvySupport {
|
|
|
2288
2288
|
result() {
|
|
2289
2289
|
return this.mapAndSnackBarError(this.func).pipe(map(v => (v && this.map) ? this.map.call(this.mapClass, v) : v));
|
|
2290
2290
|
}
|
|
2291
|
-
// TODO: реализовать
|
|
2292
|
-
resultAll() {
|
|
2293
|
-
}
|
|
2294
2291
|
}
|
|
2295
2292
|
|
|
2296
2293
|
class NavvyPagNavBase extends NavvySupport {
|
|
@@ -2499,8 +2496,19 @@ class BXRestNavvyUser {
|
|
|
2499
2496
|
constructor(BXRestUserMap, BXRestUser) {
|
|
2500
2497
|
this.BXRestUserMap = BXRestUserMap;
|
|
2501
2498
|
this.BXRestUser = BXRestUser;
|
|
2499
|
+
this.def = {
|
|
2500
|
+
params: { ACTIVE: 1, start: 0 }
|
|
2501
|
+
};
|
|
2502
2502
|
this.Navvy = new Navvy(this.BXRestUser, this.BXRestUserMap);
|
|
2503
2503
|
}
|
|
2504
|
+
admin() {
|
|
2505
|
+
return this.Navvy.simple(this.BXRestUser.admin, 'Информация о возможных принадлежности человека к администратору не получена');
|
|
2506
|
+
}
|
|
2507
|
+
get(params = {}) {
|
|
2508
|
+
let copyParams = clone(params);
|
|
2509
|
+
this.setDefParam(copyParams);
|
|
2510
|
+
return this.Navvy.PagNav(this.BXRestUser.get, copyParams, 'Не удалось получить пользователей', this.BXRestUserMap.get);
|
|
2511
|
+
}
|
|
2504
2512
|
current(update = false) {
|
|
2505
2513
|
return this.Navvy.simpleWithArg(this.self, update, '', this.BXRestUserMap.current);
|
|
2506
2514
|
}
|
|
@@ -2513,7 +2521,13 @@ class BXRestNavvyUser {
|
|
|
2513
2521
|
}
|
|
2514
2522
|
*/
|
|
2515
2523
|
search(params) {
|
|
2516
|
-
|
|
2524
|
+
if (typeof params === 'string') {
|
|
2525
|
+
params = { FIND: params };
|
|
2526
|
+
}
|
|
2527
|
+
if (typeof params.ACTIVE !== 'boolean') {
|
|
2528
|
+
params.ACTIVE = true;
|
|
2529
|
+
}
|
|
2530
|
+
return this.Navvy.PagNav(this.BXRestUser.search, params, 'Сервер не отвечает на запрос поиска', this.BXRestUserMap.get);
|
|
2517
2531
|
}
|
|
2518
2532
|
access(params) {
|
|
2519
2533
|
return this.Navvy.simpleWithArg(this.BXRestUser.access, params, 'Не удалось получить права');
|
|
@@ -2543,6 +2557,86 @@ class BXRestNavvyUser {
|
|
|
2543
2557
|
}));
|
|
2544
2558
|
}
|
|
2545
2559
|
}
|
|
2560
|
+
// getAll(params: iBXGetParam = {}): Observable<iBXRestUser [] | undefined> {
|
|
2561
|
+
// if (!Object.keys(params).length) {
|
|
2562
|
+
// params = clone(this.def.params)
|
|
2563
|
+
// }
|
|
2564
|
+
//
|
|
2565
|
+
// const saveAllUser = compare(params, this.def.params)
|
|
2566
|
+
// return this.user$.pipe(
|
|
2567
|
+
// take(1),
|
|
2568
|
+
// mergeMap(v => {
|
|
2569
|
+
// if (v.load.all) {
|
|
2570
|
+
// if (compare(this.def.params, params)) {
|
|
2571
|
+
// return of(clone(v.data))
|
|
2572
|
+
// }
|
|
2573
|
+
// }
|
|
2574
|
+
//
|
|
2575
|
+
// return this.getEndArray(params).pipe(
|
|
2576
|
+
// take(1),
|
|
2577
|
+
// map(v => {
|
|
2578
|
+
// if (v && v.result) {
|
|
2579
|
+
// let cl = clone(v.result)
|
|
2580
|
+
// return this.saveArrUser(cl)
|
|
2581
|
+
// }
|
|
2582
|
+
// return undefined
|
|
2583
|
+
// }),
|
|
2584
|
+
// )
|
|
2585
|
+
// }),
|
|
2586
|
+
// tap(v => {
|
|
2587
|
+
// if (v && v.length && saveAllUser) {
|
|
2588
|
+
// this.store.dispatch(loadAll({load: true}))
|
|
2589
|
+
// }
|
|
2590
|
+
// params.start = this.def.params.start
|
|
2591
|
+
// })
|
|
2592
|
+
// )
|
|
2593
|
+
// }
|
|
2594
|
+
// private saveArrUser(users: iBXRestUserHttp[]) {
|
|
2595
|
+
// let result: iBXRestUser [] = []
|
|
2596
|
+
// for (const user of users) {
|
|
2597
|
+
// result.push(this.userMap.HttpToBX(user))
|
|
2598
|
+
// }
|
|
2599
|
+
// this.store.dispatch(saveArr({arr: result}))
|
|
2600
|
+
//
|
|
2601
|
+
// return result
|
|
2602
|
+
// }
|
|
2603
|
+
// getEndArray(params: UserFilter = {}): Observable<iHttpAnswerBX<iBXRestUserHttp[]> | undefined> {
|
|
2604
|
+
// return this.get(params).pipe(
|
|
2605
|
+
// mergeMap(items => {
|
|
2606
|
+
// if (items && items.result && typeof items.result === 'object') {
|
|
2607
|
+
// if (items.next) {
|
|
2608
|
+
// params.start = items.next
|
|
2609
|
+
// return this.getEndArray(params).pipe(map(vEnd => {
|
|
2610
|
+
// if (vEnd && items.result && vEnd.result) {
|
|
2611
|
+
// return {result: [...items.result, ...vEnd.result]}
|
|
2612
|
+
// }
|
|
2613
|
+
// return (items) ? items : undefined
|
|
2614
|
+
// }))
|
|
2615
|
+
// }
|
|
2616
|
+
// return of(items)
|
|
2617
|
+
// } else {
|
|
2618
|
+
// return of(undefined)
|
|
2619
|
+
// }
|
|
2620
|
+
// }),
|
|
2621
|
+
// )
|
|
2622
|
+
// }
|
|
2623
|
+
setDefParam(params) {
|
|
2624
|
+
if (!params.FILTER) {
|
|
2625
|
+
params.FILTER = {};
|
|
2626
|
+
}
|
|
2627
|
+
if (!params.hasOwnProperty('ACTIVE')) {
|
|
2628
|
+
params.FILTER.ACTIVE = this.def.params.ACTIVE;
|
|
2629
|
+
}
|
|
2630
|
+
if (params.FILTER.ACTIVE && params.FILTER.ACTIVE === 2) {
|
|
2631
|
+
delete params.FILTER.ACTIVE;
|
|
2632
|
+
}
|
|
2633
|
+
if (!params.hasOwnProperty('start')) {
|
|
2634
|
+
params.start = this.def.params.start;
|
|
2635
|
+
}
|
|
2636
|
+
if (params.FILTER.UF_DEPARTMENT && !params.FILTER.UF_DEPARTMENT.length) {
|
|
2637
|
+
delete params.FILTER.UF_DEPARTMENT;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2546
2640
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyUser, deps: [{ token: BXRestUserMap }, { token: BXRestUser }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2547
2641
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyUser, providedIn: 'root' }); }
|
|
2548
2642
|
}
|
|
@@ -3120,12 +3214,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
3120
3214
|
}]
|
|
3121
3215
|
}] });
|
|
3122
3216
|
|
|
3217
|
+
class BXRestNavvyOperationElapseditem {
|
|
3218
|
+
constructor(BXRestElapseditem, BXRestMapElapseditem) {
|
|
3219
|
+
this.BXRestElapseditem = BXRestElapseditem;
|
|
3220
|
+
this.BXRestMapElapseditem = BXRestMapElapseditem;
|
|
3221
|
+
this.Navvy = new Navvy(this.BXRestElapseditem, this.BXRestMapElapseditem);
|
|
3222
|
+
}
|
|
3223
|
+
getByInterval(idsUsers, dateStart, dateEnd) {
|
|
3224
|
+
return this.Navvy.simpleWithArg(this.BXRestElapseditem.getList, {
|
|
3225
|
+
ORDER: {
|
|
3226
|
+
ID: 'DESC'
|
|
3227
|
+
},
|
|
3228
|
+
FILTER: {
|
|
3229
|
+
USER_ID: idsUsers,
|
|
3230
|
+
'>=CREATED_DATE': dateStart.toLocaleString('ru-Ru'),
|
|
3231
|
+
'<=CREATED_DATE': dateEnd.toLocaleString('ru-Ru'),
|
|
3232
|
+
}
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyOperationElapseditem, deps: [{ token: BXRestElapseditem }, { token: BXRestMapTaskElapseditem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3236
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyOperationElapseditem, providedIn: 'root' }); }
|
|
3237
|
+
}
|
|
3238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyOperationElapseditem, decorators: [{
|
|
3239
|
+
type: Injectable,
|
|
3240
|
+
args: [{
|
|
3241
|
+
providedIn: 'root'
|
|
3242
|
+
}]
|
|
3243
|
+
}], ctorParameters: function () { return [{ type: BXRestElapseditem }, { type: BXRestMapTaskElapseditem }]; } });
|
|
3244
|
+
|
|
3123
3245
|
class BXRestNavvyElapseditem {
|
|
3124
|
-
constructor(BXRestElapseditem, BXRestNavvyUser, BXRestNavvyTasks, BXRestMapElapseditem) {
|
|
3246
|
+
constructor(BXRestElapseditem, BXRestNavvyUser, BXRestNavvyTasks, BXRestMapElapseditem, operation) {
|
|
3125
3247
|
this.BXRestElapseditem = BXRestElapseditem;
|
|
3126
3248
|
this.BXRestNavvyUser = BXRestNavvyUser;
|
|
3127
3249
|
this.BXRestNavvyTasks = BXRestNavvyTasks;
|
|
3128
3250
|
this.BXRestMapElapseditem = BXRestMapElapseditem;
|
|
3251
|
+
this.operation = operation;
|
|
3129
3252
|
this.Navvy = new Navvy(this.BXRestElapseditem, this.BXRestMapElapseditem);
|
|
3130
3253
|
}
|
|
3131
3254
|
/*
|
|
@@ -3221,63 +3344,31 @@ class BXRestNavvyElapseditem {
|
|
|
3221
3344
|
}
|
|
3222
3345
|
*/
|
|
3223
3346
|
/*
|
|
3224
|
-
|
|
3225
|
-
return
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
'>=CREATED_DATE': dateStart.toLocaleString('ru-Ru'),
|
|
3234
|
-
'<=CREATED_DATE': dateEnd.toLocaleString('ru-Ru'),
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
))
|
|
3238
|
-
/*
|
|
3239
|
-
return this.BXRestElapseditem.getList({
|
|
3240
|
-
ORDER: {
|
|
3241
|
-
ID: 'DESC'
|
|
3242
|
-
},
|
|
3243
|
-
FILTER: {
|
|
3244
|
-
USER_ID: idsUsers,
|
|
3245
|
-
'>=CREATED_DATE': dateStart.toLocaleString('ru-Ru'),
|
|
3246
|
-
'<=CREATED_DATE': dateEnd.toLocaleString('ru-Ru'),
|
|
3247
|
-
}
|
|
3248
|
-
}
|
|
3249
|
-
)
|
|
3250
|
-
*/
|
|
3251
|
-
/*
|
|
3252
|
-
}
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
/*
|
|
3256
|
-
getCacheOff(params: RequestParamsElapsedGetList | undefined = undefined) {
|
|
3257
|
-
return this.http.post<iHttpAnswerBX<BXRestElapsedHttp[]> | undefined>
|
|
3258
|
-
(this.url.getlist, params, 'не удалось получить время по задачам')
|
|
3259
|
-
.pipe(
|
|
3260
|
-
map(v => {
|
|
3261
|
-
if (v && v.result) {
|
|
3262
|
-
const newResult: BXRestElapsed[] = []
|
|
3263
|
-
for (let task of v.result) {
|
|
3264
|
-
newResult.push(this.elapsedBXMap.AnswerElapsedGetHttpToAnswerElapsedGet(task))
|
|
3265
|
-
}
|
|
3266
|
-
return extend(v, {result: newResult}) as iHttpAnswerBX<BXRestElapsed[]>
|
|
3267
|
-
}
|
|
3268
|
-
return undefined
|
|
3269
|
-
}),
|
|
3270
|
-
tap(v => {
|
|
3271
|
-
if (v && params) {
|
|
3272
|
-
this.store.dispatch(saveHttpTaskTime({
|
|
3273
|
-
filter: clone(params),
|
|
3274
|
-
time: v
|
|
3275
|
-
}))
|
|
3347
|
+
getCacheOff(params: RequestParamsElapsedGetList | undefined = undefined) {
|
|
3348
|
+
return this.http.post<iHttpAnswerBX<BXRestElapsedHttp[]> | undefined>
|
|
3349
|
+
(this.url.getlist, params, 'не удалось получить время по задачам')
|
|
3350
|
+
.pipe(
|
|
3351
|
+
map(v => {
|
|
3352
|
+
if (v && v.result) {
|
|
3353
|
+
const newResult: BXRestElapsed[] = []
|
|
3354
|
+
for (let task of v.result) {
|
|
3355
|
+
newResult.push(this.elapsedBXMap.AnswerElapsedGetHttpToAnswerElapsedGet(task))
|
|
3276
3356
|
}
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3357
|
+
return extend(v, {result: newResult}) as iHttpAnswerBX<BXRestElapsed[]>
|
|
3358
|
+
}
|
|
3359
|
+
return undefined
|
|
3360
|
+
}),
|
|
3361
|
+
tap(v => {
|
|
3362
|
+
if (v && params) {
|
|
3363
|
+
this.store.dispatch(saveHttpTaskTime({
|
|
3364
|
+
filter: clone(params),
|
|
3365
|
+
time: v
|
|
3366
|
+
}))
|
|
3367
|
+
}
|
|
3368
|
+
})
|
|
3369
|
+
)
|
|
3370
|
+
}
|
|
3371
|
+
*/
|
|
3281
3372
|
isAllowedModify(idTask, idItem) {
|
|
3282
3373
|
let permission = Permission.get();
|
|
3283
3374
|
if (permission?.tasks?.length) {
|
|
@@ -3400,7 +3491,7 @@ class BXRestNavvyElapseditem {
|
|
|
3400
3491
|
}
|
|
3401
3492
|
})), 'Не удалось удалить элемент списка', v => (v === null));
|
|
3402
3493
|
}
|
|
3403
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token: BXRestElapseditem }, { token: BXRestNavvyUser }, { token: BXRestNavvyTasks }, { token: BXRestMapTaskElapseditem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3494
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token: BXRestElapseditem }, { token: BXRestNavvyUser }, { token: BXRestNavvyTasks }, { token: BXRestMapTaskElapseditem }, { token: BXRestNavvyOperationElapseditem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3404
3495
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, providedIn: 'root' }); }
|
|
3405
3496
|
}
|
|
3406
3497
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, decorators: [{
|
|
@@ -3408,7 +3499,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
3408
3499
|
args: [{
|
|
3409
3500
|
providedIn: 'root'
|
|
3410
3501
|
}]
|
|
3411
|
-
}], ctorParameters: function () { return [{ type: BXRestElapseditem }, { type: BXRestNavvyUser }, { type: BXRestNavvyTasks }, { type: BXRestMapTaskElapseditem }]; } });
|
|
3502
|
+
}], ctorParameters: function () { return [{ type: BXRestElapseditem }, { type: BXRestNavvyUser }, { type: BXRestNavvyTasks }, { type: BXRestMapTaskElapseditem }, { type: BXRestNavvyOperationElapseditem }]; } });
|
|
3412
3503
|
|
|
3413
3504
|
class BXRestNavvyTask {
|
|
3414
3505
|
constructor(elapseditem) {
|
|
@@ -4171,8 +4262,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4171
4262
|
}]
|
|
4172
4263
|
}], ctorParameters: function () { return [{ type: BXRestSonetGroup }, { type: BXRestMapSonetGroup }]; } });
|
|
4173
4264
|
|
|
4265
|
+
class BXRestNavvyServer {
|
|
4266
|
+
constructor(BXRestServer) {
|
|
4267
|
+
this.BXRestServer = BXRestServer;
|
|
4268
|
+
this.Navvy = new Navvy(this.BXRestServer, undefined);
|
|
4269
|
+
}
|
|
4270
|
+
time() {
|
|
4271
|
+
return this.Navvy.simple(this.BXRestServer.time, 'Не удалось получить время сервера');
|
|
4272
|
+
}
|
|
4273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyServer, deps: [{ token: BXRestServer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4274
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyServer, providedIn: 'root' }); }
|
|
4275
|
+
}
|
|
4276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyServer, decorators: [{
|
|
4277
|
+
type: Injectable,
|
|
4278
|
+
args: [{
|
|
4279
|
+
providedIn: 'root'
|
|
4280
|
+
}]
|
|
4281
|
+
}], ctorParameters: function () { return [{ type: BXRestServer }]; } });
|
|
4282
|
+
|
|
4174
4283
|
class BXRest {
|
|
4175
|
-
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group) {
|
|
4284
|
+
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server) {
|
|
4176
4285
|
this.user = user;
|
|
4177
4286
|
this.lists = lists;
|
|
4178
4287
|
this.task = task;
|
|
@@ -4182,8 +4291,9 @@ class BXRest {
|
|
|
4182
4291
|
this.log = log;
|
|
4183
4292
|
this.calendar = calendar;
|
|
4184
4293
|
this.sonet_group = sonet_group;
|
|
4294
|
+
this.server = server;
|
|
4185
4295
|
}
|
|
4186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTask }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizproc }, { token: BXRestLog }, { token: BXRestCalendar }, { token: BXRestSonetGroup }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRest, deps: [{ token: BXRestUser }, { token: BXRestLists }, { token: BXRestTask }, { token: BXRestTasks }, { token: BXRestDisk }, { token: BXRestBizproc }, { token: BXRestLog }, { token: BXRestCalendar }, { token: BXRestSonetGroup }, { token: BXRestServer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4187
4297
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRest, providedIn: 'root' }); }
|
|
4188
4298
|
}
|
|
4189
4299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRest, decorators: [{
|
|
@@ -4191,9 +4301,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4191
4301
|
args: [{
|
|
4192
4302
|
providedIn: 'root'
|
|
4193
4303
|
}]
|
|
4194
|
-
}], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }]; } });
|
|
4304
|
+
}], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }, { type: BXRestServer }]; } });
|
|
4195
4305
|
class BXRestNavvy {
|
|
4196
|
-
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group) {
|
|
4306
|
+
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server) {
|
|
4197
4307
|
this.user = user;
|
|
4198
4308
|
this.lists = lists;
|
|
4199
4309
|
this.task = task;
|
|
@@ -4203,8 +4313,9 @@ class BXRestNavvy {
|
|
|
4203
4313
|
this.log = log;
|
|
4204
4314
|
this.calendar = calendar;
|
|
4205
4315
|
this.sonet_group = sonet_group;
|
|
4316
|
+
this.server = server;
|
|
4206
4317
|
}
|
|
4207
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTask }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizproc }, { token: BXRestNavvyLog }, { token: BXRestNavvyCalendar }, { token: BXRestNavvySonetGroup }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4318
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvy, deps: [{ token: BXRestNavvyUser }, { token: BXRestNavvyLists }, { token: BXRestNavvyTask }, { token: BXRestNavvyTasks }, { token: BXRestNavvyDisk }, { token: BXRestNavvyBizproc }, { token: BXRestNavvyLog }, { token: BXRestNavvyCalendar }, { token: BXRestNavvySonetGroup }, { token: BXRestNavvyServer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4208
4319
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvy, providedIn: 'root' }); }
|
|
4209
4320
|
}
|
|
4210
4321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvy, decorators: [{
|
|
@@ -4212,7 +4323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4212
4323
|
args: [{
|
|
4213
4324
|
providedIn: 'root'
|
|
4214
4325
|
}]
|
|
4215
|
-
}], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }]; } });
|
|
4326
|
+
}], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }, { type: BXRestNavvyServer }]; } });
|
|
4216
4327
|
class BXRestMap {
|
|
4217
4328
|
constructor(lists) {
|
|
4218
4329
|
this.lists = lists;
|