Skip to content

Commit

Permalink
delete
Browse files Browse the repository at this point in the history
  • Loading branch information
vozmitelvlas committed Dec 15, 2024
1 parent aa75a7a commit 5531071
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 9 additions & 0 deletions frontend/src/components/SignIn/SignIn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ export default function SignIn() {
"[email protected]": false
}))
})
// let id = 0
// await axios.get(`http://localhost:8080/forms/available/redactors/${id}`).then((res) => {
// console.log("res - ", res.data);
// dispatch(setUsers({
// "[email protected]": false,
// "[email protected]": false,
// "[email protected]": false
// }))
// })

navigate("/tables");
} catch (error) {
Expand Down
15 changes: 6 additions & 9 deletions frontend/src/components/Tables/Tables.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,13 @@ export default function Tables() {
};

let activeForm = null;
const deleteForm = () => {
const deleteForm = async () => {
if (activeForm) {
console.log("удаляем activeForm и загружаем оставшиеся", activeForm);
// if (isCloseButton) {
// let formIdToDelete = Form.dataset.id
// await axios.post("http://localhost:8080/forms/delete", { ownerMail: mail, idToDelete: formIdToDelete });
await axios.delete(`http://localhost:8080/forms/${activeForm.id}}`);

// const res = await axios.get(`http://localhost:8080/forms/${mail}`);
// dispatch(setBrokers(res.data));
// }
const res = await axios.get(`http://localhost:8080/forms/${mail}`);
dispatch(setBrokers(res.data));
}
};

Expand Down Expand Up @@ -193,11 +190,11 @@ export default function Tables() {
let editModal = editModalWindow.querySelector(".edit-modal")

let error = editModal.querySelector("span")
if(error){
if (error) {
console.log("asd");
error.innerText = `${Math.random()}`
}
else{
else {
let errorSpan = document.createElement("span")
errorSpan.className = "error-message-block"
errorSpan.innerText = "Ошибка"
Expand Down

0 comments on commit 5531071

Please sign in to comment.