Approximate-location map on aggregated listings (Divar coords)
We captured Divar's privacy-fuzzed coords on RawListing but discarded them for the listings that need them: unnamed-facility shifts/jobs dropped them (to avoid piling on the shared placeholder) and applicants had no coordinate field at all. - Add Lat/Lng to Shift, JobOpening, TalentListing (migration ListingApproxCoords). - Publish stores the source ad's approx coords on each aggregated listing. - Detail pages render the map from the listing's own coords (fallback: facility), and aggregated coords show as a shaded «محدودهٔ تقریبی» circle (not a precise pin) via _NeshanMap data-approx, with a disclaimer. Applicants get a map card (they had none) + the page now loads the Neshan key. Only Divar provides coords; the map needs NeshanMapKey set in admin settings. Existing rows get coords once reprocessed (RawListing already has them). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -334,6 +334,7 @@ public class IngestionService
|
||||
Phone = !string.IsNullOrWhiteSpace(d?.Phone) ? d!.Phone!.Trim() : parsed.Phone,
|
||||
Description = raw.RawText,
|
||||
Status = ShiftStatus.Open, Source = ShiftSource.Aggregated, SourceUrl = raw.SourceUrl,
|
||||
Lat = raw.Lat, Lng = raw.Lng, // approx. area from the source ad (Divar)
|
||||
Contacts = BuildContacts(d, parsed),
|
||||
Tags = BuildTags(parsed, d, role, city, extraRoleTags),
|
||||
});
|
||||
@@ -381,6 +382,7 @@ public class IngestionService
|
||||
SalaryMin = parsed.PayAmount,
|
||||
Description = raw.RawText, Status = ShiftStatus.Open, Source = ShiftSource.Aggregated,
|
||||
SourceUrl = raw.SourceUrl,
|
||||
Lat = raw.Lat, Lng = raw.Lng, // approx. area from the source ad (Divar)
|
||||
Contacts = BuildContacts(d, parsed), // the ad's OWN number(s) — fresh per listing
|
||||
});
|
||||
}
|
||||
@@ -399,6 +401,7 @@ public class IngestionService
|
||||
: parsed.PayAmount is null ? PayType.Negotiable : PayType.PerShift,
|
||||
PayAmount = parsed.PayAmount, SharePercent = parsed.SharePercent,
|
||||
Status = ShiftStatus.Open, Source = ShiftSource.Aggregated, SourceUrl = raw.SourceUrl,
|
||||
Lat = raw.Lat, Lng = raw.Lng, // approx. area from the source ad (Divar)
|
||||
Contacts = BuildContacts(d, parsed), // the ad's OWN number(s) — fresh per listing
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user