Compare commits

..

No commits in common. "main" and "fix-docker-build" have entirely different histories.

51 changed files with 376 additions and 453 deletions

View File

@ -1,6 +1,8 @@
name: Build Nginx-based docker image name: Build Nginx-based docker image
on: on:
push: push:
branches:
- main
concurrency: concurrency:
group: ${{ github.ref }} group: ${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
@ -28,7 +30,7 @@ jobs:
with: with:
context: . context: .
target: deps target: deps
push: ${{ github.ref == 'refs/heads/main' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps
cache-to: type=inline cache-to: type=inline
@ -38,16 +40,16 @@ jobs:
with: with:
context: . context: .
target: builder target: builder
push: ${{ github.ref == 'refs/heads/main' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder
cache-to: type=inline cache-to: type=inline
- name: Build and push (final) - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: ${{ github.ref == 'refs/heads/main' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-to: type=inline cache-to: type=inline

View File

@ -16,7 +16,7 @@ jobs:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- uses: VinnyBabuManjaly/copyright-action@v1.0.0 - uses: VinnyBabuManjaly/copyright-action@v1.0.0
with: with:
CopyrightString: '/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/\n\n' CopyrightString: '/* Copyright (C) 2024 Manuel Bustillo*/\n\n'
FileType: '.tsx, .jsx, .ts' FileType: '.tsx, .jsx, .ts'
Path: 'app/, config/, db/' Path: 'app/, config/, db/'
IgnorePath: 'testfolder1/a/, testfolder3' IgnorePath: 'testfolder1/a/, testfolder3'

2
.nvmrc
View File

@ -1 +1 @@
23.11.0 23.5.0

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client' 'use client'

View File

@ -1,11 +1,10 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';
import { AbstractApi, } from '@/app/api/abstract-api'; import { AbstractApi, } from '@/app/api/abstract-api';
import { Group, GroupSerializer } from '@/app/lib/group'; import { Group, GroupSerializer } from '@/app/lib/group';
import { Guest, GuestSerializer } from '@/app/lib/guest'; import { Guest, GuestSerializer } from '@/app/lib/guest';
import { getCsrfToken, getSlug } from '@/app/lib/utils';
import AffinitiesFormDialog from '@/app/ui/components/affinities-form-dialog'; import AffinitiesFormDialog from '@/app/ui/components/affinities-form-dialog';
import { classNames } from '@/app/ui/components/button'; import { classNames } from '@/app/ui/components/button';
import GroupFormDialog from '@/app/ui/components/group-form-dialog'; import GroupFormDialog from '@/app/ui/components/group-form-dialog';
@ -32,16 +31,6 @@ export default function Page() {
}); });
} }
function resetAffinities() {
fetch(`/api/${getSlug()}/groups/affinities/reset`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'X-CSRF-TOKEN': getCsrfToken(),
}
})
}
const [groupsLoaded, setGroupsLoaded] = useState(false); const [groupsLoaded, setGroupsLoaded] = useState(false);
const [groups, setGroups] = useState<Array<Group>>([]); const [groups, setGroups] = useState<Array<Group>>([]);
const [groupBeingEdited, setGroupBeingEdited] = useState<Group | undefined>(undefined); const [groupBeingEdited, setGroupBeingEdited] = useState<Group | undefined>(undefined);
@ -81,11 +70,7 @@ export default function Page() {
<TabPanel header="Groups" leftIcon="pi pi-sitemap mx-2"> <TabPanel header="Groups" leftIcon="pi pi-sitemap mx-2">
<div className="flex flex-col w-full items-center justify-between"> <div className="flex flex-col w-full items-center justify-between">
<div> <button onClick={() => setGroupBeingEdited({})} className={classNames('primary')}>Add new</button>
<button onClick={() => setGroupBeingEdited({})} className={classNames('primary')}>Add new</button>
<button onClick={resetAffinities} className={classNames('yellow')}>Reset affinities</button>
</div>
<GroupFormDialog <GroupFormDialog
key={groupBeingEdited?.id} key={groupBeingEdited?.id}
groups={groups} groups={groups}

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import SideNav from '@/app/ui/dashboard/sidenav'; import SideNav from '@/app/ui/dashboard/sidenav';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client' 'use client'

View File

@ -1,42 +1,16 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';
import { AbstractApi } from '@/app/api/abstract-api';
import { TableSimulation, TableSimulationSerializer } from '@/app/lib/tableSimulation';
import Arrangement from '@/app/ui/arrangements/arrangement'; import Arrangement from '@/app/ui/arrangements/arrangement';
import React, { useState } from 'react';
import ArrangementsTable from '@/app/ui/arrangements/arrangements-table'; import ArrangementsTable from '@/app/ui/arrangements/arrangements-table';
import { classNames } from '@/app/ui/components/button';
import { Toast } from 'primereact/toast';
import React, { useRef, useState } from 'react';
export default function Page() { export default function Page() {
const toast = useRef<Toast>(null);
const show = () => {
toast.current?.show({
severity: 'success',
summary: 'Simulation created',
detail: 'Table distributions will be calculated shortly, please come back in some minutes'
});
};
const [currentArrangement, setCurrentArrangement] = useState<string | null>(null); const [currentArrangement, setCurrentArrangement] = useState<string | null>(null);
function createSimulation() {
const api = new AbstractApi<TableSimulation>();
const serializer = new TableSimulationSerializer();
api.create(serializer, new TableSimulation(), show);
}
return ( return (
<> <>
<div className="flex flex-col w-full items-center justify-between">
<Toast ref={toast} />
<button onClick={createSimulation} className={classNames('primary')}>Add new</button>
</div>
<ArrangementsTable onArrangementSelected={setCurrentArrangement} /> <ArrangementsTable onArrangementSelected={setCurrentArrangement} />
{currentArrangement && <Arrangement key={currentArrangement} id={currentArrangement} />} {currentArrangement && <Arrangement key={currentArrangement} id={currentArrangement} />}
</> </>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Entity } from '@/app/lib/definitions'; import { Entity } from '@/app/lib/definitions';
import { getCsrfToken, getSlug } from '@/app/lib/utils'; import { getCsrfToken, getSlug } from '@/app/lib/utils';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { asArray, getCsrfToken, getSlug } from '@/app/lib/utils'; import { asArray, getCsrfToken, getSlug } from '@/app/lib/utils';
import { Captcha, StructuredErrors, User } from '@/app/lib/definitions'; import { Captcha, StructuredErrors, User } from '@/app/lib/definitions';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { data } from "autoprefixer"; import { data } from "autoprefixer";
import { getCsrfToken } from "../lib/utils"; import { getCsrfToken } from "../lib/utils";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { NextResponse } from "next/server"; import { NextResponse } from "next/server";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { TableArrangement } from '@/app/lib/definitions'; import { TableArrangement } from '@/app/lib/definitions';
import { getSlug } from '../lib/utils'; import { getSlug } from '../lib/utils';
@ -12,7 +12,6 @@ export function loadTableSimulations(onLoad?: (tableSimulations: TableArrangemen
id: record.id, id: record.id,
name: record.name, name: record.name,
discomfort: record.discomfort, discomfort: record.discomfort,
valid: record.valid,
}); });
})); }));
}, (error) => { }, (error) => {

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import '@/app/ui/global.css' import '@/app/ui/global.css'

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
export class Affinities { export class Affinities {
[key:string]: number; [key:string]: number;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { AttendanceSummary } from "./group"; import { AttendanceSummary } from "./group";
import { Guest } from "./guest"; import { Guest } from "./guest";
@ -12,8 +12,7 @@ export type TableArrangement = {
number: number; number: number;
name: string; name: string;
guests?: Guest[]; guests?: Guest[];
discomfort?: number; discomfort?: number
valid?: boolean;
} }
export type User = { export type User = {

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Serializable } from "../api/abstract-api"; import { Serializable } from "../api/abstract-api";
import { Entity } from "./definitions"; import { Entity } from "./definitions";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Entity } from "./definitions"; import { Entity } from "./definitions";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Serializable } from "../api/abstract-api"; import { Serializable } from "../api/abstract-api";
import { Entity } from "./definitions"; import { Entity } from "./definitions";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Serializable } from "../api/abstract-api"; import { Serializable } from "../api/abstract-api";
import { Entity } from "./definitions"; import { Entity } from "./definitions";
@ -19,12 +19,12 @@ export type Table = {
} }
export class TableSimulation implements Entity { export class TableSimulation implements Entity {
id?: string; id: string;
tables: Table[]; tables: Table[];
constructor(id?: string, tables?: Table[]) { constructor(id: string, tables: Table[]) {
this.id = id; this.id = id;
this.tables = tables || []; this.tables = tables;
} }
} }

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
export const getCsrfToken = () => { export const getCsrfToken = () => {
return document.cookie return document.cookie

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import * as HeroIcon from '@heroicons/react/24/outline' import * as HeroIcon from '@heroicons/react/24/outline'
import { ComponentProps } from 'react' import { ComponentProps } from 'react'

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client' 'use client'
@ -7,57 +7,42 @@ import { TableArrangement } from '@/app/lib/definitions';
import { classNames } from "../components/button"; import { classNames } from "../components/button";
import TableOfContents from "../components/table-of-contents"; import TableOfContents from "../components/table-of-contents";
import { loadTableSimulations } from "@/app/api/tableSimulations"; import { loadTableSimulations } from "@/app/api/tableSimulations";
import { ArchiveBoxXMarkIcon, CheckBadgeIcon } from "@heroicons/react/24/outline";
import { Tooltip } from "primereact/tooltip";
import clsx from "clsx";
export default function ArrangementsTable({ onArrangementSelected }: { onArrangementSelected: (arrangementId: string) => void }) { export default function ArrangementsTable ({onArrangementSelected}: {onArrangementSelected: (arrangementId: string) => void}) {
const [arrangements, setArrangements] = useState<Array<TableArrangement>>([]); const [arrangements, setArrangements] = useState<Array<TableArrangement>>([]);
const [arrangementsLoaded, setArrangementsLoaded] = useState(false); const [arrangementsLoaded, setArrangementsLoaded] = useState(false);
function refreshSimulations() { function refreshSimulations() {
loadTableSimulations((arrangements) => { loadTableSimulations((arrangements) => {
setArrangements(arrangements); setArrangements(arrangements);
setArrangementsLoaded(true); setArrangementsLoaded(true);
}); });
} }
function arrangementClicked(e: React.MouseEvent<HTMLElement>) { function arrangementClicked(e: React.MouseEvent<HTMLElement>) {
onArrangementSelected(e.currentTarget.getAttribute('data-arrangement-id') || ''); onArrangementSelected(e.currentTarget.getAttribute('data-arrangement-id') || '');
} }
!arrangementsLoaded && refreshSimulations(); !arrangementsLoaded && refreshSimulations();
return ( return(
<TableOfContents <TableOfContents
headers={['Name', 'Discomfort', 'Actions', 'Status']} headers={['Name', 'Discomfort', 'Actions']}
caption='Simulations' caption='Simulations'
elements={arrangements} elements={arrangements}
rowRender={(arrangement) => ( rowRender={(arrangement) => (
<tr key={arrangement.id} className={clsx("border-b", { <tr key={arrangement.id} className="bg-white border-b odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800">
"bg-white odd:bg-white even:bg-gray-50": arrangement.valid, <th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
"bg-red-50 odd:bg-red-50 even:bg-red-100": !arrangement.valid {arrangement.name}
})}> </th>
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap"> <td className="px-6 py-4">
{arrangement.name} {arrangement.discomfort}
</th> </td>
<td className="px-6 py-4"> <td>
{arrangement.discomfort} <button data-arrangement-id={arrangement.id} onClick={arrangementClicked} className={classNames('primary')}>Load</button>
</td> </td>
<td> </tr>
<button data-arrangement-id={arrangement.id} onClick={arrangementClicked} className={classNames('primary')}>Load</button> )}
</td> />
<td> );
<Tooltip target=".tooltip-status" />
{
arrangement.valid ?
<CheckBadgeIcon className='size-6 tooltip-status' data-pr-position="right" data-pr-tooltip="Simulation is valid" /> :
<ArchiveBoxXMarkIcon className='size-6 tooltip-status' data-pr-position="right" data-pr-tooltip="Simulation is expired due to attendance or affinity changes" />
}
</td>
</tr>
)}
/>
);
} }

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import clsx from 'clsx'; import clsx from 'clsx';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';
@ -48,16 +48,6 @@ export default function AffinitiesFormDialog({ groups, group, visible, onHide }:
}); });
} }
function resetAffinities() {
fetch(`/api/${getSlug()}/groups/${group?.id}/affinities/default`, {
method: 'GET',
headers: {
'Accept': 'application/json',
}
}).then((response) => response.json())
.then(setAffinities);
}
return ( return (
<Dialog header="Update affinities" visible={visible} style={{ width: '60vw' }} onHide={onHide}> <Dialog header="Update affinities" visible={visible} style={{ width: '60vw' }} onHide={onHide}>
{!isLoadingAffinities && <div className="card justify-evenly py-5 bg-gray-200 flex flex-col"> {!isLoadingAffinities && <div className="card justify-evenly py-5 bg-gray-200 flex flex-col">
@ -71,10 +61,7 @@ export default function AffinitiesFormDialog({ groups, group, visible, onHide }:
</div>) </div>)
} }
<div className="flex justify-center"> <button className={classNames('primary')} onClick={submitAffinities} >Update</button>
<button className={classNames('gray')} onClick={resetAffinities} >Reset</button>
<button className={classNames('primary')} onClick={submitAffinities} >Update</button>
</div>
</div> </div>
} }
</Dialog> </Dialog>

