Compare commits

..

No commits in common. "dev" and "main" have entirely different histories.
dev ... main

2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"name": "equip-reserve-frontend",
"private": true,
"version": "1.0.1",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -64,16 +64,16 @@ export default function DeviceDetailModal({ visiable, device, onclose }) {
if (!current) return false;
const today = dayjs().startOf("day");
const currentDay = current.startOf("day");
const isPastDate = current.isBefore(today);
if (currentDay.isBefore(today)) {
return true;
}
dayjs.extend(isBetween);
const isUnavailable = unavailableTimes.some(({ startTime, endTime }) => {
return unavailableTimes.some(({ startTime, endTime }) => {
const start = dayjs(startTime).startOf("day");
const end = dayjs(endTime).endOf("day");
return currentDay.isBetween(start, end, null, "[]");
});
return isPastDate || isUnavailable;
};
const handleOK = async () => {