@csmart/ngc-smart-core 0.7.88 → 0.7.92

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