Compare commits
13 commits
7ede267762
...
15f4fbd40b
Author | SHA1 | Date | |
---|---|---|---|
15f4fbd40b | |||
f508f26531 | |||
b191090f90 | |||
f813f2351a | |||
7d2d5c55e8 | |||
6b46177dc0 | |||
bf4f0b61ed | |||
0c260820e2 | |||
a308158ca7 | |||
f658a95b16 | |||
13a99e9dc4 | |||
5d81288479 | |||
6a5ad338ba |
23 changed files with 372 additions and 823 deletions
19
.env.example
19
.env.example
|
@ -6,23 +6,4 @@ AUTH_AUTHENTIK_ID=
|
||||||
AUTH_AUTHENTIK_SECRET=
|
AUTH_AUTHENTIK_SECRET=
|
||||||
AUTH_AUTHENTIK_ISSUER=
|
AUTH_AUTHENTIK_ISSUER=
|
||||||
|
|
||||||
AUTH_DISCORD_ID=
|
|
||||||
AUTH_DISCORD_SECRET=
|
|
||||||
|
|
||||||
AUTH_FACEBOOK_ID=
|
|
||||||
AUTH_FACEBOOK_SECRET=
|
|
||||||
|
|
||||||
AUTH_GITHUB_ID=
|
|
||||||
AUTH_GITHUB_SECRET=
|
|
||||||
|
|
||||||
AUTH_GITLAB_ID=
|
|
||||||
AUTH_GITLAB_SECRET=
|
|
||||||
|
|
||||||
AUTH_GOOGLE_ID=
|
|
||||||
AUTH_GOOGLE_SECRET=
|
|
||||||
|
|
||||||
AUTH_KEYCLOAK_ID=
|
|
||||||
AUTH_KEYCLOAK_SECRET=
|
|
||||||
AUTH_KEYCLOAK_ISSUER=
|
|
||||||
|
|
||||||
NEXT_PUBLIC_APP_URL=
|
NEXT_PUBLIC_APP_URL=
|
||||||
|
|
219
README.md
219
README.md
|
@ -1,19 +1,5 @@
|
||||||
# MeetUP
|
# MeetUP
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
- [Description](#description)
|
|
||||||
- [Project Status](#project-status)
|
|
||||||
- [Features](#features)
|
|
||||||
- [Implemented Features](#implemented-features)
|
|
||||||
- [Planned Features](#planned-features-roadmap)
|
|
||||||
- [Technologies Used](#technologies-used)
|
|
||||||
- [Development environment setup](#development-environment-setup)
|
|
||||||
- [Without Docker](#without-docker)
|
|
||||||
- [With Docker](#with-docker)
|
|
||||||
- [Production Deployment using Docker](#production-deployment-using-docker)
|
|
||||||
- [Contributing](#contributing)
|
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
MeetUP is a social calendar application designed to make coordinating schedules with friends seamless and intuitive. It was created because it can be a hassle coordinating meetings between multiple friends and across different friend groups. MeetUP aims to simplify the process of finding mutual availability without endless back-and-forth messaging.
|
MeetUP is a social calendar application designed to make coordinating schedules with friends seamless and intuitive. It was created because it can be a hassle coordinating meetings between multiple friends and across different friend groups. MeetUP aims to simplify the process of finding mutual availability without endless back-and-forth messaging.
|
||||||
|
@ -26,54 +12,52 @@ MeetUP is a social calendar application designed to make coordinating schedules
|
||||||
|
|
||||||
### Implemented Features
|
### Implemented Features
|
||||||
|
|
||||||
- Event creation, deletion, and editing
|
- Core infrastructure setup in progress. No user-facing features are implemented yet.
|
||||||
- SSO and credentials login and signup
|
|
||||||
- Participant invitation and status
|
|
||||||
- Calendar of your own events
|
|
||||||
- Calendar of other users' availability (only in event creation form)
|
|
||||||
|
|
||||||
### Planned Features (Roadmap)
|
### Planned Features (Roadmap)
|
||||||
|
|
||||||
- Friendships
|
- **Friendships:** Connect with friends to share calendars.
|
||||||
- Group calendars
|
- **Group Calendars:** Create and manage shared calendars for groups.
|
||||||
- iCal import and export
|
- **iCal Import:** Import existing calendars from iCalendar (.ics) files.
|
||||||
- Notifications (in-app and external/mail)
|
- **iCal Export:** Export personal or shared calendars in iCalendar (.ics) format.
|
||||||
|
- **Email Notifications:** Receive email alerts for event bookings, reminders, and updates.
|
||||||
|
- **View Blocked Slots:** See when friends are busy without revealing event details.
|
||||||
|
- **Book Timeslots:** Request and confirm meeting times in friends' available slots.
|
||||||
|
- **SSO Compatibility:** Planning for Single Sign-On integration.
|
||||||
|
|
||||||
## Technologies Used
|
## Technologies Used
|
||||||
|
|
||||||
This project is built with a modern tech stack:
|
This project is built with a modern tech stack:
|
||||||
|
|
||||||
- **Package Manager:** [Yarn](https://yarnpkg.com/)
|
- **Package Manager:** [Yarn](https://yarnpkg.com/)
|
||||||
- **Framework:** [Next.js](https://nextjs.org/)
|
- **Framework:** [Next.js](https://nextjs.org/) - React framework for server-side rendering and static site generation.
|
||||||
- **Language:** [TypeScript](https://www.typescriptlang.org/)
|
- **Language:** [TypeScript](https://www.typescriptlang.org/) - Superset of JavaScript that adds static typing.
|
||||||
- **ORM:** [Prisma](https://www.prisma.io/)
|
- **ORM:** [Prisma](https://www.prisma.io/) - Next-generation ORM for Node.js and TypeScript.
|
||||||
- **Authentication:** [Auth.js](https://authjs.dev/)
|
- **Authentication:** [Auth.js](https://authjs.dev/) (formerly NextAuth.js) - Authentication for Next.js.
|
||||||
- **Styling:** [Tailwind CSS](https://tailwindcss.com/)
|
- **Styling:** [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework.
|
||||||
- **UI Components:** [shadcn/ui](https://ui.shadcn.com/)
|
- **UI Components:** [shadcn/ui](https://ui.shadcn.com/) - Re-usable components built using Radix UI and Tailwind CSS.
|
||||||
- **Containerization:** [Docker](https://www.docker.com/)
|
- **Containerization:** [Docker](https://www.docker.com/) (for planned self-hosting option)
|
||||||
- **API Docs:** [Swagger](https://swagger.io/)
|
- _(You can also list related tools here, e.g., ESLint, Prettier, testing libraries if you plan to use them)_
|
||||||
- **React hook API client:** [orval](https://orval.dev/)
|
|
||||||
|
|
||||||
## Development environment setup
|
## Getting Started
|
||||||
|
|
||||||
### Without Docker
|
|
||||||
|
|
||||||
**Prerequisites:**
|
**Prerequisites:**
|
||||||
|
|
||||||
- **Node.js**: version 22+
|
- Node.js: Version is continually upgraded. It's recommended to use the latest LTS or a recent stable version. (Check `.nvmrc` if available).
|
||||||
- **corepack**: enable using `corepack enable`
|
- Yarn: Version is continually upgraded. (Check `package.json` engines field if specified).
|
||||||
|
- A database supported by Prisma (e.g., PostgreSQL, MySQL, SQLite). Ensure your database server is running.
|
||||||
|
|
||||||
**Installation & Running:**
|
**Installation & Running Locally:**
|
||||||
|
|
||||||
1. **Clone the repository:**
|
1. **Clone the repository:**
|
||||||
- Using HTTPS:
|
- Using SSH:
|
||||||
```bash
|
|
||||||
git clone https://git.dominikstahl.dev/DHBW-WE/MeetUp.git
|
|
||||||
```
|
|
||||||
- Or using SSH:
|
|
||||||
```bash
|
```bash
|
||||||
git clone ssh://git@git.dominikstahl.dev/DHBW-WE/MeetUp.git
|
git clone ssh://git@git.dominikstahl.dev/DHBW-WE/MeetUp.git
|
||||||
```
|
```
|
||||||
|
- Or using HTTPS (recommended for most users):
|
||||||
|
```bash
|
||||||
|
git clone [https://git.dominikstahl.dev/DHBW-WE/MeetUp.git](https://git.dominikstahl.dev/DHBW-WE/MeetUp.git)
|
||||||
|
```
|
||||||
```bash
|
```bash
|
||||||
cd MeetUp
|
cd MeetUp
|
||||||
```
|
```
|
||||||
|
@ -82,44 +66,53 @@ This project is built with a modern tech stack:
|
||||||
yarn install
|
yarn install
|
||||||
```
|
```
|
||||||
3. **Set up environment variables:**
|
3. **Set up environment variables:**
|
||||||
You will need to create an `AUTH_SECRET`. You can generate one using the following command:
|
- You will need to create an `AUTH_SECRET`. You can generate one using the following command:
|
||||||
|
```bash
|
||||||
|
npx auth secret
|
||||||
|
```
|
||||||
|
- Copy the `.env.example` file (if it exists) to `.env.local`. If not, create `.env.local`.
|
||||||
|
```bash
|
||||||
|
# If .env.example exists:
|
||||||
|
cp .env.example .env.local
|
||||||
|
# Otherwise, create .env.local and add the following:
|
||||||
|
```
|
||||||
|
- Ensure the following environment variables are set in your `.env.local` file. Adjust `DATABASE_URL` for your specific database provider and credentials.
|
||||||
|
|
||||||
```bash
|
```env
|
||||||
npx auth secret
|
# Database Connection String (Prisma)
|
||||||
```
|
# Example for PostgreSQL: DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public"
|
||||||
|
DATABASE_URL="your_database_connection_string"
|
||||||
|
|
||||||
Add any additional needed environment variables into the generated `.env.local` file.
|
# Generated with npx auth secret
|
||||||
Example variables can be found in the `.env.example` file. The following variables are required:
|
AUTH_SECRET="your_generated_auth_secret"
|
||||||
|
|
||||||
```env
|
# Authentik SSO Variables (if you are using this provider)
|
||||||
# Generated with npx auth secret
|
AUTH_AUTHENTIK_ID=
|
||||||
AUTH_SECRET="your_generated_auth_secret"
|
AUTH_AUTHENTIK_SECRET=
|
||||||
|
AUTH_AUTHENTIK_ISSUER=
|
||||||
|
|
||||||
DATABASE_URL="file:./dev.db"
|
# Base URL of your application
|
||||||
```
|
NEXT_PUBLIC_APP_URL="http://localhost:3000"
|
||||||
|
```
|
||||||
|
|
||||||
4. **Apply database migrations (Prisma):**
|
4. **Apply database migrations (Prisma):**
|
||||||
Set up/update the database with these commands:
|
- Ensure your Prisma schema (`prisma/schema.prisma`) is defined.
|
||||||
|
- Setup/update the database with these commands:
|
||||||
|
```bash
|
||||||
|
yarn prisma:generate
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
yarn prisma:db:push
|
||||||
|
```
|
||||||
|
- Run the following command to apply migrations and generate Prisma Client:
|
||||||
|
```bash
|
||||||
|
npx prisma migrate dev
|
||||||
|
# You might be prompted to name your first migration.
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
Tipp: You can open the prisma database UI with `yarn prisma:studio`
|
||||||
yarn prisma:generate
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
5. **Run the development server:**
|
||||||
yarn prisma:db:push
|
|
||||||
```
|
|
||||||
|
|
||||||
Tip: You can open the Prisma database UI with `yarn prisma:studio`
|
|
||||||
|
|
||||||
5. **Generate needed TypeScript files:**
|
|
||||||
Generate the `swagger.json` file and the API client using:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn swagger:generate
|
|
||||||
yarn orval:generate
|
|
||||||
```
|
|
||||||
|
|
||||||
6. **Run the development server:**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn dev
|
yarn dev
|
||||||
|
@ -127,64 +120,56 @@ This project is built with a modern tech stack:
|
||||||
|
|
||||||
Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.
|
Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.
|
||||||
|
|
||||||
### With Docker
|
The test user for the application is:
|
||||||
|
|
||||||
**Prerequisites:**
|
```bash
|
||||||
|
email: test@example.com
|
||||||
|
password: password
|
||||||
|
```
|
||||||
|
|
||||||
- **Docker**
|
**Docker Development Environment:**
|
||||||
- **Docker Compose**
|
|
||||||
|
|
||||||
**Running:**
|
- The docker development environment can be started with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn dev_container
|
yarn dev_container
|
||||||
```
|
```
|
||||||
|
|
||||||
## Production Deployment using Docker
|
**Self-Hosting with Docker (Planned):**
|
||||||
|
|
||||||
The application can be hosted using the [Docker container](https://git.dominikstahl.dev/DHBW-WE/-/packages/container/meetup/main).
|
- A Docker image and `docker-compose.yml` file will be provided in the future to allow for easy self-hosting of the MeetUP application. This setup will also include database services. Instructions will be updated here once available.
|
||||||
|
|
||||||
There is an example Docker Compose file provided [here](https://git.dominikstahl.dev/DHBW-WE/MeetUp/src/branch/main/docker-compose.yml).
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions are welcome! If you'd like to contribute, please follow these steps:
|
Contributions are welcome! If you'd like to contribute, please:
|
||||||
|
|
||||||
1. Fork the repository.
|
1. Fork the repository.
|
||||||
2. Create a new branch:
|
2. Create a new branch (`git checkout -b <action>/<issue#>-action_name`).
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout -b <type>/<issueNum>-<short_description>
|
|
||||||
```
|
|
||||||
|
|
||||||
- Example: `feat/42-add_login_form`
|
|
||||||
|
|
||||||
3. Make your changes.
|
3. Make your changes.
|
||||||
4. Commit your changes using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/):
|
4. Commit your changes (`git commit -m '<action>: add some feature'`).
|
||||||
- The commit message should be structured as follows:
|
5. Push to the branch (`git push origin <action>/<issue#>-action_name`).
|
||||||
|
|
||||||
```
|
|
||||||
<type>(optional scope): <short description>
|
|
||||||
```
|
|
||||||
|
|
||||||
- Example: `feat(auth): add login form`
|
|
||||||
- Example: `fix(events): correct event time calculation`
|
|
||||||
- Example: `docs: update README with setup instructions`
|
|
||||||
|
|
||||||
- Used types:
|
|
||||||
- `feat`: Feature added
|
|
||||||
- `fix`: Bug fix
|
|
||||||
- `test`: Add or modify tests
|
|
||||||
- `docs`: Documentation changes
|
|
||||||
- `chore`: Changes to non-code files (workflows, lock files, etc.)
|
|
||||||
- `refactor`: Code refactoring without changing functionality
|
|
||||||
- `style`: Code style changes (formatting, etc.)
|
|
||||||
- `revert`: Revert a previous commit
|
|
||||||
|
|
||||||
5. Push to your branch:
|
|
||||||
```bash
|
|
||||||
git push origin <type>/<issue#>-<short_description>
|
|
||||||
```
|
|
||||||
6. Open a Pull Request against the `main` branch.
|
6. Open a Pull Request against the `main` branch.
|
||||||
|
|
||||||
Please ensure your code adheres to the project's coding standards (run `yarn format`) and that any database schema changes are accompanied by a Prisma migration.
|
Possible actions are:
|
||||||
|
|
||||||
|
*feat* -> Feature added
|
||||||
|
*fix* -> Fixed a bug
|
||||||
|
*test* -> Modified or added tests
|
||||||
|
*docs* -> Modified documentation
|
||||||
|
*chore* -> changes to non code files (workflows, lock files, ...)
|
||||||
|
*refactor* -> rewritten code without changing functionality
|
||||||
|
*style* -> code style (yarn format)
|
||||||
|
*revert* -> reverts a previous commit
|
||||||
|
|
||||||
|
Please ensure your code adheres to the project's coding standards (e.g., run linters/formatters if configured) and that any database schema changes are accompanied by a Prisma migration.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**(Optional Sections You Might Want to Add Later):**
|
||||||
|
|
||||||
|
- **Screenshots/Demo:** (Once you have UI to show)
|
||||||
|
- **API Reference:** (If you plan to expose an API)
|
||||||
|
- **Detailed Deployment Guides:** (For various platforms beyond Docker)
|
||||||
|
- **License:** (e.g., MIT, GPL - Important for open source projects)
|
||||||
|
- **Contact:** (How to get in touch with the maintainers)
|
||||||
|
- **Acknowledgements:** (Credit to any libraries, inspirations, or contributors)
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||||
"@fortawesome/react-fontawesome": "^0.2.2",
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
||||||
"@hookform/resolvers": "^5.0.1",
|
"@hookform/resolvers": "^5.0.1",
|
||||||
"@marko19907/string-to-color": "^1.0.0",
|
|
||||||
"@prisma/client": "^6.9.0",
|
"@prisma/client": "^6.9.0",
|
||||||
"@radix-ui/react-avatar": "^1.1.10",
|
"@radix-ui/react-avatar": "^1.1.10",
|
||||||
"@radix-ui/react-collapsible": "^1.1.11",
|
"@radix-ui/react-collapsible": "^1.1.11",
|
||||||
|
@ -52,7 +51,7 @@
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
"lucide-react": "^0.525.0",
|
"lucide-react": "^0.523.0",
|
||||||
"next": "15.3.4",
|
"next": "15.3.4",
|
||||||
"next-auth": "^5.0.0-beta.25",
|
"next-auth": "^5.0.0-beta.25",
|
||||||
"next-swagger-doc": "^0.4.1",
|
"next-swagger-doc": "^0.4.1",
|
||||||
|
@ -73,7 +72,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "3.3.1",
|
"@eslint/eslintrc": "3.3.1",
|
||||||
"@tailwindcss/postcss": "4.1.11",
|
"@tailwindcss/postcss": "4.1.11",
|
||||||
"@types/node": "22.15.34",
|
"@types/node": "22.15.33",
|
||||||
"@types/react": "19.1.8",
|
"@types/react": "19.1.8",
|
||||||
"@types/react-big-calendar": "1.16.2",
|
"@types/react-big-calendar": "1.16.2",
|
||||||
"@types/react-dom": "19.1.6",
|
"@types/react-dom": "19.1.6",
|
||||||
|
@ -81,7 +80,7 @@
|
||||||
"@types/webpack-env": "1.18.8",
|
"@types/webpack-env": "1.18.8",
|
||||||
"cypress": "14.5.0",
|
"cypress": "14.5.0",
|
||||||
"dotenv-cli": "8.0.0",
|
"dotenv-cli": "8.0.0",
|
||||||
"eslint": "9.30.0",
|
"eslint": "9.29.0",
|
||||||
"eslint-config-next": "15.3.4",
|
"eslint-config-next": "15.3.4",
|
||||||
"eslint-config-prettier": "10.1.5",
|
"eslint-config-prettier": "10.1.5",
|
||||||
"orval": "7.10.0",
|
"orval": "7.10.0",
|
||||||
|
|
|
@ -40,12 +40,14 @@ export default function ShowEvent() {
|
||||||
|
|
||||||
if (isLoading || userLoading) {
|
if (isLoading || userLoading) {
|
||||||
return (
|
return (
|
||||||
<div className='flex justify-center items-center h-full'>Loading...</div>
|
<div className='flex justify-center items-center h-screen'>
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (error || !eventData?.data?.event) {
|
if (error || !eventData?.data?.event) {
|
||||||
return (
|
return (
|
||||||
<div className='flex justify-center items-center h-full'>
|
<div className='flex justify-center items-center h-screen'>
|
||||||
Error loading event.
|
Error loading event.
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -68,8 +70,8 @@ export default function ShowEvent() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center justify-center h-full'>
|
<div className='flex flex-col items-center justify-center h-screen'>
|
||||||
<Card className='w-[80%] max-w-screen p-0 gap-0 max-xl:w-[95%] mx-auto'>
|
<Card className='w-[80%] max-w-screen p-0 gap-0 max-xl:w-[95%] max-h-[90vh] overflow-auto'>
|
||||||
<CardHeader className='p-0 m-0 gap-0' />
|
<CardHeader className='p-0 m-0 gap-0' />
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
|
|
|
@ -9,14 +9,16 @@ export default async function Page({
|
||||||
}) {
|
}) {
|
||||||
const eventID = (await params).eventID;
|
const eventID = (await params).eventID;
|
||||||
return (
|
return (
|
||||||
<Card className='w-[80%] max-w-screen p-0 gap-0 max-xl:w-[95%] mx-auto'>
|
<div className='flex flex-col items-center justify-center h-screen'>
|
||||||
<CardHeader className='p-0 m-0 gap-0' />
|
<Card className='w-[80%] max-w-screen p-0 gap-0 max-xl:w-[95%] max-h-[90vh] overflow-auto'>
|
||||||
|
<CardHeader className='p-0 m-0 gap-0' />
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<EventForm type='edit' eventId={eventID} />
|
<EventForm type='edit' eventId={eventID} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
import { ThemePicker } from '@/components/misc/theme-picker';
|
||||||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||||
import EventForm from '@/components/forms/event-form';
|
import EventForm from '@/components/forms/event-form';
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
|
|
||||||
export default function NewEvent() {
|
export default function NewEvent() {
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col items-center justify-center h-full'>
|
<div className='flex flex-col items-center justify-center h-screen'>
|
||||||
|
<div className='absolute top-4 right-4'>{<ThemePicker />}</div>
|
||||||
<Card className='w-[80%] max-w-screen p-0 gap-0 max-xl:w-[95%] max-h-[90vh] overflow-auto'>
|
<Card className='w-[80%] max-w-screen p-0 gap-0 max-xl:w-[95%] max-h-[90vh] overflow-auto'>
|
||||||
<CardHeader className='p-0 m-0 gap-0' />
|
<CardHeader className='p-0 m-0 gap-0' />
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default function Events() {
|
||||||
const events = eventsData?.data?.events || [];
|
const events = eventsData?.data?.events || [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='relative h-full flex flex-col items-center'>
|
<div className='relative h-screen flex flex-col items-center'>
|
||||||
{/* Heading */}
|
{/* Heading */}
|
||||||
<h1 className='text-3xl font-bold mt-8 mb-4 text-center z-10'>
|
<h1 className='text-3xl font-bold mt-8 mb-4 text-center z-10'>
|
||||||
My Events
|
My Events
|
||||||
|
|
|
@ -4,29 +4,14 @@ import Calendar from '@/components/calendar';
|
||||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const { data, isLoading } = useGetApiUserMe();
|
const { data } = useGetApiUserMe();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='grid grid-cols-1 w-full place-items-center'>
|
<div className='max-h-full'>
|
||||||
<div className='w-full sm:w-[90%] mb-4'>
|
<Calendar
|
||||||
<h1 className='text-2xl font-bold text-center'>
|
userId={data?.data.user?.id}
|
||||||
Welcome, <wbr />
|
height='calc(100svh - 50px - (var(--spacing) * 2 * 5))'
|
||||||
<span style={{ whiteSpace: 'nowrap' }}>
|
/>
|
||||||
{isLoading
|
|
||||||
? 'Loading...'
|
|
||||||
: data?.data.user?.first_name ||
|
|
||||||
data?.data.user?.name ||
|
|
||||||
'Unknown User'}{' '}
|
|
||||||
👋
|
|
||||||
</span>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div className='w-full sm:w-[90%]'>
|
|
||||||
<Calendar
|
|
||||||
userId={data?.data.user?.id}
|
|
||||||
height='calc(100svh - 115px - (var(--spacing) * 2 * 5))'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const GET = auth(async function GET(req) {
|
||||||
authCheck.metadata,
|
authCheck.metadata,
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataRaw = Object.fromEntries(req.nextUrl.searchParams);
|
const dataRaw = Object.fromEntries(new URL(req.url).searchParams);
|
||||||
const data = await searchUserSchema.safeParseAsync(dataRaw);
|
const data = await searchUserSchema.safeParseAsync(dataRaw);
|
||||||
if (!data.success)
|
if (!data.success)
|
||||||
return returnZodTypeCheckedResponse(
|
return returnZodTypeCheckedResponse(
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
} from '@/app/api/validation';
|
} from '@/app/api/validation';
|
||||||
import { z } from 'zod/v4';
|
import { z } from 'zod/v4';
|
||||||
|
|
||||||
export const GET = auth(async function GET(req) {
|
export const GET = auth(async function GET(req, { params }) {
|
||||||
const authCheck = userAuthenticated(req);
|
const authCheck = userAuthenticated(req);
|
||||||
if (!authCheck.continue)
|
if (!authCheck.continue)
|
||||||
return returnZodTypeCheckedResponse(
|
return returnZodTypeCheckedResponse(
|
||||||
|
@ -24,22 +24,7 @@ export const GET = auth(async function GET(req) {
|
||||||
authCheck.metadata,
|
authCheck.metadata,
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataRaw: Record<string, string | string[]> = {};
|
const dataRaw = Object.fromEntries(new URL(req.url).searchParams);
|
||||||
for (const [key, value] of req.nextUrl.searchParams.entries()) {
|
|
||||||
if (key.endsWith('[]')) {
|
|
||||||
const cleanKey = key.slice(0, -2);
|
|
||||||
if (!dataRaw[cleanKey]) {
|
|
||||||
dataRaw[cleanKey] = [];
|
|
||||||
}
|
|
||||||
if (Array.isArray(dataRaw[cleanKey])) {
|
|
||||||
(dataRaw[cleanKey] as string[]).push(value);
|
|
||||||
} else {
|
|
||||||
dataRaw[cleanKey] = [dataRaw[cleanKey] as string, value];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dataRaw[key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const data = await userCalendarQuerySchema.safeParseAsync(dataRaw);
|
const data = await userCalendarQuerySchema.safeParseAsync(dataRaw);
|
||||||
if (!data.success)
|
if (!data.success)
|
||||||
return returnZodTypeCheckedResponse(
|
return returnZodTypeCheckedResponse(
|
||||||
|
@ -51,15 +36,15 @@ export const GET = auth(async function GET(req) {
|
||||||
},
|
},
|
||||||
{ status: 400 },
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
const { end, start, userIds } = data.data;
|
const { end, start } = data.data;
|
||||||
|
|
||||||
const requestUserId = authCheck.user.id;
|
const requestUserId = authCheck.user.id;
|
||||||
|
|
||||||
const requestedUser = await prisma.user.findMany({
|
const requestedUserId = (await params).user;
|
||||||
|
|
||||||
|
const requestedUser = await prisma.user.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: {
|
id: requestedUserId,
|
||||||
in: userIds,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
meetingParts: {
|
meetingParts: {
|
||||||
|
@ -72,9 +57,6 @@ export const GET = auth(async function GET(req) {
|
||||||
gte: start,
|
gte: start,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
status: {
|
|
||||||
not: 'DECLINED',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
meeting: {
|
meeting: {
|
||||||
|
@ -82,7 +64,6 @@ export const GET = auth(async function GET(req) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
user_id: true,
|
|
||||||
meeting: {
|
meeting: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
@ -155,7 +136,6 @@ export const GET = auth(async function GET(req) {
|
||||||
start_time: 'asc',
|
start_time: 'asc',
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
user_id: true,
|
|
||||||
id: true,
|
id: true,
|
||||||
reason: true,
|
reason: true,
|
||||||
start_time: true,
|
start_time: true,
|
||||||
|
@ -173,64 +153,46 @@ export const GET = auth(async function GET(req) {
|
||||||
if (!requestedUser)
|
if (!requestedUser)
|
||||||
return returnZodTypeCheckedResponse(
|
return returnZodTypeCheckedResponse(
|
||||||
ErrorResponseSchema,
|
ErrorResponseSchema,
|
||||||
{ success: false, message: 'User/s not found' },
|
{ success: false, message: 'User not found' },
|
||||||
{ status: 404 },
|
{ status: 404 },
|
||||||
);
|
);
|
||||||
|
|
||||||
const calendar: z.input<typeof UserCalendarSchema> = [];
|
const calendar: z.input<typeof UserCalendarSchema> = [];
|
||||||
|
|
||||||
for (const event of requestedUser.map((r) => r.meetingParts).flat()) {
|
for (const event of requestedUser.meetingParts) {
|
||||||
if (
|
if (
|
||||||
event.meeting.participants.some((p) => p.user.id === requestUserId) ||
|
event.meeting.participants.some((p) => p.user.id === requestUserId) ||
|
||||||
event.meeting.organizer_id === requestUserId
|
event.meeting.organizer_id === requestUserId
|
||||||
) {
|
) {
|
||||||
calendar.push({
|
calendar.push({ ...event.meeting, type: 'event' });
|
||||||
...event.meeting,
|
|
||||||
type: 'event',
|
|
||||||
users: event.meeting.participants
|
|
||||||
.map((p) => p.user.id)
|
|
||||||
.filter((id) => userIds.includes(id)),
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
calendar.push({
|
calendar.push({
|
||||||
id: event.meeting.id,
|
id: event.meeting.id,
|
||||||
start_time: event.meeting.start_time,
|
start_time: event.meeting.start_time,
|
||||||
end_time: event.meeting.end_time,
|
end_time: event.meeting.end_time,
|
||||||
type: 'blocked_private',
|
type: 'blocked_private',
|
||||||
users: event.meeting.participants
|
|
||||||
.map((p) => p.user.id)
|
|
||||||
.filter((id) => userIds.includes(id)),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const event of requestedUser.map((r) => r.meetingsOrg).flat()) {
|
for (const event of requestedUser.meetingsOrg) {
|
||||||
if (
|
if (
|
||||||
event.participants.some((p) => p.user.id === requestUserId) ||
|
event.participants.some((p) => p.user.id === requestUserId) ||
|
||||||
event.organizer_id === requestUserId
|
event.organizer_id === requestUserId
|
||||||
) {
|
) {
|
||||||
calendar.push({
|
calendar.push({ ...event, type: 'event' });
|
||||||
...event,
|
|
||||||
type: 'event',
|
|
||||||
users: event.participants
|
|
||||||
.map((p) => p.user.id)
|
|
||||||
.filter((id) => userIds.includes(id)),
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
calendar.push({
|
calendar.push({
|
||||||
id: event.id,
|
id: event.id,
|
||||||
start_time: event.start_time,
|
start_time: event.start_time,
|
||||||
end_time: event.end_time,
|
end_time: event.end_time,
|
||||||
type: 'blocked_private',
|
type: 'blocked_private',
|
||||||
users: event.participants
|
|
||||||
.map((p) => p.user.id)
|
|
||||||
.filter((id) => userIds.includes(id)),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const slot of requestedUser.map((r) => r.blockedSlots).flat()) {
|
for (const slot of requestedUser.blockedSlots) {
|
||||||
if (requestUserId === userIds[0] && userIds.length === 1) {
|
if (requestUserId === requestedUserId) {
|
||||||
calendar.push({
|
calendar.push({
|
||||||
start_time: slot.start_time,
|
start_time: slot.start_time,
|
||||||
end_time: slot.end_time,
|
end_time: slot.end_time,
|
||||||
|
@ -242,7 +204,6 @@ export const GET = auth(async function GET(req) {
|
||||||
created_at: slot.created_at,
|
created_at: slot.created_at,
|
||||||
updated_at: slot.updated_at,
|
updated_at: slot.updated_at,
|
||||||
type: 'blocked_owned',
|
type: 'blocked_owned',
|
||||||
users: [requestUserId],
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
calendar.push({
|
calendar.push({
|
||||||
|
@ -250,7 +211,6 @@ export const GET = auth(async function GET(req) {
|
||||||
end_time: slot.end_time,
|
end_time: slot.end_time,
|
||||||
id: slot.id,
|
id: slot.id,
|
||||||
type: 'blocked_private',
|
type: 'blocked_private',
|
||||||
users: [slot.user_id],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,12 +7,17 @@ import {
|
||||||
userNotFoundResponse,
|
userNotFoundResponse,
|
||||||
} from '@/lib/defaultApiResponses';
|
} from '@/lib/defaultApiResponses';
|
||||||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||||
|
import zod from 'zod/v4';
|
||||||
|
import { UserIdParamSchema } from '@/app/api/validation';
|
||||||
|
|
||||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
path: '/api/calendar',
|
path: '/api/user/{user}/calendar',
|
||||||
request: {
|
request: {
|
||||||
|
params: zod.object({
|
||||||
|
user: UserIdParamSchema,
|
||||||
|
}),
|
||||||
query: userCalendarQuerySchema,
|
query: userCalendarQuerySchema,
|
||||||
},
|
},
|
||||||
responses: {
|
responses: {
|
||||||
|
@ -27,6 +32,6 @@ export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||||
...notAuthenticatedResponse,
|
...notAuthenticatedResponse,
|
||||||
...userNotFoundResponse,
|
...userNotFoundResponse,
|
||||||
},
|
},
|
||||||
tags: ['Calendar'],
|
tags: ['User'],
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -14,8 +14,6 @@ export const BlockedSlotSchema = zod
|
||||||
end_time: eventEndTimeSchema,
|
end_time: eventEndTimeSchema,
|
||||||
type: zod.literal('blocked_private'),
|
type: zod.literal('blocked_private'),
|
||||||
id: zod.string(),
|
id: zod.string(),
|
||||||
users: zod.string().array(),
|
|
||||||
user_id: zod.string().optional(),
|
|
||||||
})
|
})
|
||||||
.openapi('BlockedSlotSchema', {
|
.openapi('BlockedSlotSchema', {
|
||||||
description: 'Blocked time slot in the user calendar',
|
description: 'Blocked time slot in the user calendar',
|
||||||
|
@ -33,21 +31,17 @@ export const OwnedBlockedSlotSchema = zod
|
||||||
created_at: zod.date().nullish(),
|
created_at: zod.date().nullish(),
|
||||||
updated_at: zod.date().nullish(),
|
updated_at: zod.date().nullish(),
|
||||||
type: zod.literal('blocked_owned'),
|
type: zod.literal('blocked_owned'),
|
||||||
users: zod.string().array(),
|
|
||||||
user_id: zod.string().optional(),
|
|
||||||
})
|
})
|
||||||
.openapi('OwnedBlockedSlotSchema', {
|
.openapi('OwnedBlockedSlotSchema', {
|
||||||
description: 'Blocked slot owned by the user',
|
description: 'Blocked slot owned by the user',
|
||||||
});
|
});
|
||||||
|
|
||||||
export const VisibleSlotSchema = EventSchema.omit({
|
export const VisibleSlotSchema = EventSchema.omit({
|
||||||
participants: true,
|
|
||||||
organizer: true,
|
organizer: true,
|
||||||
|
participants: true,
|
||||||
})
|
})
|
||||||
.extend({
|
.extend({
|
||||||
type: zod.literal('event'),
|
type: zod.literal('event'),
|
||||||
users: zod.string().array(),
|
|
||||||
user_id: zod.string().optional(),
|
|
||||||
})
|
})
|
||||||
.openapi('VisibleSlotSchema', {
|
.openapi('VisibleSlotSchema', {
|
||||||
description: 'Visible time slot in the user calendar',
|
description: 'Visible time slot in the user calendar',
|
||||||
|
@ -92,7 +86,6 @@ export const userCalendarQuerySchema = zod
|
||||||
);
|
);
|
||||||
return endOfWeek;
|
return endOfWeek;
|
||||||
}),
|
}),
|
||||||
userIds: zod.string().array(),
|
|
||||||
})
|
})
|
||||||
.openapi('UserCalendarQuerySchema', {
|
.openapi('UserCalendarQuerySchema', {
|
||||||
description: 'Query parameters for filtering the user calendar',
|
description: 'Query parameters for filtering the user calendar',
|
|
@ -1,28 +0,0 @@
|
||||||
import Link from 'next/link';
|
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
|
|
||||||
export default function NotFound() {
|
|
||||||
return (
|
|
||||||
<div className='min-h-screen flex items-center justify-center bg-background'>
|
|
||||||
<div className='text-center space-y-6 px-4'>
|
|
||||||
<div className='space-y-2'>
|
|
||||||
<h1 className='text-9xl font-bold text-primary'>404</h1>
|
|
||||||
<h2 className='text-3xl font-semibold text-text'>Page Not Found</h2>
|
|
||||||
<p className='text-lg text-text-muted max-w-md mx-auto'>
|
|
||||||
Sorry, we couldn't find the page you're looking for. It
|
|
||||||
might have been moved, deleted, or doesn't exist.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='flex flex-col sm:flex-row gap-4 justify-center items-center'>
|
|
||||||
<Button asChild className='px-8'>
|
|
||||||
<Link href='/'>Go Home</Link>
|
|
||||||
</Button>
|
|
||||||
<Button variant='outline_primary' asChild className='px-8'>
|
|
||||||
<Link href='/events'>Browse Events</Link>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
19
src/auth.ts
19
src/auth.ts
|
@ -2,15 +2,8 @@ import NextAuth, { CredentialsSignin } from 'next-auth';
|
||||||
|
|
||||||
import { Prisma } from '@/generated/prisma';
|
import { Prisma } from '@/generated/prisma';
|
||||||
import type { Provider } from 'next-auth/providers';
|
import type { Provider } from 'next-auth/providers';
|
||||||
|
|
||||||
import Credentials from 'next-auth/providers/credentials';
|
import Credentials from 'next-auth/providers/credentials';
|
||||||
import AuthentikProvider from 'next-auth/providers/authentik';
|
import Authentik from 'next-auth/providers/authentik';
|
||||||
import DiscordProvider from 'next-auth/providers/discord';
|
|
||||||
import FacebookProvider from 'next-auth/providers/facebook';
|
|
||||||
import GithubProvider from 'next-auth/providers/github';
|
|
||||||
import GitlabProvider from 'next-auth/providers/gitlab';
|
|
||||||
import GoogleProvider from 'next-auth/providers/google';
|
|
||||||
import KeycloakProvider from 'next-auth/providers/keycloak';
|
|
||||||
|
|
||||||
import { PrismaAdapter } from '@auth/prisma-adapter';
|
import { PrismaAdapter } from '@auth/prisma-adapter';
|
||||||
import { prisma } from '@/prisma';
|
import { prisma } from '@/prisma';
|
||||||
|
@ -95,16 +88,8 @@ const providers: Provider[] = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
process.env.AUTH_DISCORD_ID && DiscordProvider,
|
|
||||||
process.env.AUTH_FACEBOOK_ID && FacebookProvider,
|
|
||||||
process.env.AUTH_GITHUB_ID && GithubProvider,
|
|
||||||
process.env.AUTH_GITLAB_ID && GitlabProvider,
|
|
||||||
process.env.AUTH_GOOGLE_ID && GoogleProvider,
|
|
||||||
process.env.AUTH_KEYCLOAK_ID && KeycloakProvider,
|
|
||||||
|
|
||||||
process.env.AUTH_AUTHENTIK_ID &&
|
process.env.AUTH_AUTHENTIK_ID &&
|
||||||
AuthentikProvider({
|
Authentik({
|
||||||
profile(profile) {
|
profile(profile) {
|
||||||
return {
|
return {
|
||||||
id: profile.sub,
|
id: profile.sub,
|
||||||
|
|
|
@ -7,6 +7,7 @@ import '@/components/react-big-calendar.css';
|
||||||
import 'react-big-calendar/lib/addons/dragAndDrop/styles.css';
|
import 'react-big-calendar/lib/addons/dragAndDrop/styles.css';
|
||||||
import CustomToolbar from '@/components/custom-toolbar';
|
import CustomToolbar from '@/components/custom-toolbar';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useGetApiUserUserCalendar } from '@/generated/api/user/user';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import { usePatchApiEventEventID } from '@/generated/api/event/event';
|
import { usePatchApiEventEventID } from '@/generated/api/event/event';
|
||||||
import { useSession } from 'next-auth/react';
|
import { useSession } from 'next-auth/react';
|
||||||
|
@ -16,7 +17,6 @@ import { ErrorBoundary } from 'react-error-boundary';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { fromZodIssue } from 'zod-validation-error/v4';
|
import { fromZodIssue } from 'zod-validation-error/v4';
|
||||||
import type { $ZodIssue } from 'zod/v4/core';
|
import type { $ZodIssue } from 'zod/v4/core';
|
||||||
import { useGetApiCalendar } from '@/generated/api/calendar/calendar';
|
|
||||||
|
|
||||||
moment.updateLocale('en', {
|
moment.updateLocale('en', {
|
||||||
week: {
|
week: {
|
||||||
|
@ -25,28 +25,12 @@ moment.updateLocale('en', {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function eventPropGetter(event: {
|
|
||||||
id: string;
|
|
||||||
start: Date;
|
|
||||||
end: Date;
|
|
||||||
type: UserCalendarSchemaItem['type'];
|
|
||||||
userId?: string;
|
|
||||||
colorOverride?: string;
|
|
||||||
}) {
|
|
||||||
return {
|
|
||||||
style: event.colorOverride
|
|
||||||
? { backgroundColor: event.colorOverride }
|
|
||||||
: undefined,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const DaDRBCalendar = withDragAndDrop<
|
const DaDRBCalendar = withDragAndDrop<
|
||||||
{
|
{
|
||||||
id: string;
|
id: string;
|
||||||
start: Date;
|
start: Date;
|
||||||
end: Date;
|
end: Date;
|
||||||
type: UserCalendarSchemaItem['type'];
|
type: UserCalendarSchemaItem['type'];
|
||||||
userId?: string;
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -60,21 +44,9 @@ const localizer = momentLocalizer(moment);
|
||||||
export default function Calendar({
|
export default function Calendar({
|
||||||
userId,
|
userId,
|
||||||
height,
|
height,
|
||||||
additionalEvents = [],
|
|
||||||
className,
|
|
||||||
}: {
|
}: {
|
||||||
userId?: string | string[];
|
userId?: string;
|
||||||
height: string;
|
height: string;
|
||||||
additionalEvents?: {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
start: Date;
|
|
||||||
end: Date;
|
|
||||||
type: UserCalendarSchemaItem['type'];
|
|
||||||
userId?: string;
|
|
||||||
colorOverride?: string;
|
|
||||||
}[];
|
|
||||||
className?: string;
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<QueryErrorResetBoundary>
|
<QueryErrorResetBoundary>
|
||||||
|
@ -95,26 +67,10 @@ export default function Calendar({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{typeof userId === 'string' ? (
|
{userId ? (
|
||||||
<CalendarWithUserEvents
|
<CalendarWithUserEvents userId={userId} height={height} />
|
||||||
userId={userId}
|
|
||||||
height={height}
|
|
||||||
additionalEvents={additionalEvents}
|
|
||||||
className={className}
|
|
||||||
/>
|
|
||||||
) : Array.isArray(userId) && userId.length > 0 ? (
|
|
||||||
<CalendarWithMultiUserEvents
|
|
||||||
userIds={userId}
|
|
||||||
height={height}
|
|
||||||
additionalEvents={additionalEvents}
|
|
||||||
className={className}
|
|
||||||
/>
|
|
||||||
) : (
|
) : (
|
||||||
<CalendarWithoutUserEvents
|
<CalendarWithoutUserEvents height={height} />
|
||||||
height={height}
|
|
||||||
additionalEvents={additionalEvents}
|
|
||||||
className={className}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
)}
|
)}
|
||||||
|
@ -125,21 +81,9 @@ export default function Calendar({
|
||||||
function CalendarWithUserEvents({
|
function CalendarWithUserEvents({
|
||||||
userId,
|
userId,
|
||||||
height,
|
height,
|
||||||
additionalEvents,
|
|
||||||
className,
|
|
||||||
}: {
|
}: {
|
||||||
userId: string;
|
userId: string;
|
||||||
height: string;
|
height: string;
|
||||||
additionalEvents?: {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
start: Date;
|
|
||||||
end: Date;
|
|
||||||
type: UserCalendarSchemaItem['type'];
|
|
||||||
userId?: string;
|
|
||||||
colorOverride?: string;
|
|
||||||
}[];
|
|
||||||
className?: string;
|
|
||||||
}) {
|
}) {
|
||||||
const sesstion = useSession();
|
const sesstion = useSession();
|
||||||
const [currentView, setCurrentView] = React.useState<
|
const [currentView, setCurrentView] = React.useState<
|
||||||
|
@ -148,9 +92,9 @@ function CalendarWithUserEvents({
|
||||||
const [currentDate, setCurrentDate] = React.useState<Date>(new Date());
|
const [currentDate, setCurrentDate] = React.useState<Date>(new Date());
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { data, refetch, error, isError } = useGetApiCalendar(
|
const { data, refetch, error, isError } = useGetApiUserUserCalendar(
|
||||||
|
userId,
|
||||||
{
|
{
|
||||||
userIds: [userId],
|
|
||||||
start: moment(currentDate)
|
start: moment(currentDate)
|
||||||
.startOf(
|
.startOf(
|
||||||
currentView === 'agenda'
|
currentView === 'agenda'
|
||||||
|
@ -193,8 +137,6 @@ function CalendarWithUserEvents({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DaDRBCalendar
|
<DaDRBCalendar
|
||||||
className={className}
|
|
||||||
eventPropGetter={eventPropGetter}
|
|
||||||
localizer={localizer}
|
localizer={localizer}
|
||||||
culture='de-DE'
|
culture='de-DE'
|
||||||
defaultView='week'
|
defaultView='week'
|
||||||
|
@ -210,17 +152,15 @@ function CalendarWithUserEvents({
|
||||||
onNavigate={(date) => {
|
onNavigate={(date) => {
|
||||||
setCurrentDate(date);
|
setCurrentDate(date);
|
||||||
}}
|
}}
|
||||||
events={[
|
events={
|
||||||
...(data?.data.calendar.map((event) => ({
|
data?.data.calendar.map((event) => ({
|
||||||
id: event.id,
|
id: event.id,
|
||||||
title: event.type === 'event' ? event.title : 'Blocker',
|
title: event.type === 'event' ? event.title : 'Blocker',
|
||||||
start: new Date(event.start_time),
|
start: new Date(event.start_time),
|
||||||
end: new Date(event.end_time),
|
end: new Date(event.end_time),
|
||||||
type: event.type,
|
type: event.type,
|
||||||
userId: event.users[0],
|
})) ?? []
|
||||||
})) ?? []),
|
}
|
||||||
...(additionalEvents ?? []),
|
|
||||||
]}
|
|
||||||
onSelectEvent={(event) => {
|
onSelectEvent={(event) => {
|
||||||
router.push(`/events/${event.id}`);
|
router.push(`/events/${event.id}`);
|
||||||
}}
|
}}
|
||||||
|
@ -288,116 +228,7 @@ function CalendarWithUserEvents({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalendarWithMultiUserEvents({
|
function CalendarWithoutUserEvents({ height }: { height: string }) {
|
||||||
userIds,
|
|
||||||
height,
|
|
||||||
additionalEvents,
|
|
||||||
className,
|
|
||||||
}: {
|
|
||||||
userIds: string[];
|
|
||||||
height: string;
|
|
||||||
additionalEvents?: {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
start: Date;
|
|
||||||
end: Date;
|
|
||||||
type: UserCalendarSchemaItem['type'];
|
|
||||||
userId?: string;
|
|
||||||
colorOverride?: string;
|
|
||||||
}[];
|
|
||||||
className?: string;
|
|
||||||
}) {
|
|
||||||
const [currentView, setCurrentView] = React.useState<
|
|
||||||
'month' | 'week' | 'day' | 'agenda' | 'work_week'
|
|
||||||
>('week');
|
|
||||||
const [currentDate, setCurrentDate] = React.useState<Date>(new Date());
|
|
||||||
|
|
||||||
const { data, error, isError } = useGetApiCalendar(
|
|
||||||
{
|
|
||||||
userIds: userIds,
|
|
||||||
start: moment(currentDate)
|
|
||||||
.startOf(
|
|
||||||
currentView === 'agenda'
|
|
||||||
? 'month'
|
|
||||||
: currentView === 'work_week'
|
|
||||||
? 'week'
|
|
||||||
: currentView,
|
|
||||||
)
|
|
||||||
.toISOString(),
|
|
||||||
end: moment(currentDate)
|
|
||||||
.endOf(
|
|
||||||
currentView === 'agenda'
|
|
||||||
? 'month'
|
|
||||||
: currentView === 'work_week'
|
|
||||||
? 'week'
|
|
||||||
: currentView,
|
|
||||||
)
|
|
||||||
.toISOString(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
query: {
|
|
||||||
refetchOnWindowFocus: true,
|
|
||||||
refetchOnReconnect: true,
|
|
||||||
refetchOnMount: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isError) {
|
|
||||||
throw error.response?.data || 'Failed to fetch calendar data';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DaDRBCalendar
|
|
||||||
className={className}
|
|
||||||
eventPropGetter={eventPropGetter}
|
|
||||||
localizer={localizer}
|
|
||||||
culture='de-DE'
|
|
||||||
defaultView='week'
|
|
||||||
components={{
|
|
||||||
toolbar: CustomToolbar,
|
|
||||||
}}
|
|
||||||
style={{
|
|
||||||
height: height,
|
|
||||||
}}
|
|
||||||
onView={setCurrentView}
|
|
||||||
view={currentView}
|
|
||||||
date={currentDate}
|
|
||||||
onNavigate={(date) => {
|
|
||||||
setCurrentDate(date);
|
|
||||||
}}
|
|
||||||
events={[
|
|
||||||
...(data?.data.calendar.map((event) => ({
|
|
||||||
id: event.id,
|
|
||||||
title: event.type === 'event' ? event.title : 'Blocker',
|
|
||||||
start: new Date(event.start_time),
|
|
||||||
end: new Date(event.end_time),
|
|
||||||
type: event.type,
|
|
||||||
userId: event.users[0],
|
|
||||||
})) ?? []),
|
|
||||||
...(additionalEvents ?? []),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function CalendarWithoutUserEvents({
|
|
||||||
height,
|
|
||||||
additionalEvents,
|
|
||||||
className,
|
|
||||||
}: {
|
|
||||||
height: string;
|
|
||||||
additionalEvents?: {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
start: Date;
|
|
||||||
end: Date;
|
|
||||||
type: UserCalendarSchemaItem['type'];
|
|
||||||
userId?: string;
|
|
||||||
colorOverride?: string;
|
|
||||||
}[];
|
|
||||||
className?: string;
|
|
||||||
}) {
|
|
||||||
const [currentView, setCurrentView] = React.useState<
|
const [currentView, setCurrentView] = React.useState<
|
||||||
'month' | 'week' | 'day' | 'agenda' | 'work_week'
|
'month' | 'week' | 'day' | 'agenda' | 'work_week'
|
||||||
>('week');
|
>('week');
|
||||||
|
@ -405,8 +236,6 @@ function CalendarWithoutUserEvents({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DaDRBCalendar
|
<DaDRBCalendar
|
||||||
className={className}
|
|
||||||
eventPropGetter={eventPropGetter}
|
|
||||||
localizer={localizer}
|
localizer={localizer}
|
||||||
culture='de-DE'
|
culture='de-DE'
|
||||||
defaultView='week'
|
defaultView='week'
|
||||||
|
@ -422,7 +251,6 @@ function CalendarWithoutUserEvents({
|
||||||
onNavigate={(date) => {
|
onNavigate={(date) => {
|
||||||
setCurrentDate(date);
|
setCurrentDate(date);
|
||||||
}}
|
}}
|
||||||
events={additionalEvents}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
/* Container der Toolbar */
|
/* Container der Toolbar */
|
||||||
.custom-toolbar {
|
.custom-toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
padding: calc(var(--spacing) * 2);
|
padding: calc(var(--spacing) * 2);
|
||||||
padding-left: calc(50px + var(--spacing));
|
padding-left: calc(50px + var(--spacing));
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
@media (max-width: 870px) {
|
|
||||||
padding-left: 0;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
box-shadow: none;
|
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,12 +25,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-toolbar .navigation-controls .handleWeek {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-toolbar .navigation-controls button {
|
.custom-toolbar .navigation-controls button {
|
||||||
|
@ -87,8 +77,6 @@
|
||||||
border-radius: 11px;
|
border-radius: 11px;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-toolbar .navigation-controls .handleWeek button {
|
.custom-toolbar .navigation-controls .handleWeek button {
|
||||||
|
@ -105,9 +93,6 @@
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
border-radius: 11px;
|
border-radius: 11px;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-section .datepicker-box {
|
.right-section .datepicker-box {
|
||||||
|
@ -115,12 +100,8 @@
|
||||||
background-color: #c6c6c6;
|
background-color: #c6c6c6;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
border-radius: 11px;
|
border-radius: 11px;
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
font-family: 'Varela Round', sans-serif;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.datepicker {
|
.datepicker {
|
||||||
|
|
|
@ -171,9 +171,12 @@ const CustomToolbar: React.FC<CustomToolbarProps> = ({
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='custom-toolbar'>
|
<div
|
||||||
|
className='custom-toolbar'
|
||||||
|
style={{ display: 'flex', flexDirection: 'initial', gap: '8px' }}
|
||||||
|
>
|
||||||
<div className='view-change'>
|
<div className='view-change'>
|
||||||
<div className='view-switcher'>
|
<div className='view-switcher' style={{ display: 'flex', gap: '8px' }}>
|
||||||
<Button
|
<Button
|
||||||
//className='hover:bg-orange-600 hover:text-white'
|
//className='hover:bg-orange-600 hover:text-white'
|
||||||
type='submit'
|
type='submit'
|
||||||
|
|
|
@ -37,7 +37,7 @@ import {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
title: 'Calendar',
|
title: 'Calendar',
|
||||||
url: '/home',
|
url: '#',
|
||||||
icon: CalendarDays,
|
icon: CalendarDays,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ export function AppSidebar() {
|
||||||
></Logo>
|
></Logo>
|
||||||
</Link>
|
</Link>
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
<SidebarContent className='grid grid-rows-[auto_1fr_auto] overflow-hidden'>
|
<SidebarContent className='grid grid-rows-[auto_1fr_auto]'>
|
||||||
<Collapsible defaultOpen className='group/collapsible'>
|
<Collapsible defaultOpen className='group/collapsible'>
|
||||||
<SidebarGroup>
|
<SidebarGroup>
|
||||||
<SidebarGroupLabel asChild>
|
<SidebarGroupLabel asChild>
|
||||||
|
|
|
@ -1,20 +1,9 @@
|
||||||
'use client';
|
|
||||||
|
|
||||||
import { Card } from '@/components/ui/card';
|
import { Card } from '@/components/ui/card';
|
||||||
import Logo from '@/components/misc/logo';
|
import Logo from '@/components/misc/logo';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import zod from 'zod/v4';
|
import zod from 'zod/v4';
|
||||||
import { EventSchema } from '@/app/api/event/validation';
|
import { EventSchema } from '@/app/api/event/validation';
|
||||||
import { useSession } from 'next-auth/react';
|
|
||||||
import {
|
|
||||||
Select,
|
|
||||||
SelectContent,
|
|
||||||
SelectItem,
|
|
||||||
SelectTrigger,
|
|
||||||
SelectValue,
|
|
||||||
} from '../ui/select';
|
|
||||||
import { usePatchApiEventEventIDParticipantUser } from '@/generated/api/event-participant/event-participant';
|
|
||||||
|
|
||||||
type EventListEntryProps = zod.output<typeof EventSchema>;
|
type EventListEntryProps = zod.output<typeof EventSchema>;
|
||||||
|
|
||||||
|
@ -24,11 +13,7 @@ export default function EventListEntry({
|
||||||
start_time,
|
start_time,
|
||||||
end_time,
|
end_time,
|
||||||
location,
|
location,
|
||||||
participants,
|
|
||||||
}: EventListEntryProps) {
|
}: EventListEntryProps) {
|
||||||
const session = useSession();
|
|
||||||
const updateAttendance = usePatchApiEventEventIDParticipantUser();
|
|
||||||
|
|
||||||
const formatDate = (isoString?: string) => {
|
const formatDate = (isoString?: string) => {
|
||||||
if (!isoString) return '-';
|
if (!isoString) return '-';
|
||||||
return new Date(isoString).toLocaleDateString();
|
return new Date(isoString).toLocaleDateString();
|
||||||
|
@ -75,45 +60,6 @@ export default function EventListEntry({
|
||||||
<Label>{location}</Label>
|
<Label>{location}</Label>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{participants &&
|
|
||||||
participants.some(
|
|
||||||
(p) => p.user.id === session.data?.user?.id,
|
|
||||||
) && (
|
|
||||||
<div className='flex items-center justify-end'>
|
|
||||||
<Select
|
|
||||||
defaultValue={
|
|
||||||
participants
|
|
||||||
.find((p) => p.user.id === session.data?.user?.id)
|
|
||||||
?.status.toUpperCase() || 'PENDING'
|
|
||||||
}
|
|
||||||
onValueChange={(value) => {
|
|
||||||
updateAttendance.mutate({
|
|
||||||
eventID: id,
|
|
||||||
user: session.data?.user?.id || '',
|
|
||||||
data: {
|
|
||||||
status: value as
|
|
||||||
| 'ACCEPTED'
|
|
||||||
| 'TENTATIVE'
|
|
||||||
| 'DECLINED'
|
|
||||||
| 'PENDING',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<SelectTrigger id='language'>
|
|
||||||
<SelectValue placeholder='Select status' />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value='ACCEPTED'>Attending</SelectItem>
|
|
||||||
<SelectItem value='TENTATIVE'>Maybe Attending</SelectItem>
|
|
||||||
<SelectItem value='DECLINED'>Not Attending</SelectItem>
|
|
||||||
<SelectItem value='PENDING' disabled>
|
|
||||||
Pending Response
|
|
||||||
</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
@ -10,7 +10,6 @@ type ParticipantListEntryProps = zod.output<typeof ParticipantSchema>;
|
||||||
|
|
||||||
export default function ParticipantListEntry({
|
export default function ParticipantListEntry({
|
||||||
user,
|
user,
|
||||||
status,
|
|
||||||
}: ParticipantListEntryProps) {
|
}: ParticipantListEntryProps) {
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
const defaultImage =
|
const defaultImage =
|
||||||
|
@ -22,7 +21,6 @@ export default function ParticipantListEntry({
|
||||||
<div className='flex items-center gap-2 py-1 ml-5'>
|
<div className='flex items-center gap-2 py-1 ml-5'>
|
||||||
<Image src={finalImageSrc} alt='Avatar' width={30} height={30} />
|
<Image src={finalImageSrc} alt='Avatar' width={30} height={30} />
|
||||||
<span>{user.name}</span>
|
<span>{user.name}</span>
|
||||||
<span className='text-sm text-gray-500'>{status}</span>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,16 +21,6 @@ import { useSearchParams } from 'next/navigation';
|
||||||
|
|
||||||
import zod from 'zod/v4';
|
import zod from 'zod/v4';
|
||||||
import { PublicUserSchema } from '@/app/api/user/validation';
|
import { PublicUserSchema } from '@/app/api/user/validation';
|
||||||
import Calendar from '@/components/calendar';
|
|
||||||
import {
|
|
||||||
Dialog,
|
|
||||||
DialogContent,
|
|
||||||
DialogDescription,
|
|
||||||
DialogFooter,
|
|
||||||
DialogHeader,
|
|
||||||
DialogTitle,
|
|
||||||
DialogTrigger,
|
|
||||||
} from '../ui/dialog';
|
|
||||||
|
|
||||||
type User = zod.output<typeof PublicUserSchema>;
|
type User = zod.output<typeof PublicUserSchema>;
|
||||||
|
|
||||||
|
@ -51,12 +41,7 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
||||||
const startFromUrl = searchParams.get('start');
|
const startFromUrl = searchParams.get('start');
|
||||||
const endFromUrl = searchParams.get('end');
|
const endFromUrl = searchParams.get('end');
|
||||||
|
|
||||||
const {
|
const { mutate: createEvent, status, isSuccess, error } = usePostApiEvent();
|
||||||
mutateAsync: createEvent,
|
|
||||||
status,
|
|
||||||
isSuccess,
|
|
||||||
error,
|
|
||||||
} = usePostApiEvent();
|
|
||||||
const { data, isLoading, error: fetchError } = useGetApiUserMe();
|
const { data, isLoading, error: fetchError } = useGetApiUserMe();
|
||||||
const { data: eventData } = useGetApiEventEventID(props.eventId!, {
|
const { data: eventData } = useGetApiEventEventID(props.eventId!, {
|
||||||
query: { enabled: props.type === 'edit' },
|
query: { enabled: props.type === 'edit' },
|
||||||
|
@ -83,8 +68,6 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
||||||
const [location, setLocation] = React.useState('');
|
const [location, setLocation] = React.useState('');
|
||||||
const [description, setDescription] = React.useState('');
|
const [description, setDescription] = React.useState('');
|
||||||
|
|
||||||
const [calendarOpen, setCalendarOpen] = React.useState(false);
|
|
||||||
|
|
||||||
// Update state when event data loads
|
// Update state when event data loads
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (props.type === 'edit' && event) {
|
if (props.type === 'edit' && event) {
|
||||||
|
@ -155,10 +138,8 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
||||||
participants: selectedParticipants.map((u) => u.id),
|
participants: selectedParticipants.map((u) => u.id),
|
||||||
};
|
};
|
||||||
|
|
||||||
let eventID: string | undefined;
|
|
||||||
|
|
||||||
if (props.type === 'edit' && props.eventId) {
|
if (props.type === 'edit' && props.eventId) {
|
||||||
const mutationResult = await patchEvent.mutateAsync({
|
await patchEvent.mutateAsync({
|
||||||
eventID: props.eventId,
|
eventID: props.eventId,
|
||||||
data: {
|
data: {
|
||||||
title: data.title,
|
title: data.title,
|
||||||
|
@ -169,12 +150,9 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
||||||
participants: data.participants,
|
participants: data.participants,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
eventID = mutationResult.data.event.id;
|
|
||||||
console.log('Updating event');
|
console.log('Updating event');
|
||||||
} else {
|
} else {
|
||||||
console.log('Creating event');
|
console.log('Creating event');
|
||||||
const mutationResult = await createEvent({ data });
|
|
||||||
eventID = mutationResult.data.event.id;
|
|
||||||
createEvent({ data });
|
createEvent({ data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +161,7 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
||||||
toastId={t}
|
toastId={t}
|
||||||
title='Event saved'
|
title='Event saved'
|
||||||
description={event?.title}
|
description={event?.title}
|
||||||
onAction={() => router.push(`/events/${eventID}`)}
|
onAction={() => router.push(`/events/${event?.id}`)}
|
||||||
variant='success'
|
variant='success'
|
||||||
buttonText='show'
|
buttonText='show'
|
||||||
/>
|
/>
|
||||||
|
@ -216,183 +194,149 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
||||||
return <div>Error loading event.</div>;
|
return <div>Error loading event.</div>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<form className='flex flex-col gap-5 w-full' onSubmit={handleSubmit}>
|
||||||
<Dialog open={calendarOpen} onOpenChange={setCalendarOpen}>
|
<div className='grid grid-row-start:auto gap-4 sm:gap-8 w-full'>
|
||||||
<form className='flex flex-col gap-5 w-full' onSubmit={handleSubmit}>
|
<div className='h-full w-full mt-0 ml-2 mb-16 flex items-center max-sm:grid max-sm:grid-row-start:auto max-sm:mb-6 max-sm:mt-10 max-sm:ml-0'>
|
||||||
<div className='grid grid-row-start:auto gap-4 sm:gap-8 w-full'>
|
<div className='w-[100px] max-sm:w-full max-sm:flex max-sm:justify-center'>
|
||||||
<div className='h-full w-full mt-0 ml-2 mb-16 flex items-center max-sm:grid max-sm:grid-row-start:auto max-sm:mb-6 max-sm:mt-10 max-sm:ml-0'>
|
<Logo colorType='monochrome' logoType='submark' width={50} />
|
||||||
<div className='w-[100px] max-sm:w-full max-sm:flex max-sm:justify-center'>
|
|
||||||
<Logo colorType='monochrome' logoType='submark' width={50} />
|
|
||||||
</div>
|
|
||||||
<div className='items-center ml-auto mr-auto max-sm:mb-6 max-sm:w-full'>
|
|
||||||
<LabeledInput
|
|
||||||
type='text'
|
|
||||||
label='Event Name'
|
|
||||||
placeholder={
|
|
||||||
props.type === 'create' ? 'New Event' : 'Event Name'
|
|
||||||
}
|
|
||||||
name='eventName'
|
|
||||||
variantSize='big'
|
|
||||||
value={title}
|
|
||||||
onChange={(e) => setTitle(e.target.value)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='w-0 sm:w-[50px]'></div>
|
|
||||||
</div>
|
|
||||||
<div className='grid grid-cols-4 gap-4 h-full w-full max-lg:grid-cols-2 max-sm:grid-cols-1'>
|
|
||||||
<div>
|
|
||||||
<TimePicker
|
|
||||||
dateLabel='start Time'
|
|
||||||
timeLabel=' '
|
|
||||||
date={startDate}
|
|
||||||
setDate={setStartDate}
|
|
||||||
time={startTime}
|
|
||||||
setTime={setStartTime}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<TimePicker
|
|
||||||
dateLabel='end Time'
|
|
||||||
timeLabel=' '
|
|
||||||
date={endDate}
|
|
||||||
setDate={setEndDate}
|
|
||||||
time={endTime}
|
|
||||||
setTime={setEndTime}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='w-54'>
|
|
||||||
<LabeledInput
|
|
||||||
type='text'
|
|
||||||
label='Location'
|
|
||||||
placeholder='where is the event?'
|
|
||||||
name='eventLocation'
|
|
||||||
value={location}
|
|
||||||
onChange={(e) => setLocation(e.target.value)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='flex flex-col gap-4'>
|
|
||||||
<div className='flex flex-row gap-2'>
|
|
||||||
<Label className='w-[70px]'>created:</Label>
|
|
||||||
<Label className='text-[var(--color-neutral-300)]'>
|
|
||||||
{createdAtDisplay}
|
|
||||||
</Label>
|
|
||||||
</div>
|
|
||||||
<div className='flex flex-row gap-2'>
|
|
||||||
<Label className='w-[70px]'>updated:</Label>
|
|
||||||
<p className='text-[var(--color-neutral-300)]'>
|
|
||||||
{updatedAtDisplay}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='h-full w-full grid grid-cols-2 gap-4 max-sm:grid-cols-1'>
|
|
||||||
<div className='h-full w-full grid grid-flow-row gap-4'>
|
|
||||||
<div className='h-full w-full'>
|
|
||||||
<div className='flex flex-row gap-2'>
|
|
||||||
<Label>Organiser:</Label>
|
|
||||||
<Label className='text-[var(--color-neutral-300)]'>
|
|
||||||
{organiserValue}
|
|
||||||
</Label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='h-full w-full'>
|
|
||||||
<LabeledInput
|
|
||||||
type='text'
|
|
||||||
label='Event Description'
|
|
||||||
placeholder='What is the event about?'
|
|
||||||
name='eventDescription'
|
|
||||||
variantSize='textarea'
|
|
||||||
value={description}
|
|
||||||
onChange={(e) => setDescription(e.target.value)}
|
|
||||||
></LabeledInput>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='h-full w-full'>
|
|
||||||
<Label>Participants</Label>
|
|
||||||
<UserSearchInput
|
|
||||||
selectedUsers={selectedParticipants}
|
|
||||||
addUserAction={(user) => {
|
|
||||||
setSelectedParticipants((current) =>
|
|
||||||
current.find((u) => u.id === user.id)
|
|
||||||
? current
|
|
||||||
: [...current, user],
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
removeUserAction={(user) => {
|
|
||||||
setSelectedParticipants((current) =>
|
|
||||||
current.filter((u) => u.id !== user.id),
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<DialogTrigger asChild>
|
|
||||||
<Button variant='primary'>Calendar</Button>
|
|
||||||
</DialogTrigger>
|
|
||||||
<div className='grid grid-cols-1 mt-3 sm:max-h-60 sm:grid-cols-2 sm:overflow-y-auto sm:mb-0'>
|
|
||||||
{selectedParticipants.map((user) => (
|
|
||||||
<ParticipantListEntry
|
|
||||||
key={user.id}
|
|
||||||
user={user}
|
|
||||||
status='PENDING'
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='flex flex-row gap-2 justify-end mt-4 mb-6'>
|
|
||||||
<div className='w-[20%] grid max-sm:w-[40%]'>
|
|
||||||
<Button
|
|
||||||
type='button'
|
|
||||||
variant='secondary'
|
|
||||||
onClick={() => {
|
|
||||||
router.back();
|
|
||||||
console.log('user aborted - no change in database');
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
cancel
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
<div className='w-[20%] grid max-sm:w-[40%]'>
|
|
||||||
<Button
|
|
||||||
type='submit'
|
|
||||||
variant='primary'
|
|
||||||
disabled={status === 'pending'}
|
|
||||||
>
|
|
||||||
{status === 'pending' ? 'Saving...' : 'save event'}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{isSuccess && <p>Event created!</p>}
|
|
||||||
{error && <p className='text-red-500'>Error: {error.message}</p>}
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div className='items-center ml-auto mr-auto max-sm:mb-6 max-sm:w-full'>
|
||||||
<DialogContent className='sm:max-w-[750px]'>
|
<LabeledInput
|
||||||
<DialogHeader>
|
type='text'
|
||||||
<DialogTitle>Calendar</DialogTitle>
|
label='Event Name'
|
||||||
<DialogDescription>
|
placeholder={props.type === 'create' ? 'New Event' : 'Event Name'}
|
||||||
Calendar for selected participants
|
name='eventName'
|
||||||
</DialogDescription>
|
variantSize='big'
|
||||||
</DialogHeader>
|
value={title}
|
||||||
<DialogFooter className='max-w-[calc(100svw-70px)]'>
|
onChange={(e) => setTitle(e.target.value)}
|
||||||
<Calendar
|
|
||||||
userId={selectedParticipants.map((u) => u.id)}
|
|
||||||
additionalEvents={[
|
|
||||||
{
|
|
||||||
id: 'temp-event',
|
|
||||||
title: title || 'New Event',
|
|
||||||
start: startDate ? new Date(startDate) : new Date(),
|
|
||||||
end: endDate ? new Date(endDate) : new Date(),
|
|
||||||
type: 'event',
|
|
||||||
userId: 'create-event',
|
|
||||||
colorOverride: '#ff9800',
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
height='600px'
|
|
||||||
/>
|
/>
|
||||||
</DialogFooter>
|
</div>
|
||||||
</DialogContent>
|
<div className='w-0 sm:w-[50px]'></div>
|
||||||
</Dialog>
|
</div>
|
||||||
</>
|
<div className='grid grid-cols-4 gap-4 h-full w-full max-lg:grid-cols-2 max-sm:grid-cols-1'>
|
||||||
|
<div>
|
||||||
|
<TimePicker
|
||||||
|
dateLabel='start Time'
|
||||||
|
timeLabel=' '
|
||||||
|
date={startDate}
|
||||||
|
setDate={setStartDate}
|
||||||
|
time={startTime}
|
||||||
|
setTime={setStartTime}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<TimePicker
|
||||||
|
dateLabel='end Time'
|
||||||
|
timeLabel=' '
|
||||||
|
date={endDate}
|
||||||
|
setDate={setEndDate}
|
||||||
|
time={endTime}
|
||||||
|
setTime={setEndTime}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className='w-54'>
|
||||||
|
<LabeledInput
|
||||||
|
type='text'
|
||||||
|
label='Location'
|
||||||
|
placeholder='where is the event?'
|
||||||
|
name='eventLocation'
|
||||||
|
value={location}
|
||||||
|
onChange={(e) => setLocation(e.target.value)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className='flex flex-col gap-4'>
|
||||||
|
<div className='flex flex-row gap-2'>
|
||||||
|
<Label className='w-[70px]'>created:</Label>
|
||||||
|
<Label className='text-[var(--color-neutral-300)]'>
|
||||||
|
{createdAtDisplay}
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
<div className='flex flex-row gap-2'>
|
||||||
|
<Label className='w-[70px]'>updated:</Label>
|
||||||
|
<p className='text-[var(--color-neutral-300)]'>
|
||||||
|
{updatedAtDisplay}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='h-full w-full grid grid-cols-2 gap-4 max-sm:grid-cols-1'>
|
||||||
|
<div className='h-full w-full grid grid-flow-row gap-4'>
|
||||||
|
<div className='h-full w-full'>
|
||||||
|
<div className='flex flex-row gap-2'>
|
||||||
|
<Label>Organiser:</Label>
|
||||||
|
<Label className='text-[var(--color-neutral-300)]'>
|
||||||
|
{organiserValue}
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='h-full w-full'>
|
||||||
|
<LabeledInput
|
||||||
|
type='text'
|
||||||
|
label='Event Description'
|
||||||
|
placeholder='What is the event about?'
|
||||||
|
name='eventDescription'
|
||||||
|
variantSize='textarea'
|
||||||
|
value={description}
|
||||||
|
onChange={(e) => setDescription(e.target.value)}
|
||||||
|
></LabeledInput>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='h-full w-full'>
|
||||||
|
<Label>Participants</Label>
|
||||||
|
<UserSearchInput
|
||||||
|
selectedUsers={selectedParticipants}
|
||||||
|
addUserAction={(user) => {
|
||||||
|
setSelectedParticipants((current) =>
|
||||||
|
current.find((u) => u.id === user.id)
|
||||||
|
? current
|
||||||
|
: [...current, user],
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
removeUserAction={(user) => {
|
||||||
|
setSelectedParticipants((current) =>
|
||||||
|
current.filter((u) => u.id !== user.id),
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div className='grid grid-cols-1 mt-3 sm:max-h-60 sm:grid-cols-2 sm:overflow-y-auto sm:mb-0'>
|
||||||
|
{selectedParticipants.map((user) => (
|
||||||
|
<ParticipantListEntry
|
||||||
|
key={user.id}
|
||||||
|
user={user}
|
||||||
|
status='PENDING'
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='flex flex-row gap-2 justify-end mt-4 mb-6'>
|
||||||
|
<div className='w-[20%] grid max-sm:w-[40%]'>
|
||||||
|
<Button
|
||||||
|
type='button'
|
||||||
|
variant='secondary'
|
||||||
|
onClick={() => {
|
||||||
|
router.back();
|
||||||
|
console.log('user aborted - no change in database');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
cancel
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className='w-[20%] grid max-sm:w-[40%]'>
|
||||||
|
<Button
|
||||||
|
type='submit'
|
||||||
|
variant='primary'
|
||||||
|
disabled={status === 'pending'}
|
||||||
|
>
|
||||||
|
{status === 'pending' ? 'Saving...' : 'save event'}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{isSuccess && <p>Event created!</p>}
|
||||||
|
{error && <p className='text-red-500'>Error: {error.message}</p>}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-off-range-bg {
|
.rbc-off-range-bg {
|
||||||
background: var(--color-neutral-700);
|
background: #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-header {
|
.rbc-header {
|
||||||
|
@ -596,7 +596,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|
||||||
/*Own changes 06*/
|
/*Own changes 06*/
|
||||||
background-color: var(--color-neutral-700);
|
background-color: #383838;
|
||||||
/*Own changes 06*/
|
/*Own changes 06*/
|
||||||
}
|
}
|
||||||
.rbc-time-column .rbc-timeslot-group {
|
.rbc-time-column .rbc-timeslot-group {
|
||||||
|
@ -606,7 +606,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-timeslot-group {
|
.rbc-timeslot-group {
|
||||||
border-bottom: 1px solid var(--color-neutral-300); /*#ddd*/
|
border-bottom: 1px solid #8d8d8d; /*#ddd*/
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
|
@ -624,13 +624,12 @@ button.rbc-input::-moz-focus-inner {
|
||||||
flex: none;
|
flex: none;
|
||||||
|
|
||||||
/*Own changes 07*/
|
/*Own changes 07*/
|
||||||
background-color: var(--color-neutral-500);
|
background-color: #8d8d8d;
|
||||||
/*Own changes 07*/
|
/*Own changes 07*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-label {
|
.rbc-label {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
width: 54.3542px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-day-slot {
|
.rbc-day-slot {
|
||||||
|
@ -687,7 +686,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
min-height: 1em;
|
min-height: 1em;
|
||||||
}
|
}
|
||||||
.rbc-day-slot .rbc-time-slot {
|
.rbc-day-slot .rbc-time-slot {
|
||||||
border-top: 1px solid transparent; /*#f7f7f7*/
|
border-top: 1px solid #383838; /*#f7f7f7*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-time-view-resources .rbc-time-gutter,
|
.rbc-time-view-resources .rbc-time-gutter,
|
||||||
|
@ -783,7 +782,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
/*Own changes 05*/
|
/*Own changes 05*/
|
||||||
background-color: var(--color-neutral-500);
|
background-color: #555555;
|
||||||
/*Own changes 05*/
|
/*Own changes 05*/
|
||||||
}
|
}
|
||||||
.rbc-time-view .rbc-allday-cell + .rbc-allday-cell {
|
.rbc-time-view .rbc-allday-cell + .rbc-allday-cell {
|
||||||
|
@ -810,10 +809,6 @@ button.rbc-input::-moz-focus-inner {
|
||||||
-webkit-box-direction: normal;
|
-webkit-box-direction: normal;
|
||||||
-ms-flex-direction: row;
|
-ms-flex-direction: row;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-right: 14px;
|
|
||||||
@media ((hover: none) and (pointer: coarse)) {
|
|
||||||
margin-right: 0px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.rbc-rtl .rbc-time-header.rbc-overflowing {
|
.rbc-rtl .rbc-time-header.rbc-overflowing {
|
||||||
border-right-width: 0;
|
border-right-width: 0;
|
||||||
|
@ -877,7 +872,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-time-header-content {
|
.rbc-time-header-content {
|
||||||
border-bottom: 2px solid var(--color-neutral-400); /*#ddd*/
|
border-bottom: 2px solid #717171; /*#ddd*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.rbc-time-column :last-child {
|
.rbc-time-column :last-child {
|
||||||
|
@ -895,7 +890,7 @@ button.rbc-input::-moz-focus-inner {
|
||||||
/*Own changes 09*/
|
/*Own changes 09*/
|
||||||
}
|
}
|
||||||
.rbc-time-content > * + * > * {
|
.rbc-time-content > * + * > * {
|
||||||
border-left: 1px solid var(--color-neutral-300); /*#ddd*/
|
border-left: 1px solid #c6c6c6; /*#ddd*/
|
||||||
}
|
}
|
||||||
.rbc-rtl .rbc-time-content > * + * > * {
|
.rbc-rtl .rbc-time-content > * + * > * {
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
|
|
99
yarn.lock
99
yarn.lock
|
@ -436,21 +436,21 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/config-array@npm:^0.21.0":
|
"@eslint/config-array@npm:^0.20.1":
|
||||||
version: 0.21.0
|
version: 0.20.1
|
||||||
resolution: "@eslint/config-array@npm:0.21.0"
|
resolution: "@eslint/config-array@npm:0.20.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint/object-schema": "npm:^2.1.6"
|
"@eslint/object-schema": "npm:^2.1.6"
|
||||||
debug: "npm:^4.3.1"
|
debug: "npm:^4.3.1"
|
||||||
minimatch: "npm:^3.1.2"
|
minimatch: "npm:^3.1.2"
|
||||||
checksum: 10c0/0ea801139166c4aa56465b309af512ef9b2d3c68f9198751bbc3e21894fe70f25fbf26e1b0e9fffff41857bc21bfddeee58649ae6d79aadcd747db0c5dca771f
|
checksum: 10c0/709108c3925d83c2166024646829ab61ba5fa85c6568daefd32508899f46ed8dc36d7153042df6dcc7e58ad543bc93298b646575daecb5eb4e39a43d838dab42
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/config-helpers@npm:^0.3.0":
|
"@eslint/config-helpers@npm:^0.2.1":
|
||||||
version: 0.3.0
|
version: 0.2.3
|
||||||
resolution: "@eslint/config-helpers@npm:0.3.0"
|
resolution: "@eslint/config-helpers@npm:0.2.3"
|
||||||
checksum: 10c0/013ae7b189eeae8b30cc2ee87bc5c9c091a9cd615579003290eb28bebad5d78806a478e74ba10b3fe08ed66975b52af7d2cd4b4b43990376412b14e5664878c8
|
checksum: 10c0/8fd36d7f33013628787947c81894807c7498b31eacf6648efa6d7c7a99aac6bf0d59a8a4d14f968ec2aeebefb76a1a7e4fd4cd556a296323d4711b3d7a7cda22
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -489,10 +489,10 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/js@npm:9.30.0":
|
"@eslint/js@npm:9.29.0":
|
||||||
version: 9.30.0
|
version: 9.29.0
|
||||||
resolution: "@eslint/js@npm:9.30.0"
|
resolution: "@eslint/js@npm:9.29.0"
|
||||||
checksum: 10c0/aec2df7f4e4e884d693dc27dbf4713c1a48afa327bfadac25ebd0e61a2797ce906f2f2a9be0d7d922acb68ccd68cc88779737811f9769eb4933d1f5e574c469e
|
checksum: 10c0/d0ccf37063fa27a3fae9347cb044f84ca10b5a2fa19ffb2b3fedf3b96843ac1ff359ea9f0ab0e80f2f16fda4cb0dc61ea0fed0375090f050fe0a029e7d6de3a3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -1013,15 +1013,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@marko19907/string-to-color@npm:^1.0.0":
|
|
||||||
version: 1.0.0
|
|
||||||
resolution: "@marko19907/string-to-color@npm:1.0.0"
|
|
||||||
dependencies:
|
|
||||||
esm-seedrandom: "npm:^3.0.5"
|
|
||||||
checksum: 10c0/fd297937fb5a8a0c3372bc614f9a4e21842e3392ef54e0d323f0fe730ec5b5a441f921e63b3b151bd39ca64a120ddfe905d1a67ca62ed637ade69c96c55fe641
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@napi-rs/wasm-runtime@npm:^0.2.11":
|
"@napi-rs/wasm-runtime@npm:^0.2.11":
|
||||||
version: 0.2.11
|
version: 0.2.11
|
||||||
resolution: "@napi-rs/wasm-runtime@npm:0.2.11"
|
resolution: "@napi-rs/wasm-runtime@npm:0.2.11"
|
||||||
|
@ -3252,21 +3243,21 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@tanstack/query-core@npm:5.81.5":
|
"@tanstack/query-core@npm:5.81.2":
|
||||||
version: 5.81.5
|
version: 5.81.2
|
||||||
resolution: "@tanstack/query-core@npm:5.81.5"
|
resolution: "@tanstack/query-core@npm:5.81.2"
|
||||||
checksum: 10c0/8d3af841f0e2f3fba1dfd100a8bbc2d07e7b1d5b8570d3d0d8bba5127601c2788e5f7c84839f93f3b0cbe54f14866c1fef8e3f9e745f02d27afaaeea33b7b755
|
checksum: 10c0/36a6bddec2e7512015bcfbb0d7b0876fab418de9e0ef21ad403598276960e0b7d53efd62832ce462738ad22d9883e31cb5403eafc65dfd9b2f6744c22a9d8e42
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@tanstack/react-query@npm:^5.80.7":
|
"@tanstack/react-query@npm:^5.80.7":
|
||||||
version: 5.81.5
|
version: 5.81.2
|
||||||
resolution: "@tanstack/react-query@npm:5.81.5"
|
resolution: "@tanstack/react-query@npm:5.81.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@tanstack/query-core": "npm:5.81.5"
|
"@tanstack/query-core": "npm:5.81.2"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^18 || ^19
|
react: ^18 || ^19
|
||||||
checksum: 10c0/04803dd7d7d6ac73ba8c55bb25d76aa2f74d173d1574a113c35559bf6a8ac7d04a75db5e470e9a2e4132fee5e0ce1ab23bd8c27d17f70a461aca0e7ae740e76b
|
checksum: 10c0/a80a2e7401a02bfc8d7a926c9e48b0a108cae21a2c47691632e754de44ca08838c105fb0c30804f4ccbf173bee04ad9a3e45a8bebdfc1d1a32468bbb9d960e19
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -3387,12 +3378,12 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:22.15.34":
|
"@types/node@npm:22.15.33":
|
||||||
version: 22.15.34
|
version: 22.15.33
|
||||||
resolution: "@types/node@npm:22.15.34"
|
resolution: "@types/node@npm:22.15.33"
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: "npm:~6.21.0"
|
undici-types: "npm:~6.21.0"
|
||||||
checksum: 10c0/fb6a6b36daaa1b484aaba3d33b4d1e7b37ea993e29f20b7a676affa76ed6ff6acd2ded4d5003469bc8dbc815b3d224533b4560896037ef6d5b5d552721ab7d57
|
checksum: 10c0/ee040c29c891aa37fffc27d04a8529318c391356346933646b7692eaf62236831ad532f6ebaf43ebd6a2ef1f0f091860d8a0a83a4e3c5a4f66d37aa1b2c99f31
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -5676,17 +5667,17 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint@npm:9.30.0":
|
"eslint@npm:9.29.0":
|
||||||
version: 9.30.0
|
version: 9.29.0
|
||||||
resolution: "eslint@npm:9.30.0"
|
resolution: "eslint@npm:9.29.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/eslint-utils": "npm:^4.2.0"
|
"@eslint-community/eslint-utils": "npm:^4.2.0"
|
||||||
"@eslint-community/regexpp": "npm:^4.12.1"
|
"@eslint-community/regexpp": "npm:^4.12.1"
|
||||||
"@eslint/config-array": "npm:^0.21.0"
|
"@eslint/config-array": "npm:^0.20.1"
|
||||||
"@eslint/config-helpers": "npm:^0.3.0"
|
"@eslint/config-helpers": "npm:^0.2.1"
|
||||||
"@eslint/core": "npm:^0.14.0"
|
"@eslint/core": "npm:^0.14.0"
|
||||||
"@eslint/eslintrc": "npm:^3.3.1"
|
"@eslint/eslintrc": "npm:^3.3.1"
|
||||||
"@eslint/js": "npm:9.30.0"
|
"@eslint/js": "npm:9.29.0"
|
||||||
"@eslint/plugin-kit": "npm:^0.3.1"
|
"@eslint/plugin-kit": "npm:^0.3.1"
|
||||||
"@humanfs/node": "npm:^0.16.6"
|
"@humanfs/node": "npm:^0.16.6"
|
||||||
"@humanwhocodes/module-importer": "npm:^1.0.1"
|
"@humanwhocodes/module-importer": "npm:^1.0.1"
|
||||||
|
@ -5722,14 +5713,7 @@ __metadata:
|
||||||
optional: true
|
optional: true
|
||||||
bin:
|
bin:
|
||||||
eslint: bin/eslint.js
|
eslint: bin/eslint.js
|
||||||
checksum: 10c0/ebc4b17cfd96f308ebaeb12dfab133a551eb03200c80109ecf663fbeb9af83c4eb3c143407c1b04522d23b5f5844fe9a629b00d409adfc460c1aadf5108da86a
|
checksum: 10c0/75e3f841e0f8b0fa93dbb2ba6ae538bd8b611c3654117bc3dadf90bb009923dfd2c15ec2948dc6e6b8b571317cc125c5cceb9255da8cd644ee740020df645dd8
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"esm-seedrandom@npm:^3.0.5":
|
|
||||||
version: 3.0.5
|
|
||||||
resolution: "esm-seedrandom@npm:3.0.5"
|
|
||||||
checksum: 10c0/6fe5a33f31bce0e733814df884cdfc27812e4b04ce973f7cf008b7b8500ecab6706f54591841bd12dd3bdd9bbb153abf04fb8efd4934a5b0ab273bff114cdb3b
|
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -7598,12 +7582,12 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"lucide-react@npm:^0.525.0":
|
"lucide-react@npm:^0.523.0":
|
||||||
version: 0.525.0
|
version: 0.523.0
|
||||||
resolution: "lucide-react@npm:0.525.0"
|
resolution: "lucide-react@npm:0.523.0"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
||||||
checksum: 10c0/81c4438e2cf1c86ea2ebe0a97b378201512450894283cccce766a89bc6a4e47c8df1d9115d845d98f582bb0a10be31c454aa232520fea35018dac1cd8466ea9b
|
checksum: 10c0/dafd180d05326edc81d928f37d6574930f0592da08b91c536ae5675d0b764295368e8daf9bcc81a5283c18e2f19412060d1da475b4f26112168245e708bd562f
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -7699,7 +7683,6 @@ __metadata:
|
||||||
"@fortawesome/free-solid-svg-icons": "npm:^6.7.2"
|
"@fortawesome/free-solid-svg-icons": "npm:^6.7.2"
|
||||||
"@fortawesome/react-fontawesome": "npm:^0.2.2"
|
"@fortawesome/react-fontawesome": "npm:^0.2.2"
|
||||||
"@hookform/resolvers": "npm:^5.0.1"
|
"@hookform/resolvers": "npm:^5.0.1"
|
||||||
"@marko19907/string-to-color": "npm:^1.0.0"
|
|
||||||
"@prisma/client": "npm:^6.9.0"
|
"@prisma/client": "npm:^6.9.0"
|
||||||
"@radix-ui/react-avatar": "npm:^1.1.10"
|
"@radix-ui/react-avatar": "npm:^1.1.10"
|
||||||
"@radix-ui/react-collapsible": "npm:^1.1.11"
|
"@radix-ui/react-collapsible": "npm:^1.1.11"
|
||||||
|
@ -7717,7 +7700,7 @@ __metadata:
|
||||||
"@radix-ui/react-tooltip": "npm:^1.2.7"
|
"@radix-ui/react-tooltip": "npm:^1.2.7"
|
||||||
"@tailwindcss/postcss": "npm:4.1.11"
|
"@tailwindcss/postcss": "npm:4.1.11"
|
||||||
"@tanstack/react-query": "npm:^5.80.7"
|
"@tanstack/react-query": "npm:^5.80.7"
|
||||||
"@types/node": "npm:22.15.34"
|
"@types/node": "npm:22.15.33"
|
||||||
"@types/react": "npm:19.1.8"
|
"@types/react": "npm:19.1.8"
|
||||||
"@types/react-big-calendar": "npm:1.16.2"
|
"@types/react-big-calendar": "npm:1.16.2"
|
||||||
"@types/react-dom": "npm:19.1.6"
|
"@types/react-dom": "npm:19.1.6"
|
||||||
|
@ -7730,10 +7713,10 @@ __metadata:
|
||||||
cypress: "npm:14.5.0"
|
cypress: "npm:14.5.0"
|
||||||
date-fns: "npm:^4.1.0"
|
date-fns: "npm:^4.1.0"
|
||||||
dotenv-cli: "npm:8.0.0"
|
dotenv-cli: "npm:8.0.0"
|
||||||
eslint: "npm:9.30.0"
|
eslint: "npm:9.29.0"
|
||||||
eslint-config-next: "npm:15.3.4"
|
eslint-config-next: "npm:15.3.4"
|
||||||
eslint-config-prettier: "npm:10.1.5"
|
eslint-config-prettier: "npm:10.1.5"
|
||||||
lucide-react: "npm:^0.525.0"
|
lucide-react: "npm:^0.523.0"
|
||||||
next: "npm:15.3.4"
|
next: "npm:15.3.4"
|
||||||
next-auth: "npm:^5.0.0-beta.25"
|
next-auth: "npm:^5.0.0-beta.25"
|
||||||
next-swagger-doc: "npm:^0.4.1"
|
next-swagger-doc: "npm:^0.4.1"
|
||||||
|
@ -9035,11 +9018,11 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"react-hook-form@npm:^7.56.4":
|
"react-hook-form@npm:^7.56.4":
|
||||||
version: 7.59.0
|
version: 7.58.1
|
||||||
resolution: "react-hook-form@npm:7.59.0"
|
resolution: "react-hook-form@npm:7.58.1"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^16.8.0 || ^17 || ^18 || ^19
|
react: ^16.8.0 || ^17 || ^18 || ^19
|
||||||
checksum: 10c0/6be30ce65121f4be0f491c2929142e2d9a390a8802f58fb7a41ab978ab8daa6fcd2c442258dbd1b053e6864a83c8f4b1d83de9c95f0efdf5c2120d3c21bd838e
|
checksum: 10c0/981b9982b7eb497c3afff86c219175fdd4d92a24e3533518035239545dda23f5ebc6ba647fb29a250f768bdf811ba413094ce0103fbf36b436737fc18aa1bb49
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue