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:
@@ -154,12 +154,24 @@ export function CatchBooksDataTable({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Mitglied</th>
|
||||
<th className="p-3 text-right font-medium">Jahr</th>
|
||||
<th className="p-3 text-right font-medium">Angeltage</th>
|
||||
<th className="p-3 text-right font-medium">Fänge</th>
|
||||
<th className="p-3 text-left font-medium">Status</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Mitglied
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Jahr
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Angeltage
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Fänge
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Status
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -209,6 +221,7 @@ export function CatchBooksDataTable({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label="Fangbuch bearbeiten"
|
||||
data-test="catchbook-edit-btn"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -217,7 +230,7 @@ export function CatchBooksDataTable({
|
||||
);
|
||||
}}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
<Pencil className="h-4 w-4" aria-hidden="true" />
|
||||
</Button>
|
||||
<DeleteConfirmButton
|
||||
title="Fangbuch löschen"
|
||||
|
||||
@@ -103,13 +103,21 @@ export function CompetitionsDataTable({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Name</th>
|
||||
<th className="p-3 text-left font-medium">Datum</th>
|
||||
<th className="p-3 text-left font-medium">Gewässer</th>
|
||||
<th className="p-3 text-right font-medium">
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Name
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Datum
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Gewässer
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Max. Teilnehmer
|
||||
</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -146,6 +154,7 @@ export function CompetitionsDataTable({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label="Wettkampf bearbeiten"
|
||||
data-test="competition-edit-btn"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -154,7 +163,7 @@ export function CompetitionsDataTable({
|
||||
);
|
||||
}}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
<Pencil className="h-4 w-4" aria-hidden="true" />
|
||||
</Button>
|
||||
<DeleteConfirmButton
|
||||
title="Wettbewerb löschen"
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
import { Input } from '@kit/ui/input';
|
||||
import { toast } from '@kit/ui/sonner';
|
||||
|
||||
import { CreateWaterSchema } from '../schema/fischerei.schema';
|
||||
import { CreateWaterSchema, type WaterType } from '../schema/fischerei.schema';
|
||||
import { createWater, updateWater } from '../server/actions/fischerei-actions';
|
||||
|
||||
interface CreateWaterFormProps {
|
||||
@@ -42,7 +42,7 @@ export function CreateWaterForm({
|
||||
accountId,
|
||||
name: (water?.name as string) ?? '',
|
||||
shortName: (water?.short_name as string) ?? '',
|
||||
waterType: (water?.water_type as string) ?? 'sonstige',
|
||||
waterType: (water?.water_type as WaterType | undefined) ?? 'sonstige',
|
||||
description: (water?.description as string) ?? '',
|
||||
surfaceAreaHa:
|
||||
water?.surface_area_ha != null
|
||||
|
||||
@@ -39,11 +39,12 @@ export function DeleteConfirmButton({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label="Löschen"
|
||||
data-test="delete-btn"
|
||||
disabled={isPending}
|
||||
onClick={(e: React.MouseEvent) => e.stopPropagation()}
|
||||
>
|
||||
<Trash2 className="text-destructive h-4 w-4" />
|
||||
<Trash2 className="text-destructive h-4 w-4" aria-hidden="true" />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -50,15 +50,27 @@ export function LeasesDataTable({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Verpächter</th>
|
||||
<th className="p-3 text-left font-medium">Gewässer</th>
|
||||
<th className="p-3 text-left font-medium">Beginn</th>
|
||||
<th className="p-3 text-left font-medium">Ende</th>
|
||||
<th className="p-3 text-right font-medium">
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Verpächter
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Gewässer
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Beginn
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Ende
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Jahresbetrag (EUR)
|
||||
</th>
|
||||
<th className="p-3 text-left font-medium">Zahlungsart</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Zahlungsart
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -44,12 +44,24 @@ export function PermitsDataTable({ data, accountId }: PermitsDataTableProps) {
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Bezeichnung</th>
|
||||
<th className="p-3 text-left font-medium">Kurzcode</th>
|
||||
<th className="p-3 text-left font-medium">Hauptgewässer</th>
|
||||
<th className="p-3 text-right font-medium">Gesamtmenge</th>
|
||||
<th className="p-3 text-center font-medium">Zum Verkauf</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Bezeichnung
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Kurzcode
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Hauptgewässer
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Gesamtmenge
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-center font-medium">
|
||||
Zum Verkauf
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -137,16 +137,24 @@ export function SpeciesDataTable({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Name</th>
|
||||
<th className="p-3 text-left font-medium">Lat. Name</th>
|
||||
<th className="p-3 text-right font-medium">
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Name
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Lat. Name
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Schonmaß (cm)
|
||||
</th>
|
||||
<th className="p-3 text-left font-medium">Schonzeit</th>
|
||||
<th className="p-3 text-right font-medium">
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Schonzeit
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Max. Fang/Tag
|
||||
</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -182,6 +190,7 @@ export function SpeciesDataTable({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label="Fischart bearbeiten"
|
||||
data-test="species-edit-btn"
|
||||
onClick={() =>
|
||||
router.push(
|
||||
@@ -189,7 +198,7 @@ export function SpeciesDataTable({
|
||||
)
|
||||
}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
<Pencil className="h-4 w-4" aria-hidden="true" />
|
||||
</Button>
|
||||
<DeleteConfirmButton
|
||||
title="Fischart löschen"
|
||||
|
||||
@@ -108,14 +108,30 @@ export function StockingDataTable({
|
||||
<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">Gewässer</th>
|
||||
<th className="p-3 text-left font-medium">Fischart</th>
|
||||
<th className="p-3 text-right font-medium">Anzahl</th>
|
||||
<th className="p-3 text-right font-medium">Gewicht (kg)</th>
|
||||
<th className="p-3 text-left font-medium">Altersklasse</th>
|
||||
<th className="p-3 text-right font-medium">Kosten (€)</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Datum
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Gewässer
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Fischart
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Anzahl
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Gewicht (kg)
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Altersklasse
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Kosten (€)
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -164,6 +180,7 @@ export function StockingDataTable({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label="Besatz bearbeiten"
|
||||
data-test="stocking-edit-btn"
|
||||
onClick={() =>
|
||||
router.push(
|
||||
@@ -171,7 +188,7 @@ export function StockingDataTable({
|
||||
)
|
||||
}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
<Pencil className="h-4 w-4" aria-hidden="true" />
|
||||
</Button>
|
||||
<DeleteConfirmButton
|
||||
title="Besatz löschen"
|
||||
|
||||
@@ -178,12 +178,24 @@ export function WatersDataTable({
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
<th className="p-3 text-left font-medium">Name</th>
|
||||
<th className="p-3 text-left font-medium">Kurzname</th>
|
||||
<th className="p-3 text-left font-medium">Typ</th>
|
||||
<th className="p-3 text-right font-medium">Fläche (ha)</th>
|
||||
<th className="p-3 text-left font-medium">Ort</th>
|
||||
<th className="p-3 text-right font-medium">Aktionen</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Name
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Kurzname
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Typ
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Fläche (ha)
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
Ort
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-right font-medium">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -227,6 +239,7 @@ export function WatersDataTable({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
aria-label="Gewässer bearbeiten"
|
||||
data-test="water-edit-btn"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -235,7 +248,7 @@ export function WatersDataTable({
|
||||
);
|
||||
}}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
<Pencil className="h-4 w-4" aria-hidden="true" />
|
||||
</Button>
|
||||
<DeleteConfirmButton
|
||||
title="Gewässer löschen"
|
||||
|
||||
@@ -490,13 +490,13 @@ export function createFischereiApi(client: SupabaseClient<Database>) {
|
||||
account_id: input.accountId,
|
||||
water_id: input.waterId,
|
||||
species_id: input.speciesId,
|
||||
stocking_date: input.stockingDate || null,
|
||||
stocking_date: input.stockingDate,
|
||||
quantity: input.quantity,
|
||||
weight_kg: input.weightKg,
|
||||
age_class: input.ageClass,
|
||||
cost_euros: input.costEuros,
|
||||
supplier_id: input.supplierId,
|
||||
remarks: input.remarks || null,
|
||||
remarks: input.remarks ?? null,
|
||||
created_by: userId,
|
||||
updated_by: userId,
|
||||
})
|
||||
@@ -599,11 +599,11 @@ export function createFischereiApi(client: SupabaseClient<Database>) {
|
||||
account_id: input.accountId,
|
||||
water_id: input.waterId,
|
||||
lessor_name: input.lessorName,
|
||||
lessor_address: input.lessorAddress || null,
|
||||
lessor_phone: input.lessorPhone || null,
|
||||
lessor_email: input.lessorEmail || null,
|
||||
start_date: input.startDate || null,
|
||||
end_date: input.endDate || null,
|
||||
lessor_address: input.lessorAddress ?? null,
|
||||
lessor_phone: input.lessorPhone ?? null,
|
||||
lessor_email: input.lessorEmail ?? null,
|
||||
start_date: input.startDate,
|
||||
end_date: input.endDate ?? null,
|
||||
duration_years: input.durationYears,
|
||||
initial_amount: input.initialAmount,
|
||||
fixed_annual_increase: input.fixedAnnualIncrease,
|
||||
@@ -885,7 +885,7 @@ export function createFischereiApi(client: SupabaseClient<Database>) {
|
||||
species_id: input.speciesId,
|
||||
water_id: input.waterId,
|
||||
member_id: input.memberId,
|
||||
catch_date: input.catchDate || null,
|
||||
catch_date: input.catchDate,
|
||||
quantity: input.quantity,
|
||||
length_cm: input.lengthCm,
|
||||
weight_g: input.weightG,
|
||||
@@ -897,7 +897,7 @@ export function createFischereiApi(client: SupabaseClient<Database>) {
|
||||
competition_id: input.competitionId,
|
||||
competition_participant_id: input.competitionParticipantId,
|
||||
permit_id: input.permitId,
|
||||
remarks: input.remarks || null,
|
||||
remarks: input.remarks ?? null,
|
||||
})
|
||||
.select()
|
||||
.single();
|
||||
@@ -946,8 +946,8 @@ export function createFischereiApi(client: SupabaseClient<Database>) {
|
||||
) {
|
||||
const { data, error } = await client.rpc('get_catch_statistics', {
|
||||
p_account_id: accountId,
|
||||
p_year: year ?? null,
|
||||
p_water_id: waterId ?? null,
|
||||
p_year: year,
|
||||
p_water_id: waterId,
|
||||
});
|
||||
if (error) throw error;
|
||||
return data ?? [];
|
||||
|
||||
Reference in New Issue
Block a user