@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.
- package/karma.conf.js +32 -0
- package/ng-package.json +7 -0
- package/package.json +13 -26
- package/src/lib/caseNote/caseNote.component.css +20 -0
- package/src/lib/caseNote/caseNote.component.html +188 -0
- package/src/lib/caseNote/caseNote.component.ts +248 -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 +25 -0
- package/src/lib/common-dialog/common-dialog.service.ts +35 -0
- package/src/lib/contact/contact.component.css +20 -0
- package/src/lib/contact/contact.component.html +124 -0
- package/src/lib/contact/contact.component.ts +176 -0
- package/src/lib/intake.service.ts +82 -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 +118 -0
- package/src/lib/shared/directives/phone-mask.directive.ts +41 -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 +860 -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 +1241 -0
- package/src/lib/smart-victim.component.css +192 -0
- package/src/lib/smart-victim.component.html +133 -0
- package/src/lib/smart-victim.component.spec.ts +25 -0
- package/src/lib/smart-victim.component.ts +323 -0
- package/src/lib/smart-victim.model.ts +301 -0
- package/src/lib/smart-victim.module.ts +116 -0
- package/src/lib/smart-victim.service.spec.ts +12 -0
- package/src/lib/smart-victim.service.ts +563 -0
- package/src/lib/victim-routing.module.ts +34 -0
- package/{lib/victimSearch/VictimSearchFilter.d.ts → src/lib/victimSearch/VictimSearchFilter.ts} +4 -2
- package/src/lib/victimSearch/victimSearchForm.component.html +35 -0
- package/src/lib/victimSearch/victimSearchForm.component.ts +41 -0
- package/src/public-api.ts +12 -0
- package/src/test.ts +22 -0
- package/tsconfig.lib.json +37 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/bundles/csmart-ngc-smart-victim.umd.js +0 -6426
- package/bundles/csmart-ngc-smart-victim.umd.js.map +0 -1
- package/bundles/csmart-ngc-smart-victim.umd.min.js +0 -16
- package/bundles/csmart-ngc-smart-victim.umd.min.js.map +0 -1
- package/csmart-ngc-smart-victim.d.ts +0 -19
- package/csmart-ngc-smart-victim.metadata.json +0 -1
- package/esm2015/csmart-ngc-smart-victim.js +0 -25
- package/esm2015/lib/caseNote/caseNote.component.js +0 -349
- package/esm2015/lib/common-dialog/common-dialog.component.js +0 -46
- package/esm2015/lib/common-dialog/common-dialog.module.js +0 -32
- package/esm2015/lib/common-dialog/common-dialog.service.js +0 -63
- package/esm2015/lib/contact/contact.component.js +0 -228
- package/esm2015/lib/intake.service.js +0 -183
- package/esm2015/lib/safetyPlan/serviceProvider.component.js +0 -130
- package/esm2015/lib/safetyPlan/victimSafetyPlan.component.js +0 -257
- package/esm2015/lib/safetyPlan/victimSafetyPlanDetail.component.js +0 -556
- package/esm2015/lib/shared/app.shared.module.js +0 -81
- package/esm2015/lib/shared/directives/phone-mask.directive.js +0 -168
- package/esm2015/lib/shared/validators/date.validator.js +0 -108
- package/esm2015/lib/shared/validators/index.js +0 -7
- package/esm2015/lib/smart-victim-delete-confirm.component.js +0 -61
- package/esm2015/lib/smart-victim-detail/smart-victim-detail.component.js +0 -1405
- package/esm2015/lib/smart-victim.component.js +0 -476
- package/esm2015/lib/smart-victim.model.js +0 -631
- package/esm2015/lib/smart-victim.module.js +0 -84
- package/esm2015/lib/smart-victim.service.js +0 -792
- package/esm2015/lib/victim-routing.module.js +0 -40
- package/esm2015/lib/victimSearch/VictimSearchFilter.js +0 -20
- package/esm2015/lib/victimSearch/victimSearchForm.component.js +0 -59
- package/esm2015/public-api.js +0 -13
- package/esm5/csmart-ngc-smart-victim.js +0 -25
- package/esm5/lib/caseNote/caseNote.component.js +0 -372
- package/esm5/lib/common-dialog/common-dialog.component.js +0 -48
- package/esm5/lib/common-dialog/common-dialog.module.js +0 -36
- package/esm5/lib/common-dialog/common-dialog.service.js +0 -75
- package/esm5/lib/contact/contact.component.js +0 -281
- package/esm5/lib/intake.service.js +0 -194
- package/esm5/lib/safetyPlan/serviceProvider.component.js +0 -99
- package/esm5/lib/safetyPlan/victimSafetyPlan.component.js +0 -306
- package/esm5/lib/safetyPlan/victimSafetyPlanDetail.component.js +0 -628
- package/esm5/lib/shared/app.shared.module.js +0 -85
- package/esm5/lib/shared/directives/phone-mask.directive.js +0 -184
- package/esm5/lib/shared/validators/date.validator.js +0 -108
- package/esm5/lib/shared/validators/index.js +0 -7
- package/esm5/lib/smart-victim-delete-confirm.component.js +0 -51
- package/esm5/lib/smart-victim-detail/smart-victim-detail.component.js +0 -1497
- package/esm5/lib/smart-victim.component.js +0 -528
- package/esm5/lib/smart-victim.model.js +0 -541
- package/esm5/lib/smart-victim.module.js +0 -84
- package/esm5/lib/smart-victim.service.js +0 -1063
- package/esm5/lib/victim-routing.module.js +0 -44
- package/esm5/lib/victimSearch/VictimSearchFilter.js +0 -24
- package/esm5/lib/victimSearch/victimSearchForm.component.js +0 -70
- package/esm5/public-api.js +0 -13
- package/fesm2015/csmart-ngc-smart-victim.js +0 -5682
- package/fesm2015/csmart-ngc-smart-victim.js.map +0 -1
- package/fesm5/csmart-ngc-smart-victim.js +0 -6203
- package/fesm5/csmart-ngc-smart-victim.js.map +0 -1
- package/lib/caseNote/caseNote.component.d.ts +0 -45
- package/lib/common-dialog/common-dialog.component.d.ts +0 -11
- package/lib/common-dialog/common-dialog.module.d.ts +0 -2
- package/lib/common-dialog/common-dialog.service.d.ts +0 -8
- package/lib/contact/contact.component.d.ts +0 -37
- package/lib/intake.service.d.ts +0 -54
- package/lib/safetyPlan/serviceProvider.component.d.ts +0 -16
- package/lib/safetyPlan/victimSafetyPlan.component.d.ts +0 -49
- package/lib/safetyPlan/victimSafetyPlanDetail.component.d.ts +0 -57
- package/lib/shared/app.shared.module.d.ts +0 -2
- package/lib/shared/directives/phone-mask.directive.d.ts +0 -14
- 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 -9
- package/lib/smart-victim-detail/smart-victim-detail.component.d.ts +0 -109
- package/lib/smart-victim.component.d.ts +0 -63
- package/lib/smart-victim.model.d.ts +0 -204
- package/lib/smart-victim.module.d.ts +0 -2
- package/lib/smart-victim.service.d.ts +0 -67
- package/lib/victim-routing.module.d.ts +0 -2
- package/lib/victimSearch/victimSearchForm.component.d.ts +0 -11
- package/public-api.d.ts +0 -4
@@ -0,0 +1,178 @@
|
|
1
|
+
import { Component, OnInit,Inject,AfterViewInit } from '@angular/core';
|
2
|
+
import { NgcSmartVictimService } from '../smart-victim.service';
|
3
|
+
import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
|
4
|
+
import { VictimSafetyPlan,VictimServiceDetail,VictimServiceStatusHistory } from '../smart-victim.model';
|
5
|
+
import { MatDialog } from '@angular/material/dialog';
|
6
|
+
import { CommonDialogService} from '.././common-dialog/common-dialog.service';
|
7
|
+
import { HttpClient } from '@angular/common/http';
|
8
|
+
import { Observable } from 'rxjs';
|
9
|
+
//import { VictimSafetyPlanDetailComponent } from './victimSafetyPlanDetail.component';
|
10
|
+
import { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';
|
11
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
12
|
+
import { SmartAuthService } from '@csmart/ngc-smart-core';
|
13
|
+
import { MatTableDataSource } from '@angular/material/table';
|
14
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
15
|
+
|
16
|
+
@Component({
|
17
|
+
templateUrl: './victimSafetyPlan.component.html',
|
18
|
+
providers: [CommonDialogService]
|
19
|
+
})
|
20
|
+
|
21
|
+
export class VictimSafetyPlanComponent implements OnInit,AfterViewInit {
|
22
|
+
//selectedOffender: SelectedOffender;
|
23
|
+
loginStaff: LoginStaff;
|
24
|
+
offenderId: number;
|
25
|
+
|
26
|
+
|
27
|
+
hiddenDetailFlag:boolean;
|
28
|
+
hiddenAddNewFlag: boolean;
|
29
|
+
safetyPlans: VictimSafetyPlan[];
|
30
|
+
safetyPlan: VictimSafetyPlan;
|
31
|
+
editSafetyPlan: VictimSafetyPlan = <VictimSafetyPlan>{};
|
32
|
+
errorMessage: string;
|
33
|
+
contactTypes: any[];
|
34
|
+
contactPurposes: any[];
|
35
|
+
victimServiceTypes: any[];
|
36
|
+
victimSafetyPlans: VictimSafetyPlan[];
|
37
|
+
victimServiceStatus: any[];
|
38
|
+
victimServiceStatusHistories: VictimServiceStatusHistory[];
|
39
|
+
queryString: string;
|
40
|
+
victimServiceDetail: VictimServiceDetail[];
|
41
|
+
myVictimServiceId: number;
|
42
|
+
result: any;
|
43
|
+
victimName: string;
|
44
|
+
staffId: number;
|
45
|
+
victimId: number;
|
46
|
+
private sub: any;
|
47
|
+
safetyPlanDataSource = new MatTableDataSource();
|
48
|
+
|
49
|
+
constructor(
|
50
|
+
|
51
|
+
private _victimServicesComponent: NgcSmartVictimService,
|
52
|
+
private commonDialogService: CommonDialogService,
|
53
|
+
private http: HttpClient,
|
54
|
+
public dialog: MatDialog,
|
55
|
+
private route: ActivatedRoute,
|
56
|
+
private router: Router,
|
57
|
+
public snackBar: MatSnackBar,
|
58
|
+
private smartAuthService: SmartAuthService,
|
59
|
+
|
60
|
+
) {
|
61
|
+
|
62
|
+
|
63
|
+
}
|
64
|
+
ngAfterViewInit() {
|
65
|
+
this.smartAuthService.setPermission('Victim', this.route.snapshot);
|
66
|
+
}
|
67
|
+
|
68
|
+
ngOnInit() {
|
69
|
+
|
70
|
+
var data = this.route.snapshot.data;
|
71
|
+
this.loginStaff = data.loginStaff;
|
72
|
+
this.staffId = this.loginStaff.staffId;
|
73
|
+
|
74
|
+
this.sub = this.route.params.subscribe(params => {
|
75
|
+
this.victimId = params['victimId'];
|
76
|
+
|
77
|
+
});
|
78
|
+
|
79
|
+
this.hiddenAddNewFlag = false;
|
80
|
+
this.victimName= this.victimName;
|
81
|
+
|
82
|
+
this._victimServicesComponent.getSafetyPlans(this.victimId).subscribe(
|
83
|
+
victimSafetyPlans => {
|
84
|
+
this.victimSafetyPlans = victimSafetyPlans;
|
85
|
+
this.safetyPlanDataSource.data = this.victimSafetyPlans;
|
86
|
+
console.log('this.victimSafetyPlans');
|
87
|
+
console.log(this.victimSafetyPlans);
|
88
|
+
|
89
|
+
|
90
|
+
}
|
91
|
+
);
|
92
|
+
|
93
|
+
|
94
|
+
// this.myVictimServiceId =1;
|
95
|
+
// this._victimServicesComponent.getVictimServiceDetail(this.myVictimServiceId).subscribe(
|
96
|
+
// victimServiceDetail => {
|
97
|
+
// this.victimServiceDetail = victimServiceDetail;
|
98
|
+
// console.log('service detail');
|
99
|
+
// console.log(this.victimServiceDetail);
|
100
|
+
// }
|
101
|
+
// );
|
102
|
+
|
103
|
+
this._victimServicesComponent.getServiceStatusHistories(1).subscribe(
|
104
|
+
victimServiceStatusHistories => {
|
105
|
+
// this.victimServiceStatusHistories = victimServiceStatusHistories;
|
106
|
+
}
|
107
|
+
);
|
108
|
+
}
|
109
|
+
|
110
|
+
//---------------graphQL--------------------------------------
|
111
|
+
// getVictimServiceTypeProgramProviders(): Observable<VictimServiceTypeProgramProviderModel[]> {
|
112
|
+
// const queryString = `
|
113
|
+
// {
|
114
|
+
// findVictimServiceTypeProgramProviders {
|
115
|
+
// data {
|
116
|
+
// victimServiceTypeProgramProviderId
|
117
|
+
// victimServiceType
|
118
|
+
// victimProgramProvider
|
119
|
+
// }
|
120
|
+
// }
|
121
|
+
// }`;
|
122
|
+
|
123
|
+
|
124
|
+
// return this.http.post<any>(environment.smartApiUrl, { query: queryString })
|
125
|
+
// .map(result => {
|
126
|
+
// return result.data.findVictimServiceTypeProgramProviders.data;
|
127
|
+
// });
|
128
|
+
// }
|
129
|
+
|
130
|
+
goToSafetyPlanDetail(victimServiceId: number){
|
131
|
+
|
132
|
+
this.router.navigate(['saftyPlanDetail', victimServiceId, this.victimId ]);
|
133
|
+
|
134
|
+
}
|
135
|
+
onAddNew(){
|
136
|
+
this.hiddenDetailFlag = false;
|
137
|
+
|
138
|
+
}
|
139
|
+
onDeleteSafetyPlan(victimServiceId: number){
|
140
|
+
|
141
|
+
this.commonDialogService
|
142
|
+
.confirm('', 'Do you want to delete this safety plan?', 'Yes', 'No')
|
143
|
+
.subscribe(res => {this.result = res;
|
144
|
+
if (this.result) {
|
145
|
+
|
146
|
+
this._victimServicesComponent.deleteSafetyPlan(victimServiceId,this.staffId)
|
147
|
+
.subscribe(result => {
|
148
|
+
|
149
|
+
this.snackBar.open('delete safety plan Successfully !', '', { duration: 3000,});
|
150
|
+
|
151
|
+
this._victimServicesComponent.getSafetyPlans(this.victimId).subscribe(
|
152
|
+
victimSafetyPlans => {
|
153
|
+
this.victimSafetyPlans = victimSafetyPlans;
|
154
|
+
this.safetyPlanDataSource.data = this.victimSafetyPlans;
|
155
|
+
}
|
156
|
+
);
|
157
|
+
|
158
|
+
}
|
159
|
+
);
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
});
|
166
|
+
}
|
167
|
+
|
168
|
+
back(){
|
169
|
+
this.router.navigate(['victimHome']);
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
}
|
178
|
+
|
@@ -0,0 +1,234 @@
|
|
1
|
+
<mat-card>
|
2
|
+
<mat-card-header>
|
3
|
+
|
4
|
+
</mat-card-header>
|
5
|
+
<mat-card-content>
|
6
|
+
<mat-toolbar color="primary">
|
7
|
+
<h4 class="card-header" style="display: inline-block;">Safety Plan</h4>
|
8
|
+
</mat-toolbar>
|
9
|
+
|
10
|
+
|
11
|
+
<div class='container'>
|
12
|
+
<form [formGroup]="spForm" #spDetailForm="ngForm" >
|
13
|
+
|
14
|
+
|
15
|
+
<div class="row" ><b>Victim Name:</b> {{victimName}} </div>
|
16
|
+
|
17
|
+
|
18
|
+
<div class="row" >
|
19
|
+
<mat-form-field >
|
20
|
+
<mat-label>Goal:</mat-label>
|
21
|
+
<input matInput formControlName="serviceGoal" [(ngModel)]="editSafetyPlan.goal" >
|
22
|
+
</mat-form-field>
|
23
|
+
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="row">
|
27
|
+
<mat-form-field>
|
28
|
+
<mat-label>Goal Status:</mat-label>
|
29
|
+
<mat-select formControlName="goalStatus" [(ngModel)]="editSafetyPlan.victimServiceStatusId" >
|
30
|
+
<mat-option *ngFor=" let victimServiceStatu of victimServiceStatus" [value]="victimServiceStatu.victimServiceStatusId" >{{victimServiceStatu.name}}</mat-option>
|
31
|
+
</mat-select>
|
32
|
+
</mat-form-field>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
|
36
|
+
<div class="row">
|
37
|
+
|
38
|
+
<mat-form-field>
|
39
|
+
<mat-label>Goal Status Date:</mat-label>
|
40
|
+
<input matInput
|
41
|
+
formControlName="goalStatusDate"
|
42
|
+
[matDatepicker]="goalStatusDate"
|
43
|
+
placeholder="Choose a date" [(ngModel)]="editSafetyPlan.startDate"
|
44
|
+
(click)="goalStatusDate.open()"
|
45
|
+
>
|
46
|
+
|
47
|
+
<mat-datepicker-toggle matSuffix [for]="goalStatusDate"></mat-datepicker-toggle>
|
48
|
+
<mat-datepicker #goalStatusDate></mat-datepicker>
|
49
|
+
</mat-form-field>
|
50
|
+
|
51
|
+
|
52
|
+
<div class="help-block"
|
53
|
+
*ngIf="spForm.get('goalStatusDate').hasError('date')
|
54
|
+
&& (spForm.get('goalStatusDate').dirty || spForm.get('goalStatusDate').touched)">
|
55
|
+
<mat-error>Future Date is <strong>not allowed</strong> for goal status date</mat-error>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
|
60
|
+
<div class="row" >
|
61
|
+
<!-- <mat-form-field style="width: 200px;"> -->
|
62
|
+
<!-- <mat-label>Comment:</mat-label>
|
63
|
+
<textarea mdInput
|
64
|
+
class="textarea-content"
|
65
|
+
[(ngModel)]="editSafetyPlan.comment"
|
66
|
+
formControlName="comment"
|
67
|
+
cdkTextareaAutosize
|
68
|
+
#autosize="cdkTextareaAutosize"
|
69
|
+
cdkAutosizeMinRows="8"
|
70
|
+
cdkAutosizeMaxRows="12"
|
71
|
+
>
|
72
|
+
</textarea> -->
|
73
|
+
<!-- </mat-form-field> -->
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<mat-form-field style="width: 400px;">
|
78
|
+
<mat-label>Comment:</mat-label>
|
79
|
+
<textarea
|
80
|
+
class="textarea-content"
|
81
|
+
matInput
|
82
|
+
placeholder=""
|
83
|
+
formControlName="comment"
|
84
|
+
[(ngModel)]="editSafetyPlan.comment"
|
85
|
+
cdkTextareaAutosize
|
86
|
+
#autosize="cdkTextareaAutosize"
|
87
|
+
cdkAutosizeMinRows="8"
|
88
|
+
cdkAutosizeMaxRows="12">
|
89
|
+
</textarea>
|
90
|
+
|
91
|
+
|
92
|
+
</mat-form-field>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</form>
|
97
|
+
</div><!--end form-->
|
98
|
+
|
99
|
+
|
100
|
+
<br>
|
101
|
+
|
102
|
+
<div class="row"><b>Need and provider:</b><br> (click on a check box to select provider information)
|
103
|
+
|
104
|
+
<mat-list>
|
105
|
+
<mat-list-item *ngFor="let serviceType of victimServiceTypes; let i=index" >
|
106
|
+
<mat-checkbox class="example-margin" name="victimService" color ="primary" [checked]="evaluateSelection(serviceType.victimServiceTypeId)" (change)="isInArray(serviceType.victimServiceTypeId,serviceType.name, $event);" > {{serviceType.name}}</mat-checkbox>
|
107
|
+
<div> </div>
|
108
|
+
<div *ngFor="let provider of providerListCollection; let pi = index" >
|
109
|
+
<!-- <div *ngIf="provider.isDisplay && serviceType.victimServiceTypeId == provider.groupId " class="Row">
|
110
|
+
|
111
|
+
<div class="serviceSelect"> -->
|
112
|
+
<!-- <mat-form-field> -->
|
113
|
+
<!-- <mat-select name="provider" id="provider.groupId" [(ngModel)]="providerId" > -->
|
114
|
+
<!-- <mat-select name="provider" id="provider.groupId" [(value)]="providerId" >
|
115
|
+
<mat-option *ngFor=" let providerOption of provider.collection" [value]="providerOption.victimProgramProviderId" >{{providerOption.victimProgramProvider}}</mat-option>
|
116
|
+
</mat-select> -->
|
117
|
+
<!-- </mat-form-field> -->
|
118
|
+
|
119
|
+
<!-- </div>
|
120
|
+
|
121
|
+
<div class="serviceButton">
|
122
|
+
<button mat-raised-button color="primary" (click)="savePlanProvider(serviceType.victimServiceTypeId ,providerId)">Add Provider</button>
|
123
|
+
</div>
|
124
|
+
</div> -->
|
125
|
+
</div>
|
126
|
+
<div *ngFor=" let serviceprovider of editSafetyPlan.vVictimServiceDetails" >
|
127
|
+
|
128
|
+
<div *ngIf="serviceType.victimServiceTypeId===serviceprovider.victimServiceTypeId" class="Row" >
|
129
|
+
<!-- . {{ serviceprovider.victimProgramProvider}}<button mat-raised-button color="primary" (click)="deleteProvider(serviceprovider.victimServiceDetailId)">Delete</button> <br> -->
|
130
|
+
<div class="serviceSelect" >
|
131
|
+
. {{ serviceprovider.victimProgramProvider}}
|
132
|
+
</div>
|
133
|
+
<div class="serviceButton">
|
134
|
+
<button mat-raised-button color="primary" (click)="deleteProvider(serviceprovider.victimServiceDetailId)">Delete</button>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
</mat-list-item>
|
142
|
+
|
143
|
+
</mat-list>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<!-- <div class='row' >
|
158
|
+
<div class='col-md-5 desc-label'><b>Victim Name:</b> {{victimName}} </div>
|
159
|
+
<div class='col-md-7'>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
</div> -->
|
163
|
+
<!-- <div class='row' >
|
164
|
+
<div class='col-md-5 desc-label'><b>Goal:<font color="red">*</font></b></div>
|
165
|
+
<div class='col-md-7'>
|
166
|
+
<mat-form-field >
|
167
|
+
<input matInput name="serviceGoal" [(ngModel)]="editSafetyPlan.goal" required placeholder="">
|
168
|
+
</mat-form-field>
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class='row' >
|
173
|
+
<div class='col-md-5 desc-label'><b>Goal Status:<font color="red">*</font></b></div>
|
174
|
+
<div class='col-md-7'>
|
175
|
+
<mat-select name="goalStatus" [style.width]="'50%'" [(ngModel)]="editSafetyPlan.victimServiceStatusId" required>
|
176
|
+
<mat-option *ngFor=" let victimServiceStatu of victimServiceStatus" [value]="victimServiceStatu.victimServiceStatusId" >{{victimServiceStatu.name}}</mat-option>
|
177
|
+
</mat-select>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
<div class='row' >
|
182
|
+
<div class='col-md-5 desc-label'><b>Goal Status Date:<font color="red">*</font></b></div>
|
183
|
+
<div class='col-md-7'>
|
184
|
+
<input matInput name="goalStatusDate" [matDatepicker]="goalStatusDate" placeholder="Choose a date" [(ngModel)]="editSafetyPlan.startDate" required>
|
185
|
+
<mat-datepicker-toggle matSuffix [for]="goalStatusDate"></mat-datepicker-toggle>
|
186
|
+
<mat-datepicker #goalStatusDate></mat-datepicker>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div class='row' >
|
191
|
+
<div class='col-md-5 desc-label'><b>Comment:</b></div>
|
192
|
+
<div class='col-md-7'>
|
193
|
+
<textarea mdInput placeholder="" rows="10" cols="50" name="comment" [(ngModel)]="editSafetyPlan.comment"></textarea>
|
194
|
+
</div>
|
195
|
+
</div> -->
|
196
|
+
|
197
|
+
|
198
|
+
<div class='row' >
|
199
|
+
<div class='col-md-12 text-center'>
|
200
|
+
<!-- <button type="button" class="btn btn-default btn-small" (click)="print()">Print</button> -->
|
201
|
+
<button mat-raised-button color="primary" (click)="saveSafetyPlan()" [disabled]="!spForm.valid">Save</button>
|
202
|
+
<!-- <button mat-raised-button color="primary" (click)="commondialogRef.close()">Cancel</button> -->
|
203
|
+
<button mat-raised-button color="primary" (click)="back()">Back</button>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<!--status hisotry-->
|
208
|
+
|
209
|
+
<mat-table #table [dataSource]="victimServiceStatusHistoriesDataSource" class="example-table">
|
210
|
+
<ng-container matColumnDef="startDate">
|
211
|
+
<mat-header-cell *matHeaderCellDef class="example-header-cell">Start Date</mat-header-cell>
|
212
|
+
<mat-cell *matCellDef="let row" class="example-cell"> {{row.startDate | date}} </mat-cell>
|
213
|
+
</ng-container>
|
214
|
+
|
215
|
+
|
216
|
+
<ng-container matColumnDef="victimServiceStatusId">
|
217
|
+
<mat-header-cell *matHeaderCellDef class="example-header-cell">Status</mat-header-cell>
|
218
|
+
<mat-cell *matCellDef="let row" class="example-cell"> {{row.victimServiceStatusId}} </mat-cell>
|
219
|
+
</ng-container>
|
220
|
+
|
221
|
+
|
222
|
+
<ng-container matColumnDef="comment">
|
223
|
+
<mat-header-cell *matHeaderCellDef class="example-header-cell">Comment</mat-header-cell>
|
224
|
+
<mat-cell *matCellDef="let row" class="example-cell"> {{row.comment}} </mat-cell>
|
225
|
+
</ng-container>
|
226
|
+
<mat-header-row *matHeaderRowDef="[ 'startDate', 'victimServiceStatusId', 'comment']" class="example-header-row"></mat-header-row>
|
227
|
+
<mat-row *matRowDef="let row; columns:[ 'startDate', 'victimServiceStatusId', 'comment'];" class="example-row"></mat-row>
|
228
|
+
</mat-table>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</mat-card-content>
|
234
|
+
</mat-card>
|