add end date and create logo and fix filter

This commit is contained in:
arifal
2026-04-17 00:16:31 +07:00
parent 82c1da9951
commit 7159e9108f
35 changed files with 743 additions and 82 deletions
+2
View File
@@ -18,6 +18,7 @@ export async function createTripAction(formData: FormData) {
mountain: formData.get("mountain") as string,
location: formData.get("location") as string,
date: formData.get("date") as string,
endDate: (formData.get("endDate") as string) || undefined,
maxParticipants: formData.get("maxParticipants") as string,
price: formData.get("price") as string,
};
@@ -37,6 +38,7 @@ export async function createTripAction(formData: FormData) {
const trip = await tripService.createTrip({
...result.data,
date: new Date(result.data.date),
endDate: result.data.endDate ? new Date(result.data.endDate) : undefined,
organizerId: session.user.id,
imageUrls: imageUrls.length > 0 ? imageUrls : undefined,
});