@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
@@ -842,7 +842,6 @@ class SmartVictimDetailComponent {
|
|
842
842
|
victimWeaponUsesControl.setValue(weaponUsesData);
|
843
843
|
const otherWeaponControl = this.victimForm.get('otherWeapon');
|
844
844
|
otherWeaponControl.setValue(otherWeapon);
|
845
|
-
//this.weaponUsesData = this.editVictim.victimWeaponUses;
|
846
845
|
var drugUseData = [];
|
847
846
|
var otherDrug = "";
|
848
847
|
console.log('load this.editVictim.victimDrugUses');
|
@@ -979,9 +978,6 @@ class SmartVictimDetailComponent {
|
|
979
978
|
console.log(this.staffId);
|
980
979
|
console.log('show isIntake');
|
981
980
|
console.log(this.isIntake);
|
982
|
-
//this.victimDetail.guardianNoPhoneFlag = true;
|
983
|
-
//this.victimForm.value.guardianNoPhoneFlag = true;
|
984
|
-
//this.victimForm.get('guardianNoPhoneFlag').setValue(true);
|
985
981
|
//required field
|
986
982
|
const requiredImplementation = { get: function () {
|
987
983
|
if (this._required) {
|
@@ -1102,26 +1098,16 @@ class SmartVictimDetailComponent {
|
|
1102
1098
|
});
|
1103
1099
|
}
|
1104
1100
|
radioMinorChange($event) {
|
1105
|
-
// const guardianLastNameControl = this.victimForm.get('guardianLastName');
|
1106
|
-
//const guardianFirstNameControl = this.victimForm.get('guardianFirstName');
|
1107
1101
|
if ($event.value === true) {
|
1108
1102
|
this.guardianTabFlag = true;
|
1109
|
-
// guardianLastNameControl.setValidators(Validators.required);
|
1110
|
-
// guardianFirstNameControl.setValidators(Validators.required);
|
1111
|
-
//this.victimForm.value.guardianNoPhoneFlag = true;
|
1112
1103
|
}
|
1113
1104
|
else {
|
1114
1105
|
this.guardianTabFlag = false;
|
1115
|
-
// guardianLastNameControl.clearValidators();
|
1116
|
-
// guardianFirstNameControl.clearValidators();
|
1117
1106
|
}
|
1118
|
-
//guardianLastNameControl.updateValueAndValidity();
|
1119
|
-
// guardianFirstNameControl.updateValueAndValidity();
|
1120
1107
|
}
|
1121
1108
|
radioAdvocateChange($event) {
|
1122
1109
|
const advocateLastNameControl = this.victimForm.get('advocateLastName');
|
1123
1110
|
const advocateFirstNameControl = this.victimForm.get('advocateFirstName');
|
1124
|
-
// const advocateNoPhoneControl = this.victimForm.get('advocateNoPhoneFlag');
|
1125
1111
|
if ($event.value === "YS") {
|
1126
1112
|
this.advocateTabFlag = true;
|
1127
1113
|
advocateLastNameControl.setValidators(Validators.required);
|
@@ -1197,11 +1183,7 @@ class SmartVictimDetailComponent {
|
|
1197
1183
|
});
|
1198
1184
|
const minorControl = this.victimForm.get('minorFlag');
|
1199
1185
|
minorControl.setValue(true);
|
1200
|
-
// const guardianLastNameControl = this.victimForm.get('guardianLastName');
|
1201
|
-
// const guardianFirstNameControl = this.victimForm.get('guardianFirstName');
|
1202
1186
|
this.guardianTabFlag = true;
|
1203
|
-
// guardianLastNameControl.setValidators(Validators.required);
|
1204
|
-
// guardianFirstNameControl.setValidators(Validators.required);
|
1205
1187
|
}
|
1206
1188
|
}
|
1207
1189
|
checkOtherWeapon(WeaponUse) {
|
@@ -1352,6 +1334,12 @@ class SmartVictimDetailComponent {
|
|
1352
1334
|
else {
|
1353
1335
|
this.victimForm.value.advocateCellPhone = null;
|
1354
1336
|
}
|
1337
|
+
if (this.advocateWorkPhoneControl.value) {
|
1338
|
+
this.victimForm.value.advocateWorkPhone = this.advocateWorkPhoneControl.value.replace(/[()\s-]/g, '');
|
1339
|
+
}
|
1340
|
+
else {
|
1341
|
+
this.victimForm.value.advocateWorkPhone = null;
|
1342
|
+
}
|
1355
1343
|
if (this.emergencyContactPhoneControl.value) {
|
1356
1344
|
this.victimForm.value.emergencyContactPhone = this.emergencyContactPhoneControl.value.replace(/[()\s-]/g, '');
|
1357
1345
|
}
|
@@ -1595,8 +1583,6 @@ class SmartVictimDetailComponent {
|
|
1595
1583
|
this.victimDetail.victimSupports.push(victimSupport);
|
1596
1584
|
});
|
1597
1585
|
this.victimDetail.victimDrugUses = [];
|
1598
|
-
console.log('this.victimForm.value.victimDrugUses calculate');
|
1599
|
-
console.log(this.victimForm.value.victimDrugUses);
|
1600
1586
|
this.victimForm.value.victimDrugUses.forEach(element => {
|
1601
1587
|
const victimDrugUse = {};
|
1602
1588
|
victimDrugUse.drugTypeId = element;
|
@@ -1613,21 +1599,13 @@ class SmartVictimDetailComponent {
|
|
1613
1599
|
victimDrugUse.modifiedBy = this.staffId;
|
1614
1600
|
victimDrugUse.victimId = this.victimDetail.victimId;
|
1615
1601
|
this.victimDetail.victimDrugUses.push(victimDrugUse);
|
1616
|
-
console.log('this.victimForm.value.victimDrugUses after');
|
1617
|
-
console.log(this.victimForm.value.victimDrugUses);
|
1618
1602
|
});
|
1619
1603
|
this.victimForm.value.victimDrugUses.filter(word => (!(word.drugTypeId === null && word.otherDrug === null)));
|
1620
|
-
console.log('adjust this.victimForm.value.victimDrugUses ');
|
1621
|
-
console.log(this.victimForm.value.victimDrugUses);
|
1622
1604
|
this.victimDetail.victimWeaponUses = [];
|
1623
1605
|
this.victimForm.value.victimWeaponUses.forEach(element => {
|
1624
1606
|
const victimWeaponUse = {};
|
1625
1607
|
victimWeaponUse.victimId = this.victimDetail.victimId;
|
1626
1608
|
victimWeaponUse.weaponTypeId = element;
|
1627
|
-
console.log('weapon element');
|
1628
|
-
console.log(element);
|
1629
|
-
console.log(this.victimForm.value.otherWeapon);
|
1630
|
-
console.log(this.victimForm.value.victimWeaponUses);
|
1631
1609
|
if (element == "OTHER") {
|
1632
1610
|
victimWeaponUse.otherWeapon = this.victimForm.value.otherWeapon;
|
1633
1611
|
}
|