Validierung Part II, neue Komponenten

This commit is contained in:
2024-08-01 22:43:32 +02:00
parent 2955c034a0
commit 29f88d610f
18 changed files with 1431 additions and 242 deletions

View File

@@ -281,3 +281,87 @@ export interface ValidationMessage {
field: string;
message: string;
}
export function createDefaultUser(email: string, firstname: string, lastname: string): User {
return {
id: undefined,
email,
firstname,
lastname,
phoneNumber: null,
description: null,
companyName: null,
companyOverview: null,
companyWebsite: null,
companyLocation: null,
offeredServices: null,
areasServed: [],
hasProfile: false,
hasCompanyLogo: false,
licensedIn: [],
gender: null,
customerType: 'buyer',
customerSubType: null,
created: new Date(),
updated: new Date(),
};
}
export function createDefaultCommercialPropertyListing(): CommercialPropertyListing {
return {
id: undefined,
serialId: undefined,
email: '',
type: null,
title: '',
description: '',
city: '',
state: '',
price: null,
favoritesForUser: [],
hideImage: false,
draft: false,
zipCode: null,
county: '',
imageOrder: [],
imagePath: '',
created: null,
updated: null,
visits: null,
lastVisit: null,
latitude: null,
longitude: null,
listingsCategory: 'commercialProperty',
};
}
export function createDefaultBusinessListing(): BusinessListing {
return {
id: undefined,
email: '',
type: null,
title: '',
description: '',
city: '',
state: '',
price: null,
favoritesForUser: [],
draft: false,
realEstateIncluded: false,
leasedLocation: false,
franchiseResale: false,
salesRevenue: null,
cashFlow: null,
supportAndTraining: '',
employees: null,
established: null,
internalListingNumber: null,
reasonForSale: '',
brokerLicencing: '',
internals: '',
created: null,
updated: null,
visits: null,
lastVisit: null,
latitude: null,
longitude: null,
listingsCategory: 'business',
};
}