feat: pre-existing local changes — fischerei, verband, modules, members, packages
Commits all remaining uncommitted local work: - apps/web: fischerei, verband, modules, members-cms, documents, newsletter, meetings, site-builder, courses, bookings, events, finance pages and components - apps/web: marketing page updates, layout, paths config, next.config.mjs, styles/makerkit.css - apps/web/i18n: documents, fischerei, marketing, verband (de+en) - packages/features: finance, fischerei, member-management, module-builder, newsletter, sitzungsprotokolle, verbandsverwaltung server APIs and components - packages/ui: button.tsx updates - pnpm-lock.yaml
This commit is contained in:
@@ -3,4 +3,4 @@ export { MeetingsDashboard } from './meetings-dashboard';
|
||||
export { ProtocolsDataTable } from './protocols-data-table';
|
||||
export { CreateProtocolForm } from './create-protocol-form';
|
||||
export { ProtocolItemsList } from './protocol-items-list';
|
||||
export { OpenTasksView } from './open-tasks-view';
|
||||
export { OpenTasksView, type OpenTask } from './open-tasks-view';
|
||||
|
||||
@@ -21,8 +21,7 @@ interface RecentProtocol {
|
||||
id: string;
|
||||
title: string;
|
||||
meeting_date: string;
|
||||
meeting_type: string;
|
||||
is_published: boolean;
|
||||
status: string;
|
||||
}
|
||||
|
||||
interface OverdueTask {
|
||||
@@ -163,11 +162,11 @@ export function MeetingsDashboard({
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{formatDate(protocol.meeting_date)}
|
||||
{' · '}
|
||||
{MEETING_TYPE_LABELS[protocol.meeting_type] ??
|
||||
protocol.meeting_type}
|
||||
{MEETING_TYPE_LABELS[protocol.status] ??
|
||||
protocol.status}
|
||||
</p>
|
||||
</div>
|
||||
{protocol.is_published && (
|
||||
{protocol.status === 'final' && (
|
||||
<Badge variant="default" className="ml-2 shrink-0">
|
||||
Veröffentlicht
|
||||
</Badge>
|
||||
|
||||
@@ -14,10 +14,10 @@ import {
|
||||
ITEM_STATUS_COLORS,
|
||||
} from '../lib/meetings-constants';
|
||||
|
||||
interface OpenTask {
|
||||
export interface OpenTask {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string | null;
|
||||
content: string | null;
|
||||
responsible_person: string | null;
|
||||
due_date: string | null;
|
||||
status: string;
|
||||
@@ -25,7 +25,6 @@ interface OpenTask {
|
||||
id: string;
|
||||
title: string;
|
||||
meeting_date: string;
|
||||
meeting_type: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -92,11 +91,21 @@ export function OpenTasksView({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Aufgabe</th>
|
||||
<th className="p-3 text-left font-medium">Protokoll</th>
|
||||
<th className="p-3 text-left font-medium">Zuständig</th>
|
||||
<th className="p-3 text-left font-medium">Fällig</th>
|
||||
<th className="p-3 text-center font-medium">Status</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Aufgabe
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Protokoll
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Zuständig
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Fällig
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-center font-medium">
|
||||
Status
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -117,9 +126,9 @@ export function OpenTasksView({
|
||||
<td className="p-3">
|
||||
<div>
|
||||
<p className="font-medium">{task.title}</p>
|
||||
{task.description && (
|
||||
{task.content && (
|
||||
<p className="text-muted-foreground mt-0.5 line-clamp-1 text-xs">
|
||||
{task.description}
|
||||
{task.content}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
interface ProtocolItem {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string | null;
|
||||
content: string | null;
|
||||
responsible_person: string | null;
|
||||
due_date: string | null;
|
||||
status: string;
|
||||
@@ -103,12 +103,24 @@ export function ProtocolItemsList({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">#</th>
|
||||
<th className="p-3 text-left font-medium">Titel</th>
|
||||
<th className="p-3 text-left font-medium">Zuständig</th>
|
||||
<th className="p-3 text-left font-medium">Fällig</th>
|
||||
<th className="p-3 text-center font-medium">Status</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
#
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Titel
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Zuständig
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Fällig
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-center font-medium">
|
||||
Status
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -124,9 +136,9 @@ export function ProtocolItemsList({
|
||||
<td className="p-3">
|
||||
<div>
|
||||
<p className="font-medium">{item.title}</p>
|
||||
{item.description && (
|
||||
{item.content && (
|
||||
<p className="text-muted-foreground mt-0.5 line-clamp-1 text-xs">
|
||||
{item.description}
|
||||
{item.content}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -160,11 +160,21 @@ export function ProtocolsDataTable({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Datum</th>
|
||||
<th className="p-3 text-left font-medium">Titel</th>
|
||||
<th className="p-3 text-left font-medium">Sitzungsart</th>
|
||||
<th className="p-3 text-left font-medium">Ort</th>
|
||||
<th className="p-3 text-center font-medium">Status</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Datum
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Titel
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Sitzungsart
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Ort
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-center font-medium">
|
||||
Status
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -33,7 +33,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
let query = client
|
||||
.from('meeting_protocols')
|
||||
.select(
|
||||
'id, title, meeting_date, meeting_type, location, attendees, remarks, is_published, created_at, updated_at',
|
||||
'id, title, meeting_date, status, location, attendees, summary, created_at, updated_at',
|
||||
{ count: 'exact' },
|
||||
)
|
||||
.eq('account_id', accountId)
|
||||
@@ -46,7 +46,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
}
|
||||
|
||||
if (opts?.meetingType) {
|
||||
query = query.eq('meeting_type', opts.meetingType);
|
||||
query = query.eq('status', opts.meetingType);
|
||||
}
|
||||
|
||||
if (opts?.year) {
|
||||
@@ -80,12 +80,11 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
.insert({
|
||||
account_id: input.accountId,
|
||||
title: input.title,
|
||||
meeting_date: input.meetingDate || null,
|
||||
meeting_type: input.meetingType,
|
||||
location: input.location || null,
|
||||
meeting_date: input.meetingDate,
|
||||
location: input.location ?? null,
|
||||
attendees: input.attendees,
|
||||
remarks: input.remarks,
|
||||
is_published: input.isPublished,
|
||||
summary: input.remarks ?? null,
|
||||
status: input.isPublished ? 'final' : 'entwurf',
|
||||
created_by: userId,
|
||||
updated_by: userId,
|
||||
})
|
||||
@@ -101,13 +100,11 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
if (input.title !== undefined) updateData.title = input.title;
|
||||
if (input.meetingDate !== undefined)
|
||||
updateData.meeting_date = input.meetingDate;
|
||||
if (input.meetingType !== undefined)
|
||||
updateData.meeting_type = input.meetingType;
|
||||
if (input.location !== undefined) updateData.location = input.location;
|
||||
if (input.attendees !== undefined) updateData.attendees = input.attendees;
|
||||
if (input.remarks !== undefined) updateData.remarks = input.remarks;
|
||||
if (input.remarks !== undefined) updateData.summary = input.remarks;
|
||||
if (input.isPublished !== undefined)
|
||||
updateData.is_published = input.isPublished;
|
||||
updateData.status = input.isPublished ? 'final' : 'entwurf';
|
||||
|
||||
const { data, error } = await client
|
||||
.from('meeting_protocols')
|
||||
@@ -135,14 +132,17 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
let query = client
|
||||
.from('meeting_protocol_items')
|
||||
.select(
|
||||
'id, protocol_id, title, description, responsible_person, due_date, status, sort_order, created_at, updated_at',
|
||||
'id, protocol_id, title, content, responsible_person, due_date, status, sort_order, item_type, item_number, decision_text, created_at, updated_at',
|
||||
)
|
||||
.eq('protocol_id', protocolId)
|
||||
.order('sort_order')
|
||||
.order('created_at');
|
||||
|
||||
if (opts?.status) {
|
||||
query = query.eq('status', opts.status);
|
||||
query = query.eq(
|
||||
'status',
|
||||
opts.status as Database['public']['Enums']['meeting_item_status'],
|
||||
);
|
||||
}
|
||||
|
||||
const { data, error } = await query;
|
||||
@@ -156,13 +156,11 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
.insert({
|
||||
protocol_id: input.protocolId,
|
||||
title: input.title,
|
||||
description: input.description,
|
||||
responsible_person: input.responsiblePerson,
|
||||
due_date: input.dueDate,
|
||||
content: input.description ?? null,
|
||||
responsible_person: input.responsiblePerson ?? null,
|
||||
due_date: input.dueDate ?? null,
|
||||
status: input.status,
|
||||
sort_order: input.sortOrder,
|
||||
created_by: userId,
|
||||
updated_by: userId,
|
||||
sort_order: input.sortOrder ?? 0,
|
||||
})
|
||||
.select()
|
||||
.single();
|
||||
@@ -171,11 +169,11 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
},
|
||||
|
||||
async updateItem(input: UpdateProtocolItemInput, userId: string) {
|
||||
const updateData: Record<string, unknown> = { updated_by: userId };
|
||||
const updateData: Record<string, unknown> = {};
|
||||
|
||||
if (input.title !== undefined) updateData.title = input.title;
|
||||
if (input.description !== undefined)
|
||||
updateData.description = input.description;
|
||||
updateData.content = input.description;
|
||||
if (input.responsiblePerson !== undefined)
|
||||
updateData.responsible_person = input.responsiblePerson;
|
||||
if (input.dueDate !== undefined) updateData.due_date = input.dueDate;
|
||||
@@ -198,7 +196,6 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
.from('meeting_protocol_items')
|
||||
.update({
|
||||
status: input.status,
|
||||
updated_by: userId,
|
||||
})
|
||||
.eq('id', input.itemId)
|
||||
.select()
|
||||
@@ -242,7 +239,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
const { data, error, count } = await client
|
||||
.from('meeting_protocol_items')
|
||||
.select(
|
||||
'id, protocol_id, title, description, responsible_person, due_date, status, sort_order, created_at, updated_at, meeting_protocols!inner ( id, title, meeting_date, meeting_type, account_id )',
|
||||
'id, protocol_id, title, content, responsible_person, due_date, status, sort_order, created_at, updated_at, meeting_protocols!inner ( id, title, meeting_date, account_id )',
|
||||
{ count: 'exact' },
|
||||
)
|
||||
.eq('meeting_protocols.account_id', accountId)
|
||||
@@ -286,7 +283,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
file_name: fileName,
|
||||
file_path: filePath,
|
||||
file_size: fileSize,
|
||||
mime_type: mimeType,
|
||||
content_type: mimeType,
|
||||
created_by: userId,
|
||||
})
|
||||
.select()
|
||||
@@ -364,7 +361,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
|
||||
async getRecentProtocols(accountId: string, limit = 5) {
|
||||
const { data, error } = await client
|
||||
.from('meeting_protocols')
|
||||
.select('id, title, meeting_date, meeting_type, is_published')
|
||||
.select('id, title, meeting_date, status')
|
||||
.eq('account_id', accountId)
|
||||
.order('meeting_date', { ascending: false })
|
||||
.limit(limit);
|
||||
|
||||
Reference in New Issue
Block a user