View File

@ -1,15 +1,14 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import clsx from "clsx"; import clsx from "clsx";
type ButtonColor = 'primary' | 'blue' | 'green' | 'red' | 'yellow' | 'gray'; type ButtonColor = 'primary' | 'blue' | 'green' | 'red' | 'yellow';
export function classNames(type: ButtonColor) { export function classNames(type: ButtonColor) {
return (clsx("text-white py-1 px-2 mx-1 rounded disabled:opacity-50 disabled:cursor-not-allowed", { return (clsx("text-white py-1 px-2 mx-1 rounded disabled:opacity-50 disabled:cursor-not-allowed", {
'bg-blue-400 hover:bg-blue-600': type === 'primary' || type === 'blue', 'bg-blue-400 hover:bg-blue-600': type === 'primary' || type === 'blue',
'bg-green-500 hover:bg-green-600': type === 'green', 'bg-green-500 hover:bg-green-600': type === 'green',
'bg-red-500 hover:bg-red-600': type === 'red', 'bg-red-500 hover:bg-red-600': type === 'red',
'bg-yellow-500 hover:bg-yellow-700': type === 'yellow', 'bg-yellow-500 hover:bg-yellow-700': type === 'yellow'
'bg-gray-500 hover:bg-gray-700': type === 'gray'
})) }))
} }

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import clsx from "clsx" import clsx from "clsx"
import { Icon } from "../../types"; import { Icon } from "../../types";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Slider } from 'primereact/slider'; import { Slider } from 'primereact/slider';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import React, { useState } from 'react'; import React, { useState } from 'react';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
export default function TableOfContents<Type>({ headers, caption, elements, rowRender }: { headers: string[], caption: string, elements: Type[], rowRender: (element: Type) => JSX.Element }) { export default function TableOfContents<Type>({ headers, caption, elements, rowRender }: { headers: string[], caption: string, elements: Type[], rowRender: (element: Type) => JSX.Element }) {
return ( return (

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Guest } from "@/app/lib/guest"; import { Guest } from "@/app/lib/guest";
import { Table as TableType } from "@/app/lib/tableSimulation"; import { Table as TableType } from "@/app/lib/tableSimulation";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { GlobalSummary as Summary} from '@/app/lib/definitions'; import { GlobalSummary as Summary} from '@/app/lib/definitions';
import { MainCard, SecondaryCard } from '../components/dashboard-cards'; import { MainCard, SecondaryCard } from '../components/dashboard-cards';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
export default function Loading() { export default function Loading() {
return <div>Loading...</div>; return <div>Loading...</div>;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client' 'use client'

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client' 'use client'

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import { Inter, Lusitana, Gloria_Hallelujah} from 'next/font/google'; import { Inter, Lusitana, Gloria_Hallelujah} from 'next/font/google';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';
@ -35,7 +35,6 @@ export default function GroupsTable({ groups, onUpdate, onEdit, onEditAffinities
return acc; return acc;
}, new Map()); }, new Map());
groups.forEach(group => group.children = []);
groups.forEach(group => { groups.forEach(group => {
if (group.parentId) { if (group.parentId) {
const parent = index.get(group.parentId); const parent = index.get(group.parentId);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
import Skeleton from '@/app/ui/skeleton'; import Skeleton from '@/app/ui/skeleton';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/ /* Copyright (C) 2024 Manuel Bustillo*/
export default function Skeleton({ className }: { className: string }) { export default function Skeleton({ className }: { className: string }) {
return <div className={`bg-slate-200 motion-safe:animate-pulse rounded ${className}`} />; return <div className={`bg-slate-200 motion-safe:animate-pulse rounded ${className}`} />;

View File

@ -8,31 +8,31 @@
"dependencies": { "dependencies": {
"@heroicons/react": "^2.1.4", "@heroicons/react": "^2.1.4",
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"autoprefixer": "10.4.21", "autoprefixer": "10.4.20",
"bcrypt": "^5.1.1", "bcrypt": "^5.1.1",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"next": "15.3.1", "next": "15.1.3",
"next-auth": "5.0.0-beta.25", "next-auth": "5.0.0-beta.25",
"postcss": "8.5.3", "postcss": "8.4.49",
"primeicons": "^7.0.0", "primeicons": "^7.0.0",
"primereact": "^10.8.2", "primereact": "^10.8.2",
"react": "19.0.0-rc-f38c22b244-20240704", "react": "19.0.0-rc-f38c22b244-20240704",
"react-dom": "19.0.0-rc-f38c22b244-20240704", "react-dom": "19.0.0-rc-f38c22b244-20240704",
"tailwindcss": "3.4.17", "tailwindcss": "3.4.17",
"typescript": "5.8.3", "typescript": "5.7.2",
"use-debounce": "^10.0.1", "use-debounce": "^10.0.1",
"uuid": "11.1.0", "uuid": "11.0.3",
"zod": "^3.23.8" "zod": "^3.23.8"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.46.0", "@playwright/test": "^1.46.0",
"@types/bcrypt": "^5.0.2", "@types/bcrypt": "^5.0.2",
"@types/node": "22.14.1", "@types/node": "22.10.2",
"@types/react": "18.3.20", "@types/react": "18.3.18",
"@types/react-dom": "18.3.6" "@types/react-dom": "18.3.5"
}, },
"engines": { "engines": {
"node": ">=23.0.0" "node": ">=23.0.0"
}, },
"packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531" "packageManager": "pnpm@9.15.2+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321"
} }

546
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff