Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[DQT] add delete feature #8078

Merged
merged 23 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/dqt/ajax/DeleteDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
$results = $cdb->deleteDoc($docID);
print json_encode($results);
} else {
print json_encode("false");
header("HTTP/1.1 404 Not Found");
kongtiaowang marked this conversation as resolved.
Show resolved Hide resolved
}
9 changes: 7 additions & 2 deletions modules/dqt/jsx/react.savedqueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,15 @@ function publicquerydelete() {
fetch(deleteurl, {
cache: 'no-cache',
credentials: 'same-origin',
}).then((resp) => resp.json())
}).then((resp) => {
if (resp.status == 200) {
swal.fire('delete Successful!', '', 'success');
} else {
swal.fire('delete Not Successful!', '', 'error');
}
})
kongtiaowang marked this conversation as resolved.
Show resolved Hide resolved
.then(()=>{
location.reload();
swal.fire('delete Successful!', '', 'success');
});
}
});
Expand Down