@csmart/ngc-smart-victim 1.18.6 → 1.18.8

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 +20 -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 +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/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 +1384 -0
  35. package/src/lib/smart-victim.component.css +192 -0
  36. package/src/lib/smart-victim.component.html +138 -0
  37. package/src/lib/smart-victim.component.spec.ts +25 -0
  38. package/src/lib/smart-victim.component.ts +329 -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 +22 -0
  49. package/tsconfig.lib.json +37 -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,27 @@
1
+
2
+ div.serviceSelect
3
+ {
4
+ width: 500px;
5
+
6
+ }
7
+ div.serviceButton
8
+ {
9
+ width: 20%;
10
+
11
+ }
12
+ .container{
13
+ margin: 16px;
14
+ display: grid;
15
+ grid-template-columns: repeat(2, 1fr);
16
+ grid-gap: 10px;
17
+ grid-auto-rows: minmax(50px, auto);
18
+ justify-items: stretch;
19
+ }
20
+
21
+ .app-class .mat-list-item {
22
+ height: auto;
23
+ }
24
+
25
+ .textarea-content{
26
+ width:500px;
27
+ }
@@ -0,0 +1,85 @@
1
+
2
+ <mat-card>
3
+ <mat-card-header>
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
+ <br>
10
+ <button mat-raised-button color="primary" (click)="goToSafetyPlanDetail(0)" >Add Goal</button>
11
+ &nbsp;&nbsp;<button mat-raised-button color="primary" (click)="back()">Back</button>
12
+ <br>
13
+ <br>
14
+ <mat-table #table [dataSource]="safetyPlanDataSource" class="example-table">
15
+ <ng-container matColumnDef="startDate">
16
+ <mat-header-cell *matHeaderCellDef class="example-header-cell">Start Date</mat-header-cell>
17
+ <mat-cell *matCellDef="let row" class="example-cell"> {{row.startDate | date}} </mat-cell>
18
+ </ng-container>
19
+ <ng-container matColumnDef="goal">
20
+ <mat-header-cell *matHeaderCellDef class="example-header-cell">Goal</mat-header-cell>
21
+ <mat-cell *matCellDef="let row" class="example-cell"> {{row.goal }} </mat-cell>
22
+ </ng-container>
23
+ <ng-container matColumnDef="victimServiceStatus">
24
+ <mat-header-cell *matHeaderCellDef class="example-header-cell">Status</mat-header-cell>
25
+ <mat-cell *matCellDef="let row" class="example-cell"> {{row.victimServiceStatus }} </mat-cell>
26
+ </ng-container>
27
+ <ng-container matColumnDef="comment">
28
+ <mat-header-cell *matHeaderCellDef class="example-header-cell">Comment</mat-header-cell>
29
+ <mat-cell *matCellDef="let row" class="example-cell"> {{row.comment }} </mat-cell>
30
+ </ng-container>
31
+
32
+ <ng-container matColumnDef="victimServiceId">
33
+ <mat-header-cell *matHeaderCellDef class="example-header-cell"></mat-header-cell>
34
+ <!-- <mat-cell *matCellDef="let row" class="example-cell">
35
+ <button type="button" mat-raised-button color="primary" (click)="goToSafetyPlanDetail(row.victimServiceId)">
36
+ <span class="glyphicon glyphicon-pencil" ></span>&nbsp;
37
+ <mat-icon>edit</mat-icon>
38
+ </button>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ &nbsp;&nbsp;
47
+ <button type="button" mat-raised-button color="primary" (click)="onDeleteSafetyPlan(row.victimServiceId)">
48
+ <span class="glyphicon glyphicon-trash" ></span>&nbsp;Delete
49
+ </button>
50
+ </mat-cell> -->
51
+
52
+ <mat-cell *matCellDef="let element">
53
+
54
+ <button class="edit-btn" mat-icon-button color="primary" matTooltip="Edit Safety Plan" (click)="goToSafetyPlanDetail(element.victimServiceId)">
55
+ <i class="material-icons">mode_edit</i>
56
+ </button>
57
+
58
+ &nbsp;&nbsp;
59
+
60
+ <button
61
+ class="delete-btn"
62
+ matTooltip="Delete Safety Plan"
63
+ mat-icon-button
64
+ color="primary"
65
+ (click)="onDeleteSafetyPlan(element.victimServiceId)">
66
+ <i class="material-icons">delete</i>
67
+ </button>
68
+
69
+
70
+
71
+
72
+
73
+ </mat-cell>
74
+
75
+
76
+
77
+ </ng-container>
78
+
79
+ <mat-header-row *matHeaderRowDef="['startDate', 'goal', 'victimServiceStatus', 'comment', 'victimServiceId']" class="example-header-row"></mat-header-row>
80
+ <mat-row *matRowDef="let row; columns:['startDate', 'goal', 'victimServiceStatus', 'comment', 'victimServiceId'];" class="example-row"></mat-row>
81
+ </mat-table>
82
+
83
+
84
+ </mat-card-content>
85
+ </mat-card>
@@ -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> &nbsp;&nbsp;</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
+ <!-- &nbsp;&nbsp;<button mat-raised-button color="primary" (click)="commondialogRef.close()">Cancel</button> -->
203
+ &nbsp;&nbsp;<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>