added reactivity to post delete and patch
This commit is contained in:
@ -23,25 +23,25 @@ async function uploadResearchBibTexPdf(pdf){
|
||||
|
||||
// Date when sent!!
|
||||
|
||||
function postNewResearch(){
|
||||
async function postNewResearch(){
|
||||
toPost.releaseDate = new Date()
|
||||
toPost.author = props.researcher
|
||||
//the Pdf is required and a title
|
||||
console.log(!toPost.pdfLocation == null|| toPost.title == null || toPost.title === "")
|
||||
//the Pdf and a title are required
|
||||
if (toPost.pdfLocation == null || toPost.title == null || toPost.title === "") {
|
||||
emit("modal-close")
|
||||
return;
|
||||
}
|
||||
postResearch(toPost)
|
||||
await postResearch(toPost)
|
||||
toPost = Object.assign({}, {});
|
||||
emit("modal-close")
|
||||
emit("posted")
|
||||
}
|
||||
|
||||
function cancelPost(){
|
||||
emit("modal-close")
|
||||
toPost = Object.assign({}, {});
|
||||
}
|
||||
const emit = defineEmits(["modal-close"]);
|
||||
const emit = defineEmits(["modal-close","posted"]);
|
||||
|
||||
const target = ref(null)
|
||||
onClickOutside(target, ()=>emit('modal-close'))
|
||||
|
Reference in New Issue
Block a user