@csmart/ngc-smart-victim 1.18.12 → 1.18.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/esm2022/csmart-ngc-smart-victim.mjs +5 -0
  2. package/esm2022/lib/caseNote/caseNote.component.mjs +194 -0
  3. package/esm2022/lib/common-dialog/common-dialog.component.mjs +23 -0
  4. package/esm2022/lib/common-dialog/common-dialog.module.mjs +34 -0
  5. package/esm2022/lib/common-dialog/common-dialog.service.mjs +33 -0
  6. package/esm2022/lib/contact/contact.component.mjs +140 -0
  7. package/esm2022/lib/email.services.mjs +42 -0
  8. package/esm2022/lib/intake.service.mjs +57 -0
  9. package/esm2022/lib/safetyPlan/serviceProvider.component.mjs +99 -0
  10. package/esm2022/lib/safetyPlan/victimSafetyPlan.component.mjs +116 -0
  11. package/esm2022/lib/safetyPlan/victimSafetyPlanDetail.component.mjs +340 -0
  12. package/esm2022/lib/shared/app.shared.module.mjs +215 -0
  13. package/esm2022/lib/shared/validators/date.validator.mjs +59 -0
  14. package/esm2022/lib/shared/validators/index.mjs +2 -0
  15. package/esm2022/lib/smart-victim-delete-confirm.component.mjs +44 -0
  16. package/esm2022/lib/smart-victim-detail/smart-victim-detail.component.mjs +1155 -0
  17. package/esm2022/lib/smart-victim.component.mjs +317 -0
  18. package/esm2022/lib/smart-victim.model.mjs +142 -0
  19. package/esm2022/lib/smart-victim.module.mjs +128 -0
  20. package/esm2022/lib/smart-victim.service.mjs +370 -0
  21. package/esm2022/lib/victim-routing.module.mjs +41 -0
  22. package/esm2022/lib/victimSearch/VictimSearchFilter.mjs +3 -0
  23. package/esm2022/lib/victimSearch/victimSearchForm.component.mjs +38 -0
  24. package/esm2022/public-api.mjs +11 -0
  25. package/fesm2022/csmart-ngc-smart-victim.mjs +3342 -0
  26. package/fesm2022/csmart-ngc-smart-victim.mjs.map +1 -0
  27. package/index.d.ts +5 -0
  28. package/lib/caseNote/caseNote.component.d.ts +51 -0
  29. package/lib/common-dialog/common-dialog.component.d.ts +14 -0
  30. package/lib/common-dialog/common-dialog.module.d.ts +8 -0
  31. package/lib/common-dialog/common-dialog.service.d.ts +11 -0
  32. package/lib/contact/contact.component.d.ts +40 -0
  33. package/lib/email.services.d.ts +11 -0
  34. package/lib/intake.service.d.ts +57 -0
  35. package/lib/safetyPlan/serviceProvider.component.d.ts +19 -0
  36. package/lib/safetyPlan/victimSafetyPlan.component.d.ts +54 -0
  37. package/lib/safetyPlan/victimSafetyPlanDetail.component.d.ts +62 -0
  38. package/lib/shared/app.shared.module.d.ts +33 -0
  39. package/lib/shared/validators/date.validator.d.ts +9 -0
  40. package/lib/shared/validators/index.d.ts +1 -0
  41. package/lib/smart-victim-delete-confirm.component.d.ts +12 -0
  42. package/lib/smart-victim-detail/smart-victim-detail.component.d.ts +129 -0
  43. package/lib/smart-victim.component.d.ts +69 -0
  44. package/lib/smart-victim.model.d.ts +211 -0
  45. package/lib/smart-victim.module.d.ts +49 -0
  46. package/lib/smart-victim.service.d.ts +71 -0
  47. package/lib/victim-routing.module.d.ts +7 -0
  48. package/{src/lib/victimSearch/VictimSearchFilter.ts → lib/victimSearch/VictimSearchFilter.d.ts} +7 -9
  49. package/lib/victimSearch/victimSearchForm.component.d.ts +14 -0
  50. package/package.json +21 -6
  51. package/{src/public-api.ts → public-api.d.ts} +7 -12
  52. package/karma.conf.js +0 -32
  53. package/ng-package.json +0 -7
  54. package/src/lib/caseNote/caseNote.component.css +0 -22
  55. package/src/lib/caseNote/caseNote.component.html +0 -188
  56. package/src/lib/caseNote/caseNote.component.ts +0 -265
  57. package/src/lib/common-dialog/common-dialog.component.css +0 -10
  58. package/src/lib/common-dialog/common-dialog.component.html +0 -23
  59. package/src/lib/common-dialog/common-dialog.component.spec.ts +0 -25
  60. package/src/lib/common-dialog/common-dialog.component.ts +0 -21
  61. package/src/lib/common-dialog/common-dialog.module.ts +0 -22
  62. package/src/lib/common-dialog/common-dialog.service.ts +0 -35
  63. package/src/lib/contact/contact.component.css +0 -22
  64. package/src/lib/contact/contact.component.html +0 -124
  65. package/src/lib/contact/contact.component.ts +0 -176
  66. package/src/lib/email-notification.service.ts +0 -42
  67. package/src/lib/email.services.ts +0 -51
  68. package/src/lib/http.service.ts +0 -34
  69. package/src/lib/intake.service.ts +0 -82
  70. package/src/lib/loader.service.ts +0 -11
  71. package/src/lib/safetyPlan/serviceProvider.component.ts +0 -94
  72. package/src/lib/safetyPlan/victimSafetyPlan.component.css +0 -27
  73. package/src/lib/safetyPlan/victimSafetyPlan.component.html +0 -85
  74. package/src/lib/safetyPlan/victimSafetyPlan.component.ts +0 -178
  75. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.html +0 -234
  76. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.ts +0 -492
  77. package/src/lib/shared/app.shared.module.ts +0 -111
  78. package/src/lib/shared/validators/date.validator.ts +0 -73
  79. package/src/lib/shared/validators/index.ts +0 -1
  80. package/src/lib/smart-victim-delete-confirm.component.ts +0 -35
  81. package/src/lib/smart-victim-detail/smart-victim-detail.component.css +0 -43
  82. package/src/lib/smart-victim-detail/smart-victim-detail.component.html +0 -876
  83. package/src/lib/smart-victim-detail/smart-victim-detail.component.spec.ts +0 -25
  84. package/src/lib/smart-victim-detail/smart-victim-detail.component.ts +0 -1469
  85. package/src/lib/smart-victim.component.css +0 -245
  86. package/src/lib/smart-victim.component.html +0 -132
  87. package/src/lib/smart-victim.component.spec.ts +0 -25
  88. package/src/lib/smart-victim.component.ts +0 -333
  89. package/src/lib/smart-victim.model.ts +0 -311
  90. package/src/lib/smart-victim.module.ts +0 -110
  91. package/src/lib/smart-victim.service.spec.ts +0 -12
  92. package/src/lib/smart-victim.service.ts +0 -576
  93. package/src/lib/victim-routing.module.ts +0 -36
  94. package/src/lib/victimSearch/victimSearchForm.component.html +0 -35
  95. package/src/lib/victimSearch/victimSearchForm.component.ts +0 -41
  96. package/src/test.ts +0 -16
  97. package/tsconfig.lib.json +0 -36
  98. package/tsconfig.spec.json +0 -17
  99. package/tslint.json +0 -17
