@csmart/ngc-smart-victim 1.18.12 → 1.18.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/esm2022/csmart-ngc-smart-victim.mjs +5 -0
  2. package/esm2022/lib/caseNote/caseNote.component.mjs +194 -0
  3. package/esm2022/lib/common-dialog/common-dialog.component.mjs +23 -0
  4. package/esm2022/lib/common-dialog/common-dialog.module.mjs +34 -0
  5. package/esm2022/lib/common-dialog/common-dialog.service.mjs +33 -0
  6. package/esm2022/lib/contact/contact.component.mjs +140 -0
  7. package/esm2022/lib/email.services.mjs +42 -0
  8. package/esm2022/lib/intake.service.mjs +57 -0
  9. package/esm2022/lib/safetyPlan/serviceProvider.component.mjs +99 -0
  10. package/esm2022/lib/safetyPlan/victimSafetyPlan.component.mjs +116 -0
  11. package/esm2022/lib/safetyPlan/victimSafetyPlanDetail.component.mjs +340 -0
  12. package/esm2022/lib/shared/app.shared.module.mjs +215 -0
  13. package/esm2022/lib/shared/validators/date.validator.mjs +59 -0
  14. package/esm2022/lib/shared/validators/index.mjs +2 -0
  15. package/esm2022/lib/smart-victim-delete-confirm.component.mjs +44 -0
  16. package/esm2022/lib/smart-victim-detail/smart-victim-detail.component.mjs +1155 -0
  17. package/esm2022/lib/smart-victim.component.mjs +317 -0
  18. package/esm2022/lib/smart-victim.model.mjs +142 -0
  19. package/esm2022/lib/smart-victim.module.mjs +128 -0
  20. package/esm2022/lib/smart-victim.service.mjs +370 -0
  21. package/esm2022/lib/victim-routing.module.mjs +41 -0
  22. package/esm2022/lib/victimSearch/VictimSearchFilter.mjs +3 -0
  23. package/esm2022/lib/victimSearch/victimSearchForm.component.mjs +38 -0
  24. package/esm2022/public-api.mjs +11 -0
  25. package/fesm2022/csmart-ngc-smart-victim.mjs +3342 -0
  26. package/fesm2022/csmart-ngc-smart-victim.mjs.map +1 -0
  27. package/index.d.ts +5 -0
  28. package/lib/caseNote/caseNote.component.d.ts +51 -0
  29. package/lib/common-dialog/common-dialog.component.d.ts +14 -0
  30. package/lib/common-dialog/common-dialog.module.d.ts +8 -0
  31. package/lib/common-dialog/common-dialog.service.d.ts +11 -0
  32. package/lib/contact/contact.component.d.ts +40 -0
  33. package/lib/email.services.d.ts +11 -0
  34. package/lib/intake.service.d.ts +57 -0
  35. package/lib/safetyPlan/serviceProvider.component.d.ts +19 -0
  36. package/lib/safetyPlan/victimSafetyPlan.component.d.ts +54 -0
  37. package/lib/safetyPlan/victimSafetyPlanDetail.component.d.ts +62 -0
  38. package/lib/shared/app.shared.module.d.ts +33 -0
  39. package/lib/shared/validators/date.validator.d.ts +9 -0
  40. package/lib/shared/validators/index.d.ts +1 -0
  41. package/lib/smart-victim-delete-confirm.component.d.ts +12 -0
  42. package/lib/smart-victim-detail/smart-victim-detail.component.d.ts +129 -0
  43. package/lib/smart-victim.component.d.ts +69 -0
  44. package/lib/smart-victim.model.d.ts +211 -0
  45. package/lib/smart-victim.module.d.ts +49 -0
  46. package/lib/smart-victim.service.d.ts +71 -0
  47. package/lib/victim-routing.module.d.ts +7 -0
  48. package/{src/lib/victimSearch/VictimSearchFilter.ts → lib/victimSearch/VictimSearchFilter.d.ts} +7 -9
  49. package/lib/victimSearch/victimSearchForm.component.d.ts +14 -0
  50. package/package.json +21 -6
  51. package/{src/public-api.ts → public-api.d.ts} +7 -12
  52. package/karma.conf.js +0 -32
  53. package/ng-package.json +0 -7
  54. package/src/lib/caseNote/caseNote.component.css +0 -22
  55. package/src/lib/caseNote/caseNote.component.html +0 -188
  56. package/src/lib/caseNote/caseNote.component.ts +0 -265
  57. package/src/lib/common-dialog/common-dialog.component.css +0 -10
  58. package/src/lib/common-dialog/common-dialog.component.html +0 -23
  59. package/src/lib/common-dialog/common-dialog.component.spec.ts +0 -25
  60. package/src/lib/common-dialog/common-dialog.component.ts +0 -21
  61. package/src/lib/common-dialog/common-dialog.module.ts +0 -22
  62. package/src/lib/common-dialog/common-dialog.service.ts +0 -35
  63. package/src/lib/contact/contact.component.css +0 -22
  64. package/src/lib/contact/contact.component.html +0 -124
  65. package/src/lib/contact/contact.component.ts +0 -176
  66. package/src/lib/email-notification.service.ts +0 -42
  67. package/src/lib/email.services.ts +0 -51
  68. package/src/lib/http.service.ts +0 -34
  69. package/src/lib/intake.service.ts +0 -82
  70. package/src/lib/loader.service.ts +0 -11
  71. package/src/lib/safetyPlan/serviceProvider.component.ts +0 -94
  72. package/src/lib/safetyPlan/victimSafetyPlan.component.css +0 -27
  73. package/src/lib/safetyPlan/victimSafetyPlan.component.html +0 -85
  74. package/src/lib/safetyPlan/victimSafetyPlan.component.ts +0 -178
  75. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.html +0 -234
  76. package/src/lib/safetyPlan/victimSafetyPlanDetail.component.ts +0 -492
  77. package/src/lib/shared/app.shared.module.ts +0 -111
  78. package/src/lib/shared/validators/date.validator.ts +0 -73
  79. package/src/lib/shared/validators/index.ts +0 -1
  80. package/src/lib/smart-victim-delete-confirm.component.ts +0 -35
  81. package/src/lib/smart-victim-detail/smart-victim-detail.component.css +0 -43
  82. package/src/lib/smart-victim-detail/smart-victim-detail.component.html +0 -876
  83. package/src/lib/smart-victim-detail/smart-victim-detail.component.spec.ts +0 -25
  84. package/src/lib/smart-victim-detail/smart-victim-detail.component.ts +0 -1469
  85. package/src/lib/smart-victim.component.css +0 -245
  86. package/src/lib/smart-victim.component.html +0 -132
  87. package/src/lib/smart-victim.component.spec.ts +0 -25
  88. package/src/lib/smart-victim.component.ts +0 -333
  89. package/src/lib/smart-victim.model.ts +0 -311
  90. package/src/lib/smart-victim.module.ts +0 -110
  91. package/src/lib/smart-victim.service.spec.ts +0 -12
  92. package/src/lib/smart-victim.service.ts +0 -576
  93. package/src/lib/victim-routing.module.ts +0 -36
  94. package/src/lib/victimSearch/victimSearchForm.component.html +0 -35
  95. package/src/lib/victimSearch/victimSearchForm.component.ts +0 -41
  96. package/src/test.ts +0 -16
  97. package/tsconfig.lib.json +0 -36
  98. package/tsconfig.spec.json +0 -17
  99. package/tslint.json +0 -17
