@csmart/ngc-smart-victim 1.18.7 → 1.18.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/karma.conf.js +32 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +6 -22
  4. package/src/lib/caseNote/caseNote.component.css +22 -0
  5. package/src/lib/caseNote/caseNote.component.html +188 -0
  6. package/src/lib/caseNote/caseNote.component.ts +265 -0
  7. package/src/lib/common-dialog/common-dialog.component.css +10 -0
  8. package/src/lib/common-dialog/common-dialog.component.html +23 -0
  9. package/src/lib/common-dialog/common-dialog.component.spec.ts +25 -0
  10. package/src/lib/common-dialog/common-dialog.component.ts +21 -0
  11. package/src/lib/common-dialog/common-dialog.module.ts +22 -0
  12. package/src/lib/common-dialog/common-dialog.service.ts +35 -0
  13. package/src/lib/contact/contact.component.css +22 -0
  14. package/src/lib/contact/contact.component.html +124 -0
  15. package/src/lib/contact/contact.component.ts +176 -0
  16. package/src/lib/email-notification.service.ts +42 -0
  17. package/src/lib/email.services.ts +51 -0
  18. package/src/lib/http.service.ts +34 -0
  19. package/src/lib/intake.service.ts +82 -0
  20. package/src/lib/loader.service.ts +11 -0
  21. package/src/lib/safetyPlan/serviceProvider.component.ts +94 -0
  22. package/src/lib/safetyPlan/victimSafetyPlan.component.css +27 -0
  23. package/src/lib/safetyPlan/victimSafetyPlan.component.html +85 -0
  24. package/src/lib/safetyPlan/victimSafetyPlan.component.ts +178 -0
  25. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.html +234 -0
  26. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.ts +492 -0
  27. package/src/lib/shared/app.shared.module.ts +111 -0
  28. package/src/lib/shared/validators/date.validator.ts +73 -0
  29. package/src/lib/shared/validators/index.ts +1 -0
  30. package/src/lib/smart-victim-delete-confirm.component.ts +35 -0
  31. package/src/lib/smart-victim-detail/smart-victim-detail.component.css +43 -0
  32. package/src/lib/smart-victim-detail/smart-victim-detail.component.html +869 -0
  33. package/src/lib/smart-victim-detail/smart-victim-detail.component.spec.ts +25 -0
  34. package/src/lib/smart-victim-detail/smart-victim-detail.component.ts +1387 -0
  35. package/src/lib/smart-victim.component.css +245 -0
  36. package/src/lib/smart-victim.component.html +132 -0
  37. package/src/lib/smart-victim.component.spec.ts +25 -0
  38. package/src/lib/smart-victim.component.ts +333 -0
  39. package/src/lib/smart-victim.model.ts +301 -0
  40. package/src/lib/smart-victim.module.ts +110 -0
  41. package/src/lib/smart-victim.service.spec.ts +12 -0
  42. package/src/lib/smart-victim.service.ts +557 -0
  43. package/src/lib/victim-routing.module.ts +35 -0
  44. package/{lib/victimSearch/VictimSearchFilter.d.ts → src/lib/victimSearch/VictimSearchFilter.ts} +9 -7
  45. package/src/lib/victimSearch/victimSearchForm.component.html +35 -0
  46. package/src/lib/victimSearch/victimSearchForm.component.ts +41 -0
  47. package/{public-api.d.ts → src/public-api.ts} +12 -7
  48. package/src/test.ts +16 -0
  49. package/tsconfig.lib.json +36 -0
  50. package/tsconfig.spec.json +17 -0
  51. package/tslint.json +17 -0
  52. package/esm2022/csmart-ngc-smart-victim.mjs +0 -5
  53. package/esm2022/lib/caseNote/caseNote.component.mjs +0 -194
  54. package/esm2022/lib/common-dialog/common-dialog.component.mjs +0 -23
  55. package/esm2022/lib/common-dialog/common-dialog.module.mjs +0 -34
  56. package/esm2022/lib/common-dialog/common-dialog.service.mjs +0 -33
  57. package/esm2022/lib/contact/contact.component.mjs +0 -140
  58. package/esm2022/lib/email.services.mjs +0 -42
  59. package/esm2022/lib/intake.service.mjs +0 -57
  60. package/esm2022/lib/safetyPlan/serviceProvider.component.mjs +0 -99
  61. package/esm2022/lib/safetyPlan/victimSafetyPlan.component.mjs +0 -116
  62. package/esm2022/lib/safetyPlan/victimSafetyPlanDetail.component.mjs +0 -340
  63. package/esm2022/lib/shared/app.shared.module.mjs +0 -215
  64. package/esm2022/lib/shared/validators/date.validator.mjs +0 -59
  65. package/esm2022/lib/shared/validators/index.mjs +0 -2
  66. package/esm2022/lib/smart-victim-delete-confirm.component.mjs +0 -44
  67. package/esm2022/lib/smart-victim-detail/smart-victim-detail.component.mjs +0 -1104
  68. package/esm2022/lib/smart-victim.component.mjs +0 -316
  69. package/esm2022/lib/smart-victim.model.mjs +0 -133
  70. package/esm2022/lib/smart-victim.module.mjs +0 -128
  71. package/esm2022/lib/smart-victim.service.mjs +0 -352
  72. package/esm2022/lib/victim-routing.module.mjs +0 -41
  73. package/esm2022/lib/victimSearch/VictimSearchFilter.mjs +0 -3
  74. package/esm2022/lib/victimSearch/victimSearchForm.component.mjs +0 -38
  75. package/esm2022/public-api.mjs +0 -11
  76. package/fesm2022/csmart-ngc-smart-victim.mjs +0 -3263
  77. package/fesm2022/csmart-ngc-smart-victim.mjs.map +0 -1
  78. package/index.d.ts +0 -5
  79. package/lib/caseNote/caseNote.component.d.ts +0 -51
  80. package/lib/common-dialog/common-dialog.component.d.ts +0 -14
  81. package/lib/common-dialog/common-dialog.module.d.ts +0 -8
  82. package/lib/common-dialog/common-dialog.service.d.ts +0 -11
  83. package/lib/contact/contact.component.d.ts +0 -40
  84. package/lib/email.services.d.ts +0 -11
  85. package/lib/intake.service.d.ts +0 -57
  86. package/lib/safetyPlan/serviceProvider.component.d.ts +0 -19
  87. package/lib/safetyPlan/victimSafetyPlan.component.d.ts +0 -54
  88. package/lib/safetyPlan/victimSafetyPlanDetail.component.d.ts +0 -62
  89. package/lib/shared/app.shared.module.d.ts +0 -33
  90. package/lib/shared/validators/date.validator.d.ts +0 -9
  91. package/lib/shared/validators/index.d.ts +0 -1
  92. package/lib/smart-victim-delete-confirm.component.d.ts +0 -12
  93. package/lib/smart-victim-detail/smart-victim-detail.component.d.ts +0 -129
  94. package/lib/smart-victim.component.d.ts +0 -69
  95. package/lib/smart-victim.model.d.ts +0 -205
  96. package/lib/smart-victim.module.d.ts +0 -49
  97. package/lib/smart-victim.service.d.ts +0 -71
  98. package/lib/victim-routing.module.d.ts +0 -7
  99. package/lib/victimSearch/victimSearchForm.component.d.ts +0 -14
