@lowcodeunit/applications-flow-common 1.39.81-merge → 1.39.85-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.
@@ -454,6 +454,7 @@ class ProjectService {
454
454
  state.LoadingActiveEnterprise = false;
455
455
  if (response.Status.Code === 0) {
456
456
  state.ActiveEnterpriseLookup = response.Model?.Lookup;
457
+ console.log('Active Ent set to = ', response.Model?.Lookup);
457
458
  resolve();
458
459
  }
459
460
  else {
@@ -488,6 +489,7 @@ class ProjectService {
488
489
  return new Promise((resolve, reject) => {
489
490
  state.LoadingEnterprises = true;
490
491
  this.appsFlowSvc.ListEnterprises().subscribe(async (response) => {
492
+ console.log('list Enterprises resp: ', response);
491
493
  state.LoadingEnterprises = false;
492
494
  if (response.Status.Code === 0) {
493
495
  state.Enterprises = response.Model;
@@ -506,9 +508,12 @@ class ProjectService {
506
508
  }
507
509
  LoadEnterpriseAsCode(state) {
508
510
  return new Promise((resolve, reject) => {
511
+ console.log('Load ent called!!!');
509
512
  state.Loading = true;
513
+ state.LoadingActiveEnterprise = true;
510
514
  this.appsFlowSvc.LoadEnterpriseAsCode().subscribe((response) => {
511
515
  state.Loading = false;
516
+ state.LoadingActiveEnterprise = false;
512
517
  console.log('Load eac response: ', response);
513
518
  if (response.Status.Code === 0) {
514
519
  state.EaC = response.Model || {};
@@ -547,6 +552,7 @@ class ProjectService {
547
552
  }
548
553
  async LoadUserFeed(page, pageSize, filterStr, forCheck = false, state) {
549
554
  return new Promise((resolve, reject) => {
555
+ console.log('load user feed called');
550
556
  state.LoadingFeed = !forCheck;
551
557
  let paramMap = this.activatedRoute.snapshot.children[0].paramMap;
552
558
  let result = this.loadApplicationsForFeed(state, paramMap);
@@ -598,35 +604,49 @@ class ProjectService {
598
604
  }
599
605
  async SetActiveEnterprise(state, activeEntLookup) {
600
606
  return new Promise((resolve, reject) => {
607
+ console.log('SET ACTIVE ENT CALLED', activeEntLookup);
601
608
  state.Loading = true;
609
+ state.LoadingActiveEnterprise = true;
602
610
  state.LoadingFeed = true;
611
+ state.ActiveEnterpriseLookup = activeEntLookup;
612
+ // state.LoadingFeed = true;
603
613
  this.appsFlowSvc.SetActiveEnterprise(activeEntLookup).subscribe(async (response) => {
604
614
  if (response.Status.Code === 0) {
605
615
  this.EditingProjectLookup = null;
616
+ console.log('state: ', state);
606
617
  // console.log(
607
618
  // 'project service active ent: ',
608
619
  // activeEntLookup
609
620
  // );
610
- state.ActiveEnterpriseLookup = activeEntLookup;
621
+ // state.ActiveEnterpriseLookup = activeEntLookup;
611
622
  // console.log(
612
623
  // 'project service State active ent: ',
613
624
  // state.ActiveEnterpriseLookup
614
625
  // );
615
626
  resolve(response.Status);
616
627
  var results = await Promise.all([
617
- this.LoadEnterpriseAsCode(state),
618
- this.LoadUserFeed(1, 25, localStorage.getItem('activeFilter')
619
- ? localStorage.getItem('activeFilter')
620
- : '', false, state),
628
+ // this.ListEnterprises(state),
629
+ // this.LoadEnterpriseAsCode(state),
630
+ // this.LoadUserFeed(
631
+ // 1,
632
+ // 25,
633
+ // localStorage.getItem('activeFilter')
634
+ // ? localStorage.getItem('activeFilter')
635
+ // : '',
636
+ // false,
637
+ // state
638
+ // ),
621
639
  ]);
622
640
  }
623
641
  else {
624
642
  state.Loading = false;
643
+ state.LoadingActiveEnterprise = false;
625
644
  reject(response.Status);
626
645
  // console.log(response);
627
646
  }
628
647
  }, (err) => {
629
648
  state.Loading = false;
649
+ state.LoadingActiveEnterprise = false;
630
650
  reject(err);
631
651
  console.log(err);
632
652
  });
@@ -995,9 +1015,6 @@ class EaCService {
995
1015
  return status;
996
1016
  }
997
1017
  }
998
- // this.appsFlowEventsSvc.EnsureUserEnterpriseEvent.subscribe(async () => {
999
- // await this.projectService.EnsureUserEnterprise(this.State);
1000
- // });
1001
1018
  async EnsureUserEnterprise() {
1002
1019
  const state = this.stateSubject.getValue();
1003
1020
  const status = await this.projectService.EnsureUserEnterprise(state);
@@ -1117,7 +1134,6 @@ class EaCService {
1117
1134
  // Helpers
1118
1135
  async handleSaveApplication(req) {
1119
1136
  const state = this.stateSubject.getValue();
1120
- // console.log("app req: ", req);
1121
1137
  const saveEaC = {
1122
1138
  EnterpriseLookup: state.EaC.EnterpriseLookup,
1123
1139
  Applications: {},
@@ -1158,12 +1174,11 @@ class EaCService {
1158
1174
  }
1159
1175
  if (req.ApplicationLookup) {
1160
1176
  // console.log('APPLOokup: ', req.ApplicationLookup);
1161
- // console.log('saveEAC: ', saveEaC);
1162
1177
  saveEaC.Applications[req.ApplicationLookup] = {
1163
1178
  ModifierLookups: req.ModifierLookups,
1164
1179
  };
1165
1180
  }
1166
- // console.log('Save mod eac: ', saveEaC);
1181
+ console.log('Save mod eac: ', saveEaC);
1167
1182
  const status = await this.projectService.SaveEnterpriseAsCode(state, saveEaC);
1168
1183
  this.stateSubject.next(state);
1169
1184
  return status;
@@ -7031,6 +7046,7 @@ class DFSModifiersFormComponent {
7031
7046
  SaveModifier(projectLookup = null) {
7032
7047
  let saveStatus;
7033
7048
  if (this.ModifierFormGroup) {
7049
+ // console.log("here 1")
7034
7050
  const saveMdfrReq = {
7035
7051
  Modifier: {
7036
7052
  ...this.EditingModifier,
@@ -7041,7 +7057,7 @@ class DFSModifiersFormComponent {
7041
7057
  Type: this.CurrentType,
7042
7058
  },
7043
7059
  ModifierLookups: [this.EditingModifierLookup],
7044
- ProjectLookups: [projectLookup],
7060
+ // ProjectLookups: [projectLookup],
7045
7061
  };
7046
7062
  let details = this.getDetails();
7047
7063
  saveMdfrReq.Modifier.Details = JSON.stringify(details);
@@ -7050,6 +7066,7 @@ class DFSModifiersFormComponent {
7050
7066
  });
7051
7067
  }
7052
7068
  else if (this.ModifierSelectFormGroup) {
7069
+ // console.log('here 2');
7053
7070
  const saveMdfrReq = {
7054
7071
  ModifierLookups: this.MultiSelectFormControl.value,
7055
7072
  ProjectLookups: [projectLookup],
@@ -7265,7 +7282,7 @@ class DFSModifiersDialogComponent {
7265
7282
  }
7266
7283
  }
7267
7284
  SaveDFSModifier() {
7268
- // console.log("level at save: ", this.data.level)
7285
+ console.log('level at save: ', this.data.level);
7269
7286
  let status;
7270
7287
  switch (this.data.level) {
7271
7288
  case 'enterprise': {
@@ -7287,7 +7304,7 @@ class DFSModifiersDialogComponent {
7287
7304
  this.DFSModifersFormControls.SaveModifierForApplication(this.data.applicationLookup);
7288
7305
  }
7289
7306
  }
7290
- if (status.Code === 0) {
7307
+ if (status?.Code === 0) {
7291
7308
  this.snackBar.open('DFS Modifier Saved Successfully', 'Dismiss', {
7292
7309
  duration: 5000,
7293
7310
  });
@@ -8169,7 +8186,7 @@ class TeamMemberCardComponent {
8169
8186
  memberList.push(this.CurrentUser);
8170
8187
  }
8171
8188
  this.ProjectLookups.forEach((proj) => {
8172
- this.Projects[proj].RelyingParty?.AccessConfigurations?.fathym?.Usernames?.forEach((username) => {
8189
+ this.Projects[proj]?.RelyingParty?.AccessConfigurations?.fathym?.Usernames?.forEach((username) => {
8173
8190
  if (!memberList.includes(username)) {
8174
8191
  memberList.push(username);
8175
8192
  // console.log("Added: ", username)
@@ -8499,10 +8516,10 @@ class ProjectCardComponent {
8499
8516
  let tempProj = this.Projects[pLookup];
8500
8517
  this.Project = tempProj;
8501
8518
  let tempProjNode = {
8502
- name: tempProj.Project.Name,
8503
- description: tempProj.Project.Description,
8519
+ name: tempProj?.Project?.Name,
8520
+ description: tempProj?.Project?.Description,
8504
8521
  lookup: pLookup,
8505
- url: 'https://' + tempProj.PrimaryHost,
8522
+ url: 'https://' + tempProj?.PrimaryHost,
8506
8523
  routerLink: ['/project', pLookup],
8507
8524
  };
8508
8525
  let tempRoutes = this.ApplicationRoutes;