@csmart/ngc-smart-victim 0.1.5 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. package/karma.conf.js +32 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +13 -26
  4. package/src/lib/caseNote/caseNote.component.css +20 -0
  5. package/src/lib/caseNote/caseNote.component.html +188 -0
  6. package/src/lib/caseNote/caseNote.component.ts +248 -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 +25 -0
  12. package/src/lib/common-dialog/common-dialog.service.ts +35 -0
  13. package/src/lib/contact/contact.component.css +20 -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/intake.service.ts +82 -0
  17. package/src/lib/safetyPlan/serviceProvider.component.ts +94 -0
  18. package/src/lib/safetyPlan/victimSafetyPlan.component.css +27 -0
  19. package/src/lib/safetyPlan/victimSafetyPlan.component.html +85 -0
  20. package/src/lib/safetyPlan/victimSafetyPlan.component.ts +178 -0
  21. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.html +234 -0
  22. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.ts +492 -0
  23. package/src/lib/shared/app.shared.module.ts +118 -0
  24. package/src/lib/shared/directives/phone-mask.directive.ts +41 -0
  25. package/src/lib/shared/validators/date.validator.ts +73 -0
  26. package/src/lib/shared/validators/index.ts +1 -0
  27. package/src/lib/smart-victim-delete-confirm.component.ts +35 -0
  28. package/src/lib/smart-victim-detail/smart-victim-detail.component.css +43 -0
  29. package/src/lib/smart-victim-detail/smart-victim-detail.component.html +860 -0
  30. package/src/lib/smart-victim-detail/smart-victim-detail.component.spec.ts +25 -0
  31. package/src/lib/smart-victim-detail/smart-victim-detail.component.ts +1241 -0
  32. package/src/lib/smart-victim.component.css +192 -0
  33. package/src/lib/smart-victim.component.html +133 -0
  34. package/src/lib/smart-victim.component.spec.ts +25 -0
  35. package/src/lib/smart-victim.component.ts +323 -0
  36. package/src/lib/smart-victim.model.ts +301 -0
  37. package/src/lib/smart-victim.module.ts +116 -0
  38. package/src/lib/smart-victim.service.spec.ts +12 -0
  39. package/src/lib/smart-victim.service.ts +563 -0
  40. package/src/lib/victim-routing.module.ts +34 -0
  41. package/{lib/victimSearch/VictimSearchFilter.d.ts → src/lib/victimSearch/VictimSearchFilter.ts} +4 -2
  42. package/src/lib/victimSearch/victimSearchForm.component.html +35 -0
  43. package/src/lib/victimSearch/victimSearchForm.component.ts +41 -0
  44. package/src/public-api.ts +12 -0
  45. package/src/test.ts +22 -0
  46. package/tsconfig.lib.json +37 -0
  47. package/tsconfig.spec.json +17 -0
  48. package/tslint.json +17 -0
  49. package/bundles/csmart-ngc-smart-victim.umd.js +0 -6426
  50. package/bundles/csmart-ngc-smart-victim.umd.js.map +0 -1
  51. package/bundles/csmart-ngc-smart-victim.umd.min.js +0 -16
  52. package/bundles/csmart-ngc-smart-victim.umd.min.js.map +0 -1
  53. package/csmart-ngc-smart-victim.d.ts +0 -19
  54. package/csmart-ngc-smart-victim.metadata.json +0 -1
  55. package/esm2015/csmart-ngc-smart-victim.js +0 -25
  56. package/esm2015/lib/caseNote/caseNote.component.js +0 -349
  57. package/esm2015/lib/common-dialog/common-dialog.component.js +0 -46
  58. package/esm2015/lib/common-dialog/common-dialog.module.js +0 -32
  59. package/esm2015/lib/common-dialog/common-dialog.service.js +0 -63
  60. package/esm2015/lib/contact/contact.component.js +0 -228
  61. package/esm2015/lib/intake.service.js +0 -183
  62. package/esm2015/lib/safetyPlan/serviceProvider.component.js +0 -130
  63. package/esm2015/lib/safetyPlan/victimSafetyPlan.component.js +0 -257
  64. package/esm2015/lib/safetyPlan/victimSafetyPlanDetail.component.js +0 -556
  65. package/esm2015/lib/shared/app.shared.module.js +0 -81
  66. package/esm2015/lib/shared/directives/phone-mask.directive.js +0 -168
  67. package/esm2015/lib/shared/validators/date.validator.js +0 -108
  68. package/esm2015/lib/shared/validators/index.js +0 -7
  69. package/esm2015/lib/smart-victim-delete-confirm.component.js +0 -61
  70. package/esm2015/lib/smart-victim-detail/smart-victim-detail.component.js +0 -1405
  71. package/esm2015/lib/smart-victim.component.js +0 -476
  72. package/esm2015/lib/smart-victim.model.js +0 -631
  73. package/esm2015/lib/smart-victim.module.js +0 -84
  74. package/esm2015/lib/smart-victim.service.js +0 -792
  75. package/esm2015/lib/victim-routing.module.js +0 -40
  76. package/esm2015/lib/victimSearch/VictimSearchFilter.js +0 -20
  77. package/esm2015/lib/victimSearch/victimSearchForm.component.js +0 -59
  78. package/esm2015/public-api.js +0 -13
  79. package/esm5/csmart-ngc-smart-victim.js +0 -25
  80. package/esm5/lib/caseNote/caseNote.component.js +0 -372
  81. package/esm5/lib/common-dialog/common-dialog.component.js +0 -48
  82. package/esm5/lib/common-dialog/common-dialog.module.js +0 -36
  83. package/esm5/lib/common-dialog/common-dialog.service.js +0 -75
  84. package/esm5/lib/contact/contact.component.js +0 -281
  85. package/esm5/lib/intake.service.js +0 -194
  86. package/esm5/lib/safetyPlan/serviceProvider.component.js +0 -99
  87. package/esm5/lib/safetyPlan/victimSafetyPlan.component.js +0 -306
  88. package/esm5/lib/safetyPlan/victimSafetyPlanDetail.component.js +0 -628
  89. package/esm5/lib/shared/app.shared.module.js +0 -85
  90. package/esm5/lib/shared/directives/phone-mask.directive.js +0 -184
  91. package/esm5/lib/shared/validators/date.validator.js +0 -108
  92. package/esm5/lib/shared/validators/index.js +0 -7
  93. package/esm5/lib/smart-victim-delete-confirm.component.js +0 -51
  94. package/esm5/lib/smart-victim-detail/smart-victim-detail.component.js +0 -1497
  95. package/esm5/lib/smart-victim.component.js +0 -528
  96. package/esm5/lib/smart-victim.model.js +0 -541
  97. package/esm5/lib/smart-victim.module.js +0 -84
  98. package/esm5/lib/smart-victim.service.js +0 -1063
  99. package/esm5/lib/victim-routing.module.js +0 -44
  100. package/esm5/lib/victimSearch/VictimSearchFilter.js +0 -24
  101. package/esm5/lib/victimSearch/victimSearchForm.component.js +0 -70
  102. package/esm5/public-api.js +0 -13
  103. package/fesm2015/csmart-ngc-smart-victim.js +0 -5682
  104. package/fesm2015/csmart-ngc-smart-victim.js.map +0 -1
  105. package/fesm5/csmart-ngc-smart-victim.js +0 -6203
  106. package/fesm5/csmart-ngc-smart-victim.js.map +0 -1
  107. package/lib/caseNote/caseNote.component.d.ts +0 -45
  108. package/lib/common-dialog/common-dialog.component.d.ts +0 -11
  109. package/lib/common-dialog/common-dialog.module.d.ts +0 -2
  110. package/lib/common-dialog/common-dialog.service.d.ts +0 -8
  111. package/lib/contact/contact.component.d.ts +0 -37
  112. package/lib/intake.service.d.ts +0 -54
  113. package/lib/safetyPlan/serviceProvider.component.d.ts +0 -16
  114. package/lib/safetyPlan/victimSafetyPlan.component.d.ts +0 -49
  115. package/lib/safetyPlan/victimSafetyPlanDetail.component.d.ts +0 -57
  116. package/lib/shared/app.shared.module.d.ts +0 -2
  117. package/lib/shared/directives/phone-mask.directive.d.ts +0 -14
  118. package/lib/shared/validators/date.validator.d.ts +0 -9
  119. package/lib/shared/validators/index.d.ts +0 -1
  120. package/lib/smart-victim-delete-confirm.component.d.ts +0 -9
  121. package/lib/smart-victim-detail/smart-victim-detail.component.d.ts +0 -109
  122. package/lib/smart-victim.component.d.ts +0 -63
  123. package/lib/smart-victim.model.d.ts +0 -204
  124. package/lib/smart-victim.module.d.ts +0 -2
  125. package/lib/smart-victim.service.d.ts +0 -67
  126. package/lib/victim-routing.module.d.ts +0 -2
  127. package/lib/victimSearch/victimSearchForm.component.d.ts +0 -11
  128. package/public-api.d.ts +0 -4
