Add medjobs.ir scraper + employer/employee choice at signup
- MedjobsListingSource: crawls medjobs.ir sitemaps (ad_listing-sitemapN) → fetches ad pages → title+description → engine (dedupe/parse/validate/publish as SEO job pages). Configured in /Admin/Settings (enable + max ads/run). - Login/register now asks 'کادر درمان' vs 'کارفرما/مرکز': new accounts get Doctor vs FacilityAdmin role; post-login routes to /Me, /Employer, or /Admin accordingly. - Verified live: medjobs run fetched real ads into the review queue; employer signup → /Employer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label style="display:flex; align-items:center; gap:8px; font-weight:700;">
|
||||
<input type="checkbox" name="MedjobsEnabled" value="true" style="width:auto;" checked="@Model.MedjobsEnabled" />
|
||||
مدجابز (medjobs.ir) — خواندن کامل آگهیها از سایتمپ
|
||||
</label>
|
||||
<label style="margin-top:6px;">حداکثر آگهی در هر اجرا</label>
|
||||
<input type="number" name="MedjobsMaxAds" min="1" max="500" value="@Model.MedjobsMaxAds" dir="ltr" />
|
||||
<p class="muted" style="font-size:12px; margin:4px 0 0;">آگهیهای تکراری بهصورت خودکار رد میشوند؛ هر اجرا فقط آگهیهای جدید را میآورد.</p>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-accent btn-block btn-lg">ذخیره تنظیمات</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,8 @@ public class SettingsModel : PageModel
|
||||
[BindProperty] public bool DivarEnabled { get; set; }
|
||||
[BindProperty] public string? DivarCity { get; set; }
|
||||
[BindProperty] public string? DivarQueries { get; set; }
|
||||
[BindProperty] public bool MedjobsEnabled { get; set; }
|
||||
[BindProperty] public int MedjobsMaxAds { get; set; } = 40;
|
||||
[TempData] public string? Saved { get; set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
@@ -52,6 +54,8 @@ public class SettingsModel : PageModel
|
||||
DivarEnabled = s.DivarEnabled;
|
||||
DivarCity = s.DivarCity;
|
||||
DivarQueries = s.DivarQueries;
|
||||
MedjobsEnabled = s.MedjobsEnabled;
|
||||
MedjobsMaxAds = s.MedjobsMaxAds;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync()
|
||||
@@ -75,6 +79,8 @@ public class SettingsModel : PageModel
|
||||
DivarEnabled = DivarEnabled,
|
||||
DivarCity = DivarCity,
|
||||
DivarQueries = DivarQueries,
|
||||
MedjobsEnabled = MedjobsEnabled,
|
||||
MedjobsMaxAds = MedjobsMaxAds,
|
||||
});
|
||||
Saved = "تنظیمات ذخیره شد.";
|
||||
return RedirectToPage();
|
||||
|
||||
Reference in New Issue
Block a user