@@ -1,124 +0,0 @@
1
-
2
- <mat-card>
3
- <mat-card-header>
4
-
5
- </mat-card-header>
6
- <mat-card-content>
7
-
8
- <mat-toolbar color="primary">
9
- <h4 class="card-header" >Contact detail</h4>
10
- </mat-toolbar>
11
- <br>
12
-
13
-
14
-
15
- <mat-card>
16
- <div class='container'>
17
- <form [formGroup]="contactForm" #contactDetailForm="ngForm" >
18
-
19
-
20
-
21
- <div>
22
- <mat-form-field>
23
- <mat-label>Contact Date:</mat-label>
24
- <input matInput formControlName="contactDate"
25
- (click)="contactDate.open()"
26
- [matDatepicker]="contactDate"
27
- placeholder="Choose a contact date"
28
- [(ngModel)]="editContact.contactDate" required>
29
- <mat-datepicker-toggle matSuffix [for]="contactDate"></mat-datepicker-toggle>
30
- <mat-datepicker #contactDate></mat-datepicker>
31
- </mat-form-field>
32
-
33
- <div class="validation-errors">
34
- <div
35
- class="help-block"
36
- *ngIf="
37
- contactForm
38
- .get('contactDate')
39
- .hasError('required') &&
40
- (contactForm.get('contactDate').dirty ||
41
- contactForm.get('contactDate').touched)">
42
- <mat-error>Contact date is
43
- <strong>required</strong></mat-error>
44
- </div>
45
- <div
46
- class="help-block"
47
- *ngIf="
48
- contactForm.get('contactDate').hasError('date') &&
49
- (contactForm.get('contactDate').dirty ||
50
- contactForm.get('contactDate').touched)">
51
- <mat-error >future Date is <strong>not allowed</strong> for contact date</mat-error>
52
- </div>
53
- </div>
54
- </div>
55
-
56
-
57
-
58
- <div>
59
- <mat-form-field>
60
- <mat-label>Contact Method:</mat-label>
61
- <mat-select placeholder="contactMethod" formControlName="contactMethod" required [(ngModel)]="editContact.victimContactMethodId">
62
- <mat-option *ngFor=" let contactMethod of contactMethods" [value]="contactMethod.victimContactMethodId" >{{contactMethod.name}}</mat-option>
63
- </mat-select>
64
- </mat-form-field>
65
- </div>
66
-
67
- <div>
68
- <mat-form-field class="mat-select-content">
69
- <mat-label>Contact By:</mat-label>
70
- <mat-select formControlName="contactBy" required [(ngModel)]="editContact.contactedBy" class="mat-select-inner">
71
- <mat-option *ngFor=" let item of staff" [value]="item.staffId" >{{ item.fullName}}</mat-option>
72
- </mat-select>
73
- </mat-form-field>
74
- </div>
75
-
76
- <div>
77
-
78
- <mat-form-field>
79
- <mat-label>Comments </mat-label>
80
- <textarea
81
- matInput
82
- placeholder=""
83
- required formControlName="comment"
84
- [(ngModel)]="editContact.comment"
85
- cdkTextareaAutosize
86
- #autosize="cdkTextareaAutosize"
87
- cdkAutosizeMinRows="1"
88
- cdkAutosizeMaxRows="5">
89
- </textarea>
90
- </mat-form-field>
91
- </div>
92
-
93
- <div>
94
- <mat-form-field>
95
- <mat-label>Next Contact Date: </mat-label>
96
- <input matInput formControlName="nextContactDate"
97
- (click)="nextContactDate.open()"
98
- [matDatepicker]="nextContactDate"
99
- placeholder="Choose a next contact date"
100
- [(ngModel)]="editContact.nextContactDate" required>
101
- <mat-datepicker-toggle matSuffix [for]="nextContactDate"></mat-datepicker-toggle>
102
- <mat-datepicker #nextContactDate></mat-datepicker>
103
- </mat-form-field>
104
- </div>
105
-
106
- <div>
107
- <!-- <button mat-stroked-button color="primary" (click)="saveContact()" [disabled]="!contactForm.form.valid" >Save</button> -->
108
- <button mat-stroked-button color="primary" (click)="saveContact()" [disabled]="!contactForm.valid" >Save</button>
109
- &nbsp;&nbsp;<button mat-stroked-button color="primary" >Cancel</button>
110
- &nbsp;&nbsp;<button mat-stroked-button color="primary" (click)="back()" >Back</button>
111
- </div>
112
-
113
- </form>
114
- </div>
115
- </mat-card>
116
-
117
-
118
- <br>
119
-
120
-
121
-
122
-
123
- </mat-card-content>
124
- </mat-card>
@@ -1,176 +0,0 @@
1
- import { Component, OnInit,Inject,OnChanges, Input, Output, EventEmitter,AfterViewInit } from '@angular/core';
2
- import { NgcSmartVictimService } from '../smart-victim.service';
3
- import { UntypedFormControl, UntypedFormGroup, FormBuilder,Validators } from '@angular/forms';
4
- import { CommonDialogService} from '.././common-dialog/common-dialog.service';
5
- import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
6
- import { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';
7
- import { Router, ActivatedRoute } from '@angular/router';
8
- import { Contact} from '../smart-victim.model';
9
- import { SmartAuthService } from '@csmart/ngc-smart-core';
10
- import { dateValidator,passDateValidator,dateLessThan } from '../shared/validators';
11
- import { MatSnackBar } from '@angular/material/snack-bar';
12
-
13
- @Component({
14
- templateUrl: './contact.component.html',
15
- styleUrls: ['./contact.component.css'],
16
- })
17
- export class ContactComponent implements OnInit,AfterViewInit {
18
-
19
- offenderId: number;
20
- loginStaff: LoginStaff;
21
- contact: Contact;
22
- editContact: Contact = <Contact>{};
23
- errorMessage: string;
24
- contactMethods: any[];
25
- contactBy: any[];
26
- result: any;
27
- victimName: string;
28
- staffId: number;
29
- victimId: number;
30
- hiddenAddNewFlag: boolean;
31
- contactForm: UntypedFormGroup;
32
- private sub: any;
33
- staff: any = {};
34
-
35
- constructor(
36
-
37
- private _victimServicesComponent: NgcSmartVictimService,
38
- //private commonDialogService: CommonDialogService,
39
- public snackBar: MatSnackBar,
40
- private route: ActivatedRoute,
41
- private router: Router,
42
- private smartAuthService: SmartAuthService,
43
-
44
- ) {
45
- this.contactForm = new UntypedFormGroup({
46
- //contactDate: new FormControl(),
47
- contactDate:new UntypedFormControl('', Validators.compose([
48
- dateValidator() ])),
49
-
50
- contactMethod: new UntypedFormControl(),
51
- contactBy: new UntypedFormControl(),
52
- comment: new UntypedFormControl(),
53
- nextContactDate: new UntypedFormControl()
54
- });
55
- }
56
-
57
- ngAfterViewInit() {
58
- this.smartAuthService.setPermission('Victim', this.route.snapshot);
59
- }
60
-
61
- ngOnInit() {
62
- var data = this.route.snapshot.data;
63
- this.loginStaff = data.loginStaff;
64
- this.staffId = this.loginStaff.staffId;
65
-
66
- this.staff = [
67
- {
68
- staffId: this.loginStaff.staffId,
69
- fullName: this.loginStaff.firstName + ' ' + this.loginStaff.lastName,
70
- },
71
- ];
72
-
73
-
74
- this.sub = this.route.params.subscribe(params => {
75
- this.victimId = params['victimId'];
76
- console.log('my this.victimId');
77
- console.log(this.victimId);
78
-
79
- });
80
-
81
-
82
- this._victimServicesComponent.getContactMethods().subscribe(
83
- (items: any) => {
84
- this.contactMethods = items;
85
- console.log('this.contactMethods');
86
- console.log(this.contactMethods);
87
- }
88
- );
89
-
90
- // this._victimServicesComponent.getContactBys().subscribe(
91
- // (items: any) => {
92
- // this.contactBy= items;
93
- // }
94
- // );
95
-
96
-
97
- // this._victimServicesComponent.getContacts(this.victimId).subscribe(
98
- // caseNoteList => {
99
-
100
- // this.caseNoteList = caseNoteList;
101
-
102
- // }
103
- // );
104
-
105
- }
106
- onEditContact(victimContactId: number){
107
-
108
- // this.hiddenDetailFlag =false;
109
- // this.hiddenAddNewFlag = true;
110
-
111
- // this.addDisableFlag = true;
112
- // this.editCaseNote = this.caseNoteList.find(x => x.victimCaseNoteId === victimCaseNoteId);
113
-
114
- }
115
-
116
- // onDeleteCaseNote(victimCaseNoteId: number){
117
- // this.commonDialogService
118
- // .confirm('', 'Do you want to delete this case note?', 'Yes', 'No')
119
- // .subscribe(res => {this.result = res;
120
- // if (this.result) {
121
- // this._victimServicesComponent.deleteCaseNote(victimCaseNoteId, this.staffId)
122
- // .subscribe(result => {
123
- // this.snackBar.open('delete Successfully !', '', { duration: 3000,});
124
-
125
- // this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(
126
- // caseNoteList => {
127
- // this.caseNoteList = caseNoteList;
128
-
129
- // }
130
- // );
131
- // }
132
- // );
133
- // }
134
-
135
- // });
136
- // }
137
- onAddNew(){
138
-
139
- // this.editCas.caseNoteDate = null;
140
- // this.editCaseNote.contactTypeId = null;
141
- // this.editCaseNote.victimContactPurposeId = null;
142
- // this.editCaseNote.comment = null;
143
- }
144
- back(){
145
-
146
-
147
- this.router.navigate(['victimDetail', this.victimId ]);
148
- }
149
-
150
- saveContact(){
151
-
152
- const contact: Contact = {
153
- victimId:this.victimId,
154
- victimContactId: 0,
155
- contactDate: this.editContact.contactDate,
156
- victimContactMethodId: this.editContact.victimContactMethodId,
157
- contactMethod: null,
158
- contactedByName: null,
159
- contactedBy: this.editContact.contactedBy,
160
- comment: this.editContact.comment,
161
- nextContactDate: this.editContact.nextContactDate,
162
- modifiedBy: this.staffId,
163
-
164
- };
165
- this._victimServicesComponent.addContact(contact).subscribe(
166
- result => {
167
- this.snackBar.open('Saved Successfully !', '', {
168
- duration: 3000,
169
- });
170
-
171
- this.router.navigate(['victimDetail', this.victimId ]);
172
- }
173
- );
174
- }
175
-
176
- }
@@ -1,42 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Observable } from "rxjs";
3
- import { map } from "rxjs/operators";
4
- import { Injectable } from "@angular/core";
5
- import { environment } from "../environments/environment";
6
-
7
- @Injectable()
8
- export class EmailNotificationService {
9
- constructor(private http: HttpClient) {}
10
-
11
- createEmail(
12
- emailTemplateId: string,
13
- parameters: string,
14
- modifiedBy: number
15
- ): Observable<any> {
16
- const mutationString = `
17
- mutation {
18
- createEmail(
19
- input: {
20
- emailTemplateId: "${emailTemplateId}"
21
- parameters: "${parameters}"
22
- modifiedBy: ${modifiedBy}
23
- }
24
- ) {
25
- message
26
- data {
27
- emailQueueId
28
- recipient
29
- }
30
- }
31
- }
32
- `;
33
-
34
- return this.http
35
- .post<any>(environment.smartApiUrl, { query: mutationString })
36
- .pipe(
37
- map(({ data }) => {
38
- return data.createEmail;
39
- })
40
- );
41
- }
42
- }
@@ -1,51 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { Apollo } from 'apollo-angular';
3
- import { Observable } from 'rxjs';
4
- import gql from 'graphql-tag';
5
-
6
- @Injectable({
7
- providedIn: 'root',
8
- })
9
- export class EmailService {
10
- constructor(private apollo: Apollo) {}
11
-
12
- createCaseNoteEmail(
13
- templateId: string,
14
- offenderId: number,
15
- modifiedBy: number,
16
- ) : Observable<any> {
17
-
18
- return this.createEmail(
19
- templateId,
20
- `{\\"offenderId\\": ${offenderId}}`,
21
- modifiedBy,
22
- );
23
-
24
- }
25
-
26
-
27
- createEmail(
28
- emailTemplateId: string,
29
- parameters: string,
30
- modifiedBy: number,
31
- ): Observable<any> {
32
- const mutation = `mutation {
33
- createEmail(input: {
34
- emailTemplateId: "${emailTemplateId}"
35
- parameters: "${parameters}"
36
- modifiedBy: ${modifiedBy}
37
- }) {
38
- message
39
- data {
40
- emailQueueId
41
- }
42
- }
43
- }`;
44
- console.log(mutation);
45
- return this.apollo.mutate({
46
- mutation: gql`
47
- ${mutation}
48
- `,
49
- });
50
- }
51
- }
@@ -1,34 +0,0 @@
1
-
2
- import { throwError as observableThrowError, Observable, throwError } from 'rxjs';
3
- import { Injectable } from '@angular/core';
4
- import { HttpClient, HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
5
- import { catchError, finalize, map } from 'rxjs/operators';
6
- import { LoaderService } from './loader.service';
7
-
8
- export enum ResponseContentType {
9
- Blob, Json
10
- }
11
-
12
- @Injectable()
13
- export class HttpService {
14
-
15
- constructor(private http: HttpClient,
16
- private loaderService: LoaderService
17
- ) { }
18
-
19
- private handleError(error: HttpErrorResponse) {
20
- return throwError(() => new Error(error.message));
21
- }
22
- private showLoader(): void {
23
- this.loaderService.display(true);
24
- }
25
- private hideLoader(): void {
26
- this.loaderService.display(false);
27
- }
28
- public sendEmailTemplate(emailTemplateId: string, data: any, staffId: number) : Observable<any> {
29
- return this.sendEmail({ emailTemplateId: emailTemplateId, emailParams: JSON.stringify(data), staffId: staffId, CaseDocumentIds: '' });
30
- }
31
- private sendEmail(data: any) : Observable<any> {
32
- return this.http.post('https://smart-service-offender-uat.azurewebsites.net/v1/', + '/Emails/', data).pipe();
33
- }
34
- }
@@ -1,82 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { map, filter } from 'rxjs/operators';
4
- import { Injectable,Inject } from '@angular/core';
5
- import { SMART_OFFENDER_SERVICE_URL} from './smart-victim.model';
6
-
7
-
8
- const headers = new Headers({ 'Content-Type': 'application/json' });
9
- @Injectable({
10
- providedIn: 'root'
11
- })
12
- export class IntakeServicesComponent {
13
- //serviceData = environment.smartOffenderServiceUrl;
14
- constructor(private http: HttpClient,
15
- @Inject(SMART_OFFENDER_SERVICE_URL) private smartOffenderServiceUrl: string,
16
- ) {}
17
- getIntakeByOffender(offenderId: any): Observable<Intake> {
18
- return this.http
19
- .get<Intake>(this.smartOffenderServiceUrl + 'IntakeBasic/offender/' + offenderId)
20
- .pipe();
21
- }
22
-
23
- updateIntakeSteps(
24
- offenderId: number,
25
- intakeStepStatus: IntakeStepStatusModel,
26
- ) {
27
- return this.http.put(
28
- this.smartOffenderServiceUrl + '/IntakeStepStatus/' + offenderId,
29
- intakeStepStatus,
30
- );
31
- }
32
- }
33
-
34
- export interface Intake {
35
- intakeId: number;
36
- offenderId: number;
37
- intakeOffenderReportStatusId?: any;
38
- startDate: string;
39
- endDate?: any;
40
- assignmentId?: any;
41
- modifiedBy: number;
42
- }
43
-
44
- export interface IntakeStepStatus {
45
- intakeStepStatusId: number;
46
- intakeId: number;
47
- intakeStepId: string;
48
- completedDate: Date;
49
- modifiedBy: number;
50
- }
51
-
52
- export interface IntakeStepStatusModel
53
- {
54
- offenderId: number;
55
- intakeStepId: string;
56
- modifiedBy: number;
57
- }
58
-
59
- export class IntakeStep{
60
- public static PhysicalInformation = "PHYSIN";
61
- public static Photo = "PHOTOS";
62
- public static HousingInformation = "HOUSE";
63
- public static DocketInformation = "DOCKET";
64
- public static Alias = "ALIAS";
65
- public static IntakeBasicInformation = "INTKBI";
66
- public static ContactInformation = "CONTCT";
67
- public static DeceasedInformation = "DEATH";
68
- public static DriversLicense = "DRVLIC";
69
- public static EmploymentInformation = "EMPLOY";
70
- public static GangAffiliation = "GANG";
71
- public static HealthInsurance = "HLTHINS";
72
- public static Identification = "IDNTFCTN";
73
- public static InternetIdentifier = "INTERNETID";
74
- public static MilitaryService = "MLTSVC";
75
- public static School = "SCHOOL";
76
- public static SelectiveService = "SLCTVSVC";
77
- public static Vehicle = "VEHICLE";
78
- public static VictimInformation = "VICTIM";
79
- public static WarrantInformation = "WARRNT";
80
- public static RunningRecord = "RUNREC";
81
- public static Signature = "SIGN";
82
- }
@@ -1,11 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
-
4
- @Injectable()
5
- export class LoaderService {
6
- public status: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
7
-
8
- display(value: boolean) {
9
- this.status.next(value);
10
- }
11
- }
@@ -1,94 +0,0 @@
1
- import { Component, OnInit, Inject } from '@angular/core';
2
- import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
3
- import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
4
- import { ProvidersDialogData} from '../smart-victim.model';
5
- import { NgcSmartVictimService } from '../smart-victim.service';
6
-
7
-
8
- @Component({
9
- selector: 'app-service-provider',
10
- template: `
11
- <h1 mat-dialog-title> {{data.serviceType}}</h1>
12
- <div mat-dialog-content class="main" [formGroup]="spForm">
13
- <mat-form-field>
14
- <mat-label>service provider</mat-label>
15
-
16
- <mat-select formControlName="voteeProviderId">
17
- <mat-option
18
- *ngFor="let providerOption of programProviders"
19
- [value]="providerOption.victimProgramProviderId">{{ providerOption.victimProgramProvider }}
20
- </mat-option>
21
- </mat-select>
22
-
23
- </mat-form-field>
24
-
25
- </div>
26
- <div mat-dialog-actions class="actions">
27
- <button mat-stroked-button color="primary" (click)="cancel()" cdkFocusInitial>
28
- Cancel Change
29
- </button>
30
- <button mat-stroked-button color="primary" [mat-dialog-close]="spForm.value" >
31
- Save Change
32
- </button>
33
- </div>
34
- `,
35
- styles: [
36
- `
37
- .main {
38
- width: 100%;
39
- display: flex;
40
- flex-direction: column;
41
- }
42
-
43
- .actions{
44
- display: flex;
45
- }
46
- `,
47
- ],
48
- })
49
-
50
-
51
-
52
- export class SeriveProviderComponent implements OnInit {
53
- spForm: UntypedFormGroup;
54
- programProviders:[];
55
-
56
- constructor(
57
- private formBuilder: UntypedFormBuilder,
58
- public dialogRef: MatDialogRef<SeriveProviderComponent>,
59
- private _victimServicesComponent: NgcSmartVictimService,
60
- @Inject(MAT_DIALOG_DATA) public data: ProvidersDialogData,
61
- ) {
62
-
63
-
64
- this.spForm = this.formBuilder.group({
65
- voteeProviderId: [''],
66
-
67
- });
68
- }
69
-
70
- cancel() {
71
- this.dialogRef.close();
72
- }
73
-
74
- ngOnInit() {
75
- console.log('data.providerCollections')
76
- console.log(this.data);
77
- console.log(this.data.serviceTypeId);
78
-
79
- this._victimServicesComponent.getvVictimServiceTypeProgramProviders().subscribe(
80
- (items: any) => {
81
- this.programProviders = items.filter( (y) => (y.victimServiceTypeId === this.data.serviceTypeId));
82
- console.log('this.programProviders');
83
- console.log(this.programProviders);
84
- }
85
- );
86
-
87
- this.spForm.get('voteeProviderId').valueChanges.subscribe(voteeProviderId => {
88
- console.log('voteeProviderId in service provider component.')
89
- console.log(voteeProviderId)
90
-
91
-
92
- })
93
- }
94
- }
@@ -1,27 +0,0 @@
1
-
2
- div.serviceSelect
3
- {
4
- width: 500px;
5
-
6
- }
7
- div.serviceButton
8
- {
9
- width: 20%;
10
-
11
- }
12
- .container{
13
- margin: 16px;
14
- display: grid;
15
- grid-template-columns: repeat(2, 1fr);
16
- grid-gap: 10px;
17
- grid-auto-rows: minmax(50px, auto);
18
- justify-items: stretch;
19
- }
20
-
21
- .app-class .mat-mdc-list-item {
22
- height: auto;
23
- }
24
-
25
- .textarea-content{
26
- width:500px;
27
- }