handleSave() {
        this.handleClose();
        if (this.state.show) {
            this.handleRecipientDelete(this.state.recipientToDelete);
            this.handleLocationDelete(this.state.locationToDelete);
            this.setState({recipientToDelete: {}, locationToDelete: {}});
        }
        else if (this.state.allShow) {
            this.handleAllRecipientsDelete(this.state.allRecipientsDelete);
            this.handleAllLocationsDelete(this.state.allLocationsDelete);
            this.setState({ allRecipientsDelete: [], allLocationsDelete: [] });
        }
    }
// For deleting 1 or all recipients with associated locations
For deleting 1 or all recipients with associated locations
For deleting 1 or all recipients with associated locations
handleSave() {
        this.handleClose();
        if (this.state.show) {
            this.handleRecipientDelete(this.state.recipientToDelete);
            this.handleLocationDelete(this.state.locationToDelete);
            this.setState({recipientToDelete: {}, locationToDelete: {}});
        }
        else if (this.state.allShow) {
            this.handleAllRecipientsDelete(this.state.allRecipientsDelete);
            this.handleAllLocationsDelete(this.state.allLocationsDelete);
            this.setState({ allRecipientsDelete: [], allLocationsDelete: [] });
        }
    }
handleSave ( ) { this . handleClose ( ) ; if ( this . state . show ) { this . handleRecipientDelete ( this . state . recipientToDelete ) ; this . handleLocationDelete ( this . state . locationToDelete ) ; this . setState ( { recipientToDelete : { } , locationToDelete : { } } ) ; } else if ( this . state . allShow ) { this . handleAllRecipientsDelete ( this . state . allRecipientsDelete ) ; this . handleAllLocationsDelete ( this . state . allLocationsDelete ) ; this . setState ( { allRecipientsDelete : [ ] , allLocationsDelete : [ ] } ) ; } }
For deleting 1 or all recipients with associated locations
For deleting 1 or all recipients with associated locations