diff --git a/apps/frontend/src/app/globals.css b/apps/frontend/src/app/globals.css index 579827f..06a36e4 100644 --- a/apps/frontend/src/app/globals.css +++ b/apps/frontend/src/app/globals.css @@ -5,24 +5,24 @@ @layer base { :root { --background: 0 0% 100%; - --foreground: 20 14.3% 4.1%; + --foreground: 0 0% 3.9%; --card: 0 0% 100%; - --card-foreground: 20 14.3% 4.1%; + --card-foreground: 0 0% 3.9%; --popover: 0 0% 100%; - --popover-foreground: 20 14.3% 4.1%; - --primary: 24.6 95% 53.1%; - --primary-foreground: 60 9.1% 97.8%; - --secondary: 60 4.8% 95.9%; - --secondary-foreground: 24 9.8% 10%; - --muted: 60 4.8% 95.9%; - --muted-foreground: 25 5.3% 44.7%; - --accent: 60 4.8% 95.9%; - --accent-foreground: 24 9.8% 10%; + --popover-foreground: 0 0% 3.9%; + --primary: 0 0% 9%; + --primary-foreground: 0 0% 98%; + --secondary: 0 0% 96.1%; + --secondary-foreground: 0 0% 9%; + --muted: 0 0% 96.1%; + --muted-foreground: 0 0% 45.1%; + --accent: 0 0% 96.1%; + --accent-foreground: 0 0% 9%; --destructive: 0 84.2% 60.2%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 20 5.9% 90%; - --input: 20 5.9% 90%; - --ring: 24.6 95% 53.1%; + --destructive-foreground: 0 0% 98%; + --border: 0 0% 89.8%; + --input: 0 0% 89.8%; + --ring: 0 0% 3.9%; --radius: 0.75rem; --chart-1: 12 76% 61%; --chart-2: 173 58% 39%; @@ -32,25 +32,25 @@ } .dark { - --background: 20 14.3% 4.1%; - --foreground: 60 9.1% 97.8%; - --card: 20 14.3% 4.1%; - --card-foreground: 60 9.1% 97.8%; - --popover: 20 14.3% 4.1%; - --popover-foreground: 60 9.1% 97.8%; - --primary: 20.5 90.2% 48.2%; - --primary-foreground: 60 9.1% 97.8%; - --secondary: 12 6.5% 15.1%; - --secondary-foreground: 60 9.1% 97.8%; - --muted: 12 6.5% 15.1%; - --muted-foreground: 24 5.4% 63.9%; - --accent: 12 6.5% 15.1%; - --accent-foreground: 60 9.1% 97.8%; - --destructive: 0 72.2% 50.6%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 12 6.5% 15.1%; - --input: 12 6.5% 15.1%; - --ring: 20.5 90.2% 48.2%; + --background: 0 0% 3.9%; + --foreground: 0 0% 98%; + --card: 0 0% 3.9%; + --card-foreground: 0 0% 98%; + --popover: 0 0% 3.9%; + --popover-foreground: 0 0% 98%; + --primary: 0 0% 98%; + --primary-foreground: 0 0% 9%; + --secondary: 0 0% 14.9%; + --secondary-foreground: 0 0% 98%; + --muted: 0 0% 14.9%; + --muted-foreground: 0 0% 63.9%; + --accent: 0 0% 14.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + --border: 0 0% 14.9%; + --input: 0 0% 14.9%; + --ring: 0 0% 83.1%; --chart-1: 220 70% 50%; --chart-2: 160 60% 45%; --chart-3: 30 80% 55%; diff --git a/apps/frontend/src/app/reservation/page.tsx b/apps/frontend/src/app/reservation/page.tsx index d7910cf..7f7d9f1 100644 --- a/apps/frontend/src/app/reservation/page.tsx +++ b/apps/frontend/src/app/reservation/page.tsx @@ -2,8 +2,10 @@ import Calendar from '@components/calendar/calendar'; export default function ReservationPage() { return ( -
-

Foglalások

+
+
+

Foglalások

+
); diff --git a/apps/frontend/src/app/rules/page.tsx b/apps/frontend/src/app/rules/page.tsx index 26d39bd..303ce2a 100644 --- a/apps/frontend/src/app/rules/page.tsx +++ b/apps/frontend/src/app/rules/page.tsx @@ -18,7 +18,7 @@ export default function Rules() {

Ha olyan problémád van, melyet a lent leírtak nem fednek, úgy a{' '} - + főispánt / teremispánt {' '} kell keresni. @@ -32,11 +32,11 @@ export default function Rules() {

  1. - + Regisztrálj {' '} vagy{' '} - + jelentkezz be.
  2. @@ -44,7 +44,7 @@ export default function Rules() { Iratkozz fel a{' '} @@ -69,7 +69,7 @@ export default function Rules() {

    A fentiekkel kapcsolatban bármilyen probléma esetén írjatok a levlistára ( - + probaterem@sch.bme.hu ). @@ -104,7 +104,7 @@ export default function Rules() {

  3. Időpontot a weblapon tudsz foglalni. Ezt minél hamarabb elintézed, annál esélyesebb, hogy lesz beengedőd. Amennyiben nincs, írj a listánkra! ( - + probaterem@sch.bme.hu ) @@ -114,7 +114,7 @@ export default function Rules() { az már feltételes foglalás lesz, ami azt jelenti, hogy bárki ráfoglalhat erre az időpontra (akár Te is másokéra). Figyeljetek rá, hogy az egyéni tagok foglalásai nem ekvivalensek a bandák foglalásaival (lásd:{' '} - + Szankciók ). diff --git a/apps/frontend/src/app/stats/page.tsx b/apps/frontend/src/app/stats/page.tsx index 7680111..fd070c0 100644 --- a/apps/frontend/src/app/stats/page.tsx +++ b/apps/frontend/src/app/stats/page.tsx @@ -7,7 +7,7 @@ import { useUser } from '@/hooks/useUser'; import axiosApi from '@/lib/apiSetup'; import { ClubMembership } from '@/types/member'; import { Reservation } from '@/types/reservation'; -import { User } from '@/types/user'; +import { Role, User } from '@/types/user'; function getCurrentPeriodStart() { const now = new Date(); @@ -75,8 +75,10 @@ export default function Stats() { const isAuthorized = useMemo(() => { if (!me) return false; - if ((me as any)?.clubMembership) return true; - return (memberships || []).some((m) => m.userId === me.id); + if (me.role === Role.ADMIN) return true; + if ((me as any)?.clubMembership?.isGateKeeper) return true; + const myMembership = (memberships || []).find((m) => m.userId === me.id); + return Boolean(myMembership?.isGateKeeper); }, [me, memberships]); const gatekeepingCounts = useMemo(() => { diff --git a/apps/frontend/src/components/calendar/Line.tsx b/apps/frontend/src/components/calendar/Line.tsx index 42f2ba5..bf08b77 100644 --- a/apps/frontend/src/components/calendar/Line.tsx +++ b/apps/frontend/src/components/calendar/Line.tsx @@ -2,7 +2,7 @@ export default function Line() { const offset = (new Date().getHours() + new Date().getMinutes() / 60) * 40 * 2; return (
    setComment(e.target.value)} value={comment} /> @@ -69,7 +69,7 @@ export default function AddComment(props: AddCommentProps) { setStartTime(new Date(e.target.value))} /> @@ -81,7 +81,7 @@ export default function AddComment(props: AddCommentProps) { setEndTime(new Date(e.target.value))} /> @@ -91,7 +91,7 @@ export default function AddComment(props: AddCommentProps) {
    setIsReservable(e.target.checked)} checked={isReservable} @@ -102,7 +102,7 @@ export default function AddComment(props: AddCommentProps) {
) : ( - )} diff --git a/apps/frontend/src/components/calendar/add-reservation.tsx b/apps/frontend/src/components/calendar/add-reservation.tsx index e001762..517883a 100644 --- a/apps/frontend/src/components/calendar/add-reservation.tsx +++ b/apps/frontend/src/components/calendar/add-reservation.tsx @@ -158,7 +158,7 @@ export default function AddReservation(props: AddPanelProps) { value={userName} onChange={handleUserNameChange} required - className='bg-zinc-700 border-zinc-600 text-zinc-100 w-full px-3 py-2 rounded-md focus:ring-2 focus:ring-orange-500 focus:border-transparent' + className='bg-zinc-700 border-zinc-600 text-zinc-100 w-full px-3 py-2 rounded-md focus:ring-2 focus:ring-ring focus:border-transparent' placeholder='Válasszon felhasználót...' /> {showUserSuggestions && userSuggestions.length > 0 && ( @@ -186,7 +186,7 @@ export default function AddReservation(props: AddPanelProps) { type='checkbox' checked={adminOverride} onChange={(e) => setAdminOverride(e.target.checked)} - className='h-4 w-4 accent-orange-500' + className='h-4 w-4 accent-primary' /> @@ -202,7 +202,7 @@ export default function AddReservation(props: AddPanelProps) { value={bandName} onChange={handleBandNameChange} required - className='bg-white hover:bg-slate-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 text-black dark:text-zinc-200 border-zinc-600 w-full px-3 py-2 rounded-md focus:ring-2 focus:ring-orange-500 focus:border-transparent' + className='bg-white hover:bg-slate-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 text-black dark:text-zinc-200 border-zinc-600 w-full px-3 py-2 rounded-md focus:ring-2 focus:ring-ring focus:border-transparent' placeholder='Válasszon bandát...' /> {showBandSuggestions && bandSuggestions.length > 0 && ( @@ -231,7 +231,7 @@ export default function AddReservation(props: AddPanelProps) { shiftStart(new Date(e.target.value))} /> @@ -243,7 +243,7 @@ export default function AddReservation(props: AddPanelProps) { shiftEnd(new Date(e.target.value))} /> @@ -267,7 +267,7 @@ export default function AddReservation(props: AddPanelProps) { diff --git a/apps/frontend/src/components/calendar/calendar.tsx b/apps/frontend/src/components/calendar/calendar.tsx index 3cf84f2..09523ee 100644 --- a/apps/frontend/src/components/calendar/calendar.tsx +++ b/apps/frontend/src/components/calendar/calendar.tsx @@ -71,20 +71,20 @@ export default function Calendar() { return (
-
+
-
+
diff --git a/apps/frontend/src/components/calendar/comment-details.tsx b/apps/frontend/src/components/calendar/comment-details.tsx index db3e9f8..a0174bb 100644 --- a/apps/frontend/src/components/calendar/comment-details.tsx +++ b/apps/frontend/src/components/calendar/comment-details.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import axiosApi from '@/lib/apiSetup'; import { Comment } from '@/types/comment'; @@ -144,7 +144,7 @@ export default function CommentDetails(props: EventDetailsProps) { <> setIsReservable(e.target.checked)} checked={isReservable} diff --git a/apps/frontend/src/components/calendar/date-switcher.tsx b/apps/frontend/src/components/calendar/date-switcher.tsx index c0cdacf..82ae120 100644 --- a/apps/frontend/src/components/calendar/date-switcher.tsx +++ b/apps/frontend/src/components/calendar/date-switcher.tsx @@ -1,8 +1,9 @@ import { AddPanel } from '@components/calendar/add-panel'; import { View } from '@components/calendar/calendar'; -import IntervalSwitcher from '@components/calendar/interval-swithcer'; import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'; +import IntervalSwitcher from '@/components/calendar/interval-switcher'; + interface DateSwitcherProps { handlePrevious: () => void; handleNext: () => void; diff --git a/apps/frontend/src/components/calendar/day/daily-view-without-date.tsx b/apps/frontend/src/components/calendar/day/daily-view-without-date.tsx index f659992..5f387ca 100644 --- a/apps/frontend/src/components/calendar/day/daily-view-without-date.tsx +++ b/apps/frontend/src/components/calendar/day/daily-view-without-date.tsx @@ -24,9 +24,8 @@ export default function DailyViewWO(props: DailyViewPropsWO) {
{props.reservations.map((reservation) => { diff --git a/apps/frontend/src/components/calendar/day/daily-view.tsx b/apps/frontend/src/components/calendar/day/daily-view.tsx index 0cddd1f..01bf10c 100644 --- a/apps/frontend/src/components/calendar/day/daily-view.tsx +++ b/apps/frontend/src/components/calendar/day/daily-view.tsx @@ -29,41 +29,44 @@ export default function DailyView(props: DailyViewProps) { ); }; return ( -
-
-
+
+
+
-
- {props.currentDate.getDate()} {props.currentDate.toLocaleString('hu', { month: 'long' })}{' '} - {props.currentDate.getFullYear()} + +
+
+ {props.currentDate.getFullYear()}. {props.currentDate.toLocaleString('hu', { month: 'long' })}{' '} + {props.currentDate.getDate()}. +
+
+ {['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'][props.currentDate.getDay()]} +
+
-
-
+
+
{Array.from({ length: 48 }, (_, i) => ( -
-
+
+
{i % 2 === 0 ? ( -
- {i / 2}:00 -
- ) : ( - '' - )} + {i / 2}:00 + ) : null}
-
+
{props.reservations.map((event) => { const eventStartDate = new Date(event.startTime); const eventEndDate = new Date(event.endTime); diff --git a/apps/frontend/src/components/calendar/day/day-reservation.tsx b/apps/frontend/src/components/calendar/day/day-reservation.tsx index 8c15cac..5e10d66 100644 --- a/apps/frontend/src/components/calendar/day/day-reservation.tsx +++ b/apps/frontend/src/components/calendar/day/day-reservation.tsx @@ -56,7 +56,7 @@ export default function DayReservation(props: DayEventProps) { props.reservation.status === 'OVERTIME' ? 'bg-gradient-to-r from-blue-500 to-blue-400' : props.reservation.status === 'ADMINMADE' - ? 'bg-gradient-to-r from-orange-600 to-orange-400' + ? 'bg-gradient-to-r from-primary to-primary/80 text-primary-foreground' : 'bg-gradient-to-r from-emerald-600 to-emerald-400' } justify-start @@ -69,7 +69,7 @@ export default function DayReservation(props: DayEventProps) { props.reservation.status === 'OVERTIME' ? 'border-blue-600' : props.reservation.status === 'ADMINMADE' - ? 'border-orange-700' + ? 'border-primary' : 'border-emerald-700' } transition-all diff --git a/apps/frontend/src/components/calendar/interval-swithcer.tsx b/apps/frontend/src/components/calendar/interval-switcher.tsx similarity index 50% rename from apps/frontend/src/components/calendar/interval-swithcer.tsx rename to apps/frontend/src/components/calendar/interval-switcher.tsx index ebf7099..73195b0 100644 --- a/apps/frontend/src/components/calendar/interval-swithcer.tsx +++ b/apps/frontend/src/components/calendar/interval-switcher.tsx @@ -8,19 +8,19 @@ export default function IntervalSwitcher(props: IntervalSwitcherProps) { return (
-
- {props.currentDate.toLocaleString('hu', { month: 'long' })} {props.currentDate.getFullYear()} +
+ {props.currentDate.getFullYear()}. + {props.currentDate.toLocaleString('hu', { month: 'long' })}
-
- Week {Math.ceil((props.currentDate.getDate() + firstDayOfWeek.getDay()) / 7)} +
+ {Math.ceil((props.currentDate.getDate() + firstDayOfWeek.getDay()) / 7)}. hét
{/* Empty cell above time column */} -
+
{/* Day headers */} {weekDays.map((day, i) => { @@ -127,21 +128,20 @@ export default function DWView(props: DWViewProps) {
- {['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'][i]} + {['H', 'K', 'Sze', 'Cs', 'P', 'Szo', 'V'][i]} {day.getDate()} @@ -151,21 +151,10 @@ export default function DWView(props: DWViewProps) { })} {/* Time column */} -
+
{Array.from({ length: 48 }, (_, i) => ( -
- {i % 2 === 0 ? ( -
- {i / 2}:00 -
- ) : ( - '' - )} +
+ {i % 2 === 0 ? {i / 2}:00 : ''}
))}
@@ -174,7 +163,7 @@ export default function DWView(props: DWViewProps) { {weekDays.map((day, index) => (
+