+
-
+
-
- 1.
-
-
-
- Adrian Trela
- Adam Kowalski
-
-
-
- Dopuszczeni do turnieju
-
-
-
-
- Zapis opłacony
-
-
-
-
+
+ 1.
-
-
-
- 1.
-
-
-
- Adrian Trela
- Adam Kowalski
-
-
-
- Dopuszczeni do turnieju
-
-
-
-
- Zapis opłacony
-
-
-
-
+
+ Adrian Trela
+ Adam Kowalski
+
+ Dopuszczeni do turnieju
+
+
+
+
+ Zapis opłacony
+
+
+
+
-
-->
-
-
-
-
-
-
+
+
+
+
diff --git a/frontend/normal_user/app.js b/frontend/normal_user/app.js
index 01be7e1..c040569 100644
--- a/frontend/normal_user/app.js
+++ b/frontend/normal_user/app.js
@@ -27,9 +27,10 @@ function checkRoleCreator() {
function tournamentDelete(id) {
- event.cancelBubble = true;
- if (event.stopPropagation) event.stopPropagation();
+
console.log(id)
+ let textId = id.toString()
+ console.log(textId)
fetch('https://dragonmaster.pl/inz/tournament', {
method: "DELETE",
headers: {
@@ -39,15 +40,19 @@ function tournamentDelete(id) {
body: JSON.stringify(
{
- "id": id
+ "id": textId
}
)
}
)
.then(res => res.json())
- .then(data => console.log(data))
+ .then(data => {
+ console.log(data)
+ location.reload()
+ })
.catch(error => console.log(error))
+
}
@@ -59,7 +64,7 @@ async function renderTournaments(organiserTournament) {
organiser = `${tournament.creator}`;
// console.log(organiser)
if (organiser == organiserTournament) {
- let htmlSegment = `
`
diff --git a/frontend/normal_user/index.html b/frontend/normal_user/index.html
index ca42c54..785a9e8 100644
--- a/frontend/normal_user/index.html
+++ b/frontend/normal_user/index.html
@@ -9,7 +9,7 @@
-
+
diff --git a/frontend/normal_user/logowanie/index.html b/frontend/normal_user/logowanie/index.html
index 9bd0463..20a0efb 100644
--- a/frontend/normal_user/logowanie/index.html
+++ b/frontend/normal_user/logowanie/index.html
@@ -5,7 +5,7 @@
-
Paddle tournament system
+
Padle tournament system
diff --git a/frontend/panel_organizatora/dodawanie turnieju/app.js b/frontend/panel_organizatora/dodawanie turnieju/app.js
index 4db1cb4..421c62a 100644
--- a/frontend/panel_organizatora/dodawanie turnieju/app.js
+++ b/frontend/panel_organizatora/dodawanie turnieju/app.js
@@ -27,8 +27,33 @@
// '","category":"' + "cat1" +
// '","}');
// });
+function checkCheckBox() {
+ let checkBox = document.getElementById("checkBox");
+
+ if (checkBox.checked == true) {
+ return ("TRUE")
+ }
+ else {
+ return ("FALSE")
+ }
+}
+
+function checkRankingBox() {
+ let checkBox = document.getElementById("checkBoxRanking");
+
+ if (checkBox.checked == true) {
+ return ("1")
+ }
+ else {
+ return ("0")
+ }
+}
function createTournament() {
+ let rankingChecker = checkRankingBox();
+ console.log(rankingChecker)
+ let checker = checkCheckBox();
+ console.log(checker)
fetch('https://dragonmaster.pl/inz/tournament', {
method: "PUT",
headers: {
@@ -40,9 +65,9 @@ function createTournament() {
"name": document.getElementById("name").value,
"typeOfLadder": "string",
"pointsForTournament": "1",
- "places": "1",
+ "places": "12",
"roles": "role",
- "ranked": document.getElementById("rank").value,
+ "ranked": rankingChecker,
"place": document.getElementById("place").value,
"from": document.getElementById("term_from").value,
"to": document.getElementById("term_to").value,
@@ -53,14 +78,17 @@ function createTournament() {
"entriesTo": document.getElementById("entries").value,
"additionalInformations": document.getElementById("add-info").value,
"categotry": document.getElementById("category").value,
- "visibility": "TRUE"
+ "visibility": checker
}
)
}
)
.then(res => res.json())
- .then(data => console.log(data))
+ .then(data => {
+ console.log(data)
+ window.location.href = '../../normal_user/index.html'
+ })
.catch(error => console.log(error))
}
diff --git a/frontend/panel_organizatora/dodawanie turnieju/index.html b/frontend/panel_organizatora/dodawanie turnieju/index.html
index ae6a491..5dbf393 100644
--- a/frontend/panel_organizatora/dodawanie turnieju/index.html
+++ b/frontend/panel_organizatora/dodawanie turnieju/index.html
@@ -99,7 +99,7 @@
Widoczność turnieju
-
+
@@ -111,7 +111,7 @@
-
+
diff --git a/frontend/panel_organizatora/edycja turnieju/app.js b/frontend/panel_organizatora/edycja turnieju/app.js
index db8a326..3b3cb10 100644
--- a/frontend/panel_organizatora/edycja turnieju/app.js
+++ b/frontend/panel_organizatora/edycja turnieju/app.js
@@ -27,8 +27,33 @@
// '","category":"' + "cat1" +
// '","}');
// });
+function checkCheckBox() {
+ let checkBox = document.getElementById("checkBox");
+
+ if (checkBox.checked == true) {
+ return ("TRUE")
+ }
+ else {
+ return ("FALSE")
+ }
+}
+
+function checkRankingBox() {
+ let checkBox = document.getElementById("checkBoxRanking");
+
+ if (checkBox.checked == true) {
+ return ("1")
+ }
+ else {
+ return ("0")
+ }
+}
function createTournament() {
+ let rankingChecker = checkRankingBox();
+ console.log(rankingChecker)
+ let checker = checkCheckBox();
+ console.log(checker)
fetch('https://dragonmaster.pl/inz/tournament', {
method: "POST",
headers: {
@@ -52,7 +77,7 @@ function createTournament() {
"entriesTo": document.getElementById("entries").value,
"additionalInformations": document.getElementById("add-info").value,
"categotry": document.getElementById("category").value,
- "visibility": "TRUE"
+ "visibility": checker
}
)
}
diff --git a/frontend/panel_organizatora/edycja turnieju/index.html b/frontend/panel_organizatora/edycja turnieju/index.html
index 11302db..0534bb8 100644
--- a/frontend/panel_organizatora/edycja turnieju/index.html
+++ b/frontend/panel_organizatora/edycja turnieju/index.html
@@ -1,6 +1,6 @@
+ xmlns="http://www.w3.org/1999/html">
@@ -9,20 +9,20 @@
Padel Tournaments System
-
+