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:
+1635
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JobsMedical.Web.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ListingApproxCoords : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Lat",
|
||||
table: "TalentListings",
|
||||
type: "double precision",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Lng",
|
||||
table: "TalentListings",
|
||||
type: "double precision",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Lat",
|
||||
table: "Shifts",
|
||||
type: "double precision",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Lng",
|
||||
table: "Shifts",
|
||||
type: "double precision",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Lat",
|
||||
table: "JobOpenings",
|
||||
type: "double precision",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Lng",
|
||||
table: "JobOpenings",
|
||||
type: "double precision",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Lat",
|
||||
table: "TalentListings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Lng",
|
||||
table: "TalentListings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Lat",
|
||||
table: "Shifts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Lng",
|
||||
table: "Shifts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Lat",
|
||||
table: "JobOpenings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Lng",
|
||||
table: "JobOpenings");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -664,6 +664,12 @@ namespace JobsMedical.Web.Migrations
|
||||
b.Property<int>("GenderRequirement")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<double?>("Lat")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<double?>("Lng")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<string>("Requirements")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("character varying(1000)");
|
||||
@@ -942,6 +948,12 @@ namespace JobsMedical.Web.Migrations
|
||||
b.Property<int>("GenderRequirement")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<double?>("Lat")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<double?>("Lng")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<long?>("PayAmount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -1020,6 +1032,12 @@ namespace JobsMedical.Web.Migrations
|
||||
b.Property<bool>("IsLicensed")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<double?>("Lat")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<double?>("Lng")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<long?>("PayAmount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user