added data table

This commit is contained in:
2025-07-15 14:37:09 -04:00
parent 3a2b20e468
commit 049def6886
8 changed files with 299 additions and 35 deletions

View File

@@ -192,5 +192,29 @@ export const mutations = {
});
},
async createEventLocation(data: {
name: string,
address: string,
city: string,
state: string,
postalCode: string,
country: string,
phone?: string,
email?: string,
}) {
return await prisma.location.create({
data: {
name: data.name,
address: data.address,
city: data.city,
state: data.state,
postalCode: data.postalCode,
country: data.country || 'United States',
phone: data.phone,
email: data.email
}
})
}
};

View File

@@ -133,6 +133,10 @@ export const queries = {
return await prisma.user.findUnique({
where: { id },
})
}
},
async fetchAllLocations() {
return await prisma.location.findMany()
},
}