diff --git a/.DS_Store b/.DS_Store index a742d8b..35b687b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 1abc760..50a2c02 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ # misc -.DS_Store +**/.DS_Store .env.local .env.development.local .env.test.local diff --git a/app/.DS_Store b/app/.DS_Store index 6dbe7dc..a005b59 100644 Binary files a/app/.DS_Store and b/app/.DS_Store differ diff --git a/client/src/App.css b/client/src/App.css index c936391..4966630 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -692,10 +692,29 @@ input[type="number"] { /* box-sizing: border-box; */ } -/* Exclude react-time-picker inputs from the padding rules above */ -.react-time-picker__inputGroup__input { - padding-left: initial; - padding-right: initial; +/* Exclude react-time-picker inputs from the global input styles above */ +.react-time-picker .react-time-picker__inputGroup__input { + height: auto !important; + padding-left: 1px !important; + padding-right: 1px !important; + border: none !important; + border-radius: 0 !important; + box-sizing: content-box !important; + min-width: 0; + font-variant-numeric: tabular-nums; + letter-spacing: normal; + text-align: center; +} + +/* Add spacing between the ":" divider and the minute input */ +.react-time-picker .react-time-picker__inputGroup__divider { + padding: 0 3px; +} + +/* Ensure the leading zero and minute digit inputs have no extra spacing */ +.react-time-picker .react-time-picker__inputGroup__leadingZero { + padding: 0; + margin: 0; } input[type="email"] { diff --git a/client/src/components/events/EventsCalendar.js b/client/src/components/events/EventsCalendar.js index 138f2b7..5a50b26 100644 --- a/client/src/components/events/EventsCalendar.js +++ b/client/src/components/events/EventsCalendar.js @@ -1,4 +1,4 @@ -import React, {useState, useEffect} from "react"; +import React, {useState, useEffect, useRef} from "react"; import { useNavigate } from "react-router-dom"; import { AuthService, EventsService, CustomerService, ResourceService } from "../../services"; import moment from 'moment'; @@ -24,6 +24,8 @@ import { Archive, PencilSquare, Filter } from "react-bootstrap-icons"; const EventsCalendar = () => { const navigate = useNavigate(); const [events, setEvents] = useState([]); + const calendarColumnRef = useRef(null); + const [listHeight, setListHeight] = useState(null); const [customers, setCustomers] = useState([]); const [resources, setResources] = useState([]); const [fromDate, setFromDate] = useState(new Date(new Date().getFullYear(), new Date().getMonth(), 1)); @@ -212,6 +214,27 @@ const EventsCalendar = () => { } }, [events, currentRangeStart, currentRangeEnd]); + // Sync list column height with calendar column height + useEffect(() => { + const updateListHeight = () => { + if (calendarColumnRef.current) { + const calendarHeight = calendarColumnRef.current.offsetHeight; + setListHeight(calendarHeight); + } + }; + + // Initial measurement after render + const timer = setTimeout(updateListHeight, 100); + + // Update on window resize + window.addEventListener('resize', updateListHeight); + + return () => { + clearTimeout(timer); + window.removeEventListener('resize', updateListHeight); + }; + }, [events]); + const redirectToAdmin = () => { @@ -357,38 +380,68 @@ const EventsCalendar = () => {