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
+4 -2
View File
@@ -7,6 +7,7 @@ interface CreateTripInput {
mountain: string;
location: string;
date: Date;
endDate?: Date;
maxParticipants: number;
price: number;
organizerId: string;
@@ -14,8 +15,8 @@ interface CreateTripInput {
}
export const tripService = {
async getOpenTrips() {
return tripRepo.findOpen();
async getOpenTrips(filters?: { q?: string; from?: string; to?: string }) {
return tripRepo.findOpen(filters);
},
async getAllTrips() {
@@ -43,6 +44,7 @@ export const tripService = {
mountain: input.mountain,
location: input.location,
date: input.date,
endDate: input.endDate,
maxParticipants: input.maxParticipants,
price: input.price,
organizer: { connect: { id: input.organizerId } },