Merge branch 'main' into production

This commit is contained in:
Dobromir Popov
2024-11-16 23:36:59 +02:00
9 changed files with 347 additions and 238 deletions

View File

@ -1,124 +1,121 @@
import Link from "next/link" // import Link from "next/link"
import { signIn, signOut, useSession } from "next-auth/react" // import { signIn, signOut, useSession } from "next-auth/react"
import styles from "../styles/header.module.css" // import styles from "../styles/header.module.css"
// The approach used in this component shows how to build a sign in and sign out // // The approach used in this component shows how to build a sign in and sign out
// component that works on pages which support both client and server side // // component that works on pages which support both client and server side
// rendering, and avoids any flash incorrect content on initial page load. // // rendering, and avoids any flash incorrect content on initial page load.
export default function Header() { // export default function Header() {
const { data: session, status } = useSession() // const { data: session, status } = useSession()
const loading = status === "loading" // const loading = status === "loading"
//generate top header with sign in/out button and dropdown menu and user name/surname using tailwindcss // //generate top header with sign in/out button and dropdown menu and user name/surname using tailwindcss
return ( // return (
<header className=""> // <header className="">
<noscript> // <noscript>
<style>{`.nojs-show { opacity: 1; top: 0; }`}</style> // <style>{`.nojs-show { opacity: 1; top: 0; }`}</style>
</noscript> // </noscript>
{/* <script src="https://cdn.jsdelivr.net/npm/tw-elements/dist/js/index.min.js"></script> */} // {/* <script src="https://cdn.jsdelivr.net/npm/tw-elements/dist/js/index.min.js"></script> */}
<div className={styles.signedInStatus}> // <div className={styles.signedInStatus}>
<p // <p className={`nojs-show ${!session && loading ? styles.loading : styles.loaded}`}>
className={`nojs-show ${ // {!session && (
!session && loading ? styles.loading : styles.loaded // <>
}`} // <span className={styles.notSignedInText}>
> // You are not signed in
{!session && ( // </span>
<> // <a
<span className={styles.notSignedInText}> // href={`/api/auth/signin`}
You are not signed in // className={styles.buttonPrimary}
</span> // onClick={(e) => {
<a // e.preventDefault()
href={`/api/auth/signin`} // signIn()
className={styles.buttonPrimary} // }}
onClick={(e) => { // >
e.preventDefault() // Sign in
signIn() // </a>
}} // </>
> // )}
Sign in // {session?.user && (
</a> // <>
</> // {session.user.image && (
)} // <span
{session?.user && ( // style={{ backgroundImage: `url('${session.user.image}')` }}
<> // className={styles.avatar}
{session.user.image && ( // />
<span // )}
style={{ backgroundImage: `url('${session.user.image}')` }} // <span className={styles.signedInText}>
className={styles.avatar} // <small>Signed in as</small>
/> // <br />
)} // <strong>{session.user.email ?? session.user.name}</strong>
<span className={styles.signedInText}> // </span>
<small>Signed in as</small> // <a
<br /> // href={`/api/auth/signout`}
<strong>{session.user.email ?? session.user.name}</strong> // className={styles.button}
</span> // onClick={(e) => {
<a // e.preventDefault()
href={`/api/auth/signout`} // signOut()
className={styles.button} // }}
onClick={(e) => { // >
e.preventDefault() // Sign out
signOut() // </a>
}} // </>
> // )}
Sign out // </p>
</a> // </div>
</> // {/* <nav className="max-w-7xl mx-auto ">
)} // <ul className={styles.navItems}>
</p> // <li className={styles.navItem}>
</div> // <Link href="/">Home</Link>
<nav className="max-w-7xl mx-auto "> // </li>
<ul className={styles.navItems}> // <li className={styles.navItem}>
<li className={styles.navItem}> // <Link href="/client">Client</Link>
<Link href="/">Home</Link> // </li>
</li> // <li className={styles.navItem}>
<li className={styles.navItem}> // <Link href="/server">Server</Link>
<Link href="/client">Client</Link> // </li>
</li> // <li className={styles.navItem}>
<li className={styles.navItem}> // <Link href="/protected">Protected</Link>
<Link href="/server">Server</Link> // </li>
</li> // <li className={styles.navItem}>
<li className={styles.navItem}> // <Link href="/api-example">API</Link>
<Link href="/protected">Protected</Link> // </li>
</li> // <li className={styles.navItem}>
<li className={styles.navItem}> // <Link href="/admin">Admin</Link>
<Link href="/api-example">API</Link> // </li>
</li> // <li className={styles.navItem}>
<li className={styles.navItem}> // <Link href="/me">Me</Link>
<Link href="/admin">Admin</Link> // </li>
</li> // <li className={styles.navItem}>
<li className={styles.navItem}> // CART
<Link href="/me">Me</Link> // {/* cart submenus * / }
</li> // <ul className={styles.submenu}>
<li className={styles.navItem}> // <li className={styles.submenuItem}>
CART // <Link href="/cart/locations">Locations</Link>
{/* cart submenus */} // </li>
<ul className={styles.submenu}> // <li className={styles.submenuItem}>
<li className={styles.submenuItem}> // <Link href="/cart/publishers">Publishers</Link>
<Link href="/cart/locations">Locations</Link> // </li>
</li> // <li className={styles.submenuItem}>
<li className={styles.submenuItem}> // <Link href="/cart/availabilities">Availabilities</Link>
<Link href="/cart/publishers">Publishers</Link> // </li>
</li> // <li className={styles.submenuItem}>
<li className={styles.submenuItem}> // <Link href="/cart/cartevents">Cart Event</Link>
<Link href="/cart/availabilities">Availabilities</Link> // </li>
</li> // </ul>
<li className={styles.submenuItem}>
<Link href="/cart/cartevents">Cart Event</Link>
</li>
</ul>
</li> // </li>
{/* end cart submenus */} // {/* end cart submenus * / }
<li className={styles.navItem}> // <li className={styles.navItem}>
<Link href="/cart/calendar">Calendar</Link> // <Link href="/cart/calendar">Calendar</Link>
</li> // </li>
</ul> // </ul >
</nav> // </nav > */ }
</header>
) // </header >
} // )
// }

