@csmart/ngc-smart-victim 1.14.32 → 1.14.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/smart-victim-detail/smart-victim-detail.component.mjs +7 -29
- package/fesm2015/csmart-ngc-smart-victim.mjs +6 -28
- package/fesm2015/csmart-ngc-smart-victim.mjs.map +1 -1
- package/fesm2020/csmart-ngc-smart-victim.mjs +6 -28
- package/fesm2020/csmart-ngc-smart-victim.mjs.map +1 -1
- package/package.json +1 -1
@@ -846,7 +846,6 @@ class SmartVictimDetailComponent {
|
|
846
846
|
victimWeaponUsesControl.setValue(weaponUsesData);
|
847
847
|
const otherWeaponControl = this.victimForm.get('otherWeapon');
|
848
848
|
otherWeaponControl.setValue(otherWeapon);
|
849
|
-
//this.weaponUsesData = this.editVictim.victimWeaponUses;
|
850
849
|
var drugUseData = [];
|
851
850
|
var otherDrug = "";
|
852
851
|
console.log('load this.editVictim.victimDrugUses');
|
@@ -983,9 +982,6 @@ class SmartVictimDetailComponent {
|
|
983
982
|
console.log(this.staffId);
|
984
983
|
console.log('show isIntake');
|
985
984
|
console.log(this.isIntake);
|
986
|
-
//this.victimDetail.guardianNoPhoneFlag = true;
|
987
|
-
//this.victimForm.value.guardianNoPhoneFlag = true;
|
988
|
-
//this.victimForm.get('guardianNoPhoneFlag').setValue(true);
|
989
985
|
//required field
|
990
986
|
const requiredImplementation = { get: function () {
|
991
987
|
if (this._required) {
|
@@ -1106,26 +1102,16 @@ class SmartVictimDetailComponent {
|
|
1106
1102
|
});
|
1107
1103
|
}
|
1108
1104
|
radioMinorChange($event) {
|
1109
|
-
// const guardianLastNameControl = this.victimForm.get('guardianLastName');
|
1110
|
-
//const guardianFirstNameControl = this.victimForm.get('guardianFirstName');
|
1111
1105
|
if ($event.value === true) {
|
1112
1106
|
this.guardianTabFlag = true;
|
1113
|
-
// guardianLastNameControl.setValidators(Validators.required);
|
1114
|
-
// guardianFirstNameControl.setValidators(Validators.required);
|
1115
|
-
//this.victimForm.value.guardianNoPhoneFlag = true;
|
1116
1107
|
}
|
1117
1108
|
else {
|
1118
1109
|
this.guardianTabFlag = false;
|
1119
|
-
// guardianLastNameControl.clearValidators();
|
1120
|
-
// guardianFirstNameControl.clearValidators();
|
1121
1110
|
}
|
1122
|
-
//guardianLastNameControl.updateValueAndValidity();
|
1123
|
-
// guardianFirstNameControl.updateValueAndValidity();
|
1124
1111
|
}
|
1125
1112
|
radioAdvocateChange($event) {
|
1126
1113
|
const advocateLastNameControl = this.victimForm.get('advocateLastName');
|
1127
1114
|
const advocateFirstNameControl = this.victimForm.get('advocateFirstName');
|
1128
|
-
// const advocateNoPhoneControl = this.victimForm.get('advocateNoPhoneFlag');
|
1129
1115
|
if ($event.value === "YS") {
|
1130
1116
|
this.advocateTabFlag = true;
|
1131
1117
|
advocateLastNameControl.setValidators(Validators.required);
|
@@ -1201,11 +1187,7 @@ class SmartVictimDetailComponent {
|
|
1201
1187
|
});
|
1202
1188
|
const minorControl = this.victimForm.get('minorFlag');
|
1203
1189
|
minorControl.setValue(true);
|
1204
|
-
// const guardianLastNameControl = this.victimForm.get('guardianLastName');
|
1205
|
-
// const guardianFirstNameControl = this.victimForm.get('guardianFirstName');
|
1206
1190
|
this.guardianTabFlag = true;
|
1207
|
-
// guardianLastNameControl.setValidators(Validators.required);
|
1208
|
-
// guardianFirstNameControl.setValidators(Validators.required);
|
1209
1191
|
}
|
1210
1192
|
}
|
1211
1193
|
checkOtherWeapon(WeaponUse) {
|
@@ -1356,6 +1338,12 @@ class SmartVictimDetailComponent {
|
|
1356
1338
|
else {
|
1357
1339
|
this.victimForm.value.advocateCellPhone = null;
|
1358
1340
|
}
|
1341
|
+
if (this.advocateWorkPhoneControl.value) {
|
1342
|
+
this.victimForm.value.advocateWorkPhone = this.advocateWorkPhoneControl.value.replace(/[()\s-]/g, '');
|
1343
|
+
}
|
1344
|
+
else {
|
1345
|
+
this.victimForm.value.advocateWorkPhone = null;
|
1346
|
+
}
|
1359
1347
|
if (this.emergencyContactPhoneControl.value) {
|
1360
1348
|
this.victimForm.value.emergencyContactPhone = this.emergencyContactPhoneControl.value.replace(/[()\s-]/g, '');
|
1361
1349
|
}
|
@@ -1599,8 +1587,6 @@ class SmartVictimDetailComponent {
|
|
1599
1587
|
this.victimDetail.victimSupports.push(victimSupport);
|
1600
1588
|
});
|
1601
1589
|
this.victimDetail.victimDrugUses = [];
|
1602
|
-
console.log('this.victimForm.value.victimDrugUses calculate');
|
1603
|
-
console.log(this.victimForm.value.victimDrugUses);
|
1604
1590
|
this.victimForm.value.victimDrugUses.forEach(element => {
|
1605
1591
|
const victimDrugUse = {};
|
1606
1592
|
victimDrugUse.drugTypeId = element;
|
@@ -1617,21 +1603,13 @@ class SmartVictimDetailComponent {
|
|
1617
1603
|
victimDrugUse.modifiedBy = this.staffId;
|
1618
1604
|
victimDrugUse.victimId = this.victimDetail.victimId;
|
1619
1605
|
this.victimDetail.victimDrugUses.push(victimDrugUse);
|
1620
|
-
console.log('this.victimForm.value.victimDrugUses after');
|
1621
|
-
console.log(this.victimForm.value.victimDrugUses);
|
1622
1606
|
});
|
1623
1607
|
this.victimForm.value.victimDrugUses.filter(word => (!(word.drugTypeId === null && word.otherDrug === null)));
|
1624
|
-
console.log('adjust this.victimForm.value.victimDrugUses ');
|
1625
|
-
console.log(this.victimForm.value.victimDrugUses);
|
1626
1608
|
this.victimDetail.victimWeaponUses = [];
|
1627
1609
|
this.victimForm.value.victimWeaponUses.forEach(element => {
|
1628
1610
|
const victimWeaponUse = {};
|
1629
1611
|
victimWeaponUse.victimId = this.victimDetail.victimId;
|
1630
1612
|
victimWeaponUse.weaponTypeId = element;
|
1631
|
-
console.log('weapon element');
|
1632
|
-
console.log(element);
|
1633
|
-
console.log(this.victimForm.value.otherWeapon);
|
1634
|
-
console.log(this.victimForm.value.victimWeaponUses);
|
1635
1613
|
if (element == "OTHER") {
|
1636
1614
|
victimWeaponUse.otherWeapon = this.victimForm.value.otherWeapon;
|
1637
1615
|
}
|