@@ -0,0 +1,301 @@
1
+ import { InjectionToken } from '@angular/core';
2
+
3
+
4
+ export const SMART_OFFENDER_SERVICE_URL = new InjectionToken<string>('smart offender service url');
5
+ export const SMART_LOOKUP_SERVICE_URL = new InjectionToken<string>('smart lookup service url');
6
+ export const SMART_VICTIM_SERVICE_URL = new InjectionToken<string>('smart victim service url');
7
+ export const SMART_WARRANT_URL = new InjectionToken<string>('smart warrant web url');
8
+
9
+
10
+ export interface ElementsVictim {
11
+ victimId: string;
12
+ victimType: string;
13
+ victimProvider: string;
14
+ victimPolicyHolder: string;
15
+ startDate: string;
16
+ endDate: string;
17
+ isActive: boolean;
18
+ }
19
+
20
+ export class VictimListFilter {
21
+
22
+ offenderId: number;
23
+ lastName: string;
24
+ firstName: string;
25
+ pdid: string;
26
+ birthDate: Date;
27
+
28
+ }
29
+
30
+
31
+
32
+ export class VictimAdvocate {
33
+ constructor(public victimAdvocateId: number,
34
+
35
+ public lastName: string,
36
+
37
+ public firstName: string,
38
+
39
+ public prefixId: string,
40
+
41
+ public suffixId: string,
42
+
43
+ public addressId: number,
44
+
45
+ public noPhoneFlag: boolean,
46
+
47
+ public homePhone: string,
48
+
49
+ public workPhone: string,
50
+
51
+ public cellPhone: string,
52
+
53
+ public email: string,
54
+
55
+ public modifiedBy: number
56
+
57
+
58
+ ) { }
59
+ }
60
+
61
+
62
+ export class VictimWeaponUse {
63
+ constructor(
64
+ // public victimWeaponUseId: number,
65
+
66
+ public victimId: number,
67
+
68
+ public weaponTypeId: string,
69
+
70
+ public otherWeapon: string,
71
+
72
+ public modifiedBy: number
73
+
74
+ ) { }
75
+ }
76
+
77
+ export class VictimDrugUse {
78
+ constructor(
79
+ //public victimDrugUseId: number,
80
+
81
+ public victimId: number,
82
+
83
+ public drugTypeId: string,
84
+
85
+ public otherDrug: string,
86
+
87
+ public modifiedBy: number
88
+
89
+ ) { }
90
+ }
91
+
92
+
93
+
94
+
95
+ export class VictimSupport {
96
+ constructor(
97
+ // public victimSupportId: number,
98
+
99
+ public victimId: number,
100
+
101
+ public victimSupportTypeId: string,
102
+
103
+ public modifiedBy: number
104
+
105
+ ) { }
106
+ }
107
+
108
+ export class VictimGuardian {
109
+ constructor(public victimGuardianId: number,
110
+
111
+ public lastName: string,
112
+
113
+ public firstName: string,
114
+
115
+ public prefixId: string,
116
+
117
+ public suffixId: string,
118
+
119
+ public birthDate: string,
120
+
121
+ public addressId: number,
122
+
123
+ public noPhoneFlag: boolean,
124
+
125
+ public homePhone: string,
126
+
127
+ public workPhone: string,
128
+
129
+ public cellPhone: string,
130
+
131
+ public email: string,
132
+
133
+ public modifiedBy: number
134
+
135
+
136
+
137
+ ) { }
138
+ }
139
+
140
+ export interface CaseNote {
141
+ victimId: number;
142
+ victimCaseNoteId: number;
143
+ caseNoteDate: Date;
144
+ contactTypeId: string;
145
+ contactType: string;
146
+ victimContactPurposeId: string;
147
+ victimContactPurpose: string;
148
+ comment: string;
149
+ modifiedBy: number;
150
+ victimFirstName: string;
151
+ victimLastName: string;
152
+
153
+ }
154
+
155
+ export interface Contact {
156
+ victimId: number;
157
+ victimContactId: number;
158
+ contactDate: Date;
159
+ victimContactMethodId: string;
160
+ contactMethod: string;
161
+ contactedBy: number;
162
+ contactedByName: string;
163
+ nextContactDate: Date;
164
+ comment: string;
165
+ modifiedBy: number;
166
+
167
+
168
+ }
169
+
170
+
171
+ export interface VictimSafetyPlan {
172
+ victimId: number;
173
+ fullName: string;
174
+ victimServiceId: number;
175
+ goal:string;
176
+ comment: string;
177
+ modifiedBy: number;
178
+ victimServiceStatusId: string;
179
+ status: string;
180
+ startDate: Date;
181
+ vVictimServiceDetails: VictimServiceDetail[];
182
+ victimName: String;
183
+
184
+
185
+ }
186
+
187
+ export interface VictimServiceDetail{
188
+ victimServiceId: number;
189
+ victimServiceDetailId: number;
190
+ victimServiceTypeId: string;
191
+ victimProgramProviderId: string;
192
+ victimProgramProvider: string;
193
+ modifiedBy: number;
194
+
195
+
196
+ }
197
+ export interface VictimServiceStatusHistory{
198
+
199
+ victimServiceStatusHistoryId: number;
200
+ victimServiceId: string;
201
+ victimServiceStatusId: string;
202
+ startDate: Date;
203
+ comment: string;
204
+ modifiedBy: number;
205
+ }
206
+
207
+
208
+ export interface VictimServiceTypeProgramProviderModel {
209
+ victimServiceTypeProgramProviderId: number;
210
+ victimServiceType: string;
211
+ victimProgramProviderId: string;
212
+ victimServiceTypeId:string;
213
+ victimProgramProvider: string;
214
+ }
215
+
216
+ export interface ProviderListCollectionModel{
217
+ groupId:string;
218
+ isDisplay:boolean;
219
+ collection:VictimServiceTypeProgramProviderModel[];
220
+ }
221
+
222
+
223
+
224
+ export interface ProvidersDialogData {
225
+ //iepAction: IepAction;
226
+ serviceType;
227
+ serviceTypeId;
228
+ providerCollections: [];
229
+ }
230
+
231
+
232
+ export class Victim {
233
+ constructor(
234
+ public victimId: number,
235
+ public offenderId: number,
236
+ public underSupervisionFlag: string,
237
+ public victimOffenderRelationshipTypeId: string,
238
+ public lastName: string,
239
+ public firstName: string,
240
+ public middleName: string,
241
+ public prefixId: string | null,
242
+ public suffixId: string | null,
243
+ public birthDate: string,
244
+ public genderCode: string,
245
+ public homePhone: string,
246
+ public workPhone: string,
247
+ public cellPhone: string,
248
+ public email: string,
249
+ public addressId: number,
250
+ public minorFlag: boolean,
251
+ public victimAdvocateFlag: string,
252
+
253
+ public guardianFirstName: string,
254
+ public guardianLastName: string,
255
+ public guardianPrefixId: string,
256
+ public guardianSuffixId: string,
257
+ public guardianNoPhoneFlag: boolean,
258
+ public guardianHomePhone: string,
259
+ public guardianWorkPhone: string,
260
+ public guardianCellPhone: string,
261
+ public guardianEmail: string,
262
+ public guardianAddressId: number,
263
+ public guardianBirthDate: string,
264
+
265
+ public advocateFirstName: string,
266
+ public advocateLastName: string,
267
+ public advocatePrefixId: string,
268
+ public advocateSuffixId: string,
269
+ public advocateNoPhoneFlag: boolean,
270
+ public advocateHomePhone: string,
271
+ public advocateWorkPhone: string,
272
+ public advocateCellPhone: string,
273
+ public advocateEmail: string,
274
+ public advocateAddressId: number,
275
+
276
+ public emergencyContact: string,
277
+ public emergencyContactPhone: string,
278
+ public commonChildrenFlag: boolean,
279
+ public commonChildrenNumber: number,
280
+ public cpoExpirationFlag: boolean,
281
+ public cpoExpirationDate: string,
282
+ public supportInPlaceFlag: boolean,
283
+ public weaponInvolvedFlag: boolean,
284
+ public drugUseFlag: boolean,
285
+ public alcoholUseFlag: boolean,
286
+ public accessRisk: string,
287
+ public modifiedBy: number,
288
+ public relationship: string,
289
+
290
+ public vVictimAdvocate: VictimAdvocate,
291
+ public vVictimGuardian: VictimGuardian,
292
+
293
+ public victimSupports: VictimSupport[],
294
+ public victimWeaponUses: VictimWeaponUse[],
295
+ public victimDrugUses: VictimDrugUse[],
296
+
297
+ public allowCsosaContactFlag: boolean,
298
+ public liveWithOffenderFlag: boolean
299
+ ) { }
300
+ }
301
+
@@ -0,0 +1,116 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ReactiveFormsModule,FormsModule} from '@angular/forms';
4
+ // import {
5
+
6
+
7
+ // MatMenuModule, MatProgressBarModule,
8
+
9
+ // MatSidenavModule,
10
+ // MatPaginatorModule,
11
+ // } from '@angular/material';
12
+
13
+ import { MatButtonModule } from '@angular/material/button';
14
+ import { MatCheckboxModule } from '@angular/material/checkbox';
15
+ import { MatCardModule } from '@angular/material/card';
16
+ import { MatSliderModule } from '@angular/material/slider';
17
+ import { MatListModule } from '@angular/material/list';
18
+ import { MatIconModule } from '@angular/material/icon';
19
+ import { MatButtonToggleModule } from '@angular/material/button-toggle';
20
+ import { MatToolbarModule } from '@angular/material/toolbar';
21
+ import { MatRadioModule } from '@angular/material/radio';
22
+ import { MatInputModule } from '@angular/material/input';
23
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
24
+ import { MatDatepickerModule } from '@angular/material/datepicker';
25
+ import { DateAdapter, MatNativeDateModule, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
26
+ import { MatDialogModule } from '@angular/material/dialog';
27
+ import { MatExpansionModule } from '@angular/material/expansion';
28
+ import { MatSelectModule } from '@angular/material/select';
29
+ import { MatTableModule } from '@angular/material/table';
30
+ import { MatSortModule } from '@angular/material/sort';
31
+ import { MatGridListModule } from '@angular/material/grid-list';
32
+ import { MatTabsModule } from '@angular/material/tabs';
33
+
34
+ import { CdkTableModule } from '@angular/cdk/table';
35
+ import { LayoutModule } from '@angular/cdk/layout';
36
+ import { SmartAddressModule } from '@csmart/ngc-smart-address';
37
+ import { NgcSmartVictimComponent } from './smart-victim.component';
38
+ import { NgcSmartVictimService } from './smart-victim.service';
39
+ import { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';
40
+ import { SmartVictimDeleteConfirmComponent } from './smart-victim-delete-confirm.component';
41
+ import { CommonDialogModule } from './common-dialog/common-dialog.module';
42
+ import { VictimRoutingModule } from './victim-routing.module';
43
+ import { CaseNoteComponent } from './caseNote/caseNote.component';
44
+ import { ContactComponent } from './contact/contact.component';
45
+ import { VictimSafetyPlanComponent } from './safetyPlan/victimSafetyPlan.component';
46
+ import { VictimSafetyPlanDetailComponent } from './safetyPlan/victimSafetyPlanDetail.component';
47
+ import { VictimSearchFormComponent } from './victimSearch/victimSearchForm.component';
48
+ import { ApolloModule, APOLLO_OPTIONS } from 'apollo-angular';
49
+
50
+ import { PhoneMaskDirective } from './shared/directives/phone-mask.directive';
51
+ import { SeriveProviderComponent } from './safetyPlan/serviceProvider.component';
52
+ import { NgcSmartCoreModule } from '@csmart/ngc-smart-core';
53
+ import { MatMenuModule } from '@angular/material/menu';
54
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
55
+ import { MatPaginatorModule } from '@angular/material/paginator';
56
+ import { MatSidenavModule } from '@angular/material/sidenav';
57
+
58
+
59
+
60
+ const COMPONENTS = [
61
+ NgcSmartVictimComponent,
62
+ SmartVictimDetailComponent,
63
+ SmartVictimDeleteConfirmComponent,
64
+ PhoneMaskDirective
65
+
66
+ ];
67
+
68
+ const ENTRY_COMPONENTS = [
69
+ SmartVictimDeleteConfirmComponent,
70
+
71
+ ];
72
+
73
+ const BASE_MODULES = [
74
+ CommonModule,
75
+ ReactiveFormsModule
76
+ ];
77
+
78
+ const CORE_MODULES = [NgcSmartCoreModule, SmartAddressModule];
79
+
80
+ const MATERIAL_MODULES = [
81
+ MatButtonModule, MatCheckboxModule,MatRadioModule,MatSliderModule,
82
+ MatCardModule, MatSlideToggleModule,
83
+ MatListModule, MatIconModule, MatButtonToggleModule,
84
+ MatToolbarModule, MatTabsModule, MatExpansionModule,
85
+ MatMenuModule, MatInputModule, MatProgressBarModule,
86
+ MatDatepickerModule, MatNativeDateModule,MatPaginatorModule,
87
+ MatDialogModule, MatSidenavModule, MatSelectModule,
88
+ MatTableModule, MatSortModule, MatGridListModule, CdkTableModule, LayoutModule,
89
+ ];
90
+
91
+ @NgModule({
92
+ declarations: [...COMPONENTS,
93
+ CaseNoteComponent,
94
+ ContactComponent,
95
+ VictimSafetyPlanComponent,
96
+ VictimSafetyPlanDetailComponent,
97
+ VictimSearchFormComponent,
98
+ SeriveProviderComponent
99
+ ],
100
+ imports: [
101
+ ...BASE_MODULES,
102
+ ...MATERIAL_MODULES,
103
+ ...CORE_MODULES,
104
+ CommonDialogModule,
105
+ FormsModule,
106
+ VictimRoutingModule,
107
+ ApolloModule,
108
+ //SharedModule
109
+
110
+
111
+ ],
112
+ exports: [...COMPONENTS, ApolloModule],
113
+ entryComponents: [...ENTRY_COMPONENTS, SeriveProviderComponent],
114
+ providers: [ NgcSmartVictimService ]
115
+ })
116
+ export class NgcSmartVictimModule { }
@@ -0,0 +1,12 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+
3
+ import { NgcSmartVictimService } from './smart-victim.service';
4
+
5
+ describe('NgcSmartVictimService', () => {
6
+ beforeEach(() => TestBed.configureTestingModule({}));
7
+
8
+ it('should be created', () => {
9
+ const service: NgcSmartVictimService = TestBed.get(NgcSmartVictimService);
10
+ expect(service).toBeTruthy();
11
+ });
12
+ });