View File

@ -1,4 +1,4 @@
import Header from "./header"
import Link from 'next/link' import Link from 'next/link'
import Footer from "./footer" import Footer from "./footer"
import Sidebar from "./sidebar" import Sidebar from "./sidebar"

View File

@ -16,6 +16,7 @@ import { UserRole } from "@prisma/client";
const packageVersion = require('../package.json').version; const packageVersion = require('../package.json').version;
function SidebarMenuItem({ item, session, isSubmenu }) { function SidebarMenuItem({ item, session, isSubmenu }) {
// const tMenu = useTranslations('menu'); // const tMenu = useTranslations('menu');
// const [t, locale] = useState(useTranslations('menu')); // const [t, locale] = useState(useTranslations('menu'));
// useEffect(() => { // useEffect(() => {

View File

@ -32,5 +32,13 @@
"statistics": "Статистика", "statistics": "Статистика",
"coverMeLogs": "Замествания", "coverMeLogs": "Замествания",
"translations": "Преводи" "translations": "Преводи"
},
"content": {
"location": {
"warehouse": {
"description": "- снимки как да се поставят количките\n- снимка с код за катинар\nвсеки може да всима/връща\n- преди да влизаме трябва да почистим краката.\n- зареждаме/почистваме извън\n- влизане/озлизане няма код\n- влизане/излизане има код",
"title": "СНЛАД"
}
}
} }
} }

View File

