Index: src/main/resources/static/js/admin-terms.js
===================================================================
--- src/main/resources/static/js/admin-terms.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/admin-terms.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -1,5 +1,4 @@
 import { deleteAppointment, confirmCarriedOut, getUsersByTermExcept, removeRequestAndUpdateUser, removeAppointment, makeReservation ,displayDiv} from './shared.js';
 
-let lastClickedItem=null;
 let calendar = document.querySelector('.calendar')
 let importantDate;
@@ -110,15 +109,11 @@
     }));
 
-    const response=await fetch(`/api/appointments/create`, {
+    await fetch(`/api/appointments/create`, {
         method: 'POST',
         headers: {
             'Content-Type': 'application/json',
         },
-        body: JSON.stringify(requestBody)
-    });
-    if(response.ok){
-        location.reload();
-    }
-
+        body: JSON.stringify(requestBody) // Send all appointments in one request
+    });
 }
 document.getElementById('create-appointments').addEventListener('click', async function () {
@@ -129,5 +124,5 @@
     const interval = parseInt(document.getElementById('time-interval').value);
 
-    if (!startDate || !endDate || !startTime || !endTime || isNaN(interval)) {
+    if (!startDate || !endDate || !startTime || !endTime || !interval) {
         alert("Please fill out all the fields.");
         return;
@@ -147,5 +142,5 @@
             const existingTimes = existingMapped.get(date);
             if (checkOverlap(existingTimes, time)) {
-                conflictingAppointments.push(newAppointment);
+                conflictingAppointments.push(newAppointment);  // Add to conflict list if overlaps
             } else {
                 successfulAppointments.push(newAppointment);
@@ -245,6 +240,6 @@
         requestedRow.appendChild(couponCodeTd);
         requestedElement.appendChild(requestedRow);
+        displayDiv(dateTime);
     })
-    displayDiv(dateTime);
 }
 function getAllRequests(dateTime,containerId){
@@ -282,11 +277,6 @@
 
         itemDiv.addEventListener('click', async () => {
-            document.getElementById("summary").style.display='none';
             try{
-                if(lastClickedItem){
-                    lastClickedItem.style.backgroundColor="#f9f9f9";
-                }
-                lastClickedItem=itemDiv;
-                itemDiv.style.backgroundColor="grey";
+
                 const isReserved=await isAppointmentReserved(item.localDateTime);
                 const isEmpty=await isAppointmentEmpty(item.localDateTime);
@@ -295,5 +285,4 @@
                 cleanData("requested")
                 if (isReserved) {
-                    document.getElementById("summary").style.display='block';
                     document.getElementById("approved-table").style.display = 'block';
                     document.getElementById("requested-table").style.display = 'none';
@@ -303,4 +292,5 @@
                     deleteBtn.setAttribute("term",item.localDateTime);
                     deleteBtn.setAttribute("type","cancelledAppointmentByAdmin");
+                    //da go isprogramirash delete-approval
                     document.getElementById("delete-approval").addEventListener('click', function() {
                         removeAppointment(item.localDateTime,"cancelledAppointmentByAdmin");
@@ -317,5 +307,4 @@
                 }
                 else if(!isEmpty){
-                    document.getElementById("summary").style.display='block';
                     document.getElementById("approved-table").style.display = 'none';
                     document.getElementById("requested-table").style.display = 'block';
@@ -327,5 +316,4 @@
                 }
                 else{
-                    document.getElementById("summary").style.display='none';
                     document.getElementById("approved-table").style.display = 'none';
                     document.getElementById("requested-table").style.display = 'none';
@@ -377,4 +365,5 @@
     let currDate = new Date()
 
+    // if (!month) month = currDate.getMonth()
     console.log(month);
     if (typeof month !== 'number') month = currDate.getMonth();
@@ -385,4 +374,5 @@
     calendar_header_year.innerHTML = year
 
+    // get first day of month
 
     let first_day = new Date(year, month, 1)
@@ -405,5 +395,4 @@
             }
             day.addEventListener('click', () => {
-                document.getElementById("summary").style.display='none';
                 let temp=document.getElementsByClassName('curr-date');
                 Array.from(temp).forEach(element => {
@@ -469,5 +458,5 @@
     const otherPickersInterval = 30;
 
-    for (let hour = 7; hour < 22; hour++) {
+    for (let hour = 7; hour < 22; hour++) { // 0 to 23 for 24-hour format
         for (let minutes = 0; minutes < 60; minutes++) {
             const formattedHour = hour.toString().padStart(2, '0');
@@ -515,5 +504,4 @@
         .then(data => {
             console.log(data.message);
-            location.reload();
         })
         .catch(error => {
@@ -537,5 +525,4 @@
         if (response.ok) {
             alert("Free appointments for the selected date range were deleted.");
-            location.reload();
         } else {
             alert("An error occurred while trying to delete the appointments.");
Index: src/main/resources/static/js/adminNewsCoupons.js
===================================================================
--- src/main/resources/static/js/adminNewsCoupons.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/adminNewsCoupons.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -6,5 +6,4 @@
 let selectedImage;
 let questionable;
-let helper;
 
 let pageType;
@@ -39,5 +38,5 @@
                     imagePreview.style.display='inline';
                     imagePreview.innerHTML = `<img src="${e.target.result}" style="width: 100%; height: auto;">`;
-                    selectedImage =e.target.result ;
+                    selectedImage =e.target.result ; // Store the selected file
 
                     console.log(selectedImage);
@@ -301,5 +300,4 @@
         document.getElementById('text').value = param2;
         let importantValue=newsItem.querySelector('img').getAttribute("data-attribute");
-        selectedImage=importantValue;
         document.getElementById('main-image').innerHTML=`<img src="${importantValue}" style="width: 20%; height: 20%;">`;
     }
Index: src/main/resources/static/js/authentication-shared.js
===================================================================
--- src/main/resources/static/js/authentication-shared.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/authentication-shared.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -9,5 +9,5 @@
 
 function phoneCheck(phone){
-    const phonePattern = /^07\d\d{3}\d{3}$/;
+    const phonePattern = /^07\d-\d{3}-\d{3}$/;
     if (!phonePattern.test(phone)) {
         return false;
@@ -32,5 +32,5 @@
     return regex.test(password);
 }
-export async function verificationCheck(userData,condition) {
+export async function verificationCheck(userData) {
     if (!usernameCheck(userData.username)) {
         alert("Invalid username");
@@ -56,18 +56,16 @@
         }
     }
-    if(condition!==false){
-        const response = await fetch(`/api/users/checkDifferentUser`, {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json'
-            },
-            body: JSON.stringify(userData)
-        });
-        if (response.ok) {
-            return true;
-        } else {
-            return false;
-        }
+    const response = await fetch(`/api/users/checkDifferentUser`, {
+        method: "POST",
+        headers: {
+            'Content-Type': 'application/json'
+        },
+        body: JSON.stringify(userData)
+    });
+    if (response.ok) {
+        return true;
+    } else {
+        return false;
     }
-    return true;
+
 }
Index: src/main/resources/static/js/calendar.js
===================================================================
--- src/main/resources/static/js/calendar.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/calendar.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -1,3 +1,2 @@
-let lastClickedItem=null;
 let calendar = document.querySelector('.calendar')
 
@@ -20,7 +19,4 @@
         document.getElementById("last-check").innerHTML=window.selectedTime;
         showModal();
-        document.getElementById("coupon-type").selectedIndex=0;
-        document.getElementById("medical-condition").innerHTML='';
-
     }
 
@@ -75,5 +71,5 @@
 function displayFreeAppointments(appointments) {
     const container = document.getElementById('hourly-terms');
-    container.innerHTML = '';
+    container.innerHTML = ''; // Clear previous appointments
 
     appointments.forEach(appointment => {
@@ -92,12 +88,7 @@
 
         appointmentDiv.textContent = formattedTime;
-        appointmentDiv.dataset.time = formattedDate+" "+formattedTime;
+        appointmentDiv.dataset.time = formattedDate+" "+formattedTime; // Store full date-time
 
         appointmentDiv.addEventListener('click', () => {
-            if(lastClickedItem){
-                lastClickedItem.style.backgroundColor="white";
-            }
-            lastClickedItem=appointmentDiv;
-            lastClickedItem.style.backgroundColor="grey";
             window.selectedTime = appointmentDiv.dataset.time;
             document.getElementById('book-button').disabled = false;
@@ -118,6 +109,5 @@
 
     let currDate = new Date()
-
-    if (typeof month !== 'number') month = currDate.getMonth();
+    if (!month) month = currDate.getMonth()
     if (!year) year = currDate.getFullYear()
 
@@ -139,14 +129,5 @@
                             <span></span>`;
             let selectedDate = `${year}-${(month + 1).toString().padStart(2, '0')}-${(i - first_day.getDay() + 1).toString().padStart(2, '0')}`;
-            day.addEventListener('click', () => {
-                let temp=document.getElementsByClassName('curr-date');
-                Array.from(temp).forEach(element => {
-                    element.classList.remove('curr-date');
-                });
-                day.classList.add('curr-date');
-                document.getElementById("coupon-type").selectedIndex=0;
-                document.getElementById("medical-condition").value='';
-                fetchFreeOrPendingAppointments(selectedDate);
-            })
+            day.addEventListener('click', () => fetchFreeOrPendingAppointments(selectedDate));
 
             if (i - first_day.getDay() + 1 === currDate.getDate() && year === currDate.getFullYear() && month === currDate.getMonth()) {
@@ -195,25 +176,3 @@
 
 
-window.onload = async function () {
-temp=document.getElementById("coupon-type");
-    try{
-        const response = await fetch(`/api/coupons/getCouponNames`);
-        if (response.ok) {
-            const couponNames = await response.json();
-            console.log("Coupons:", couponNames);
 
-            couponNames.forEach(coupon => {
-                const option = document.createElement("option");
-                option.value = coupon;
-                option.textContent = coupon;
-                temp.appendChild(option);
-            });
-        } else {
-            console.log(response.statusText);
-        }
-    }
-    catch(error){
-        console.error("Error fetching coupons:", error);
-    }
-
-};
Index: src/main/resources/static/js/cookie.js
===================================================================
--- src/main/resources/static/js/cookie.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ 	(revision )
@@ -1,118 +1,0 @@
-let loggedInUser = false;
-const checkIntervalDuration = 1000;
-function getRoleFromCookie() {
-    const name = "role=";
-    const decodedCookie = decodeURIComponent(document.cookie);
-    const cookieArray = decodedCookie.split(';');
-    for(let i = 0; i <cookieArray.length; i++) {
-        let cookie = cookieArray[i];
-        while (cookie.charAt(0) === ' ') {
-            cookie = cookie.substring(1);
-        }
-        if (cookie.indexOf(name) === 0) {
-            return cookie.substring(name.length, cookie.length);
-        }
-    }
-    return "";
-}
-function getCookie(name) {
-    const value = `; ${document.cookie}`;
-    const parts = value.split(`; ${name}=`);
-    if (parts.length === 2) return parts.pop().split(';').shift();
-    return undefined;
-}
-function checkCookieAndUpdateUI() {
-    const username = getCookie('username');
-    const userRole=getRoleFromCookie();
-    console.log(userRole);
-    const authButton = document.getElementById('authButton');
-
-    if (username) {
-        if (!loggedInUser) {
-            loggedInUser = true;
-            authButton.innerText = 'Logout';
-            authButton.style.display = 'block';
-            localStorage.setItem('lastCheck', Date.now());
-        }
-        else{
-            if(window.location.pathname === '/'){
-                if(userRole==="ADMIN"){
-                    window.location.href = '/admin.html';
-                }
-                else{
-                    const personalisedSection=document.getElementById("personalised");
-                    personalisedSection.innerHTML=`Добредојде, ${username}!`;
-                    document.getElementsByClassName("logged-in")[0].style.display='block';
-                    document.getElementById("adminSection").style.display='none';
-                }
-
-            }
-        }
-
-    }
-        else {
-        if (loggedInUser) {
-            loggedInUser = false;
-            authButton.style.display = 'none';
-           // deleteCookie('username')
-            window.location.href = '/';
-        }
-    }
-}
-
-
-
-function startCookieCheckInterval() {
-    if (!window.cookieCheckInterval) {
-        window.cookieCheckInterval = setInterval(() => {
-            const lastCheck = localStorage.getItem('lastCheck');
-            const timeSinceLastCheck = Date.now() - (lastCheck ? parseInt(lastCheck) : 0);
-            if (timeSinceLastCheck >= checkIntervalDuration) {
-                checkCookieAndUpdateUI();
-            }
-        }, 10);
-    }
-}
-function deleteCookie(name) {
-    document.cookie = name + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
-}
-function resetAuthState() {
-    loggedInUser = false;
-    const authButton = document.getElementById('authButton');
-    authButton.style.display = 'none';
-    localStorage.removeItem('lastCheck');
-    clearInterval(window.cookieCheckInterval);
-    window.cookieCheckInterval = null;
-}
-
-window.addEventListener('load',function() {
-
-    const wasRefreshed=sessionStorage.getItem("refreshed");
-    if(wasRefreshed){
-        //deleteCookie("username");
-        sessionStorage.removeItem("refreshed")
-        if(getRoleFromCookie()==="ADMIN"){
-            window.location.href="/admin.html";
-        }
-        else{
-            window.location.href="/";
-        }
-    }
-    else{
-        sessionStorage.setItem("refreshed","true")
-    }
-    checkCookieAndUpdateUI();
-    startCookieCheckInterval();
-    let authButton=document.getElementById("authButton");
-    authButton.addEventListener('click', () => {
-        if (authButton.innerText === 'Logout') {
-            deleteCookie('username');
-            deleteCookie('role');
-            resetAuthState();
-                window.location.href="/";
-        }
-    });
-});
-window.addEventListener("beforeunload", function() {
-    sessionStorage.removeItem("refreshed");
-});
Index: src/main/resources/static/js/editUser.js
===================================================================
--- src/main/resources/static/js/editUser.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/editUser.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -3,5 +3,5 @@
 import { verificationCheck } from './authentication-shared.js';
 
-let loggedPerson,checkDifferent;
+let loggedPerson;
 const modal = document.getElementById('popupModal');
 const cancelBtn = document.getElementById('cancelBtn');
@@ -71,4 +71,5 @@
         counter= user.carriedOut.length;
     }
+    console.log(counter);
     return counter;
 }
@@ -121,15 +122,14 @@
             buttonCell.appendChild(button1);
             button2.textContent = "Потврди одржан";
+            button2.addEventListener('click',()=>
+                function(){
+                modal.style.display='flex';
+                approveBtn.addEventListener('click', () => {
+                    const userInput = document.getElementById('userInput').value;
+                    confirmCarriedOut(request.term,userInput);
+                    modal.style.display = 'none'; // Close the modal after approval
+                });
+            });
             buttonCell.appendChild(button2);
-            button2.addEventListener('click',()=> {
-                modal.style.display='flex';
-                document.getElementById("userInput").disabled=false;
-            });
-            approveBtn.addEventListener('click', () => {
-                const userInput = document.getElementById('userInput').value;
-                confirmCarriedOut(request.term,userInput);
-                modal.style.display = 'none';
-            });
-
         }
 
@@ -146,5 +146,5 @@
     if(selectedValue==="requests"){
         url=`/api/requests/listAll?username=${loggedPerson.username}`;
-        tHeadArray=["Термин","Медицинска состојба","Опции"];
+        tHeadArray=["Термин", "Опции"];
         createHeader(tHeadArray);
         getAll(url);
@@ -153,5 +153,5 @@
         let testTemp="RESERVED";
         url=`/api/appointments/listAll?username=${loggedPerson.username}&status=${testTemp}`;
-        tHeadArray=["Термин","Медицинска состојба", "Опции"];
+        tHeadArray=["Термин", "Опции"];
         createHeader(tHeadArray);
         getAll(url);
@@ -230,5 +230,5 @@
         .catch(error => {
             console.error('Error fetching user data:', error);
-            return { name: '', surname: '' };
+            return { name: '', surname: '' };  // return empty values on error
         });
 }
@@ -267,6 +267,9 @@
         if (cookieUsername) {
             fetchUserData(cookieUsername,"USER").then(userData => {
-            console.log("success")
+                const fullName = `${userData.name} ${userData.surname}`;
+                document.getElementById('cookie-name').innerHTML = fullName;
             });
+        } else {
+            document.getElementById('cookie-name').textContent = 'Default Name';
         }
     }
@@ -274,14 +277,13 @@
 function saveProfileChanges() {
     const userName = document.querySelector('input[name="username"]').value;
-    const phoneNum=document.querySelector('input[name="phone"]').value.replace(/-/g,"")
-    console.log(phoneNum);
+    console.log(userName);
     const updatedData = {
         username: userName,
         name: document.querySelector('input[name="firstName"]').value,
         surname: document.querySelector('input[name="lastName"]').value,
-        phone: phoneNum,
+        phone: document.querySelector('input[name="phone"]').value,
         age: document.querySelector('input[name="age"]').value
     };
-    if(!verificationCheck(updatedData,checkDifferent)){
+    if(!verificationCheck(updatedData)){
         return;
     }
@@ -297,5 +299,5 @@
         .then(data => {
             alert('Profile updated successfully!');
-            toggleEditing(false);
+            toggleEditing(false); // Disable fields after saving changes
             updateCookieUsername(userName);
         })
@@ -311,11 +313,4 @@
     };
 }
-function removeOptions(){
-    if(getRoleFromCookie()!=="ADMIN"){
-        let temp=this;
-        temp.removeChild(document.getElementById("requests"));
-        temp.removeChild(document.getElementById("appointments"))
-    }
-}
 
 function toggleEditing(isEnabled) {
@@ -327,17 +322,13 @@
 
 window.onload = function(){
-    checkDifferent=true;
     updateProfile();
     toggleEditing(false);
     document.getElementById('edit-profile').addEventListener('click', function() {
        const role=getQueryParams();
-       if(role.param1 ==='ADMIN'){
-           toggleEditing(true);
-           checkDifferent=false;
-       }
-
+       if(role.param1 ==='ADMIN')
+        toggleEditing(true);
     });
     document.getElementById('saveChanges').addEventListener('click', saveProfileChanges);
     document.getElementById("statusDropdown").addEventListener('change',createRowsBasedOnType);
-    document.getElementById("statusDropdown").addEventListener('click',removeOptions);
-}
+
+}
Index: src/main/resources/static/js/index.js
===================================================================
--- src/main/resources/static/js/index.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/index.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -1,3 +1,4 @@
 import { verificationCheck } from "./authentication-shared.js";
+
 function toggleForm(formId, show) {
         const form = document.getElementById(formId);
@@ -59,11 +60,8 @@
                 });
             }
-            else{
-                alert("Sign in successfull! Now log in!")
-            }
             return response.json();
         })
         .then(data => {
-            console.log(data.message);
+            console.log(data.message); // Handle success message
         })
         .catch(error => {
@@ -99,4 +97,8 @@
             console.log('Parsed data:', data);
             if (data.success) {
+                const name=data.name;
+                const surname=data.surname;
+                const personalisedSection=document.getElementById("personalised");
+                personalisedSection.innerHTML=`Добредојде, ${name} ${surname}!`;
                 updateUIBasedOnRole(data.userRole);
             }
@@ -106,4 +108,5 @@
         })
         .finally(() => {
+            // Close the form after handling the response
             toggleForm('loginForm', false);
         });
Index: src/main/resources/static/js/shared.js
===================================================================
--- src/main/resources/static/js/shared.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/shared.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -21,7 +21,4 @@
             if (!response.ok) {
                 throw new Error('Failed to delete the appointment');
-            }
-            else{
-                location.reload();
             }
         })
@@ -50,5 +47,4 @@
 
             if (updateResponse.ok) {
-                location.reload();
                 console.log(`User updated successfully in carried_out`);
             } else {
@@ -140,5 +136,4 @@
 
             }
-            location.reload();
 
         } else {
@@ -154,5 +149,4 @@
         if (response.ok) {
             console.log('Appointment added successfully.');
-            location.reload();
         } else {
             const text = await response.text();
@@ -166,12 +160,10 @@
 export function displayDiv(dateTime,username){
     if (typeof username !== 'undefined'){
-        makeReservation(dateTime, username);
+        makeReservation(dateTime,username);
     }
     else{
-        let temp=document.getElementById("confirm-approval");
-        temp.addEventListener('click',()=>{
-            const approvedUser = document.getElementById("username-approval").value;
-            makeReservation(dateTime,approvedUser)
-        });
+        const inputValue = document.getElementById("username-approval");
+        const approvedUser = inputValue.value;
+        document.getElementById("confirm-approval").addEventListener('click',makeReservation(dateTime,approvedUser));
     }
 }
Index: src/main/resources/static/js/terms.js
===================================================================
--- src/main/resources/static/js/terms.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/terms.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -50,5 +50,5 @@
     dialog.setAttribute("id","dialogPopUp");
     const message = document.createElement('p');
-    message.textContent = 'Дали сте сигурни дека сакате да откажете?';
+    message.textContent = 'Are you sure you want to cancel the reservation?';
     dialog.appendChild(message);
     const yesButton = document.createElement('button');
@@ -107,8 +107,8 @@
         row.appendChild(termCell);
         const nameCell = document.createElement('td');
-        nameCell.textContent = request.name;
+        nameCell.textContent = request.name; // Format date
         row.appendChild(nameCell);
         const surnameCell = document.createElement('td');
-        surnameCell.textContent = request.surname;
+        surnameCell.textContent = request.surname; // Format date
         row.appendChild(surnameCell);
         const couponCodeCell = document.createElement('td');
@@ -119,5 +119,5 @@
         row.appendChild(additionalInfoCell);
         const usernameCell = document.createElement('td');
-        usernameCell.textContent = request.username;
+        usernameCell.textContent = request.username; // Format date
         row.appendChild(usernameCell);
         const buttonCell = document.createElement('td');
@@ -139,4 +139,5 @@
     const oldHead = document.getElementById('initial-head');
     if (thead) {
+        console.log("cleaned")
         thead.innerHTML = '';
     }
@@ -164,5 +165,5 @@
         const row = document.createElement('tr');
         const termCell = document.createElement('td');
-        termCell.textContent = replaceWithSpace(request.dateTime);
+        termCell.textContent = replaceWithSpace(request.dateTime); // Format date
         row.appendChild(termCell);
         const userCell = document.createElement('td');
@@ -170,5 +171,5 @@
         row.appendChild(userCell);
         const adminCell = document.createElement('td');
-        adminCell.textContent = request.adminNote;
+        adminCell.textContent = request.adminNote; // Format date
         row.appendChild(adminCell);
         const statusCell = document.createElement('td');
Index: src/main/resources/static/js/userInfo.js
===================================================================
--- src/main/resources/static/js/userInfo.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ 	(revision )
@@ -1,37 +1,0 @@
-const couponsFrame=document.getElementById("coupons-frame");
-const newsFrame=document.getElementById("news-frame");
-window.addEventListener('load',async function(){
-    try{
-        const response1=await fetch(`/api/coupons/getAllCoupons`);
-        const response2=await fetch(`/api/news/getAllEvents`);
-        if(response1.ok){
-            const coupons=await response1.json();
-            coupons.forEach(coupon=>{
-                const couponDiv=document.createElement("div");
-                couponDiv.classList.add("new-item");
-                couponDiv.innerHTML=`<h3>${coupon.title}</h3><p>${coupon.code}</p><p>${coupon.description}</p>`;
-
-                couponsFrame.appendChild(couponDiv);
-            })
-        }
-        else{
-            console.log("error with coupons")
-        }
-        if(response2.ok){
-            const news=await response2.json();
-            news.forEach(event=>{
-                const eventDiv=document.createElement("div");
-                eventDiv.classList.add("new-item");
-                eventDiv.innerHTML=`<h3>${event.title}</h3><p>${event.text}</p>${event.imgSrc ? `<img src="${event.imgSrc}" style="width: 80%; height: auto;" data-attribute="${event.imgSrc}">` : ''}`;
-
-                newsFrame.appendChild(eventDiv);
-            })
-        }
-        else{
-            console.log("error with news")
-        }
-    }
-    catch(error){
-        console.error("Error fetching data:", error);
-    }
-});
Index: src/main/resources/static/js/users-view.js
===================================================================
--- src/main/resources/static/js/users-view.js	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/resources/static/js/users-view.js	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -12,4 +12,5 @@
 }
 function calculateAge(dateBirth){
+    console.log(dateBirth);
     const [year, month, day] = dateBirth.split('-').map(Number);
     const birthDate = new Date(year, month - 1, day);
@@ -54,4 +55,5 @@
         button.addEventListener('click',()=>{
             let temp=user.username;
+            console.log(temp);
                 const params = new URLSearchParams({ param1: 'ADMIN', param2: temp }).toString();
                 window.location.href = `editUser.html?${params}`;
@@ -88,4 +90,5 @@
    document.getElementById("search-input-container").style.display = 'none';
     const selectedValue = event.currentTarget.value;
+    console.log(selectedValue);
     if(selectedValue!=='defaultValue')
     filterUsers("status",selectedValue).then(r => console.log(r));
@@ -95,8 +98,10 @@
     setInitialSelectValue(userStatusElement);
     const dataCheck = event.currentTarget.value;
+    console.log(dataCheck);
     updateSearchInputVisibility(dataCheck);
 
     document.getElementById("search-button").addEventListener('click',function (){
         let filterTemp=document.getElementById("search-input");
+        console.log(filterTemp.value);
         filterUsers(dataCheck,filterTemp.value).then(r => console.log(r));
         filterTemp.value='';
