Ticket Fixing: #111, #110, #108 (SortBy)

This commit is contained in:
2024-09-09 17:35:08 +02:00
parent 9ecc0c2429
commit 06d83a478d
23 changed files with 308 additions and 70 deletions

View File

@@ -22,6 +22,8 @@ export interface UserData {
created?: Date;
updated?: Date;
}
export type SortByOptions = 'priceAsc' | 'priceDesc' | 'creationDateFirst' | 'creationDateLast' | 'nameAsc' | 'nameDesc' | 'srAsc' | 'srDesc' | 'cfAsc' | 'cfDesc';
export type SortByTypes = 'professional' | 'listing' | 'business' | 'commercial';
export type Gender = 'male' | 'female';
export type CustomerType = 'buyer' | 'seller' | 'professional';
export type CustomerSubType = 'broker' | 'cpa' | 'attorney' | 'titleCompany' | 'surveyor' | 'appraiser';
@@ -143,8 +145,7 @@ export const GeoSchema = z.object({
},
),
});
const phoneRegex = /^\(\d{3}\)\s\d{3}-\d{4}$/;
const phoneRegex = /^(\+1|1)?[-.\s]?\(?[2-9]\d{2}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/;
export const UserSchema = z
.object({
id: z.string().uuid().optional().nullable(),