@ -32,5 +32,13 @@
"statistics": "View Statistics", "statistics": "View Statistics",
"coverMeLogs": "View CoverMe logs", "coverMeLogs": "View CoverMe logs",
"translations": "Translation" "translations": "Translation"
},
"content": {
"location": {
"warehouse": {
"description": "- снимки как да се поставят количките\n- снимка с код за катинар\nвсеки може да всима/връща\n- преди да влизаме трябва да почистим краката.\n- зареждаме/почистваме извън\n- влизане/озлизане няма код\n- влизане/излизане има код",
"title": "СНЛАД"
}
}
} }
} }

View File

@ -8,10 +8,17 @@
"BG": "болгарский", "BG": "болгарский",
"EN": "английский", "EN": "английский",
"RU": "русский", "RU": "русский",
"login": "вход", "login": "вход"
"contacts": "Контакти te"
}, },
"menu": { "menu": {
"dashboard": "Начало" "dashboard": "Начало"
},
"content": {
"location": {
"warehouse": {
"description": "- снимки как да се поставят количките\n- снимка с код за катинар\nвсеки може да всима/връща\n- преди да влизаме трябва да почистим краката.\n- зареждаме/почистваме извън\n- влизане/озлизане няма код\n- влизане/излизане има код",
"title": "СНЛАД"
}
}
} }
} }

View File

