mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-16 20:46:13 +01:00
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:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user