|
|
|
|
@ -123,7 +123,7 @@ export default class extends ApplicationController {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
delete(ev) { |
|
|
|
|
var doctrine_id = this.element.dataset["doctrineId"], jurisprudence_id = this.element.dataset["jurisprudenceId"] |
|
|
|
|
var doctrine_id = this.element.dataset["doctrineId"], document_id = this.element.dataset["documentId"] |
|
|
|
|
|
|
|
|
|
ev.preventDefault(); |
|
|
|
|
const contrim_alert = confirm("Are you sure to delete this record?") |
|
|
|
|
@ -135,7 +135,7 @@ export default class extends ApplicationController {
|
|
|
|
|
$('.toast').addClass('bg-danger').show(); |
|
|
|
|
$( ".toast-body" ).html( "<span><b>Deleted Successfully</b></span>" ); |
|
|
|
|
$('.toast').fadeOut(5000); |
|
|
|
|
location.pathname = "/documents/" + jurisprudence_id |
|
|
|
|
location.pathname = "/documents/" + document_id |
|
|
|
|
}, |
|
|
|
|
error: function () { |
|
|
|
|
$('.toast').addClass('bg-danger').show(); |
|
|
|
|
|