guest book added

This commit is contained in:
2025-06-26 12:37:34 -04:00
parent 6aceafeb67
commit 29c91fee7f
17 changed files with 622 additions and 4 deletions

View File

@@ -80,8 +80,41 @@ export const mutations = {
});
return event;
}
},
async createGuestBookEntry(data: {
fName: string,
lName: string,
side: string,
email?: string,
phone?: string,
address?: string,
notes?: string
}) {
return await prisma.guestBookEntry.create({
data
})
},
async updateGuestBookEntry(id: string, data: Partial<{
fName: string,
lName: string,
side: string,
email?: string,
phone?: string,
address?: string,
notes?: string
}>){
return await prisma.guestBookEntry.update({
where: { id },
data
})
},
async deletGuestBookEntry(id: string) {
return await prisma.guestBookEntry.delete({
where: { id }
})
},
};

View File

@@ -27,5 +27,14 @@ export const queries = {
}
})
return event
}
},
async fetchGuestBookEntries() {
return await prisma.guestBookEntry.findMany({
orderBy: [
{ lName: 'asc' },
{ fName: 'asc' }
],
})
},
}