@@ -1,188 +0,0 @@
1
-
2
- <mat-card>
3
- <mat-card-header>
4
-
5
- </mat-card-header>
6
- <mat-card-content>
7
-
8
- <mat-toolbar color="primary">
9
- <h4 class="card-header" >Case Note</h4>
10
- </mat-toolbar>
11
- <br>
12
- <div class="row" >
13
- <div [hidden]="hiddenAddNewFlag">
14
- &nbsp;&nbsp;<button mat-stroked-button color="primary" (click)="onAddNew()" [disabled]="addDisableFlag">Add Case Note</button>
15
-
16
- &nbsp;&nbsp;<button mat-stroked-button color="primary" (click)="back()">Back</button>
17
- </div>
18
- </div>
19
-
20
- <div [hidden]="hiddenDetailFlag" >
21
- <mat-card>
22
- <div class='container'>
23
- <form [formGroup]="caseNoteForm" #caseNoteDetailForm="ngForm" >
24
-
25
- <div>
26
- <mat-label>Victim Name:</mat-label>
27
- {{victimName}}
28
- </div>
29
-
30
-
31
- <div>
32
- <mat-form-field>
33
- <mat-label>Date of Case Note: </mat-label>
34
- <input matInput formControlName="caseNoteDate"
35
- (click)="caseNoteDate.open()"
36
- [matDatepicker]="caseNoteDate"
37
- placeholder="Choose a start date"
38
- [(ngModel)]="editCaseNote.caseNoteDate" required>
39
- <mat-datepicker-toggle matSuffix [for]="caseNoteDate"></mat-datepicker-toggle>
40
- <mat-datepicker #caseNoteDate></mat-datepicker>
41
-
42
- <div class="help-block" *ngIf="caseNoteForm.get('caseNoteDate').errors
43
- && (caseNoteForm.get('caseNoteDate').dirty || caseNoteForm.get('caseNoteDate').touched)">
44
- <mat-error>case note date is <strong>required</strong></mat-error>
45
- </div>
46
-
47
- <div class="help-block"
48
- *ngIf="caseNoteForm.get('caseNoteDate').hasError('date')
49
- && (caseNoteForm.get('caseNoteDate').dirty || caseNoteForm.get('caseNoteDate').touched)">
50
- <mat-error>future case note Date is <strong>not allowed</strong></mat-error>
51
- </div>
52
-
53
- </mat-form-field>
54
-
55
- </div>
56
-
57
-
58
-
59
- <div>
60
- <mat-form-field>
61
- <mat-label>Contact Type:</mat-label>
62
- <mat-select placeholder="contactType" formControlName="contactType" required [(ngModel)]="editCaseNote.contactTypeId">
63
- <mat-option *ngFor=" let contactType of contactTypes" [value]="contactType.contactTypeId" >{{contactType.name}}</mat-option>
64
- </mat-select>
65
-
66
- <div class="help-block" *ngIf="caseNoteForm.get('contactType').errors
67
- && (caseNoteForm.get('contactType').dirty || caseNoteForm.get('contactType').touched)">
68
- <mat-error>comment is <strong>required</strong></mat-error>
69
- </div>
70
- </mat-form-field>
71
- </div>
72
-
73
- <div>
74
- <mat-form-field class="mat-select-content">
75
- <mat-label>Contact Purpose:</mat-label>
76
- <mat-select formControlName="contactPurpose" required [(ngModel)]="editCaseNote.victimContactPurposeId" class="mat-select-inner">
77
- <mat-option *ngFor=" let contactPurpose of contactPurposes" [value]="contactPurpose.victimContactPurposeId" >{{contactPurpose.name}}</mat-option>
78
- </mat-select>
79
-
80
- <div class="help-block" *ngIf="caseNoteForm.get('contactPurpose').errors
81
- && (caseNoteForm.get('contactPurpose').dirty || caseNoteForm.get('contactPurpose').touched)">
82
- <mat-error>comment is <strong>required</strong></mat-error>
83
- </div>
84
-
85
- </mat-form-field>
86
- </div>
87
-
88
- <div>
89
-
90
- <mat-form-field style="width: 400px;">
91
- <mat-label>Comment:</mat-label>
92
- <textarea
93
- class="textarea-content"
94
- matInput
95
- placeholder=""
96
- required formControlName="comment"
97
- [(ngModel)]="editCaseNote.comment"
98
- cdkTextareaAutosize
99
- #autosize="cdkTextareaAutosize"
100
- cdkAutosizeMinRows="8"
101
- cdkAutosizeMaxRows="12">
102
- </textarea>
103
-
104
- <div class="help-block" *ngIf="caseNoteForm.get('comment').errors
105
- && (caseNoteForm.get('comment').dirty || caseNoteForm.get('comment').touched)">
106
- <mat-error>comment is <strong>required</strong></mat-error>
107
- </div>
108
- </mat-form-field>
109
- </div>
110
-
111
- <div>
112
- <button mat-stroked-button color="primary" (click)="saveCaseNote()" [disabled]="!caseNoteDetailForm.form.valid" >Save</button>
113
-
114
- &nbsp;&nbsp;<button mat-stroked-button color="primary" (click)="hiddenDetailFlag = true;addDisableFlag = false; this.hiddenAddNewFlag = false;">Cancel</button>
115
- </div>
116
-
117
- </form>
118
- </div>
119
- </mat-card>
120
-
121
- </div>
122
- <br>
123
- <mat-table #table [dataSource]="caseNoteDataSource" class="example-table">
124
- <ng-container matColumnDef="caseNoteDate">
125
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Case Note Date</mat-header-cell>
126
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.caseNoteDate | date}} </mat-cell>
127
- </ng-container>
128
-
129
-
130
- <ng-container matColumnDef="contactType">
131
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Contact Type</mat-header-cell>
132
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.contactType}} </mat-cell>
133
- </ng-container>
134
-
135
-
136
- <ng-container matColumnDef="contactPurpose">
137
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Contact Purpose</mat-header-cell>
138
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.contactPurpose}} </mat-cell>
139
- </ng-container>
140
- <ng-container matColumnDef="comment">
141
- <mat-header-cell *matHeaderCellDef class="example-header-cell">Comment</mat-header-cell>
142
- <mat-cell *matCellDef="let row" class="example-cell"> {{row.comment}} </mat-cell>
143
- </ng-container>
144
-
145
- <ng-container matColumnDef="victimCaseNoteId">
146
- <mat-header-cell *matHeaderCellDef class="example-header-cell"></mat-header-cell>
147
- <mat-cell *matCellDef="let row" class="example-cell">
148
-
149
- <button
150
- class="sac-cso-read sac-vsp-read"
151
- mat-icon-button
152
- color="primary"
153
- matTooltip="Edit Case Note"
154
- (click)="onEditCaseNote(row.victimCaseNoteId)">
155
- <i class="material-icons">mode_edit</i>
156
- </button>
157
-
158
- &nbsp;&nbsp;
159
-
160
-
161
-
162
- <button
163
- class="sac-vsp-read"
164
- matTooltip="Delete Case Note"
165
- mat-icon-button
166
- color="primary"
167
- (click)="onDeleteCaseNote(row.victimCaseNoteId)">
168
- <i class="material-icons">delete</i>
169
- </button>
170
-
171
-
172
-
173
-
174
- </mat-cell>
175
- </ng-container>
176
-
177
- <mat-header-row *matHeaderRowDef="['caseNoteDate', 'contactType', 'contactPurpose', 'comment', 'victimCaseNoteId']" class="example-header-row"></mat-header-row>
178
- <mat-row *matRowDef="let row; columns:['caseNoteDate', 'contactType', 'contactPurpose', 'comment', 'victimCaseNoteId'];" class="example-row"></mat-row>
179
- </mat-table>
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
- </mat-card-content>
188
- </mat-card>
@@ -1,265 +0,0 @@
1
- import { Component, OnInit,Inject,OnChanges, Input, Output, EventEmitter,AfterViewInit } from '@angular/core';
2
- import { NgcSmartVictimService } from '../smart-victim.service';
3
- import { UntypedFormControl, UntypedFormGroup, UntypedFormBuilder,Validators} from '@angular/forms';
4
- import { CommonDialogService} from '.././common-dialog/common-dialog.service';
5
- import { MatSnackBar } from '@angular/material/snack-bar';
6
- import { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';
7
- import { Router, ActivatedRoute } from '@angular/router';
8
- import { CaseNote} from '../smart-victim.model';
9
- import { SmartAuthService } from '@csmart/ngc-smart-core';
10
- import { dateValidator, passDateValidator } from '../shared/validators';
11
- import { MatTableDataSource } from '@angular/material/table';
12
- import { EmailService } from '../email.services';
13
-
14
-
15
-
16
- @Component({
17
-
18
- templateUrl: './caseNote.component.html',
19
- styleUrls: ['./caseNote.component.css'],
20
- providers: [CommonDialogService]
21
-
22
- })
23
- export class CaseNoteComponent implements OnInit,AfterViewInit {
24
-
25
- // @Input() isIntake: boolean;
26
- offenderId: number;
27
- loginStaff: LoginStaff;
28
-
29
- hiddenDetailFlag:boolean;
30
- caseNoteList: CaseNote[];
31
- caseNote: CaseNote;
32
- editCaseNote: CaseNote = <CaseNote>{};
33
- errorMessage: string;
34
- contactTypes: any[];
35
- contactPurposes: any[];
36
- result: any;
37
- victimName: string;
38
- staffId: number;
39
- victimId: number;
40
- private sub: any;
41
- caseNoteDataSource= new MatTableDataSource();
42
- addDisableFlag: boolean;
43
- hiddenAddNewFlag: boolean;
44
- caseNoteForm: UntypedFormGroup;
45
-
46
- constructor(
47
- private formBuilder: UntypedFormBuilder,
48
- private _victimServicesComponent: NgcSmartVictimService,
49
- private commonDialogService: CommonDialogService,
50
- public snackBar: MatSnackBar,
51
- private route: ActivatedRoute,
52
- private router: Router,
53
- private smartAuthService: SmartAuthService,
54
- private emailService: EmailService
55
-
56
- ) {
57
- this.initForm();
58
- }
59
- private initForm() {
60
- this.caseNoteForm = this.formBuilder.group({
61
- caseNoteDate: new UntypedFormControl('', Validators.compose([
62
- Validators.required,dateValidator()])),
63
- contactType: new UntypedFormControl('',Validators.required),
64
- contactPurpose: new UntypedFormControl('',Validators.required),
65
- comment: new UntypedFormControl('',Validators.required)
66
- });
67
-
68
- this.caseNoteForm.markAsPristine();
69
- this.caseNoteForm.markAsUntouched();
70
-
71
- }
72
- ngAfterViewInit() {
73
- this.smartAuthService.setPermission('Victim', this.route.snapshot);
74
- }
75
-
76
- ngOnInit() {
77
- var data = this.route.snapshot.data;
78
- this.loginStaff = data.loginStaff;
79
- this.staffId = this.loginStaff.staffId;
80
-
81
-
82
- this.sub = this.route.params.subscribe(params => {
83
- this.victimId = params['victimId'];
84
- this.offenderId = params['offenderId'];
85
-
86
- });
87
-
88
- this.addDisableFlag= false;
89
- this.hiddenDetailFlag = true;
90
- this.hiddenAddNewFlag = false;
91
-
92
-
93
- this._victimServicesComponent.getVictim(this.victimId).subscribe(
94
- (items: any) => {
95
- this.victimName = items.firstName + ', ' + items.lastName;
96
- }
97
- );
98
-
99
- this._victimServicesComponent.getContactTypes().subscribe(
100
- (items: any) => {
101
- this.contactTypes = items;
102
- }
103
- );
104
-
105
- this._victimServicesComponent.getVictimContactPurposes().subscribe(
106
- (items: any) => {
107
- this.contactPurposes = items;
108
- }
109
- );
110
-
111
-
112
- this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(
113
- caseNoteList => {
114
- console.log('caseNoteList');
115
- console.log(caseNoteList);
116
- this.caseNoteList = caseNoteList;
117
- this.caseNoteDataSource.data = this.caseNoteList;
118
- }
119
- );
120
-
121
-
122
-
123
-
124
- // this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(
125
- // (itms: any) => {
126
- // const ELEMENT_DATA: Element[] = itms;
127
- // this.caseNoteDataSource.data = ELEMENT_DATA;
128
- // })
129
- }
130
- onEditCaseNote(victimCaseNoteId: number){
131
-
132
- this.hiddenDetailFlag =false;
133
- this.hiddenAddNewFlag = true;
134
-
135
- this.addDisableFlag = true;
136
- this.editCaseNote = this.caseNoteList.find(x => x.victimCaseNoteId === victimCaseNoteId);
137
-
138
- }
139
-
140
- onDeleteCaseNote(victimCaseNoteId: number){
141
- this.commonDialogService
142
- .confirm('', 'Do you want to delete this case note?', 'Yes', 'No')
143
- .subscribe(res => {this.result = res;
144
- if (this.result) {
145
- this._victimServicesComponent.deleteCaseNote(victimCaseNoteId, this.staffId)
146
- .subscribe(result => {
147
- this.snackBar.open('delete Successfully !', '', { duration: 3000,});
148
-
149
- this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(
150
- caseNoteList => {
151
- this.caseNoteList = caseNoteList;
152
- this.caseNoteDataSource.data = this.caseNoteList;
153
- }
154
- );
155
- }
156
- );
157
- }
158
-
159
- });
160
- }
161
- onAddNew(){
162
-
163
- this.hiddenDetailFlag = false;
164
- this.editCaseNote.victimCaseNoteId = 0;
165
-
166
- const caseNoteDateControl = this.caseNoteForm.get('caseNoteDate');
167
- caseNoteDateControl.setValue(null);
168
- caseNoteDateControl.setErrors(null);
169
- caseNoteDateControl.markAsPristine();
170
- caseNoteDateControl.markAsPristine();
171
-
172
-
173
- const contactTypeControl = this.caseNoteForm.get('contactType');
174
- contactTypeControl.setValue(null);
175
- contactTypeControl.setErrors(null);
176
- contactTypeControl.markAsPristine();
177
- contactTypeControl.markAsUntouched();
178
-
179
-
180
- const contactPurposeControl = this.caseNoteForm.get('contactPurpose');
181
- contactPurposeControl.setValue(null);
182
- contactPurposeControl.setErrors(null);
183
- contactPurposeControl.markAsPristine();
184
- contactPurposeControl.markAsUntouched();
185
-
186
-
187
- const commentControl = this.caseNoteForm.get('comment');
188
- commentControl.setValue(null);
189
- commentControl.setErrors(null);
190
- commentControl.markAsPristine();
191
- commentControl.markAsUntouched();
192
-
193
- }
194
- back(){
195
- this.router.navigate(['victimHome']);
196
- }
197
-
198
- saveCaseNote(){
199
- this.emailService
200
- .createCaseNoteEmail(
201
- "VictimCaseNoteReminders",
202
- this.offenderId,
203
- this.staffId
204
- )
205
- .subscribe();
206
-
207
- if (this.editCaseNote.victimCaseNoteId === undefined || this.editCaseNote.victimCaseNoteId === 0) {
208
-
209
- const castNote: CaseNote = {
210
- victimId:this.victimId,
211
- victimCaseNoteId: 0,
212
- caseNoteDate: this.editCaseNote.caseNoteDate,
213
- contactTypeId: this.editCaseNote.contactTypeId,
214
- contactType: null,
215
- victimContactPurposeId: this.editCaseNote.victimContactPurposeId,
216
- victimContactPurpose: null,
217
- comment: this.editCaseNote.comment,
218
- modifiedBy: this.staffId,
219
- victimFirstName: null,
220
- victimLastName: null
221
-
222
- };
223
- this._victimServicesComponent.addCaseNote(castNote).subscribe(
224
- result => {
225
- this.snackBar.open('Saved Successfully !', '', {
226
- duration: 3000,
227
- });
228
-
229
- // this._victimServicesComponent.sendEmail('', {referralId: 0, offenderId: this.offenderId }, this.loginStaff.staffId);
230
-
231
-
232
-
233
- this.hiddenDetailFlag = true;
234
- this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(
235
- caseNoteList => {
236
- this.caseNoteList = caseNoteList;
237
- this.caseNoteDataSource.data = this.caseNoteList;
238
- }
239
- );
240
- }
241
- );
242
- } else {
243
- this._victimServicesComponent.updateCaseNote(this.editCaseNote).subscribe(
244
- result => {
245
- this.snackBar.open('Update Successfully !', '', {
246
- duration: 3000,
247
- });
248
- this.hiddenDetailFlag = true;
249
- this.hiddenAddNewFlag = false;
250
- this.addDisableFlag = false;
251
- this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(
252
- caseNoteList => {
253
- this.caseNoteList = caseNoteList;
254
- this.caseNoteDataSource.data = this.caseNoteList;
255
- }
256
- );
257
- }
258
- );
259
- }
260
-
261
- //email
262
-
263
- }
264
-
265
- }
@@ -1,10 +0,0 @@
1
- .md-dialog-container{
2
- position:fixed;
3
- top:0 !important;
4
- overflow:hidden;
5
- }
6
-
7
- .inner
8
- {
9
- display: inline-block;
10
- }
@@ -1,23 +0,0 @@
1
-
2
-
3
- <mat-card class="example-card">
4
- <mat-card-content>
5
- <p>{{ title }}</p>
6
- <p>{{ message }}</p>
7
- <br>
8
-
9
- <div class="inner">
10
- <button type="button" mat-stroked-button color="primary"
11
- (click)="commondialogRef.close(true)">{{cmdYesTitle}}</button>
12
- </div>
13
- &nbsp;&nbsp;
14
-
15
- <div *ngIf="cmdYesTitle!=='Ok'" class="inner">
16
- <button type="button" mat-stroked-button color="primary"
17
- (click)="commondialogRef.close()">{{cmdNoTitle}}</button>
18
-
19
- </div>
20
-
21
-
22
- </mat-card-content>
23
- </mat-card>
@@ -1,25 +0,0 @@
1
- import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CommonDialogComponent } from './common-dialog.component';
4
-
5
- describe('CommonDialogComponent', () => {
6
- let component: CommonDialogComponent;
7
- let fixture: ComponentFixture<CommonDialogComponent>;
8
-
9
- beforeEach(async(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [ CommonDialogComponent ]
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(CommonDialogComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,21 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import {MatDialog, MatDialogRef} from '@angular/material/dialog';
3
-
4
- @Component({
5
- selector: 'app-common-dialog',
6
- templateUrl: './common-dialog.component.html',
7
- styleUrls: ['./common-dialog.component.css']
8
- })
9
- export class CommonDialogComponent implements OnInit {
10
- public title: string;
11
- public message: string;
12
- public cmdYesTitle: string ="Yes";
13
- public cmdNoTitle: string = "No";
14
-
15
- constructor(public commondialogRef: MatDialogRef<CommonDialogComponent>) { }
16
-
17
- ngOnInit() {
18
-
19
- }
20
-
21
- }
@@ -1,22 +0,0 @@
1
-
2
- import { NgModule } from '@angular/core';
3
- import { SharedModule } from '../shared/app.shared.module';
4
-
5
- import { CommonDialogComponent } from './common-dialog.component';
6
-
7
- @NgModule({
8
- imports: [
9
- // MaterialModule.forRoot(),
10
- SharedModule
11
- ],
12
- exports: [
13
- CommonDialogComponent,
14
- ],
15
- declarations: [
16
- CommonDialogComponent,
17
- ],
18
- providers: [
19
- CommonDialogComponent,
20
- ]
21
- })
22
- export class CommonDialogModule { }
@@ -1,35 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { CommonDialogComponent } from './common-dialog.component';
3
- import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
4
- import { Injectable } from '@angular/core';
5
-
6
- @Injectable()
7
- export class CommonDialogService {
8
-
9
- constructor(private dialog: MatDialog) { }
10
-
11
- public confirm(title: string, message: string, cmdYesTitle: string, cmdNoTitle: string): Observable<boolean> {
12
-
13
- let dialogRef: MatDialogRef<CommonDialogComponent>;
14
-
15
- dialogRef = this.dialog.open(CommonDialogComponent);
16
- dialogRef.componentInstance.title = title;
17
- dialogRef.componentInstance.message = message;
18
- dialogRef.componentInstance.cmdYesTitle = cmdYesTitle;
19
- dialogRef.componentInstance.cmdNoTitle = cmdNoTitle;
20
- return dialogRef.afterClosed();
21
- }
22
-
23
- public warning(title: string, message: string, cmdOkTitle: string, ): Observable<boolean> {
24
-
25
- let dialogRef: MatDialogRef<CommonDialogComponent>;
26
-
27
- dialogRef = this.dialog.open(CommonDialogComponent);
28
- dialogRef.componentInstance.title = title;
29
- dialogRef.componentInstance.message = message;
30
- dialogRef.componentInstance.cmdYesTitle = cmdOkTitle;
31
-
32
- return dialogRef.afterClosed();
33
- }
34
-
35
- }
@@ -1,22 +0,0 @@
1
-
2
- mat-form-field {
3
- width: 50%;
4
- }
5
- .container{
6
- margin: 16px;
7
- display: grid;
8
- grid-template-columns: repeat(1, 1fr);
9
- grid-gap: 10px;
10
- grid-auto-rows: minmax(50px, auto);
11
- justify-items: stretch;
12
- }
13
-
14
- /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */
15
- .mat-select-content{
16
- width:300px;
17
- }
18
-
19
- /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */
20
- .mat-select-inner{
21
- width:290px;
22
- }