@csmart/ngc-smart-victim 1.18.12 → 1.18.13

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,876 +0,0 @@
1
- <mat-card>
2
- <mat-card-content>
3
-
4
- <div [formGroup]="victimForm">
5
-
6
- <mat-tab-group dynamicHeight mat-stretch-tabs>
7
- <mat-tab label="Victim Detail" >
8
- <div class='container'>
9
-
10
- <mat-form-field>
11
- <mat-label>Is victim a minor?<font color="red">* </font></mat-label>
12
- <br>
13
- <mat-radio-group formControlName="minorFlag" (change)="radioMinorChange($event)" [(ngModel)]="editVictim.minorFlag" >
14
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
15
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
16
- </mat-radio-group>
17
- <input matInput placeholder="" style="display: none">
18
- <div class="help-block" *ngIf="victimForm.get('minorFlag').errors
19
- && (victimForm.get('minorFlag').dirty || victimForm.get('minorFlag').touched)">
20
- <mat-error>If victim a minor field is <strong>required</strong></mat-error>
21
- </div>
22
-
23
- </mat-form-field>
24
-
25
- <mat-form-field>
26
- <mat-label>Does the Victim have a Victim Advocate or Social Worker with <br>whom CSOSA should maintain contact?<font color="red">* </font></mat-label>
27
- <br>
28
- <br>
29
- <mat-radio-group class = "tp-radio-group" formControlName="victimAdvocateFlag" (change)="radioAdvocateChange($event)" [(ngModel)]="editVictim.victimAdvocateFlag">
30
- <mat-radio-button color="primary" *ngFor="let item of flagOption" [value]="item.flagOptionYesNoUnknownId">{{item.name}} </mat-radio-button>&nbsp;
31
- </mat-radio-group>
32
- <input matInput placeholder="" style="display: none">
33
- <div class="help-block" *ngIf="victimForm.get('victimAdvocateFlag').errors
34
- && (victimForm.get('victimAdvocateFlag').dirty || victimForm.get('victimAdvocateFlag').touched)">
35
- <mat-error>If victim has advocate field is <strong>required</strong></mat-error>
36
- </div>
37
- </mat-form-field>
38
-
39
-
40
- <mat-form-field>
41
- <mat-label>Victim Currently Under Supervision:</mat-label>
42
- <mat-select formControlName="underSupervisionFlag" name="supervision" [(ngModel)]="editVictim.underSupervisionFlag" >
43
- <mat-option *ngFor="let item of flagOption" [value]="item.flagOptionYesNoUnknownId" >
44
- {{item.name}}</mat-option>
45
- </mat-select>
46
- <div class="help-block" *ngIf="victimForm.get('underSupervisionFlag').errors
47
- && (victimForm.get('underSupervisionFlag').dirty || victimForm.get('underSupervisionFlag').touched)">
48
- <mat-error>under supervision field is <strong>required</strong></mat-error>
49
- </div>
50
- </mat-form-field>
51
-
52
-
53
- <mat-form-field>
54
- <mat-label>Relationship to Offender:9</mat-label>
55
-
56
- <mat-select #relationShipSel multiple formControlName="victimRelationships" [(ngModel)]="editVictim.victimOffenderRelationshipTypeId" >
57
- <div (mouseleave)="relationShipSel.close()">
58
- <mat-option color="primary" *ngFor="let item of relationshipTypes" [value]="item.relationshipTypeId">
59
- {{item.name}}
60
- </mat-option>
61
- </div>
62
- </mat-select>
63
-
64
-
65
- <div class="help-block" *ngIf="victimForm.get('victimRelationships').errors
66
- && (victimForm.get('victimRelationships').dirty || victimForm.get('victimRelationships').touched)">
67
- <mat-error>relationship is <strong>required</strong></mat-error>
68
- </div>
69
- </mat-form-field>
70
-
71
-
72
- <mat-form-field>
73
- <mat-label>Victim Last Name:</mat-label>
74
- <input matInput formControlName="lastName" [(ngModel)]="editVictim.lastName" >
75
- <div class="help-block" *ngIf="victimForm.get('lastName').errors
76
- && (victimForm.get('lastName').dirty || victimForm.get('lastName').touched)">
77
- <mat-error>victim last name is <strong>required</strong></mat-error>
78
- </div>
79
- </mat-form-field>
80
-
81
- <mat-form-field>
82
- <mat-label>Victim First Name: </mat-label>
83
- <input matInput formControlName="firstName" [(ngModel)]="editVictim.firstName" >
84
- <div class="help-block" *ngIf="victimForm.get('firstName').errors
85
- && (victimForm.get('firstName').dirty || victimForm.get('firstName').touched)">
86
- <mat-error>victim first name is <strong>required</strong></mat-error>
87
- </div>
88
- </mat-form-field>
89
-
90
- <mat-form-field>
91
- <mat-label>Victim Middle Name:</mat-label>
92
- <input matInput formControlName="middleName" [(ngModel)]="editVictim.middleName">
93
- </mat-form-field>
94
-
95
- <mat-form-field>
96
- <mat-label>Victim Prefix:</mat-label>
97
- <mat-select formControlName="prefixId" [(ngModel)]="editVictim.prefixId">
98
- <mat-option *ngFor="let item of prefixes" [value]="item.prefixId">{{item.name}}</mat-option>
99
- </mat-select>
100
- </mat-form-field>
101
-
102
- <mat-form-field>
103
- <mat-label>Victim Suffix:</mat-label>
104
- <mat-select formControlName="suffixId" [(ngModel)]="editVictim.suffixId">
105
- <mat-option *ngFor="let item of suffixes" [value]="item.suffixId">{{item.name}}</mat-option>
106
- </mat-select>
107
- </mat-form-field>
108
-
109
- <mat-form-field>
110
- <mat-label>Victim Gender:</mat-label>
111
- <mat-select formControlName="genderCode" [(ngModel)]="editVictim.genderCode">
112
- <mat-option *ngFor="let item of genders" [value]="item.genderCode">{{item.name}}</mat-option>
113
- </mat-select>
114
- </mat-form-field>
115
-
116
- <mat-form-field>
117
- <mat-label>Date of Birth:</mat-label>
118
- <input matInput
119
- [matDatepicker]="victimBirthRef"
120
- formControlName="birthDate"
121
- [(ngModel)]="editVictim.birthDate"
122
- (click)="victimBirthRef.open()"
123
- (dateChange)="handleDOBChange($event)"
124
- >
125
- <mat-datepicker-toggle [for]="victimBirthRef" matSuffix></mat-datepicker-toggle>
126
- <mat-datepicker #victimBirthRef></mat-datepicker>
127
- </mat-form-field>
128
-
129
- <mat-form-field>
130
- <mat-label>Victim Home Phone:</mat-label>
131
- <input
132
- id="tel"
133
- matInput
134
- phoneMask
135
- [preValue]="editVictim.homePhone"
136
- [phoneControl]="homePhoneControl"
137
- [formControl]="homePhoneControl"
138
- maxlength="14"/>
139
-
140
- <div class="help-block" *ngIf="victimForm.get('homePhone').errors
141
- && (victimForm.get('homePhone').dirty || victimForm.get('homePhone').touched)">
142
- <mat-error><strong>Home phone number format is not correct.</strong></mat-error>
143
- </div>
144
- </mat-form-field>
145
-
146
- <mat-form-field >
147
- <mat-label>Victim Cell Phone:</mat-label>
148
- <input
149
- id="tel1"
150
- matInput
151
- phoneMask
152
- [preValue]="editVictim.cellPhone"
153
- [phoneControl]="cellPhoneControl"
154
- [formControl]="cellPhoneControl"
155
- maxlength="14"/>
156
-
157
- <div class="help-block" *ngIf="victimForm.get('cellPhone').errors
158
- && (victimForm.get('cellPhone').dirty || victimForm.get('cellPhone').touched)">
159
- <mat-error><strong>Cell phone number format is not correct.</strong></mat-error>
160
- </div>
161
- </mat-form-field>
162
-
163
-
164
- <mat-form-field >
165
- <mat-label>Victim Work Phone:</mat-label>
166
- <input
167
- id="tel2"
168
- matInput
169
- phoneMask
170
- [preValue]="editVictim.workPhone"
171
- [phoneControl]="workPhoneControl"
172
- [formControl]="workPhoneControl"
173
- maxlength="14"/>
174
-
175
- <div class="help-block" *ngIf="victimForm.get('workPhone').errors
176
- && (victimForm.get('workPhone').dirty || victimForm.get('workPhone').touched)">
177
- <mat-error><strong>Work phone number format is not correct.</strong></mat-error>
178
- </div>
179
- </mat-form-field>
180
-
181
- <mat-form-field >
182
- <mat-label>Victim Email:</mat-label>
183
- <input matInput formControlName="email" [(ngModel)]="editVictim.email" >
184
- <div class="help-block" *ngIf="victimForm.get('email').errors
185
- && (victimForm.get('email').dirty || victimForm.get('email').touched)">
186
- <mat-error><strong>victim email format is not correct.</strong></mat-error>
187
- </div>
188
- </mat-form-field>
189
-
190
- <div></div>
191
- <app-smart-address
192
- [modifiedBy]="staffId"
193
- [id]="addressId"
194
- [outline]="true"
195
- [showPsa]="true"
196
- [addressValidators]="addressValidators"
197
- [readonly]="false"
198
- (addressIdChange)="onAddressChange($event)"
199
- #addressComponent >
200
-
201
- </app-smart-address>
202
-
203
-
204
- <!-- Docket:
205
- <div>
206
- <div *ngFor="let docket of docketlist; let i=index">
207
- <mat-checkbox >{{docket.docketNumber}}</mat-checkbox>
208
- </div>
209
- </div> -->
210
- <div>
211
- <mat-checkbox color="primary" formControlName="liveWithOffenderFlag" name="liveWithOffenderFlag" [(ngModel)]="editVictim.liveWithOffenderFlag" (change)="showAddress($event)" >victim live with offender</mat-checkbox>
212
- <br>
213
- <mat-checkbox color="primary" formControlName="allowCsosaContactFlag" name="allowCsosaContactFlag" [(ngModel)]="editVictim.allowCsosaContactFlag">victim wants to be contacted by CSOSA</mat-checkbox>
214
- </div>
215
-
216
- </div>
217
-
218
- <mat-card>
219
- <mat-form-field>
220
- <mat-label> Children in Common</mat-label>
221
- <br>
222
- <mat-radio-group formControlName="commonChildrenFlag" [(ngModel)]="editVictim.commonChildrenFlag" (change)="radioCicChange($event)">
223
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
224
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
225
- </mat-radio-group>
226
- <input matInput placeholder="" style="display: none">
227
- </mat-form-field>
228
-
229
- <div *ngIf="commonChildrenDivFlag">
230
-
231
- <mat-form-field >
232
- <mat-label>
233
- Children number
234
- </mat-label>
235
- <input matInput formControlName="commonChildrenNumber" [(ngModel)]="editVictim.commonChildrenNumber" >
236
- </mat-form-field>
237
-
238
- </div>
239
-
240
- <mat-form-field>
241
- <mat-label>CPO: </mat-label>
242
- <br>
243
- <mat-radio-group formControlName="cpoExpirationFlag" [(ngModel)]="editVictim.cpoExpirationFlag" (change)="radioCpoChange($event)">
244
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
245
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
246
- </mat-radio-group>
247
- <input matInput placeholder="" style="display: none">
248
- </mat-form-field>
249
-
250
- <div *ngIf="cpoExpirationDivFlag">
251
- <mat-form-field>
252
- <mat-label>Expiration Date: </mat-label>
253
- <input matInput
254
- [matDatepicker]="cpoDateRef"
255
- formControlName="cpoExpirationDate"
256
- (click)="cpoDateRef.open()"
257
- [(ngModel)]="editVictim.cpoExpirationDate" >
258
- <mat-datepicker-toggle [for]="cpoDateRef" matSuffix></mat-datepicker-toggle>
259
- <mat-datepicker #cpoDateRef></mat-datepicker>
260
- </mat-form-field>
261
-
262
- </div>
263
-
264
- <br>
265
- <br>
266
-
267
- <mat-form-field>
268
- <mat-label>Victim has a Support System in Place? </mat-label>
269
- <br>
270
- <mat-radio-group formControlName="supportInPlaceFlag" [(ngModel)]="editVictim.supportInPlaceFlag" (change)="radioSupportChange($event)">
271
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
272
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
273
- </mat-radio-group>
274
- <input matInput placeholder="" style="display: none">
275
- </mat-form-field>
276
-
277
- <div *ngIf="supportInPlaceDivFlag">
278
- <mat-form-field>
279
- <mat-label>Support type? </mat-label>
280
- <mat-select #supportSel formControlName="victimSupports" [(ngModel)]="editVictim.victimSupports" multiple>
281
- <div (mouseleave)="supportSel.close()">
282
- <mat-option color="primary" *ngFor="let item of victimSupportTypes" [value]="item.victimSupportTypeId">
283
- {{item.name}}
284
- </mat-option>
285
- </div>
286
- </mat-select>
287
- <input matInput placeholder="" style="display: none">
288
- </mat-form-field>
289
-
290
- </div>
291
-
292
- <br>
293
- <br>
294
-
295
- <mat-form-field>
296
- <mat-label>Weapons Involved?</mat-label>
297
- <br>
298
- <mat-radio-group formControlName="weaponInvolvedFlag" (change)="radioWeaponChange($event)" [(ngModel)]="editVictim.weaponInvolvedFlag" >
299
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
300
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
301
- </mat-radio-group>
302
- <input matInput placeholder="" style="display: none">
303
- </mat-form-field>
304
-
305
-
306
- <div *ngIf="weaponInvolvedDivFlag">
307
- <mat-form-field>
308
- <mat-label>Weapon Type</mat-label>
309
- <mat-select #weaponSel formControlName="victimWeaponUses" multiple [(ngModel)]="editVictim.victimWeaponUses" (selectionChange)="checkOtherWeapon($event.value)" >
310
- <div (mouseleave)="weaponSel.close()">
311
- <mat-option color="primary" *ngFor="let item of weaponTypes" [value]="item.weaponTypeId">
312
- {{item.name}}
313
- </mat-option>
314
- </div>
315
- </mat-select>
316
- <input matInput placeholder="" style="display: none">
317
- </mat-form-field>
318
- </div>
319
-
320
- <div *ngIf="otherWeaponFlag">
321
- <mat-form-field>
322
- <mat-label>Other Weapon:* </mat-label>
323
- <input matInput formControlName="otherWeapon" >
324
- </mat-form-field>
325
- <div class="help-block" *ngIf="victimForm.get('otherWeapon').errors
326
- && (victimForm.get('otherWeapon').dirty || victimForm.get('otherWeapon').touched)">
327
- <mat-error><strong>Other weapon is required.</strong></mat-error>
328
- </div>
329
- </div>
330
-
331
-
332
- <br>
333
- <br>
334
-
335
- <mat-form-field>
336
- <mat-label>Was Offender under the influence of alcohol at the time of the offense?</mat-label>
337
- <br>
338
- <mat-radio-group formControlName="alcoholUseFlag" [(ngModel)]="editVictim.alcoholUseFlag" >
339
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
340
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
341
- </mat-radio-group>
342
- <input matInput placeholder="" style="display: none">
343
- </mat-form-field>
344
-
345
- <br>
346
- <br>
347
-
348
- <mat-form-field>
349
- <mat-label>Was Offender under the influence of drugs at the time of the offense?</mat-label>
350
- <br>
351
- <mat-radio-group formControlName="drugUseFlag" (change)="radioDrugChange($event)" [(ngModel)]="editVictim.drugUseFlag" >
352
- <mat-radio-button color="primary" [value]="true">Yes</mat-radio-button>&nbsp;
353
- <mat-radio-button color="primary" [value]="false">No</mat-radio-button>
354
- </mat-radio-group>
355
- <input matInput placeholder="" style="display: none">
356
- </mat-form-field>
357
-
358
- <div *ngIf="drugUseDivFlag">
359
- <mat-form-field>
360
- <mat-label>Drug:</mat-label>
361
- <mat-select #drugSel formControlName="victimDrugUses" multiple (selectionChange)="checkOtherDrug($event.value)" >
362
- <div (mouseleave)="drugSel.close()">
363
- <mat-option color="primary" *ngFor="let item of drugs" [value]="item.drugTypeId">
364
- {{item.name}}
365
- </mat-option>
366
-
367
- </div>
368
- </mat-select>
369
- <input matInput placeholder="" style="display: none">
370
- </mat-form-field>
371
-
372
- </div>
373
-
374
- <div *ngIf="otherDrugFlag">
375
- <mat-form-field>
376
- <mat-label>Other Drug:* </mat-label>
377
- <input matInput formControlName="otherDrug" >
378
- </mat-form-field>
379
- <div class="help-block" *ngIf="victimForm.get('otherDrug').errors
380
- && (victimForm.get('otherDrug').dirty || victimForm.get('otherDrug').touched)">
381
- <mat-error><strong>Other drug is required.</strong></mat-error>
382
- </div>
383
- </div>
384
- <br>
385
- <br>
386
-
387
- <div>
388
- <div>
389
- <mat-label>
390
- Access Risk: 1 thru 10 (10 greatest risk): &nbsp;<b> {{editVictim.accessRisk}}</b>
391
- </mat-label>
392
- </div>
393
- <div>
394
-
395
- <mat-slider
396
- formControlName="accessRisk"
397
- thumbLabel="true"
398
- [displayWith]="formatLabel"
399
- min="1"
400
- max="10"
401
- [(ngModel)]="editVictim.accessRisk"
402
- ><input matSliderThumb /></mat-slider>
403
-
404
- </div>
405
-
406
- </div>
407
-
408
- </mat-card>
409
-
410
-
411
- <br><br><br>
412
- </mat-tab>
413
-
414
- <mat-tab *ngIf="guardianTabFlag" label="Legal Guardian">
415
- <div class='container'>
416
- <mat-form-field>
417
- <mat-label>Guardian Last Name:</mat-label>
418
- <input matInput formControlName="guardianLastName" [(ngModel)]="editVictim.guardianLastName" >
419
- <div class="help-block" *ngIf="victimForm.get('guardianLastName').errors ">
420
- <mat-error>Guardian last name is <strong>required</strong></mat-error>
421
- </div>
422
- </mat-form-field>
423
-
424
- <mat-form-field>
425
- <mat-label>Guardian First Name:</mat-label>
426
- <input matInput formControlName="guardianFirstName" [(ngModel)]="editVictim.guardianFirstName" >
427
- <div class="help-block" *ngIf="victimForm.get('guardianFirstName').errors ">
428
- <mat-error>Guardian first name is <strong>required</strong></mat-error>
429
- </div>
430
-
431
- </mat-form-field>
432
-
433
- <mat-form-field>
434
- <mat-label>Guardian Prefix:</mat-label>
435
- <mat-select formControlName="guardianPrefixId" [(ngModel)]="editVictim.guardianPrefixId" >
436
- <mat-option *ngFor="let item of prefixes" [value]="item.prefixId">{{item.name}}</mat-option>
437
- </mat-select>
438
- </mat-form-field>
439
-
440
- <mat-form-field>
441
- <mat-label>Guardian Suffix:</mat-label>
442
- <mat-select formControlName="guardianSuffixId" [(ngModel)]="editVictim.guardianSuffixId" >
443
- <mat-option *ngFor="let item of suffixes" [value]="item.suffixId">{{item.name}}</mat-option>
444
- </mat-select>
445
- </mat-form-field>
446
-
447
-
448
- <!-- <mat-form-field>
449
- <mat-select placeholder="Choose" formControlName="guardianGender" [(ngModel)]="editVictim.guardianGender">
450
- <mat-option *ngFor="let item of genders" [value]="item.genderCode">{{item.name}}</mat-option>
451
- </mat-select>
452
- </mat-form-field> -->
453
-
454
-
455
- <mat-form-field>
456
- <mat-label>Date of Birth:</mat-label>
457
- <input matInput
458
- [matDatepicker]="guardianDateRef"
459
- formControlName="guardianBirthDate"
460
- [(ngModel)]="editVictim.guardianBirthDate"
461
- (click)="guardianDateRef.open()"
462
- >
463
- <mat-datepicker-toggle [for]="guardianDateRef" matSuffix></mat-datepicker-toggle>
464
- <mat-datepicker #guardianDateRef></mat-datepicker>
465
- </mat-form-field>
466
-
467
- <div></div>
468
- <mat-form-field >
469
- <mat-checkbox
470
- color = "primary"
471
- formControlName="guardianNoPhoneFlag">
472
- No Phone (If there is no phone, the phone fields are no longer required)</mat-checkbox>
473
- <input matInput placeholder="" style="display: none;">
474
- </mat-form-field>
475
-
476
-
477
- <div></div>
478
- <mat-card>
479
- <mat-form-field >
480
- <mat-label>Guardian Home Phone:</mat-label>
481
- <input
482
- id="tel"
483
- matInput
484
- phoneMask
485
- [preValue]="editVictim.guardianHomePhone"
486
- [phoneControl]="guardianHomePhoneControl"
487
- [formControl]="guardianHomePhoneControl"
488
- maxlength="14"/>
489
-
490
- <div class="help-block" *ngIf="victimForm.get('guardianHomePhone').errors
491
- && (victimForm.get('guardianHomePhone').dirty || victimForm.get('guardianHomePhone').touched)">
492
- <mat-error><strong>Guardian home phone number format is not correct.</strong></mat-error>
493
- </div>
494
-
495
-
496
- </mat-form-field>
497
-
498
- <mat-form-field >
499
- <mat-label>Guardian Cell Phone:</mat-label>
500
- <input
501
- id="tel4"
502
- matInput
503
- phoneMask
504
- [preValue]="editVictim.guardianCellPhone"
505
- [phoneControl]="guardianCellPhoneControl"
506
- [formControl]="guardianCellPhoneControl"
507
- maxlength="14"/>
508
-
509
- <div class="help-block" *ngIf="victimForm.get('guardianCellPhone').errors
510
- && (victimForm.get('guardianCellPhone').dirty || victimForm.get('guardianCellPhone').touched)">
511
- <mat-error><strong>Guardian Cell phone number format is not correct.</strong></mat-error>
512
- </div>
513
- </mat-form-field>
514
-
515
- <mat-form-field >
516
- <mat-label>Guardian Work Phone:</mat-label>
517
-
518
- <input
519
- id="tel5"
520
- matInput
521
- phoneMask
522
- [preValue]="editVictim.guardianWorkPhone"
523
- [phoneControl]="guardianWorkPhoneControl"
524
- [formControl]="guardianWorkPhoneControl"
525
- maxlength="14"/>
526
-
527
- <div class="help-block" *ngIf="victimForm.get('guardianWorkPhone').errors
528
- && (victimForm.get('guardianWorkPhone').dirty || victimForm.get('guardianWorkPhone').touched)">
529
- <mat-error><strong>Guardian work phone number format is not correct.</strong></mat-error>
530
- </div>
531
-
532
-
533
- </mat-form-field>
534
- </mat-card>
535
-
536
- <div></div>
537
-
538
- <mat-form-field>
539
- <mat-label>Guardian Email:</mat-label>
540
- <input matInput formControlName="guardianEmail" [(ngModel)]="editVictim.guardianEmail" >
541
- <div class="help-block" *ngIf="victimForm.get('guardianEmail').errors
542
- && (victimForm.get('guardianEmail').dirty || victimForm.get('guardianEmail').touched)">
543
- <mat-error><strong>Guardian email format is not correct.</strong></mat-error>
544
- </div>
545
- </mat-form-field>
546
-
547
- <div></div>
548
-
549
- <div>
550
- <app-smart-address
551
-
552
- [showPsa]="true"
553
- [modifiedBy]="staffId"
554
- [id]="guardianAddressId"
555
- (addressIdChange)="onGuardianAddressChange($event)"
556
- [outline]="true"
557
- readonly="false"
558
- [rowHeight]="80"
559
- (isValid)="false"
560
- [addressValidators]="addressValidators"
561
- #guardianAddressComponent
562
- >
563
- </app-smart-address>
564
- </div>
565
- </div>
566
-
567
- <br><br><br>
568
- </mat-tab>
569
-
570
- <!--advocate-->
571
-
572
- <mat-tab *ngIf="advocateTabFlag" label="Advocate" >
573
- <div class='container'>
574
-
575
- <mat-form-field>
576
- <mat-label>Advocate Last Name:</mat-label>
577
- <input matInput formControlName="advocateLastName" [(ngModel)]="editVictim.advocateLastName" >
578
- <div class="help-block" *ngIf="victimForm.get('advocateLastName').errors ">
579
- <mat-error>Advocate last name is <strong>required</strong></mat-error>
580
- </div>
581
- </mat-form-field>
582
-
583
- <mat-form-field>
584
- <mat-label>Advocate First Name:</mat-label>
585
- <input matInput formControlName="advocateFirstName" [(ngModel)]="editVictim.advocateFirstName" >
586
- <div class="help-block" *ngIf="victimForm.get('advocateFirstName').errors ">
587
- <mat-error>Advocate first name is <strong>required</strong></mat-error>
588
- </div>
589
- </mat-form-field>
590
-
591
- <mat-form-field>
592
- <mat-label>Advocate Prefix:</mat-label>
593
- <mat-select formControlName="advocatePrefixId" [(ngModel)]="editVictim.advocatePrefixId" >
594
- <mat-option *ngFor="let item of prefixes" [value]="item.prefixId">{{item.name}}</mat-option>
595
- </mat-select>
596
- </mat-form-field>
597
-
598
- <mat-form-field>
599
- <mat-label>Advocate Suffix:</mat-label>
600
- <mat-select formControlName="advocateSuffixId" [(ngModel)]="editVictim.advocateSuffixId" >
601
- <mat-option *ngFor="let item of suffixes" [value]="item.suffixId">{{item.name}}</mat-option>
602
- </mat-select>
603
- </mat-form-field>
604
-
605
-
606
- <mat-form-field>
607
- <mat-checkbox
608
- color = "primary"
609
- formControlName="advocateNoPhoneFlag"
610
-
611
- [(ngModel)]="editVictim.advocateNoPhoneFlag" >
612
- No Phone (If there is no phone, the phone fields are no longer required)</mat-checkbox>
613
- <input matInput placeholder="" style="display: none;">
614
- </mat-form-field>
615
-
616
- <div></div>
617
- <mat-card>
618
- <mat-form-field >
619
- <mat-label>Advocate Home Phone:</mat-label>
620
- <input
621
- id="tel"
622
- matInput
623
- phoneMask
624
- [preValue]="editVictim.advocateHomePhone"
625
- [phoneControl]="advocateHomePhoneControl"
626
- [formControl]="advocateHomePhoneControl"
627
- maxlength="14"/>
628
-
629
-
630
- <div class="help-block" *ngIf="victimForm.get('advocateHomePhone').errors
631
- && (victimForm.get('advocateHomePhone').dirty || victimForm.get('advocateHomePhone').touched)">
632
- <mat-error><strong>Advocate home number format is not correct.</strong></mat-error>
633
- </div>
634
-
635
- </mat-form-field>
636
-
637
- <mat-form-field>
638
- <mat-label>Advocate Cell Phone:</mat-label>
639
- <input
640
- id="tel7"
641
- matInput
642
- phoneMask
643
- [preValue]="editVictim.advocateCellPhone"
644
- [phoneControl]="advocateCellPhoneControl"
645
- [formControl]="advocateCellPhoneControl"
646
- maxlength="14"/>
647
-
648
- <div class="help-block" *ngIf="victimForm.get('advocateCellPhone').errors
649
- && (victimForm.get('advocateCellPhone').dirty || victimForm.get('advocateCellPhone').touched)">
650
- <mat-error><strong>Advocate cell number format is not correct.</strong></mat-error>
651
- </div>
652
-
653
-
654
- </mat-form-field>
655
-
656
- <mat-form-field>
657
- <mat-label>Advocate Work Phone:</mat-label>
658
- <input
659
- id="tel8"
660
- matInput
661
- phoneMask
662
- [preValue]="editVictim.advocateWorkPhone"
663
- [phoneControl]="advocateWorkPhoneControl"
664
- [formControl]="advocateWorkPhoneControl"
665
- maxlength="14"/>
666
-
667
-
668
- <div class="help-block" *ngIf="victimForm.get('advocateWorkPhone').errors
669
- && (victimForm.get('advocateWorkPhone').dirty || victimForm.get('advocateWorkPhone').touched)">
670
- <mat-error><strong>Advocate work number format is not correct.</strong></mat-error>
671
- </div>
672
-
673
- </mat-form-field>
674
- </mat-card>
675
-
676
- <div></div>
677
-
678
- <mat-form-field>
679
- <mat-label>Advocate Email:</mat-label>
680
- <input matInput formControlName="advocateEmail" [(ngModel)]="editVictim.advocateEmail" >
681
- <div class="help-block" *ngIf="victimForm.get('advocateEmail').errors
682
- && (victimForm.get('advocateEmail').dirty || victimForm.get('advocateEmail').touched)">
683
- <mat-error><strong>Advocate email format is not correct.</strong></mat-error>
684
- </div>
685
- </mat-form-field>
686
-
687
- <div></div>
688
-
689
-
690
- <div >
691
- <app-smart-address
692
- [showPsa]="true"
693
- [modifiedBy]="staffId"
694
- [id]="advocateAddressId"
695
- (addressIdChange)="onAdvocateAddressChange($event)"
696
- [outline]="true"
697
- readonly="false"
698
- [rowHeight]="80"
699
- (isValid)="false"
700
- [addressValidators]="addressValidators"
701
- #advocateAddressComponent >
702
- </app-smart-address>
703
- </div>
704
- </div>
705
- <br><br><br>
706
- </mat-tab>
707
-
708
-
709
- <mat-tab label="Emergency Contact">
710
- <div class='container'>
711
-
712
- <mat-form-field>
713
- <mat-label>Emergency Contact Name:</mat-label>
714
- <input matInput formControlName="emergencyContact" [(ngModel)]="editVictim.emergencyContact" >
715
- </mat-form-field>
716
-
717
- <mat-form-field>
718
- <mat-label>Emergency Phone Number:</mat-label>
719
-
720
- <input
721
- id="tel"
722
- matInput
723
- phoneMask
724
- [preValue]="editVictim.emergencyContactPhone"
725
- [phoneControl]="emergencyContactPhoneControl"
726
- [formControl]="emergencyContactPhoneControl"
727
- maxlength="14"/>
728
-
729
- <div class="help-block" *ngIf="victimForm.get('emergencyContactPhone').errors
730
- && (victimForm.get('emergencyContactPhone').dirty || victimForm.get('emergencyContactPhone').touched)">
731
- <mat-error><strong>Emergency contact number format is not correct.</strong></mat-error>
732
- </div>
733
- </mat-form-field>
734
-
735
- </div>
736
- <br><br><br>
737
- </mat-tab>
738
-
739
- </mat-tab-group>
740
- <div class='outer'>
741
- <div>
742
- All buttons apply to all tabs. If save button is grey, please check each tab to make sure the required field is filled.<br><br>
743
-
744
- <div class="help-block" *ngIf="victimForm.get('minorFlag').errors
745
- && (victimForm.get('minorFlag').dirty || victimForm.get('minorFlag').touched)">
746
- <mat-error>If victim a minor field is <strong>required</strong></mat-error>
747
- </div>
748
-
749
- <div class="help-block" *ngIf="victimForm.get('victimAdvocateFlag').errors
750
- && (victimForm.get('victimAdvocateFlag').dirty || victimForm.get('victimAdvocateFlag').touched)">
751
- <mat-error>If victim has advocate field is <strong>required</strong></mat-error>
752
- </div>
753
-
754
- <div class="help-block" *ngIf="victimForm.get('underSupervisionFlag').errors
755
- && (victimForm.get('underSupervisionFlag').dirty || victimForm.get('underSupervisionFlag').touched)">
756
- <mat-error>Under supervision field is <strong>required</strong></mat-error>
757
- </div>
758
-
759
- <div class="help-block" *ngIf="victimForm.get('victimRelationships').errors
760
- && (victimForm.get('victimRelationships').dirty || victimForm.get('victimRelationships').touched)">
761
- <mat-error>Relationship is <strong>required</strong></mat-error>
762
- </div>
763
-
764
- <div class="help-block" *ngIf="victimForm.get('lastName').errors
765
- && (victimForm.get('lastName').dirty || victimForm.get('lastName').touched)">
766
- <mat-error>Victim last name is <strong>required</strong></mat-error>
767
- </div>
768
-
769
- <div class="help-block" *ngIf="victimForm.get('firstName').errors
770
- && (victimForm.get('firstName').dirty || victimForm.get('firstName').touched)">
771
- <mat-error>victim first name is <strong>required</strong></mat-error>
772
- </div>
773
-
774
- <div class="help-block" *ngIf="victimForm.get('guardianFirstName').errors
775
- && (victimForm.get('guardianFirstName').dirty || victimForm.get('guardianFirstName').touched)">
776
- <mat-error>Guardian first name is <strong>required</strong></mat-error>
777
- </div>
778
-
779
- <div class="help-block" *ngIf="victimForm.get('guardianLastName').errors
780
- && (victimForm.get('guardianLastName').dirty || victimForm.get('guardianLastName').touched)" >
781
- <mat-error>Guardian last name is <strong>required</strong></mat-error>
782
- </div>
783
-
784
- <div class="help-block" *ngIf="victimForm.get('advocateLastName').errors
785
- && (victimForm.get('advocateLastName').dirty || victimForm.get('advocateLastName').touched)" >
786
- <mat-error>Advocate last name is <strong>required</strong></mat-error>
787
- </div>
788
-
789
- <div class="help-block" *ngIf="victimForm.get('advocateFirstName').errors
790
- && (victimForm.get('advocateFirstName').dirty || victimForm.get('advocateFirstName').touched)">
791
- <mat-error>Advocate first name is <strong>required</strong></mat-error>
792
- </div>
793
-
794
-
795
- <div class="help-block" *ngIf="victimForm.get('otherWeapon').errors
796
- && (victimForm.get('otherWeapon').dirty || victimForm.get('otherWeapon').touched)">
797
- <mat-error>Other weapon field is <strong>required</strong></mat-error>
798
- </div>
799
-
800
- <div class="help-block" *ngIf="victimForm.get('otherDrug').errors
801
- && (victimForm.get('otherDrug').dirty || victimForm.get('otherDrug').touched)">
802
- <mat-error>Other drug field is <strong>required</strong></mat-error>
803
- </div>
804
-
805
-
806
- </div>
807
-
808
- <div class="inner">
809
- <button mat-stroked-button color="primary" (click)="saveVictim()" [disabled]="!victimForm.valid" >Save </button>
810
- </div>
811
- &nbsp;&nbsp;
812
- <div *ngIf="showDelete" class="inner">
813
- <button mat-stroked-button color="primary" (click)="deleteVictim()">Delete </button>
814
- </div>
815
- &nbsp;&nbsp;
816
- <div class="inner">
817
- <button mat-stroked-button color="primary" (click)="cancel()">Clear </button>
818
- </div>
819
- &nbsp;&nbsp;
820
- <button mat-stroked-button color="primary" (click)="back()">Back</button>
821
-
822
- </div>
823
-
824
- </div>
825
- <br>
826
- <br>
827
-
828
- <div align="right">
829
- <button mat-stroked-button color="primary" (click)="addContact()" >Add victim contact</button>
830
- </div>
831
-
832
- <div>
833
-
834
- <mat-table #table [dataSource]="contactDataSource" class="example-table">
835
- <ng-container matColumnDef="contactDate">
836
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Contact Date</mat-header-cell>
837
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.contactDate | date}} </mat-cell>
838
- </ng-container>
839
-
840
-
841
- <ng-container matColumnDef="victimContactMethod">
842
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Contact Method</mat-header-cell>
843
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.victimContactMethod}} </mat-cell>
844
- </ng-container>
845
-
846
- <ng-container matColumnDef="nextContactDate">
847
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Next Contact Date</mat-header-cell>
848
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.nextContactDate | date}} </mat-cell>
849
- </ng-container>
850
-
851
-
852
- <ng-container matColumnDef="staff">
853
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Contact By</mat-header-cell>
854
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.staff}} </mat-cell>
855
- </ng-container>
856
- <ng-container matColumnDef="comment">
857
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Comment</mat-header-cell>
858
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.comment}} </mat-cell>
859
- </ng-container>
860
-
861
- <ng-container matColumnDef="contactId">
862
- <mat-header-cell *matHeaderCellDef class="example-header-cell"></mat-header-cell>
863
- <mat-cell *matCellDef="let row" class="example-cell">
864
-
865
- </mat-cell>
866
- </ng-container>
867
-
868
- <mat-header-row *matHeaderRowDef="['contactDate', 'victimContactMethod','nextContactDate', 'staff', 'comment', 'contactId']" class="example-header-row"></mat-header-row>
869
- <mat-row *matRowDef="let row; columns:['contactDate', 'victimContactMethod','nextContactDate', 'staff', 'comment', 'contactId'];" class="example-row"></mat-row>
870
- </mat-table>
871
-
872
-
873
- </div>
874
-
875
- </mat-card-content>
876
- </mat-card>