fixed signup and renaming problems

This commit is contained in:
2024-03-12 17:46:44 +01:00
parent d1bdffb834
commit acae90ee13
17 changed files with 96 additions and 78 deletions

View File

@ -232,7 +232,7 @@ const updateSolution = async () => {
counter += 1;
}
});
if (counter == 1) {
if (counter == 2) {
alert("This solution name already exists. Please choose an unique solution name or modify respectively delete the old one!");
sol.value.solutionName = '';
return;
@ -276,9 +276,6 @@ const confirmDeleteSolution = async () => {
if (confirm("Do you really want to delete this solution? It cannot be undone!")) {
try {
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteSolution/${chosenSolutionId.value}`);
store.commit('undoDelete');
store.commit('resetStore');
store.commit('changeToSolutionlist');
} catch (err) {
console.log(err.response.statusText);
}
@ -287,6 +284,9 @@ const confirmDeleteSolution = async () => {
} catch (err) {
console.log(err.response.statusText);
}
store.commit('undoDelete');
store.commit('resetStore');
store.commit('changeToSolutionlist');
} else {
store.commit('undoDelete');
}