fix:styling for time-slot
This commit is contained in:
parent
c5420bb453
commit
4856645b6d
@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-3" id="timeslot-container">
|
<div class="mt-3" id="timeslot-container">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center mt-3">
|
<div class="row justify-content-center mt-3">
|
||||||
|
@ -99,12 +99,6 @@ async function update_time_slots(selected_date, selected_timezone) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.slots.forEach((slot, index) => {
|
window.slots.forEach((slot, index) => {
|
||||||
// Add a break after each 8 elements
|
|
||||||
if (index % 8 == 0) {
|
|
||||||
let break_element = document.createElement('div');
|
|
||||||
break_element.classList.add('w-100');
|
|
||||||
timeslot_container.appendChild(break_element);
|
|
||||||
}
|
|
||||||
// Get and append timeslot div
|
// Get and append timeslot div
|
||||||
let timeslot_div = get_timeslot_div_layout(slot)
|
let timeslot_div = get_timeslot_div_layout(slot)
|
||||||
timeslot_container.appendChild(timeslot_div);
|
timeslot_container.appendChild(timeslot_div);
|
||||||
@ -116,7 +110,6 @@ function get_timeslot_div_layout(timeslot) {
|
|||||||
let start_time = new Date(timeslot.time)
|
let start_time = new Date(timeslot.time)
|
||||||
let timeslot_div = document.createElement('div');
|
let timeslot_div = document.createElement('div');
|
||||||
timeslot_div.classList.add('time-slot');
|
timeslot_div.classList.add('time-slot');
|
||||||
timeslot_div.classList.add('col-md');
|
|
||||||
if (!timeslot.availability) {
|
if (!timeslot.availability) {
|
||||||
timeslot_div.classList.add('unavailable')
|
timeslot_div.classList.add('unavailable')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user