You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
971 B
JavaScript
21 lines
971 B
JavaScript
document.addEventListener('DOMContentLoaded', function () {
|
|
const customerButtons = document.querySelectorAll('.customerButton');
|
|
const staffButtons = document.querySelectorAll('.staffButton');
|
|
const customerContainers = document.querySelectorAll('.recentltLoggedCustomersContainer');
|
|
const staffContainers = document.querySelectorAll('.recentltLoggedStaffsContainer');
|
|
|
|
customerButtons.forEach(button => {
|
|
button.addEventListener('click', function () {
|
|
customerContainers.forEach(container => container.classList.remove('hidden'));
|
|
staffContainers.forEach(container => container.classList.add('hidden'));
|
|
});
|
|
});
|
|
|
|
staffButtons.forEach(button => {
|
|
button.addEventListener('click', function () {
|
|
staffContainers.forEach(container => container.classList.remove('hidden'));
|
|
customerContainers.forEach(container => container.classList.add('hidden'));
|
|
});
|
|
});
|
|
});
|