@csmart/ngc-smart-core 1.18.23 → 1.18.27
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/esm2022/lib/ngc-smart-core.module.mjs +17 -5
- package/esm2022/lib/smart-auth/smart-access-control.directive.mjs +4 -4
- package/esm2022/lib/smart-auth/smart-auth.service.mjs +4 -4
- package/esm2022/lib/smart-auth/smart-authorization-guard.service.mjs +4 -4
- package/esm2022/lib/smart-auth/smart-error.component.mjs +4 -4
- package/esm2022/lib/smart-auth/smart-login-staff-resolver.service.mjs +4 -4
- package/esm2022/lib/smart-auth/smart-selected-offender-resolver.service.mjs +4 -4
- package/esm2022/lib/smart-navbar/smart-navbar-config.mjs +1 -1
- package/esm2022/lib/smart-navbar/smart-navbar.component.mjs +27 -23
- package/esm2022/lib/smart-navbar/smart-navbar.service.mjs +4 -5
- package/esm2022/lib/smart-offender-header/smart-offender-header.component.mjs +36 -8
- package/esm2022/lib/smart-offender-header/smart-offender-header.service.mjs +4 -4
- package/esm2022/lib/smart-offender-header/smart-offender-redirect.guard.mjs +4 -4
- package/esm2022/lib/smart-staff-offender-options/smart-staff-offender-options-resolver.service.mjs +4 -4
- package/esm2022/lib/smart-staff-offender-options/smart-staff-offender-options.component.mjs +4 -4
- package/esm2022/lib/smart-staff-offender-options/smart-staff-offender-options.service.mjs +4 -4
- package/esm2022/lib/smart-storage/xdm.service.mjs +4 -4
- package/esm2022/lib/user-settings/user-settings.service.mjs +43 -43
- package/fesm2022/csmart-ngc-smart-core.mjs +157 -116
- package/fesm2022/csmart-ngc-smart-core.mjs.map +1 -1
- package/lib/ngc-smart-core.module.d.ts +7 -4
- package/lib/smart-navbar/smart-navbar-config.d.ts +0 -1
- package/lib/smart-navbar/smart-navbar.component.d.ts +5 -5
- package/lib/smart-offender-header/smart-offender-header.component.d.ts +7 -2
- package/package.json +1 -1
|
@@ -2,12 +2,15 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, isDevMode, Injectable, Inject, Component, ViewEncapsulation, Input, ViewChild, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i6 from '@angular/material/button';
|
|
6
6
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import * as i5$1 from '@angular/material/tabs';
|
|
8
8
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
9
|
-
import * as i7 from '@angular/material/select';
|
|
10
9
|
import { MatSelectModule } from '@angular/material/select';
|
|
10
|
+
import * as i9 from '@angular/material/autocomplete';
|
|
11
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
12
|
+
import * as i10 from '@angular/material/input';
|
|
13
|
+
import { MatInputModule } from '@angular/material/input';
|
|
11
14
|
import * as i7$1 from '@angular/material/checkbox';
|
|
12
15
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
13
16
|
import * as i6$1 from '@angular/material/card';
|
|
@@ -16,16 +19,18 @@ import * as i2$2 from '@angular/material/snack-bar';
|
|
|
16
19
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
17
20
|
import * as i4 from '@angular/material/menu';
|
|
18
21
|
import { MatMenuModule } from '@angular/material/menu';
|
|
22
|
+
import * as i11 from '@angular/material/icon';
|
|
23
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
19
24
|
import * as i1 from '@angular/common/http';
|
|
20
25
|
import { HttpHeaders, HttpClientModule } from '@angular/common/http';
|
|
21
26
|
import { Subject, from, of, lastValueFrom, throwError, EMPTY, concat } from 'rxjs';
|
|
22
|
-
import { map, switchMap, catchError, take, mergeMap, retryWhen, delay } from 'rxjs/operators';
|
|
27
|
+
import { map, switchMap, catchError, startWith, take, mergeMap, retryWhen, delay } from 'rxjs/operators';
|
|
23
28
|
import { connectToChild } from 'penpal';
|
|
24
29
|
import * as i2 from '@azure/msal-angular';
|
|
25
30
|
import * as i8$1 from '@angular/forms';
|
|
26
31
|
import { UntypedFormControl, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
27
32
|
import * as i2$1 from '@angular/router';
|
|
28
|
-
import * as
|
|
33
|
+
import * as i7 from '@angular/material/form-field';
|
|
29
34
|
import * as i8 from '@angular/material/core';
|
|
30
35
|
|
|
31
36
|
class Permission {
|
|
@@ -230,10 +235,10 @@ class XdmService {
|
|
|
230
235
|
throw error;
|
|
231
236
|
}));
|
|
232
237
|
}
|
|
233
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
234
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
238
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: XdmService, deps: [{ token: DOCUMENT }, { token: SMART_WEB_STORAGE_LISTENER_URL }, { token: i1.HttpClient }, { token: SMART_DATA_SERVICE_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
239
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: XdmService, providedIn: 'root' }); }
|
|
235
240
|
}
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: XdmService, decorators: [{
|
|
237
242
|
type: Injectable,
|
|
238
243
|
args: [{
|
|
239
244
|
providedIn: 'root',
|
|
@@ -274,10 +279,10 @@ class SmartOffenderHeaderService {
|
|
|
274
279
|
return data.filterOffenderList.data;
|
|
275
280
|
}));
|
|
276
281
|
}
|
|
277
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
278
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
282
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderHeaderService, deps: [{ token: SMART_DATA_SERVICE_URL }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
283
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderHeaderService }); }
|
|
279
284
|
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderHeaderService, decorators: [{
|
|
281
286
|
type: Injectable
|
|
282
287
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
283
288
|
type: Inject,
|
|
@@ -292,6 +297,7 @@ class SmartOffenderHeaderComponent {
|
|
|
292
297
|
this.smartOffenderHeaderService = smartOffenderHeaderService;
|
|
293
298
|
this.router = router;
|
|
294
299
|
this.selectedOffenderControl$ = new UntypedFormControl();
|
|
300
|
+
this.offenderFilterControl = new UntypedFormControl('');
|
|
295
301
|
}
|
|
296
302
|
ngOnInit() {
|
|
297
303
|
// this.isAuthenticated = this.authnService.getAccount() ? true : false;
|
|
@@ -324,6 +330,7 @@ class SmartOffenderHeaderComponent {
|
|
|
324
330
|
}
|
|
325
331
|
});
|
|
326
332
|
this.selectedOffenderControl$.valueChanges.subscribe((o) => this.onOffenderSelected(o));
|
|
333
|
+
this.initializeFilteredList();
|
|
327
334
|
this.router.routeReuseStrategy.shouldReuseRoute = () => {
|
|
328
335
|
return false;
|
|
329
336
|
};
|
|
@@ -362,11 +369,13 @@ class SmartOffenderHeaderComponent {
|
|
|
362
369
|
const o = this.offenderQueryList.find((x) => x.offenderId === this.selectedOffender.offenderId);
|
|
363
370
|
if (o) {
|
|
364
371
|
this.selectedOffenderControl$.setValue(o, { emitEvent: false });
|
|
372
|
+
this.offenderFilterControl.setValue(o, { emitEvent: false });
|
|
365
373
|
}
|
|
366
374
|
if (!o && this.offenderQueryList.length > 0) {
|
|
367
375
|
this.selectedOffenderControl$.setValue(this.offenderQueryList[0], {
|
|
368
376
|
emitEvent: false,
|
|
369
377
|
});
|
|
378
|
+
this.offenderFilterControl.setValue(this.offenderQueryList[0], { emitEvent: false });
|
|
370
379
|
}
|
|
371
380
|
}
|
|
372
381
|
}
|
|
@@ -411,12 +420,32 @@ class SmartOffenderHeaderComponent {
|
|
|
411
420
|
return false;
|
|
412
421
|
}
|
|
413
422
|
}
|
|
414
|
-
|
|
415
|
-
|
|
423
|
+
initializeFilteredList() {
|
|
424
|
+
this.filteredOffenderList = this.offenderFilterControl.valueChanges.pipe(startWith(''), map(value => {
|
|
425
|
+
const filterValue = typeof value === 'string' ? value : '';
|
|
426
|
+
return this.filterOffenders(filterValue);
|
|
427
|
+
}));
|
|
428
|
+
}
|
|
429
|
+
filterOffenders(value) {
|
|
430
|
+
if (!this.offenderQueryList || this.offenderQueryList.length === 0) {
|
|
431
|
+
return [];
|
|
432
|
+
}
|
|
433
|
+
if (!value || value.trim() === '') {
|
|
434
|
+
return this.offenderQueryList;
|
|
435
|
+
}
|
|
436
|
+
const filterValue = value.toLowerCase().trim();
|
|
437
|
+
return this.offenderQueryList.filter(offender => offender.name?.toLowerCase().includes(filterValue) ||
|
|
438
|
+
offender.offenderId?.toString().includes(filterValue));
|
|
439
|
+
}
|
|
440
|
+
displayOffenderFn(offender) {
|
|
441
|
+
return offender ? `${offender.name} (${offender.offenderId})` : '';
|
|
442
|
+
}
|
|
443
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderHeaderComponent, deps: [{ token: XdmService }, { token: i2.MsalService }, { token: SmartOffenderHeaderService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
444
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SmartOffenderHeaderComponent, selector: "app-smart-offender-header", ngImport: i0, template: "<div\r\n class=\"offender-header-container\"\r\n *ngIf=\"selectedOffender && isAuthenticated\">\r\n <div class=\"offender-header-name-item\">\r\n <mat-form-field class=\"switch-offender\" appearance=\"fill\">\r\n <mat-label>Switch Offender</mat-label>\r\n <input type=\"text\"\r\n matInput\r\n [formControl]=\"offenderFilterControl\"\r\n [matAutocomplete]=\"auto\"\r\n placeholder=\"Type to search...\">\r\n <button mat-icon-button matSuffix type=\"button\" tabindex=\"-1\">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <mat-autocomplete #auto=\"matAutocomplete\" \r\n [displayWith]=\"displayOffenderFn.bind(this)\"\r\n (optionSelected)=\"onOffenderSelected($event.option.value)\">\r\n <mat-option\r\n *ngFor=\"let offender of filteredOffenderList | async\"\r\n [value]=\"offender\">\r\n {{ offender?.name}} ({{offender?.offenderId}})\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n <div>\r\n <div class=\"offender-header-id-item\">\r\n <span class=\"item-label\">PDID:</span> {{ selectedOffender.pdId }}\r\n </div>\r\n <div class=\"offender-header-id-item\">\r\n <span class=\"item-label\">CSOSA ID:</span>\r\n {{ selectedOffender.offenderId }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".offender-header-container{display:grid;grid-template-columns:2fr 1fr;grid-column-gap:20px;width:100%;margin:4px;background-color:#eae9e9;font-size:14px;font-weight:500;padding-top:8px;justify-items:end}.offender-header-name-item{width:50%}.offender-header-id-item{text-align:left;display:grid;grid-template-columns:80px 80px;margin-top:8px}.switch-offender{width:100%!important}@media only screen and (max-width: 740px){.offender-header-container{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:1fr;align-items:center;background-color:#eae9e9;font-size:14px;font-weight:500;height:100%;margin:4px;padding-left:16px;justify-items:start}.offender-header-name-item{text-align:left}}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i9.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i9.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i10.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] }); }
|
|
416
445
|
}
|
|
417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderHeaderComponent, decorators: [{
|
|
418
447
|
type: Component,
|
|
419
|
-
args: [{ selector: 'app-smart-offender-header', template: "<div\r\n class=\"offender-header-container\"\r\n *ngIf=\"selectedOffender && isAuthenticated\">\r\n <div class=\"offender-header-name-item\">\r\n <mat-form-field class=\"switch-offender\" appearance=\"fill\">\r\n <mat-label>Switch Offender</mat-label>\r\n <mat-
|
|
448
|
+
args: [{ selector: 'app-smart-offender-header', template: "<div\r\n class=\"offender-header-container\"\r\n *ngIf=\"selectedOffender && isAuthenticated\">\r\n <div class=\"offender-header-name-item\">\r\n <mat-form-field class=\"switch-offender\" appearance=\"fill\">\r\n <mat-label>Switch Offender</mat-label>\r\n <input type=\"text\"\r\n matInput\r\n [formControl]=\"offenderFilterControl\"\r\n [matAutocomplete]=\"auto\"\r\n placeholder=\"Type to search...\">\r\n <button mat-icon-button matSuffix type=\"button\" tabindex=\"-1\">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <mat-autocomplete #auto=\"matAutocomplete\" \r\n [displayWith]=\"displayOffenderFn.bind(this)\"\r\n (optionSelected)=\"onOffenderSelected($event.option.value)\">\r\n <mat-option\r\n *ngFor=\"let offender of filteredOffenderList | async\"\r\n [value]=\"offender\">\r\n {{ offender?.name}} ({{offender?.offenderId}})\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n <div>\r\n <div class=\"offender-header-id-item\">\r\n <span class=\"item-label\">PDID:</span> {{ selectedOffender.pdId }}\r\n </div>\r\n <div class=\"offender-header-id-item\">\r\n <span class=\"item-label\">CSOSA ID:</span>\r\n {{ selectedOffender.offenderId }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".offender-header-container{display:grid;grid-template-columns:2fr 1fr;grid-column-gap:20px;width:100%;margin:4px;background-color:#eae9e9;font-size:14px;font-weight:500;padding-top:8px;justify-items:end}.offender-header-name-item{width:50%}.offender-header-id-item{text-align:left;display:grid;grid-template-columns:80px 80px;margin-top:8px}.switch-offender{width:100%!important}@media only screen and (max-width: 740px){.offender-header-container{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:1fr;align-items:center;background-color:#eae9e9;font-size:14px;font-weight:500;height:100%;margin:4px;padding-left:16px;justify-items:start}.offender-header-name-item{text-align:left}}\n"] }]
|
|
420
449
|
}], ctorParameters: () => [{ type: XdmService }, { type: i2.MsalService }, { type: SmartOffenderHeaderService }, { type: i2$1.Router }] });
|
|
421
450
|
|
|
422
451
|
class SmartNavbarService {
|
|
@@ -447,7 +476,6 @@ class SmartNavbarService {
|
|
|
447
476
|
appModuleId
|
|
448
477
|
name
|
|
449
478
|
url
|
|
450
|
-
moduleGroup
|
|
451
479
|
offenderSpecificFlag
|
|
452
480
|
displayOrder
|
|
453
481
|
}
|
|
@@ -471,10 +499,10 @@ class SmartNavbarService {
|
|
|
471
499
|
return data.findAppModules.data;
|
|
472
500
|
}));
|
|
473
501
|
}
|
|
474
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
475
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
502
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartNavbarService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
503
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartNavbarService }); }
|
|
476
504
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartNavbarService, decorators: [{
|
|
478
506
|
type: Injectable
|
|
479
507
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
480
508
|
|
|
@@ -485,6 +513,7 @@ class SmartNavbarComponent {
|
|
|
485
513
|
this.authnService = authnService;
|
|
486
514
|
this.appModuleId = null;
|
|
487
515
|
this.selectedNavbarConfig = {};
|
|
516
|
+
this.ASSESSMENT_MODULE_IDS = new Set(['STATIC99', 'TCU', 'TCUCH']);
|
|
488
517
|
}
|
|
489
518
|
ngOnInit() {
|
|
490
519
|
this.xdmService.getSelectedOffender().then((selectedOffender) => {
|
|
@@ -530,31 +559,34 @@ class SmartNavbarComponent {
|
|
|
530
559
|
get renderItems() {
|
|
531
560
|
if (!this.navbarConfigs)
|
|
532
561
|
return [];
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
562
|
+
const result = [];
|
|
563
|
+
let assessmentsInserted = false;
|
|
564
|
+
for (const config of this.navbarConfigs) {
|
|
565
|
+
if (this.ASSESSMENT_MODULE_IDS.has(config.appModuleId)) {
|
|
566
|
+
if (!assessmentsInserted) {
|
|
567
|
+
result.push('ASSESSMENTS');
|
|
568
|
+
assessmentsInserted = true;
|
|
569
|
+
}
|
|
538
570
|
}
|
|
539
|
-
|
|
540
|
-
|
|
571
|
+
else {
|
|
572
|
+
result.push(config);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
return result;
|
|
541
576
|
}
|
|
542
|
-
|
|
577
|
+
get assessmentConfigs() {
|
|
543
578
|
if (!this.navbarConfigs)
|
|
544
579
|
return [];
|
|
545
|
-
return this.navbarConfigs.filter(c => c.
|
|
546
|
-
}
|
|
547
|
-
showGroupMenu(groupName) {
|
|
548
|
-
return this.groupConfigs(groupName).some(c => this.showTab(c));
|
|
580
|
+
return this.navbarConfigs.filter(c => this.ASSESSMENT_MODULE_IDS.has(c.appModuleId));
|
|
549
581
|
}
|
|
550
|
-
|
|
551
|
-
return this.
|
|
552
|
-
this.groupConfigs(groupName).some(c => c.appModuleId === this.selectedNavbarConfig?.appModuleId);
|
|
582
|
+
get showAssessmentsMenu() {
|
|
583
|
+
return this.assessmentConfigs.some(c => this.showTab(c));
|
|
553
584
|
}
|
|
554
|
-
|
|
555
|
-
return
|
|
585
|
+
get isAssessmentActive() {
|
|
586
|
+
return this.selectedNavbarConfig != null
|
|
587
|
+
&& this.ASSESSMENT_MODULE_IDS.has(this.selectedNavbarConfig?.appModuleId);
|
|
556
588
|
}
|
|
557
|
-
|
|
589
|
+
onAssessmentItemClick(config) {
|
|
558
590
|
this.selectedNavbarConfig = config;
|
|
559
591
|
}
|
|
560
592
|
asConfig(item) {
|
|
@@ -643,12 +675,12 @@ class SmartNavbarComponent {
|
|
|
643
675
|
return false;
|
|
644
676
|
}
|
|
645
677
|
}
|
|
646
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
647
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.
|
|
678
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartNavbarComponent, deps: [{ token: SmartNavbarService }, { token: XdmService }, { token: i2.MsalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
679
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SmartNavbarComponent, selector: "app-smart-navbar", inputs: { serviceApiUrl: "serviceApiUrl", appModuleId: "appModuleId" }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabs"], descendants: true }], ngImport: i0, template: "\r\n<nav mat-tab-nav-bar [tabPanel]=\"tabPanel\">\r\n @for (item of renderItems; track $index) {\r\n @if (item === 'ASSESSMENTS') {\r\n @if (showAssessmentsMenu) {\r\n <a\r\n mat-tab-link\r\n class=\"smart-navbar-item assessments-menu-trigger\"\r\n [matMenuTriggerFor]=\"assessmentsMenu\"\r\n [active]=\"isAssessmentActive\">\r\n Assessments ▾\r\n </a>\r\n <mat-menu #assessmentsMenu=\"matMenu\">\r\n @for (config of assessmentConfigs; track config.appModuleId) {\r\n @if (showTab(config)) {\r\n <a\r\n mat-menu-item\r\n (click)=\"onAssessmentItemClick(config)\"\r\n [href]=\"getAppModuleUrl(config)\">{{ config.name }}</a>\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n } @else {\r\n @if (showTab(asConfig(item))) {\r\n <a\r\n mat-tab-link\r\n class=\"smart-navbar-item\"\r\n (click)=\"selectedNavbarConfig = asConfig(item)\"\r\n [active]=\"selectedNavbarConfig !== null && selectedNavbarConfig?.appModuleId === asConfig(item)?.appModuleId\"\r\n [href]=\"getAppModuleUrl(asConfig(item))\">{{ asConfig(item).name }}</a>\r\n }\r\n }\r\n }\r\n</nav>\r\n<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\r\n", styles: [".smart-navbar-container{display:flex;flex-wrap:wrap;flex-direction:column}.smart-navbar-item{font-size:1.2rem;line-height:1.2rem;padding:.5rem;background-color:var(--primary-color, #9fa8da);text-decoration-line:none;display:block;text-align:left;border-radius:.3rem;margin:.1rem}.smart-navbar-last-item{margin-left:auto}.main-menu-active,.mat-mdc-tab.mat-mdc-focus-indicato.mdc-tab--active{border-bottom:3px solid darkblue!important;border-radius:0!important}.nav-tab-group.mat-primary .mat-ink-bar{background-color:inherit!important}.mat-mdc-tab-link{min-width:16px!important}.mat-mdc-tab .mdc-tab__content{pointer-events:none!important}@media only screen and (min-width: 768px){.smart-navbar-container{flex-direction:row}.smart-navbar-item{text-align:center}.smart-navbar-toggle{display:none}}@media only screen and (max-width: 767px){#nav{position:fixed;top:0;bottom:0;width:300px;left:-340px;transition:transform .3s ease-in-out}#nav:target{transform:translate(340px)}}.mat-tab-labels{display:flex!important;justify-content:flex-start!important}.mat-tab-label,.mat-tab-label.mat-mdc-tab-label-active{min-width:25px!important;padding:0 5px!important;justify-content:flex-start!important;font-weight:700}.assessments-menu-trigger{cursor:pointer}a.mat-mdc-menu-item{text-decoration:none;color:inherit}\n"], dependencies: [{ kind: "component", type: i4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i5$1.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i5$1.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i5$1.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
648
680
|
}
|
|
649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartNavbarComponent, decorators: [{
|
|
650
682
|
type: Component,
|
|
651
|
-
args: [{ selector: 'app-smart-navbar', encapsulation: ViewEncapsulation.None, template: "\r\n<nav mat-tab-nav-bar [tabPanel]=\"tabPanel\">\r\n @for (item of renderItems; track $index) {\r\n @if (
|
|
683
|
+
args: [{ selector: 'app-smart-navbar', encapsulation: ViewEncapsulation.None, template: "\r\n<nav mat-tab-nav-bar [tabPanel]=\"tabPanel\">\r\n @for (item of renderItems; track $index) {\r\n @if (item === 'ASSESSMENTS') {\r\n @if (showAssessmentsMenu) {\r\n <a\r\n mat-tab-link\r\n class=\"smart-navbar-item assessments-menu-trigger\"\r\n [matMenuTriggerFor]=\"assessmentsMenu\"\r\n [active]=\"isAssessmentActive\">\r\n Assessments ▾\r\n </a>\r\n <mat-menu #assessmentsMenu=\"matMenu\">\r\n @for (config of assessmentConfigs; track config.appModuleId) {\r\n @if (showTab(config)) {\r\n <a\r\n mat-menu-item\r\n (click)=\"onAssessmentItemClick(config)\"\r\n [href]=\"getAppModuleUrl(config)\">{{ config.name }}</a>\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n } @else {\r\n @if (showTab(asConfig(item))) {\r\n <a\r\n mat-tab-link\r\n class=\"smart-navbar-item\"\r\n (click)=\"selectedNavbarConfig = asConfig(item)\"\r\n [active]=\"selectedNavbarConfig !== null && selectedNavbarConfig?.appModuleId === asConfig(item)?.appModuleId\"\r\n [href]=\"getAppModuleUrl(asConfig(item))\">{{ asConfig(item).name }}</a>\r\n }\r\n }\r\n }\r\n</nav>\r\n<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\r\n", styles: [".smart-navbar-container{display:flex;flex-wrap:wrap;flex-direction:column}.smart-navbar-item{font-size:1.2rem;line-height:1.2rem;padding:.5rem;background-color:var(--primary-color, #9fa8da);text-decoration-line:none;display:block;text-align:left;border-radius:.3rem;margin:.1rem}.smart-navbar-last-item{margin-left:auto}.main-menu-active,.mat-mdc-tab.mat-mdc-focus-indicato.mdc-tab--active{border-bottom:3px solid darkblue!important;border-radius:0!important}.nav-tab-group.mat-primary .mat-ink-bar{background-color:inherit!important}.mat-mdc-tab-link{min-width:16px!important}.mat-mdc-tab .mdc-tab__content{pointer-events:none!important}@media only screen and (min-width: 768px){.smart-navbar-container{flex-direction:row}.smart-navbar-item{text-align:center}.smart-navbar-toggle{display:none}}@media only screen and (max-width: 767px){#nav{position:fixed;top:0;bottom:0;width:300px;left:-340px;transition:transform .3s ease-in-out}#nav:target{transform:translate(340px)}}.mat-tab-labels{display:flex!important;justify-content:flex-start!important}.mat-tab-label,.mat-tab-label.mat-mdc-tab-label-active{min-width:25px!important;padding:0 5px!important;justify-content:flex-start!important;font-weight:700}.assessments-menu-trigger{cursor:pointer}a.mat-mdc-menu-item{text-decoration:none;color:inherit}\n"] }]
|
|
652
684
|
}], ctorParameters: () => [{ type: SmartNavbarService }, { type: XdmService }, { type: i2.MsalService }], propDecorators: { serviceApiUrl: [{
|
|
653
685
|
type: Input
|
|
654
686
|
}], appModuleId: [{
|
|
@@ -675,10 +707,10 @@ class SmartErrorComponent {
|
|
|
675
707
|
portal() {
|
|
676
708
|
window.location.href = this.smartWebPortalUrl;
|
|
677
709
|
}
|
|
678
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
679
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
710
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartErrorComponent, deps: [{ token: i2.MsalService }, { token: i2$1.ActivatedRoute }, { token: SMART_WEB_PORTAL_URL }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
711
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SmartErrorComponent, selector: "app-smart-error", ngImport: i0, template: "<div>\r\n <h2>\r\n {{ message }}\r\n </h2>\r\n <p>\r\n Please contact help desk if needed.\r\n </p>\r\n <div>\r\n <button (click)=\"logout()\" *ngIf=\"type === 'staff'\">OK</button>\r\n <button (click)=\"portal()\" *ngIf=\"type === 'offender'\">OK</button>\r\n </div>\r\n</div>\r\n", styles: ["div{text-align:center}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
680
712
|
}
|
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartErrorComponent, decorators: [{
|
|
682
714
|
type: Component,
|
|
683
715
|
args: [{ selector: 'app-smart-error', template: "<div>\r\n <h2>\r\n {{ message }}\r\n </h2>\r\n <p>\r\n Please contact help desk if needed.\r\n </p>\r\n <div>\r\n <button (click)=\"logout()\" *ngIf=\"type === 'staff'\">OK</button>\r\n <button (click)=\"portal()\" *ngIf=\"type === 'offender'\">OK</button>\r\n </div>\r\n</div>\r\n", styles: ["div{text-align:center}\n"] }]
|
|
684
716
|
}], ctorParameters: () => [{ type: i2.MsalService }, { type: i2$1.ActivatedRoute }, { type: undefined, decorators: [{
|
|
@@ -800,10 +832,10 @@ class SmartStaffOffenderOptionsService {
|
|
|
800
832
|
}
|
|
801
833
|
return result;
|
|
802
834
|
}
|
|
803
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
804
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
835
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsService, deps: [{ token: i1.HttpClient }, { token: i2$2.MatSnackBar }, { token: SMART_DATA_SERVICE_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
836
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsService }); }
|
|
805
837
|
}
|
|
806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
838
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsService, decorators: [{
|
|
807
839
|
type: Injectable
|
|
808
840
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MatSnackBar }, { type: undefined, decorators: [{
|
|
809
841
|
type: Inject,
|
|
@@ -871,10 +903,10 @@ class SmartStaffOffenderOptionsComponent {
|
|
|
871
903
|
onClear() {
|
|
872
904
|
this.frmGroup.reset();
|
|
873
905
|
}
|
|
874
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
875
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
|
906
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsComponent, deps: [{ token: i2$1.ActivatedRoute }, { token: SmartStaffOffenderOptionsService }, { token: XdmService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
907
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SmartStaffOffenderOptionsComponent, selector: "lib-smart-staff-offender-options", ngImport: i0, template: "<form class=\"main-form\" [formGroup]=\"frmGroup\">\r\n <mat-card appearance=\"outlined\" role=\"group\">\r\n <mat-card-content>\r\n <div formGroupName=\"offenderListOptions\">\r\n <div style=\"float:left;\">\r\n <div *ngFor=\"let offenderListOption of offenderListOptions; let i = index\">\r\n <mat-checkbox *ngIf=\"i%2!=0\" color=\"primary\" formControlName=\"{{offenderListOption.offenderListOptionId}}\">\r\n {{offenderListOption.name}}\r\n </mat-checkbox>\r\n </div>\r\n </div>\r\n <div>\r\n <div *ngFor=\"let offenderListOption of offenderListOptions; let i = index\" >\r\n <mat-checkbox *ngIf=\"i%2==0\" color=\"primary\" formControlName=\"{{offenderListOption.offenderListOptionId}}\">\r\n {{offenderListOption.name}}\r\n </mat-checkbox> \r\n </div>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n <div align=\"center\">\r\n <button mat-stroked-button (click)=\"onSave()\">Save</button>\r\n \r\n <button mat-stroked-button (click)=\"onClear()\">Clear</button>\r\n </div>\r\n </mat-card>\r\n </form>\r\n ", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i8$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i8$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i8$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }] }); }
|
|
876
908
|
}
|
|
877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsComponent, decorators: [{
|
|
878
910
|
type: Component,
|
|
879
911
|
args: [{ selector: 'lib-smart-staff-offender-options', template: "<form class=\"main-form\" [formGroup]=\"frmGroup\">\r\n <mat-card appearance=\"outlined\" role=\"group\">\r\n <mat-card-content>\r\n <div formGroupName=\"offenderListOptions\">\r\n <div style=\"float:left;\">\r\n <div *ngFor=\"let offenderListOption of offenderListOptions; let i = index\">\r\n <mat-checkbox *ngIf=\"i%2!=0\" color=\"primary\" formControlName=\"{{offenderListOption.offenderListOptionId}}\">\r\n {{offenderListOption.name}}\r\n </mat-checkbox>\r\n </div>\r\n </div>\r\n <div>\r\n <div *ngFor=\"let offenderListOption of offenderListOptions; let i = index\" >\r\n <mat-checkbox *ngIf=\"i%2==0\" color=\"primary\" formControlName=\"{{offenderListOption.offenderListOptionId}}\">\r\n {{offenderListOption.name}}\r\n </mat-checkbox> \r\n </div>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n <div align=\"center\">\r\n <button mat-stroked-button (click)=\"onSave()\">Save</button>\r\n \r\n <button mat-stroked-button (click)=\"onClear()\">Clear</button>\r\n </div>\r\n </mat-card>\r\n </form>\r\n " }]
|
|
880
912
|
}], ctorParameters: () => [{ type: i2$1.ActivatedRoute }, { type: SmartStaffOffenderOptionsService }, { type: XdmService }] });
|
|
@@ -1340,10 +1372,10 @@ class SmartAuthService {
|
|
|
1340
1372
|
return throwError(error);
|
|
1341
1373
|
}));
|
|
1342
1374
|
}
|
|
1343
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1344
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1375
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAuthService, deps: [{ token: i1.HttpClient }, { token: i2.MsalService }, { token: XdmService }, { token: SMART_DATA_SERVICE_URL }, { token: SMART_DOMAIN_FORMAT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1376
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAuthService, providedIn: 'root' }); }
|
|
1345
1377
|
}
|
|
1346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAuthService, decorators: [{
|
|
1347
1379
|
type: Injectable,
|
|
1348
1380
|
args: [{
|
|
1349
1381
|
providedIn: 'root',
|
|
@@ -1379,10 +1411,10 @@ class SmartAccessControlDirective {
|
|
|
1379
1411
|
? 'block'
|
|
1380
1412
|
: 'none';
|
|
1381
1413
|
}
|
|
1382
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1383
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.
|
|
1414
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAccessControlDirective, deps: [{ token: i0.ElementRef }, { token: SmartAuthService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1415
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: SmartAccessControlDirective, selector: "[accessControl]", inputs: { accessControlConfig: "accessControlConfig" }, ngImport: i0 }); }
|
|
1384
1416
|
}
|
|
1385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAccessControlDirective, decorators: [{
|
|
1386
1418
|
type: Directive,
|
|
1387
1419
|
args: [{
|
|
1388
1420
|
selector: '[accessControl]',
|
|
@@ -1413,10 +1445,10 @@ class SmartAuthorizationGuard {
|
|
|
1413
1445
|
return of(false);
|
|
1414
1446
|
}));
|
|
1415
1447
|
}
|
|
1416
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1417
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1448
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAuthorizationGuard, deps: [{ token: SmartAuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1449
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAuthorizationGuard }); }
|
|
1418
1450
|
}
|
|
1419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartAuthorizationGuard, decorators: [{
|
|
1420
1452
|
type: Injectable
|
|
1421
1453
|
}], ctorParameters: () => [{ type: SmartAuthService }] });
|
|
1422
1454
|
|
|
@@ -1433,10 +1465,10 @@ class SmartOffenderRedirectGuard {
|
|
|
1433
1465
|
}
|
|
1434
1466
|
return true;
|
|
1435
1467
|
}
|
|
1436
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1437
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1468
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderRedirectGuard, deps: [{ token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1469
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderRedirectGuard, providedIn: 'root' }); }
|
|
1438
1470
|
}
|
|
1439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartOffenderRedirectGuard, decorators: [{
|
|
1440
1472
|
type: Injectable,
|
|
1441
1473
|
args: [{
|
|
1442
1474
|
providedIn: 'root'
|
|
@@ -1444,8 +1476,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImpor
|
|
|
1444
1476
|
}], ctorParameters: () => [{ type: i2$1.Router }] });
|
|
1445
1477
|
|
|
1446
1478
|
class NgcSmartCoreModule {
|
|
1447
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1448
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.
|
|
1479
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgcSmartCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1480
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: NgcSmartCoreModule, declarations: [SmartOffenderHeaderComponent,
|
|
1449
1481
|
SmartNavbarComponent,
|
|
1450
1482
|
SmartErrorComponent,
|
|
1451
1483
|
SmartStaffOffenderOptionsComponent,
|
|
@@ -1455,14 +1487,17 @@ class NgcSmartCoreModule {
|
|
|
1455
1487
|
MatMenuModule,
|
|
1456
1488
|
MatTabsModule,
|
|
1457
1489
|
MatSelectModule,
|
|
1490
|
+
MatAutocompleteModule,
|
|
1491
|
+
MatInputModule,
|
|
1458
1492
|
MatCardModule,
|
|
1459
1493
|
MatCheckboxModule,
|
|
1494
|
+
MatIconModule,
|
|
1460
1495
|
ReactiveFormsModule], exports: [SmartOffenderHeaderComponent,
|
|
1461
1496
|
SmartNavbarComponent,
|
|
1462
1497
|
SmartErrorComponent,
|
|
1463
1498
|
SmartStaffOffenderOptionsComponent,
|
|
1464
1499
|
SmartAccessControlDirective] }); }
|
|
1465
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.
|
|
1500
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgcSmartCoreModule, providers: [
|
|
1466
1501
|
SmartNavbarService,
|
|
1467
1502
|
SmartOffenderHeaderService,
|
|
1468
1503
|
SmartStaffOffenderOptionsService,
|
|
@@ -1475,11 +1510,14 @@ class NgcSmartCoreModule {
|
|
|
1475
1510
|
MatMenuModule,
|
|
1476
1511
|
MatTabsModule,
|
|
1477
1512
|
MatSelectModule,
|
|
1513
|
+
MatAutocompleteModule,
|
|
1514
|
+
MatInputModule,
|
|
1478
1515
|
MatCardModule,
|
|
1479
1516
|
MatCheckboxModule,
|
|
1517
|
+
MatIconModule,
|
|
1480
1518
|
ReactiveFormsModule] }); }
|
|
1481
1519
|
}
|
|
1482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgcSmartCoreModule, decorators: [{
|
|
1483
1521
|
type: NgModule,
|
|
1484
1522
|
args: [{
|
|
1485
1523
|
declarations: [
|
|
@@ -1496,8 +1534,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImpor
|
|
|
1496
1534
|
MatMenuModule,
|
|
1497
1535
|
MatTabsModule,
|
|
1498
1536
|
MatSelectModule,
|
|
1537
|
+
MatAutocompleteModule,
|
|
1538
|
+
MatInputModule,
|
|
1499
1539
|
MatCardModule,
|
|
1500
1540
|
MatCheckboxModule,
|
|
1541
|
+
MatIconModule,
|
|
1501
1542
|
ReactiveFormsModule,
|
|
1502
1543
|
],
|
|
1503
1544
|
exports: [
|
|
@@ -1559,10 +1600,10 @@ class LoginStaffResolverService {
|
|
|
1559
1600
|
return EMPTY;
|
|
1560
1601
|
}));
|
|
1561
1602
|
}
|
|
1562
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1563
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1603
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoginStaffResolverService, deps: [{ token: SmartAuthService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1604
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoginStaffResolverService, providedIn: 'root' }); }
|
|
1564
1605
|
}
|
|
1565
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LoginStaffResolverService, decorators: [{
|
|
1566
1607
|
type: Injectable,
|
|
1567
1608
|
args: [{
|
|
1568
1609
|
providedIn: 'root',
|
|
@@ -1611,10 +1652,10 @@ class SelectedOffenderResolverService {
|
|
|
1611
1652
|
return EMPTY;
|
|
1612
1653
|
}));
|
|
1613
1654
|
}
|
|
1614
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1615
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1655
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectedOffenderResolverService, deps: [{ token: XdmService }, { token: i0.NgZone }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1656
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectedOffenderResolverService, providedIn: 'root' }); }
|
|
1616
1657
|
}
|
|
1617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectedOffenderResolverService, decorators: [{
|
|
1618
1659
|
type: Injectable,
|
|
1619
1660
|
args: [{
|
|
1620
1661
|
providedIn: 'root',
|
|
@@ -1631,10 +1672,10 @@ class SmartStaffOffenderOptionsResolverService {
|
|
|
1631
1672
|
return data;
|
|
1632
1673
|
}));
|
|
1633
1674
|
}
|
|
1634
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1635
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1675
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsResolverService, deps: [{ token: SmartStaffOffenderOptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1676
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsResolverService, providedIn: 'root' }); }
|
|
1636
1677
|
}
|
|
1637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SmartStaffOffenderOptionsResolverService, decorators: [{
|
|
1638
1679
|
type: Injectable,
|
|
1639
1680
|
args: [{
|
|
1640
1681
|
providedIn: 'root',
|
|
@@ -1664,15 +1705,15 @@ class UserSettingsService {
|
|
|
1664
1705
|
* @returns Observable of staff settings array
|
|
1665
1706
|
*/
|
|
1666
1707
|
findStaffSettings(staffId) {
|
|
1667
|
-
const query = `{
|
|
1668
|
-
findStaffSettings(input: { where: { staffId: ${staffId} } }) {
|
|
1669
|
-
data {
|
|
1670
|
-
staffSettingId
|
|
1671
|
-
settingKey
|
|
1672
|
-
settingValue
|
|
1673
|
-
modifiedBy
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1708
|
+
const query = `{
|
|
1709
|
+
findStaffSettings(input: { where: { staffId: ${staffId} } }) {
|
|
1710
|
+
data {
|
|
1711
|
+
staffSettingId
|
|
1712
|
+
settingKey
|
|
1713
|
+
settingValue
|
|
1714
|
+
modifiedBy
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1676
1717
|
}`;
|
|
1677
1718
|
return this.httpClient.post(this.smartDataServiceUrl, { query }).pipe(map(response => response?.data?.findStaffSettings?.data || []), catchError(error => {
|
|
1678
1719
|
console.error('Error fetching staff settings:', error);
|
|
@@ -1684,13 +1725,13 @@ class UserSettingsService {
|
|
|
1684
1725
|
* @returns Observable of default settings array
|
|
1685
1726
|
*/
|
|
1686
1727
|
findDefaultSettings() {
|
|
1687
|
-
const query = `{
|
|
1688
|
-
findDefaultSettings {
|
|
1689
|
-
data {
|
|
1690
|
-
defaultSettingId
|
|
1691
|
-
settingValue
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1728
|
+
const query = `{
|
|
1729
|
+
findDefaultSettings {
|
|
1730
|
+
data {
|
|
1731
|
+
defaultSettingId
|
|
1732
|
+
settingValue
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1694
1735
|
}`;
|
|
1695
1736
|
return this.httpClient.post(this.smartDataServiceUrl, { query }).pipe(map(response => response?.data?.findDefaultSettings?.data || []), catchError(error => {
|
|
1696
1737
|
console.error('Error fetching default settings:', error);
|
|
@@ -1703,17 +1744,17 @@ class UserSettingsService {
|
|
|
1703
1744
|
* @returns Observable with the created staff setting
|
|
1704
1745
|
*/
|
|
1705
1746
|
createStaffSetting(input) {
|
|
1706
|
-
const mutation = `
|
|
1707
|
-
mutation CreateStaffSetting($input: CreateStaffSettingInput!) {
|
|
1708
|
-
createStaffSetting(input: $input) {
|
|
1709
|
-
data {
|
|
1710
|
-
staffSettingId
|
|
1711
|
-
settingKey
|
|
1712
|
-
settingValue
|
|
1713
|
-
}
|
|
1714
|
-
message
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1747
|
+
const mutation = `
|
|
1748
|
+
mutation CreateStaffSetting($input: CreateStaffSettingInput!) {
|
|
1749
|
+
createStaffSetting(input: $input) {
|
|
1750
|
+
data {
|
|
1751
|
+
staffSettingId
|
|
1752
|
+
settingKey
|
|
1753
|
+
settingValue
|
|
1754
|
+
}
|
|
1755
|
+
message
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1717
1758
|
`;
|
|
1718
1759
|
return this.httpClient.post(this.smartDataServiceUrl, {
|
|
1719
1760
|
query: mutation,
|
|
@@ -1729,18 +1770,18 @@ class UserSettingsService {
|
|
|
1729
1770
|
* @returns Observable with the updated staff setting
|
|
1730
1771
|
*/
|
|
1731
1772
|
updateStaffSetting(input) {
|
|
1732
|
-
const mutation = `
|
|
1733
|
-
mutation UpdateStaffSetting($input: UpdateStaffSettingInput!) {
|
|
1734
|
-
updateStaffSetting(input: $input) {
|
|
1735
|
-
data {
|
|
1736
|
-
staffSettingId
|
|
1737
|
-
staffId
|
|
1738
|
-
settingKey
|
|
1739
|
-
settingValue
|
|
1740
|
-
}
|
|
1741
|
-
message
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1773
|
+
const mutation = `
|
|
1774
|
+
mutation UpdateStaffSetting($input: UpdateStaffSettingInput!) {
|
|
1775
|
+
updateStaffSetting(input: $input) {
|
|
1776
|
+
data {
|
|
1777
|
+
staffSettingId
|
|
1778
|
+
staffId
|
|
1779
|
+
settingKey
|
|
1780
|
+
settingValue
|
|
1781
|
+
}
|
|
1782
|
+
message
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1744
1785
|
`;
|
|
1745
1786
|
return this.httpClient.post(this.smartDataServiceUrl, {
|
|
1746
1787
|
query: mutation,
|
|
@@ -1750,10 +1791,10 @@ class UserSettingsService {
|
|
|
1750
1791
|
return of({ data: null, message: 'Failed to update staff setting' });
|
|
1751
1792
|
}));
|
|
1752
1793
|
}
|
|
1753
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
1754
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
1794
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UserSettingsService, deps: [{ token: i1.HttpClient }, { token: SMART_DATA_SERVICE_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1795
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UserSettingsService, providedIn: 'root' }); }
|
|
1755
1796
|
}
|
|
1756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
1797
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UserSettingsService, decorators: [{
|
|
1757
1798
|
type: Injectable,
|
|
1758
1799
|
args: [{
|
|
1759
1800
|
providedIn: 'root'
|