Fix issue with undefined coordinates when editing site information
Update the site editing form in `client/src/pages/sites.tsx` to initialize latitude and longitude fields with empty strings instead of undefined, resolving the "address undefined" error. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/HdlP8Fl
This commit is contained in:
parent
3b2ac3d0cd
commit
6a63f54bc1
6
.replit
6
.replit
@ -20,9 +20,13 @@ localPort = 33035
|
||||
externalPort = 3001
|
||||
|
||||
[[ports]]
|
||||
localPort = 41295
|
||||
localPort = 33963
|
||||
externalPort = 5173
|
||||
|
||||
[[ports]]
|
||||
localPort = 41295
|
||||
externalPort = 6000
|
||||
|
||||
[[ports]]
|
||||
localPort = 41343
|
||||
externalPort = 3000
|
||||
|
||||
@ -220,6 +220,8 @@ export default function Sites() {
|
||||
editForm.reset({
|
||||
name: site.name,
|
||||
address: site.address,
|
||||
latitude: site.latitude || "",
|
||||
longitude: site.longitude || "",
|
||||
customerId: site.customerId ?? undefined,
|
||||
location: site.location,
|
||||
serviceTypeId: site.serviceTypeId ?? undefined,
|
||||
@ -231,8 +233,6 @@ export default function Sites() {
|
||||
contractEndDate: site.contractEndDate || undefined,
|
||||
serviceStartTime: site.serviceStartTime || "",
|
||||
serviceEndTime: site.serviceEndTime || "",
|
||||
latitude: site.latitude || undefined,
|
||||
longitude: site.longitude || undefined,
|
||||
isActive: site.isActive,
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user