This commit is contained in:
Zhora Shalyapin 2025-03-14 14:45:41 +00:00
parent b604b377ed
commit 685e1db1f5

20
main.js
View File

@ -206,6 +206,14 @@
return isCpManagement() && getAction() === null
}
function isCpEditPage() {
return isCpManagement() && getAction() === "edit"
}
function isCpDeletePage() {
return isCpManagement() && getAction() === "delete"
}
function isRouteListPage() {
return isRouteManagement() && getAction() === null
}
@ -217,14 +225,6 @@
function isRouteMapPage() {
return isRouteManagement() && getAction() === "map"
}
function isEditCpPage() {
return isCpManagement() && getAction() === "edit"
}
function isDeleteCpPage() {
return isCpManagement() && getAction() === "delete"
}
async function updatePoint(formData) {
return await fetch(`https://runcity.geo.rictum.ru/api/competitions/${getCompetition()}/update`, {
@ -1798,7 +1798,7 @@
/* SWITCH FOR DIFFERENT PAGES */
if (isDeleteCpPage()) {
if (isCpDeletePage()) {
bindDeleteButton()
return
}
@ -1815,7 +1815,7 @@
addStickyMenu()
if (isEditCpPage()) {
if (isCpEditPage()) {
prettifyEditCpPage()
}