@csmart/ngc-smart-core 0.7.93 → 0.7.94

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.
@@ -284,7 +284,6 @@
284
284
  * Offender
285
285
  * ************************************
286
286
  * @param {?} selectedOffender
287
- * @param {?=} redirectFunction
288
287
  * @return {?}
289
288
  */
290
289
  XdmService.prototype.setSelectedOffender = /**
@@ -292,23 +291,16 @@
292
291
  * Offender
293
292
  * ************************************
294
293
  * @param {?} selectedOffender
295
- * @param {?=} redirectFunction
296
294
  * @return {?}
297
295
  */
298
- function (selectedOffender, redirectFunction) {
296
+ function (selectedOffender) {
299
297
  var _this = this;
300
- if (redirectFunction === void 0) {
301
- redirectFunction = null;
302
- }
303
- this.connection.promise.then(( /**
298
+ return this.connection.promise.then(( /**
304
299
  * @param {?} child
305
300
  * @return {?}
306
301
  */function (child) {
307
- child.setSelectedOffender(selectedOffender);
308
302
  _this.offenderSubject.next(selectedOffender);
309
- if (redirectFunction) {
310
- redirectFunction();
311
- }
303
+ child.setSelectedOffender(selectedOffender);
312
304
  }));
313
305
  };
314
306
  /**
@@ -662,6 +654,7 @@
662
654
  * @return {?}
663
655
  */
664
656
  function (offender) {
657
+ var _this = this;
665
658
  if (offender) {
666
659
  // const o = offender.offenderName.split(',');
667
660
  // if (o.length === 2) {
@@ -678,7 +671,11 @@
678
671
  // : false,
679
672
  // } as SelectedOffender;
680
673
  this.selectedOffender = offender;
681
- this.xdmService.setSelectedOffender(this.selectedOffender, this.reloadCurrentRoute);
674
+ this.xdmService.setSelectedOffender(this.selectedOffender).then(( /**
675
+ * @return {?}
676
+ */function () {
677
+ _this.reloadCurrentRoute();
678
+ }));
682
679
  }
683
680
  };
684
681
  /**
@@ -718,27 +715,31 @@
718
715
  * @return {?}
719
716
  */
720
717
  function () {
721
- /*try {
722
- const urlTree = this.router.parseUrl(this.router.url);
723
- if (urlTree
724
- && urlTree.root
725
- && urlTree.root.segments
726
- && urlTree.root.segments.length > 1) {
727
- this.router.navigate([urlTree.root.segments[0].path]);
728
- } else if (urlTree
729
- && urlTree.root
730
- && urlTree.root.children
731
- && urlTree.root.children.primary
732
- && urlTree.root.children.primary.segments
733
- && urlTree.root.children.primary.segments.length > 1) {
734
- this.router.navigate([urlTree.root.children.primary.segments[0].path]);
735
- } else {
736
- this.router.navigate([this.router.url]);
737
- }
738
- } catch {
739
- this.router.navigateByUrl('/');
740
- }*/
741
- window.location.reload(false);
718
+ try {
719
+ /** @type {?} */
720
+ var urlTree = this.router.parseUrl(this.router.url);
721
+ if (urlTree
722
+ && urlTree.root
723
+ && urlTree.root.segments
724
+ && urlTree.root.segments.length > 1) {
725
+ this.router.navigate([urlTree.root.segments[0].path]);
726
+ }
727
+ else if (urlTree
728
+ && urlTree.root
729
+ && urlTree.root.children
730
+ && urlTree.root.children.primary
731
+ && urlTree.root.children.primary.segments
732
+ && urlTree.root.children.primary.segments.length > 1) {
733
+ this.router.navigate([urlTree.root.children.primary.segments[0].path]);
734
+ }
735
+ else {
736
+ this.router.navigate([this.router.url]);
737
+ }
738
+ }
739
+ catch (_a) {
740
+ this.router.navigateByUrl('/');
741
+ }
742
+ //window.location.reload(false);
742
743
  };
743
744
  /**
744
745
  * @private