@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.
- package/karma.conf.js +32 -0
- package/ng-package.json +7 -0
- package/package.json +6 -22
- package/src/lib/caseNote/caseNote.component.css +22 -0
- package/src/lib/caseNote/caseNote.component.html +188 -0
- package/src/lib/caseNote/caseNote.component.ts +265 -0
- package/src/lib/common-dialog/common-dialog.component.css +10 -0
- package/src/lib/common-dialog/common-dialog.component.html +23 -0
- package/src/lib/common-dialog/common-dialog.component.spec.ts +25 -0
- package/src/lib/common-dialog/common-dialog.component.ts +21 -0
- package/src/lib/common-dialog/common-dialog.module.ts +22 -0
- package/src/lib/common-dialog/common-dialog.service.ts +35 -0
- package/src/lib/contact/contact.component.css +22 -0
- package/src/lib/contact/contact.component.html +124 -0
- package/src/lib/contact/contact.component.ts +176 -0
- package/src/lib/email-notification.service.ts +42 -0
- package/src/lib/email.services.ts +51 -0
- package/src/lib/http.service.ts +34 -0
- package/src/lib/intake.service.ts +82 -0
- package/src/lib/loader.service.ts +11 -0
- package/src/lib/safetyPlan/serviceProvider.component.ts +94 -0
- package/src/lib/safetyPlan/victimSafetyPlan.component.css +27 -0
- package/src/lib/safetyPlan/victimSafetyPlan.component.html +85 -0
- package/src/lib/safetyPlan/victimSafetyPlan.component.ts +178 -0
- package/src/lib/safetyPlan/victimSafetyPlanDetail.component.html +234 -0
- package/src/lib/safetyPlan/victimSafetyPlanDetail.component.ts +492 -0
- package/src/lib/shared/app.shared.module.ts +111 -0
- package/src/lib/shared/validators/date.validator.ts +73 -0
- package/src/lib/shared/validators/index.ts +1 -0
- package/src/lib/smart-victim-delete-confirm.component.ts +35 -0
- package/src/lib/smart-victim-detail/smart-victim-detail.component.css +43 -0
- package/src/lib/smart-victim-detail/smart-victim-detail.component.html +869 -0
- package/src/lib/smart-victim-detail/smart-victim-detail.component.spec.ts +25 -0
- package/src/lib/smart-victim-detail/smart-victim-detail.component.ts +1387 -0
- package/src/lib/smart-victim.component.css +245 -0
- package/src/lib/smart-victim.component.html +132 -0
- package/src/lib/smart-victim.component.spec.ts +25 -0
- package/src/lib/smart-victim.component.ts +333 -0
- package/src/lib/smart-victim.model.ts +301 -0
- package/src/lib/smart-victim.module.ts +110 -0
- package/src/lib/smart-victim.service.spec.ts +12 -0
- package/src/lib/smart-victim.service.ts +557 -0
- package/src/lib/victim-routing.module.ts +35 -0
- package/{lib/victimSearch/VictimSearchFilter.d.ts → src/lib/victimSearch/VictimSearchFilter.ts} +9 -7
- package/src/lib/victimSearch/victimSearchForm.component.html +35 -0
- package/src/lib/victimSearch/victimSearchForm.component.ts +41 -0
- package/{public-api.d.ts → src/public-api.ts} +12 -7
- package/src/test.ts +16 -0
- package/tsconfig.lib.json +36 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/esm2022/csmart-ngc-smart-victim.mjs +0 -5
- package/esm2022/lib/caseNote/caseNote.component.mjs +0 -194
- package/esm2022/lib/common-dialog/common-dialog.component.mjs +0 -23
- package/esm2022/lib/common-dialog/common-dialog.module.mjs +0 -34
- package/esm2022/lib/common-dialog/common-dialog.service.mjs +0 -33
- package/esm2022/lib/contact/contact.component.mjs +0 -140
- package/esm2022/lib/email.services.mjs +0 -42
- package/esm2022/lib/intake.service.mjs +0 -57
- package/esm2022/lib/safetyPlan/serviceProvider.component.mjs +0 -99
- package/esm2022/lib/safetyPlan/victimSafetyPlan.component.mjs +0 -116
- package/esm2022/lib/safetyPlan/victimSafetyPlanDetail.component.mjs +0 -340
- package/esm2022/lib/shared/app.shared.module.mjs +0 -215
- package/esm2022/lib/shared/validators/date.validator.mjs +0 -59
- package/esm2022/lib/shared/validators/index.mjs +0 -2
- package/esm2022/lib/smart-victim-delete-confirm.component.mjs +0 -44
- package/esm2022/lib/smart-victim-detail/smart-victim-detail.component.mjs +0 -1104
- package/esm2022/lib/smart-victim.component.mjs +0 -316
- package/esm2022/lib/smart-victim.model.mjs +0 -133
- package/esm2022/lib/smart-victim.module.mjs +0 -128
- package/esm2022/lib/smart-victim.service.mjs +0 -352
- package/esm2022/lib/victim-routing.module.mjs +0 -41
- package/esm2022/lib/victimSearch/VictimSearchFilter.mjs +0 -3
- package/esm2022/lib/victimSearch/victimSearchForm.component.mjs +0 -38
- package/esm2022/public-api.mjs +0 -11
- package/fesm2022/csmart-ngc-smart-victim.mjs +0 -3263
- package/fesm2022/csmart-ngc-smart-victim.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/caseNote/caseNote.component.d.ts +0 -51
- package/lib/common-dialog/common-dialog.component.d.ts +0 -14
- package/lib/common-dialog/common-dialog.module.d.ts +0 -8
- package/lib/common-dialog/common-dialog.service.d.ts +0 -11
- package/lib/contact/contact.component.d.ts +0 -40
- package/lib/email.services.d.ts +0 -11
- package/lib/intake.service.d.ts +0 -57
- package/lib/safetyPlan/serviceProvider.component.d.ts +0 -19
- package/lib/safetyPlan/victimSafetyPlan.component.d.ts +0 -54
- package/lib/safetyPlan/victimSafetyPlanDetail.component.d.ts +0 -62
- package/lib/shared/app.shared.module.d.ts +0 -33
- package/lib/shared/validators/date.validator.d.ts +0 -9
- package/lib/shared/validators/index.d.ts +0 -1
- package/lib/smart-victim-delete-confirm.component.d.ts +0 -12
- package/lib/smart-victim-detail/smart-victim-detail.component.d.ts +0 -129
- package/lib/smart-victim.component.d.ts +0 -69
- package/lib/smart-victim.model.d.ts +0 -205
- package/lib/smart-victim.module.d.ts +0 -49
- package/lib/smart-victim.service.d.ts +0 -71
- package/lib/victim-routing.module.d.ts +0 -7
- 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
|
+
|
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> Case Note
|
106
|
+
</button>
|
107
|
+
</div>
|
108
|
+
|
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> Safety Plan
|
116
|
+
</button>
|
117
|
+
</div>
|
118
|
+
|
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
|
+
});
|