Add account hierarchy framework with migrations, RLS policies, and UI components

This commit is contained in:
T. Zehetbauer
2026-03-31 22:18:04 +02:00
parent 7e7da0b465
commit 59546ad6d2
262 changed files with 11671 additions and 3927 deletions

View File

@@ -1,12 +1,20 @@
import { z } from 'zod';
export const MembershipStatusEnum = z.enum([
'active', 'inactive', 'pending', 'resigned', 'excluded', 'deceased',
'active',
'inactive',
'pending',
'resigned',
'excluded',
'deceased',
]);
export type MembershipStatus = z.infer<typeof MembershipStatusEnum>;
export const SepaMandateStatusEnum = z.enum([
'active', 'pending', 'revoked', 'expired',
'active',
'pending',
'revoked',
'expired',
]);
export const CreateMemberSchema = z.object({
@@ -78,7 +86,9 @@ export const CreateDuesCategorySchema = z.object({
name: z.string().min(1).max(128),
description: z.string().optional(),
amount: z.number().min(0),
interval: z.enum(['monthly', 'quarterly', 'half_yearly', 'yearly']).default('yearly'),
interval: z
.enum(['monthly', 'quarterly', 'half_yearly', 'yearly'])
.default('yearly'),
isDefault: z.boolean().default(false),
isYouth: z.boolean().default(false),
isExit: z.boolean().default(false),
@@ -130,7 +140,9 @@ export const UpdateDuesCategorySchema = z.object({
name: z.string().min(1).optional(),
description: z.string().optional(),
amount: z.number().min(0).optional(),
interval: z.enum(['monthly', 'quarterly', 'half_yearly', 'yearly']).optional(),
interval: z
.enum(['monthly', 'quarterly', 'half_yearly', 'yearly'])
.optional(),
isDefault: z.boolean().optional(),
});
export type UpdateDuesCategoryInput = z.infer<typeof UpdateDuesCategorySchema>;