Siiuuuuuuuuuuuuuuu
.update-container h2 {
font-size: 1.5em;
margin-bottom: 15px;
text-align: center;
color: #333;
}
.dropdown {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 20px;
font-size: 1em;
background-color: #fff;
}
.submit-btn {
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
font-size: 1em;
cursor: pointer;
transition: background-color 0.3s ease;
}
.submit-btn:hover {
backgrou
nd-color: #45a049;
}
const currentStatus = "In Transit"; // This value would be dynamically provided by your backend
function populateStatusOptions() {
const dropdown = document.getElementById("newTrackingStatus");
const allStatuses = ["Ordered", "Dispatched", "In Transit", "Out for Delivery", "Delivered"];
const currentStatusIndex = allStatuses.indexOf(currentStatus);
// Clear any existing options
dropdown.innerHTML = '';
// Populate only the next statuses based on the current status
for (let i = currentStatusIndex + 1; i < allStatuses.length; i++) {
const option = document.createElement("option");
option.value = allStatuses[i];
option.text = allStatuses[i];
dropdown.appendChild(option);
}
}
// Call this function to populate options when the page loads
populateStatusOptions();
/* To make the message visible */
.success-message.show {
opacity: 1;
}