@csmart/ngc-smart-core 1.13.19 → 1.13.20

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.
@@ -339,7 +339,7 @@ class SmartOffenderHeaderComponent {
339
339
  urlTree.root.children &&
340
340
  urlTree.root.children.primary &&
341
341
  urlTree.root.children.primary.segments &&
342
- urlTree.root.children.primary.segments.length == 1) {
342
+ urlTree.root.children.primary.segments.length > 1) {
343
343
  this.router.navigate([urlTree.root.children.primary.segments[0].path]);
344
344
  }
345
345
  else {
@@ -1033,8 +1033,8 @@ class SmartAuthService {
1033
1033
  ? accessControlConfig.roleId.toUpperCase()
1034
1034
  : null;
1035
1035
  const accessType = accessControlConfig.accessType;
1036
- const assignmentStaffRelationId = !this.selectedOffender
1037
- .assignmentStaffRelationId
1036
+ const assignmentStaffRelationId = (!this.selectedOffender || !this.selectedOffender
1037
+ .assignmentStaffRelationId)
1038
1038
  ? 'N/A'
1039
1039
  : this.selectedOffender.assignmentStaffRelationId;
1040
1040
  const permission = permissions.find((p) => {
@@ -1309,8 +1309,7 @@ class SmartAccessControlDirective {
1309
1309
  if (!this.accessControlConfig ||
1310
1310
  !this.accessControlConfig.route ||
1311
1311
  !this.accessControlConfig.route.data ||
1312
- !this.accessControlConfig.route.data.loginStaff ||
1313
- !this.accessControlConfig.route.data.selectedOffender) {
1312
+ !this.accessControlConfig.route.data.loginStaff) {
1314
1313
  return;
1315
1314
  }
1316
1315
  // const loginStaff = this.accessControlConfig.route.data.loginStaff;