-filter the availble offers -book an appointment to visit l 7ala (then buy/rent, the contracts will be created by an agent) -see his contracts and profile
-activate properties for sale after checking them -add properties -making contracts after selling/renting properties -see his vistis schedule
-manage the visits schedule -manage the agents -manage the contracts -manage the clients -dashboard
for each agent we define the hours he starts his service and the hour he ends 0-23 we also define the active day 0-6 the visit is 1hour long
we choose the less working agent we choose the closest agent relative to the property
if someone misses the visits 2 times, he gets banned from the platform
basically we're calculatiing an arch length of an arc so obviously, we'll use the haversine formula
public float getDistance() {
return (float) (Math.acos(
Math.sin(p1.x) * Math.sin(p2.x) +
Math.cos(p1.x) * Math.cos(p2.x) *
Math.cos(p2.y - p1.y))
* 6371);
}