|
@@ -580,7 +580,6 @@ export default {
|
580
|
580
|
} else {
|
581
|
581
|
this.individual = this.indiv
|
582
|
582
|
this.individual.email = this.indiv.emailAddress
|
583
|
|
- console.log(this.indiv)
|
584
|
583
|
this.individual.user = Log.getUser()
|
585
|
584
|
}
|
586
|
585
|
this.getAgencies()
|
|
@@ -640,15 +639,10 @@ export default {
|
640
|
639
|
this.individual.user.role === 'Agent' ||
|
641
|
640
|
this.individual.user.role === 'Managing Agent'
|
642
|
641
|
) {
|
643
|
|
- console.log('saveAgent')
|
644
|
|
- console.log(this.individual)
|
645
|
642
|
this.saveAgent(this.individual)
|
646
|
643
|
.then(() => {
|
647
|
|
- console.log('saveAgent 1')
|
648
|
|
- console.log(this.individual)
|
649
|
644
|
this.boolMessage = true
|
650
|
645
|
if (Log.getUser().role === 'Super Admin') {
|
651
|
|
- console.log(this.individual)
|
652
|
646
|
if (
|
653
|
647
|
this.individual.id ===
|
654
|
648
|
JSON.parse(localStorage.getItem('person')).id
|
|
@@ -679,12 +673,8 @@ export default {
|
679
|
673
|
}
|
680
|
674
|
})
|
681
|
675
|
.catch((err) => {
|
682
|
|
- console.log(err)
|
683
|
|
- this.errorOccurred = 'ERRORHTML'
|
684
|
|
-
|
685
|
676
|
this.errorOccurred = 'ERROR'
|
686
|
677
|
this.errorMessage = 'Server Error: CONNECTION_REFUSED'
|
687
|
|
- console.log(err.status)
|
688
|
678
|
if (err.status) {
|
689
|
679
|
if (err.data.message) {
|
690
|
680
|
this.errorMessage = err.data.message
|
|
@@ -697,13 +687,10 @@ export default {
|
697
|
687
|
this.updateIndividual(this.individual).then(() => {
|
698
|
688
|
this.boolMessage = true
|
699
|
689
|
if (Log.getUser().role === 'Super Admin') {
|
700
|
|
- console.log('updateIndividual')
|
701
|
|
- console.log(this.individual)
|
702
|
690
|
if (
|
703
|
691
|
this.individual.id ===
|
704
|
692
|
JSON.parse(localStorage.getItem('person')).id
|
705
|
693
|
) {
|
706
|
|
- console.log('here 1')
|
707
|
694
|
var newPerson = {
|
708
|
695
|
id: JSON.parse(localStorage.getItem('person')).id,
|
709
|
696
|
email: this.individual.email,
|
|
@@ -717,7 +704,6 @@ export default {
|
717
|
704
|
}
|
718
|
705
|
//this.$router.push('/status/userManagementPage')
|
719
|
706
|
} else {
|
720
|
|
- console.log('here 2')
|
721
|
707
|
var newPerson = {
|
722
|
708
|
id: JSON.parse(localStorage.getItem('person')).id,
|
723
|
709
|
email: this.individual.email,
|
|
@@ -759,7 +745,6 @@ export default {
|
759
|
745
|
}
|
760
|
746
|
},
|
761
|
747
|
validatePage: function () {
|
762
|
|
- console.log('validatePage')
|
763
|
748
|
if (
|
764
|
749
|
this.individual.name &&
|
765
|
750
|
this.individual.surname &&
|
|
@@ -770,14 +755,12 @@ export default {
|
770
|
755
|
this.validPhoneNumber(this.individual.cellNumber) &&
|
771
|
756
|
this.validPhoneNumber(this.individual.telephone)
|
772
|
757
|
) {
|
773
|
|
- console.log('passed')
|
774
|
758
|
this.errorOccurred = ''
|
775
|
759
|
this.errorMessage = ''
|
776
|
760
|
this.boolValidationError = false
|
777
|
761
|
|
778
|
762
|
return true
|
779
|
763
|
} else {
|
780
|
|
- console.log('failed')
|
781
|
764
|
this.nameLoad = true
|
782
|
765
|
this.surnameLoad = true
|
783
|
766
|
this.emailAddressLoadLoad = true
|