@lowcodeunit/applications-flow-common 1.39.86-merge → 1.39.88-enterprise-switch-fix
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/esm2020/lib/controls/devops-source-control-form/devops-source-control-form.component.mjs +2 -2
- package/esm2020/lib/dialogs/dfs-modifiers-dialog/dfs-modifiers-dialog.component.mjs +2 -2
- package/esm2020/lib/elements/feed-header/feed-header.component.mjs +2 -2
- package/esm2020/lib/elements/project-card/project-card.component.mjs +4 -4
- package/esm2020/lib/elements/team-member-card/team-member-card.component.mjs +2 -2
- package/esm2020/lib/services/eac.service.mjs +14 -4
- package/esm2020/lib/services/project.service.mjs +125 -76
- package/fesm2015/lowcodeunit-applications-flow-common.mjs +150 -88
- package/fesm2015/lowcodeunit-applications-flow-common.mjs.map +1 -1
- package/fesm2020/lowcodeunit-applications-flow-common.mjs +144 -85
- package/fesm2020/lowcodeunit-applications-flow-common.mjs.map +1 -1
- package/package.json +1 -1
@@ -457,6 +457,10 @@ class ProjectService {
|
|
457
457
|
state.LoadingActiveEnterprise = false;
|
458
458
|
if (response.Status.Code === 0) {
|
459
459
|
state.ActiveEnterpriseLookup = (_a = response.Model) === null || _a === void 0 ? void 0 : _a.Lookup;
|
460
|
+
// console.log(
|
461
|
+
// 'Active Ent set to = ',
|
462
|
+
// response.Model?.Lookup
|
463
|
+
// );
|
460
464
|
resolve();
|
461
465
|
}
|
462
466
|
else {
|
@@ -492,70 +496,86 @@ class ProjectService {
|
|
492
496
|
return __awaiter(this, void 0, void 0, function* () {
|
493
497
|
return new Promise((resolve, reject) => {
|
494
498
|
state.LoadingEnterprises = true;
|
495
|
-
this.appsFlowSvc.ListEnterprises().subscribe(
|
496
|
-
|
497
|
-
|
498
|
-
state.
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
499
|
+
this.appsFlowSvc.ListEnterprises().subscribe({
|
500
|
+
next: (response) => __awaiter(this, void 0, void 0, function* () {
|
501
|
+
// console.log('list Enterprises resp: ', response);
|
502
|
+
state.LoadingEnterprises = false;
|
503
|
+
if (response.Status.Code === 0) {
|
504
|
+
state.Enterprises = response.Model;
|
505
|
+
resolve(response.Model);
|
506
|
+
}
|
507
|
+
else {
|
508
|
+
reject(response.Status);
|
509
|
+
// console.log(response);
|
510
|
+
}
|
511
|
+
}),
|
512
|
+
error: (err) => {
|
513
|
+
state.LoadingEnterprises = false;
|
514
|
+
reject(err);
|
515
|
+
console.log(err);
|
516
|
+
},
|
509
517
|
});
|
510
518
|
});
|
511
519
|
});
|
512
520
|
}
|
513
521
|
LoadEnterpriseAsCode(state) {
|
514
|
-
return
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
state.
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
resolve(state.EaC);
|
530
|
-
this.activatedRoute.queryParams.subscribe((params) => {
|
531
|
-
var _a;
|
532
|
-
if ((params === null || params === void 0 ? void 0 : params.direct) == 'true') {
|
533
|
-
let projKeys = Object.keys(state.EaC.Projects || {});
|
534
|
-
if (projKeys.length == 1) {
|
535
|
-
// console.log('Directing to deeper link');
|
536
|
-
let appKeys = Object.keys(state.EaC.Applications || {});
|
537
|
-
if (appKeys.length == 1) {
|
538
|
-
let app = state.EaC.Applications[appKeys[0]];
|
539
|
-
let routeKey = encodeURIComponent(((_a = app.LookupConfig.PathRegex) === null || _a === void 0 ? void 0 : _a.replace('.*', '')) || '/');
|
540
|
-
window.location.href = `/dashboard/application/${appKeys[0]}/${routeKey}/${projKeys[0]}`;
|
541
|
-
}
|
542
|
-
else {
|
543
|
-
window.location.href = `/dashboard/project/${projKeys[0]}`;
|
544
|
-
}
|
522
|
+
return __awaiter(this, void 0, void 0, function* () {
|
523
|
+
return new Promise((resolve, reject) => {
|
524
|
+
console.log('Load ent called!!!');
|
525
|
+
// state.Loading = true;
|
526
|
+
// state.LoadingActiveEnterprise = true;
|
527
|
+
// BaseModeledResponse<EnterpriseAsCode>
|
528
|
+
this.appsFlowSvc.LoadEnterpriseAsCode().subscribe({
|
529
|
+
next: (response) => {
|
530
|
+
var _a;
|
531
|
+
console.log('State at Load ent: ', state);
|
532
|
+
state.Loading = false;
|
533
|
+
state.LoadingActiveEnterprise = false;
|
534
|
+
console.log('Load eac State after set Loading FALSE: ', state);
|
535
|
+
if (response.Status.Code === 0) {
|
536
|
+
state.EaC = response.Model || {};
|
545
537
|
}
|
546
|
-
|
538
|
+
else if (response.Status.Code === 3) {
|
539
|
+
}
|
540
|
+
state.EaC = state.EaC || {};
|
541
|
+
// console.log('state.eac = ', state.EaC);
|
542
|
+
this.CreatingProject =
|
543
|
+
Object.keys(((_a = state === null || state === void 0 ? void 0 : state.EaC) === null || _a === void 0 ? void 0 : _a.Projects) || {}).length <= 0;
|
544
|
+
resolve(state.EaC);
|
545
|
+
this.activatedRoute.queryParams.subscribe((params) => {
|
546
|
+
var _a;
|
547
|
+
if ((params === null || params === void 0 ? void 0 : params.direct) == 'true') {
|
548
|
+
let projKeys = Object.keys(state.EaC.Projects || {});
|
549
|
+
if (projKeys.length == 1) {
|
550
|
+
// console.log('Directing to deeper link');
|
551
|
+
let appKeys = Object.keys(state.EaC.Applications || {});
|
552
|
+
if (appKeys.length == 1) {
|
553
|
+
let app = state.EaC.Applications[appKeys[0]];
|
554
|
+
let routeKey = encodeURIComponent(((_a = app.LookupConfig.PathRegex) === null || _a === void 0 ? void 0 : _a.replace('.*', '')) || '/');
|
555
|
+
window.location.href = `/dashboard/application/${appKeys[0]}/${routeKey}/${projKeys[0]}`;
|
556
|
+
}
|
557
|
+
else {
|
558
|
+
window.location.href = `/dashboard/project/${projKeys[0]}`;
|
559
|
+
}
|
560
|
+
}
|
561
|
+
}
|
562
|
+
});
|
563
|
+
// console.log(state);
|
564
|
+
},
|
565
|
+
error: (err) => {
|
566
|
+
console.log('Load EAC ERROR Block');
|
567
|
+
state.Loading = false;
|
568
|
+
reject(err);
|
569
|
+
console.error(err);
|
570
|
+
},
|
547
571
|
});
|
548
|
-
// console.log(state);
|
549
|
-
}, (err) => {
|
550
|
-
state.Loading = false;
|
551
|
-
reject(err);
|
552
|
-
console.log(err);
|
553
572
|
});
|
554
573
|
});
|
555
574
|
}
|
556
575
|
LoadUserFeed(page, pageSize, filterStr, forCheck = false, state) {
|
557
576
|
return __awaiter(this, void 0, void 0, function* () {
|
558
577
|
return new Promise((resolve, reject) => {
|
578
|
+
// console.log('load user feed called');
|
559
579
|
state.LoadingFeed = !forCheck;
|
560
580
|
let paramMap = this.activatedRoute.snapshot.children[0].paramMap;
|
561
581
|
let result = this.loadApplicationsForFeed(state, paramMap);
|
@@ -612,12 +632,15 @@ class ProjectService {
|
|
612
632
|
SetActiveEnterprise(state, activeEntLookup) {
|
613
633
|
return __awaiter(this, void 0, void 0, function* () {
|
614
634
|
return new Promise((resolve, reject) => {
|
635
|
+
// console.log('SET ACTIVE ENT CALLED', activeEntLookup);
|
615
636
|
state.Loading = true;
|
637
|
+
state.LoadingActiveEnterprise = true;
|
616
638
|
state.LoadingFeed = true;
|
639
|
+
state.ActiveEnterpriseLookup = activeEntLookup;
|
617
640
|
this.appsFlowSvc.SetActiveEnterprise(activeEntLookup).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
|
618
641
|
if (response.Status.Code === 0) {
|
619
642
|
this.EditingProjectLookup = null;
|
620
|
-
console.log('state: ', state);
|
643
|
+
// console.log('state: ', state);
|
621
644
|
// console.log(
|
622
645
|
// 'project service active ent: ',
|
623
646
|
// activeEntLookup
|
@@ -629,20 +652,28 @@ class ProjectService {
|
|
629
652
|
// );
|
630
653
|
resolve(response.Status);
|
631
654
|
var results = yield Promise.all([
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
655
|
+
// this.ListEnterprises(state),
|
656
|
+
// this.LoadEnterpriseAsCode(state),
|
657
|
+
// this.LoadUserFeed(
|
658
|
+
// 1,
|
659
|
+
// 25,
|
660
|
+
// localStorage.getItem('activeFilter')
|
661
|
+
// ? localStorage.getItem('activeFilter')
|
662
|
+
// : '',
|
663
|
+
// false,
|
664
|
+
// state
|
665
|
+
// ),
|
637
666
|
]);
|
638
667
|
}
|
639
668
|
else {
|
640
669
|
state.Loading = false;
|
670
|
+
state.LoadingActiveEnterprise = false;
|
641
671
|
reject(response.Status);
|
642
672
|
// console.log(response);
|
643
673
|
}
|
644
674
|
}), (err) => {
|
645
675
|
state.Loading = false;
|
676
|
+
state.LoadingActiveEnterprise = false;
|
646
677
|
reject(err);
|
647
678
|
console.log(err);
|
648
679
|
});
|
@@ -652,32 +683,52 @@ class ProjectService {
|
|
652
683
|
SaveEnterpriseAsCode(state, eac) {
|
653
684
|
return __awaiter(this, void 0, void 0, function* () {
|
654
685
|
return new Promise((resolve, reject) => {
|
686
|
+
console.log('save EAC called');
|
655
687
|
state.Loading = true;
|
688
|
+
state.LoadingActiveEnterprise = true;
|
656
689
|
// console.log('eac: ', eac);
|
657
|
-
this.appsFlowSvc
|
658
|
-
|
659
|
-
|
660
|
-
|
690
|
+
let saveEntSub = this.appsFlowSvc
|
691
|
+
.SaveEnterpriseAsCode(eac)
|
692
|
+
.subscribe({
|
693
|
+
next: (response) => __awaiter(this, void 0, void 0, function* () {
|
694
|
+
if (response.Status.Code === 0) {
|
695
|
+
resolve(response.Status);
|
696
|
+
console.log('Save EAC Success');
|
697
|
+
// var results = Promise.all([
|
661
698
|
// this.EnsureUserEnterprise(state),
|
662
|
-
this.LoadEnterpriseAsCode(state),
|
663
|
-
this.ListEnterprises(state),
|
699
|
+
// this.LoadEnterpriseAsCode(state),
|
700
|
+
// this.ListEnterprises(state),
|
664
701
|
// this.GetActiveEnterprise(state),
|
665
|
-
this.LoadUserFeed(
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
702
|
+
// this.LoadUserFeed(
|
703
|
+
// 1,
|
704
|
+
// 25,
|
705
|
+
// localStorage.getItem('activeFilter')
|
706
|
+
// ? localStorage.getItem('activeFilter')
|
707
|
+
// : '',
|
708
|
+
// false,
|
709
|
+
// state
|
710
|
+
// ),
|
711
|
+
// ]);
|
712
|
+
var results = this.LoadEnterpriseAsCode(state);
|
713
|
+
console.log('LOAD EAC RESULTS: ', results);
|
714
|
+
state.Loading = false;
|
715
|
+
state.LoadingActiveEnterprise = false;
|
716
|
+
console.log('State from save eac: ', state);
|
717
|
+
}
|
718
|
+
else {
|
719
|
+
state.Loading = false;
|
720
|
+
reject(response.Status);
|
721
|
+
// console.log(response);
|
722
|
+
}
|
723
|
+
}),
|
724
|
+
error: (err) => {
|
672
725
|
state.Loading = false;
|
673
|
-
reject(
|
674
|
-
|
675
|
-
}
|
676
|
-
}), (err) => {
|
677
|
-
state.Loading = false;
|
678
|
-
reject(err);
|
679
|
-
console.log(err);
|
726
|
+
reject(err);
|
727
|
+
console.log(err);
|
728
|
+
},
|
680
729
|
});
|
730
|
+
console.log('SAVE ENT SUB: ', saveEntSub);
|
731
|
+
// saveEntSub.unsubscribe();
|
681
732
|
});
|
682
733
|
});
|
683
734
|
}
|
@@ -1027,6 +1078,9 @@ class EaCService {
|
|
1027
1078
|
}
|
1028
1079
|
});
|
1029
1080
|
}
|
1081
|
+
// this.appsFlowEventsSvc.EnsureUserEnterpriseEvent.subscribe(async () => {
|
1082
|
+
// await this.projectService.EnsureUserEnterprise(this.State);
|
1083
|
+
// });
|
1030
1084
|
EnsureUserEnterprise() {
|
1031
1085
|
return __awaiter(this, void 0, void 0, function* () {
|
1032
1086
|
const state = this.stateSubject.getValue();
|
@@ -1111,6 +1165,7 @@ class EaCService {
|
|
1111
1165
|
}
|
1112
1166
|
SaveApplicationAsCode(req) {
|
1113
1167
|
return __awaiter(this, void 0, void 0, function* () {
|
1168
|
+
console.log('Calling Save App as Code: ', req);
|
1114
1169
|
return yield this.handleSaveApplication(req);
|
1115
1170
|
});
|
1116
1171
|
}
|
@@ -1183,6 +1238,7 @@ class EaCService {
|
|
1183
1238
|
handleSaveApplication(req) {
|
1184
1239
|
return __awaiter(this, void 0, void 0, function* () {
|
1185
1240
|
const state = this.stateSubject.getValue();
|
1241
|
+
console.log('calling handle Save App: ', state);
|
1186
1242
|
const saveEaC = {
|
1187
1243
|
EnterpriseLookup: state.EaC.EnterpriseLookup,
|
1188
1244
|
Applications: {},
|
@@ -1199,9 +1255,13 @@ class EaCService {
|
|
1199
1255
|
if (req.Application) {
|
1200
1256
|
saveEaC.Applications[req.ApplicationLookup] = req.Application;
|
1201
1257
|
}
|
1202
|
-
|
1258
|
+
//await
|
1259
|
+
const status = yield Promise.all([
|
1260
|
+
this.projectService.SaveEnterpriseAsCode(state, saveEaC),
|
1261
|
+
]);
|
1262
|
+
console.log('State after save app: ', state);
|
1203
1263
|
this.stateSubject.next(state);
|
1204
|
-
return status;
|
1264
|
+
return status[0];
|
1205
1265
|
});
|
1206
1266
|
}
|
1207
1267
|
handleSaveDFSModifier(req) {
|
@@ -1225,11 +1285,12 @@ class EaCService {
|
|
1225
1285
|
}
|
1226
1286
|
if (req.ApplicationLookup) {
|
1227
1287
|
// console.log('APPLOokup: ', req.ApplicationLookup);
|
1288
|
+
// console.log('saveEAC: ', saveEaC);
|
1228
1289
|
saveEaC.Applications[req.ApplicationLookup] = {
|
1229
1290
|
ModifierLookups: req.ModifierLookups,
|
1230
1291
|
};
|
1231
1292
|
}
|
1232
|
-
console.log('Save mod eac: ', saveEaC);
|
1293
|
+
// console.log('Save mod eac: ', saveEaC);
|
1233
1294
|
const status = yield this.projectService.SaveEnterpriseAsCode(state, saveEaC);
|
1234
1295
|
this.stateSubject.next(state);
|
1235
1296
|
return status;
|
@@ -4239,7 +4300,7 @@ class DevopsSourceControlFormComponent {
|
|
4239
4300
|
RefreshOrganizations() {
|
4240
4301
|
var _a, _b, _c;
|
4241
4302
|
// this.Loading = true;
|
4242
|
-
console.log('refresh');
|
4303
|
+
// console.log('refresh');
|
4243
4304
|
this.listOrganizations();
|
4244
4305
|
(_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
|
4245
4306
|
(_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
|
@@ -7004,7 +7065,7 @@ class FeedHeaderComponent {
|
|
7004
7065
|
window.location.href = path;
|
7005
7066
|
}
|
7006
7067
|
Submit() {
|
7007
|
-
console.log('submitting: ', this.value);
|
7068
|
+
// console.log('submitting: ', this.value);
|
7008
7069
|
switch (this.selectedBtn) {
|
7009
7070
|
case 'pr-btn':
|
7010
7071
|
//Pull request
|
@@ -7449,7 +7510,7 @@ class DFSModifiersDialogComponent {
|
|
7449
7510
|
}
|
7450
7511
|
}
|
7451
7512
|
SaveDFSModifier() {
|
7452
|
-
console.log('level at save: ', this.data.level);
|
7513
|
+
// console.log('level at save: ', this.data.level);
|
7453
7514
|
let status;
|
7454
7515
|
switch (this.data.level) {
|
7455
7516
|
case 'enterprise': {
|
@@ -8383,8 +8444,8 @@ class TeamMemberCardComponent {
|
|
8383
8444
|
memberList.push(this.CurrentUser);
|
8384
8445
|
}
|
8385
8446
|
this.ProjectLookups.forEach((proj) => {
|
8386
|
-
var _a, _b, _c, _d;
|
8387
|
-
(_d = (_c = (_b = (_a = this.Projects[proj]
|
8447
|
+
var _a, _b, _c, _d, _e;
|
8448
|
+
(_e = (_d = (_c = (_b = (_a = this.Projects[proj]) === null || _a === void 0 ? void 0 : _a.RelyingParty) === null || _b === void 0 ? void 0 : _b.AccessConfigurations) === null || _c === void 0 ? void 0 : _c.fathym) === null || _d === void 0 ? void 0 : _d.Usernames) === null || _e === void 0 ? void 0 : _e.forEach((username) => {
|
8388
8449
|
if (!memberList.includes(username)) {
|
8389
8450
|
memberList.push(username);
|
8390
8451
|
// console.log("Added: ", username)
|
@@ -8712,13 +8773,14 @@ class ProjectCardComponent {
|
|
8712
8773
|
// console.log('calling build project tree');
|
8713
8774
|
let tempTreeData = [];
|
8714
8775
|
(_a = this.ProjectLookups) === null || _a === void 0 ? void 0 : _a.forEach((pLookup) => {
|
8776
|
+
var _a, _b;
|
8715
8777
|
let tempProj = this.Projects[pLookup];
|
8716
8778
|
this.Project = tempProj;
|
8717
8779
|
let tempProjNode = {
|
8718
|
-
name: tempProj.Project.Name,
|
8719
|
-
description: tempProj.Project.Description,
|
8780
|
+
name: (_a = tempProj === null || tempProj === void 0 ? void 0 : tempProj.Project) === null || _a === void 0 ? void 0 : _a.Name,
|
8781
|
+
description: (_b = tempProj === null || tempProj === void 0 ? void 0 : tempProj.Project) === null || _b === void 0 ? void 0 : _b.Description,
|
8720
8782
|
lookup: pLookup,
|
8721
|
-
url: 'https://' + tempProj.PrimaryHost,
|
8783
|
+
url: 'https://' + (tempProj === null || tempProj === void 0 ? void 0 : tempProj.PrimaryHost),
|
8722
8784
|
routerLink: ['/project', pLookup],
|
8723
8785
|
};
|
8724
8786
|
let tempRoutes = this.ApplicationRoutes;
|