bx-rest 0.2.9 → 0.2.11
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/esm2022/map/department.mjs +34 -0
- package/esm2022/map/tasks/task.mjs +1 -1
- package/esm2022/request/departments.mjs +36 -0
- package/esm2022/request/task/commentitem.mjs +42 -0
- package/esm2022/request/task/elapseditem.mjs +5 -5
- package/esm2022/request/task.mjs +6 -4
- package/esm2022/request/tasks/task.mjs +2 -4
- package/esm2022/request-navvy/departments.mjs +34 -0
- package/esm2022/request-navvy/task/commentitem.mjs +56 -0
- package/esm2022/request-navvy/task/elapseditem.mjs +3 -3
- package/esm2022/request-navvy/task.mjs +6 -4
- package/esm2022/rest.mjs +24 -20
- package/esm2022/typification/rest/department/add.mjs +2 -0
- package/esm2022/typification/rest/department/del.mjs +2 -0
- package/esm2022/typification/rest/department/department.mjs +2 -0
- package/esm2022/typification/rest/department/get.mjs +2 -0
- package/esm2022/typification/rest/department/update.mjs +2 -0
- package/esm2022/typification/rest/task/base/filterGenerator.mjs +2 -0
- package/esm2022/typification/rest/task/commentitem/add.mjs +2 -0
- package/esm2022/typification/rest/task/commentitem/delete.mjs +2 -0
- package/esm2022/typification/rest/task/commentitem/get.mjs +2 -0
- package/esm2022/typification/rest/task/commentitem/getlist.mjs +2 -0
- package/esm2022/typification/rest/task/commentitem/update.mjs +2 -0
- package/esm2022/typification/rest/task/task.mjs +1 -1
- package/esm2022/typification/rest/tasks/task/list.mjs +1 -1
- package/fesm2022/bx-rest.mjs +254 -72
- package/fesm2022/bx-rest.mjs.map +1 -1
- package/map/department.d.ts +7 -0
- package/map/tasks/task.d.ts +2 -2
- package/package.json +1 -1
- package/request/departments.d.ts +23 -0
- package/request/task/commentitem.d.ts +28 -0
- package/request/task/elapseditem.d.ts +3 -3
- package/request/task.d.ts +5 -3
- package/request/tasks/task.d.ts +2 -2
- package/request-navvy/departments.d.ts +19 -0
- package/request-navvy/task/commentitem.d.ts +24 -0
- package/request-navvy/task/elapseditem.d.ts +6 -6
- package/request-navvy/task/operation/elapseditem.d.ts +1 -1
- package/request-navvy/task.d.ts +3 -1
- package/request-navvy/tasks/task.d.ts +1 -1
- package/rest.d.ts +6 -2
- package/typification/rest/department/add.d.ts +6 -0
- package/typification/rest/department/del.d.ts +3 -0
- package/typification/rest/department/department.d.ts +14 -0
- package/typification/rest/department/get.d.ts +8 -0
- package/typification/rest/department/update.d.ts +7 -0
- package/typification/rest/task/base/filterGenerator.d.ts +6 -0
- package/typification/rest/task/commentitem/add.d.ts +9 -0
- package/typification/rest/task/commentitem/delete.d.ts +4 -0
- package/typification/rest/task/commentitem/get.d.ts +4 -0
- package/typification/rest/task/commentitem/getlist.d.ts +20 -0
- package/typification/rest/task/commentitem/update.d.ts +4 -0
- package/typification/rest/task/task.d.ts +9 -1
- package/typification/rest/tasks/task/list.d.ts +47 -3
package/fesm2022/bx-rest.mjs
CHANGED
|
@@ -1387,7 +1387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
1387
1387
|
}]
|
|
1388
1388
|
}], ctorParameters: function () { return [{ type: BXRestListsElement }, { type: BXRestListsField }, { type: HttpBXServices }]; } });
|
|
1389
1389
|
|
|
1390
|
-
class
|
|
1390
|
+
class BXRestTaskElapseditem {
|
|
1391
1391
|
constructor(http) {
|
|
1392
1392
|
this.http = http;
|
|
1393
1393
|
this.url = {
|
|
@@ -1435,10 +1435,48 @@ class BXRestElapseditem {
|
|
|
1435
1435
|
isActionAllowed(param) {
|
|
1436
1436
|
return this.http.post(this.url.isactionallowed, param);
|
|
1437
1437
|
}
|
|
1438
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type:
|
|
1439
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type:
|
|
1438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTaskElapseditem, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1439
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTaskElapseditem, providedIn: 'root' }); }
|
|
1440
1440
|
}
|
|
1441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type:
|
|
1441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTaskElapseditem, decorators: [{
|
|
1442
|
+
type: Injectable,
|
|
1443
|
+
args: [{
|
|
1444
|
+
providedIn: 'root'
|
|
1445
|
+
}]
|
|
1446
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
1447
|
+
|
|
1448
|
+
class BXRestTaskCommentItem {
|
|
1449
|
+
constructor(http) {
|
|
1450
|
+
this.http = http;
|
|
1451
|
+
this.url = {
|
|
1452
|
+
getmanifest: [$task, $commentitem, $getmanifest],
|
|
1453
|
+
getlist: [$task, $commentitem, $getlist],
|
|
1454
|
+
get: [$task, $commentitem, $get],
|
|
1455
|
+
add: [$task, $commentitem, $add],
|
|
1456
|
+
update: [$task, $commentitem, $update],
|
|
1457
|
+
delete: [$task, $commentitem, $delete],
|
|
1458
|
+
isactionallowed: [$task, $commentitem, $isactionallowed], // Проверяет, разрешено ли действие
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
add(param) {
|
|
1462
|
+
return this.http.post(this.url.add, param);
|
|
1463
|
+
}
|
|
1464
|
+
update(param) {
|
|
1465
|
+
return this.http.post(this.url.update, param);
|
|
1466
|
+
}
|
|
1467
|
+
get(param) {
|
|
1468
|
+
return this.http.post(this.url.get, param);
|
|
1469
|
+
}
|
|
1470
|
+
getlist(param) {
|
|
1471
|
+
return this.http.post(this.url.getlist, param);
|
|
1472
|
+
}
|
|
1473
|
+
del(param) {
|
|
1474
|
+
return this.http.post(this.url.delete, param);
|
|
1475
|
+
}
|
|
1476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTaskCommentItem, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1477
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTaskCommentItem, providedIn: 'root' }); }
|
|
1478
|
+
}
|
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTaskCommentItem, decorators: [{
|
|
1442
1480
|
type: Injectable,
|
|
1443
1481
|
args: [{
|
|
1444
1482
|
providedIn: 'root'
|
|
@@ -1446,10 +1484,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
1446
1484
|
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
1447
1485
|
|
|
1448
1486
|
class BXRestTask {
|
|
1449
|
-
constructor(elapseditem) {
|
|
1487
|
+
constructor(elapseditem, commentitem) {
|
|
1450
1488
|
this.elapseditem = elapseditem;
|
|
1489
|
+
this.commentitem = commentitem;
|
|
1451
1490
|
}
|
|
1452
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTask, deps: [{ token:
|
|
1491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTask, deps: [{ token: BXRestTaskElapseditem }, { token: BXRestTaskCommentItem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1453
1492
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTask, providedIn: 'root' }); }
|
|
1454
1493
|
}
|
|
1455
1494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestTask, decorators: [{
|
|
@@ -1457,7 +1496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
1457
1496
|
args: [{
|
|
1458
1497
|
providedIn: 'root'
|
|
1459
1498
|
}]
|
|
1460
|
-
}], ctorParameters: function () { return [{ type:
|
|
1499
|
+
}], ctorParameters: function () { return [{ type: BXRestTaskElapseditem }, { type: BXRestTaskCommentItem }]; } });
|
|
1461
1500
|
|
|
1462
1501
|
class BXRestTasksTask {
|
|
1463
1502
|
constructor(http) {
|
|
@@ -1544,9 +1583,7 @@ class BXRestTasksTask {
|
|
|
1544
1583
|
get(requestArray) {
|
|
1545
1584
|
return this.http.post(this.url.get, requestArray);
|
|
1546
1585
|
}
|
|
1547
|
-
list(param
|
|
1548
|
-
// = {}
|
|
1549
|
-
) {
|
|
1586
|
+
list(param = {}) {
|
|
1550
1587
|
return this.http.post(this.url.list, param);
|
|
1551
1588
|
}
|
|
1552
1589
|
/*
|
|
@@ -2169,6 +2206,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
2169
2206
|
}]
|
|
2170
2207
|
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2171
2208
|
|
|
2209
|
+
class BXRestDepartment {
|
|
2210
|
+
constructor(http) {
|
|
2211
|
+
this.http = http;
|
|
2212
|
+
this.url = {
|
|
2213
|
+
get: [$department, $get],
|
|
2214
|
+
del: [$department, $delete],
|
|
2215
|
+
add: [$department, $add],
|
|
2216
|
+
update: [$department, $update]
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
get(param = {}) {
|
|
2220
|
+
return this.http.post(this.url.get, param);
|
|
2221
|
+
}
|
|
2222
|
+
add(param) {
|
|
2223
|
+
return this.http.post(this.url.add, param);
|
|
2224
|
+
}
|
|
2225
|
+
del(param) {
|
|
2226
|
+
return this.http.post(this.url.del, param);
|
|
2227
|
+
}
|
|
2228
|
+
update(param) {
|
|
2229
|
+
return this.http.post(this.url.update, param);
|
|
2230
|
+
}
|
|
2231
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestDepartment, deps: [{ token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2232
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestDepartment, providedIn: 'root' }); }
|
|
2233
|
+
}
|
|
2234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestDepartment, decorators: [{
|
|
2235
|
+
type: Injectable,
|
|
2236
|
+
args: [{
|
|
2237
|
+
providedIn: 'root'
|
|
2238
|
+
}]
|
|
2239
|
+
}], ctorParameters: function () { return [{ type: HttpBXServices }]; } });
|
|
2240
|
+
|
|
2172
2241
|
class NavvySupport {
|
|
2173
2242
|
constructor(requestClass, mapClass) {
|
|
2174
2243
|
this.requestClass = requestClass;
|
|
@@ -3618,7 +3687,7 @@ class BXRestNavvyElapseditem {
|
|
|
3618
3687
|
}
|
|
3619
3688
|
})), 'Не удалось удалить элемент списка', v => (v === null));
|
|
3620
3689
|
}
|
|
3621
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token:
|
|
3690
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, deps: [{ token: BXRestTaskElapseditem }, { token: BXRestNavvyUser }, { token: BXRestNavvyTasks }, { token: BXRestMapTaskElapseditem }, { token: HttpBXServices }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3622
3691
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, providedIn: 'root' }); }
|
|
3623
3692
|
}
|
|
3624
3693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyElapseditem, decorators: [{
|
|
@@ -3626,13 +3695,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
3626
3695
|
args: [{
|
|
3627
3696
|
providedIn: 'root'
|
|
3628
3697
|
}]
|
|
3629
|
-
}], ctorParameters: function () { return [{ type:
|
|
3698
|
+
}], ctorParameters: function () { return [{ type: BXRestTaskElapseditem }, { type: BXRestNavvyUser }, { type: BXRestNavvyTasks }, { type: BXRestMapTaskElapseditem }, { type: HttpBXServices }]; } });
|
|
3699
|
+
|
|
3700
|
+
class BXRestMapTaskCommentItem extends BaseMapServices {
|
|
3701
|
+
getlist(value) {
|
|
3702
|
+
return value ? value.map(i => this.iCommentTaskHtmlToiCommentTask(i)) : undefined;
|
|
3703
|
+
}
|
|
3704
|
+
get(value) {
|
|
3705
|
+
return value ? this.iCommentTaskHtmlToiCommentTask(value) : undefined;
|
|
3706
|
+
}
|
|
3707
|
+
iCommentTaskHtmlToiCommentTask(item) {
|
|
3708
|
+
if (item.ATTACHED_OBJECTS) {
|
|
3709
|
+
return {
|
|
3710
|
+
ATTACHED_OBJECTS: Object.values(item.ATTACHED_OBJECTS).map(i => {
|
|
3711
|
+
return {
|
|
3712
|
+
ATTACHMENT_ID: this.toNum(i.ATTACHMENT_ID),
|
|
3713
|
+
FILE_ID: this.toNum(i.FILE_ID),
|
|
3714
|
+
SIZE: this.toNum(i.SIZE),
|
|
3715
|
+
DOWNLOAD_URL: i.DOWNLOAD_URL,
|
|
3716
|
+
NAME: i.NAME,
|
|
3717
|
+
VIEW_URL: i.VIEW_URL
|
|
3718
|
+
};
|
|
3719
|
+
}),
|
|
3720
|
+
AUTHOR_ID: this.toNum(item.AUTHOR_ID),
|
|
3721
|
+
ID: this.toNum(item.ID),
|
|
3722
|
+
POST_DATE: this.toDate(item.POST_DATE),
|
|
3723
|
+
AUTHOR_EMAIL: item.AUTHOR_EMAIL,
|
|
3724
|
+
AUTHOR_NAME: item.AUTHOR_NAME,
|
|
3725
|
+
POST_MESSAGE: item.POST_MESSAGE,
|
|
3726
|
+
POST_MESSAGE_HTML: item.POST_MESSAGE_HTML
|
|
3727
|
+
};
|
|
3728
|
+
}
|
|
3729
|
+
else {
|
|
3730
|
+
return {
|
|
3731
|
+
AUTHOR_ID: this.toNum(item.AUTHOR_ID),
|
|
3732
|
+
ID: this.toNum(item.ID),
|
|
3733
|
+
POST_DATE: this.toDate(item.POST_DATE),
|
|
3734
|
+
AUTHOR_EMAIL: item.AUTHOR_EMAIL,
|
|
3735
|
+
AUTHOR_NAME: item.AUTHOR_NAME,
|
|
3736
|
+
POST_MESSAGE: item.POST_MESSAGE,
|
|
3737
|
+
POST_MESSAGE_HTML: item.POST_MESSAGE_HTML
|
|
3738
|
+
};
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskCommentItem, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3742
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskCommentItem, providedIn: 'root' }); }
|
|
3743
|
+
}
|
|
3744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskCommentItem, decorators: [{
|
|
3745
|
+
type: Injectable,
|
|
3746
|
+
args: [{
|
|
3747
|
+
providedIn: 'root'
|
|
3748
|
+
}]
|
|
3749
|
+
}] });
|
|
3750
|
+
|
|
3751
|
+
class BXRestNavvyTaskCommentItem {
|
|
3752
|
+
constructor(BXRestTaskCommentItem, mapTaskCommentItem, snackBar) {
|
|
3753
|
+
this.BXRestTaskCommentItem = BXRestTaskCommentItem;
|
|
3754
|
+
this.mapTaskCommentItem = mapTaskCommentItem;
|
|
3755
|
+
this.snackBar = snackBar;
|
|
3756
|
+
this.Navvy = new Navvy(this.BXRestTaskCommentItem, this.mapTaskCommentItem);
|
|
3757
|
+
}
|
|
3758
|
+
add(param) {
|
|
3759
|
+
return this.Navvy.simpleWithArg(this.BXRestTaskCommentItem.add, param, 'Не удалось добавить комментарий к задаче');
|
|
3760
|
+
}
|
|
3761
|
+
update(param) {
|
|
3762
|
+
return this.Navvy.simpleWithArg(this.BXRestTaskCommentItem.update, param, 'Не удалось обновить комментарий к задаче');
|
|
3763
|
+
}
|
|
3764
|
+
get(param) {
|
|
3765
|
+
return this.Navvy.simpleWithArg(this.BXRestTaskCommentItem.get, param, 'Не удалось получить комментарий к задаче', this.mapTaskCommentItem.get);
|
|
3766
|
+
}
|
|
3767
|
+
getlist(param = {
|
|
3768
|
+
FILTER: {},
|
|
3769
|
+
ORDER: {
|
|
3770
|
+
POST_DATE: 'asc'
|
|
3771
|
+
}
|
|
3772
|
+
}) {
|
|
3773
|
+
return this.Navvy.simpleWithArg(this.BXRestTaskCommentItem.getlist, param, 'Не удалось получить комментарии к задаче', this.mapTaskCommentItem.getlist);
|
|
3774
|
+
}
|
|
3775
|
+
del(param) {
|
|
3776
|
+
if (param.ITEMID > 0) {
|
|
3777
|
+
return this.get(param).result().pipe(mergeMap(v => {
|
|
3778
|
+
if (v) {
|
|
3779
|
+
return this.Navvy.simpleWithArg(this.BXRestTaskCommentItem.del, param, 'Не удалось удалить комментарий').result();
|
|
3780
|
+
}
|
|
3781
|
+
this.snackBar.warning('comment not exist');
|
|
3782
|
+
return of(false);
|
|
3783
|
+
}));
|
|
3784
|
+
}
|
|
3785
|
+
else {
|
|
3786
|
+
this.snackBar.warning('comment not exist');
|
|
3787
|
+
return of(false);
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTaskCommentItem, deps: [{ token: BXRestTaskCommentItem }, { token: BXRestMapTaskCommentItem }, { token: SnackBarService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3791
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTaskCommentItem, providedIn: 'root' }); }
|
|
3792
|
+
}
|
|
3793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTaskCommentItem, decorators: [{
|
|
3794
|
+
type: Injectable,
|
|
3795
|
+
args: [{
|
|
3796
|
+
providedIn: 'root'
|
|
3797
|
+
}]
|
|
3798
|
+
}], ctorParameters: function () { return [{ type: BXRestTaskCommentItem }, { type: BXRestMapTaskCommentItem }, { type: SnackBarService }]; } });
|
|
3630
3799
|
|
|
3631
3800
|
class BXRestNavvyTask {
|
|
3632
|
-
constructor(elapseditem) {
|
|
3801
|
+
constructor(elapseditem, commentitem) {
|
|
3633
3802
|
this.elapseditem = elapseditem;
|
|
3803
|
+
this.commentitem = commentitem;
|
|
3634
3804
|
}
|
|
3635
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTask, deps: [{ token: BXRestNavvyElapseditem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3805
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTask, deps: [{ token: BXRestNavvyElapseditem }, { token: BXRestNavvyTaskCommentItem }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3636
3806
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTask, providedIn: 'root' }); }
|
|
3637
3807
|
}
|
|
3638
3808
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyTask, decorators: [{
|
|
@@ -3640,7 +3810,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
3640
3810
|
args: [{
|
|
3641
3811
|
providedIn: 'root'
|
|
3642
3812
|
}]
|
|
3643
|
-
}], ctorParameters: function () { return [{ type: BXRestNavvyElapseditem }]; } });
|
|
3813
|
+
}], ctorParameters: function () { return [{ type: BXRestNavvyElapseditem }, { type: BXRestNavvyTaskCommentItem }]; } });
|
|
3644
3814
|
|
|
3645
3815
|
class BXRestMapDiskBase extends BaseMapServices {
|
|
3646
3816
|
separationFoldersAndFiles(arr) {
|
|
@@ -4422,8 +4592,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4422
4592
|
}]
|
|
4423
4593
|
}], ctorParameters: function () { return [{ type: BXRestServer }, { type: BXRestMapServer }]; } });
|
|
4424
4594
|
|
|
4595
|
+
class BXRestMapDepartment {
|
|
4596
|
+
get(item) {
|
|
4597
|
+
return (item) ? item.map(dep => {
|
|
4598
|
+
if (dep.PARENT) {
|
|
4599
|
+
return {
|
|
4600
|
+
ID: Number(dep.ID),
|
|
4601
|
+
UF_HEAD: Number(dep.UF_HEAD),
|
|
4602
|
+
PARENT: Number(dep.PARENT),
|
|
4603
|
+
NAME: dep.NAME,
|
|
4604
|
+
SORT: dep.SORT,
|
|
4605
|
+
};
|
|
4606
|
+
}
|
|
4607
|
+
else {
|
|
4608
|
+
return {
|
|
4609
|
+
ID: Number(dep.ID),
|
|
4610
|
+
UF_HEAD: Number(dep.UF_HEAD),
|
|
4611
|
+
NAME: dep.NAME,
|
|
4612
|
+
SORT: dep.SORT,
|
|
4613
|
+
};
|
|
4614
|
+
}
|
|
4615
|
+
}) : undefined;
|
|
4616
|
+
}
|
|
4617
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapDepartment, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4618
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapDepartment, providedIn: 'root' }); }
|
|
4619
|
+
}
|
|
4620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapDepartment, decorators: [{
|
|
4621
|
+
type: Injectable,
|
|
4622
|
+
args: [{
|
|
4623
|
+
providedIn: 'root'
|
|
4624
|
+
}]
|
|
4625
|
+
}] });
|
|
4626
|
+
|
|
4627
|
+
class BXRestNavvyDepartment {
|
|
4628
|
+
constructor(BXRestDepartment, BXRestMapDepartment) {
|
|
4629
|
+
this.BXRestDepartment = BXRestDepartment;
|
|
4630
|
+
this.BXRestMapDepartment = BXRestMapDepartment;
|
|
4631
|
+
this.Navvy = new Navvy(this.BXRestDepartment, this.BXRestMapDepartment);
|
|
4632
|
+
}
|
|
4633
|
+
get(param = {}) {
|
|
4634
|
+
return this.Navvy.PagNav(this.BXRestDepartment.get, param, 'Не удалось получить список подразделений', this.BXRestMapDepartment.get);
|
|
4635
|
+
}
|
|
4636
|
+
add(param) {
|
|
4637
|
+
return this.Navvy.simpleWithArg(this.BXRestDepartment.add, param, 'Не удалось добавить подразделение');
|
|
4638
|
+
}
|
|
4639
|
+
del(id) {
|
|
4640
|
+
return this.Navvy.simpleWithArg(this.BXRestDepartment.del, { ID: id }, 'Не удалось удалить подразделение');
|
|
4641
|
+
}
|
|
4642
|
+
update(param) {
|
|
4643
|
+
param.NAME = param.NAME.trim();
|
|
4644
|
+
return this.Navvy.simpleWithArg(this.BXRestDepartment.update, param, 'Не удалось обновить подразделение');
|
|
4645
|
+
}
|
|
4646
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyDepartment, deps: [{ token: BXRestDepartment }, { token: BXRestMapDepartment }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4647
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyDepartment, providedIn: 'root' }); }
|
|
4648
|
+
}
|
|
4649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvyDepartment, decorators: [{
|
|
4650
|
+
type: Injectable,
|
|
4651
|
+
args: [{
|
|
4652
|
+
providedIn: 'root'
|
|
4653
|
+
}]
|
|
4654
|
+
}], ctorParameters: function () { return [{ type: BXRestDepartment }, { type: BXRestMapDepartment }]; } });
|
|
4655
|
+
|
|
4425
4656
|
class BXRest {
|
|
4426
|
-
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server) {
|
|
4657
|
+
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server, department) {
|
|
4427
4658
|
this.user = user;
|
|
4428
4659
|
this.lists = lists;
|
|
4429
4660
|
this.task = task;
|
|
@@ -4434,8 +4665,9 @@ class BXRest {
|
|
|
4434
4665
|
this.calendar = calendar;
|
|
4435
4666
|
this.sonet_group = sonet_group;
|
|
4436
4667
|
this.server = server;
|
|
4668
|
+
this.department = department;
|
|
4437
4669
|
}
|
|
4438
|
-
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 }); }
|
|
4670
|
+
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 }, { token: BXRestDepartment }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4439
4671
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRest, providedIn: 'root' }); }
|
|
4440
4672
|
}
|
|
4441
4673
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRest, decorators: [{
|
|
@@ -4443,9 +4675,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4443
4675
|
args: [{
|
|
4444
4676
|
providedIn: 'root'
|
|
4445
4677
|
}]
|
|
4446
|
-
}], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }, { type: BXRestServer }]; } });
|
|
4678
|
+
}], ctorParameters: function () { return [{ type: BXRestUser }, { type: BXRestLists }, { type: BXRestTask }, { type: BXRestTasks }, { type: BXRestDisk }, { type: BXRestBizproc }, { type: BXRestLog }, { type: BXRestCalendar }, { type: BXRestSonetGroup }, { type: BXRestServer }, { type: BXRestDepartment }]; } });
|
|
4447
4679
|
class BXRestNavvy {
|
|
4448
|
-
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server) {
|
|
4680
|
+
constructor(user, lists, task, tasks, disk, bizproc, log, calendar, sonet_group, server, department) {
|
|
4449
4681
|
this.user = user;
|
|
4450
4682
|
this.lists = lists;
|
|
4451
4683
|
this.task = task;
|
|
@@ -4456,8 +4688,9 @@ class BXRestNavvy {
|
|
|
4456
4688
|
this.calendar = calendar;
|
|
4457
4689
|
this.sonet_group = sonet_group;
|
|
4458
4690
|
this.server = server;
|
|
4691
|
+
this.department = department;
|
|
4459
4692
|
}
|
|
4460
|
-
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 }); }
|
|
4693
|
+
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 }, { token: BXRestNavvyDepartment }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4461
4694
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvy, providedIn: 'root' }); }
|
|
4462
4695
|
}
|
|
4463
4696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestNavvy, decorators: [{
|
|
@@ -4465,7 +4698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4465
4698
|
args: [{
|
|
4466
4699
|
providedIn: 'root'
|
|
4467
4700
|
}]
|
|
4468
|
-
}], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }, { type: BXRestNavvyServer }]; } });
|
|
4701
|
+
}], ctorParameters: function () { return [{ type: BXRestNavvyUser }, { type: BXRestNavvyLists }, { type: BXRestNavvyTask }, { type: BXRestNavvyTasks }, { type: BXRestNavvyDisk }, { type: BXRestNavvyBizproc }, { type: BXRestNavvyLog }, { type: BXRestNavvyCalendar }, { type: BXRestNavvySonetGroup }, { type: BXRestNavvyServer }, { type: BXRestNavvyDepartment }]; } });
|
|
4469
4702
|
class BXRestMap {
|
|
4470
4703
|
constructor(lists) {
|
|
4471
4704
|
this.lists = lists;
|
|
@@ -4587,57 +4820,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
4587
4820
|
}]
|
|
4588
4821
|
}], ctorParameters: function () { return [{ type: BXRestMapLogBlogPost }]; } });
|
|
4589
4822
|
|
|
4590
|
-
class BXRestMapTaskCommentItem extends BaseMapServices {
|
|
4591
|
-
getlist(value) {
|
|
4592
|
-
return value ? value.map(i => this.iCommentTaskHtmlToiCommentTask(i)) : undefined;
|
|
4593
|
-
}
|
|
4594
|
-
get(value) {
|
|
4595
|
-
return value ? this.iCommentTaskHtmlToiCommentTask(value) : undefined;
|
|
4596
|
-
}
|
|
4597
|
-
iCommentTaskHtmlToiCommentTask(item) {
|
|
4598
|
-
if (item.ATTACHED_OBJECTS) {
|
|
4599
|
-
return {
|
|
4600
|
-
ATTACHED_OBJECTS: Object.values(item.ATTACHED_OBJECTS).map(i => {
|
|
4601
|
-
return {
|
|
4602
|
-
ATTACHMENT_ID: this.toNum(i.ATTACHMENT_ID),
|
|
4603
|
-
FILE_ID: this.toNum(i.FILE_ID),
|
|
4604
|
-
SIZE: this.toNum(i.SIZE),
|
|
4605
|
-
DOWNLOAD_URL: i.DOWNLOAD_URL,
|
|
4606
|
-
NAME: i.NAME,
|
|
4607
|
-
VIEW_URL: i.VIEW_URL
|
|
4608
|
-
};
|
|
4609
|
-
}),
|
|
4610
|
-
AUTHOR_ID: this.toNum(item.AUTHOR_ID),
|
|
4611
|
-
ID: this.toNum(item.ID),
|
|
4612
|
-
POST_DATE: this.toDate(item.POST_DATE),
|
|
4613
|
-
AUTHOR_EMAIL: item.AUTHOR_EMAIL,
|
|
4614
|
-
AUTHOR_NAME: item.AUTHOR_NAME,
|
|
4615
|
-
POST_MESSAGE: item.POST_MESSAGE,
|
|
4616
|
-
POST_MESSAGE_HTML: item.POST_MESSAGE_HTML
|
|
4617
|
-
};
|
|
4618
|
-
}
|
|
4619
|
-
else {
|
|
4620
|
-
return {
|
|
4621
|
-
AUTHOR_ID: this.toNum(item.AUTHOR_ID),
|
|
4622
|
-
ID: this.toNum(item.ID),
|
|
4623
|
-
POST_DATE: this.toDate(item.POST_DATE),
|
|
4624
|
-
AUTHOR_EMAIL: item.AUTHOR_EMAIL,
|
|
4625
|
-
AUTHOR_NAME: item.AUTHOR_NAME,
|
|
4626
|
-
POST_MESSAGE: item.POST_MESSAGE,
|
|
4627
|
-
POST_MESSAGE_HTML: item.POST_MESSAGE_HTML
|
|
4628
|
-
};
|
|
4629
|
-
}
|
|
4630
|
-
}
|
|
4631
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskCommentItem, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4632
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskCommentItem, providedIn: 'root' }); }
|
|
4633
|
-
}
|
|
4634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskCommentItem, decorators: [{
|
|
4635
|
-
type: Injectable,
|
|
4636
|
-
args: [{
|
|
4637
|
-
providedIn: 'root'
|
|
4638
|
-
}]
|
|
4639
|
-
}] });
|
|
4640
|
-
|
|
4641
4823
|
class BXRestMapTaskResult extends BaseMapServices {
|
|
4642
4824
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskResult, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4643
4825
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: BXRestMapTaskResult, providedIn: 'root' }); }
|