@@ -0,0 +1,245 @@
1
+
2
+ div.services {
3
+ max-width: 500px;
4
+ margin: auto;
5
+ border: 3px solid #73AD21;
6
+ }
7
+
8
+ .rTable {
9
+ display: block;
10
+ width: 100%;
11
+ }
12
+ .rTableHeading, .rTableBody, .rTableFoot, .rTableRow{
13
+ clear: both;
14
+ }
15
+ .rTableHead, .rTableFoot{
16
+ background-color: #DDD;
17
+ font-weight: bold;
18
+ }
19
+ .rTableCell, .rTableHead {
20
+ border: 0px ;
21
+ float: left;
22
+ padding: 1px;
23
+ width: 28%;
24
+ }
25
+ .rTable:after {
26
+ visibility: hidden;
27
+ display: block;
28
+ font-size: 0;
29
+ content: " ";
30
+ clear: both;
31
+ height: 0;
32
+ }
33
+
34
+ .victimSearch{
35
+ display: grid;
36
+ grid-template-columns: 1fr 1fr 1fr;
37
+ grid-column-gap: 10px;
38
+ }
39
+
40
+ .edit-btn{
41
+ margin-right: 4px;
42
+ }
43
+ .main-container{
44
+ display: flex;
45
+ margin-top: 8px;
46
+ flex-direction: column;
47
+ }
48
+
49
+ .add-action{
50
+ display: flex;
51
+ justify-content: flex-end;
52
+ margin-bottom: 8px;
53
+ }
54
+
55
+ .example-headers-align .mat-expansion-panel-header-title,
56
+ .example-headers-align .mat-expansion-panel-header-description {
57
+ flex-basis: 0;
58
+ }
59
+
60
+ .example-headers-align .mat-expansion-panel-header-description {
61
+ justify-content: space-between;
62
+ align-items: center;
63
+ }
64
+
65
+ mat-form-field {
66
+ margin-right: 12px;
67
+ }
68
+
69
+ .actions{
70
+ display: flex;
71
+ justify-content: space-around;
72
+ }
73
+
74
+
75
+ .Row
76
+ {
77
+ display: table;
78
+ width: 100%; /*Optional*/
79
+ table-layout: fixed; /*Optional*/
80
+
81
+ }
82
+ .Column
83
+ {
84
+ display: table-cell;
85
+
86
+ }
87
+
88
+ .sp-form textarea {
89
+ float: left;
90
+ margin-top: 20px;
91
+ margin-bottom: 10px;
92
+ width: 462px;
93
+ height: 70px;
94
+ overflow: auto;
95
+ box-sizing:border-box
96
+
97
+ }
98
+
99
+ .mat-column-lastName {
100
+ word-wrap: break-word !important;
101
+ white-space: unset !important;
102
+ flex: 0 0 15% !important;
103
+ width: 15% !important;
104
+ overflow-wrap: break-word;
105
+ word-wrap: break-word;
106
+
107
+ word-break: break-word;
108
+
109
+ -ms-hyphens: auto;
110
+ -moz-hyphens: auto;
111
+ -webkit-hyphens: auto;
112
+ hyphens: auto;
113
+ }
114
+
115
+ .mat-column-firstName {
116
+ word-wrap: break-word !important;
117
+ white-space: unset !important;
118
+ flex: 0 0 15% !important;
119
+ width: 15% !important;
120
+ overflow-wrap: break-word;
121
+ word-wrap: break-word;
122
+
123
+ word-break: break-word;
124
+
125
+ -ms-hyphens: auto;
126
+ -moz-hyphens: auto;
127
+ -webkit-hyphens: auto;
128
+ hyphens: auto;
129
+ }
130
+
131
+ .mat-column-relationship {
132
+ word-wrap: break-word !important;
133
+ white-space: unset !important;
134
+ flex: 0 0 15% !important;
135
+ width: 15% !important;
136
+ overflow-wrap: break-word;
137
+ word-wrap: break-word;
138
+
139
+ word-break: break-word;
140
+
141
+ -ms-hyphens: auto;
142
+ -moz-hyphens: auto;
143
+ -webkit-hyphens: auto;
144
+ hyphens: auto;
145
+ }
146
+
147
+ .mat-column-homePhone {
148
+ word-wrap: break-word !important;
149
+ white-space: unset !important;
150
+ flex: 0 0 15% !important;
151
+ width: 15% !important;
152
+ overflow-wrap: break-word;
153
+ word-wrap: break-word;
154
+
155
+ word-break: break-word;
156
+
157
+ -ms-hyphens: auto;
158
+ -moz-hyphens: auto;
159
+ -webkit-hyphens: auto;
160
+ hyphens: auto;
161
+ }
162
+
163
+ .mat-column-offenderName {
164
+ word-wrap: break-word !important;
165
+ white-space: unset !important;
166
+ flex: 0 0 15% !important;
167
+ width: 15% !important;
168
+ overflow-wrap: break-word;
169
+ word-wrap: break-word;
170
+
171
+ word-break: break-word;
172
+
173
+ -ms-hyphens: auto;
174
+ -moz-hyphens: auto;
175
+ -webkit-hyphens: auto;
176
+ hyphens: auto;
177
+ }
178
+
179
+ .mat-column-victimId {
180
+ word-wrap: break-word !important;
181
+ white-space: unset !important;
182
+ flex: 0 0 25% !important;
183
+ width: 25% !important;
184
+ overflow-wrap: break-word;
185
+ word-wrap: break-word;
186
+
187
+ word-break: break-word;
188
+
189
+ -ms-hyphens: auto;
190
+ -moz-hyphens: auto;
191
+ -webkit-hyphens: auto;
192
+ hyphens: auto;
193
+ }
194
+
195
+ .smart-card{
196
+ background-color: var(--mdc-elevated-card-container-color);
197
+ border: 1px solid #ccc;
198
+ border-radius: 8px;
199
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
200
+ padding: 16px 0px 16px 2px;
201
+ width: 100%;
202
+ }
203
+
204
+ .smart-card-header{
205
+ display: flex;
206
+ flex-direction: column;
207
+ align-items:start;
208
+ }
209
+
210
+ .smart-label{
211
+ font-size: 16px !important;
212
+ }
213
+
214
+ .smart-card-table{
215
+ margin: 16px 0px;
216
+ }
217
+
218
+ .smart-flex-container {
219
+ display: flex !important;
220
+ justify-content: space-between;
221
+ flex-wrap: wrap;
222
+ }
223
+
224
+ .smart-action-content{
225
+ display: flex;
226
+ justify-content: flex-end;
227
+ margin: 12px;
228
+ }
229
+
230
+ .smart-button{
231
+ margin: 0px 4px;
232
+ }
233
+
234
+ .smart-add-button{
235
+ margin: 0px 4px;
236
+ font-size: 1.25em !important;
237
+ }
238
+
239
+ .material-icons {
240
+ vertical-align: baseline !important;
241
+ }
242
+
243
+ .smart-paginator{
244
+ display: flex !important;
245
+ }
@@ -0,0 +1,132 @@
1
+ <div *ngIf="showSearchForm">
2
+ <app-victim-search-form
3
+ (onSearch)="getVictimList($event)">
4
+ </app-victim-search-form>
5
+ </div>
6
+
7
+ <div *ngIf="showDetail">
8
+ <csmart-victim-detail [victimDetail]="victimDetail"
9
+ [staffId]="staffId"
10
+ [offenderId] ="offenderId"
11
+ [isIntake]="isIntake"
12
+ (onSave)="save($event)"
13
+ (onCancel)="cancel()" >
14
+ </csmart-victim-detail>
15
+ </div>
16
+ <div class="main-container">
17
+ <mat-card id="divVictim" class="smart-card-table">
18
+ <div class="smart-action-content">
19
+ <button mat-stroked-button color="primary"
20
+ accessControl
21
+ [accessControlConfig]="createAccessControlConfig"
22
+ *ngIf="showAdd"
23
+ class="smart-add-button"
24
+ (click)="addRecord()">
25
+ <mat-icon>add</mat-icon>
26
+ Add Victim
27
+ </button>
28
+ <button
29
+ mat-stroked-button
30
+ class="smart-add-button"
31
+ *ngIf="isIntake"
32
+ color="primary"
33
+ accessControl
34
+ [accessControlConfig]="updateAccessControlConfig"
35
+ (click)="saveIntake()">
36
+ Continue
37
+ </button>
38
+ </div>
39
+ <div *ngIf="victimListDataSource.data.length > 0">
40
+ <mat-table #table [dataSource]="victimListDataSource" >
41
+
42
+ <ng-container matColumnDef="lastName">
43
+ <mat-header-cell *matHeaderCellDef>Victim Last Name</mat-header-cell>
44
+ <mat-cell *matCellDef="let row" > {{row.lastName}} </mat-cell>
45
+ </ng-container>
46
+
47
+
48
+ <ng-container matColumnDef="firstName">
49
+ <mat-header-cell *matHeaderCellDef >Victim First Name</mat-header-cell>
50
+ <mat-cell *matCellDef="let row" > {{row.firstName}} </mat-cell>
51
+ </ng-container>
52
+
53
+ <div *ngIf="showRelationshipColumn">
54
+ <ng-container matColumnDef="relationship">
55
+ <mat-header-cell *matHeaderCellDef >Relationship to Offender</mat-header-cell>
56
+ <mat-cell *matCellDef="let row" > {{row.relationship}} </mat-cell>
57
+ </ng-container>
58
+ </div>
59
+
60
+ <div *ngIf="showOffenderPhoneColumn">
61
+ <ng-container matColumnDef="homePhone">
62
+ <mat-header-cell *matHeaderCellDef >Phone Number</mat-header-cell>
63
+ <mat-cell *matCellDef="let row" >
64
+ Home phone: {{formatPhoneNumber(row.homePhone)}}<br>
65
+ Cell Phone: {{formatPhoneNumber(row.cellPhone)}}<br>
66
+ Work Phone: {{formatPhoneNumber(row.workPhone)}}
67
+
68
+ </mat-cell>
69
+ </ng-container>
70
+ </div>
71
+
72
+ <div *ngIf="showOffenderNameColumn">
73
+ <ng-container matColumnDef="offenderName">
74
+ <mat-header-cell *matHeaderCellDef>Offender Name</mat-header-cell>
75
+ <mat-cell *matCellDef="let row" > {{row.offenderName}} </mat-cell>
76
+ </ng-container>
77
+ </div>
78
+
79
+ <ng-container matColumnDef="victimId">
80
+ <mat-header-cell *matHeaderCellDef ></mat-header-cell>
81
+ <mat-cell *matCellDef="let row" >
82
+
83
+ <!-- <div *ngIf="accessByModule">
84
+ <mat-checkbox></mat-checkbox>
85
+ </div> -->
86
+
87
+ <div *ngIf="showEdit">
88
+ <button class="edit-btn" mat-icon-button color="primary" matTooltip="View/Edit Victim"
89
+ accessControl
90
+ [accessControlConfig]="updateAccessControlConfig"
91
+ (click)="editVictimDetail(row)">
92
+ <i class="material-icons">mode_edit</i>
93
+ </button>
94
+ </div>
95
+
96
+
97
+
98
+ &nbsp;&nbsp;
99
+
100
+ <div *ngIf="showCaseNote">
101
+ <button type="button" matTooltip="CaseNote" mat-stroked-button color="primary"
102
+ accessControl
103
+ [accessControlConfig]="updateAccessControlConfig"
104
+ (click)="goToCaseNote(row.victimId)">
105
+ <span class="glyphicon glyphicon-pencil" ></span>&nbsp;Case Note
106
+ </button>
107
+ </div>
108
+ &nbsp;&nbsp;
109
+
110
+ <div *ngIf="showSafetyPlan">
111
+ <button type="button" matTooltip="safety plan" mat-stroked-button color="primary"
112
+ accessControl
113
+ [accessControlConfig]="updateAccessControlConfig"
114
+ (click)="goToSaftyPlan(row.victimId)">
115
+ <span class="glyphicon glyphicon-pencil" ></span>&nbsp;Safety Plan
116
+ </button>
117
+ </div>
118
+ &nbsp;&nbsp;
119
+
120
+ </mat-cell>
121
+ </ng-container>
122
+
123
+ <mat-header-row *matHeaderRowDef="displayedColumns" class="example-header-row"></mat-header-row>
124
+ <mat-row *matRowDef="let row; columns: displayedColumns" class="example-row"></mat-row>
125
+ </mat-table>
126
+ <mat-paginator #paginator [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]"></mat-paginator>
127
+ </div>
128
+ </mat-card>
129
+ <div>
130
+ <b>{{msg}}</b>
131
+ </div>
132
+ </div>
@@ -0,0 +1,25 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { NgcSmartVictimComponent } from './smart-victim.component';
4
+
5
+ describe('NgcSmartVictimComponent', () => {
6
+ let component: NgcSmartVictimComponent;
7
+ let fixture: ComponentFixture<NgcSmartVictimComponent>;
8
+
9
+ beforeEach(async(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [ NgcSmartVictimComponent ]
12
+ })
13
+ .compileComponents();
14
+ }));
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(NgcSmartVictimComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });