| | |
| | | this.dispatchEvent(event3); |
| | | return; |
| | | } |
| | | await updateStatuById().then(result=>{ |
| | | this.dispatchEvent(event2); |
| | | location.href = this.SubAuthorized.Id; |
| | | }).catch(error=>{ |
| | | const eventError = new ShowToastEvent({ |
| | | await updateStatuById({Id : this.recordId}).then(result=>{ |
| | | if(result!='success'){ |
| | | const eventError = new ShowToastEvent({ |
| | | message: |
| | | error.message, |
| | | result, |
| | | variant : 'error' |
| | | }); |
| | | this.dispatchEvent(eventError); |
| | | }) |
| | | }); |
| | | this.dispatchEvent(eventError); |
| | | } |
| | | else{ |
| | | this.dispatchEvent(event2); |
| | | location.href = this.SubAuthorized.Id; |
| | | } |
| | | }); |
| | | } |
| | | } |