Umbau Filter linksseitig
This commit is contained in:
@@ -103,6 +103,9 @@ export class BusinessListingService {
|
||||
whereConditions.push(and(ilike(schema.users.firstname, `%${firstname}%`), ilike(schema.users.lastname, `%${lastname}%`)));
|
||||
}
|
||||
}
|
||||
if (criteria.email) {
|
||||
whereConditions.push(eq(schema.users.email, criteria.email));
|
||||
}
|
||||
if (user?.role !== 'admin') {
|
||||
whereConditions.push(or(eq(businesses.email, user?.email), ne(businesses.draft, true)));
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ export interface BusinessListingCriteria extends ListCriteria {
|
||||
franchiseResale: boolean;
|
||||
title: string;
|
||||
brokerName: string;
|
||||
email: string;
|
||||
criteriaType: 'businessListings';
|
||||
}
|
||||
export interface CommercialPropertyListingCriteria extends ListCriteria {
|
||||
|
||||
Reference in New Issue
Block a user