add group information field to group settings and Information tab (#164)

* add group information field to group and Information tab to display

* add breaks to info page

* Improve UX

---------

Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
This commit is contained in:
Chris Johnston
2024-08-02 17:03:36 +01:00
committed by GitHub
parent 4f5e124ff0
commit 972bb9dadb
9 changed files with 103 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ export async function createGroup(groupFormValues: GroupFormValues) {
data: {
id: randomId(),
name: groupFormValues.name,
information: groupFormValues.information,
currency: groupFormValues.currency,
participants: {
createMany: {
@@ -226,6 +227,7 @@ export async function updateGroup(
where: { id: groupId },
data: {
name: groupFormValues.name,
information: groupFormValues.information,
currency: groupFormValues.currency,
participants: {
deleteMany: existingGroup.participants.filter(

View File

@@ -4,6 +4,7 @@ import * as z from 'zod'
export const groupFormSchema = z
.object({
name: z.string().min(2, 'min2').max(50, 'max50'),
information: z.string().optional(),
currency: z.string().min(1, 'min1').max(5, 'max5'),
participants: z
.array(