@csmart/ngc-smart-victim 1.14.9 → 1.14.11
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/shared/directives/phone-mask.directive.mjs +2 -18
- package/esm2020/lib/smart-victim-detail/smart-victim-detail.component.mjs +5 -3
- package/fesm2015/csmart-ngc-smart-victim.mjs +5 -19
- package/fesm2015/csmart-ngc-smart-victim.mjs.map +1 -1
- package/fesm2020/csmart-ngc-smart-victim.mjs +5 -19
- package/fesm2020/csmart-ngc-smart-victim.mjs.map +1 -1
- package/package.json +1 -1
@@ -654,44 +654,28 @@ class PhoneMaskDirective {
|
|
654
654
|
}
|
655
655
|
onInputChange(event, backspace) {
|
656
656
|
if (event) {
|
657
|
-
console.log('appPhoneMask');
|
658
|
-
console.log(event);
|
659
657
|
let newVal = event.replace(/\D/g, '');
|
660
|
-
console.log('newVal');
|
661
|
-
console.log(newVal);
|
662
658
|
if (backspace && newVal.length <= 6) {
|
663
659
|
newVal = newVal.substring(0, newVal.length - 1);
|
664
|
-
console.log('newVal 1');
|
665
|
-
console.log(newVal);
|
666
660
|
}
|
667
661
|
if (newVal.length === 0) {
|
668
662
|
newVal = '';
|
669
|
-
console.log('newVal 2');
|
670
|
-
console.log(newVal);
|
671
663
|
}
|
672
664
|
else if (newVal.length <= 3) {
|
673
665
|
newVal = newVal.replace(/^(\d{0,3})/, '($1)');
|
674
|
-
console.log('newVal 3');
|
675
|
-
console.log(newVal);
|
676
666
|
}
|
677
667
|
else if (newVal.length <= 6) {
|
678
668
|
newVal = newVal.replace(/^(\d{0,3})(\d{0,3})/, '($1) $2');
|
679
|
-
console.log('newVal 4');
|
680
|
-
console.log(newVal);
|
681
669
|
}
|
682
670
|
else if (newVal.length <= 10) {
|
683
671
|
newVal = newVal.replace(/^(\d{0,3})(\d{0,3})(\d{0,4})/, '($1) $2-$3');
|
684
|
-
console.log('newVal 5');
|
685
|
-
console.log(newVal);
|
686
672
|
}
|
687
673
|
else {
|
688
674
|
newVal = newVal.substring(0, 10);
|
689
675
|
newVal = newVal.replace(/^(\d{0,3})(\d{0,3})(\d{0,4})/, '($1) $2-$3');
|
690
|
-
console.log('newVal 6');
|
691
|
-
console.log(newVal);
|
692
676
|
}
|
693
677
|
this.ngControl.valueAccessor.writeValue(newVal);
|
694
|
-
console.log('newVal
|
678
|
+
console.log('newVal');
|
695
679
|
console.log(newVal);
|
696
680
|
}
|
697
681
|
}
|
@@ -979,7 +963,6 @@ class SmartVictimDetailComponent {
|
|
979
963
|
this.victimForm.reset();
|
980
964
|
}
|
981
965
|
ngOnInit() {
|
982
|
-
console.log('on init 11/8/23');
|
983
966
|
console.log('show offenderId');
|
984
967
|
console.log(this.offenderId);
|
985
968
|
console.log('show staffId');
|
@@ -1237,7 +1220,6 @@ class SmartVictimDetailComponent {
|
|
1237
1220
|
}
|
1238
1221
|
//#region "save victim"
|
1239
1222
|
saveVictim() {
|
1240
|
-
console.log('save vitem 11/7/23');
|
1241
1223
|
//guardian phone logic
|
1242
1224
|
if (!this.victimForm.value.guardianNoPhoneFlag) {
|
1243
1225
|
if (this.victimForm.value.guardianHomePhone) {
|
@@ -1313,7 +1295,11 @@ class SmartVictimDetailComponent {
|
|
1313
1295
|
});
|
1314
1296
|
}
|
1315
1297
|
if (this.victimForm.value.homePhone) {
|
1298
|
+
console.log('this.victimForm.value.homePhone 0');
|
1299
|
+
console.log(this.victimForm.value.homePhone);
|
1316
1300
|
this.victimForm.value.homePhone = this.victimForm.value.homePhone.replace(/[()\s-]/g, '');
|
1301
|
+
console.log('this.victimForm.value.homePhone 1');
|
1302
|
+
console.log(this.victimForm.value.homePhone);
|
1317
1303
|
}
|
1318
1304
|
else {
|
1319
1305
|
this.victimForm.value.homePhone = null;
|