@ -5,6 +5,8 @@ import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a lo
import { GetServerSideProps } from 'next'; import { GetServerSideProps } from 'next';
import { Location, UserRole } from "@prisma/client"; import { Location, UserRole } from "@prisma/client";
import axiosServer from '../../../src/axiosServer'; import axiosServer from '../../../src/axiosServer';
import { useTranslations, createTranslator } from 'next-intl';
// import { getTranslations } from 'next-intl/server';
const ViewLocationPage: React.FC<ViewLocationPageProps> = ({ location }) => { const ViewLocationPage: React.FC<ViewLocationPageProps> = ({ location }) => {
const [activeTab, setActiveTab] = useState('mainLocation'); const [activeTab, setActiveTab] = useState('mainLocation');
@ -12,6 +14,7 @@ const ViewLocationPage: React.FC<ViewLocationPageProps> = ({ location }) => {
const [images, setImages] = useState([]); const [images, setImages] = useState([]);
const [mainLocationImageCount, setMainLocationImageCount] = useState(0); const [mainLocationImageCount, setMainLocationImageCount] = useState(0);
const t = useTranslations('content');
useEffect(() => { useEffect(() => {
const mainLocationImages = [location.picture1, location.picture2, location.picture3].filter(Boolean); const mainLocationImages = [location.picture1, location.picture2, location.picture3].filter(Boolean);
@ -98,15 +101,44 @@ const ViewLocationPage: React.FC<ViewLocationPageProps> = ({ location }) => {
export const getServerSideProps: GetServerSideProps = async (context) => { export const getServerSideProps: GetServerSideProps = async (context) => {
const axios = await axiosServer(context); const axios = await axiosServer(context);
// Get the locale from context or use default
const locale = context.locale || 'en';
const messages = (await import(`../../../content/i18n/${locale}.json`)).default;
const t = createTranslator({ locale, messages });
// Function to replace placeholders in HTML content
const replacePlaceholders = (content: string) => {
if (!content) return '';
const placeholderPattern = /{([^}]+)}/g;
return content.replace(placeholderPattern, (match, key) => {
try {
const translation = t('content.' + key);
// Check if translation exists and is not empty
if (translation && translation !== 'content.' + key) {
return translation;
}
// Return formatted placeholder if translation not found
return `[${locale}:${key}]`;
} catch (error) {
// Return formatted placeholder on error
return `[${locale}:${key}]`;
}
});
};
const { data: location } = await axios.get( const { data: location } = await axios.get(
`${process.env.NEXT_PUBLIC_PUBLIC_URL}/api/data/locations/${context.params.id}` `${process.env.NEXT_PUBLIC_PUBLIC_URL}/api/data/locations/${context.params.id}`
); );
location.content = replacePlaceholders(location.content);
if (location.backupLocationId !== null) { if (location.backupLocationId !== null) {
const { data: backupLocation } = await axios.get( const { data: backupLocation } = await axios.get(
process.env.NEXT_PUBLIC_PUBLIC_URL + "/api/data/locations/" + location.backupLocationId process.env.NEXT_PUBLIC_PUBLIC_URL + "/api/data/locations/" + location.backupLocationId
); );
location.backupLocationName = backupLocation.name; location.backupLocationName = backupLocation.name;
location.backupLocationContent = backupLocation ? backupLocation.content : ""; location.backupLocationContent = backupLocation ? replacePlaceholders(backupLocation.content) : "";
location.backupLocationImages = backupLocation ? [backupLocation.picture1, backupLocation.picture2, backupLocation.picture3].filter(Boolean) : []; location.backupLocationImages = backupLocation ? [backupLocation.picture1, backupLocation.picture2, backupLocation.picture3].filter(Boolean) : [];
} }

View File

@ -1,136 +1,200 @@
//page to show all repots in the database with a link to the report page
import axiosInstance from '../../../src/axiosSecure';
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import toast from "react-hot-toast"; import axiosInstance from "../../../src/axiosSecure";
import { useRouter } from "next/router"; import { useSession } from "next-auth/react";
import Link from "next/link";
import { useSession } from "next-auth/react"
//const common = require('src/helpers/common');
import common from '../../../src/helpers/common';
import Layout from "../../../components/layout"; import Layout from "../../../components/layout";
import ProtectedRoute from '../../../components/protectedRoute'; import ProtectedRoute from "../../../components/protectedRoute";
import { Location, Shift, UserRole, EventLog, EventType, EventLogType } from "@prisma/client"; import { UserRole, EventLogType } from "@prisma/client";
import { set } from 'date-fns';
const timeFilters = [
{ label: "1 седмица", value: 7 },
{ label: "1 месец", value: 30 },
{ label: "3 месеца", value: 90 },
{ label: "Всички", value: null },
];
const eventTypes = [
{ label: "Заявки", value: EventLogType.AssignmentReplacementRequested },
{ label: "Приети замествания", value: EventLogType.AssignmentReplacementAccepted },
{ label: "Ръчно въведени замествания", value: EventLogType.AssignmentReplacementManual },
];
export default function EventLogList() { export default function EventLogList() {
const [eventLogs, setEventLog] = useState([]); const [eventLogs, setEventLog] = useState([]);
const [requestedAssignments, setRequestedAssignments] = useState([]); const [requestedAssignments, setRequestedAssignments] = useState([]);
const router = useRouter(); const [showOpenRequests, setShowOpenRequests] = useState(false);
const [selectedTimeFilter, setSelectedTimeFilter] = useState(null); // Time filter state
const [selectedEventTypes, setSelectedEventTypes] = useState(eventTypes.map((et) => et.value)); // Default: all types
const { data: session } = useSession(); const { data: session } = useSession();
const [locations, setLocations] = useState([]);
const [showOpenRequests, setShowOpenRequests] = useState(false);
useEffect(() => { useEffect(() => {
const fetchLocations = async () => { const fetchEventLogs = async () => {
try { try {
const { data: eventLogsDataold } = await axiosInstance.get(`/api/data/prisma/eventLog?where={"type":"${EventLogType.AssignmentReplacementAccepted}"}&include={"publisher":{"select":{"firstName":true,"lastName":true}},"shift":{"include":{"assignments":{"include":{"publisher":{"select":{"firstName":true,"lastName":true}}}}}}}`); const where = encodeURIComponent(
JSON.stringify({
OR: selectedEventTypes.map((type) => ({ type })),
})
);
// const where = encodeURIComponent(`{OR: [{type: "${EventLogType.AssignmentReplacementAccepted}"}, {type: "${EventLogType.AssignmentReplacementManual}"}]}`); const { data: eventLogsData } = await axiosInstance.get(
const where = encodeURIComponent(JSON.stringify({ `/api/data/prisma/eventLog?where=${where}&include={"publisher":{"select":{"firstName":true,"lastName":true}},"shift":{"include":{"assignments":{"include":{"publisher":{"select":{"firstName":true,"lastName":true}}}}}}}`
OR: [ );
{ type: EventLogType.AssignmentReplacementAccepted },
{ type: EventLogType.AssignmentReplacementManual }
]
}));
const { data: eventLogsData } = await axiosInstance.get(`/api/data/prisma/eventLog?where=${where}&include={"publisher":{"select":{"firstName":true,"lastName":true}},"shift":{"include":{"assignments":{"include":{"publisher":{"select":{"firstName":true,"lastName":true}}}}}}}`);
setEventLog(eventLogsData); setEventLog(eventLogsData);
const { data: shiftsData } = await axiosInstance.get(`/api/data/prisma/assignment?where={"publicGuid":{"not":"null"}}&include={"shift":{"include":{"assignments":{"include":{"publisher":{"select":{"firstName":true,"lastName":true}}}}}},"publisher":{"select":{"firstName":true,"lastName":true}}}`); const { data: shiftsData } = await axiosInstance.get(
`/api/data/prisma/assignment?where={"publicGuid":{"not":"null"}}&include={"shift":{"include":{"assignments":{"include":{"publisher":{"select":{"firstName":true,"lastName":true}}}}}},"publisher":{"select":{"firstName":true,"lastName":true}}}`
);
setRequestedAssignments(shiftsData); setRequestedAssignments(shiftsData);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }
}; };
if (!locations.length) {
fetchLocations();
}
}, []);
fetchEventLogs();
}, [selectedEventTypes]);
// Filter events based on the selected time range
const filteredEventLogs = eventLogs.filter((event) => {
if (!selectedTimeFilter) return true;
const eventDate = new Date(event.date);
const cutoffDate = new Date();
cutoffDate.setDate(cutoffDate.getDate() - selectedTimeFilter);
return eventDate >= cutoffDate;
});
// Toggle event type selection
const toggleEventType = (eventType) => {
setSelectedEventTypes((prev) =>
prev.includes(eventType)
? prev.filter((type) => type !== eventType)
: [...prev, eventType]
);
};
return ( return (
<Layout> <Layout>
<ProtectedRoute allowedRoles={[UserRole.POWERUSER, UserRole.ADMIN]}> <ProtectedRoute allowedRoles={[UserRole.POWERUSER, UserRole.ADMIN]}>
<div className="h-5/6 grid place-items-start px-4 pt-8"> <div className="h-5/6 grid place-items-start px-4 pt-8">
<div className="flex flex-col w-full px-4"> <div className="flex flex-col w-full px-4">
<h1 className="text-2xl font-bold text-center">Заявки за заместване</h1> <h1 className="text-2xl font-bold text-center">Заявки за заместване</h1>
{/* <Link href="/cart/reports/report">
<button className="mt-4 bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">
Добави нов отчет
</button>
</Link> */}
<div className="flex gap-2 mb-4">
<label className={`cursor-pointer px-4 py-2 rounded-full ${!showOpenRequests ? 'bg-blue-500 text-white' : 'bg-gray-200 text-gray-800'}`}> <div className="flex gap-2 mb-4">
<input type="radio" name="reportType" value="ServiceReport" onChange={() => setShowOpenRequests(false)} checked={!showOpenRequests} className="sr-only" /> <label
Приети заявки className={`cursor-pointer px-4 py-2 rounded-full ${!showOpenRequests ? "bg-blue-500 text-white" : "bg-gray-200 text-gray-800"
}`}
>
<input
type="radio"
name="reportType"
value="ServiceReport"
onChange={() => setShowOpenRequests(false)}
checked={!showOpenRequests}
className="sr-only"
/>
Приети/затворени заявки
</label> </label>
<label className={`cursor-pointer px-4 py-2 rounded-full ${showOpenRequests ? 'bg-blue-500 text-white' : 'bg-gray-200 text-gray-800'}`}> <label
<input type="radio" name="reportType" value="Experience" onChange={() => setShowOpenRequests(true)} checked={showOpenRequests} className="sr-only" /> className={`cursor-pointer px-4 py-2 rounded-full ${showOpenRequests ? "bg-yellow-500 text-white" : "bg-yellow-100 text-gray-800"
Отворени заявки }`}
>
<input
type="radio"
name="reportType"
value="Experience"
onChange={() => setShowOpenRequests(true)}
checked={showOpenRequests}
className="sr-only"
/>
Отворени заявки (Без отговор/Още се търси)
</label> </label>
</div> </div>
{/* Event Type Filter Pills */}
<div className="flex gap-2 mb-4">
{eventTypes.map((type) => (
<button
key={type.value}
onClick={() => toggleEventType(type.value)}
className={`px-4 py-2 rounded-full ${selectedEventTypes.includes(type.value)
? "bg-blue-500 text-white"
: "bg-gray-200 text-gray-800"
}`}
>
{type.label}
</button>
))}
</div>
{/* Time Filter Pills */}
<div className="flex gap-2 mb-4">
{timeFilters.map((filter) => (
<button
key={filter.value}
onClick={() => setSelectedTimeFilter(filter.value)}
className={`px-4 py-2 rounded-full ${selectedTimeFilter === filter.value
? "bg-blue-500 text-white"
: "bg-gray-200 text-gray-800"
}`}
>
{filter.label}
</button>
))}
</div>
<div className="mt-4 w-full overflow-x-auto"> <div className="mt-4 w-full overflow-x-auto">
<table className="w-full table-auto"> <table className="w-full table-auto border-collapse">
<thead> <thead className="bg-gray-100">
<tr> <tr>
<th className="px-4 py-2 text-left">На</th> <th className="px-4 py-2 text-left sticky top-0 z-10 bg-gray-100 border">На</th>
<th className="px-4 py-2 text-left">От</th> <th className="px-4 py-2 text-left sticky top-0 z-10 bg-gray-100 border">От</th>
<th className="px-4 py-2 text-left">Дата</th> <th className="px-4 py-2 text-left sticky top-0 z-10 bg-gray-100 border">Дата</th>
<th className="px-4 py-2 text-left">Смяна</th> <th className="px-4 py-2 text-left sticky top-0 z-10 bg-gray-100 border">Смяна</th>
<th className="px-4 py-2 text-left">Събитие</th> <th className="px-4 py-2 text-left sticky top-0 z-10 bg-gray-100 border">Събитие</th>
{/* <th className="px-4 py-2 text-left">Действия</th> */}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{!showOpenRequests && (eventLogs.map((event) => ( {!showOpenRequests &&
filteredEventLogs.map((event) => (
<tr key={event.id}> <tr key={event.id}>
<td className="border px-2 py-2">{new Date(event.date).toLocaleString('bg')}</td> <td className="border px-2 py-2">{new Date(event.date).toLocaleString("bg")}</td>
<td className="border px-2 py-2">{event.publisher.firstName + " " + event.publisher.lastName}</td> <td className="border px-2 py-2">
<td className="border px-2 py-2">{new Date(event.shift?.startTime).toLocaleString('bg')}</td> {event.publisher?.firstName && event.publisher?.lastName
? `${event.publisher.firstName} ${event.publisher.lastName}`
: "???"}
</td>
<td className="border px-2 py-2">{new Date(event.shift?.startTime).toLocaleString("bg")}</td>
<td className="border px-2 py-2"> <td className="border px-2 py-2">
{event.shift?.assignments.map((ass) => ( {event.shift?.assignments.map((ass) => (
<div key={ass.id}>{ass.publisher.firstName + " " + ass.publisher.lastName}</div> <div key={ass.id}>
{ass.publisher.firstName + " " + ass.publisher.lastName}
</div>
))} ))}
</td> </td>
<td className="border px-2 py-2"> <td className="border px-2 py-2">{event.content}</td>
{event.content}
</td>
{/* <td className="border px-4 py-2">
<button
className="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
Изтрий
</button>
</td> */}
</tr> </tr>
)) ))}
)}
{showOpenRequests && (requestedAssignments.map((assignment) => ( {showOpenRequests &&
requestedAssignments.map((assignment) => (
<tr key={assignment.id}> <tr key={assignment.id}>
<td className="border px-2 py-2">{new Date(assignment.date).toLocaleString('bg')}</td> <td className="border px-2 py-2">
<td className="border px-2 py-2">{assignment.publisher.firstName + " " + assignment.publisher.lastName}</td> {new Date(assignment.date).toLocaleString("bg")}
<td className="border px-2 py-2">{new Date(assignment.shift.startTime).toLocaleString('bg')}</td> </td>
<td className="border px-2 py-2">
{assignment.publisher.firstName + " " + assignment.publisher.lastName}
</td>
<td className="border px-2 py-2">
{new Date(assignment.shift.startTime).toLocaleString("bg")}
</td>
<td className="border px-2 py-2"> <td className="border px-2 py-2">
{assignment.shift.assignments.map((ass) => ( {assignment.shift.assignments.map((ass) => (
<div key={ass.id}>{ass.publisher.firstName + " " + ass.publisher.lastName}</div> <div key={ass.id}>
{ass.publisher.firstName + " " + ass.publisher.lastName}
</div>
))} ))}
</td> </td>
{/* <td className="border px-4 py-2">
<button
className="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded"
>
Изтрий
</button>
</td> */}
</tr> </tr>
)) ))}
)}
</tbody> </tbody>
</table> </table>
</div> </div>
@ -140,5 +204,3 @@ export default function EventLogList() {
</Layout> </Layout>
); );
} }

View File

@ -2,7 +2,9 @@
box-sizing: border-box; box-sizing: border-box;
} */ } */
body { body {
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
padding: 0 1rem 1rem 1rem; padding: 0 1rem 1rem 1rem;
max-width: 768px; max-width: 768px;
margin: 0 auto; margin: 0 auto;
@ -119,7 +121,6 @@ iframe {
/* Add any additional styles you need */ /* Add any additional styles you need */
} }
.disabled { .disabled {
opacity: 0.6; opacity: 0.6;
pointer-events: none; pointer-events: none;
@ -185,7 +186,6 @@ iframe {
/* text-shadow: 0 0 2px rgba(252, 252, 252, 0.8); Adjust color and glow size as needed */ /* text-shadow: 0 0 2px rgba(252, 252, 252, 0.8); Adjust color and glow size as needed */
} }
.mobile-calendar .rbc-btn-group button { .mobile-calendar .rbc-btn-group button {
padding: 4px 6px; /* Smaller buttons */ padding: 4px 6px; /* Smaller buttons */
font-size: 16px; /* Smaller button text */ font-size: 16px; /* Smaller button text */
@ -232,8 +232,7 @@ iframe {
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
} */ } */
.rbc-calendar .rbc-month-view .rbc-event .rbc-calendar .rbc-month-view .rbc-event {
{
padding: 2; padding: 2;
margin: 2; margin: 2;
background-color: transparent; background-color: transparent;
@ -246,14 +245,10 @@ iframe {
/* min-height:150px !important; * / /* min-height:150px !important; * /
} */ } */
.react-responsive-carousel .control-arrow { .react-responsive-carousel .control-arrow {
width: 25%; width: 25%;
} }
/* Custom CSS for responsive table */ /* Custom CSS for responsive table */
@media (max-width: 768px) { @media (max-width: 768px) {
/* Hide table headers on small screens */ /* Hide table headers on small screens */
@ -291,4 +286,3 @@ iframe {
align-items: center; align-items: center;
justify-content: center; /* Optional: center buttons in the group */ justify-content: center; /* Optional: center buttons in the group */
} }