Paginator & SQL Querries where clauses & city search
This commit is contained in:
@@ -36,32 +36,32 @@ export type ListingCategory = {
|
||||
export type ListingType = BusinessListing | CommercialPropertyListing;
|
||||
|
||||
export type ResponseBusinessListingArray = {
|
||||
data: BusinessListing[];
|
||||
total: number;
|
||||
results: BusinessListing[];
|
||||
totalCount: number;
|
||||
};
|
||||
export type ResponseBusinessListing = {
|
||||
data: BusinessListing;
|
||||
};
|
||||
export type ResponseCommercialPropertyListingArray = {
|
||||
data: CommercialPropertyListing[];
|
||||
total: number;
|
||||
results: CommercialPropertyListing[];
|
||||
totalCount: number;
|
||||
};
|
||||
export type ResponseCommercialPropertyListing = {
|
||||
data: CommercialPropertyListing;
|
||||
};
|
||||
export type ResponseUsersArray = {
|
||||
data: User[];
|
||||
total: number;
|
||||
results: User[];
|
||||
totalCount: number;
|
||||
};
|
||||
export interface ListCriteria {
|
||||
start: number;
|
||||
length: number;
|
||||
page: number;
|
||||
pageCount: number;
|
||||
city: string;
|
||||
types: string[];
|
||||
city: string;
|
||||
prompt: string;
|
||||
criteriaType: 'business' | 'commercialProperty' | 'user';
|
||||
criteriaType: 'business' | 'commercialProperty' | 'broker';
|
||||
}
|
||||
export interface BusinessListingCriteria extends ListCriteria {
|
||||
state: string;
|
||||
@@ -97,7 +97,7 @@ export interface UserListingCriteria extends ListCriteria {
|
||||
companyName: string;
|
||||
counties: string[];
|
||||
states: string[];
|
||||
criteriaType: 'user';
|
||||
criteriaType: 'broker';
|
||||
}
|
||||
|
||||
export interface KeycloakUser {
|
||||
@@ -224,6 +224,12 @@ export interface UploadParams {
|
||||
imagePath: string;
|
||||
serialId?: number;
|
||||
}
|
||||
export interface GeoResult {
|
||||
id: number;
|
||||
city: string;
|
||||
state: string;
|
||||
state_code: string;
|
||||
}
|
||||
export function isEmpty(value: any): boolean {
|
||||
// Check for undefined or null
|
||||
if (value === undefined || value === null) {
|
||||
@@ -258,3 +264,4 @@ export function emailToDirName(email: string): string {
|
||||
|
||||
return normalizedEmail;
|
||||
}
|
||||
export const LISTINGS_PER_PAGE = 12;
|
||||
|
||||
Reference in New Issue
Block a user